diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 3bb50a137ec..49071de7771 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -31,6 +31,9 @@ on: platform: required: true type: string + runs-on: + required: true + type: string extra-conf-options: required: false type: string @@ -67,7 +70,7 @@ env: jobs: build-windows: name: build - runs-on: windows-2025 + runs-on: ${{ inputs.runs-on }} defaults: run: shell: bash diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 20be196b128..94f011ff76c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -353,6 +353,7 @@ jobs: uses: ./.github/workflows/build-windows.yml with: platform: windows-x64 + runs-on: windows-2022 msvc-toolset-version: '14.44' msvc-toolset-architecture: 'x86.x64' configure-arguments: ${{ github.event.inputs.configure-arguments }} @@ -366,6 +367,7 @@ jobs: uses: ./.github/workflows/build-windows.yml with: platform: windows-aarch64 + runs-on: windows-2022 msvc-toolset-version: '14.44' msvc-toolset-architecture: 'arm64' make-target: 'hotspot' @@ -446,6 +448,6 @@ jobs: with: platform: windows-x64 bootjdk-platform: windows-x64 - runs-on: windows-2025 + runs-on: windows-2022 dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }} debug-suffix: -debug diff --git a/.gitignore b/.gitignore index b6b4a1a559a..a45e2113756 100644 --- a/.gitignore +++ b/.gitignore @@ -24,8 +24,6 @@ NashornProfile.txt /.gdbinit /.lldbinit **/core.[0-9]* -*.rej -*.orig test/benchmarks/**/target /src/hotspot/CMakeLists.txt /src/hotspot/compile_commands.json diff --git a/make/RunTestsPrebuiltSpec.gmk b/make/RunTestsPrebuiltSpec.gmk index 5fe559eafad..568f69da5a5 100644 --- a/make/RunTestsPrebuiltSpec.gmk +++ b/make/RunTestsPrebuiltSpec.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2025, 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 @@ -64,7 +64,7 @@ TEST_JOBS ?= 0 # Use hard-coded values for java flags (one size, fits all!) JAVA_FLAGS := -Duser.language=en -Duser.country=US JAVA_FLAGS_BIG := -Xms64M -Xmx2048M -JAVA_FLAGS_SMALL := -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1 +JAVA_FLAGS_SMALL := -Xms32M -Xmx512M -XX:TieredStopAtLevel=1 BUILDJDK_JAVA_FLAGS_SMALL := -Xms32M -Xmx512M -XX:TieredStopAtLevel=1 BUILD_JAVA_FLAGS := $(JAVA_FLAGS_BIG) diff --git a/make/autoconf/boot-jdk.m4 b/make/autoconf/boot-jdk.m4 index b3dbc292919..4468a9acf27 100644 --- a/make/autoconf/boot-jdk.m4 +++ b/make/autoconf/boot-jdk.m4 @@ -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 @@ -481,8 +481,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], AC_MSG_CHECKING([flags for boot jdk java command for small workloads]) - # Use serial gc for small short lived tools if possible - UTIL_ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA]) UTIL_ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA]) UTIL_ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA]) UTIL_ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA]) @@ -492,8 +490,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small AC_SUBST(JAVA_FLAGS_SMALL) - # Don't presuppose SerialGC is present in the buildjdk. Also, we cannot test - # the buildjdk, but on the other hand we know what it will support. BUILD_JAVA_FLAGS_SMALL="-Xms32M -Xmx512M -XX:TieredStopAtLevel=1" AC_SUBST(BUILD_JAVA_FLAGS_SMALL) diff --git a/make/autoconf/buildjdk-spec.gmk.template b/make/autoconf/buildjdk-spec.gmk.template index bb020842d59..40758436517 100644 --- a/make/autoconf/buildjdk-spec.gmk.template +++ b/make/autoconf/buildjdk-spec.gmk.template @@ -108,3 +108,4 @@ override EXTRA_LDFLAGS := # hsdis is not needed HSDIS_BACKEND := none ENABLE_HSDIS_BUNDLING := false +DEFAULT_PRINT_ASSEMBLY_OPTIONS := diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4 index 89fcbc88521..5b1e4c3d7f7 100644 --- a/make/autoconf/jdk-options.m4 +++ b/make/autoconf/jdk-options.m4 @@ -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 @@ -323,6 +323,14 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], AC_SUBST(COPY_DEBUG_SYMBOLS) AC_SUBST(ZIP_EXTERNAL_DEBUG_SYMBOLS) + # Should we enable objcopy debuginfo compression ? + UTIL_ARG_ENABLE(NAME: objcopy-debuginfo-compression, DEFAULT: false, + RESULT: ENABLE_OBJCOPY_DEBUGINFO_COMPRESSION, + DESC: [Set to enable compression in the debuginfo files (Linux only)], + CHECKING_MSG: [if debuginfo compression with objcopy is done], + IF_ENABLED: [ OBJCOPY_COMPRESS_FLAGS="--compress-debug-sections=zlib-gnu" ]) + AC_SUBST(OBJCOPY_COMPRESS_FLAGS) + # Should we add external native debug symbols to the shipped bundles? AC_MSG_CHECKING([if we should add external native debug symbols to the shipped bundles]) AC_ARG_WITH([external-symbols-in-bundles], diff --git a/make/autoconf/lib-hsdis.m4 b/make/autoconf/lib-hsdis.m4 index 0530ef90be8..928aa021f28 100644 --- a/make/autoconf/lib-hsdis.m4 +++ b/make/autoconf/lib-hsdis.m4 @@ -417,4 +417,9 @@ AC_DEFUN_ONCE([LIB_SETUP_HSDIS], AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_HSDIS_BUNDLING) + + UTIL_ARG_WITH(NAME: print-assembly-options, TYPE: string, + DEFAULT: [], RESULT: DEFAULT_PRINT_ASSEMBLY_OPTIONS, + DESC: [default value for the PrintAssemblyOptions diagnostic flag, passed verbatim to the disassembler]) + AC_SUBST(DEFAULT_PRINT_ASSEMBLY_OPTIONS) ]) diff --git a/make/autoconf/spec.gmk.template b/make/autoconf/spec.gmk.template index c4e5a23d31a..7de5056cb83 100644 --- a/make/autoconf/spec.gmk.template +++ b/make/autoconf/spec.gmk.template @@ -381,6 +381,7 @@ HSDIS_CFLAGS := @HSDIS_CFLAGS@ HSDIS_LDFLAGS := @HSDIS_LDFLAGS@ HSDIS_LIBS := @HSDIS_LIBS@ CAPSTONE_ARCH_AARCH64_NAME := @CAPSTONE_ARCH_AARCH64_NAME@ +DEFAULT_PRINT_ASSEMBLY_OPTIONS := @DEFAULT_PRINT_ASSEMBLY_OPTIONS@ # The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep # it in sync. @@ -634,6 +635,7 @@ METALLIB := @METALLIB@ COMPILE_WITH_DEBUG_SYMBOLS := @COMPILE_WITH_DEBUG_SYMBOLS@ COPY_DEBUG_SYMBOLS := @COPY_DEBUG_SYMBOLS@ ZIP_EXTERNAL_DEBUG_SYMBOLS := @ZIP_EXTERNAL_DEBUG_SYMBOLS@ +OBJCOPY_COMPRESS_FLAGS := @OBJCOPY_COMPRESS_FLAGS@ CFLAGS_DEBUG_SYMBOLS := @CFLAGS_DEBUG_SYMBOLS@ ASFLAGS_DEBUG_SYMBOLS := @ASFLAGS_DEBUG_SYMBOLS@ diff --git a/make/common/native/Link.gmk b/make/common/native/Link.gmk index 855e50bddfb..2307b315877 100644 --- a/make/common/native/Link.gmk +++ b/make/common/native/Link.gmk @@ -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 @@ -189,7 +189,7 @@ define CreateDynamicLibraryOrExecutable # This cannot be run separately since it updates the original target # file. $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_create_debuginfo, \ - $$($1_OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES)) + $$($1_OBJCOPY) $(OBJCOPY_COMPRESS_FLAGS) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES)) $$(CHMOD) -x $$($1_DEBUGINFO_FILES) else ifeq ($(call isTargetOs, aix), true) # AIX does not provide the equivalent of objcopy to extract debug diff --git a/make/data/cldr/common/dtd/ldml.dtd b/make/data/cldr/common/dtd/ldml.dtd index aebedd33a43..b4247f2d924 100644 --- a/make/data/cldr/common/dtd/ldml.dtd +++ b/make/data/cldr/common/dtd/ldml.dtd @@ -1,5 +1,5 @@ - + @@ -493,6 +493,16 @@ CLDR data files are interpreted according to the LDML specification (http://unic + + + + + + + + + + diff --git a/make/data/cldr/common/main/aa.xml b/make/data/cldr/common/main/aa.xml index 3ff6fb6dd06..791c3009658 100644 --- a/make/data/cldr/common/main/aa.xml +++ b/make/data/cldr/common/main/aa.xml @@ -1,6 +1,6 @@ - @@ -1027,6 +1027,7 @@ For terms of use, see http://www.unicode.org/copyright.html + diff --git a/make/data/cldr/common/supplemental/likelySubtags.xml b/make/data/cldr/common/supplemental/likelySubtags.xml index 76e215255fd..a73b8a8c95b 100644 --- a/make/data/cldr/common/supplemental/likelySubtags.xml +++ b/make/data/cldr/common/supplemental/likelySubtags.xml @@ -1,7 +1,7 @@ - + @@ -1343,7 +1343,7 @@ not be patched by hand, as any changes made in that fashion may be lost. - + diff --git a/make/data/cldr/common/supplemental/metaZones.xml b/make/data/cldr/common/supplemental/metaZones.xml index 710934fef81..610921a8f6d 100644 --- a/make/data/cldr/common/supplemental/metaZones.xml +++ b/make/data/cldr/common/supplemental/metaZones.xml @@ -735,7 +735,7 @@ For terms of use, see http://www.unicode.org/copyright.html - + diff --git a/make/data/cldr/common/supplemental/supplementalData.xml b/make/data/cldr/common/supplemental/supplementalData.xml index 25684d36c6e..cbfe2c5e875 100644 --- a/make/data/cldr/common/supplemental/supplementalData.xml +++ b/make/data/cldr/common/supplemental/supplementalData.xml @@ -1,7 +1,7 @@ @@ -57,7 +57,7 @@ For terms of use, see https://www.unicode.org/copyright.html - + @@ -3147,7 +3147,7 @@ XXX Code for transations where no currency is involved - + diff --git a/make/hotspot/lib/CompileGtest.gmk b/make/hotspot/lib/CompileGtest.gmk index 4b21d481049..3a5fac34597 100644 --- a/make/hotspot/lib/CompileGtest.gmk +++ b/make/hotspot/lib/CompileGtest.gmk @@ -45,6 +45,15 @@ else GTEST_COPY_DEBUG_SYMBOLS := false endif +GTEST_LIBJVM_CFLAGS := $(JVM_CFLAGS) +# Decoder does not work with debuginfo of the gtest libjvm when sections are used, +# so we get wrong file names. That's why we filter out the section flags. +ifeq ($(ENABLE_LINKTIME_GC), true) + ifeq ($(TOOLCHAIN_TYPE), gcc) + GTEST_LIBJVM_CFLAGS := $(filter-out -ffunction-sections -fdata-sections, $(JVM_CFLAGS)) + endif +endif + ################################################################################ ## Build libgtest ################################################################################ @@ -99,7 +108,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \ EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \ EXTRA_OBJECT_FILES := $(BUILD_LIBJVM_ALL_OBJS), \ DEFAULT_CFLAGS := false, \ - CFLAGS := $(JVM_CFLAGS) \ + CFLAGS := $(GTEST_LIBJVM_CFLAGS) \ -DHOTSPOT_GTEST \ -I$(GTEST_FRAMEWORK_SRC)/googletest/include \ -I$(GTEST_FRAMEWORK_SRC)/googlemock/include \ diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk index f41693e05fb..e8db4888d3a 100644 --- a/make/hotspot/lib/CompileJvm.gmk +++ b/make/hotspot/lib/CompileJvm.gmk @@ -209,6 +209,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \ DISABLED_WARNINGS_gcc_jvmtiTagMap.cpp := stringop-overflow, \ DISABLED_WARNINGS_gcc_macroAssembler_ppc_sha.cpp := unused-const-variable, \ DISABLED_WARNINGS_gcc_postaloc.cpp := address, \ + DISABLED_WARNINGS_gcc_safepointMechanism.cpp := stringop-overflow, \ + DISABLED_WARNINGS_gcc_shenandoahGenerationalHeap.cpp := stringop-overflow, \ DISABLED_WARNINGS_gcc_shenandoahLock.cpp := stringop-overflow, \ DISABLED_WARNINGS_gcc_stubGenerator_s390.cpp := unused-const-variable, \ DISABLED_WARNINGS_gcc_synchronizer.cpp := stringop-overflow, \ diff --git a/make/hotspot/lib/JvmFlags.gmk b/make/hotspot/lib/JvmFlags.gmk index 27a96cc4865..121f71bfa27 100644 --- a/make/hotspot/lib/JvmFlags.gmk +++ b/make/hotspot/lib/JvmFlags.gmk @@ -102,6 +102,10 @@ ifneq ($(HOTSPOT_OVERRIDE_LIBPATH), ) JVM_CFLAGS += -DOVERRIDE_LIBPATH='"$(HOTSPOT_OVERRIDE_LIBPATH)"' endif +ifneq ($(DEFAULT_PRINT_ASSEMBLY_OPTIONS), ) + JVM_CFLAGS += -DDEFAULT_PRINT_ASSEMBLY_OPTIONS='"$(DEFAULT_PRINT_ASSEMBLY_OPTIONS)"' +endif + ifeq ($(ENABLE_COMPATIBLE_CDS_ALIGNMENT), true) JVM_CFLAGS += -DCOMPATIBLE_CDS_ALIGNMENT endif diff --git a/make/jdk/src/classes/build/tools/cldrconverter/BundleGenerator.java b/make/jdk/src/classes/build/tools/cldrconverter/BundleGenerator.java index 20e259a0ba7..be5e49f8f7d 100644 --- a/make/jdk/src/classes/build/tools/cldrconverter/BundleGenerator.java +++ b/make/jdk/src/classes/build/tools/cldrconverter/BundleGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -50,7 +50,7 @@ public interface BundleGenerator { }; public void generateBundle(String packageName, String baseName, String localeID, - boolean useJava, Map map, BundleType type) throws IOException; + Map map, BundleType type) throws IOException; public void generateMetaInfo(Map> metaInfo) throws IOException; } diff --git a/make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java b/make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java index 9f42326ef09..7b198f97679 100644 --- a/make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java +++ b/make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java @@ -183,7 +183,6 @@ public class CLDRConverter { } } - static boolean USE_UTF8 = false; private static boolean verbose; private CLDRConverter() { @@ -232,10 +231,6 @@ public class CLDRConverter { DESTINATION_DIR = args[++i]; break; - case "-utf8": - USE_UTF8 = true; - break; - case "-verbose": verbose = true; break; @@ -336,7 +331,6 @@ public class CLDRConverter { + "\t-year year copyright year in output%n" + "\t-zntempfile template file for java.time.format.ZoneName.java%n" + "\t-tzdatadir tzdata directory for java.time.format.ZoneName.java%n" - + "\t-utf8 use UTF-8 rather than \\uxxxx (for debug)%n" + "\t-jdk-header-template %n" + "\t\t override default GPL header with contents of file%n"); } @@ -612,31 +606,31 @@ public class CLDRConverter { if (bundleTypes.contains(Bundle.Type.LOCALENAMES)) { Map localeNamesMap = extractLocaleNames(targetMap, id); if (!localeNamesMap.isEmpty() || bundle.isRoot()) { - bundleGenerator.generateBundle("util", "LocaleNames", id, true, localeNamesMap, BundleType.OPEN); + bundleGenerator.generateBundle("util", "LocaleNames", id, localeNamesMap, BundleType.OPEN); } } if (bundleTypes.contains(Bundle.Type.CURRENCYNAMES)) { Map currencyNamesMap = extractCurrencyNames(targetMap, id, bundle.getCurrencies()); if (!currencyNamesMap.isEmpty() || bundle.isRoot()) { - bundleGenerator.generateBundle("util", "CurrencyNames", id, true, currencyNamesMap, BundleType.OPEN); + bundleGenerator.generateBundle("util", "CurrencyNames", id, currencyNamesMap, BundleType.OPEN); } } if (bundleTypes.contains(Bundle.Type.TIMEZONENAMES)) { Map zoneNamesMap = extractZoneNames(targetMap, id); if (!zoneNamesMap.isEmpty() || bundle.isRoot()) { - bundleGenerator.generateBundle("util", "TimeZoneNames", id, true, zoneNamesMap, BundleType.TIMEZONE); + bundleGenerator.generateBundle("util", "TimeZoneNames", id, zoneNamesMap, BundleType.TIMEZONE); } } if (bundleTypes.contains(Bundle.Type.CALENDARDATA)) { Map calendarDataMap = extractCalendarData(targetMap, id); if (!calendarDataMap.isEmpty() || bundle.isRoot()) { - bundleGenerator.generateBundle("util", "CalendarData", id, true, calendarDataMap, BundleType.PLAIN); + bundleGenerator.generateBundle("util", "CalendarData", id, calendarDataMap, BundleType.PLAIN); } } if (bundleTypes.contains(Bundle.Type.FORMATDATA)) { Map formatDataMap = extractFormatData(targetMap, id); if (!formatDataMap.isEmpty() || bundle.isRoot()) { - bundleGenerator.generateBundle("text", "FormatData", id, true, formatDataMap, BundleType.PLAIN); + bundleGenerator.generateBundle("text", "FormatData", id, formatDataMap, BundleType.PLAIN); } } @@ -821,6 +815,13 @@ public class CLDRConverter { data = map.get(TIMEZONE_ID_PREFIX + tzLink); } + String meta = handlerMetaZones.get(tzKey); + if (meta == null && tzLink != null) { + // Check for tzLink + meta = handlerMetaZones.get(tzLink); + } + String metaKey = meta != null ? METAZONE_ID_PREFIX + meta : null; + if (data instanceof String[] tznames) { // Hack for UTC. UTC is an alias to Etc/UTC in CLDR if (tzid.equals("Etc/UTC") && !map.containsKey(TIMEZONE_ID_PREFIX + "UTC")) { @@ -832,24 +833,14 @@ public class CLDRConverter { tznames = Arrays.copyOf(tznames, tznames.length); fillTZDBShortNames(tzKey, tznames); names.put(tzid, tznames); + if (meta != null && map.get(metaKey) instanceof String[] metaNames) { + recordMetazone(names, meta, tzKey, metaNames); + } } } else { - String meta = handlerMetaZones.get(tzKey); - if (meta == null && tzLink != null) { - // Check for tzLink - meta = handlerMetaZones.get(tzLink); - } if (meta != null) { - String metaKey = METAZONE_ID_PREFIX + meta; - data = map.get(metaKey); - if (data instanceof String[] tznames) { - if (isDefaultZone(meta, tzKey)) { - // Record the metazone names only from the default - // (001) zone, with short names filled from TZDB - tznames = Arrays.copyOf(tznames, tznames.length); - fillTZDBShortNames(tzKey, tznames); - names.put(metaKey, tznames); - } + if (map.get(metaKey) instanceof String[] metaNames) { + recordMetazone(names, meta, tzKey, metaNames); names.put(tzid, meta); if (tzLink != null && availableIds.contains(tzLink)) { names.put(tzLink, meta); @@ -1053,28 +1044,15 @@ public class CLDRConverter { } } - // --- code below here is adapted from java.util.Properties --- - private static final String specialSaveCharsJava = "\""; - private static final String specialSaveCharsProperties = "=: \t\r\n\f#!"; - /* - * Converts unicodes to encoded \uxxxx - * and writes out any of the characters in specialSaveChars - * with a preceding slash + * Escapes control codes to ASCII escapes or encoded \uxxxx + * and writes out ASCII quotation marks with a preceding slash */ - static String saveConvert(String theString, boolean useJava) { + static String escape(String theString) { if (theString == null) { return ""; } - String specialSaveChars; - if (useJava) { - specialSaveChars = specialSaveCharsJava; - } else { - specialSaveChars = specialSaveCharsProperties; - } - boolean escapeSpace = false; - int len = theString.length(); StringBuilder outBuffer = new StringBuilder(len * 2); Formatter formatter = new Formatter(outBuffer, Locale.ROOT); @@ -1083,14 +1061,14 @@ public class CLDRConverter { char aChar = theString.charAt(x); switch (aChar) { case ' ': - if (x == 0 || escapeSpace) { + if (x == 0) { outBuffer.append('\\'); } outBuffer.append(' '); break; - case '\\': - outBuffer.append('\\'); + case '\\', '"': outBuffer.append('\\'); + outBuffer.append(aChar); break; case '\t': outBuffer.append('\\'); @@ -1109,12 +1087,9 @@ public class CLDRConverter { outBuffer.append('f'); break; default: - if (aChar < 0x0020 || (!USE_UTF8 && aChar > 0x007e)) { + if (aChar < 0x0020) { formatter.format("\\u%04x", (int)aChar); } else { - if (specialSaveChars.indexOf(aChar) != -1) { - outBuffer.append('\\'); - } outBuffer.append(aChar); } } @@ -1530,11 +1505,18 @@ public class CLDRConverter { } } - private static boolean isDefaultZone(String meta, String tzid) { + private static void recordMetazone(Map names, String meta, String tzid, String[] tznames) { String zone001 = handlerMetaZones.zidMap().get(meta); var tzLink = getTZDBLink(tzid); - return canonicalTZMap.getOrDefault(tzid, tzid).equals(zone001) || - tzLink != null && canonicalTZMap.getOrDefault(tzLink, tzLink).equals(zone001); + + // Record the metazone names only from the default + // (001) zone, with short names filled from TZDB + if (canonicalTZMap.getOrDefault(tzid, tzid).equals(zone001) || + tzLink != null && canonicalTZMap.getOrDefault(tzLink, tzLink).equals(zone001)) { + tznames = Arrays.copyOf(tznames, tznames.length); + fillTZDBShortNames(tzid, tznames); + names.put(METAZONE_ID_PREFIX + meta, tznames); + } } private static String getTZDBLink(String tzid) { diff --git a/make/jdk/src/classes/build/tools/cldrconverter/ResourceBundleGenerator.java b/make/jdk/src/classes/build/tools/cldrconverter/ResourceBundleGenerator.java index 8278bf6bcfa..0bc5a2bdb0d 100644 --- a/make/jdk/src/classes/build/tools/cldrconverter/ResourceBundleGenerator.java +++ b/make/jdk/src/classes/build/tools/cldrconverter/ResourceBundleGenerator.java @@ -70,9 +70,8 @@ class ResourceBundleGenerator implements BundleGenerator { private static final String META_VALUE_PREFIX = "metaValue_"; @Override - public void generateBundle(String packageName, String baseName, String localeID, boolean useJava, + public void generateBundle(String packageName, String baseName, String localeID, Map map, BundleType type) throws IOException { - String suffix = useJava ? ".java" : ".properties"; String dirName = CLDRConverter.DESTINATION_DIR + File.separator + "sun" + File.separator + packageName + File.separator + "resources" + File.separator + "cldr"; packageName = packageName + ".resources.cldr"; @@ -91,23 +90,12 @@ class ResourceBundleGenerator implements BundleGenerator { if (!dir.exists()) { dir.mkdirs(); } - File file = new File(dir, baseName + ("root".equals(localeID) ? "" : "_" + localeID) + suffix); + File file = new File(dir, baseName + ("root".equals(localeID) ? "" : "_" + localeID) + ".java"); if (!file.exists()) { file.createNewFile(); } CLDRConverter.info("\tWriting file " + file); - String encoding; - if (useJava) { - if (CLDRConverter.USE_UTF8) { - encoding = "utf-8"; - } else { - encoding = "us-ascii"; - } - } else { - encoding = "iso-8859-1"; - } - Formatter fmt = null; if (type == BundleType.TIMEZONE) { fmt = new Formatter(); @@ -119,7 +107,7 @@ class ResourceBundleGenerator implements BundleGenerator { value = (String[]) map.get(key); fmt.format(" final String[] %s = new String[] {\n", meta); for (String s : value) { - fmt.format(" \"%s\",\n", CLDRConverter.saveConvert(s, useJava)); + fmt.format(" \"%s\",\n", CLDRConverter.escape(s)); } fmt.format(" };\n"); metaKeys.add(key); @@ -159,11 +147,11 @@ class ResourceBundleGenerator implements BundleGenerator { if (val instanceof String[] values) { fmt.format(" final String[] %s = new String[] {\n", metaVal); for (String s : values) { - fmt.format(" \"%s\",\n", CLDRConverter.saveConvert(s, useJava)); + fmt.format(" \"%s\",\n", CLDRConverter.escape(s)); } fmt.format(" };\n"); } else { - fmt.format(" final String %s = \"%s\";\n", metaVal, CLDRConverter.saveConvert((String)val, useJava)); + fmt.format(" final String %s = \"%s\";\n", metaVal, CLDRConverter.escape((String)val)); } newMap.put(oldEntry.key, oldEntry.metaKey()); } @@ -173,55 +161,47 @@ class ResourceBundleGenerator implements BundleGenerator { map = newMap; } - try (PrintWriter out = new PrintWriter(file, encoding)) { + try (PrintWriter out = new PrintWriter(file, "utf-8")) { // Output copyright headers out.println(getOpenJDKCopyright()); out.println(CopyrightHeaders.getUnicodeCopyright()); - if (useJava) { - out.println("package sun." + packageName + ";\n"); - out.printf("import %s;\n\n", type.getPathName()); - out.printf("public class %s%s extends %s {\n", baseName, "root".equals(localeID) ? "" : "_" + localeID, type.getClassName()); + out.println("package sun." + packageName + ";\n"); + out.printf("import %s;\n\n", type.getPathName()); + out.printf("public class %s%s extends %s {\n", baseName, "root".equals(localeID) ? "" : "_" + localeID, type.getClassName()); - out.println(" @Override\n" + - " protected final Object[][] getContents() {"); - if (fmt != null) { - out.print(fmt.toString()); - } - out.println(" final Object[][] data = new Object[][] {"); + out.println(" @Override\n" + + " protected final Object[][] getContents() {"); + if (fmt != null) { + out.print(fmt.toString()); } + out.println(" final Object[][] data = new Object[][] {"); for (String key : map.keySet()) { - if (useJava) { - Object value = map.get(key); - if (value == null) { - CLDRConverter.warning("null value for " + key); - } else if (value instanceof String) { - String valStr = (String)value; - if (type == BundleType.TIMEZONE && - !(key.startsWith(CLDRConverter.EXEMPLAR_CITY_PREFIX) || - key.startsWith(CLDRConverter.METAZONE_DSTOFFSET_PREFIX)) || - valStr.startsWith(META_VALUE_PREFIX)) { - out.printf(" { \"%s\", %s },\n", key, CLDRConverter.saveConvert(valStr, useJava)); - } else { - out.printf(" { \"%s\", \"%s\" },\n", key, CLDRConverter.saveConvert(valStr, useJava)); - } - } else if (value instanceof String[]) { - String[] values = (String[]) value; - out.println(" { \"" + key + "\",\n new String[] {"); - for (String s : values) { - out.println(" \"" + CLDRConverter.saveConvert(s, useJava) + "\","); - } - out.println(" }\n },"); + Object value = map.get(key); + if (value == null) { + CLDRConverter.warning("null value for " + key); + } else if (value instanceof String) { + String valStr = (String)value; + if (type == BundleType.TIMEZONE && + !(key.startsWith(CLDRConverter.EXEMPLAR_CITY_PREFIX) || + key.startsWith(CLDRConverter.METAZONE_DSTOFFSET_PREFIX)) || + valStr.startsWith(META_VALUE_PREFIX)) { + out.printf(" { \"%s\", %s },\n", key, CLDRConverter.escape(valStr)); } else { - throw new RuntimeException("unknown value type: " + value.getClass().getName()); + out.printf(" { \"%s\", \"%s\" },\n", key, CLDRConverter.escape(valStr)); } + } else if (value instanceof String[]) { + String[] values = (String[]) value; + out.println(" { \"" + key + "\",\n new String[] {"); + for (String s : values) { + out.println(" \"" + CLDRConverter.escape(s) + "\","); + } + out.println(" }\n },"); } else { - out.println(key + "=" + CLDRConverter.saveConvert((String) map.get(key), useJava)); + throw new RuntimeException("unknown value type: " + value.getClass().getName()); } } - if (useJava) { - out.println(" };\n return data;\n }\n}"); - } + out.println(" };\n return data;\n }\n}"); } } diff --git a/make/modules/java.base/Gensrc.gmk b/make/modules/java.base/Gensrc.gmk index e8236f0b0e4..675038c8fd5 100644 --- a/make/modules/java.base/Gensrc.gmk +++ b/make/modules/java.base/Gensrc.gmk @@ -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 @@ -47,8 +47,6 @@ CLDR_GEN_DONE := $(GENSRC_DIR)/_cldr-gensrc.marker TZ_DATA_DIR := $(MODULE_SRC)/share/data/tzdata ZONENAME_TEMPLATE := $(MODULE_SRC)/share/classes/java/time/format/ZoneName.java.template -# The `-utf8` option is used even for US English, as some names -# may contain non-ASCII characters, such as “Türkiye”. $(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \ $(wildcard $(CLDR_DATA_DIR)/main/en*.xml) \ $(wildcard $(CLDR_DATA_DIR)/supplemental/*.xml) \ @@ -64,8 +62,7 @@ $(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \ -basemodule \ -year $(COPYRIGHT_YEAR) \ -zntempfile $(ZONENAME_TEMPLATE) \ - -tzdatadir $(TZ_DATA_DIR) \ - -utf8) + -tzdatadir $(TZ_DATA_DIR)) $(TOUCH) $@ TARGETS += $(CLDR_GEN_DONE) diff --git a/make/modules/java.desktop/lib/ClientLibraries.gmk b/make/modules/java.desktop/lib/ClientLibraries.gmk index 3e37fe79643..2326505d11c 100644 --- a/make/modules/java.desktop/lib/ClientLibraries.gmk +++ b/make/modules/java.desktop/lib/ClientLibraries.gmk @@ -395,6 +395,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \ AccelGlyphCache.c, \ CFLAGS := $(LIBFONTMANAGER_CFLAGS), \ CXXFLAGS := $(LIBFONTMANAGER_CFLAGS), \ + CXXFLAGS_gcc := -fno-rtti -fno-exceptions, \ + CXXFLAGS_clang := -fno-rtti -fno-exceptions, \ OPTIMIZATION := HIGHEST, \ CFLAGS_windows = -DCC_NOEX, \ EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS), \ diff --git a/make/modules/jdk.localedata/Gensrc.gmk b/make/modules/jdk.localedata/Gensrc.gmk index 93b863df66f..2ff972c7536 100644 --- a/make/modules/jdk.localedata/Gensrc.gmk +++ b/make/modules/jdk.localedata/Gensrc.gmk @@ -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 @@ -45,8 +45,7 @@ $(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \ -baselocales "en-US" \ -year $(COPYRIGHT_YEAR) \ -o $(GENSRC_DIR) \ - -tzdatadir $(TZ_DATA_DIR) \ - -utf8) + -tzdatadir $(TZ_DATA_DIR)) $(TOUCH) $@ TARGETS += $(CLDR_GEN_DONE) diff --git a/src/hotspot/cpu/aarch64/aarch64.ad b/src/hotspot/cpu/aarch64/aarch64.ad index 53fa4e3066c..7487de2d577 100644 --- a/src/hotspot/cpu/aarch64/aarch64.ad +++ b/src/hotspot/cpu/aarch64/aarch64.ad @@ -1986,7 +1986,7 @@ uint MachSpillCopyNode::implementation(C2_MacroAssembler *masm, PhaseRegAlloc *r assert(src_lo != OptoReg::Bad && dst_lo != OptoReg::Bad, "must move at least 1 register"); - if (src_hi != OptoReg::Bad && !bottom_type()->isa_vectmask()) { + if (src_hi != OptoReg::Bad && !bottom_type()->isa_pvectmask()) { assert((src_lo&1)==0 && src_lo+1==src_hi && (dst_lo&1)==0 && dst_lo+1==dst_hi, "expected aligned-adjacent pairs"); @@ -2001,7 +2001,7 @@ uint MachSpillCopyNode::implementation(C2_MacroAssembler *masm, PhaseRegAlloc *r int src_offset = ra_->reg2offset(src_lo); int dst_offset = ra_->reg2offset(dst_lo); - if (bottom_type()->isa_vect() && !bottom_type()->isa_vectmask()) { + if (bottom_type()->isa_vect() && !bottom_type()->isa_pvectmask()) { uint ireg = ideal_reg(); DEBUG_ONLY(int algm = MIN2(RegMask::num_registers(ireg), (int)Matcher::stack_alignment_in_slots()) * VMRegImpl::stack_slot_size); assert((src_lo_rc != rc_stack) || is_aligned(src_offset, algm), "unaligned vector spill sp offset %d (src)", src_offset); @@ -2149,7 +2149,7 @@ uint MachSpillCopyNode::implementation(C2_MacroAssembler *masm, PhaseRegAlloc *r } else { st->print("%s", Matcher::regName[dst_lo]); } - if (bottom_type()->isa_vect() && !bottom_type()->isa_vectmask()) { + if (bottom_type()->isa_vect() && !bottom_type()->isa_pvectmask()) { int vsize = 0; switch (ideal_reg()) { case Op_VecD: @@ -3389,12 +3389,13 @@ encode %{ assert(rtype == relocInfo::none || rtype == relocInfo::external_word_type, "unexpected reloc type"); // load fake address constants using a normal move if (! __ is_valid_AArch64_address(con) || - con < (address)(uintptr_t)os::vm_page_size()) { + con < (address)(uintptr_t)os::vm_page_size() || + rtype == relocInfo::none) { __ mov(dst_reg, con); } else { - // no reloc so just use adrp and add + // use shorter adrp/add sequence for external_word relocation uint64_t offset; - __ adrp(dst_reg, con, offset); + __ adrp(dst_reg, Address(con, rtype), offset); __ add(dst_reg, dst_reg, offset); } } @@ -7708,10 +7709,11 @@ instruct bytes_reverse_unsigned_short(iRegINoSp dst, iRegIorL2I src) %{ 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 --git a/src/hotspot/cpu/aarch64/aarch64_vector.ad b/src/hotspot/cpu/aarch64/aarch64_vector.ad index 4c854913e63..2ff93c9e288 100644 --- a/src/hotspot/cpu/aarch64/aarch64_vector.ad +++ b/src/hotspot/cpu/aarch64/aarch64_vector.ad @@ -311,6 +311,12 @@ source %{ return false; } break; + case Op_RotateLeftV: + case Op_RotateRightV: + if (length_in_bytes > 16) { + return false; // NEON only, since SLI/USHR are not available in SVE + } + break; default: break; } @@ -370,6 +376,11 @@ source %{ case Op_SqrtVHF: case Op_FmaVHF: return false; + // There's no SLI instruction in SVE, so we can't have an optimal vector + // rotate with masking when emitting code for SVE. + case Op_RotateLeftV: + case Op_RotateRightV: + return false; default: break; } @@ -441,11 +452,11 @@ source %{ // On architectures that do not support predicate, masks are stored in // general vector registers (TypeVect) with sizes ranging from TypeVectA // to TypeVectX based on the vector size in bytes. - assert(vt->isa_vectmask() == nullptr, "mask type is not matched"); + assert(vt->isa_pvectmask() == nullptr, "mask type is not matched"); return false; } - assert(vt->isa_vectmask() != nullptr, "expected TypeVectMask on SVE"); + assert(vt->isa_pvectmask() != nullptr, "expected TypePVectMask on SVE"); switch (opcode) { case Op_VectorMaskToLong: case Op_VectorLongToMask: @@ -3229,6 +3240,25 @@ instruct vlsra_imm(vReg dst, vReg src, immI_positive shift) %{ ins_pipe(pipe_slow); %} +// vector rotate with constant shift count (NEON only) +// Uses USHR+SLI 2-instruction sequence instead of SHL+USHR+ORR 3-instruction decomposition. + +instruct vrotateconstant(vReg dst, vReg src, immI shift) %{ + predicate(Matcher::vector_length_in_bytes(n) <= 16); + match(Set dst (RotateLeftV src shift)); + match(Set dst (RotateRightV src shift)); + effect(TEMP_DEF dst); + format %{ "vrotateconstant $dst, $src, $shift" %} + ins_encode %{ + int opc = this->ideal_Opcode(); + int raw_shift = checked_cast(opc == Op_RotateLeftV ? + $shift$$constant : -$shift$$constant); + __ neon_vector_rotate($dst$$FloatRegister, get_arrangement(this), + $src$$FloatRegister, raw_shift); + %} + ins_pipe(pipe_slow); +%} + // vector shift - predicated instruct vlsl_masked(vReg dst_src1, vReg src2, pRegGov pg) %{ diff --git a/src/hotspot/cpu/aarch64/aarch64_vector_ad.m4 b/src/hotspot/cpu/aarch64/aarch64_vector_ad.m4 index 58ed234194a..c5df949dfb6 100644 --- a/src/hotspot/cpu/aarch64/aarch64_vector_ad.m4 +++ b/src/hotspot/cpu/aarch64/aarch64_vector_ad.m4 @@ -301,6 +301,12 @@ source %{ return false; } break; + case Op_RotateLeftV: + case Op_RotateRightV: + if (length_in_bytes > 16) { + return false; // NEON only, since SLI/USHR are not available in SVE + } + break; default: break; } @@ -360,6 +366,11 @@ source %{ case Op_SqrtVHF: case Op_FmaVHF: return false; + // There's no SLI instruction in SVE, so we can't have an optimal vector + // rotate with masking when emitting code for SVE. + case Op_RotateLeftV: + case Op_RotateRightV: + return false; default: break; } @@ -431,11 +442,11 @@ source %{ // On architectures that do not support predicate, masks are stored in // general vector registers (TypeVect) with sizes ranging from TypeVectA // to TypeVectX based on the vector size in bytes. - assert(vt->isa_vectmask() == nullptr, "mask type is not matched"); + assert(vt->isa_pvectmask() == nullptr, "mask type is not matched"); return false; } - assert(vt->isa_vectmask() != nullptr, "expected TypeVectMask on SVE"); + assert(vt->isa_pvectmask() != nullptr, "expected TypePVectMask on SVE"); switch (opcode) { case Op_VectorMaskToLong: case Op_VectorLongToMask: @@ -567,13 +578,9 @@ instruct vloadcon(vReg dst, immI0 src) %{ BasicType bt = Matcher::vector_element_basic_type(this); if (UseSVE == 0) { uint length_in_bytes = Matcher::vector_length_in_bytes(this); + int entry_idx = __ vector_iota_entry_index(bt); assert(length_in_bytes <= 16, "must be"); - // The iota indices are ordered by type B/S/I/L/F/D, and the offset between two types is 16. - int offset = exact_log2(type2aelembytes(bt)) << 4; - if (is_floating_point_type(bt)) { - offset += 32; - } - __ lea(rscratch1, ExternalAddress(StubRoutines::aarch64::vector_iota_indices() + offset)); + __ lea(rscratch1, ExternalAddress(StubRoutines::aarch64::vector_iota_indices(entry_idx))); if (length_in_bytes == 16) { __ ldrq($dst$$FloatRegister, rscratch1); } else { @@ -1969,6 +1976,25 @@ instruct vlsra_imm(vReg dst, vReg src, immI_positive shift) %{ ins_pipe(pipe_slow); %} +// vector rotate with constant shift count (NEON only) +// Uses USHR+SLI 2-instruction sequence instead of SHL+USHR+ORR 3-instruction decomposition. + +instruct vrotateconstant(vReg dst, vReg src, immI shift) %{ + predicate(Matcher::vector_length_in_bytes(n) <= 16); + match(Set dst (RotateLeftV src shift)); + match(Set dst (RotateRightV src shift)); + effect(TEMP_DEF dst); + format %{ "vrotateconstant $dst, $src, $shift" %} + ins_encode %{ + int opc = this->ideal_Opcode(); + int raw_shift = checked_cast(opc == Op_RotateLeftV ? + $shift$$constant : -$shift$$constant); + __ neon_vector_rotate($dst$$FloatRegister, get_arrangement(this), + $src$$FloatRegister, raw_shift); + %} + ins_pipe(pipe_slow); +%} + dnl dnl VSHIFT_PREDICATE($1, $2, $3 ) dnl VSHIFT_PREDICATE(type, op_name, insn) diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp index 4c1c8d9bbc8..c8d5ee2eaeb 100644 --- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp @@ -1,6 +1,7 @@ /* * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2024, Red Hat Inc. All rights reserved. + * Copyright 2026 Arm Limited and/or its affiliates. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1254,6 +1255,13 @@ public: sz, 0b000, ordered); } + void load_store_volatile(Register data, BasicType type, Register addr, + bool is_load) { + load_store_exclusive(dummy_reg, data, dummy_reg, addr, + (Assembler::operand_size)exact_log2(type2aelembytes(type)), + is_load ? 0b110 : 0b100, /* ordered = */ true); + } + #define INSN4(NAME, sz, op, o0) /* Four registers */ \ void NAME(Register Rs, Register Rt1, Register Rt2, Register Rn) { \ guarantee(Rs != Rn && Rs != Rt1 && Rs != Rt2, "unpredictable instruction"); \ diff --git a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp index 4de6237304d..4eb4e3d5ac7 100644 --- a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp @@ -1,6 +1,7 @@ /* * Copyright (c) 2000, 2026, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved. + * Copyright 2026 Arm Limited and/or its affiliates. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -911,8 +912,15 @@ void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) { reg2stack(temp, dest, dest->type()); } +void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, + LIR_PatchCode patch_code, CodeEmitInfo* info, + bool wide) { + mem2reg(src, dest, type, patch_code, info, wide, false); +} -void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool wide) { +void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, + LIR_PatchCode patch_code, CodeEmitInfo* info, + bool wide, bool is_volatile) { LIR_Address* addr = src->as_address_ptr(); LIR_Address* from_addr = src->as_address_ptr(); @@ -925,10 +933,27 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch return; } + if (is_volatile) { + load_volatile(from_addr, dest, type, info); + } else { + load_unordered(from_addr, dest, type, wide, info); + } + + if (is_reference_type(type)) { + if (UseCompressedOops && !wide) { + __ decode_heap_oop(dest->as_register()); + } + + __ verify_oop(dest->as_register()); + } +} + +void LIR_Assembler::load_unordered(LIR_Address *from_addr, LIR_Opr dest, + BasicType type, bool wide, CodeEmitInfo* info) { if (info != nullptr) { add_debug_info_for_null_check_here(info); } - int null_check_here = code_offset(); + switch (type) { case T_FLOAT: { __ ldrs(dest->as_float_reg(), as_Address(from_addr)); @@ -986,16 +1011,44 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch default: ShouldNotReachHere(); } - - if (is_reference_type(type)) { - if (UseCompressedOops && !wide) { - __ decode_heap_oop(dest->as_register()); - } - - __ verify_oop(dest->as_register()); - } } +void LIR_Assembler::load_volatile(LIR_Address *from_addr, LIR_Opr dest, + BasicType type, CodeEmitInfo* info) { + __ lea(rscratch1, as_Address(from_addr)); + + Register dest_reg = rscratch2; + if (!is_floating_point_type(type)) { + dest_reg = (dest->is_single_cpu() + ? dest->as_register() : dest->as_register_lo()); + } + + if (info != nullptr) { + add_debug_info_for_null_check_here(info); + } + + // Uses LDAR to ensure memory ordering. + __ load_store_volatile(dest_reg, type, rscratch1, /*is_load*/true); + + switch (type) { + // LDAR is unsigned so need to sign-extend for byte and short + case T_BYTE: + __ sxtb(dest_reg, dest_reg); + break; + case T_SHORT: + __ sxth(dest_reg, dest_reg); + break; + // need to move from GPR to FPR after LDAR with FMOV for floating types + case T_FLOAT: + __ fmovs(dest->as_float_reg(), dest_reg); + break; + case T_DOUBLE: + __ fmovd(dest->as_double_reg(), dest_reg); + break; + default: + break; + } +} int LIR_Assembler::array_element_size(BasicType type) const { int elem_size = type2aelembytes(type); @@ -2764,7 +2817,9 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest, const LIR_OprList* arg } void LIR_Assembler::volatile_move_op(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmitInfo* info) { - if (dest->is_address() || src->is_address()) { + if (src->is_address()) { + mem2reg(src, dest, type, lir_patch_none, info, /*wide*/false, /*is_volatile*/true); + } else if (dest->is_address()) { move_op(src, dest, type, lir_patch_none, info, /*wide*/false); } else { ShouldNotReachHere(); diff --git a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp index 5af06fc6a1c..367256d2f69 100644 --- a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp @@ -57,6 +57,12 @@ friend class ArrayCopyStub; void casw(Register addr, Register newval, Register cmpval); void casl(Register addr, Register newval, Register cmpval); + void mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, + LIR_PatchCode patch_code, + CodeEmitInfo* info, bool wide, bool is_volatile); + void load_unordered(LIR_Address *from_addr, LIR_Opr dest, BasicType type, bool wide, CodeEmitInfo* info); + void load_volatile(LIR_Address *from_addr, LIR_Opr dest, BasicType type, CodeEmitInfo* info); + static const int max_tableswitches = 20; struct tableswitch switches[max_tableswitches]; int tableswitch_count; diff --git a/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp index f10c5197d91..7e82f410a95 100644 --- a/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp @@ -1398,14 +1398,5 @@ void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address, void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, CodeEmitInfo* info) { - // 8179954: We need to make sure that the code generated for - // volatile accesses forms a sequentially-consistent set of - // operations when combined with STLR and LDAR. Without a leading - // membar it's possible for a simple Dekker test to fail if loads - // use LD;DMB but stores use STLR. This can happen if C2 compiles - // the stores in one method and C1 compiles the loads in another. - if (!CompilerConfig::is_c1_only_no_jvmci()) { - __ membar(); - } __ volatile_load_mem_reg(address, result, info); } diff --git a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp index 3c179f21c14..67dc4966d64 100644 --- a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp @@ -265,7 +265,7 @@ void C2_MacroAssembler::fast_lock(Register obj, Register box, Register t1, // Check if object matches. ldr(t3, Address(t1_monitor, ObjectMonitor::object_offset())); BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler(); - bs_asm->try_resolve_weak_handle_in_c2(this, t3, t2, slow_path); + bs_asm->try_peek_weak_handle_in_nmethod(this, t3, t3, t2, slow_path); cmp(t3, obj); br(Assembler::NE, slow_path); diff --git a/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp index 2a78d688097..38efcf80650 100644 --- a/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp @@ -393,6 +393,11 @@ void BarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register __ cbz(obj, error); // if klass is null it is broken } +void BarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, Register tmp, Label& slow_path) { + // Load the oop from the weak handle without barriers. + __ ldr(obj, Address(weak_handle)); +} + #ifdef COMPILER2 OptoReg::Name BarrierSetAssembler::encode_float_vector_register_size(const Node* node, OptoReg::Name opto_reg) { @@ -440,12 +445,6 @@ OptoReg::Name BarrierSetAssembler::refine_register(const Node* node, OptoReg::Na return opto_reg; } - -void BarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path) { - // Load the oop from the weak handle. - __ ldr(obj, Address(obj)); -} - #undef __ #define __ _masm-> diff --git a/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.hpp index c2581b2f962..c8ed7941983 100644 --- a/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.hpp @@ -130,12 +130,15 @@ public: static void clear_patching_epoch(); static void increment_patching_epoch(); + // See AS_NO_KEEPALIVE for peek semantics + // weak_handle and obj may alias + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, Register tmp, Label& slow_path); + #ifdef COMPILER2 OptoReg::Name encode_float_vector_register_size(const Node* node, OptoReg::Name opto_reg); OptoReg::Name refine_register(const Node* node, OptoReg::Name opto_reg); - virtual void try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path); #endif // COMPILER2 }; diff --git a/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp deleted file mode 100644 index e4db8a9ab1f..00000000000 --- a/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2018, 2021, Red Hat, Inc. All rights reserved. - * 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 "c1/c1_LIRAssembler.hpp" -#include "c1/c1_MacroAssembler.hpp" -#include "compiler/compilerDefinitions.inline.hpp" -#include "gc/shared/gc_globals.hpp" -#include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp" -#include "gc/shenandoah/shenandoahBarrierSet.hpp" -#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp" - -#define __ masm->masm()-> - -void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) { - Register addr = _addr->as_register_lo(); - Register newval = _new_value->as_register(); - Register cmpval = _cmp_value->as_register(); - Register tmp1 = _tmp1->as_register(); - Register tmp2 = _tmp2->as_register(); - Register result = result_opr()->as_register(); - - if (UseCompressedOops) { - __ encode_heap_oop(tmp1, cmpval); - cmpval = tmp1; - __ encode_heap_oop(tmp2, newval); - newval = tmp2; - } - - ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ true, /*release*/ true, /*is_cae*/ false, result); - - if (CompilerConfig::is_c1_only_no_jvmci()) { - // The membar here is necessary to prevent reordering between the - // release store in the CAS above and a subsequent volatile load. - // However for tiered compilation C1 inserts a full barrier before - // volatile loads which means we don't need an additional barrier - // here (see LIRGenerator::volatile_field_load()). - __ membar(__ AnyAny); - } -} - -#undef __ - -#ifdef ASSERT -#define __ gen->lir(__FILE__, __LINE__)-> -#else -#define __ gen->lir()-> -#endif - -LIR_Opr ShenandoahBarrierSetC1::atomic_cmpxchg_at_resolved(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value) { - BasicType bt = access.type(); - if (access.is_oop()) { - LIRGenerator *gen = access.gen(); - if (ShenandoahSATBBarrier) { - pre_barrier(gen, access.access_emit_info(), access.decorators(), access.resolved_addr(), - LIR_OprFact::illegalOpr /* pre_val */); - } - if (ShenandoahCASBarrier) { - cmp_value.load_item(); - new_value.load_item(); - - LIR_Opr t1 = gen->new_register(T_OBJECT); - LIR_Opr t2 = gen->new_register(T_OBJECT); - LIR_Opr addr = access.resolved_addr()->as_address_ptr()->base(); - LIR_Opr result = gen->new_register(T_INT); - - __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, result)); - - if (ShenandoahCardBarrier) { - post_barrier(access, access.resolved_addr(), new_value.result()); - } - return result; - } - } - return BarrierSetC1::atomic_cmpxchg_at_resolved(access, cmp_value, new_value); -} - -LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value) { - LIRGenerator* gen = access.gen(); - BasicType type = access.type(); - - LIR_Opr result = gen->new_register(type); - value.load_item(); - LIR_Opr value_opr = value.result(); - - assert(type == T_INT || is_reference_type(type) LP64_ONLY( || type == T_LONG ), "unexpected type"); - LIR_Opr tmp = gen->new_register(T_INT); - __ xchg(access.resolved_addr(), value_opr, result, tmp); - - if (access.is_oop()) { - result = load_reference_barrier(access.gen(), result, LIR_OprFact::addressConst(0), access.decorators()); - LIR_Opr tmp = gen->new_register(type); - __ move(result, tmp); - result = tmp; - if (ShenandoahSATBBarrier) { - pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr, - result /* pre_val */); - } - if (ShenandoahCardBarrier) { - post_barrier(access, access.resolved_addr(), result); - } - } - - return result; -} diff --git a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp index 2f7707227b4..56835e799f0 100644 --- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp @@ -57,6 +57,8 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec __ cbz(count, done); // Is GC active? + assert(!saved_regs.contains(rscratch1), "Sanity: about to clobber rscratch1"); + assert(!saved_regs.contains(rscratch2), "Sanity: about to clobber rscratch2"); Address gc_state(rthread, in_bytes(ShenandoahThreadLocalData::gc_state_offset())); __ ldrb(rscratch1, gc_state); if (ShenandoahSATBBarrier && dest_uninitialized) { @@ -67,13 +69,26 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec __ br(Assembler::EQ, done); } - __ push(saved_regs, sp); - if (UseCompressedOops) { - __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_narrow_oop), src, dst, count); - } else { - __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_oop), src, dst, count); + __ push_call_clobbered_registers(); + // If arguments are not in proper places, shuffle them. + // Doing this via the stack is the most straight-forward way to avoid + // accidentally smashing any register. + if (c_rarg0 != src || c_rarg1 != dst || c_rarg2 != count) { + __ push(RegSet::of(src), sp); + __ push(RegSet::of(dst), sp); + __ push(RegSet::of(count), sp); + __ pop(RegSet::of(c_rarg2), sp); + __ pop(RegSet::of(c_rarg1), sp); + __ pop(RegSet::of(c_rarg0), sp); } - __ pop(saved_regs, sp); + address target = nullptr; + if (UseCompressedOops) { + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_narrow_oop); + } else { + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_oop); + } + __ call_VM_leaf(target, 3); + __ pop_call_clobbered_registers(); __ bind(done); } } @@ -91,15 +106,8 @@ void ShenandoahBarrierSetAssembler::satb_barrier(MacroAssembler* masm, Register pre_val, Register thread, Register tmp1, - Register tmp2, - bool tosca_live, - bool expand_call) { + Register tmp2) { assert(ShenandoahSATBBarrier, "Should be checked by caller"); - - // If expand_call is true then we expand the call_VM_leaf macro - // directly to skip generating the check by - // InterpreterMacroAssembler::call_VM_leaf_base that checks _last_sp. - assert(thread == rthread, "must be"); Label done; @@ -118,7 +126,12 @@ void ShenandoahBarrierSetAssembler::satb_barrier(MacroAssembler* masm, // Do we need to load the previous value? if (obj != noreg) { - __ load_heap_oop(pre_val, Address(obj, 0), noreg, noreg, AS_RAW); + if (UseCompressedOops) { + __ ldrw(pre_val, Address(obj, 0)); + __ decode_heap_oop(pre_val); + } else { + __ ldr(pre_val, Address(obj, 0)); + } } // Is the previous value null? @@ -142,33 +155,17 @@ void ShenandoahBarrierSetAssembler::satb_barrier(MacroAssembler* masm, __ b(done); __ bind(runtime); - // save the live input values - RegSet saved = RegSet::of(pre_val); - if (tosca_live) saved += RegSet::of(r0); - if (obj != noreg) saved += RegSet::of(obj); - __ push(saved, sp); - - // Calling the runtime using the regular call_VM_leaf mechanism generates - // code (generated by InterpreterMacroAssember::call_VM_leaf_base) - // that checks that the *(rfp+frame::interpreter_frame_last_sp) == nullptr. - // - // If we care generating the pre-barrier without a frame (e.g. in the - // intrinsified Reference.get() routine) then rfp might be pointing to - // the caller frame and so this check will most likely fail at runtime. - // - // Expanding the call directly bypasses the generation of the check. - // So when we do not have have a full interpreter frame on the stack - // expand_call should be passed true. - - if (expand_call) { - assert(pre_val != c_rarg1, "smashed arg"); - __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_barrier_pre), pre_val); - } else { - __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_barrier_pre), pre_val); + // Slow-path call + __ enter(/* strip_ret_addr = */ true); + __ push_call_clobbered_registers(); + if (c_rarg0 != pre_val) { + __ mov(c_rarg0, pre_val); } - - __ pop(saved, sp); + // Calling with super_call_VM_leaf with c_rarg0 bypasses interpreter checks and avoids any moves. + __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_barrier_pre), c_rarg0); + __ pop_call_clobbered_registers(); + __ leave(); __ bind(done); } @@ -232,7 +229,6 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm, bool is_narrow = UseCompressedOops && !is_native; Label heap_stable, not_cset; - __ enter(/*strip_ret_addr*/true); Address gc_state(rthread, in_bytes(ShenandoahThreadLocalData::gc_state_offset())); __ ldrb(rscratch2, gc_state); @@ -261,35 +257,47 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm, // Test for in-cset if (is_strong) { - __ mov(rscratch2, ShenandoahHeap::in_cset_fast_test_addr()); - __ lsr(rscratch1, r0, ShenandoahHeapRegion::region_size_bytes_shift_jint()); + if (AOTCodeCache::is_on_for_dump()) { + __ lea(rscratch2, ExternalAddress(AOTRuntimeConstants::cset_base_address())); + __ ldr(rscratch2, Address(rscratch2)); + __ lea(rscratch1, ExternalAddress(AOTRuntimeConstants::grain_shift_address())); + __ ldrw(rscratch1, Address(rscratch1)); + __ lsrv(rscratch1, r0, rscratch1); + } else { + __ mov(rscratch2, ShenandoahHeap::in_cset_fast_test_addr()); + __ lsr(rscratch1, r0, ShenandoahHeapRegion::region_size_bytes_shift_jint()); + } __ ldrb(rscratch2, Address(rscratch2, rscratch1)); __ tbz(rscratch2, 0, not_cset); } + // Slow-path call + __ enter(/* strip_ret_addr = */ true); __ push_call_clobbered_registers(); + address target = nullptr; if (is_strong) { if (is_narrow) { - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong_narrow)); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong_narrow); } else { - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong)); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong); } } else if (is_weak) { if (is_narrow) { - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak_narrow)); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak_narrow); } else { - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak)); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak); } } else { assert(is_phantom, "only remaining strength"); assert(!is_narrow, "phantom access cannot be narrow"); - // AOT saved adapters need relocation for this call. - __ lea(lr, RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom))); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom); } - __ blr(lr); + // Calling with super_call_VM_leaf with c_rarg0/1 bypasses interpreter checks and avoids any moves. + __ super_call_VM_leaf(target, c_rarg0, c_rarg1); __ mov(rscratch1, r0); __ pop_call_clobbered_registers(); __ mov(r0, rscratch1); + __ leave(); __ bind(not_cset); @@ -297,7 +305,6 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm, __ pop(to_save, sp); __ bind(heap_stable); - __ leave(); } // @@ -347,18 +354,12 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d // 3: apply keep-alive barrier if needed if (ShenandoahBarrierSet::need_keep_alive_barrier(decorators, type)) { - __ enter(/*strip_ret_addr*/true); - __ push_call_clobbered_registers(); satb_barrier(masm /* masm */, noreg /* obj */, dst /* pre_val */, rthread /* thread */, tmp1 /* tmp1 */, - tmp2 /* tmp2 */, - true /* tosca_live */, - true /* expand_call */); - __ pop_call_clobbered_registers(); - __ leave(); + tmp2 /* tmp2 */); } } @@ -400,8 +401,6 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet __ lea(tmp3, dst); } - bool storing_non_null = (val != noreg); - // 2: pre-barrier: SATB needs the previous value if (ShenandoahBarrierSet::need_satb_barrier(decorators, type)) { satb_barrier(masm, @@ -409,15 +408,14 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet tmp2 /* pre_val */, rthread /* thread */, tmp1 /* tmp */, - rscratch1 /* tmp2 */, - storing_non_null /* tosca_live */, - false /* expand_call */); + rscratch1 /* tmp2 */); } // Store! BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), val, noreg, noreg, noreg); // 3: post-barrier: card barrier needs store address + bool storing_non_null = (val != noreg); if (ShenandoahBarrierSet::need_card_barrier(decorators, type) && storing_non_null) { card_barrier(masm, tmp3); } @@ -443,15 +441,15 @@ void ShenandoahBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler __ bind(done); } -#ifdef COMPILER2 -void ShenandoahBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, - Register tmp, Label& slow_path) { - assert_different_registers(obj, tmp); +void ShenandoahBarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path) { + assert_different_registers(weak_handle, tmp, noreg); + assert_different_registers(obj, tmp, noreg); Label done; - // Resolve weak handle using the standard implementation. - BarrierSetAssembler::try_resolve_weak_handle_in_c2(masm, obj, tmp, slow_path); + // Peek weak handle using the standard implementation. + BarrierSetAssembler::try_peek_weak_handle_in_nmethod(masm, weak_handle, obj, tmp, slow_path); // Check if the reference is null, and if it is, take the fast path. __ cbz(obj, done); @@ -465,7 +463,6 @@ void ShenandoahBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler __ tbnz(tmp, ShenandoahHeap::WEAK_ROOTS_BITPOS, slow_path); __ bind(done); } -#endif // Special Shenandoah CAS implementation that handles false negatives due // to concurrent evacuation. The service is more complex than a @@ -709,8 +706,16 @@ void ShenandoahBarrierSetAssembler::gen_load_reference_barrier_stub(LIR_Assemble if (is_strong) { // Check for object in cset. - __ mov(tmp2, ShenandoahHeap::in_cset_fast_test_addr()); - __ lsr(tmp1, res, ShenandoahHeapRegion::region_size_bytes_shift_jint()); + if (AOTCodeCache::is_on_for_dump()) { + __ lea(tmp2, ExternalAddress(AOTRuntimeConstants::cset_base_address())); + __ ldr(tmp2, Address(tmp2)); + __ lea(tmp1, ExternalAddress(AOTRuntimeConstants::grain_shift_address())); + __ ldrw(tmp1, Address(tmp1)); + __ lsrv(tmp1, res, tmp1); + } else { + __ mov(tmp2, ShenandoahHeap::in_cset_fast_test_addr()); + __ lsr(tmp1, res, ShenandoahHeapRegion::region_size_bytes_shift_jint()); + } __ ldrb(tmp2, Address(tmp2, tmp1)); __ cbz(tmp2, *stub->continuation()); } @@ -795,25 +800,25 @@ void ShenandoahBarrierSetAssembler::generate_c1_load_reference_barrier_runtime_s bool is_native = ShenandoahBarrierSet::is_native_access(decorators); if (is_strong) { if (is_native) { - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong)); + __ lea(lr, RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong))); } else { if (UseCompressedOops) { - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong_narrow)); + __ lea(lr, RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong_narrow))); } else { - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong)); + __ lea(lr, RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong))); } } } else if (is_weak) { assert(!is_native, "weak must not be called off-heap"); if (UseCompressedOops) { - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak_narrow)); + __ lea(lr, RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak_narrow))); } else { - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak)); + __ lea(lr, RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak))); } } else { assert(is_phantom, "only remaining strength"); assert(is_native, "phantom must only be called off-heap"); - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom)); + __ lea(lr, RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom))); } __ blr(lr); __ mov(rscratch1, r0); diff --git a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp index d5d5ce8950e..3f96177d009 100644 --- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp @@ -46,9 +46,7 @@ private: Register pre_val, Register thread, Register tmp1, - Register tmp2, - bool tosca_live, - bool expand_call); + Register tmp2); void card_barrier(MacroAssembler* masm, Register obj); @@ -80,9 +78,8 @@ public: Address dst, Register val, Register tmp1, Register tmp2, Register tmp3); virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env, Register obj, Register tmp, Label& slowpath); -#ifdef COMPILER2 - virtual void try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path); -#endif + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path); void cmpxchg_oop(MacroAssembler* masm, Register addr, Register expected, Register new_val, bool acquire, bool release, bool is_cae, Register result); }; diff --git a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp index f0885fee93d..1eb96cdb6e7 100644 --- a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp @@ -1328,12 +1328,20 @@ void ZStoreBarrierStubC2Aarch64::emit_code(MacroAssembler& masm) { register_stub(this); } +#undef __ + +#endif // COMPILER2 + #undef __ #define __ masm-> -void ZBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path) { - // Resolve weak handle using the standard implementation. - BarrierSetAssembler::try_resolve_weak_handle_in_c2(masm, obj, tmp, slow_path); +void ZBarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path) { + assert_different_registers(weak_handle, tmp, noreg); + assert_different_registers(obj, tmp, noreg); + + // Peek weak handle using the standard implementation. + BarrierSetAssembler::try_peek_weak_handle_in_nmethod(masm, weak_handle, obj, tmp, slow_path); // Check if the oop is bad, in which case we need to take the slow path. __ relocate(barrier_Relocation::spec(), ZBarrierRelocationFormatMarkBadBeforeMov); @@ -1345,13 +1353,6 @@ void ZBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, R __ lsr(obj, obj, ZPointerLoadShift); } -#undef __ - -#endif // COMPILER2 - -#undef __ -#define __ masm-> - void ZBarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register tmp1, Register tmp2, Label& error) { // C1 calls verfy_oop in the middle of barriers, before they have been uncolored // and after being colored. Therefore, we must deal with colored oops as well. diff --git a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.hpp index fbbc5c1b517..a8fcb7696b4 100644 --- a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.hpp @@ -191,9 +191,10 @@ public: ZLoadBarrierStubC2* stub) const; void generate_c2_store_barrier_stub(MacroAssembler* masm, ZStoreBarrierStubC2* stub) const; - void try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path); #endif // COMPILER2 + void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, Register tmp, Label& slow_path); + void check_oop(MacroAssembler* masm, Register obj, Register tmp1, Register tmp2, Label& error); }; diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp index 7bec0a3c0ca..8f5eb702714 100644 --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp @@ -2815,6 +2815,17 @@ void MacroAssembler::store_sized_value(Address dst, Register src, size_t size_in } } +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; } @@ -6724,13 +6735,14 @@ void MacroAssembler::java_round_float(Register dst, FloatRegister src, // by the call to JavaThread::aarch64_get_thread_helper() or, indeed, // the call setup code. // -// On Linux, aarch64_get_thread_helper() clobbers only r0, r1, and flags. +// On Linux and Windows, aarch64_get_thread_helper() is implemented in +// assembly and clobbers only r0, r1, and flags. // On other systems, the helper is a usual C function. // void MacroAssembler::get_thread(Register dst) { RegSet saved_regs = - LINUX_ONLY(RegSet::range(r0, r1) + lr - dst) - NOT_LINUX (RegSet::range(r0, r17) + lr - dst); + BSD_ONLY(RegSet::range(r0, r17) + lr - dst) + NOT_BSD (RegSet::range(r0, r1) + lr - dst); protect_return_address(); push(saved_regs, sp); @@ -7263,3 +7275,20 @@ void MacroAssembler::fast_unlock(Register obj, Register t1, Register t2, Registe bind(unlocked); } + +// Rotate using USHR and SLI instructions (or copy, if rotate count is zero) +void MacroAssembler::neon_vector_rotate(FloatRegister dst, SIMD_Arrangement T, + FloatRegister src, int shift_amount) { + assert(src != dst, "did not expect src and dst to be the same register"); + + int esize = BitsPerByte << (T / 2); + int lshift = shift_amount & (esize - 1); + + if (lshift == 0) { + // T & 1 == 0 => 64-bit arrangements, else 128-bit arrangements + orr(dst, (T & 1) == 0 ? T8B : T16B, src, src); + } else { + ushr(dst, T, src, esize - lshift); + sli(dst, T, src, lshift); + } +} diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp index a6cc862d05c..c02df666a87 100644 --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp @@ -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; @@ -719,6 +720,9 @@ public: // 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); @@ -1623,6 +1627,10 @@ public: const FloatRegister (&stateVectors)[16], int idx1, int idx2, int idx3, int idx4); + // Rotate using ORR (for identity) or USHR + SLI. + void neon_vector_rotate(FloatRegister dst, SIMD_Arrangement T, + FloatRegister src, int shift_amount); + // Place an ISB after code may have been modified due to a safepoint. void safepoint_isb(); diff --git a/src/hotspot/cpu/aarch64/matcher_aarch64.hpp b/src/hotspot/cpu/aarch64/matcher_aarch64.hpp index 0fbc2ef141e..aa5a1df5cb0 100644 --- a/src/hotspot/cpu/aarch64/matcher_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/matcher_aarch64.hpp @@ -141,8 +141,10 @@ } // Does the CPU supports vector constant rotate instructions? + // NEON supports constant rotates via USHR+SLI (2-instruction sequence). + // The shift value will be masked to the element width in the .ad rule. static constexpr bool supports_vector_constant_rotates(int shift) { - return false; + return true; } // Does the CPU supports vector unsigned comparison instructions? diff --git a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp index 69769fb8441..4c64b265d92 100644 --- a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp @@ -3479,7 +3479,6 @@ void TemplateTable::invokeinterface(int byte_no) { __ bind(notVFinal); // Get receiver klass into r3 - __ restore_locals(); __ load_klass(r3, r2); Label no_such_method; diff --git a/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp b/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp index 2ec901f6a2e..a9f2d2ff2aa 100644 --- a/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp @@ -41,7 +41,7 @@ #define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) -#define DECLARE_INT_CPU_FEATURE_CONSTANT(id, name, bit) GENERATE_VM_INT_CONSTANT_ENTRY(VM_Version::CPU_##id) +#define DECLARE_INT_CPU_FEATURE_CONSTANT(id, name) GENERATE_VM_INT_CONSTANT_ENTRY(VM_Version::CPU_##id) #define VM_INT_CPU_FEATURE_CONSTANTS CPU_FEATURE_FLAGS(DECLARE_INT_CPU_FEATURE_CONSTANT) #endif // CPU_AARCH64_VMSTRUCTS_AARCH64_HPP diff --git a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp index 441bd4859fe..d1cf8b6feed 100644 --- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp @@ -57,7 +57,9 @@ bool VM_Version::_cache_dic_enabled; bool VM_Version::_cache_idc_enabled; bool VM_Version::_ic_ivau_trapped; -const char* VM_Version::_features_names[MAX_CPU_FEATURES] = { nullptr }; +#define DECLARE_CPU_FEATURE_NAME(id, name) XSTR(name), +const char* VM_Version::_features_names[] = { CPU_FEATURE_FLAGS(DECLARE_CPU_FEATURE_NAME)}; +#undef DECLARE_CPU_FEATURE_NAME static SpinWait get_spin_wait_desc() { SpinWait spin_wait(OnSpinWaitInst, OnSpinWaitInstCount, OnSpinWaitDelay); @@ -104,11 +106,6 @@ static bool has_neoverse_n1_errata_1542419() { } void VM_Version::initialize() { -#define SET_CPU_FEATURE_NAME(id, name, bit) \ - _features_names[bit] = XSTR(name); - CPU_FEATURE_FLAGS(SET_CPU_FEATURE_NAME) -#undef SET_CPU_FEATURE_NAME - _supports_atomic_getset4 = true; _supports_atomic_getadd4 = true; _supports_atomic_getset8 = true; @@ -305,9 +302,9 @@ void VM_Version::initialize() { FLAG_SET_DEFAULT(UseSHA, false); } - CHECK_CPU_FEATURE(supports_crc32, CRC32); - CHECK_CPU_FEATURE(supports_lse, LSE); - CHECK_CPU_FEATURE(supports_aes, AES); + CHECK_CPU_FEATURE(UseCRC32, CRC32, supports_crc32(), "CRC32" MULTI_INST_WARNING_MSG); + CHECK_CPU_FEATURE(UseLSE, LSE, supports_lse(), "LSE" MULTI_INST_WARNING_MSG); + CHECK_CPU_FEATURE(UseAES, AES, supports_aes(), "AES" MULTI_INST_WARNING_MSG); if (_cpu == CPU_ARM && model_is_in({ CPU_MODEL_ARM_NEOVERSE_V1, CPU_MODEL_ARM_NEOVERSE_V2, @@ -789,9 +786,9 @@ void VM_Version::store_cpu_features(void* buf) { *(uint64_t*)buf = _features; } -bool VM_Version::supports_features(void* features_buffer) { +bool VM_Version::verify_aot_code_cache_features(void* features_buffer) { uint64_t features_to_test = *(uint64_t*)features_buffer; - return (_features & features_to_test) == features_to_test; + return (_features == features_to_test); } #if defined(LINUX) diff --git a/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp index 30f1a5d86ca..c67455e6b79 100644 --- a/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp @@ -144,33 +144,32 @@ public: CPU_MODEL_ARM_NEOVERSE_N3 = 0xd8e, }; -#define CPU_FEATURE_FLAGS(decl) \ - decl(FP, fp, 0) \ - decl(ASIMD, asimd, 1) \ - decl(EVTSTRM, evtstrm, 2) \ - decl(AES, aes, 3) \ - decl(PMULL, pmull, 4) \ - decl(SHA1, sha1, 5) \ - decl(SHA2, sha256, 6) \ - decl(CRC32, crc32, 7) \ - decl(LSE, lse, 8) \ - decl(FPHP, fphp, 9) \ - decl(ASIMDHP, asimdhp, 10) \ - decl(DCPOP, dcpop, 16) \ - decl(SHA3, sha3, 17) \ - decl(SHA512, sha512, 21) \ - decl(SVE, sve, 22) \ - decl(SB, sb, 29) \ - decl(PACA, paca, 30) \ - /* flags above must follow Linux HWCAP */ \ - decl(SVEBITPERM, svebitperm, 27) \ - decl(SVE2, sve2, 28) \ - decl(A53MAC, a53mac, 31) \ - decl(ECV, ecv, 32) \ - decl(WFXT, wfxt, 33) +#define CPU_FEATURE_FLAGS(decl) \ + decl(FP, fp ) \ + decl(ASIMD, asimd ) \ + decl(EVTSTRM, evtstrm ) \ + decl(AES, aes ) \ + decl(PMULL, pmull ) \ + decl(SHA1, sha1 ) \ + decl(SHA2, sha256 ) \ + decl(CRC32, crc32 ) \ + decl(LSE, lse ) \ + decl(FPHP, fphp ) \ + decl(ASIMDHP, asimdhp ) \ + decl(DCPOP, dcpop ) \ + decl(SHA3, sha3 ) \ + decl(SHA512, sha512 ) \ + decl(SVE, sve ) \ + decl(SB, sb ) \ + decl(PACA, paca ) \ + decl(SVEBITPERM, svebitperm ) \ + decl(SVE2, sve2 ) \ + decl(A53MAC, a53mac ) \ + decl(ECV, ecv ) \ + decl(WFXT, wfxt ) enum Feature_Flag { -#define DECLARE_CPU_FEATURE_FLAG(id, name, bit) CPU_##id = bit, +#define DECLARE_CPU_FEATURE_FLAG(id, name) CPU_##id, CPU_FEATURE_FLAGS(DECLARE_CPU_FEATURE_FLAG) #undef DECLARE_CPU_FEATURE_FLAG MAX_CPU_FEATURES @@ -178,10 +177,10 @@ public: STATIC_ASSERT(sizeof(_features) * BitsPerByte >= MAX_CPU_FEATURES); - static const char* _features_names[MAX_CPU_FEATURES]; + static const char* _features_names[]; // Feature identification -#define CPU_FEATURE_DETECTION(id, name, bit) \ +#define CPU_FEATURE_DETECTION(id, name) \ static bool supports_##name() { return supports_feature(CPU_##id); } CPU_FEATURE_FLAGS(CPU_FEATURE_DETECTION) #undef CPU_FEATURE_DETECTION @@ -279,7 +278,7 @@ public: // Size of the buffer must be same as returned by cpu_features_size() static void store_cpu_features(void* buf); - static bool supports_features(void* features_to_test); + static bool verify_aot_code_cache_features(void* features_buffer); }; #endif // CPU_AARCH64_VM_VERSION_AARCH64_HPP diff --git a/src/hotspot/cpu/arm/arm.ad b/src/hotspot/cpu/arm/arm.ad index 60a0ef307b5..45ae283e05a 100644 --- a/src/hotspot/cpu/arm/arm.ad +++ b/src/hotspot/cpu/arm/arm.ad @@ -9214,10 +9214,12 @@ instruct bytes_reverse_long(iRegL dst, iRegL src) %{ 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 --git a/src/hotspot/cpu/arm/arm_32.ad b/src/hotspot/cpu/arm/arm_32.ad index 9438e8da8b5..2af7e253a1a 100644 --- a/src/hotspot/cpu/arm/arm_32.ad +++ b/src/hotspot/cpu/arm/arm_32.ad @@ -1,5 +1,5 @@ // -// Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. +// Copyright (c) 2008, 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 @@ -501,7 +501,7 @@ operand immIRotn() %{ %} operand immPRot() %{ - predicate(n->get_ptr() == 0 || (AsmOperand::is_rotated_imm(n->get_ptr()) && ((ConPNode*)n)->type()->reloc() == relocInfo::none)); + predicate(n->get_ptr() == 0 || (AsmOperand::is_rotated_imm(n->get_ptr()) && ((ConPNode*)n)->type()->is_ptr()->reloc() == relocInfo::none)); match(ConP); diff --git a/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp index 4c339968f85..46ec87290ae 100644 --- a/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp +++ b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp @@ -1332,7 +1332,8 @@ void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, load_addr = address; } __ volatile_load_mem_reg(load_addr, result, info); - return; + } else { + __ load(address, result, info, lir_patch_none); } - __ load(address, result, info, lir_patch_none); + __ membar_acquire(); } diff --git a/src/hotspot/cpu/ppc/assembler_ppc.hpp b/src/hotspot/cpu/ppc/assembler_ppc.hpp index 378e01fc1cc..f62c93e466c 100644 --- a/src/hotspot/cpu/ppc/assembler_ppc.hpp +++ b/src/hotspot/cpu/ppc/assembler_ppc.hpp @@ -461,10 +461,6 @@ class Assembler : public AbstractAssembler { FRIN_OPCODE = (63u << OPCODE_SHIFT | 392u << 1), FRIP_OPCODE = (63u << OPCODE_SHIFT | 456u << 1), FRIM_OPCODE = (63u << OPCODE_SHIFT | 488u << 1), - // These are special Power6 opcodes, reused for "lfdepx" and "stfdepx" - // on Power7. Do not use. - // MFFGPR_OPCODE = (31u << OPCODE_SHIFT | 607u << 1), - // MFTGPR_OPCODE = (31u << OPCODE_SHIFT | 735u << 1), CMPB_OPCODE = (31u << OPCODE_SHIFT | 508 << 1), POPCNTB_OPCODE = (31u << OPCODE_SHIFT | 122 << 1), POPCNTW_OPCODE = (31u << OPCODE_SHIFT | 378 << 1), @@ -518,7 +514,6 @@ class Assembler : public AbstractAssembler { FSQRT_OPCODE = (63u << OPCODE_SHIFT | 22u << 1), // A-FORM FSQRTS_OPCODE = (59u << OPCODE_SHIFT | 22u << 1), // A-FORM - // Vector instruction support for >= Power6 // Vector Storage Access LVEBX_OPCODE = (31u << OPCODE_SHIFT | 7u << 1), LVEHX_OPCODE = (31u << OPCODE_SHIFT | 39u << 1), @@ -1236,7 +1231,7 @@ class Assembler : public AbstractAssembler { static int u( int x) { return opp_u_field(x, 19, 16); } static int ui( int x) { return opp_u_field(x, 31, 16); } - // Support vector instructions for >= Power6. + // Support vector instructions. static int vra( int x) { return opp_u_field(x, 15, 11); } static int vrb( int x) { return opp_u_field(x, 20, 16); } static int vrc( int x) { return opp_u_field(x, 25, 21); } @@ -2036,7 +2031,7 @@ class Assembler : public AbstractAssembler { inline void stqcx_( Register s, Register a, Register b); // Instructions for adjusting thread priority for simultaneous - // multithreading (SMT) on Power5. + // multithreading (SMT). private: inline void smt_prio_very_low(); inline void smt_prio_medium_high(); @@ -2204,7 +2199,7 @@ class Assembler : public AbstractAssembler { inline void fsqrt( FloatRegister d, FloatRegister b); inline void fsqrts(FloatRegister d, FloatRegister b); - // Vector instructions for >= Power6. + // Vector instructions. inline void lvebx( VectorRegister d, Register s1, Register s2); inline void lvehx( VectorRegister d, Register s1, Register s2); inline void lvewx( VectorRegister d, Register s1, Register s2); diff --git a/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp b/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp index d349bbc6f87..22b9e268dcd 100644 --- a/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp +++ b/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp @@ -642,7 +642,6 @@ inline void Assembler::crorc( ConditionRegister crdst, Condition cdst, Condition crorc(dst_bit, src_bit, dst_bit); } -// Conditional move (>= Power7) inline void Assembler::isel(Register d, ConditionRegister cr, Condition cc, bool inv, Register a, Register b) { if (b == noreg) { b = d; // Can be omitted if old value should be kept in "else" case. @@ -689,7 +688,7 @@ inline void Assembler::elemental_membar(int e) { assert(0 < e && e < 16, "invali // Wait instructions for polling. inline void Assembler::wait() { emit_int32( WAIT_OPCODE); } -inline void Assembler::waitrsv() { emit_int32( WAIT_OPCODE | 1<<(31-10)); } // WC=0b01 >=Power7 +inline void Assembler::waitrsv() { emit_int32( WAIT_OPCODE | 1<<(31-10)); } // WC=0b01 // atomics // Use ra0mem to disallow R0 as base. @@ -709,19 +708,16 @@ inline void Assembler::stwcx_(Register s, Register a, Register b) inline void Assembler::stdcx_(Register s, Register a, Register b) { emit_int32( STDCX_OPCODE | rs(s) | ra0mem(a) | rb(b) | rc(1)); } inline void Assembler::stqcx_(Register s, Register a, Register b) { emit_int32( STQCX_OPCODE | rs(s) | ra0mem(a) | rb(b) | rc(1)); } -// Instructions for adjusting thread priority -// for simultaneous multithreading (SMT) on >= POWER5. +// Instructions for adjusting thread priority for simultaneous multithreading (SMT). inline void Assembler::smt_prio_very_low() { Assembler::or_unchecked(R31, R31, R31); } inline void Assembler::smt_prio_low() { Assembler::or_unchecked(R1, R1, R1); } inline void Assembler::smt_prio_medium_low() { Assembler::or_unchecked(R6, R6, R6); } inline void Assembler::smt_prio_medium() { Assembler::or_unchecked(R2, R2, R2); } inline void Assembler::smt_prio_medium_high() { Assembler::or_unchecked(R5, R5, R5); } -inline void Assembler::smt_prio_high() { Assembler::or_unchecked(R3, R3, R3); } -// >= Power7 +inline void Assembler::smt_prio_high() { Assembler::or_unchecked(R3, R3, R3); } // Restricted to supervisor state since Power9. inline void Assembler::smt_yield() { Assembler::or_unchecked(R27, R27, R27); } // never actually implemented -inline void Assembler::smt_mdoio() { Assembler::or_unchecked(R29, R29, R29); } // never actually implemetned +inline void Assembler::smt_mdoio() { Assembler::or_unchecked(R29, R29, R29); } // never actually implemented inline void Assembler::smt_mdoom() { Assembler::or_unchecked(R30, R30, R30); } // never actually implemented -// Power8 inline void Assembler::smt_miso() { Assembler::or_unchecked(R26, R26, R26); } // never actually implemented inline void Assembler::twi_0(Register a) { twi_unchecked(0, a, 0);} @@ -766,10 +762,6 @@ inline void Assembler::frin( FloatRegister d, FloatRegister b) { emit_int32( FRI inline void Assembler::frip( FloatRegister d, FloatRegister b) { emit_int32( FRIP_OPCODE | frt(d) | frb(b) | rc(0)); } inline void Assembler::frim( FloatRegister d, FloatRegister b) { emit_int32( FRIM_OPCODE | frt(d) | frb(b) | rc(0)); } -// These are special Power6 opcodes, reused for "lfdepx" and "stfdepx" -// on Power7. Do not use. -//inline void Assembler::mffgpr( FloatRegister d, Register b) { emit_int32( MFFGPR_OPCODE | frt(d) | rb(b) | rc(0)); } -//inline void Assembler::mftgpr( Register d, FloatRegister b) { emit_int32( MFTGPR_OPCODE | rt(d) | frb(b) | rc(0)); } // add cmpb and popcntb to detect ppc power version. inline void Assembler::cmpb( Register a, Register s, Register b) { emit_int32( CMPB_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); } inline void Assembler::popcntb(Register a, Register s) { emit_int32( POPCNTB_OPCODE | rta(a) | rs(s)); }; @@ -837,7 +829,7 @@ inline void Assembler::fcmpu( ConditionRegister crx, FloatRegister a, FloatRegis inline void Assembler::fsqrt( FloatRegister d, FloatRegister b) { emit_int32( FSQRT_OPCODE | frt(d) | frb(b) | rc(0)); } inline void Assembler::fsqrts(FloatRegister d, FloatRegister b) { emit_int32( FSQRTS_OPCODE | frt(d) | frb(b) | rc(0)); } -// Vector instructions for >= Power6. +// Vector instructions. inline void Assembler::lvebx( VectorRegister d, Register s1, Register s2) { emit_int32( LVEBX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); } inline void Assembler::lvehx( VectorRegister d, Register s1, Register s2) { emit_int32( LVEHX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); } inline void Assembler::lvewx( VectorRegister d, Register s1, Register s2) { emit_int32( LVEWX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); } diff --git a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp index 0b48653ae64..777b41577be 100644 --- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp +++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp @@ -210,7 +210,7 @@ int LIR_Assembler::emit_unwind_handler() { _masm->block_comment("Unwind handler"); int offset = code_offset(); - bool preserve_exception = method()->is_synchronized() || compilation()->env()->dtrace_method_probes(); + bool preserve_exception = method()->is_synchronized(); const Register Rexception = R3 /*LIRGenerator::exceptionOopOpr()*/, Rexception_save = R31; // Fetch the exception from TLS and clear out exception related thread state. @@ -232,10 +232,6 @@ int LIR_Assembler::emit_unwind_handler() { __ bind(*stub->continuation()); } - if (compilation()->env()->dtrace_method_probes()) { - Unimplemented(); - } - // Dispatch to the unwind logic. address unwind_stub = Runtime1::entry_for(StubId::c1_unwind_exception_id); //__ load_const_optimized(R0, unwind_stub); diff --git a/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp index 5f030676bcb..a652a155f62 100644 --- a/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp +++ b/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp @@ -1143,6 +1143,7 @@ void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, Unimplemented(); // __ volatile_load_mem_reg(address, result, info); #endif + __ membar_acquire(); } diff --git a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp index 4d7af0e4a71..359c7cf22ad 100644 --- a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp +++ b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp @@ -232,13 +232,6 @@ void C1_MacroAssembler::initialize_object( initialize_body(obj, t1, t2, con_size_in_bytes, hdr_size_in_bytes); } - if (CURRENT_ENV->dtrace_alloc_probes()) { - Unimplemented(); -// assert(obj == O0, "must be"); -// call(CAST_FROM_FN_PTR(address, Runtime1::entry_for(StubId::c1_dtrace_object_alloc_id)), -// relocInfo::runtime_call_type); - } - verify_oop(obj, FILE_AND_LINE); } @@ -308,13 +301,6 @@ void C1_MacroAssembler::allocate_array( initialize_body(base, index); } - if (CURRENT_ENV->dtrace_alloc_probes()) { - Unimplemented(); - //assert(obj == O0, "must be"); - //call(CAST_FROM_FN_PTR(address, Runtime1::entry_for(StubId::c1_dtrace_object_alloc_id)), - // relocInfo::runtime_call_type); - } - verify_oop(obj, FILE_AND_LINE); } diff --git a/src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp b/src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp index f7704ea5b14..82167949065 100644 --- a/src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp +++ b/src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp @@ -540,6 +540,8 @@ template frame ThawBase::new_stack_frame(const frame& hf, frame& intptr_t* frame_sp = caller.sp() - fsize; if ((bottom && argsize > 0) || caller.is_interpreted_frame()) { + assert(!_should_patch_caller_pc, ""); + _should_patch_caller_pc = caller.is_interpreted_frame(); frame_sp -= argsize + frame::metadata_words_at_top; frame_sp = align_down(frame_sp, frame::alignment_in_bytes); caller.set_sp(frame_sp + fsize); diff --git a/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp index 3692b247989..7a9e29191b9 100644 --- a/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp +++ b/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.cpp @@ -179,9 +179,10 @@ void BarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm, Re __ ld(dst, 0, dst); // Resolve (untagged) jobject. } -void BarrierSetAssembler::try_resolve_weak_handle(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path) { - // Load the oop from the weak handle. - __ ld(obj, 0, obj); +void BarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path) { + // Load the oop from the weak handle without barriers. + __ ld(obj, 0, weak_handle); } void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Register tmp) { @@ -354,19 +355,9 @@ int SaveLiveRegisters::iterate_over_register_mask(IterationAction action, int of Register spill_addr = R0; int spill_offset = offset - reg_save_index * BytesPerWord; if (action == ACTION_SAVE) { - if (PowerArchitecturePPC64 >= 9) { - _masm->stxv(vs_reg, spill_offset, R1_SP); - } else { - _masm->addi(spill_addr, R1_SP, spill_offset); - _masm->stxvd2x(vs_reg, spill_addr); - } + _masm->stxv(vs_reg, spill_offset, R1_SP); } else if (action == ACTION_RESTORE) { - if (PowerArchitecturePPC64 >= 9) { - _masm->lxv(vs_reg, spill_offset, R1_SP); - } else { - _masm->addi(spill_addr, R1_SP, spill_offset); - _masm->lxvd2x(vs_reg, spill_addr); - } + _masm->lxv(vs_reg, spill_offset, R1_SP); } else { assert(action == ACTION_COUNT_ONLY, "Sanity"); } diff --git a/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.hpp b/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.hpp index 8112542d761..8e8c4d41c3b 100644 --- a/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.hpp +++ b/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.hpp @@ -70,11 +70,10 @@ public: virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register dst, Register jni_env, Register obj, Register tmp, Label& slowpath); - // Can be used in nmethods including native wrappers. - // Attention: obj will only be valid until next safepoint (no SATB barrier). - // TODO: maybe rename to try_peek_weak_handle on all platforms (try: operation may fail, peek: obj is not kept alive) - // (other platforms currently use it for C2 only: try_resolve_weak_handle_in_c2) - virtual void try_resolve_weak_handle(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path); + // See AS_NO_KEEPALIVE for peek semantics + // weak_handle and obj may alias + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path); virtual void barrier_stubs_init() {} diff --git a/src/hotspot/cpu/ppc/gc/shenandoah/c1/shenandoahBarrierSetC1_ppc.cpp b/src/hotspot/cpu/ppc/gc/shenandoah/c1/shenandoahBarrierSetC1_ppc.cpp deleted file mode 100644 index 5b24259103f..00000000000 --- a/src/hotspot/cpu/ppc/gc/shenandoah/c1/shenandoahBarrierSetC1_ppc.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2018, 2023, Red Hat, Inc. All rights reserved. - * Copyright (c) 2012, 2023 SAP SE. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "asm/macroAssembler.inline.hpp" -#include "c1/c1_LIRAssembler.hpp" -#include "c1/c1_MacroAssembler.hpp" -#include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp" -#include "gc/shenandoah/shenandoahBarrierSet.hpp" -#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp" - -#define __ masm->masm()-> - -void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler *masm) { - __ block_comment("LIR_OpShenandoahCompareAndSwap (shenandaohgc) {"); - - Register addr = _addr->as_register_lo(); - Register new_val = _new_value->as_register(); - Register cmp_val = _cmp_value->as_register(); - Register tmp1 = _tmp1->as_register(); - Register tmp2 = _tmp2->as_register(); - Register result = result_opr()->as_register(); - - if (UseCompressedOops) { - __ encode_heap_oop(cmp_val, cmp_val); - __ encode_heap_oop(new_val, new_val); - } - - // There might be a volatile load before this Unsafe CAS. - if (support_IRIW_for_not_multiple_copy_atomic_cpu) { - __ sync(); - } else { - __ lwsync(); - } - - ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmp_val, new_val, tmp1, tmp2, - false, result); - - if (UseCompressedOops) { - __ decode_heap_oop(cmp_val); - __ decode_heap_oop(new_val); - } - - if (support_IRIW_for_not_multiple_copy_atomic_cpu) { - __ isync(); - } else { - __ sync(); - } - - __ block_comment("} LIR_OpShenandoahCompareAndSwap (shenandaohgc)"); -} - -#undef __ - -#ifdef ASSERT -#define __ gen->lir(__FILE__, __LINE__)-> -#else -#define __ gen->lir()-> -#endif - -LIR_Opr ShenandoahBarrierSetC1::atomic_cmpxchg_at_resolved(LIRAccess &access, LIRItem &cmp_value, LIRItem &new_value) { - BasicType bt = access.type(); - - if (access.is_oop()) { - LIRGenerator* gen = access.gen(); - - if (ShenandoahSATBBarrier) { - pre_barrier(gen, access.access_emit_info(), access.decorators(), access.resolved_addr(), - LIR_OprFact::illegalOpr); - } - - if (ShenandoahCASBarrier) { - cmp_value.load_item(); - new_value.load_item(); - - LIR_Opr t1 = gen->new_register(T_OBJECT); - LIR_Opr t2 = gen->new_register(T_OBJECT); - LIR_Opr addr = access.resolved_addr()->as_address_ptr()->base(); - LIR_Opr result = gen->new_register(T_INT); - - __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, result)); - - if (ShenandoahCardBarrier) { - post_barrier(access, access.resolved_addr(), new_value.result()); - } - - return result; - } - } - - return BarrierSetC1::atomic_cmpxchg_at_resolved(access, cmp_value, new_value); -} - -LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess &access, LIRItem &value) { - LIRGenerator* gen = access.gen(); - BasicType type = access.type(); - - LIR_Opr result = gen->new_register(type); - value.load_item(); - LIR_Opr value_opr = value.result(); - - assert(type == T_INT || is_reference_type(type) LP64_ONLY( || type == T_LONG ), "unexpected type"); - LIR_Opr tmp_xchg = gen->new_register(T_INT); - __ xchg(access.resolved_addr(), value_opr, result, tmp_xchg); - - if (access.is_oop()) { - result = load_reference_barrier_impl(access.gen(), result, LIR_OprFact::addressConst(0), - access.decorators()); - - LIR_Opr tmp_barrier = gen->new_register(type); - __ move(result, tmp_barrier); - result = tmp_barrier; - - if (ShenandoahSATBBarrier) { - pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr, result); - } - - if (ShenandoahCardBarrier) { - post_barrier(access, access.resolved_addr(), result); - } - } - - return result; -} diff --git a/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp index 8e99d23cc99..82f3bb38012 100644 --- a/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp +++ b/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp @@ -663,16 +663,18 @@ void ShenandoahBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler __ block_comment("} try_resolve_jobject_in_native (shenandoahgc)"); } -void ShenandoahBarrierSetAssembler::try_resolve_weak_handle(MacroAssembler *masm, Register obj, - Register tmp, Label &slow_path) { - __ block_comment("try_resolve_weak_handle (shenandoahgc) {"); +void ShenandoahBarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler *masm, Register weak_handle, + Register obj, Register tmp, Label &slow_path) { + __ block_comment("try_peek_weak_handle_in_nmethod (shenandoahgc) {"); + + assert_different_registers(weak_handle, tmp, noreg); + assert_different_registers(obj, tmp, noreg); - assert_different_registers(obj, tmp); Label done; - // Resolve weak handle using the standard implementation. - BarrierSetAssembler::try_resolve_weak_handle(masm, obj, tmp, slow_path); + // Peek weak handle using the standard implementation. + BarrierSetAssembler::try_peek_weak_handle_in_nmethod(masm, weak_handle, obj, tmp, slow_path); // Check if the reference is null, and if it is, take the fast path. __ cmpdi(CR0, obj, 0); @@ -685,7 +687,7 @@ void ShenandoahBarrierSetAssembler::try_resolve_weak_handle(MacroAssembler *masm __ bne(CR0, slow_path); __ bind(done); - __ block_comment("} try_resolve_weak_handle (shenandoahgc)"); + __ block_comment("} try_peek_weak_handle_in_nmethod (shenandoahgc)"); } // Special shenandoah CAS implementation that handles false negatives due @@ -891,13 +893,11 @@ void ShenandoahBarrierSetAssembler::gen_load_reference_barrier_stub(LIR_Assemble Register tmp2 = stub->tmp2()->as_register(); assert_different_registers(addr, res, tmp1, tmp2); -#ifdef ASSERT - // Ensure that 'res' is 'R3_ARG1' and contains the same value as 'obj' to reduce the number of required - // copy instructions. assert(R3_RET == res, "res must be r3"); - __ cmpd(CR0, res, obj); - __ asm_assert_eq("result register must contain the reference stored in obj"); -#endif + + if (res != obj) { + __ mr(res, obj); + } DecoratorSet decorators = stub->decorators(); @@ -1032,7 +1032,7 @@ void ShenandoahBarrierSetAssembler::generate_c1_load_reference_barrier_runtime_s __ save_volatile_gprs(R1_SP, -nbytes_save, true, false); // Load arguments from stack. - // No load required, as assured by assertions in 'ShenandoahBarrierSetAssembler::gen_load_reference_barrier_stub'. + // No load required, as caller has already loaded obj into R3. Register R3_obj = R3_ARG1; Register R4_load_addr = R4_ARG2; __ ld(R4_load_addr, -8, R1_SP); diff --git a/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.hpp b/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.hpp index 58180c49642..6033fbc54c4 100644 --- a/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.hpp +++ b/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.hpp @@ -123,7 +123,8 @@ public: virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register dst, Register jni_env, Register obj, Register tmp, Label& slowpath); - virtual void try_resolve_weak_handle(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path); + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path); }; #endif // CPU_PPC_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_PPC_HPP diff --git a/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.cpp b/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.cpp index 3e74dfb88cb..5264b284458 100644 --- a/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.cpp +++ b/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.cpp @@ -627,9 +627,13 @@ void ZBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm, R __ block_comment("} try_resolve_jobject_in_native (zgc)"); } -void ZBarrierSetAssembler::try_resolve_weak_handle(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path) { - // Resolve weak handle using the standard implementation. - BarrierSetAssembler::try_resolve_weak_handle(masm, obj, tmp, slow_path); +void ZBarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path) { + assert_different_registers(weak_handle, tmp, noreg); + assert_different_registers(obj, tmp, noreg); + + // Peek weak handle using the standard implementation. + BarrierSetAssembler::try_peek_weak_handle_in_nmethod(masm, weak_handle, obj, tmp, slow_path); // Check if the oop is bad, in which case we need to take the slow path. __ relocate(barrier_Relocation::spec(), ZBarrierRelocationFormatMarkBadMask); diff --git a/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.hpp b/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.hpp index 655184cf6a3..8e4bd209222 100644 --- a/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.hpp +++ b/src/hotspot/cpu/ppc/gc/z/zBarrierSetAssembler_ppc.hpp @@ -72,7 +72,8 @@ public: virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register dst, Register jni_env, Register obj, Register tmp, Label& slowpath); - virtual void try_resolve_weak_handle(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path); + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path); virtual void check_oop(MacroAssembler *masm, Register obj, const char* msg); diff --git a/src/hotspot/cpu/ppc/globals_ppc.hpp b/src/hotspot/cpu/ppc/globals_ppc.hpp index 927a8cc2be3..d46bb733ea7 100644 --- a/src/hotspot/cpu/ppc/globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/globals_ppc.hpp @@ -116,7 +116,8 @@ define_pd_global(intx, InitArrayShortSize, 9*BytesPerLong); \ /* special instructions */ \ product(bool, SuperwordUseVSX, false, \ - "Use VSX instructions for superword optimization.") \ + "Use VSX instructions for superword optimization " \ + "(default for Power9 and later).") \ \ product(bool, UseByteReverseInstructions, false, DIAGNOSTIC, \ "Use byte reverse instructions.") \ diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp index 5fbcce94029..24c314b8be3 100644 --- a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp +++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp @@ -799,13 +799,7 @@ void MacroAssembler::save_nonvolatile_registers(Register dst, int offset, bool i } } else { for (int i = 20; i < 32; i++) { - if (PowerArchitecturePPC64 >= 9) { - stxv(as_VectorRegister(i)->to_vsr(), offset, dst); - } else { - Register spill_addr = R0; - addi(spill_addr, dst, offset); - stxvd2x(as_VectorRegister(i)->to_vsr(), spill_addr); - } + stxv(as_VectorRegister(i)->to_vsr(), offset, dst); offset += 16; } } @@ -838,13 +832,7 @@ void MacroAssembler::restore_nonvolatile_registers(Register src, int offset, boo } } else { for (int i = 20; i < 32; i++) { - if (PowerArchitecturePPC64 >= 9) { - lxv(as_VectorRegister(i)->to_vsr(), offset, src); - } else { - Register spill_addr = R0; - addi(spill_addr, src, offset); - lxvd2x(as_VectorRegister(i)->to_vsr(), spill_addr); - } + lxv(as_VectorRegister(i)->to_vsr(), offset, src); offset += 16; } } @@ -2800,7 +2788,7 @@ void MacroAssembler::compiler_fast_lock_object(ConditionRegister flag, Register // Check if object matches. ld(tmp3, in_bytes(ObjectMonitor::object_offset()), monitor); BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler(); - bs_asm->try_resolve_weak_handle(this, tmp3, tmp2, slow_path); + bs_asm->try_peek_weak_handle_in_nmethod(this, tmp3, tmp3, tmp2, slow_path); cmpd(CR0, tmp3, obj); bne(CR0, slow_path); @@ -3214,7 +3202,7 @@ void MacroAssembler::store_klass_gap(Register dst_oop, Register val) { stw(val, oopDesc::klass_gap_offset_in_bytes(), dst_oop); } -int MacroAssembler::instr_size_for_decode_klass_not_null() { +int MacroAssembler::instr_size_for_load_klass() { static int computed_size = -1; // Not yet computed? @@ -3222,10 +3210,10 @@ int MacroAssembler::instr_size_for_decode_klass_not_null() { // Determine by scratch emit. ResourceMark rm; - int code_size = 8 * BytesPerInstWord; - CodeBuffer cb("decode_klass_not_null scratch buffer", code_size, 0); + int code_size = 16 * BytesPerInstWord; + CodeBuffer cb("load_klass scratch buffer", code_size, 0); MacroAssembler* a = new MacroAssembler(&cb); - a->decode_klass_not_null(R11_scratch1); + a->load_klass(R11_scratch1, R11_scratch1); computed_size = a->offset(); } diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp index 4be62098bdf..b2f5e8f0b60 100644 --- a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp +++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp @@ -802,7 +802,7 @@ class MacroAssembler: public Assembler { MacroAssembler::PreservationLevel preservation_level); void load_method_holder(Register holder, Register method); - static int instr_size_for_decode_klass_not_null(); + static int instr_size_for_load_klass(); void decode_klass_not_null(Register dst, Register src = noreg); Register encode_klass_not_null(Register dst, Register src = noreg); diff --git a/src/hotspot/cpu/ppc/matcher_ppc.hpp b/src/hotspot/cpu/ppc/matcher_ppc.hpp index cbe882648b8..a3ab382564c 100644 --- a/src/hotspot/cpu/ppc/matcher_ppc.hpp +++ b/src/hotspot/cpu/ppc/matcher_ppc.hpp @@ -38,10 +38,10 @@ return false; } - // The PPC implementation uses VSX lxvd2x/stxvd2x instructions (if + // The PPC implementation uses VSX lxv/stxv instructions (if // SuperwordUseVSX). They do not have alignment requirements. // Some VSX storage access instructions cannot encode arbitrary displacements - // (e.g. lxv). None of them is currently used. + // (e.g. lxv). We use memoryAlg16 for them. static constexpr bool misaligned_vectors_ok() { return true; } @@ -54,7 +54,7 @@ // PowerPC requires masked shift counts. static const bool need_masked_shift_count = true; - // Power6 requires postalloc expand (see block.cpp for description of postalloc expand). + // PPC64 requires postalloc expand (see block.cpp for description of postalloc expand). static const bool require_postalloc_expand = true; // No support for generic vector operands. @@ -157,7 +157,7 @@ // true means we have fast l2f conversion static constexpr bool convL2FSupported(void) { - // fcfids can do the conversion (>= Power7). + // fcfids can do the conversion. // fcfid + frsp showed rounding problem when result should be 0x3f800001. return true; } diff --git a/src/hotspot/cpu/ppc/ppc.ad b/src/hotspot/cpu/ppc/ppc.ad index f3d33b4305d..00549ac8508 100644 --- a/src/hotspot/cpu/ppc/ppc.ad +++ b/src/hotspot/cpu/ppc/ppc.ad @@ -1187,7 +1187,7 @@ int MachCallDynamicJavaNode::ret_addr_offset() { assert(vtable_index == Method::invalid_vtable_index, "correct sentinel value"); return 12; } else { - return 24 + MacroAssembler::instr_size_for_decode_klass_not_null(); + return 20 + MacroAssembler::instr_size_for_load_klass(); } } @@ -1818,52 +1818,26 @@ uint MachSpillCopyNode::implementation(C2_MacroAssembler *masm, PhaseRegAlloc *r // VectorRegister->Memory Spill. else if (src_lo_rc == rc_vec && dst_lo_rc == rc_stack) { VectorSRegister Rsrc = as_VectorRegister(Matcher::_regEncode[src_lo]).to_vsr(); - if (PowerArchitecturePPC64 >= 9) { - if (masm) { - __ stxv(Rsrc, dst_offset, R1_SP); // matches storeV16_Power9 - } - size += 4; - } else { - if (masm) { - __ addi(R0, R1_SP, dst_offset); - __ stxvd2x(Rsrc, R0); // matches storeV16_Power8 - } - size += 8; + if (masm) { + __ stxv(Rsrc, dst_offset, R1_SP); // matches storeV16 } + size += 4; #ifndef PRODUCT if (st != nullptr) { - if (PowerArchitecturePPC64 >= 9) { - st->print("%-7s %s, [R1_SP + #%d] \t// vector spill copy", "STXV", Matcher::regName[src_lo], dst_offset); - } else { - st->print("%-7s R0, R1_SP, %d \t// vector spill copy\n\t" - "%-7s %s, [R0] \t// vector spill copy", "ADDI", dst_offset, "STXVD2X", Matcher::regName[src_lo]); - } + st->print("%-7s %s, [R1_SP + #%d] \t// vector spill copy", "STXV", Matcher::regName[src_lo], dst_offset); } #endif // !PRODUCT } // Memory->VectorRegister Spill. else if (src_lo_rc == rc_stack && dst_lo_rc == rc_vec) { VectorSRegister Rdst = as_VectorRegister(Matcher::_regEncode[dst_lo]).to_vsr(); - if (PowerArchitecturePPC64 >= 9) { - if (masm) { - __ lxv(Rdst, src_offset, R1_SP); - } - size += 4; - } else { - if (masm) { - __ addi(R0, R1_SP, src_offset); - __ lxvd2x(Rdst, R0); - } - size += 8; + if (masm) { + __ lxv(Rdst, src_offset, R1_SP); } + size += 4; #ifndef PRODUCT if (st != nullptr) { - if (PowerArchitecturePPC64 >= 9) { - st->print("%-7s %s, [R1_SP + #%d] \t// vector spill copy", "LXV", Matcher::regName[dst_lo], src_offset); - } else { - st->print("%-7s R0, R1_SP, %d \t// vector spill copy\n\t" - "%-7s %s, [R0] \t// vector spill copy", "ADDI", src_offset, "LXVD2X", Matcher::regName[dst_lo]); - } + st->print("%-7s %s, [R1_SP + #%d] \t// vector spill copy", "LXV", Matcher::regName[dst_lo], src_offset); } #endif // !PRODUCT } @@ -2284,7 +2258,7 @@ bool Matcher::match_rule_supported_vector(int opcode, int vlen, BasicType bt) { case Op_UMaxV: return bt == T_INT || bt == T_LONG; case Op_NegVI: - return PowerArchitecturePPC64 >= 9 && bt == T_INT; + return bt == T_INT; } return true; // Per default match rules are supported. } @@ -2322,10 +2296,12 @@ OptoRegPair Matcher::vector_return_value(uint ideal_reg) { // Vector width in bytes. int Matcher::vector_width_in_bytes(BasicType bt) { if (SuperwordUseVSX) { - assert(MaxVectorSize == 16, ""); + assert(MaxVectorSize == 16, + "SuperwordUseVSX requires MaxVectorSize 16, got " INT64_FORMAT, (int64_t)MaxVectorSize); return 16; } else { - assert(MaxVectorSize == 8, ""); + assert(MaxVectorSize == 8, + "expected MaxVectorSize 8, got " INT64_FORMAT, (int64_t)MaxVectorSize); return 8; } } @@ -2333,10 +2309,14 @@ int Matcher::vector_width_in_bytes(BasicType bt) { // Vector ideal reg. uint Matcher::vector_ideal_reg(int size) { if (SuperwordUseVSX) { - assert(MaxVectorSize == 16 && size == 16, ""); + assert(MaxVectorSize == 16 && size == 16, + "SuperwordUseVSX requires MaxVectorSize 16 and size 16, got MaxVectorSize=" INT64_FORMAT ", size=%d", + (int64_t)MaxVectorSize, size); return Op_VecX; } else { - assert(MaxVectorSize == 8 && size == 8, ""); + assert(MaxVectorSize == 8 && size == 8, + "expected MaxVectorSize 8 and size 8, got MaxVectorSize=" INT64_FORMAT ", size=%d", + (int64_t)MaxVectorSize, size); return Op_RegL; } } @@ -5413,23 +5393,9 @@ instruct loadV8(iRegLdst dst, memoryAlg4 mem) %{ ins_pipe(pipe_class_memory); %} -// Load Aligned Packed Byte -// Note: The Power8 instruction loads the contents in a special order in Little Endian mode. -instruct loadV16_Power8(vecX dst, indirect mem) %{ - predicate(n->as_LoadVector()->memory_size() == 16 && PowerArchitecturePPC64 == 8); - match(Set dst (LoadVector mem)); - ins_cost(MEMORY_REF_COST); - format %{ "LXVD2X $dst, $mem \t// load 16-byte Vector" %} - size(4); - ins_encode %{ - __ lxvd2x($dst$$VectorRegister.to_vsr(), $mem$$Register); - %} - ins_pipe(pipe_class_default); -%} - -instruct loadV16_Power9(vecX dst, memoryAlg16 mem) %{ - predicate(n->as_LoadVector()->memory_size() == 16 && PowerArchitecturePPC64 >= 9); +instruct loadV16(vecX dst, memoryAlg16 mem) %{ + predicate(n->as_LoadVector()->memory_size() == 16); match(Set dst (LoadVector mem)); ins_cost(MEMORY_REF_COST); @@ -6424,23 +6390,9 @@ instruct storeA8B(memoryAlg4 mem, iRegLsrc src) %{ ins_pipe(pipe_class_memory); %} -// Store Packed Byte long register to memory -// Note: The Power8 instruction stores the contents in a special order in Little Endian mode. -instruct storeV16_Power8(indirect mem, vecX src) %{ - predicate(n->as_StoreVector()->memory_size() == 16 && PowerArchitecturePPC64 == 8); - match(Set mem (StoreVector mem src)); - ins_cost(MEMORY_REF_COST); - format %{ "STXVD2X $mem, $src \t// store 16-byte Vector" %} - size(4); - ins_encode %{ - __ stxvd2x($src$$VectorRegister.to_vsr(), $mem$$Register); - %} - ins_pipe(pipe_class_default); -%} - -instruct storeV16_Power9(memoryAlg16 mem, vecX src) %{ - predicate(n->as_StoreVector()->memory_size() == 16 && PowerArchitecturePPC64 >= 9); +instruct storeV16(memoryAlg16 mem, vecX src) %{ + predicate(n->as_StoreVector()->memory_size() == 16); match(Set mem (StoreVector mem src)); ins_cost(MEMORY_REF_COST); @@ -12480,6 +12432,19 @@ instruct countTrailingZerosL_cnttzd(iRegIdst dst, iRegLsrc src) %{ 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 n, immI16 b) %{ effect(DEF dst, USE src, USE n, USE b); @@ -12636,34 +12601,22 @@ instruct bytes_reverse_long(iRegLdst dst, iRegLsrc src) %{ 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); + rlwinm(dst, src, imm24, imm24, imm31); insrwi(dst, src, imm8, imm16); %} %} -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); - %} - ins_pipe(pipe_class_default); -%} - instruct bytes_reverse_short_Ex(iRegIdst dst, iRegIsrc src) %{ match(Set dst (ReverseBytesS src)); predicate(!UseByteReverseInstructions); @@ -13656,7 +13609,7 @@ instruct vneg2D_reg(vecX dst, vecX src) %{ instruct vneg4I_reg(vecX dst, vecX src) %{ match(Set dst (NegVI src)); - predicate(PowerArchitecturePPC64 >= 9 && Matcher::vector_element_basic_type(n) == T_INT); + predicate(Matcher::vector_element_basic_type(n) == T_INT); format %{ "VNEGW $dst,$src\t// negate int vector" %} size(4); ins_encode %{ diff --git a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp index 53644210415..54336e9f62b 100644 --- a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp +++ b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp @@ -360,7 +360,7 @@ OopMap* RegisterSaver::push_frame_reg_args_and_save_live_registers(MacroAssemble assert(RegisterSaver_LiveVecRegs[i + 1].reg_num == reg_num + 1, "or use other instructions!"); __ stxvp(as_VectorRegister(reg_num).to_vsr(), offset, R1_SP); - // Note: The contents were read in the same order (see loadV16_Power9 node in ppc.ad). + // Note: The contents were read in the same order (see loadV16 node in ppc.ad). // RegisterMap::pd_location only uses the first VMReg for each VectorRegister. if (generate_oop_map) { map->set_callee_saved(VMRegImpl::stack2reg(offset >> 2), @@ -374,13 +374,8 @@ OopMap* RegisterSaver::push_frame_reg_args_and_save_live_registers(MacroAssemble for (int i = 0; i < vecregstosave_num; i++) { int reg_num = RegisterSaver_LiveVecRegs[i].reg_num; - if (PowerArchitecturePPC64 >= 9) { - __ stxv(as_VectorRegister(reg_num)->to_vsr(), offset, R1_SP); - } else { - __ li(R31, offset); - __ stxvd2x(as_VectorRegister(reg_num)->to_vsr(), R31, R1_SP); - } - // Note: The contents were read in the same order (see loadV16_Power8 / loadV16_Power9 node in ppc.ad). + __ stxv(as_VectorRegister(reg_num)->to_vsr(), offset, R1_SP); + // Note: The contents were read in the same order (see loadV16 node in ppc.ad). // RegisterMap::pd_location only uses the first VMReg for each VectorRegister. if (generate_oop_map) { VMReg vsr = RegisterSaver_LiveVecRegs[i].vmreg; @@ -464,12 +459,7 @@ void RegisterSaver::restore_live_registers_and_pop_frame(MacroAssembler* masm, for (int i = 0; i < vecregstosave_num; i++) { int reg_num = RegisterSaver_LiveVecRegs[i].reg_num; - if (PowerArchitecturePPC64 >= 9) { - __ lxv(as_VectorRegister(reg_num).to_vsr(), offset, R1_SP); - } else { - __ li(R31, offset); - __ lxvd2x(as_VectorRegister(reg_num).to_vsr(), R31, R1_SP); - } + __ lxv(as_VectorRegister(reg_num).to_vsr(), offset, R1_SP); offset += vec_reg_size; } diff --git a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp index 37f780535b4..252425fb104 100644 --- a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp +++ b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp @@ -3852,13 +3852,6 @@ void TemplateTable::_new() { __ store_klass(RallocatedObject, RinstanceKlass, Rscratch); } - // Check and trigger dtrace event. - if (DTraceAllocProbes) { - __ push(atos); - __ call_VM_leaf(CAST_FROM_FN_PTR(address, static_cast(SharedRuntime::dtrace_object_alloc))); - __ pop(atos); - } - __ b(Ldone); } diff --git a/src/hotspot/cpu/ppc/vm_version_ppc.cpp b/src/hotspot/cpu/ppc/vm_version_ppc.cpp index 3e3b1103c86..be05ec1dfb3 100644 --- a/src/hotspot/cpu/ppc/vm_version_ppc.cpp +++ b/src/hotspot/cpu/ppc/vm_version_ppc.cpp @@ -109,6 +109,9 @@ void VM_Version::initialize() { if (FLAG_IS_DEFAULT(SuperwordUseVSX) && CompilerConfig::is_c2_enabled()) { FLAG_SET_ERGO(SuperwordUseVSX, true); } + } else if (SuperwordUseVSX) { + warning("SuperwordUseVSX specified, but needs at least Power9."); + FLAG_SET_DEFAULT(SuperwordUseVSX, false); } MaxVectorSize = SuperwordUseVSX ? 16 : 8; diff --git a/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp b/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp index f290708a231..5e0deb84a14 100644 --- a/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp +++ b/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp @@ -1169,4 +1169,5 @@ void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address, void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, CodeEmitInfo* info) { __ volatile_load_mem_reg(address, result, info); + __ membar_acquire(); } diff --git a/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp index 0d06fd469de..8d383f07c9a 100644 --- a/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp +++ b/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp @@ -167,7 +167,7 @@ void C2_MacroAssembler::fast_lock(Register obj, Register box, // Check if object matches. ld(tmp3, Address(tmp1_monitor, ObjectMonitor::object_offset())); BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler(); - bs_asm->try_resolve_weak_handle_in_c2(this, tmp3, tmp2, slow_path); + bs_asm->try_peek_weak_handle_in_nmethod(this, tmp3, tmp3, tmp2, slow_path); bne(tmp3, obj, slow_path); bind(monitor_found); @@ -3069,12 +3069,12 @@ void C2_MacroAssembler::reduce_mul_integral_v(Register dst, Register src1, Vecto // If the operation is MUL, then the identity value is one. vmv_v_i(vtmp1, 1); vmerge_vvm(vtmp2, vtmp1, src2); // vm == v0 - vslidedown_vi(vtmp1, vtmp2, vector_length); + slidedown_v(vtmp1, vtmp2, vector_length); vsetvli_helper(bt, vector_length); vmul_vv(vtmp1, vtmp1, vtmp2); } else { - vslidedown_vi(vtmp1, src2, vector_length); + slidedown_v(vtmp1, src2, vector_length); vsetvli_helper(bt, vector_length); vmul_vv(vtmp1, vtmp1, src2); @@ -3082,7 +3082,7 @@ void C2_MacroAssembler::reduce_mul_integral_v(Register dst, Register src1, Vecto while (vector_length > 1) { vector_length /= 2; - vslidedown_vi(vtmp2, vtmp1, vector_length); + slidedown_v(vtmp2, vtmp1, vector_length); vsetvli_helper(bt, vector_length); vmul_vv(vtmp1, vtmp1, vtmp2); } @@ -3281,40 +3281,44 @@ VFCVT_SAFE(vfcvt_rtz_x_f_v); // Extract a scalar element from an vector at position 'idx'. // The input elements in src are expected to be of integral type. -void C2_MacroAssembler::extract_v(Register dst, VectorRegister src, BasicType bt, - int idx, VectorRegister tmp) { +void C2_MacroAssembler::extract_v(Register dst, VectorRegister src, + BasicType bt, int idx, VectorRegister vtmp) { assert(is_integral_type(bt), "unsupported element type"); assert(idx >= 0, "idx cannot be negative"); // Only need the first element after vector slidedown vsetvli_helper(bt, 1); if (idx == 0) { vmv_x_s(dst, src); - } else if (idx <= 31) { - vslidedown_vi(tmp, src, idx); - vmv_x_s(dst, tmp); } else { - mv(t0, idx); - vslidedown_vx(tmp, src, t0); - vmv_x_s(dst, tmp); + slidedown_v(vtmp, src, idx); + vmv_x_s(dst, vtmp); } } // Extract a scalar element from an vector at position 'idx'. // The input elements in src are expected to be of floating point type. -void C2_MacroAssembler::extract_fp_v(FloatRegister dst, VectorRegister src, BasicType bt, - int idx, VectorRegister tmp) { +void C2_MacroAssembler::extract_fp_v(FloatRegister dst, VectorRegister src, + BasicType bt, int idx, VectorRegister vtmp) { assert(is_floating_point_type(bt), "unsupported element type"); assert(idx >= 0, "idx cannot be negative"); // Only need the first element after vector slidedown vsetvli_helper(bt, 1); if (idx == 0) { vfmv_f_s(dst, src); - } else if (idx <= 31) { - vslidedown_vi(tmp, src, idx); - vfmv_f_s(dst, tmp); } else { - mv(t0, idx); - vslidedown_vx(tmp, src, t0); - vfmv_f_s(dst, tmp); + slidedown_v(vtmp, src, idx); + vfmv_f_s(dst, vtmp); + } +} + +// Move elements down a vector register group. +// Offset is the start index (offset) for the source. +void C2_MacroAssembler::slidedown_v(VectorRegister dst, VectorRegister src, + uint32_t offset, Register tmp) { + if (is_uimm5(offset)) { + vslidedown_vi(dst, src, offset); + } else { + mv(tmp, offset); + vslidedown_vx(dst, src, tmp); } } diff --git a/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.hpp b/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.hpp index fa87ceba295..468d53b1a54 100644 --- a/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.hpp +++ b/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.hpp @@ -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. * Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -296,7 +296,13 @@ void vfcvt_rtz_x_f_v_safe(VectorRegister dst, VectorRegister src); - void extract_v(Register dst, VectorRegister src, BasicType bt, int idx, VectorRegister tmp); - void extract_fp_v(FloatRegister dst, VectorRegister src, BasicType bt, int idx, VectorRegister tmp); + void extract_v(Register dst, VectorRegister src, + BasicType bt, int idx, VectorRegister vtmp); + + void extract_fp_v(FloatRegister dst, VectorRegister src, + BasicType bt, int idx, VectorRegister vtmp); + + void slidedown_v(VectorRegister dst, VectorRegister src, + uint32_t offset, Register tmp = t0); #endif // CPU_RISCV_C2_MACROASSEMBLER_RISCV_HPP diff --git a/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp b/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp index aeb9df06de6..fd78b429ee4 100644 --- a/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp +++ b/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp @@ -228,7 +228,7 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slo BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod(); Assembler::IncompressibleScope scope(masm); // Fixed length: see entry_barrier_offset() - Label local_guard; + Label local_guard, skip_barrier; NMethodPatchingType patching_type = nmethod_patching_type(); if (slow_path == nullptr) { @@ -290,24 +290,26 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slo ShouldNotReachHere(); } + Label& barrier_target = slow_path == nullptr ? skip_barrier : *slow_path; if (slow_path == nullptr) { - Label skip_barrier; - __ beq(t0, t1, skip_barrier); + __ beq(t0, t1, barrier_target, true /* is_far */); + } else { + __ bne(t0, t1, barrier_target, true /* is_far */); + } + if (slow_path == nullptr) { __ rt_call(StubRoutines::method_entry_barrier()); - __ j(skip_barrier); __ bind(local_guard); MacroAssembler::assert_alignment(__ pc()); __ emit_int32(0); // nmethod guard value. Skipped over in common case. - __ bind(skip_barrier); } else { - __ beq(t0, t1, *continuation); - __ j(*slow_path); __ bind(*continuation); } + + __ bind(skip_barrier); } void BarrierSetAssembler::c2i_entry_barrier(MacroAssembler* masm) { @@ -354,6 +356,12 @@ void BarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register __ beqz(obj, error); // if klass is null it is broken } +void BarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path) { + // Load the oop from the weak handle without barriers. + __ ld(obj, Address(weak_handle)); +} + #ifdef COMPILER2 OptoReg::Name BarrierSetAssembler::refine_register(const Node* node, OptoReg::Name opto_reg) { @@ -368,12 +376,6 @@ OptoReg::Name BarrierSetAssembler::refine_register(const Node* node, OptoReg::Na return opto_reg; } - -void BarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path) { - // Load the oop from the weak handle. - __ ld(obj, Address(obj)); -} - #undef __ #define __ _masm-> diff --git a/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.hpp b/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.hpp index bbb2a5af824..4a14fa65e78 100644 --- a/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.hpp +++ b/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.hpp @@ -107,11 +107,14 @@ public: static void clear_patching_epoch(); static void increment_patching_epoch(); + // See AS_NO_KEEPALIVE for peek semantics + // weak_handle and obj may alias + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path); + #ifdef COMPILER2 OptoReg::Name refine_register(const Node* node, OptoReg::Name opto_reg); - virtual void try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, - Register tmp, Label& slow_path); #endif // COMPILER2 }; diff --git a/src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp b/src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp index 5003b9584a3..9b318dbe579 100644 --- a/src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp +++ b/src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp @@ -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. * Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -41,17 +41,16 @@ static int slow_path_size(nmethod* nm) { // The slow path code is out of line with C2. - // Leave a jal to the stub in the fast path. - return nm->is_compiled_by_c2() ? 1 : 8; + return nm->is_compiled_by_c2() ? 0 : 4; } static int entry_barrier_offset(nmethod* nm) { BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler(); switch (bs_asm->nmethod_patching_type()) { case NMethodPatchingType::stw_instruction_and_data_patch: - return -4 * (4 + slow_path_size(nm)); + return -4 * (5 + slow_path_size(nm)); case NMethodPatchingType::conc_instruction_and_data_patch: - return -4 * (15 + slow_path_size(nm)); + return -4 * ((UseZtso ? 14 : 16) + slow_path_size(nm)); } ShouldNotReachHere(); return 0; @@ -103,6 +102,10 @@ public: } _guard_addr = reinterpret_cast(instruction_address() + local_guard_offset(nm)); } + + // Perform the checking as verification. + err_msg msg("%s", ""); + assert(check_barrier(msg), "%s", msg.buffer()); } int get_value() { @@ -128,10 +131,6 @@ public: } bool check_barrier(err_msg& msg) const; - void verify() const { - err_msg msg("%s", ""); - assert(check_barrier(msg), "%s", msg.buffer()); - } }; // Store the instruction bitmask, bits and name for checking the barrier. @@ -142,8 +141,8 @@ struct CheckInsn { }; static const struct CheckInsn barrierInsn[] = { - { 0x00000fff, 0x00000297, "auipc t0, 0 "}, - { 0x000fffff, 0x0002e283, "lwu t0, guard_offset(t0) "}, + { 0x00000fff, 0x00000297, "auipc t0, 0 " }, + { 0x000fffff, 0x0002e283, "lwu t0, guard_offset(t0)" }, /* ...... */ /* ...... */ /* guard: */ @@ -155,10 +154,11 @@ static const struct CheckInsn barrierInsn[] = { // register numbers and immediate values in the encoding. bool NativeNMethodBarrier::check_barrier(err_msg& msg) const { address addr = instruction_address(); - for(unsigned int i = 0; i < sizeof(barrierInsn)/sizeof(struct CheckInsn); i++ ) { + for (unsigned int i = 0; i < sizeof(barrierInsn) / sizeof(struct CheckInsn); i++) { uint32_t inst = Assembler::ld_instr(addr); if ((inst & barrierInsn[i].mask) != barrierInsn[i].bits) { - msg.print("Addr: " INTPTR_FORMAT " Code: 0x%x not an %s instruction", p2i(addr), inst, barrierInsn[i].name); + msg.print("Nmethod entry barrier did not start with auipc & lwu as expected. " + "Addr: " INTPTR_FORMAT " Code: 0x%x not an %s instruction.", p2i(addr), inst, barrierInsn[i].name); return false; } addr += 4; diff --git a/src/hotspot/cpu/riscv/gc/shenandoah/c1/shenandoahBarrierSetC1_riscv.cpp b/src/hotspot/cpu/riscv/gc/shenandoah/c1/shenandoahBarrierSetC1_riscv.cpp deleted file mode 100644 index 11c4e5dc81b..00000000000 --- a/src/hotspot/cpu/riscv/gc/shenandoah/c1/shenandoahBarrierSetC1_riscv.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved. - * Copyright (c) 2020, 2021, Huawei Technologies Co., Ltd. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please 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 "c1/c1_LIRAssembler.hpp" -#include "c1/c1_MacroAssembler.hpp" -#include "gc/shared/gc_globals.hpp" -#include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp" -#include "gc/shenandoah/shenandoahBarrierSet.hpp" -#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp" - -#define __ masm->masm()-> - -void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) { - Register addr = _addr->as_register_lo(); - Register newval = _new_value->as_register(); - Register cmpval = _cmp_value->as_register(); - Register tmp1 = _tmp1->as_register(); - Register tmp2 = _tmp2->as_register(); - Register result = result_opr()->as_register(); - - if (UseCompressedOops) { - __ encode_heap_oop(tmp1, cmpval); - cmpval = tmp1; - __ encode_heap_oop(tmp2, newval); - newval = tmp2; - } - - ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /* acquire */ Assembler::aq, - /* release */ Assembler::rl, /* is_cae */ false, result); -} - -#undef __ - -#ifdef ASSERT -#define __ gen->lir(__FILE__, __LINE__)-> -#else -#define __ gen->lir()-> -#endif - -LIR_Opr ShenandoahBarrierSetC1::atomic_cmpxchg_at_resolved(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value) { - BasicType bt = access.type(); - if (access.is_oop()) { - LIRGenerator *gen = access.gen(); - if (ShenandoahSATBBarrier) { - pre_barrier(gen, access.access_emit_info(), access.decorators(), access.resolved_addr(), - LIR_OprFact::illegalOpr /* pre_val */); - } - if (ShenandoahCASBarrier) { - cmp_value.load_item(); - new_value.load_item(); - - LIR_Opr tmp1 = gen->new_register(T_OBJECT); - LIR_Opr tmp2 = gen->new_register(T_OBJECT); - LIR_Opr addr = access.resolved_addr()->as_address_ptr()->base(); - LIR_Opr result = gen->new_register(T_INT); - - __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), tmp1, tmp2, result)); - - if (ShenandoahCardBarrier) { - post_barrier(access, access.resolved_addr(), new_value.result()); - } - return result; - } - } - - return BarrierSetC1::atomic_cmpxchg_at_resolved(access, cmp_value, new_value); -} - -LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value) { - LIRGenerator* gen = access.gen(); - BasicType type = access.type(); - - LIR_Opr result = gen->new_register(type); - value.load_item(); - LIR_Opr value_opr = value.result(); - - assert(type == T_INT || is_reference_type(type) LP64_ONLY( || type == T_LONG ), "unexpected type"); - LIR_Opr tmp = gen->new_register(T_INT); - __ xchg(access.resolved_addr(), value_opr, result, tmp); - - if (access.is_oop()) { - result = load_reference_barrier(access.gen(), result, LIR_OprFact::addressConst(0), access.decorators()); - LIR_Opr tmp_opr = gen->new_register(type); - __ move(result, tmp_opr); - result = tmp_opr; - if (ShenandoahSATBBarrier) { - pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr, - result /* pre_val */); - } - if (ShenandoahCardBarrier) { - post_barrier(access, access.resolved_addr(), result); - } - } - - return result; -} diff --git a/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp b/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp index 8d530d15ee5..156c6b9e5a8 100644 --- a/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp +++ b/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp @@ -60,6 +60,8 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec Address gc_state(xthread, in_bytes(ShenandoahThreadLocalData::gc_state_offset())); assert_different_registers(src, dst, count, t0); + assert(!saved_regs.contains(t0), "Sanity: about to clobber t0"); + __ lbu(t0, gc_state); if (ShenandoahSATBBarrier && dest_uninitialized) { __ test_bit(t0, t0, ShenandoahHeap::HAS_FORWARDED_BITPOS); @@ -69,14 +71,26 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec __ beqz(t0, done); } - __ push_reg(saved_regs, sp); - if (UseCompressedOops) { - __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_narrow_oop), - src, dst, count); - } else { - __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_oop), src, dst, count); + __ push_call_clobbered_registers(); + // If arguments are not in proper places, shuffle them. + // Doing this via the stack is the most straight-forward way to avoid + // accidentally smashing any register. + if (c_rarg0 != src || c_rarg1 != dst || c_rarg2 != count) { + __ push_reg(RegSet::of(src), sp); + __ push_reg(RegSet::of(dst), sp); + __ push_reg(RegSet::of(count), sp); + __ pop_reg(RegSet::of(c_rarg2), sp); + __ pop_reg(RegSet::of(c_rarg1), sp); + __ pop_reg(RegSet::of(c_rarg0), sp); } - __ pop_reg(saved_regs, sp); + address target = nullptr; + if (UseCompressedOops) { + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_narrow_oop); + } else { + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_oop); + } + __ call_VM_leaf(target, 3); + __ pop_call_clobbered_registers(); __ bind(done); } } @@ -94,14 +108,8 @@ void ShenandoahBarrierSetAssembler::satb_barrier(MacroAssembler* masm, Register pre_val, Register thread, Register tmp1, - Register tmp2, - bool tosca_live, - bool expand_call) { + Register tmp2) { assert(ShenandoahSATBBarrier, "Should be checked by caller"); - - // If expand_call is true then we expand the call_VM_leaf macro - // directly to skip generating the check by - // InterpreterMacroAssembler::call_VM_leaf_base that checks _last_sp. assert(thread == xthread, "must be"); Label done; @@ -121,7 +129,12 @@ void ShenandoahBarrierSetAssembler::satb_barrier(MacroAssembler* masm, // Do we need to load the previous value? if (obj != noreg) { - __ load_heap_oop(pre_val, Address(obj, 0), noreg, noreg, AS_RAW); + if (UseCompressedOops) { + __ lwu(pre_val, Address(obj, 0)); + __ decode_heap_oop(pre_val); + } else { + __ ld(pre_val, Address(obj, 0)); + } } // Is the previous value null? @@ -142,33 +155,17 @@ void ShenandoahBarrierSetAssembler::satb_barrier(MacroAssembler* masm, __ sd(pre_val, Address(tmp1, 0)); __ j(done); + // Slow-path call. __ bind(runtime); - // save the live input values - RegSet saved = RegSet::of(pre_val); - if (tosca_live) saved += RegSet::of(x10); - if (obj != noreg) saved += RegSet::of(obj); - - __ push_reg(saved, sp); - - // Calling the runtime using the regular call_VM_leaf mechanism generates - // code (generated by InterpreterMacroAssember::call_VM_leaf_base) - // that checks that the *(rfp+frame::interpreter_frame_last_sp) is null. - // - // If we care generating the pre-barrier without a frame (e.g. in the - // intrinsified Reference.get() routine) then ebp might be pointing to - // the caller frame and so this check will most likely fail at runtime. - // - // Expanding the call directly bypasses the generation of the check. - // So when we do not have have a full interpreter frame on the stack - // expand_call should be passed true. - if (expand_call) { - assert(pre_val != c_rarg1, "smashed arg"); - __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_barrier_pre), pre_val); - } else { - __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_barrier_pre), pre_val); + __ enter(); + __ push_call_clobbered_registers(); + if (c_rarg0 != pre_val) { + __ mv(c_rarg0, pre_val); } - - __ pop_reg(saved, sp); + // Calling with super_call_VM_leaf with c_rarg0 bypasses interpreter checks and avoids any moves. + __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_barrier_pre), c_rarg0); + __ pop_call_clobbered_registers(); + __ leave(); __ bind(done); } @@ -235,7 +232,6 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm, bool is_narrow = UseCompressedOops && !is_native; Label heap_stable, not_cset; - __ enter(); Address gc_state(xthread, in_bytes(ShenandoahThreadLocalData::gc_state_offset())); __ lbu(t1, gc_state); @@ -275,6 +271,8 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm, __ beqz(t0, not_cset); } + // Slow-path call + __ enter(); __ push_call_clobbered_registers(); address target = nullptr; if (is_strong) { @@ -292,18 +290,20 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm, } else { assert(is_phantom, "only remaining strength"); assert(!is_narrow, "phantom access cannot be narrow"); - target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom); } - __ rt_call(target); + // Calling with super_call_VM_leaf with c_rarg0/1 bypasses interpreter checks and avoids any moves. + __ super_call_VM_leaf(target, c_rarg0, c_rarg1); __ mv(t0, x10); __ pop_call_clobbered_registers(); __ mv(x10, t0); + __ leave(); + __ bind(not_cset); __ mv(result_dst, x10); __ pop_reg(saved_regs, sp); __ bind(heap_stable); - __ leave(); } // @@ -365,18 +365,12 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, // 3: apply keep-alive barrier if needed if (ShenandoahBarrierSet::need_keep_alive_barrier(decorators, type)) { - __ enter(); - __ push_call_clobbered_registers(); satb_barrier(masm /* masm */, noreg /* obj */, dst /* pre_val */, xthread /* thread */, tmp1 /* tmp1 */, - tmp2 /* tmp2 */, - true /* tosca_live */, - true /* expand_call */); - __ pop_call_clobbered_registers(); - __ leave(); + tmp2 /* tmp2 */); } } @@ -419,8 +413,6 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet __ la(tmp3, dst); } - bool storing_non_null = (val != noreg); - // 2: pre-barrier: SATB needs the previous value if (ShenandoahBarrierSet::need_satb_barrier(decorators, type)) { satb_barrier(masm, @@ -428,15 +420,14 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet tmp2 /* pre_val */, xthread /* thread */, tmp1 /* tmp */, - t0 /* tmp2 */, - storing_non_null /* tosca_live */, - false /* expand_call */); + t0 /* tmp2 */); } // Store! BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), val, noreg, noreg, noreg); // 3: post-barrier: card barrier needs store address + bool storing_non_null = (val != noreg); if (ShenandoahBarrierSet::need_card_barrier(decorators, type) && storing_non_null) { card_barrier(masm, tmp3); } @@ -462,15 +453,16 @@ void ShenandoahBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler __ bind(done); } -#ifdef COMPILER2 -void ShenandoahBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler *masm, Register obj, - Register tmp, Label& slow_path) { - assert_different_registers(obj, tmp); +void ShenandoahBarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler *masm, Register weak_handle, + Register obj, Register tmp, Label& slow_path) { + assert_different_registers(weak_handle, tmp, noreg); + assert_different_registers(obj, tmp, noreg); + Label done; - // Resolve weak handle using the standard implementation. - BarrierSetAssembler::try_resolve_weak_handle_in_c2(masm, obj, tmp, slow_path); + // Peek weak handle using the standard implementation. + BarrierSetAssembler::try_peek_weak_handle_in_nmethod(masm, weak_handle, obj, tmp, slow_path); // Check if the reference is null, and if it is, take the fast path. __ beqz(obj, done); @@ -484,7 +476,6 @@ void ShenandoahBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler __ bnez(tmp, slow_path); __ bind(done); } -#endif // Special Shenandoah CAS implementation that handles false negatives due // to concurrent evacuation. The service is more complex than a diff --git a/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.hpp b/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.hpp index e35e09c93da..eed20e00a65 100644 --- a/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.hpp +++ b/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.hpp @@ -47,9 +47,7 @@ private: Register pre_val, Register thread, Register tmp1, - Register tmp2, - bool tosca_live, - bool expand_call); + Register tmp2); void card_barrier(MacroAssembler* masm, Register obj); @@ -85,9 +83,8 @@ public: virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env, Register obj, Register tmp, Label& slowpath); -#ifdef COMPILER2 - virtual void try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path); -#endif + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path); void cmpxchg_oop(MacroAssembler* masm, Register addr, Register expected, Register new_val, Assembler::Aqrl acquire, Assembler::Aqrl release, bool is_cae, Register result); }; diff --git a/src/hotspot/cpu/riscv/gc/z/zBarrierSetAssembler_riscv.cpp b/src/hotspot/cpu/riscv/gc/z/zBarrierSetAssembler_riscv.cpp index 163271a2f11..bf37ccf64e2 100644 --- a/src/hotspot/cpu/riscv/gc/z/zBarrierSetAssembler_riscv.cpp +++ b/src/hotspot/cpu/riscv/gc/z/zBarrierSetAssembler_riscv.cpp @@ -602,12 +602,16 @@ void ZBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm, BLOCK_COMMENT("} ZBarrierSetAssembler::try_resolve_jobject_in_native"); } -#ifdef COMPILER2 -void ZBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path) { - BLOCK_COMMENT("ZBarrierSetAssembler::try_resolve_weak_handle_in_c2 {"); +void ZBarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path) { + BLOCK_COMMENT("ZBarrierSetAssembler::try_peek_weak_handle_in_nmethod {"); - // Resolve weak handle using the standard implementation. - BarrierSetAssembler::try_resolve_weak_handle_in_c2(masm, obj, tmp, slow_path); + assert_different_registers(weak_handle, tmp, noreg); + assert_different_registers(obj, tmp, noreg); + + + // Peek weak handle using the standard implementation. + BarrierSetAssembler::try_peek_weak_handle_in_nmethod(masm, weak_handle, obj, tmp, slow_path); // Check if the oop is bad, in which case we need to take the slow path. __ relocate(barrier_Relocation::spec(), [&] { @@ -619,9 +623,8 @@ void ZBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, R // Oop is okay, so we uncolor it. __ srli(obj, obj, ZPointerLoadShift); - BLOCK_COMMENT("} ZBarrierSetAssembler::try_resolve_weak_handle_in_c2"); + BLOCK_COMMENT("} ZBarrierSetAssembler::try_peek_weak_handle_in_nmethod"); } -#endif static uint16_t patch_barrier_relocation_value(int format) { switch (format) { @@ -734,6 +737,7 @@ public: #define __ masm-> void ZBarrierSetAssembler::generate_c2_load_barrier_stub(MacroAssembler* masm, ZLoadBarrierStubC2* stub) const { + Assembler::InlineSkippedInstructionsCounter skipped_counter(masm); BLOCK_COMMENT("ZLoadBarrierStubC2"); // Stub entry @@ -753,6 +757,7 @@ void ZBarrierSetAssembler::generate_c2_load_barrier_stub(MacroAssembler* masm, Z } void ZBarrierSetAssembler::generate_c2_store_barrier_stub(MacroAssembler* masm, ZStoreBarrierStubC2* stub) const { + Assembler::InlineSkippedInstructionsCounter skipped_counter(masm); BLOCK_COMMENT("ZStoreBarrierStubC2"); // Stub entry diff --git a/src/hotspot/cpu/riscv/gc/z/zBarrierSetAssembler_riscv.hpp b/src/hotspot/cpu/riscv/gc/z/zBarrierSetAssembler_riscv.hpp index 648cb3bf63d..f99df299a77 100644 --- a/src/hotspot/cpu/riscv/gc/z/zBarrierSetAssembler_riscv.hpp +++ b/src/hotspot/cpu/riscv/gc/z/zBarrierSetAssembler_riscv.hpp @@ -170,12 +170,14 @@ public: ZLoadBarrierStubC2* stub) const; void generate_c2_store_barrier_stub(MacroAssembler* masm, ZStoreBarrierStubC2* stub) const; - void try_resolve_weak_handle_in_c2(MacroAssembler* masm, - Register obj, - Register tmp, - Label& slow_path); #endif // COMPILER2 + void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, + Register weak_handle, + Register obj, + Register tmp, + Label& slow_path); + void check_oop(MacroAssembler* masm, Register obj, Register tmp1, Register tmp2, Label& error); }; diff --git a/src/hotspot/cpu/riscv/gc/z/z_riscv.ad b/src/hotspot/cpu/riscv/gc/z/z_riscv.ad index a408cf309d5..0078deb76e8 100644 --- a/src/hotspot/cpu/riscv/gc/z/z_riscv.ad +++ b/src/hotspot/cpu/riscv/gc/z/z_riscv.ad @@ -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. // Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // @@ -57,6 +57,7 @@ static void check_color(MacroAssembler* masm, Register ref, bool on_non_strong, } static void z_load_barrier(MacroAssembler* masm, const MachNode* node, Address ref_addr, Register ref, Register tmp) { + Assembler::InlineSkippedInstructionsCounter skipped_counter(masm); const bool on_non_strong = ((node->barrier_data() & ZBarrierWeak) != 0) || ((node->barrier_data() & ZBarrierPhantom) != 0); @@ -78,6 +79,7 @@ static void z_load_barrier(MacroAssembler* masm, const MachNode* node, Address r } static void z_store_barrier(MacroAssembler* masm, const MachNode* node, Address ref_addr, Register rnew_zaddress, Register rnew_zpointer, Register tmp, bool is_atomic) { + Assembler::InlineSkippedInstructionsCounter skipped_counter(masm); if (node->barrier_data() == ZBarrierElided) { z_color(masm, node, rnew_zpointer, rnew_zaddress, tmp); } else { diff --git a/src/hotspot/cpu/riscv/riscv.ad b/src/hotspot/cpu/riscv/riscv.ad index e236d03e6d2..e615b946b44 100644 --- a/src/hotspot/cpu/riscv/riscv.ad +++ b/src/hotspot/cpu/riscv/riscv.ad @@ -1580,7 +1580,7 @@ uint MachSpillCopyNode::implementation(C2_MacroAssembler *masm, PhaseRegAlloc *r assert(src_lo != OptoReg::Bad && dst_lo != OptoReg::Bad, "must move at least 1 register"); - if (src_hi != OptoReg::Bad && !bottom_type()->isa_vectmask()) { + if (src_hi != OptoReg::Bad && !bottom_type()->isa_pvectmask()) { assert((src_lo & 1) == 0 && src_lo + 1 == src_hi && (dst_lo & 1) == 0 && dst_lo + 1 == dst_hi, "expected aligned-adjacent pairs"); @@ -1616,7 +1616,7 @@ uint MachSpillCopyNode::implementation(C2_MacroAssembler *masm, PhaseRegAlloc *r } else { ShouldNotReachHere(); } - } else if (bottom_type()->isa_vectmask() && masm) { + } else if (bottom_type()->isa_pvectmask() && masm) { int vmask_size_in_bytes = Matcher::scalable_predicate_reg_slots() * 32 / 8; if (src_lo_rc == rc_stack && dst_lo_rc == rc_stack) { // stack to stack @@ -1718,7 +1718,7 @@ uint MachSpillCopyNode::implementation(C2_MacroAssembler *masm, PhaseRegAlloc *r } else { st->print("%s", Matcher::regName[dst_lo]); } - if (bottom_type()->isa_vect() && !bottom_type()->isa_vectmask()) { + if (bottom_type()->isa_vect() && !bottom_type()->isa_pvectmask()) { int vsize = 0; if (ideal_reg() == Op_VecA) { vsize = Matcher::scalable_vector_reg_size(T_BYTE) * 8; diff --git a/src/hotspot/cpu/riscv/riscv_v.ad b/src/hotspot/cpu/riscv/riscv_v.ad index aeb8398f06f..a0af43364cb 100644 --- a/src/hotspot/cpu/riscv/riscv_v.ad +++ b/src/hotspot/cpu/riscv/riscv_v.ad @@ -181,8 +181,8 @@ source %{ } bool Matcher::mask_op_prefers_predicate(int opcode, const TypeVect* vt) { - // Prefer predicate if the mask type is "TypeVectMask". - return vt->isa_vectmask() != nullptr; + // Prefer predicate if the mask type is "TypePVectMask". + return vt->isa_pvectmask() != nullptr; } %} diff --git a/src/hotspot/cpu/riscv/templateTable_riscv.cpp b/src/hotspot/cpu/riscv/templateTable_riscv.cpp index 5cc725e3af4..bae5bb7b57b 100644 --- a/src/hotspot/cpu/riscv/templateTable_riscv.cpp +++ b/src/hotspot/cpu/riscv/templateTable_riscv.cpp @@ -3389,7 +3389,6 @@ void TemplateTable::invokeinterface(int byte_no) { __ bind(notVFinal); // Get receiver klass into x13 - __ restore_locals(); __ load_klass(x13, x12); Label no_such_method; diff --git a/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp b/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp index e1d8d062c23..38698370faa 100644 --- a/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp +++ b/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp @@ -2884,10 +2884,23 @@ void LIR_Assembler::on_spin_wait() { } void LIR_Assembler::leal(LIR_Opr addr_opr, LIR_Opr dest, LIR_PatchCode patch_code, CodeEmitInfo* info) { - assert(patch_code == lir_patch_none, "Patch code not supported"); + assert(addr_opr->is_address(), "must be an address"); + assert(dest->is_register(), "must be a register"); + LIR_Address* addr = addr_opr->as_address_ptr(); + Register reg = dest->as_pointer_register(); assert(addr->scale() == LIR_Address::times_1, "scaling unsupported"); - __ load_address(dest->as_pointer_register(), as_Address(addr)); + + if (addr->index()->is_illegal() && patch_code != lir_patch_none) { + PatchingStub* patch = new PatchingStub(_masm, PatchingStub::access_field_id); + + // TODO: Use load_const_32to64 here by extending NativeMovRegMem to support both instruction patterns. + __ load_const(Z_R0_scratch, (intptr_t)0); + __ z_agrk(reg, addr->base()->as_pointer_register(), Z_R0_scratch); + patching_epilog(patch, patch_code, addr->base()->as_register(), info); + } else { + __ load_address(reg, as_Address(addr)); + } } void LIR_Assembler::get_thread(LIR_Opr result_reg) { diff --git a/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp b/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp index 5a0fd5f9561..1ffd172df8f 100644 --- a/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp +++ b/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp @@ -1046,6 +1046,7 @@ void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address, void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, CodeEmitInfo* info) { __ load(address, result, info); + __ membar_acquire(); } void LIRGenerator::do_update_CRC32(Intrinsic* x) { diff --git a/src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp b/src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp index 617bc7cd00c..881fb613114 100644 --- a/src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp +++ b/src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp @@ -281,6 +281,7 @@ void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorator if (on_oop && on_reference && L_handle_null == nullptr) { L_handle_null = &done; } CardTableBarrierSetAssembler::load_at(masm, decorators, type, src, dst, tmp1, tmp2, L_handle_null); if (on_oop && on_reference) { + assert(tmp1 != noreg && tmp2 != noreg, "need temp registers for G1 pre-barrier"); // Generate the G1 pre-barrier code to log the value of // the referent field in an SATB buffer. g1_write_barrier_pre(masm, decorators | IS_NOT_NULL, diff --git a/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp b/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp index 9fac231df47..9a401766200 100644 --- a/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp +++ b/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp @@ -169,9 +169,10 @@ void BarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm, Re __ z_lg(obj, 0, obj); // Resolve (untagged) jobject. } -void BarrierSetAssembler::try_resolve_weak_handle(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path) { - // Load the oop from the weak handle. - __ z_lg(obj, Address(obj)); +void BarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path) { + // Load the oop from the weak handle without barriers. + __ z_lg(obj, Address(weak_handle)); } void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm) { diff --git a/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.hpp b/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.hpp index 8e76ec2f4b4..6c729528a67 100644 --- a/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.hpp +++ b/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.hpp @@ -58,10 +58,10 @@ public: virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env, Register obj, Register tmp, Label& slowpath); - // Can be used in nmethods including native wrappers. - // Attention: obj will only be valid until next safepoint (no SATB barrier). - // (other platforms currently use it for C2 only: try_resolve_weak_handle_in_c2) - virtual void try_resolve_weak_handle(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path); + // See AS_NO_KEEPALIVE for peek semantics + // weak_handle and obj may alias + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, + Register tmp, Label& slow_path); virtual void nmethod_entry_barrier(MacroAssembler* masm); diff --git a/src/hotspot/cpu/s390/interp_masm_s390.cpp b/src/hotspot/cpu/s390/interp_masm_s390.cpp index d5239898dd7..7327e2a13f2 100644 --- a/src/hotspot/cpu/s390/interp_masm_s390.cpp +++ b/src/hotspot/cpu/s390/interp_masm_s390.cpp @@ -411,7 +411,7 @@ void InterpreterMacroAssembler::load_resolved_reference_at_index(Register result // Load pointer for resolved_references[] objArray. z_lg(result, in_bytes(ConstantPool::cache_offset()), result); z_lg(result, in_bytes(ConstantPoolCache::resolved_references_offset()), result); - resolve_oop_handle(result); // Load resolved references array itself. + resolve_oop_handle(result, Z_R0_scratch, Z_R1_scratch); // Load resolved references array itself. #ifdef ASSERT NearLabel index_ok; z_lgf(Z_R0, Address(result, arrayOopDesc::length_offset_in_bytes())); diff --git a/src/hotspot/cpu/s390/macroAssembler_s390.cpp b/src/hotspot/cpu/s390/macroAssembler_s390.cpp index de3608e74ba..4d2bbe796fb 100644 --- a/src/hotspot/cpu/s390/macroAssembler_s390.cpp +++ b/src/hotspot/cpu/s390/macroAssembler_s390.cpp @@ -4705,16 +4705,8 @@ void MacroAssembler::oop_decoder(Register Rdst, Register Rsrc, bool maybenull, R } // ((OopHandle)result).resolve(); -void MacroAssembler::resolve_oop_handle(Register result) { - // OopHandle::resolve is an indirection. - z_lg(result, 0, result); -} - -void MacroAssembler::load_mirror_from_const_method(Register mirror, Register const_method) { - mem2reg_opt(mirror, Address(const_method, ConstMethod::constants_offset())); - mem2reg_opt(mirror, Address(mirror, ConstantPool::pool_holder_offset())); - mem2reg_opt(mirror, Address(mirror, Klass::java_mirror_offset())); - resolve_oop_handle(mirror); +void MacroAssembler::resolve_oop_handle(Register result, Register tmp1, Register tmp2) { + access_load_at(T_OBJECT, IN_NATIVE, Address(result, 0), result, tmp1, tmp2); } void MacroAssembler::load_method_holder(Register holder, Register method) { @@ -5886,6 +5878,28 @@ void MacroAssembler::asm_assert_frame_size(Register expected_size, Register tmp, #endif // ASSERT } +#ifdef ASSERT +bool is_excluded(Register excluded_register[], Register reg, int n) { + for (int i = 0; i < n; i++) { + if (excluded_register[i] == reg) { + return true; + } + } + return false; +} + +void MacroAssembler::clobber_volatile_registers(Register excluded_register[], int n) { + const int magic_number = 0x82; + + for (int i = 0; i < 6 /* R0 to R5 */; i++) { + Register reg = as_Register(i); + if (!is_excluded(excluded_register, reg, n)) { + load_const_optimized(reg, magic_number); + } + } +} +#endif // ASSERT + // Save and restore functions: Exclude Z_R0. void MacroAssembler::save_volatile_regs(Register dst, int offset, bool include_fp, bool include_flags) { z_stmg(Z_R1, Z_R5, offset, dst); offset += 5 * BytesPerWord; @@ -6381,7 +6395,7 @@ void MacroAssembler::compiler_fast_lock_object(Register obj, Register box, Regis // Check if object matches. z_lg(tmp2, Address(tmp1_monitor, ObjectMonitor::object_offset())); BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler(); - bs_asm->try_resolve_weak_handle(this, tmp2, Z_R0_scratch, slow_path); + bs_asm->try_peek_weak_handle_in_nmethod(this, tmp2, tmp2, Z_R0_scratch, slow_path); z_cgr(obj, tmp2); z_brne(slow_path); diff --git a/src/hotspot/cpu/s390/macroAssembler_s390.hpp b/src/hotspot/cpu/s390/macroAssembler_s390.hpp index 32e484d4790..34389917cef 100644 --- a/src/hotspot/cpu/s390/macroAssembler_s390.hpp +++ b/src/hotspot/cpu/s390/macroAssembler_s390.hpp @@ -484,6 +484,10 @@ class MacroAssembler: public Assembler { // Pop current C frame and restore return PC register (Z_R14). void pop_frame_restore_retPC(int frame_size_in_bytes); +#ifdef ASSERT + void clobber_volatile_registers(Register excluded_register[], int n); +#endif // ASSERT + // // Calls // @@ -885,8 +889,7 @@ class MacroAssembler: public Assembler { void oop_decoder(Register Rdst, Register Rsrc, bool maybenull, Register Rbase = Z_R1, int pow2_offset = -1); - void resolve_oop_handle(Register result); - void load_mirror_from_const_method(Register mirror, Register const_method); + void resolve_oop_handle(Register result, Register tmp1, Register tmp2); void load_method_holder(Register holder, Register method); //-------------------------- diff --git a/src/hotspot/cpu/s390/registerMap_s390.cpp b/src/hotspot/cpu/s390/registerMap_s390.cpp new file mode 100644 index 00000000000..85a49ff1d60 --- /dev/null +++ b/src/hotspot/cpu/s390/registerMap_s390.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2026 IBM Corp. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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 "runtime/registerMap.hpp" + +address RegisterMap::pd_location(VMReg base_reg, int slot_idx) const { + if (base_reg->is_VectorRegister()) { + // Not all physical slots belonging to a VectorRegister have corresponding + // valid VMReg locations in the RegisterMap. + // (See RegisterSaver::save_live_registers.) + // However, the slots are always saved to the stack in a contiguous region + // of memory so we can calculate the address of the upper slots by + // offsetting from the base address. + assert(base_reg->is_concrete(), "must pass base reg"); + address base_location = location(base_reg, nullptr); + if (base_location != nullptr) { + intptr_t offset_in_bytes = slot_idx * VMRegImpl::stack_slot_size; + return base_location + offset_in_bytes; + } else { + return nullptr; + } + } else { + return location(base_reg->next(slot_idx), nullptr); + } +} diff --git a/src/hotspot/cpu/s390/registerMap_s390.hpp b/src/hotspot/cpu/s390/registerMap_s390.hpp index 827e3b44e04..9069fb1e31d 100644 --- a/src/hotspot/cpu/s390/registerMap_s390.hpp +++ b/src/hotspot/cpu/s390/registerMap_s390.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -36,9 +36,7 @@ // Since there is none, we just return null. address pd_location(VMReg reg) const {return nullptr;} - address pd_location(VMReg base_reg, int slot_idx) const { - return location(base_reg->next(slot_idx), nullptr); - } + address pd_location(VMReg base_reg, int slot_idx) const; // No PD state to clear or copy. void pd_clear() {} diff --git a/src/hotspot/cpu/s390/registerSaver_s390.hpp b/src/hotspot/cpu/s390/registerSaver_s390.hpp index a049f8b581b..2d3c35250ba 100644 --- a/src/hotspot/cpu/s390/registerSaver_s390.hpp +++ b/src/hotspot/cpu/s390/registerSaver_s390.hpp @@ -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. * Copyright (c) 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -58,7 +58,7 @@ class RegisterSaver { // During deoptimization only the result register need to be restored // all the other values have already been extracted. - static void restore_result_registers(MacroAssembler* masm); + static void restore_result_registers(MacroAssembler* masm, bool save_vectors); // Constants and data structures: diff --git a/src/hotspot/cpu/s390/sharedRuntime_s390.cpp b/src/hotspot/cpu/s390/sharedRuntime_s390.cpp index 00a830a80cd..e5a27e66968 100644 --- a/src/hotspot/cpu/s390/sharedRuntime_s390.cpp +++ b/src/hotspot/cpu/s390/sharedRuntime_s390.cpp @@ -402,9 +402,7 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, RegisterSet reg break; } - // Second set_callee_saved is really a waste but we'll keep things as they were for now map->set_callee_saved(VMRegImpl::stack2reg(offset >> 2), live_regs[i].vmreg); - map->set_callee_saved(VMRegImpl::stack2reg((offset + half_reg_size) >> 2), live_regs[i].vmreg->next()); } assert(first != noreg, "Should spill at least one int reg."); __ z_stmg(first, last, first_offset, Z_SP); @@ -416,12 +414,6 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, RegisterSet reg map->set_callee_saved(VMRegImpl::stack2reg(offset>>2), RegisterSaver_LiveVRegs[i].vmreg); - map->set_callee_saved(VMRegImpl::stack2reg((offset + half_reg_size ) >> 2), - RegisterSaver_LiveVRegs[i].vmreg->next()); - map->set_callee_saved(VMRegImpl::stack2reg((offset + (half_reg_size * 2)) >> 2), - RegisterSaver_LiveVRegs[i].vmreg->next(2)); - map->set_callee_saved(VMRegImpl::stack2reg((offset + (half_reg_size * 3)) >> 2), - RegisterSaver_LiveVRegs[i].vmreg->next(3)); } assert(offset == frame_size_in_bytes, "consistency check"); @@ -473,7 +465,6 @@ OopMap* RegisterSaver::generate_oop_map(MacroAssembler* masm, RegisterSet reg_se for (int i = 0; i < regstosave_num; i++) { if (live_regs[i].reg_type < RegisterSaver::excluded_reg) { map->set_callee_saved(VMRegImpl::stack2reg(offset>>2), live_regs[i].vmreg); - map->set_callee_saved(VMRegImpl::stack2reg((offset + half_reg_size)>>2), live_regs[i].vmreg->next()); } offset += reg_size; } @@ -580,10 +571,12 @@ void RegisterSaver::restore_live_registers(MacroAssembler* masm, RegisterSet reg // Pop the current frame and restore the registers that might be holding a result. -void RegisterSaver::restore_result_registers(MacroAssembler* masm) { +void RegisterSaver::restore_result_registers(MacroAssembler* masm, bool save_vectors) { const int regstosave_num = sizeof(RegisterSaver_LiveRegs) / sizeof(RegisterSaver::LiveRegType); - const int register_save_offset = live_reg_frame_size(all_registers) - live_reg_save_size(all_registers); + const int vecregstosave_num = save_vectors ? calculate_vregstosave_num() : 0; + const int vreg_save_size = vecregstosave_num * v_reg_size; + const int register_save_offset = live_reg_frame_size(all_registers, save_vectors) - (live_reg_save_size(all_registers) + vreg_save_size); // Restore all result registers (ints and floats). int offset = register_save_offset; @@ -609,7 +602,7 @@ void RegisterSaver::restore_result_registers(MacroAssembler* masm) { ShouldNotReachHere(); } } - assert(offset == live_reg_frame_size(all_registers), "consistency check"); + assert(offset == live_reg_frame_size(all_registers, save_vectors) - (save_vectors ? vreg_save_size : 0) , "consistency check"); } // --------------------------------------------------------------------------- @@ -2557,7 +2550,7 @@ void SharedRuntime::generate_deopt_blob() { // nmethod that was valid just before the nmethod was deoptimized. // save R14 into the deoptee frame. the `fetch_unroll_info' // procedure called below will read it from there. - map = RegisterSaver::save_live_registers(masm, RegisterSaver::all_registers); + map = RegisterSaver::save_live_registers(masm, RegisterSaver::all_registers, Z_R14, /* save_vectors= */ SuperwordUseVX); // note the entry point. __ load_const_optimized(exec_mode_reg, Deoptimization::Unpack_deopt); @@ -2573,7 +2566,7 @@ void SharedRuntime::generate_deopt_blob() { int reexecute_offset = __ offset() - start_off; // No need to update map as each call to save_live_registers will produce identical oopmap - (void) RegisterSaver::save_live_registers(masm, RegisterSaver::all_registers); + (void) RegisterSaver::save_live_registers(masm, RegisterSaver::all_registers, Z_R14, /* save_vectors= */ SuperwordUseVX); __ load_const_optimized(exec_mode_reg, Deoptimization::Unpack_reexecute); __ z_bru(exec_mode_initialized); @@ -2611,7 +2604,7 @@ void SharedRuntime::generate_deopt_blob() { __ z_lg(Z_R1_scratch, Address(Z_thread, JavaThread::exception_pc_offset())); // Save everything in sight. - (void) RegisterSaver::save_live_registers(masm, RegisterSaver::all_registers, Z_R1_scratch); + (void) RegisterSaver::save_live_registers(masm, RegisterSaver::all_registers, Z_R1_scratch, /* save_vectors= */ SuperwordUseVX); // Now it is safe to overwrite any register @@ -2661,7 +2654,7 @@ void SharedRuntime::generate_deopt_blob() { __ z_lgr(unroll_block_reg, Z_RET); // restore the return registers that have been saved // (among other registers) by save_live_registers(...). - RegisterSaver::restore_result_registers(masm); + RegisterSaver::restore_result_registers(masm, /* save_vectors= */ SuperwordUseVX); // reload the exec mode from the UnrollBlock (it might have changed) __ z_llgf(exec_mode_reg, Address(unroll_block_reg, Deoptimization::UnrollBlock::unpack_kind_offset())); @@ -2737,7 +2730,7 @@ void SharedRuntime::generate_deopt_blob() { // Make sure all code is generated masm->flush(); - _deopt_blob = DeoptimizationBlob::create(&buffer, oop_maps, 0, exception_offset, reexecute_offset, RegisterSaver::live_reg_frame_size(RegisterSaver::all_registers)/wordSize); + _deopt_blob = DeoptimizationBlob::create(&buffer, oop_maps, 0, exception_offset, reexecute_offset, RegisterSaver::live_reg_frame_size(RegisterSaver::all_registers, SuperwordUseVX)/wordSize); _deopt_blob->set_unpack_with_exception_in_tls_offset(exception_in_tls_offset); } diff --git a/src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp b/src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp index 2da21f08bbc..dba04fc0e85 100644 --- a/src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp +++ b/src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp @@ -1113,6 +1113,7 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) { { // locals const Register local_addr = Z_ARG4; + const Register constants_addr = Z_ARG2; BLOCK_COMMENT("generate_fixed_frame: initialize interpreter state {"); @@ -1128,8 +1129,8 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) { __ z_stg(Z_R10, _z_ijava_state_neg(sender_sp), fp); // Load cp cache and save it at the end of this block. - __ z_lg(Z_R1_scratch, Address(const_method, ConstMethod::constants_offset())); - __ z_lg(Z_R1_scratch, Address(Z_R1_scratch, ConstantPool::cache_offset())); + __ z_lg(constants_addr, Address(const_method, ConstMethod::constants_offset())); + __ z_lg(Z_R1_scratch, Address(constants_addr, ConstantPool::cache_offset())); // z_ijava_state->method = method; __ z_stg(Z_method, _z_ijava_state_neg(method), fp); @@ -1192,7 +1193,9 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) { __ z_stg(Z_R1_scratch, _z_ijava_state_neg(cpoolCache), fp); // Get mirror and store it in the frame as GC root for this Method*. - __ load_mirror_from_const_method(Z_R1_scratch, const_method); + __ mem2reg_opt(Z_R1_scratch, Address(constants_addr, ConstantPool::pool_holder_offset())); + __ mem2reg_opt(Z_R1_scratch, Address(Z_R1_scratch, Klass::java_mirror_offset())); + __ resolve_oop_handle(Z_R1_scratch, Z_R0_scratch, Z_R1_scratch); __ z_stg(Z_R1_scratch, _z_ijava_state_neg(mirror), fp); BLOCK_COMMENT("} generate_fixed_frame: initialize interpreter state"); @@ -2028,7 +2031,7 @@ address TemplateInterpreterGenerator::generate_currentThread() { uint64_t entry_off = __ offset(); __ z_lg(Z_RET, Address(Z_thread, JavaThread::threadObj_offset())); - __ resolve_oop_handle(Z_RET); + __ resolve_oop_handle(Z_RET, Z_R0_scratch, Z_R1_scratch); // Restore caller sp for c2i case. __ resize_frame_absolute(Z_R10, Z_R0, true); // Cut the stack back to where the caller started. diff --git a/src/hotspot/cpu/s390/templateTable_s390.cpp b/src/hotspot/cpu/s390/templateTable_s390.cpp index 647915ef4fa..3b0929608a3 100644 --- a/src/hotspot/cpu/s390/templateTable_s390.cpp +++ b/src/hotspot/cpu/s390/templateTable_s390.cpp @@ -480,8 +480,9 @@ void TemplateTable::fast_aldc(LdcType type) { // Convert null sentinel to null. __ load_const_optimized(Z_R1_scratch, (intptr_t)Universe::the_null_sentinel_addr()); - __ resolve_oop_handle(Z_R1_scratch); - __ z_cg(Z_tos, Address(Z_R1_scratch)); + __ z_lg(Z_R1_scratch, Address(Z_R1_scratch)); + __ resolve_oop_handle(Z_R1_scratch, Z_R0_scratch, Z_R1_scratch); + __ z_cgr(Z_tos, Z_R1_scratch); __ z_brne(L_resolved); __ clear_reg(Z_tos); __ z_bru(L_resolved); @@ -2478,7 +2479,7 @@ void TemplateTable::load_resolved_field_entry(Register obj, if (is_static) { __ load_sized_value(obj, Address(cache, ResolvedFieldEntry::field_holder_offset()), sizeof(void*), false); __ load_sized_value(obj, Address(obj, in_bytes(Klass::java_mirror_offset())), sizeof(void*), false); - __ resolve_oop_handle(obj); + __ resolve_oop_handle(obj, Z_R0_scratch, Z_R1_scratch); } } diff --git a/src/hotspot/cpu/s390/vm_version_s390.cpp b/src/hotspot/cpu/s390/vm_version_s390.cpp index 7e9000991ca..c3f981f159a 100644 --- a/src/hotspot/cpu/s390/vm_version_s390.cpp +++ b/src/hotspot/cpu/s390/vm_version_s390.cpp @@ -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. * Copyright (c) 2016, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -24,8 +24,9 @@ */ #include "asm/assembler.inline.hpp" -#include "compiler/disassembler.hpp" #include "code/compiledIC.hpp" +#include "compiler/compilerDefinitions.inline.hpp" +#include "compiler/disassembler.hpp" #include "jvm.h" #include "memory/resourceArea.hpp" #include "runtime/java.hpp" @@ -105,7 +106,7 @@ void VM_Version::initialize() { int model_ix = get_model_index(); if ( model_ix >= 7 ) { - if (FLAG_IS_DEFAULT(SuperwordUseVX)) { + if (FLAG_IS_DEFAULT(SuperwordUseVX) && CompilerConfig::is_c2_enabled()) { FLAG_SET_ERGO(SuperwordUseVX, true); } if (model_ix > 7 && FLAG_IS_DEFAULT(UseSFPV) && SuperwordUseVX) { diff --git a/src/hotspot/cpu/s390/vmreg_s390.hpp b/src/hotspot/cpu/s390/vmreg_s390.hpp index 517fb8e2130..5fb5b7b40b1 100644 --- a/src/hotspot/cpu/s390/vmreg_s390.hpp +++ b/src/hotspot/cpu/s390/vmreg_s390.hpp @@ -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. * Copyright (c) 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -59,7 +59,12 @@ inline VectorRegister as_VectorRegister() { inline bool is_concrete() { assert(is_reg(), "must be"); - return is_even(value()); + if (is_Register() || is_FloatRegister()) return is_even(value()); + if (is_VectorRegister()) { + int base = value() - ConcreteRegisterImpl::max_fpr; + return (base & 3) == 0; + } + return true; } #endif // CPU_S390_VMREG_S390_HPP diff --git a/src/hotspot/cpu/x86/assembler_x86.cpp b/src/hotspot/cpu/x86/assembler_x86.cpp index a4f2968f0d1..0c8dd85b15d 100644 --- a/src/hotspot/cpu/x86/assembler_x86.cpp +++ b/src/hotspot/cpu/x86/assembler_x86.cpp @@ -1664,14 +1664,14 @@ void Assembler::eandl(Register dst, Register src1, Register src2, bool no_flags) } void Assembler::andnl(Register dst, Register src1, Register src2) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF2, (0xC0 | encode)); } void Assembler::andnl(Register dst, Register src1, Address src2) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionMark im(this); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); @@ -1696,14 +1696,14 @@ void Assembler::bswapl(Register reg) { // bswap } void Assembler::blsil(Register dst, Register src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(rbx->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF3, (0xC0 | encode)); } void Assembler::blsil(Register dst, Address src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionMark im(this); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); @@ -1713,7 +1713,7 @@ void Assembler::blsil(Register dst, Address src) { } void Assembler::blsmskl(Register dst, Register src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(rdx->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF3, @@ -1721,7 +1721,7 @@ void Assembler::blsmskl(Register dst, Register src) { } void Assembler::blsmskl(Register dst, Address src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionMark im(this); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); @@ -1731,14 +1731,14 @@ void Assembler::blsmskl(Register dst, Address src) { } void Assembler::blsrl(Register dst, Register src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(rcx->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF3, (0xC0 | encode)); } void Assembler::blsrl(Register dst, Address src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionMark im(this); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); @@ -7275,21 +7275,21 @@ void Assembler::testl(Register dst, Address src) { } void Assembler::tzcntl(Register dst, Register src) { - assert(VM_Version::supports_bmi1(), "tzcnt instruction not supported"); + assert(UseCountTrailingZerosInstruction, "tzcnt instruction not supported"); emit_int8((unsigned char)0xF3); int encode = prefix_and_encode(dst->encoding(), src->encoding(), true /* is_map1 */); emit_opcode_prefix_and_encoding((unsigned char)0xBC, 0xC0, encode); } void Assembler::etzcntl(Register dst, Register src, bool no_flags) { - assert(VM_Version::supports_bmi1(), "tzcnt instruction not supported"); + assert(UseCountTrailingZerosInstruction, "tzcnt instruction not supported"); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = eevex_prefix_and_encode_nf(dst->encoding(), 0, src->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); emit_int16((unsigned char)0xF4, (0xC0 | encode)); } void Assembler::tzcntl(Register dst, Address src) { - assert(VM_Version::supports_bmi1(), "tzcnt instruction not supported"); + assert(UseCountTrailingZerosInstruction, "tzcnt instruction not supported"); InstructionMark im(this); emit_int8((unsigned char)0xF3); prefix(src, dst, false, true /* is_map1 */); @@ -7298,7 +7298,7 @@ void Assembler::tzcntl(Register dst, Address src) { } void Assembler::etzcntl(Register dst, Address src, bool no_flags) { - assert(VM_Version::supports_bmi1(), "tzcnt instruction not supported"); + assert(UseCountTrailingZerosInstruction, "tzcnt instruction not supported"); InstructionMark im(this); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); @@ -7308,21 +7308,21 @@ void Assembler::etzcntl(Register dst, Address src, bool no_flags) { } void Assembler::tzcntq(Register dst, Register src) { - assert(VM_Version::supports_bmi1(), "tzcnt instruction not supported"); + assert(UseCountTrailingZerosInstruction, "tzcnt instruction not supported"); emit_int8((unsigned char)0xF3); int encode = prefixq_and_encode(dst->encoding(), src->encoding(), true /* is_map1 */); emit_opcode_prefix_and_encoding((unsigned char)0xBC, 0xC0, encode); } void Assembler::etzcntq(Register dst, Register src, bool no_flags) { - assert(VM_Version::supports_bmi1(), "tzcnt instruction not supported"); + assert(UseCountTrailingZerosInstruction, "tzcnt instruction not supported"); InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = eevex_prefix_and_encode_nf(dst->encoding(), 0, src->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); emit_int16((unsigned char)0xF4, (0xC0 | encode)); } void Assembler::tzcntq(Register dst, Address src) { - assert(VM_Version::supports_bmi1(), "tzcnt instruction not supported"); + assert(UseCountTrailingZerosInstruction, "tzcnt instruction not supported"); InstructionMark im(this); emit_int8((unsigned char)0xF3); prefixq(src, dst, true /* is_map1 */); @@ -7331,7 +7331,7 @@ void Assembler::tzcntq(Register dst, Address src) { } void Assembler::etzcntq(Register dst, Address src, bool no_flags) { - assert(VM_Version::supports_bmi1(), "tzcnt instruction not supported"); + assert(UseCountTrailingZerosInstruction, "tzcnt instruction not supported"); InstructionMark im(this); InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); @@ -15000,14 +15000,14 @@ void Assembler::eandq(Register dst, Address src1, Register src2, bool no_flags) } void Assembler::andnq(Register dst, Register src1, Register src2) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF2, (0xC0 | encode)); } void Assembler::andnq(Register dst, Register src1, Address src2) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionMark im(this); InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); @@ -15032,14 +15032,14 @@ void Assembler::bswapq(Register reg) { } void Assembler::blsiq(Register dst, Register src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(rbx->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF3, (0xC0 | encode)); } void Assembler::blsiq(Register dst, Address src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionMark im(this); InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); @@ -15049,14 +15049,14 @@ void Assembler::blsiq(Register dst, Address src) { } void Assembler::blsmskq(Register dst, Register src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(rdx->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF3, (0xC0 | encode)); } void Assembler::blsmskq(Register dst, Address src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionMark im(this); InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); @@ -15066,14 +15066,14 @@ void Assembler::blsmskq(Register dst, Address src) { } void Assembler::blsrq(Register dst, Register src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(rcx->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF3, (0xC0 | encode)); } void Assembler::blsrq(Register dst, Address src) { - assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "bit manipulation instructions not supported"); InstructionMark im(this); InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); diff --git a/src/hotspot/cpu/x86/c1_CodeStubs_x86.cpp b/src/hotspot/cpu/x86/c1_CodeStubs_x86.cpp index 95ce48f34db..9a4044a4f0c 100644 --- a/src/hotspot/cpu/x86/c1_CodeStubs_x86.cpp +++ b/src/hotspot/cpu/x86/c1_CodeStubs_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -293,7 +293,7 @@ void PatchingStub::emit_code(LIR_Assembler* ce) { address ptr = (address)(_pc_start + i); int a_byte = (*ptr) & 0xFF; __ emit_int8(a_byte); - *ptr = 0x90; // make the site look like a nop + *ptr = NativeInstruction::nop_instruction_code; // make the site look like a nop } } @@ -342,6 +342,38 @@ void PatchingStub::emit_code(LIR_Assembler* ce) { assert(patch_info_pc - end_of_patch == bytes_to_skip, "incorrect patch info"); address entry = __ pc(); + // NativeGeneralJump::insert_unconditional will be writing a jmp rel32 at _pc_start over the existing instructions. + // There are 2 cases: + // - the existing instruction is a mov r64 imm64 from LIR_Assembler::klass2reg_with_patching + // - or there are nops there (from higher in this function). + // In the first case, since a jmp rel32 is 5-byte long, but a mov r64 imm64 is 10-byte long + // (resp. 11 if using a REX2 prefix), so we are left with the last 5 (resp. 6) bytes of the + // immediate operand (which are all 0x00). When debugging, this confuses the disassembler + // because it tries to recognize an instruction starting immediately after the jmp rel32, + // leading to wrong instructions, and possibly failure to disassemble further the whole function. + // + // To be disassembler-friendly, let's replace the leftover 0x00 with nops. + // There are 2 shapes: + // - without REX2 prefix: REX prefix | MOV r64 + // - with REX2 prefix: REX2 prefix | REX prefix | MOV r64 + // then, we know the 8 bytes after are the immediate operand. + if (NativeInstruction* ni = nativeInstruction_at(_pc_start); ni->is_mov_literal64()) { + int length_before_immediate = ni->has_rex2_prefix() ? 3 : 2; + assert(*(long long int*)(_pc_start + length_before_immediate) == 0, "imm64 must be 0 in mov r64, imm64"); + // We don't need to replace the NativeGeneralJump::instruction_size first bytes, since insert_unconditional + // will overwrite. + for (int i = NativeGeneralJump::instruction_size; i < length_before_immediate + BytesPerLong; ++i) { + _pc_start[i] = NativeInstruction::nop_instruction_code; + } + } +#ifdef ASSERT + else { // and we make sure otherwise, we indeed have just nops. + for (int i = 0; i < NativeGeneralJump::instruction_size; ++i) { + assert(_pc_start[i] == NativeInstruction::nop_instruction_code, "patching over an unexpected instruction"); + } + } +#endif + NativeGeneralJump::insert_unconditional((address)_pc_start, entry); address target = nullptr; relocInfo::relocType reloc_type = relocInfo::none; diff --git a/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp b/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp index f448e4ee17f..cc068cda7a9 100644 --- a/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp +++ b/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp @@ -1432,4 +1432,5 @@ void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, } else { __ load(address, result, info); } + __ membar_acquire(); } diff --git a/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp b/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp index b4d8aa10de2..69308bb2a7e 100644 --- a/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp @@ -336,7 +336,7 @@ void C2_MacroAssembler::fast_lock(Register obj, Register box, Register rax_reg, // Check if object matches. movptr(rax_reg, Address(monitor, ObjectMonitor::object_offset())); BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler(); - bs_asm->try_resolve_weak_handle_in_c2(this, rax_reg, slow_path); + bs_asm->try_peek_weak_handle_in_nmethod(this, rax_reg, rax_reg, slow_path); cmpptr(rax_reg, obj); jcc(Assembler::notEqual, slow_path); @@ -483,7 +483,7 @@ void C2_MacroAssembler::fast_unlock(Register obj, Register reg_rax, Register t, // Try to unlock. Transition lock bits 0b00 => 0b01 movptr(reg_rax, mark); - andptr(reg_rax, ~(int32_t)markWord::lock_mask); + andptr(reg_rax, ~(int32_t)markWord::lock_mask_in_place); orptr(mark, markWord::unlocked_value); lock(); cmpxchgptr(mark, Address(obj, oopDesc::mark_offset_in_bytes())); jcc(Assembler::notEqual, push_and_slow_path); @@ -5558,7 +5558,7 @@ void C2_MacroAssembler::vector_mask_operation_helper(int opc, Register dst, Regi } break; case Op_VectorMaskFirstTrue: - if (VM_Version::supports_bmi1()) { + if (UseCountTrailingZerosInstruction) { if (masklen < 32) { orl(tmp, 1 << masklen); tzcntl(dst, tmp); @@ -6350,7 +6350,7 @@ void C2_MacroAssembler::udivI(Register rax, Register divisor, Register rdx) { // See Hacker's Delight (2nd ed), section 9.3 which is implemented in java.lang.Long.divideUnsigned() movl(rdx, rax); subl(rdx, divisor); - if (VM_Version::supports_bmi1()) { + if (VM_Version::supports_bmi1() && VM_Version::supports_avx()) { andnl(rax, rdx, rax); } else { notl(rdx); @@ -6374,7 +6374,7 @@ void C2_MacroAssembler::umodI(Register rax, Register divisor, Register rdx) { // See Hacker's Delight (2nd ed), section 9.3 which is implemented in java.lang.Long.remainderUnsigned() movl(rdx, rax); subl(rax, divisor); - if (VM_Version::supports_bmi1()) { + if (VM_Version::supports_bmi1() && VM_Version::supports_avx()) { andnl(rax, rax, rdx); } else { notl(rax); @@ -6403,7 +6403,7 @@ void C2_MacroAssembler::udivmodI(Register rax, Register divisor, Register rdx, R // java.lang.Long.divideUnsigned() and java.lang.Long.remainderUnsigned() movl(rdx, rax); subl(rax, divisor); - if (VM_Version::supports_bmi1()) { + if (VM_Version::supports_bmi1() && VM_Version::supports_avx()) { andnl(rax, rax, rdx); } else { notl(rax); @@ -6515,7 +6515,7 @@ void C2_MacroAssembler::udivL(Register rax, Register divisor, Register rdx) { // See Hacker's Delight (2nd ed), section 9.3 which is implemented in java.lang.Long.divideUnsigned() movq(rdx, rax); subq(rdx, divisor); - if (VM_Version::supports_bmi1()) { + if (VM_Version::supports_bmi1() && VM_Version::supports_avx()) { andnq(rax, rdx, rax); } else { notq(rdx); @@ -6539,7 +6539,7 @@ void C2_MacroAssembler::umodL(Register rax, Register divisor, Register rdx) { // See Hacker's Delight (2nd ed), section 9.3 which is implemented in java.lang.Long.remainderUnsigned() movq(rdx, rax); subq(rax, divisor); - if (VM_Version::supports_bmi1()) { + if (VM_Version::supports_bmi1() && VM_Version::supports_avx()) { andnq(rax, rax, rdx); } else { notq(rax); @@ -6567,7 +6567,7 @@ void C2_MacroAssembler::udivmodL(Register rax, Register divisor, Register rdx, R // java.lang.Long.divideUnsigned() and java.lang.Long.remainderUnsigned() movq(rdx, rax); subq(rax, divisor); - if (VM_Version::supports_bmi1()) { + if (VM_Version::supports_bmi1() && VM_Version::supports_avx()) { andnq(rax, rax, rdx); } else { notq(rax); diff --git a/src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp b/src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp index 77a149addb5..b71fb46f075 100644 --- a/src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp +++ b/src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp @@ -28,6 +28,7 @@ #include "oops/arrayOop.hpp" #include "opto/c2_MacroAssembler.hpp" #include "opto/intrinsicnode.hpp" +#include "runtime/stubRoutines.hpp" /******************************************************************************/ // String handling intrinsics @@ -98,7 +99,8 @@ __ blsrl(mask, mask); \ } -#define NUMBER_OF_CASES 10 +#define NUMBER_OF_CASES StubRoutines::x86::STRING_INDEXOF_NUMBER_OF_CASES +#define TABLE_COUNT StubRoutines::x86::STRING_INDEXOF_TABLE_COUNT #undef STACK_SPACE #undef MAX_NEEDLE_LEN_TO_EXPAND @@ -186,9 +188,9 @@ static void generate_string_indexof_stubs(StubGenerator *stubgen, address *fnptr //////////////////////////////////////////////////////////////////////////////////////// void StubGenerator::generate_string_indexof(address *fnptrs) { - assert((int) StrIntrinsicNode::LL < 4, "Enum out of range"); - assert((int) StrIntrinsicNode::UL < 4, "Enum out of range"); - assert((int) StrIntrinsicNode::UU < 4, "Enum out of range"); + assert((int) StrIntrinsicNode::LL < TABLE_COUNT, "Enum out of range"); + assert((int) StrIntrinsicNode::UL < TABLE_COUNT, "Enum out of range"); + assert((int) StrIntrinsicNode::UU < TABLE_COUNT, "Enum out of range"); generate_string_indexof_stubs(this, fnptrs, StrIntrinsicNode::LL, _masm); generate_string_indexof_stubs(this, fnptrs, StrIntrinsicNode::UU, _masm); generate_string_indexof_stubs(this, fnptrs, StrIntrinsicNode::UL, _masm); @@ -206,6 +208,33 @@ static void generate_string_indexof_stubs(StubGenerator *stubgen, address *fnptr assert(isLL || isUL || isUU, "Encoding not recognized"); StubId stub_id = (isLL ? StubId::stubgen_string_indexof_linear_ll_id : (isUL ? StubId::stubgen_string_indexof_linear_ul_id : StubId::stubgen_string_indexof_linear_uu_id)); + + // Addresses of the two jump tables used for small needle processing + address *big_jump_table = StubRoutines::x86::big_jump_table_base(ae); + address *small_jump_table = StubRoutines::x86::big_jump_table_base(ae); + + // If the stub has been cached we can retrieve the stub entry. The + // target addresses we need to install into the jump tables will + // also have been cached, as extra addresses rather than secondary + // entries because they are only used internally to this stub. + + assert(StubInfo::entry_count(stub_id) == 1, "sanity check"); + GrowableArray
extras; + const int expected_extra_count = 2 * NUMBER_OF_CASES; + address start = stubgen->load_archive_data(stub_id, nullptr, &extras); + if (start != nullptr) { + assert(extras.length() == expected_extra_count, + "expecting %d extra addresses but got %d!", + expected_extra_count, + extras.length()); + fnptrs[ae] = start; + for (int i = 0; i < NUMBER_OF_CASES; i++) { + big_jump_table[i]= extras.at(i); + small_jump_table[i]= extras.at(NUMBER_OF_CASES + i); + } + return; + } + StubCodeMark mark(stubgen, stub_id); // Keep track of isUL since we need to generate UU code in the main body // for the case where we expand the needle from bytes to words on the stack. @@ -253,10 +282,6 @@ static void generate_string_indexof_stubs(StubGenerator *stubgen, address *fnptr const Register needle_p = c_rarg2; const Register needle_len_p = c_rarg3; - // Addresses of the two jump tables used for small needle processing - address big_jump_table; - address small_jump_table; - Label L_begin; Label L_returnError, L_bigCaseFixupAndReturn; @@ -265,7 +290,7 @@ static void generate_string_indexof_stubs(StubGenerator *stubgen, address *fnptr Label L_wcharBegin, L_continue, L_wideNoExpand, L_returnR11; __ align(CodeEntryAlignment); - fnptrs[ae] = __ pc(); + start = __ pc(); __ enter(); // required for proper stackwalking of RuntimeStub frame // Check for trivial cases @@ -311,8 +336,8 @@ static void generate_string_indexof_stubs(StubGenerator *stubgen, address *fnptr } // Set up jump tables. Used when needle size <= NUMBER_OF_CASES - setup_jump_tables(ae, L_returnError, L_returnR11, L_bigCaseFixupAndReturn, &big_jump_table, - &small_jump_table, _masm); + setup_jump_tables(ae, L_returnError, L_returnR11, L_bigCaseFixupAndReturn, big_jump_table, + small_jump_table, _masm); //////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////// @@ -422,7 +447,7 @@ static void generate_string_indexof_stubs(StubGenerator *stubgen, address *fnptr __ leaq(r13, Address(save_ndl_len, -1)); __ cmpq(r13, NUMBER_OF_CASES - 1); __ ja(L_smallCaseDefault); - __ lea(r15, InternalAddress(small_jump_table)); + __ lea(r15, ExternalAddress((address)small_jump_table)); __ jmp(Address(r15, r13, Address::times_8)); // Dispatch to handlers for small needle and large haystack @@ -431,7 +456,7 @@ static void generate_string_indexof_stubs(StubGenerator *stubgen, address *fnptr __ leaq(rax, Address(save_ndl_len, -1)); __ cmpq(rax, NUMBER_OF_CASES - 1); __ ja(L_bigCaseDefault); - __ lea(r15, InternalAddress(big_jump_table)); + __ lea(r15, ExternalAddress((address)big_jump_table)); __ jmp(Address(r15, rax, Address::times_8)); //////////////////////////////////////////////////////////////////////////////////////// @@ -942,6 +967,23 @@ static void generate_string_indexof_stubs(StubGenerator *stubgen, address *fnptr } } + // Record and possibly cache the entry address. In the latter case + // the target addresses installed into the jump tables also need to + // be cached, as extra addresses rather than secondary entries + // because they are only used internally to this stub. + + for (int i = 0; i < NUMBER_OF_CASES; i++) { + extras.append(big_jump_table[i]); + } + for (int i = 0; i < NUMBER_OF_CASES; i++) { + extras.append(small_jump_table[i]); + } + stubgen->store_archive_data(stub_id, start, __ pc(), nullptr, &extras); + + // x86 consumes the stub via a shared (i.e. non-cpu specific) static + // array + fnptrs[ae] = start; + return; } @@ -1722,8 +1764,8 @@ static void copy_to_stack(Register haystack, Register haystack_len, bool isU, // L_error - Label to branch to if no match found // L_checkRange - label to jump to when match found. Checks validity of returned index // L_fixup - Jump to here for big cases. Return value is pointer to matching haystack byte -// *big_jump_table - Address of pointer to the first element of big jump table -// *small_jump_table - Address of pointer to the first element of small jump table +// big_jump_table - jump table to be populated with jump addresses +// small_jump_table - jump table to be populated with jump addresses // _masm - Current MacroAssembler instance pointer static void setup_jump_tables(StrIntrinsicNode::ArgEncoding ae, Label &L_error, Label &L_checkRange, @@ -1734,8 +1776,6 @@ static void setup_jump_tables(StrIntrinsicNode::ArgEncoding ae, Label &L_error, bool isU = isUL || isUU; // At least one is UTF-16 const XMMRegister byte_1 = XMM_BYTE_1; - address big_hs_jmp_table[NUMBER_OF_CASES]; // Jump table for large haystacks - address small_hs_jmp_table[NUMBER_OF_CASES]; // Jump table for small haystacks int jmp_ndx = 0; //////////////////////////////////////////////// @@ -1786,7 +1826,7 @@ static void setup_jump_tables(StrIntrinsicNode::ArgEncoding ae, Label &L_error, const Register rTmp = rax; for (int i = 6; i < NUMBER_OF_CASES; i++) { - small_hs_jmp_table[i] = __ pc(); + small_jump_table[i] = __ pc(); if (isU && ((i + 1) & 1)) { continue; } else { @@ -1830,7 +1870,7 @@ static void setup_jump_tables(StrIntrinsicNode::ArgEncoding ae, Label &L_error, const Register rTmp4 = r13; for (int i = 0; i < NUMBER_OF_CASES; i++) { - big_hs_jmp_table[i] = __ pc(); + big_jump_table[i] = __ pc(); if (isU && ((i + 1) & 1)) { continue; } else { @@ -1843,24 +1883,6 @@ static void setup_jump_tables(StrIntrinsicNode::ArgEncoding ae, Label &L_error, } } } - //////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////// - // JUMP TABLES - __ align(8); - - *big_jump_table = __ pc(); - - for (jmp_ndx = 0; jmp_ndx < NUMBER_OF_CASES; jmp_ndx++) { - __ emit_address(big_hs_jmp_table[jmp_ndx]); - } - - *small_jump_table = __ pc(); - - for (jmp_ndx = 0; jmp_ndx < NUMBER_OF_CASES; jmp_ndx++) { - __ emit_address(small_hs_jmp_table[jmp_ndx]); - } } #undef STACK_SPACE diff --git a/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp b/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp index 215dc30f7fd..731eef09c37 100644 --- a/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp @@ -362,6 +362,11 @@ void BarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register __ jcc(Assembler::zero, error); // if klass is null it is broken } +void BarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, Label& slowpath) { + // Load the oop from the weak handle without barriers. + __ movptr(obj, Address(weak_handle)); +} + #ifdef COMPILER2 OptoReg::Name BarrierSetAssembler::refine_register(const Node* node, OptoReg::Name opto_reg) { @@ -395,11 +400,6 @@ OptoReg::Name BarrierSetAssembler::refine_register(const Node* node, OptoReg::Na extern void vec_spill_helper(C2_MacroAssembler *masm, bool is_load, int stack_offset, int reg, uint ireg, outputStream* st); -void BarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Label& slowpath) { - // Load the oop from the weak handle. - __ movptr(obj, Address(obj)); -} - #undef __ #define __ _masm-> diff --git a/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.hpp b/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.hpp index 6aff29850e3..caf341dcdf3 100644 --- a/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.hpp +++ b/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.hpp @@ -106,11 +106,13 @@ public: virtual void check_oop(MacroAssembler* masm, Register obj, Register tmp1, Register tmp2, Label& error); + // See AS_NO_KEEPALIVE for peek semantics + // weak_handle and obj may alias + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, Label& slowpath); + #ifdef COMPILER2 OptoReg::Name refine_register(const Node* node, OptoReg::Name opto_reg); - - virtual void try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Label& slowpath); #endif // COMPILER2 }; diff --git a/src/hotspot/cpu/x86/gc/shenandoah/c1/shenandoahBarrierSetC1_x86.cpp b/src/hotspot/cpu/x86/gc/shenandoah/c1/shenandoahBarrierSetC1_x86.cpp deleted file mode 100644 index 66fb4cbb8c7..00000000000 --- a/src/hotspot/cpu/x86/gc/shenandoah/c1/shenandoahBarrierSetC1_x86.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2018, 2021, Red Hat, Inc. All rights reserved. - * 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 "c1/c1_LIRAssembler.hpp" -#include "c1/c1_MacroAssembler.hpp" -#include "gc/shared/gc_globals.hpp" -#include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp" -#include "gc/shenandoah/shenandoahBarrierSet.hpp" -#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp" - -#define __ masm->masm()-> - -void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) { - Register addr = _addr->is_single_cpu() ? _addr->as_register() : _addr->as_register_lo(); - Register newval = _new_value->as_register(); - Register cmpval = _cmp_value->as_register(); - Register tmp1 = _tmp1->as_register(); - Register tmp2 = _tmp2->as_register(); - Register result = result_opr()->as_register(); - assert(cmpval == rax, "wrong register"); - assert(newval != noreg, "new val must be register"); - assert(cmpval != newval, "cmp and new values must be in different registers"); - assert(cmpval != addr, "cmp and addr must be in different registers"); - assert(newval != addr, "new value and addr must be in different registers"); - - if (UseCompressedOops) { - __ encode_heap_oop(cmpval); - __ mov(rscratch1, newval); - __ encode_heap_oop(rscratch1); - newval = rscratch1; - } - - ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), result, Address(addr, 0), cmpval, newval, false, tmp1, tmp2); -} - -#undef __ - -#ifdef ASSERT -#define __ gen->lir(__FILE__, __LINE__)-> -#else -#define __ gen->lir()-> -#endif - -LIR_Opr ShenandoahBarrierSetC1::atomic_cmpxchg_at_resolved(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value) { - - if (access.is_oop()) { - LIRGenerator* gen = access.gen(); - if (ShenandoahSATBBarrier) { - pre_barrier(gen, access.access_emit_info(), access.decorators(), access.resolved_addr(), - LIR_OprFact::illegalOpr /* pre_val */); - } - if (ShenandoahCASBarrier) { - cmp_value.load_item_force(FrameMap::rax_oop_opr); - new_value.load_item(); - - LIR_Opr t1 = gen->new_register(T_OBJECT); - LIR_Opr t2 = gen->new_register(T_OBJECT); - LIR_Opr addr = access.resolved_addr()->as_address_ptr()->base(); - LIR_Opr result = gen->new_register(T_INT); - - __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, result)); - - if (ShenandoahCardBarrier) { - post_barrier(access, access.resolved_addr(), new_value.result()); - } - return result; - } - } - return BarrierSetC1::atomic_cmpxchg_at_resolved(access, cmp_value, new_value); -} - -LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value) { - LIRGenerator* gen = access.gen(); - BasicType type = access.type(); - - LIR_Opr result = gen->new_register(type); - value.load_item(); - LIR_Opr value_opr = value.result(); - - // Because we want a 2-arg form of xchg and xadd - __ move(value_opr, result); - - assert(type == T_INT || is_reference_type(type) || type == T_LONG, "unexpected type"); - __ xchg(access.resolved_addr(), result, result, LIR_OprFact::illegalOpr); - - if (access.is_oop()) { - result = load_reference_barrier(access.gen(), result, LIR_OprFact::addressConst(0), access.decorators()); - LIR_Opr tmp = gen->new_register(type); - __ move(result, tmp); - result = tmp; - if (ShenandoahSATBBarrier) { - pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr, - result /* pre_val */); - } - if (ShenandoahCardBarrier) { - post_barrier(access, access.resolved_addr(), result); - } - } - - return result; -} diff --git a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp index 67510fac58f..1df8de2352d 100644 --- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp @@ -45,47 +45,6 @@ #define __ masm-> -static void save_machine_state(MacroAssembler* masm, bool handle_gpr, bool handle_fp) { - if (handle_gpr) { - __ push_IU_state(); - } - - if (handle_fp) { - // Some paths can be reached from the c2i adapter with live fp arguments in registers. - assert(Argument::n_float_register_parameters_j == 8, "8 fp registers to save at java call"); - - const int xmm_size = wordSize * 2; - __ subptr(rsp, xmm_size * 8); - __ movdbl(Address(rsp, xmm_size * 0), xmm0); - __ movdbl(Address(rsp, xmm_size * 1), xmm1); - __ movdbl(Address(rsp, xmm_size * 2), xmm2); - __ movdbl(Address(rsp, xmm_size * 3), xmm3); - __ movdbl(Address(rsp, xmm_size * 4), xmm4); - __ movdbl(Address(rsp, xmm_size * 5), xmm5); - __ movdbl(Address(rsp, xmm_size * 6), xmm6); - __ movdbl(Address(rsp, xmm_size * 7), xmm7); - } -} - -static void restore_machine_state(MacroAssembler* masm, bool handle_gpr, bool handle_fp) { - if (handle_fp) { - const int xmm_size = wordSize * 2; - __ movdbl(xmm0, Address(rsp, xmm_size * 0)); - __ movdbl(xmm1, Address(rsp, xmm_size * 1)); - __ movdbl(xmm2, Address(rsp, xmm_size * 2)); - __ movdbl(xmm3, Address(rsp, xmm_size * 3)); - __ movdbl(xmm4, Address(rsp, xmm_size * 4)); - __ movdbl(xmm5, Address(rsp, xmm_size * 5)); - __ movdbl(xmm6, Address(rsp, xmm_size * 6)); - __ movdbl(xmm7, Address(rsp, xmm_size * 7)); - __ addptr(rsp, xmm_size * 8); - } - - if (handle_gpr) { - __ pop_IU_state(); - } -} - void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, BasicType type, Register src, Register dst, Register count) { @@ -130,20 +89,27 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec __ testb(gc_state, flags); __ jcc(Assembler::zero, L_done); - save_machine_state(masm, /* handle_gpr = */ true, /* handle_fp = */ false); - - assert(src == rdi, "expected"); - assert(dst == rsi, "expected"); - assert(count == rdx, "expected"); - if (UseCompressedOops) { - __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_narrow_oop), - src, dst, count); - } else { - __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_oop), - src, dst, count); + __ push_call_clobbered_registers(/* save_fpu = */ false); + // If arguments are not in proper places, shuffle them. + // Doing this via the stack is the most straight-forward way to avoid + // accidentally smashing any register. + if (c_rarg0 != src || c_rarg1 != dst || c_rarg2 != count) { + __ push(src); + __ push(dst); + __ push(count); + __ pop(c_rarg2); + __ pop(c_rarg1); + __ pop(c_rarg0); } + address target = nullptr; + if (UseCompressedOops) { + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_narrow_oop); + } else { + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_oop); + } + __ call_VM_leaf(target, 3); - restore_machine_state(masm, /* handle_gpr = */ true, /* handle_fp = */ false); + __ pop_call_clobbered_registers(/* restore_fpu = */ false); __ bind(L_done); } @@ -178,15 +144,8 @@ void ShenandoahBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, Dec void ShenandoahBarrierSetAssembler::satb_barrier(MacroAssembler* masm, Register obj, Register pre_val, - Register tmp, - bool tosca_live, - bool expand_call) { + Register tmp) { assert(ShenandoahSATBBarrier, "Should be checked by caller"); - - // If expand_call is true then we expand the call_VM_leaf macro - // directly to skip generating the check by - // InterpreterMacroAssembler::call_VM_leaf_base that checks _last_sp. - const Register thread = r15_thread; Label done; @@ -208,7 +167,12 @@ void ShenandoahBarrierSetAssembler::satb_barrier(MacroAssembler* masm, // Do we need to load the previous value? if (obj != noreg) { - __ load_heap_oop(pre_val, Address(obj, 0), noreg, AS_RAW); + if (UseCompressedOops) { + __ movl(pre_val, Address(obj, 0)); + __ decode_heap_oop(pre_val); + } else { + __ movq(pre_val, Address(obj, 0)); + } } // Is the previous value null? @@ -232,54 +196,22 @@ void ShenandoahBarrierSetAssembler::satb_barrier(MacroAssembler* masm, __ jmp(done); __ bind(runtime); - // save the live input values - if(tosca_live) __ push(rax); - if (obj != noreg && obj != rax) - __ push(obj); + // Slow-path call. + // Some paths can be reached from the c2i adapter with live fp arguments in registers. + __ enter(); + __ push_call_clobbered_registers(/* save_fpu = */ true); - if (pre_val != rax) - __ push(pre_val); - - // Calling the runtime using the regular call_VM_leaf mechanism generates - // code (generated by InterpreterMacroAssember::call_VM_leaf_base) - // that checks that the *(ebp+frame::interpreter_frame_last_sp) == nullptr. - // - // If we care generating the pre-barrier without a frame (e.g. in the - // intrinsified Reference.get() routine) then ebp might be pointing to - // the caller frame and so this check will most likely fail at runtime. - // - // Expanding the call directly bypasses the generation of the check. - // So when we do not have have a full interpreter frame on the stack - // expand_call should be passed true. - - // We move pre_val into c_rarg0 early, in order to avoid smashing it, should - // pre_val be c_rarg1 (where the call prologue would copy thread argument). - // Note: this should not accidentally smash thread, because thread is always r15. assert(thread != c_rarg0, "smashed arg"); if (c_rarg0 != pre_val) { __ mov(c_rarg0, pre_val); } - if (expand_call) { - assert(pre_val != c_rarg1, "smashed arg"); - if (c_rarg1 != thread) { - __ mov(c_rarg1, thread); - } - // Already moved pre_val into c_rarg0 above - __ MacroAssembler::call_VM_leaf_base(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_barrier_pre), 1); - } else { - __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_barrier_pre), c_rarg0); - } + // Calling with super_call_VM_leaf with c_rarg0 bypasses interpreter checks and avoids any moves. + __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_barrier_pre), c_rarg0); - // save the live input values - if (pre_val != rax) - __ pop(pre_val); - - if (obj != noreg && obj != rax) - __ pop(obj); - - if(tosca_live) __ pop(rax); + __ pop_call_clobbered_registers(/* restore_fpu = */ true); + __ leave(); __ bind(done); } @@ -312,9 +244,9 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm, if (is_strong) { // Test for object in cset // Allocate temporary registers - for (int i = 0; i < 8; i++) { + for (int i = 0; i < Register::available_gp_registers(); i++) { Register r = as_Register(i); - if (r != rsp && r != rbp && r != dst && r != src.base() && r != src.index()) { + if (r != rsp && r != rbp && r != rcx && r != dst && r != src.base() && r != src.index() ) { if (tmp1 == noreg) { tmp1 = r; } else { @@ -333,118 +265,69 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm, // Optimized cset-test __ movptr(tmp1, dst); - __ shrptr(tmp1, ShenandoahHeapRegion::region_size_bytes_shift_jint()); - __ movptr(tmp2, (intptr_t) ShenandoahHeap::in_cset_fast_test_addr()); + if (AOTCodeCache::is_on_for_dump()) { + assert_different_registers(tmp1, tmp2, rcx); + __ lea(tmp2, ExternalAddress(AOTRuntimeConstants::grain_shift_address())); + __ push(rcx); + __ movb(rcx, Address(tmp2)); + __ shrptr(tmp1); + __ pop(rcx); + __ lea(tmp2, ExternalAddress(AOTRuntimeConstants::cset_base_address())); + __ movptr(tmp2, Address(tmp2)); + } else { + __ shrptr(tmp1, ShenandoahHeapRegion::region_size_bytes_shift_jint()); + __ movptr(tmp2, (intptr_t) ShenandoahHeap::in_cset_fast_test_addr()); + } __ movbool(tmp1, Address(tmp1, tmp2, Address::times_1)); __ testbool(tmp1); __ jcc(Assembler::zero, not_cset); } - save_machine_state(masm, /* handle_gpr = */ false, /* handle_fp = */ true); - - // The rest is saved with the optimized path - - uint num_saved_regs = 4 + (dst != rax ? 1 : 0) + 4 + (UseAPX ? 16 : 0); - __ subptr(rsp, num_saved_regs * wordSize); - uint slot = num_saved_regs; + // Slow-path call. + // Save registers that can be clobbered by call. + // Some paths can be reached from the c2i adapter with live fp arguments in registers. + __ enter(); if (dst != rax) { - __ movptr(Address(rsp, (--slot) * wordSize), rax); + __ push(rax); } - __ movptr(Address(rsp, (--slot) * wordSize), rcx); - __ movptr(Address(rsp, (--slot) * wordSize), rdx); - __ movptr(Address(rsp, (--slot) * wordSize), rdi); - __ movptr(Address(rsp, (--slot) * wordSize), rsi); - __ movptr(Address(rsp, (--slot) * wordSize), r8); - __ movptr(Address(rsp, (--slot) * wordSize), r9); - __ movptr(Address(rsp, (--slot) * wordSize), r10); - __ movptr(Address(rsp, (--slot) * wordSize), r11); - // Save APX extended registers r16–r31 if enabled - if (UseAPX) { - __ movptr(Address(rsp, (--slot) * wordSize), r16); - __ movptr(Address(rsp, (--slot) * wordSize), r17); - __ movptr(Address(rsp, (--slot) * wordSize), r18); - __ movptr(Address(rsp, (--slot) * wordSize), r19); - __ movptr(Address(rsp, (--slot) * wordSize), r20); - __ movptr(Address(rsp, (--slot) * wordSize), r21); - __ movptr(Address(rsp, (--slot) * wordSize), r22); - __ movptr(Address(rsp, (--slot) * wordSize), r23); - __ movptr(Address(rsp, (--slot) * wordSize), r24); - __ movptr(Address(rsp, (--slot) * wordSize), r25); - __ movptr(Address(rsp, (--slot) * wordSize), r26); - __ movptr(Address(rsp, (--slot) * wordSize), r27); - __ movptr(Address(rsp, (--slot) * wordSize), r28); - __ movptr(Address(rsp, (--slot) * wordSize), r29); - __ movptr(Address(rsp, (--slot) * wordSize), r30); - __ movptr(Address(rsp, (--slot) * wordSize), r31); - } - // r12-r15 are callee saved in all calling conventions - assert(slot == 0, "must use all slots"); + __ push_call_clobbered_registers_except(rax, /* save_fpu = */ true); // Shuffle registers such that dst is in c_rarg0 and addr in c_rarg1. - Register arg0 = c_rarg0, arg1 = c_rarg1; - if (dst == arg1) { - __ lea(arg0, src); - __ xchgptr(arg1, arg0); + if (dst == c_rarg1) { + __ lea(c_rarg0, src); + __ xchgptr(c_rarg1, c_rarg0); } else { - __ lea(arg1, src); - __ movptr(arg0, dst); + __ lea(c_rarg1, src); + __ movptr(c_rarg0, dst); } + address target = nullptr; if (is_strong) { if (is_narrow) { - __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong_narrow), arg0, arg1); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong_narrow); } else { - __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong), arg0, arg1); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong); } } else if (is_weak) { if (is_narrow) { - __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak_narrow), arg0, arg1); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak_narrow); } else { - __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak), arg0, arg1); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak); } } else { assert(is_phantom, "only remaining strength"); assert(!is_narrow, "phantom access cannot be narrow"); - __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom), arg0, arg1); + target = CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom); } - // Restore APX extended registers r31–r16 if previously saved - if (UseAPX) { - __ movptr(r31, Address(rsp, (slot++) * wordSize)); - __ movptr(r30, Address(rsp, (slot++) * wordSize)); - __ movptr(r29, Address(rsp, (slot++) * wordSize)); - __ movptr(r28, Address(rsp, (slot++) * wordSize)); - __ movptr(r27, Address(rsp, (slot++) * wordSize)); - __ movptr(r26, Address(rsp, (slot++) * wordSize)); - __ movptr(r25, Address(rsp, (slot++) * wordSize)); - __ movptr(r24, Address(rsp, (slot++) * wordSize)); - __ movptr(r23, Address(rsp, (slot++) * wordSize)); - __ movptr(r22, Address(rsp, (slot++) * wordSize)); - __ movptr(r21, Address(rsp, (slot++) * wordSize)); - __ movptr(r20, Address(rsp, (slot++) * wordSize)); - __ movptr(r19, Address(rsp, (slot++) * wordSize)); - __ movptr(r18, Address(rsp, (slot++) * wordSize)); - __ movptr(r17, Address(rsp, (slot++) * wordSize)); - __ movptr(r16, Address(rsp, (slot++) * wordSize)); - } - __ movptr(r11, Address(rsp, (slot++) * wordSize)); - __ movptr(r10, Address(rsp, (slot++) * wordSize)); - __ movptr(r9, Address(rsp, (slot++) * wordSize)); - __ movptr(r8, Address(rsp, (slot++) * wordSize)); - __ movptr(rsi, Address(rsp, (slot++) * wordSize)); - __ movptr(rdi, Address(rsp, (slot++) * wordSize)); - __ movptr(rdx, Address(rsp, (slot++) * wordSize)); - __ movptr(rcx, Address(rsp, (slot++) * wordSize)); - + // Calling with super_call_VM_leaf with c_rarg0/1 bypasses interpreter checks and avoids any moves. + __ super_call_VM_leaf(target, c_rarg0, c_rarg1); + __ pop_call_clobbered_registers_except(rax, /* restore_fpu = */ true); if (dst != rax) { __ movptr(dst, rax); - __ movptr(rax, Address(rsp, (slot++) * wordSize)); + __ pop(rax); } - - assert(slot == num_saved_regs, "must use all slots"); - __ addptr(rsp, num_saved_regs * wordSize); - - restore_machine_state(masm, /* handle_gpr = */ false, /* handle_fp = */ true); + __ leave(); __ bind(not_cset); @@ -519,19 +402,10 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d // 3: apply keep-alive barrier if needed if (ShenandoahBarrierSet::need_keep_alive_barrier(decorators, type)) { - save_machine_state(masm, /* handle_gpr = */ true, /* handle_fp = */ true); - - assert_different_registers(dst, tmp1, r15_thread); - // Generate the SATB pre-barrier code to log the value of - // the referent field in an SATB buffer. satb_barrier(masm /* masm */, noreg /* obj */, dst /* pre_val */, - tmp1 /* tmp */, - true /* tosca_live */, - true /* expand_call */); - - restore_machine_state(masm, /* handle_gpr = */ true, /* handle_fp = */ true); + tmp1 /* tmp */); } } @@ -582,22 +456,19 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet __ lea(tmp1, dst); } - bool storing_non_null = (val != noreg); - // 2: pre-barrier: SATB needs the previous value if (ShenandoahBarrierSet::need_satb_barrier(decorators, type)) { satb_barrier(masm, tmp1 /* obj */, tmp2 /* pre_val */, - tmp3 /* tmp */, - storing_non_null /* tosca_live */, - false /* expand_call */); + tmp3 /* tmp */); } // Store! BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg, noreg); // 3: post-barrier: card barrier needs store address + bool storing_non_null = (val != noreg); if (ShenandoahBarrierSet::need_card_barrier(decorators, type) && storing_non_null) { card_barrier(masm, tmp1); } @@ -619,12 +490,11 @@ void ShenandoahBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler __ bind(done); } -#ifdef COMPILER2 -void ShenandoahBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Label& slowpath) { +void ShenandoahBarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, Label& slowpath) { Label done; - // Resolve weak handle using the standard implementation. - BarrierSetAssembler::try_resolve_weak_handle_in_c2(masm, obj, slowpath); + // Peek weak handle using the standard implementation. + BarrierSetAssembler::try_peek_weak_handle_in_nmethod(masm, weak_handle, obj, slowpath); // Check if the reference is null, and if it is, take the fast path. __ testptr(obj, obj); @@ -638,7 +508,6 @@ void ShenandoahBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler __ jcc(Assembler::notZero, slowpath); __ bind(done); } -#endif // COMPILER2 // Special Shenandoah CAS implementation that handles false negatives // due to concurrent evacuation. @@ -886,8 +755,27 @@ void ShenandoahBarrierSetAssembler::gen_load_reference_barrier_stub(LIR_Assemble if (is_strong) { // Check for object being in the collection set. __ mov(tmp1, res); - __ shrptr(tmp1, ShenandoahHeapRegion::region_size_bytes_shift_jint()); - __ movptr(tmp2, (intptr_t) ShenandoahHeap::in_cset_fast_test_addr()); + if (AOTCodeCache::is_on_for_dump()) { + __ push(rcx); + __ lea(rcx, ExternalAddress(AOTRuntimeConstants::grain_shift_address())); + __ movl(rcx, Address(rcx)); + if (tmp1 != rcx) { + __ mov(tmp1, res); + __ shrptr(tmp1); + __ pop(rcx); + } else { + assert_different_registers(tmp2, rcx); + __ mov(tmp2, res); + __ shrptr(tmp2); + __ pop(rcx); + __ movptr(tmp1, tmp2); + } + __ lea(tmp2, ExternalAddress(AOTRuntimeConstants::cset_base_address())); + __ movptr(tmp2, Address(tmp2)); + } else { + __ shrptr(tmp1, ShenandoahHeapRegion::region_size_bytes_shift_jint()); + __ movptr(tmp2, (intptr_t) ShenandoahHeap::in_cset_fast_test_addr()); + } __ movbool(tmp2, Address(tmp2, tmp1, Address::times_1)); __ testbool(tmp2); __ jcc(Assembler::zero, *stub->continuation()); diff --git a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.hpp b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.hpp index 79540aa19e1..85fb98fa15c 100644 --- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.hpp +++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.hpp @@ -45,9 +45,7 @@ private: void satb_barrier(MacroAssembler* masm, Register obj, Register pre_val, - Register tmp, - bool tosca_live, - bool expand_call); + Register tmp); void card_barrier(MacroAssembler* masm, Register obj); @@ -78,9 +76,7 @@ public: Address dst, Register val, Register tmp1, Register tmp2, Register tmp3); virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env, Register obj, Register tmp, Label& slowpath); -#ifdef COMPILER2 - virtual void try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Label& slowpath); -#endif // COMPILER2 + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, Label& slowpath); }; #endif // CPU_X86_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_X86_HPP diff --git a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp index c20551b5084..3301d6ace49 100644 --- a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp @@ -1329,9 +1329,14 @@ void ZBarrierSetAssembler::generate_c2_store_barrier_stub(MacroAssembler* masm, __ jmp(slow_continuation); } -void ZBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Label& slow_path) { - // Resolve weak handle using the standard implementation. - BarrierSetAssembler::try_resolve_weak_handle_in_c2(masm, obj, slow_path); +#endif // COMPILER2 + +#undef __ +#define __ masm-> + +void ZBarrierSetAssembler::try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, Label& slow_path) { + // Peek weak handle using the standard implementation. + BarrierSetAssembler::try_peek_weak_handle_in_nmethod(masm, weak_handle, obj, slow_path); // Check if the oop is bad, in which case we need to take the slow path. __ testptr(obj, Address(r15_thread, ZThreadLocalData::mark_bad_mask_offset())); @@ -1343,7 +1348,6 @@ void ZBarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, R } #undef __ -#endif // COMPILER2 static int patch_barrier_relocation_offset(int format) { switch (format) { diff --git a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.hpp b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.hpp index ce0c4769716..476a316b2e1 100644 --- a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.hpp +++ b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.hpp @@ -167,10 +167,10 @@ public: ZLoadBarrierStubC2* stub) const; void generate_c2_store_barrier_stub(MacroAssembler* masm, ZStoreBarrierStubC2* stub) const; - - virtual void try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Label& slow_path); #endif // COMPILER2 + virtual void try_peek_weak_handle_in_nmethod(MacroAssembler* masm, Register weak_handle, Register obj, Label& slow_path); + void store_barrier_fast(MacroAssembler* masm, Address ref_addr, Register rnew_persistent, diff --git a/src/hotspot/cpu/x86/macroAssembler_x86.cpp b/src/hotspot/cpu/x86/macroAssembler_x86.cpp index 5ab3ca339aa..f64c4d3f086 100644 --- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp @@ -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 @@ -2540,6 +2541,17 @@ void MacroAssembler::sign_extend_short(Register reg) { 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); @@ -6955,7 +6967,7 @@ void MacroAssembler::vectorized_mismatch(Register obja, Register objb, Register xorq(result, result); if ((AVX3Threshold == 0) && (UseAVX > 2) && - VM_Version::supports_avx512vlbw()) { + VM_Version::supports_avx512vlbw() && UseCountTrailingZerosInstruction) { Label VECTOR64_LOOP, VECTOR64_NOT_EQUAL, VECTOR32_TAIL; cmpq(length, 64); diff --git a/src/hotspot/cpu/x86/macroAssembler_x86.hpp b/src/hotspot/cpu/x86/macroAssembler_x86.hpp index 021d2943ee8..b73339c217f 100644 --- a/src/hotspot/cpu/x86/macroAssembler_x86.hpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86.hpp @@ -444,6 +444,9 @@ class MacroAssembler: public Assembler { 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 --git a/src/hotspot/cpu/x86/methodHandles_x86.hpp b/src/hotspot/cpu/x86/methodHandles_x86.hpp index 83b59834261..c4dde903d29 100644 --- a/src/hotspot/cpu/x86/methodHandles_x86.hpp +++ b/src/hotspot/cpu/x86/methodHandles_x86.hpp @@ -27,7 +27,7 @@ // Adapters enum /* platform_dependent_constants */ { - adapter_code_size = 4000 DEBUG_ONLY(+ 6000) + adapter_code_size = 6000 DEBUG_ONLY(+ 6000) }; // Additional helper methods for MethodHandles code generation: diff --git a/src/hotspot/cpu/x86/nativeInst_x86.hpp b/src/hotspot/cpu/x86/nativeInst_x86.hpp index aba4400515f..cbb72508cc1 100644 --- a/src/hotspot/cpu/x86/nativeInst_x86.hpp +++ b/src/hotspot/cpu/x86/nativeInst_x86.hpp @@ -97,11 +97,7 @@ class NativeInstruction { }; inline NativeInstruction* nativeInstruction_at(address address) { - NativeInstruction* inst = (NativeInstruction*)address; -#ifdef ASSERT - //inst->verify(); -#endif - return inst; + return (NativeInstruction*)address; } class NativeCall; diff --git a/src/hotspot/cpu/x86/peephole_x86_64.cpp b/src/hotspot/cpu/x86/peephole_x86_64.cpp index 5fc39e163e1..9dccea8515e 100644 --- a/src/hotspot/cpu/x86/peephole_x86_64.cpp +++ b/src/hotspot/cpu/x86/peephole_x86_64.cpp @@ -25,6 +25,7 @@ #ifdef COMPILER2 #include "opto/addnode.hpp" +#include "opto/compile.hpp" #include "peephole_x86_64.hpp" #include "adfiles/ad_x86.hpp" @@ -343,10 +344,15 @@ bool Peephole::lea_remove_redundant(Block* block, int block_index, PhaseCFG* cfg cfg_->map_node_to_block(proj, nullptr); // Rewire the base of all leas currently depending on the decode we are removing. + // Use top() rather than a real value: leaP* emission does not consult Base, and the + // unused MachProj of decode confirms the derived oops produced by these leaP*s are + // not consumed by any OopMap. Avoiding a real input here also avoids creating a + // register conflict that would later be flagged by verify_good_schedule. + Node* top = Compile::current()->top(); for (DUIterator_Fast imax, i = decode->fast_outs(imax); i < imax; i++) { Node* dependant_lea = decode->fast_out(i); if (dependant_lea->is_Mach() && dependant_lea->as_Mach()->ideal_Opcode() == Op_AddP) { - dependant_lea->set_req(AddPNode::Base, lea_derived_oop->in(AddPNode::Address)); + dependant_lea->set_req(AddPNode::Base, top); // This deleted something in the out array, hence adjust i, imax. --i; --imax; diff --git a/src/hotspot/cpu/x86/stubDeclarations_x86.hpp b/src/hotspot/cpu/x86/stubDeclarations_x86.hpp index 24886deb3c5..031e95170cc 100644 --- a/src/hotspot/cpu/x86/stubDeclarations_x86.hpp +++ b/src/hotspot/cpu/x86/stubDeclarations_x86.hpp @@ -178,8 +178,17 @@ /* other arches use arch-specific entries */ \ /* this really needs rationalising */ \ do_stub(compiler, string_indexof_linear_ll) \ + do_arch_entry(x86, compiler, string_indexof_linear_ll, \ + string_indexof_linear_ll, \ + string_indexof_linear_ll) \ do_stub(compiler, string_indexof_linear_uu) \ + do_arch_entry(x86, compiler, string_indexof_linear_uu, \ + string_indexof_linear_uu, \ + string_indexof_linear_uu) \ do_stub(compiler, string_indexof_linear_ul) \ + do_arch_entry(x86, compiler, string_indexof_linear_ul, \ + string_indexof_linear_ul, \ + string_indexof_linear_ul) \ do_stub(compiler, pshuffle_byte_flip_mask_sha512) \ do_arch_entry(x86, compiler, pshuffle_byte_flip_mask_sha512, \ pshuffle_byte_flip_mask_addr_sha512, \ diff --git a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp index 993d1964034..b0612d21437 100644 --- a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp +++ b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp @@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -4891,7 +4891,7 @@ void StubGenerator::generate_compiler_stubs() { StubRoutines::_data_cache_writeback_sync = generate_data_cache_writeback_sync(); #ifdef COMPILER2 - if ((UseAVX == 2) && EnableX86ECoreOpts) { + if ((UseAVX == 2) && EnableX86ECoreOpts && UseCountTrailingZerosInstruction) { generate_string_indexof(StubRoutines::_string_indexof_array); } #endif diff --git a/src/hotspot/cpu/x86/stubGenerator_x86_64_kyber.cpp b/src/hotspot/cpu/x86/stubGenerator_x86_64_kyber.cpp index 347a9b936a8..13b1c942213 100644 --- a/src/hotspot/cpu/x86/stubGenerator_x86_64_kyber.cpp +++ b/src/hotspot/cpu/x86/stubGenerator_x86_64_kyber.cpp @@ -957,6 +957,9 @@ address generate_kyber12To16_avx512(StubGenerator *stubgen, __ mov64(rax, 0); // return 0 __ ret(0); + // record the stub entry and end + stubgen->store_archive_data(stub_id, start, __ pc()); + return start; } diff --git a/src/hotspot/cpu/x86/stubRoutines_x86.cpp b/src/hotspot/cpu/x86/stubRoutines_x86.cpp index ce11925dde2..63851ab69ec 100644 --- a/src/hotspot/cpu/x86/stubRoutines_x86.cpp +++ b/src/hotspot/cpu/x86/stubRoutines_x86.cpp @@ -420,6 +420,12 @@ ATTRIBUTE_ALIGNED(64) const julong StubRoutines::x86::_k512_W[] = 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL, }; +ATTRIBUTE_ALIGNED(64) +address StubRoutines::x86::small_jump_table[STRING_INDEXOF_TABLE_COUNT * STRING_INDEXOF_NUMBER_OF_CASES] = { nullptr, }; + +ATTRIBUTE_ALIGNED(64) +address StubRoutines::x86::big_jump_table[STRING_INDEXOF_TABLE_COUNT * STRING_INDEXOF_NUMBER_OF_CASES] = { nullptr, }; + #if INCLUDE_CDS void StubRoutines::init_AOTAddressTable() { @@ -459,6 +465,12 @@ void StubRoutines::x86::init_AOTAddressTable(GrowableArray
& external_ad ADD(_k256); ADD(_k256_W); ADD(_k512_W); + for (int i = 0; i < STRING_INDEXOF_TABLE_COUNT; i++) { + address a = (address)StubRoutines::x86::small_jump_table_base(i); + ADD(a); + a = (address)StubRoutines::x86::big_jump_table_base(i); + ADD(a); + } #undef ADD } #endif // INCLUDE_CDS diff --git a/src/hotspot/cpu/x86/stubRoutines_x86.hpp b/src/hotspot/cpu/x86/stubRoutines_x86.hpp index 7283798888b..0dce0f44cb9 100644 --- a/src/hotspot/cpu/x86/stubRoutines_x86.hpp +++ b/src/hotspot/cpu/x86/stubRoutines_x86.hpp @@ -118,6 +118,26 @@ public: static address k256_W_addr() { return _k256_W_adr; } static address k512_W_addr() { return _k512_W_addr; } + // declare storage for jump tables used by string index stubs + + // we assert this equals the number of tags in + // StrIntrinsicNode::ArgEncoding in code that uses the value to + // avoid having to inlcude opto headers here + static constexpr int STRING_INDEXOF_TABLE_COUNT = 4; + static constexpr int STRING_INDEXOF_NUMBER_OF_CASES = 10; + static address small_jump_table[STRING_INDEXOF_TABLE_COUNT * STRING_INDEXOF_NUMBER_OF_CASES]; + static address big_jump_table[STRING_INDEXOF_TABLE_COUNT * STRING_INDEXOF_NUMBER_OF_CASES]; + + static address *small_jump_table_base(int idx) { + assert(idx >= 0 && idx < STRING_INDEXOF_TABLE_COUNT, "invalid jump table index %d", idx); + return small_jump_table + (idx * STRING_INDEXOF_NUMBER_OF_CASES); + } + + static address *big_jump_table_base(int idx) { + assert(idx >= 0 && idx < STRING_INDEXOF_TABLE_COUNT, "invalid jump table index %d", idx); + return big_jump_table + (idx * STRING_INDEXOF_NUMBER_OF_CASES); + } + static address arrays_hashcode_powers_of_31() { return (address)_arrays_hashcode_powers_of_31; } static void generate_CRC32C_table(bool is_pclmulqdq_supported); diff --git a/src/hotspot/cpu/x86/vmStructs_x86.hpp b/src/hotspot/cpu/x86/vmStructs_x86.hpp index b8089a6413e..e0fcc7d375a 100644 --- a/src/hotspot/cpu/x86/vmStructs_x86.hpp +++ b/src/hotspot/cpu/x86/vmStructs_x86.hpp @@ -46,7 +46,7 @@ #define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant) -#define DECLARE_LONG_CPU_FEATURE_CONSTANT(id, name, bit) GENERATE_VM_LONG_CONSTANT_ENTRY(VM_Version::CPU_##id) +#define DECLARE_LONG_CPU_FEATURE_CONSTANT(id, name) GENERATE_VM_LONG_CONSTANT_ENTRY(VM_Version::CPU_##id) #define VM_LONG_CPU_FEATURE_CONSTANTS CPU_FEATURE_FLAGS(DECLARE_LONG_CPU_FEATURE_CONSTANT) #endif // CPU_X86_VMSTRUCTS_X86_HPP diff --git a/src/hotspot/cpu/x86/vm_version_x86.cpp b/src/hotspot/cpu/x86/vm_version_x86.cpp index cf9de40a237..80d88f2ecb8 100644 --- a/src/hotspot/cpu/x86/vm_version_x86.cpp +++ b/src/hotspot/cpu/x86/vm_version_x86.cpp @@ -48,7 +48,7 @@ int VM_Version::_stepping; bool VM_Version::_has_intel_jcc_erratum; VM_Version::CpuidInfo VM_Version::_cpuid_info = { 0, }; -#define DECLARE_CPU_FEATURE_NAME(id, name, bit) XSTR(name), +#define DECLARE_CPU_FEATURE_NAME(id, name) XSTR(name), const char* VM_Version::_features_names[] = { CPU_FEATURE_FLAGS(DECLARE_CPU_FEATURE_NAME)}; #undef DECLARE_CPU_FEATURE_NAME @@ -942,21 +942,21 @@ void VM_Version::get_processor_features() { } if (UseSSE < 4) { - _features.clear_feature(CPU_SSE4_1); - _features.clear_feature(CPU_SSE4_2); + clear_feature(CPU_SSE4_1); + clear_feature(CPU_SSE4_2); } if (UseSSE < 3) { - _features.clear_feature(CPU_SSE3); - _features.clear_feature(CPU_SSSE3); - _features.clear_feature(CPU_SSE4A); + clear_feature(CPU_SSE3); + clear_feature(CPU_SSSE3); + clear_feature(CPU_SSE4A); } if (UseSSE < 2) - _features.clear_feature(CPU_SSE2); + clear_feature(CPU_SSE2); if (UseSSE < 1) - _features.clear_feature(CPU_SSE); + clear_feature(CPU_SSE); // ZX cpus specific settings if (is_zx() && FLAG_IS_DEFAULT(UseAVX)) { @@ -1030,102 +1030,119 @@ void VM_Version::get_processor_features() { } if (UseAVX < 3) { - _features.clear_feature(CPU_AVX512F); - _features.clear_feature(CPU_AVX512DQ); - _features.clear_feature(CPU_AVX512CD); - _features.clear_feature(CPU_AVX512BW); - _features.clear_feature(CPU_AVX512ER); - _features.clear_feature(CPU_AVX512PF); - _features.clear_feature(CPU_AVX512VL); - _features.clear_feature(CPU_AVX512_VPOPCNTDQ); - _features.clear_feature(CPU_AVX512_VPCLMULQDQ); - _features.clear_feature(CPU_AVX512_VAES); - _features.clear_feature(CPU_AVX512_VNNI); - _features.clear_feature(CPU_AVX512_VBMI); - _features.clear_feature(CPU_AVX512_VBMI2); - _features.clear_feature(CPU_AVX512_BITALG); - _features.clear_feature(CPU_AVX512_IFMA); - _features.clear_feature(CPU_APX_F); - _features.clear_feature(CPU_AVX512_FP16); - _features.clear_feature(CPU_AVX10_1); - _features.clear_feature(CPU_AVX10_2); + clear_feature(CPU_AVX512F); + clear_feature(CPU_AVX512DQ); + clear_feature(CPU_AVX512CD); + clear_feature(CPU_AVX512BW); + clear_feature(CPU_AVX512ER); + clear_feature(CPU_AVX512PF); + clear_feature(CPU_AVX512VL); + clear_feature(CPU_AVX512_VPOPCNTDQ); + clear_feature(CPU_AVX512_VPCLMULQDQ); + clear_feature(CPU_AVX512_VAES); + clear_feature(CPU_AVX512_VNNI); + clear_feature(CPU_AVX512_VBMI); + clear_feature(CPU_AVX512_VBMI2); + clear_feature(CPU_AVX512_BITALG); + clear_feature(CPU_AVX512_IFMA); + clear_feature(CPU_APX_F); + clear_feature(CPU_AVX512_FP16); + clear_feature(CPU_AVX10_1); + clear_feature(CPU_AVX10_2); } if (UseAVX < 2) { - _features.clear_feature(CPU_AVX2); - _features.clear_feature(CPU_AVX_IFMA); + clear_feature(CPU_AVX2); + clear_feature(CPU_AVX_IFMA); } if (UseAVX < 1) { - _features.clear_feature(CPU_AVX); - _features.clear_feature(CPU_VZEROUPPER); - _features.clear_feature(CPU_F16C); - _features.clear_feature(CPU_SHA512); + clear_feature(CPU_AVX); + clear_feature(CPU_VZEROUPPER); + clear_feature(CPU_F16C); + clear_feature(CPU_SHA512); } if (logical_processors_per_package() == 1) { // HT processor could be installed on a system which doesn't support HT. - _features.clear_feature(CPU_HT); + clear_feature(CPU_HT); } if (is_intel()) { // Intel cpus specific settings if (is_knights_family()) { - _features.clear_feature(CPU_VZEROUPPER); - _features.clear_feature(CPU_AVX512BW); - _features.clear_feature(CPU_AVX512VL); - _features.clear_feature(CPU_APX_F); - _features.clear_feature(CPU_AVX512DQ); - _features.clear_feature(CPU_AVX512_VNNI); - _features.clear_feature(CPU_AVX512_VAES); - _features.clear_feature(CPU_AVX512_VPOPCNTDQ); - _features.clear_feature(CPU_AVX512_VPCLMULQDQ); - _features.clear_feature(CPU_AVX512_VBMI); - _features.clear_feature(CPU_AVX512_VBMI2); - _features.clear_feature(CPU_CLWB); - _features.clear_feature(CPU_FLUSHOPT); - _features.clear_feature(CPU_GFNI); - _features.clear_feature(CPU_AVX512_BITALG); - _features.clear_feature(CPU_AVX512_IFMA); - _features.clear_feature(CPU_AVX_IFMA); - _features.clear_feature(CPU_AVX512_FP16); - _features.clear_feature(CPU_AVX10_1); - _features.clear_feature(CPU_AVX10_2); + clear_feature(CPU_VZEROUPPER); + clear_feature(CPU_AVX512BW); + clear_feature(CPU_AVX512VL); + clear_feature(CPU_APX_F); + clear_feature(CPU_AVX512DQ); + clear_feature(CPU_AVX512_VNNI); + clear_feature(CPU_AVX512_VAES); + clear_feature(CPU_AVX512_VPOPCNTDQ); + clear_feature(CPU_AVX512_VPCLMULQDQ); + clear_feature(CPU_AVX512_VBMI); + clear_feature(CPU_AVX512_VBMI2); + clear_feature(CPU_CLWB); + clear_feature(CPU_FLUSHOPT); + clear_feature(CPU_GFNI); + clear_feature(CPU_AVX512_BITALG); + clear_feature(CPU_AVX512_IFMA); + clear_feature(CPU_AVX_IFMA); + clear_feature(CPU_AVX512_FP16); + clear_feature(CPU_AVX10_1); + clear_feature(CPU_AVX10_2); } } // Currently APX support is only enabled for targets supporting AVX512VL feature. if (supports_apx_f() && os_supports_apx_egprs() && supports_avx512vl()) { if (FLAG_IS_DEFAULT(UseAPX)) { - UseAPX = false; // by default UseAPX is false - _features.clear_feature(CPU_APX_F); + FLAG_SET_DEFAULT(UseAPX, false); // by default UseAPX is false + clear_feature(CPU_APX_F); } else if (!UseAPX) { - _features.clear_feature(CPU_APX_F); + clear_feature(CPU_APX_F); } - } else if (UseAPX) { - if (!FLAG_IS_DEFAULT(UseAPX)) { - warning("APX is not supported on this CPU, setting it to false)"); + } else { + if (!os_supports_apx_egprs() || !supports_avx512vl()) { + clear_feature(CPU_APX_F); + } + if (UseAPX) { + if (!FLAG_IS_DEFAULT(UseAPX)) { + warning("APX instructions are not available on this CPU"); + } + FLAG_SET_DEFAULT(UseAPX, false); } - FLAG_SET_DEFAULT(UseAPX, false); } - CHECK_CPU_FEATURE(supports_clmul, CLMUL); - CHECK_CPU_FEATURE(supports_aes, AES); - CHECK_CPU_FEATURE(supports_fma, FMA); + CHECK_CPU_FEATURE(UseCLMUL, CLMUL, supports_clmul(), "CLMUL" MULTI_INST_WARNING_MSG); + CHECK_CPU_FEATURE(UseAES, AES, supports_aes(), "AES" MULTI_INST_WARNING_MSG); + CHECK_CPU_FEATURE(UseFMA, FMA, supports_fma(), "FMA" MULTI_INST_WARNING_MSG); + CHECK_CPU_FEATURE(UseCountLeadingZerosInstruction, LZCNT, supports_lzcnt(), "lzcnt" SINGLE_INST_WARNING_MSG); + // BMI instructions (except tzcnt) use an encoding with VEX prefix. + // VEX prefix is generated only when AVX > 0. + CHECK_CPU_FEATURE(UseBMI1Instructions, BMI1, supports_bmi1(), "BMI1" MULTI_INST_WARNING_MSG); - if (supports_sha() || (supports_avx2() && supports_bmi2())) { - if (FLAG_IS_DEFAULT(UseSHA)) { - UseSHA = true; - } else if (!UseSHA) { - _features.clear_feature(CPU_SHA); + if (supports_bmi2() && supports_avx()) { + if (FLAG_IS_DEFAULT(UseBMI2Instructions)) { + FLAG_SET_DEFAULT(UseBMI2Instructions, true); + } else if (!UseBMI2Instructions) { + clear_feature(CPU_BMI2); } - } else if (UseSHA) { - if (!FLAG_IS_DEFAULT(UseSHA)) { - warning("SHA instructions are not available on this CPU"); + } else { + if (!supports_avx()) { + clear_feature(CPU_BMI2); + } + if (UseBMI2Instructions) { + if (!FLAG_IS_DEFAULT(UseBMI2Instructions)) { + warning("BMI2 instructions are not available on this CPU (AVX is also required)"); + } + FLAG_SET_DEFAULT(UseBMI2Instructions, false); } - FLAG_SET_DEFAULT(UseSHA, false); } + CHECK_CPU_FEATURE(UsePopCountInstruction, POPCNT, supports_popcnt(), "popcnt" SINGLE_INST_WARNING_MSG); + CHECK_CPU_FEATURE(UseSHA, SHA, supports_sha() || (supports_avx2() && supports_bmi2()), "SHA" MULTI_INST_WARNING_MSG); + if (FLAG_IS_DEFAULT(IntelJccErratumMitigation)) { _has_intel_jcc_erratum = compute_has_intel_jcc_erratum(); FLAG_SET_ERGO(IntelJccErratumMitigation, _has_intel_jcc_erratum); @@ -1716,28 +1733,11 @@ void VM_Version::get_processor_features() { FLAG_SET_DEFAULT(UseVectorizedHashCodeIntrinsic, false); } - // Use count leading zeros count instruction if available. - if (supports_lzcnt()) { - if (FLAG_IS_DEFAULT(UseCountLeadingZerosInstruction)) { - UseCountLeadingZerosInstruction = true; - } - } else if (UseCountLeadingZerosInstruction) { - if (!FLAG_IS_DEFAULT(UseCountLeadingZerosInstruction)) { - warning("lzcnt instruction is not available on this CPU"); - } - FLAG_SET_DEFAULT(UseCountLeadingZerosInstruction, false); - } - // Use count trailing zeros instruction if available if (supports_bmi1()) { // tzcnt does not require VEX prefix if (FLAG_IS_DEFAULT(UseCountTrailingZerosInstruction)) { - if (!UseBMI1Instructions && !FLAG_IS_DEFAULT(UseBMI1Instructions)) { - // Don't use tzcnt if BMI1 is switched off on command line. - UseCountTrailingZerosInstruction = false; - } else { - UseCountTrailingZerosInstruction = true; - } + UseCountTrailingZerosInstruction = true; } } else if (UseCountTrailingZerosInstruction) { if (!FLAG_IS_DEFAULT(UseCountTrailingZerosInstruction)) { @@ -1746,42 +1746,6 @@ void VM_Version::get_processor_features() { FLAG_SET_DEFAULT(UseCountTrailingZerosInstruction, false); } - // BMI instructions (except tzcnt) use an encoding with VEX prefix. - // VEX prefix is generated only when AVX > 0. - if (supports_bmi1() && supports_avx()) { - if (FLAG_IS_DEFAULT(UseBMI1Instructions)) { - UseBMI1Instructions = true; - } - } else if (UseBMI1Instructions) { - if (!FLAG_IS_DEFAULT(UseBMI1Instructions)) { - warning("BMI1 instructions are not available on this CPU (AVX is also required)"); - } - FLAG_SET_DEFAULT(UseBMI1Instructions, false); - } - - if (supports_bmi2() && supports_avx()) { - if (FLAG_IS_DEFAULT(UseBMI2Instructions)) { - UseBMI2Instructions = true; - } - } else if (UseBMI2Instructions) { - if (!FLAG_IS_DEFAULT(UseBMI2Instructions)) { - warning("BMI2 instructions are not available on this CPU (AVX is also required)"); - } - FLAG_SET_DEFAULT(UseBMI2Instructions, false); - } - - // Use population count instruction if available. - if (supports_popcnt()) { - if (FLAG_IS_DEFAULT(UsePopCountInstruction)) { - UsePopCountInstruction = true; - } - } else if (UsePopCountInstruction) { - if (!FLAG_IS_DEFAULT(UsePopCountInstruction)) { - warning("POPCNT instruction is not available on this CPU"); - } - FLAG_SET_DEFAULT(UsePopCountInstruction, false); - } - // Use fast-string operations if available. if (supports_erms()) { if (FLAG_IS_DEFAULT(UseFastStosb)) { @@ -2527,7 +2491,7 @@ const char* VM_Version::cpu_brand_string(void) { } int ret_val = cpu_extended_brand_string(_cpu_brand_string, CPU_EBS_MAX_LENGTH); if (ret_val != OS_OK) { - FREE_C_HEAP_ARRAY(char, _cpu_brand_string); + FREE_C_HEAP_ARRAY(_cpu_brand_string); _cpu_brand_string = nullptr; } } @@ -3366,12 +3330,12 @@ int VM_Version::cpu_features_size() { } void VM_Version::store_cpu_features(void* buf) { - VM_Features copy = _features; - copy.clear_feature(CPU_HT); // HT does not result in incompatibility of aot code cache + VM_Features copy = _features.aot_code_cache_features(); memcpy(buf, ©, sizeof(VM_Features)); } -bool VM_Version::supports_features(void* features_buffer) { +bool VM_Version::verify_aot_code_cache_features(void* features_buffer) { VM_Features* features_to_test = (VM_Features*)features_buffer; - return _features.supports_features(features_to_test); + VM_Features rt_features = _features.aot_code_cache_features(); + return rt_features.verify_aot_code_cache_features(features_to_test); } diff --git a/src/hotspot/cpu/x86/vm_version_x86.hpp b/src/hotspot/cpu/x86/vm_version_x86.hpp index f721635a02e..fe6d424f50c 100644 --- a/src/hotspot/cpu/x86/vm_version_x86.hpp +++ b/src/hotspot/cpu/x86/vm_version_x86.hpp @@ -377,86 +377,86 @@ protected: */ enum Feature_Flag { #define CPU_FEATURE_FLAGS(decl) \ - decl(CX8, cx8, 0) /* next bits are from cpuid 1 (EDX) */ \ - decl(CMOV, cmov, 1) \ - decl(FXSR, fxsr, 2) \ - decl(HT, ht, 3) \ - \ - decl(MMX, mmx, 4) \ - decl(3DNOW_PREFETCH, 3dnowpref, 5) /* Processor supports 3dnow prefetch and prefetchw instructions */ \ - /* may not necessarily support other 3dnow instructions */ \ - decl(SSE, sse, 6) \ - decl(SSE2, sse2, 7) \ - \ - decl(SSE3, sse3, 8 ) /* SSE3 comes from cpuid 1 (ECX) */ \ - decl(SSSE3, ssse3, 9 ) \ - decl(SSE4A, sse4a, 10) \ - decl(SSE4_1, sse4.1, 11) \ - \ - decl(SSE4_2, sse4.2, 12) \ - decl(POPCNT, popcnt, 13) \ - decl(LZCNT, lzcnt, 14) \ - decl(TSC, tsc, 15) \ - \ - decl(TSCINV_BIT, tscinvbit, 16) \ - decl(TSCINV, tscinv, 17) \ - decl(AVX, avx, 18) \ - decl(AVX2, avx2, 19) \ - \ - decl(AES, aes, 20) \ - decl(ERMS, erms, 21) /* enhanced 'rep movsb/stosb' instructions */ \ - decl(CLMUL, clmul, 22) /* carryless multiply for CRC */ \ - decl(BMI1, bmi1, 23) \ - \ - decl(BMI2, bmi2, 24) \ - decl(RTM, rtm, 25) /* Restricted Transactional Memory instructions */ \ - decl(ADX, adx, 26) \ - decl(AVX512F, avx512f, 27) /* AVX 512bit foundation instructions */ \ - \ - decl(AVX512DQ, avx512dq, 28) \ - decl(AVX512PF, avx512pf, 29) \ - decl(AVX512ER, avx512er, 30) \ - decl(AVX512CD, avx512cd, 31) \ - \ - decl(AVX512BW, avx512bw, 32) /* Byte and word vector instructions */ \ - decl(AVX512VL, avx512vl, 33) /* EVEX instructions with smaller vector length */ \ - decl(SHA, sha, 34) /* SHA instructions */ \ - decl(FMA, fma, 35) /* FMA instructions */ \ - \ - decl(VZEROUPPER, vzeroupper, 36) /* Vzeroupper instruction */ \ - decl(AVX512_VPOPCNTDQ, avx512_vpopcntdq, 37) /* Vector popcount */ \ - decl(AVX512_VPCLMULQDQ, avx512_vpclmulqdq, 38) /* Vector carryless multiplication */ \ - decl(AVX512_VAES, avx512_vaes, 39) /* Vector AES instruction */ \ - \ - decl(AVX512_VNNI, avx512_vnni, 40) /* Vector Neural Network Instructions */ \ - decl(FLUSH, clflush, 41) /* flush instruction */ \ - decl(FLUSHOPT, clflushopt, 42) /* flusopth instruction */ \ - decl(CLWB, clwb, 43) /* clwb instruction */ \ - \ - decl(AVX512_VBMI2, avx512_vbmi2, 44) /* VBMI2 shift left double instructions */ \ - decl(AVX512_VBMI, avx512_vbmi, 45) /* Vector BMI instructions */ \ - decl(HV, hv, 46) /* Hypervisor instructions */ \ - decl(SERIALIZE, serialize, 47) /* CPU SERIALIZE */ \ - decl(RDTSCP, rdtscp, 48) /* RDTSCP instruction */ \ - decl(RDPID, rdpid, 49) /* RDPID instruction */ \ - decl(FSRM, fsrm, 50) /* Fast Short REP MOV */ \ - decl(GFNI, gfni, 51) /* Vector GFNI instructions */ \ - decl(AVX512_BITALG, avx512_bitalg, 52) /* Vector sub-word popcount and bit gather instructions */\ - decl(F16C, f16c, 53) /* Half-precision and single precision FP conversion instructions*/ \ - decl(PKU, pku, 54) /* Protection keys for user-mode pages */ \ - decl(OSPKE, ospke, 55) /* OS enables protection keys */ \ - decl(CET_IBT, cet_ibt, 56) /* Control Flow Enforcement - Indirect Branch Tracking */ \ - decl(CET_SS, cet_ss, 57) /* Control Flow Enforcement - Shadow Stack */ \ - decl(AVX512_IFMA, avx512_ifma, 58) /* Integer Vector FMA instructions*/ \ - decl(AVX_IFMA, avx_ifma, 59) /* 256-bit VEX-coded variant of AVX512-IFMA*/ \ - decl(APX_F, apx_f, 60) /* Intel Advanced Performance Extensions*/ \ - decl(SHA512, sha512, 61) /* SHA512 instructions*/ \ - decl(AVX512_FP16, avx512_fp16, 62) /* AVX512 FP16 ISA support*/ \ - decl(AVX10_1, avx10_1, 63) /* AVX10 512 bit vector ISA Version 1 support*/ \ - decl(AVX10_2, avx10_2, 64) /* AVX10 512 bit vector ISA Version 2 support*/ \ - decl(HYBRID, hybrid, 65) /* Hybrid architecture */ + decl(CX8, cx8 ) /* next bits are from cpuid 1 (EDX) */ \ + decl(CMOV, cmov ) \ + decl(FXSR, fxsr ) \ + decl(HT, ht ) \ + \ + decl(MMX, mmx ) \ + decl(3DNOW_PREFETCH, 3dnowpref ) /* Processor supports 3dnow prefetch and prefetchw instructions */ \ + /* may not necessarily support other 3dnow instructions */ \ + decl(SSE, sse ) \ + decl(SSE2, sse2 ) \ + \ + decl(SSE3, sse3 ) /* SSE3 comes from cpuid 1 (ECX) */ \ + decl(SSSE3, ssse3 ) \ + decl(SSE4A, sse4a ) \ + decl(SSE4_1, sse4.1 ) \ + \ + decl(SSE4_2, sse4.2 ) \ + decl(POPCNT, popcnt ) \ + decl(LZCNT, lzcnt ) \ + decl(TSC, tsc ) \ + \ + decl(TSCINV_BIT, tscinvbit ) \ + decl(TSCINV, tscinv ) \ + decl(AVX, avx ) \ + decl(AVX2, avx2 ) \ + \ + decl(AES, aes ) \ + decl(ERMS, erms ) /* enhanced 'rep movsb/stosb' instructions */ \ + decl(CLMUL, clmul ) /* carryless multiply for CRC */ \ + decl(BMI1, bmi1 ) \ + \ + decl(BMI2, bmi2 ) \ + decl(RTM, rtm ) /* Restricted Transactional Memory instructions */ \ + decl(ADX, adx ) \ + decl(AVX512F, avx512f ) /* AVX 512bit foundation instructions */ \ + \ + decl(AVX512DQ, avx512dq ) \ + decl(AVX512PF, avx512pf ) \ + decl(AVX512ER, avx512er ) \ + decl(AVX512CD, avx512cd ) \ + \ + decl(AVX512BW, avx512bw ) /* Byte and word vector instructions */ \ + decl(AVX512VL, avx512vl ) /* EVEX instructions with smaller vector length */ \ + decl(SHA, sha ) /* SHA instructions */ \ + decl(FMA, fma ) /* FMA instructions */ \ + \ + decl(VZEROUPPER, vzeroupper ) /* Vzeroupper instruction */ \ + decl(AVX512_VPOPCNTDQ, avx512_vpopcntdq ) /* Vector popcount */ \ + decl(AVX512_VPCLMULQDQ, avx512_vpclmulqdq ) /* Vector carryless multiplication */ \ + decl(AVX512_VAES, avx512_vaes ) /* Vector AES instruction */ \ + \ + decl(AVX512_VNNI, avx512_vnni ) /* Vector Neural Network Instructions */ \ + decl(FLUSH, clflush ) /* flush instruction */ \ + decl(FLUSHOPT, clflushopt ) /* flusopth instruction */ \ + decl(CLWB, clwb ) /* clwb instruction */ \ + \ + decl(AVX512_VBMI2, avx512_vbmi2 ) /* VBMI2 shift left double instructions */ \ + decl(AVX512_VBMI, avx512_vbmi ) /* Vector BMI instructions */ \ + decl(HV, hv ) /* Hypervisor instructions */ \ + decl(SERIALIZE, serialize ) /* CPU SERIALIZE */ \ + decl(RDTSCP, rdtscp ) /* RDTSCP instruction */ \ + decl(RDPID, rdpid ) /* RDPID instruction */ \ + decl(FSRM, fsrm ) /* Fast Short REP MOV */ \ + decl(GFNI, gfni ) /* Vector GFNI instructions */ \ + decl(AVX512_BITALG, avx512_bitalg ) /* Vector sub-word popcount and bit gather instructions */\ + decl(F16C, f16c ) /* Half-precision and single precision FP conversion instructions*/ \ + decl(PKU, pku ) /* Protection keys for user-mode pages */ \ + decl(OSPKE, ospke ) /* OS enables protection keys */ \ + decl(CET_IBT, cet_ibt ) /* Control Flow Enforcement - Indirect Branch Tracking */ \ + decl(CET_SS, cet_ss ) /* Control Flow Enforcement - Shadow Stack */ \ + decl(AVX512_IFMA, avx512_ifma ) /* Integer Vector FMA instructions*/ \ + decl(AVX_IFMA, avx_ifma ) /* 256-bit VEX-coded variant of AVX512-IFMA*/ \ + decl(APX_F, apx_f ) /* Intel Advanced Performance Extensions*/ \ + decl(SHA512, sha512 ) /* SHA512 instructions*/ \ + decl(AVX512_FP16, avx512_fp16 ) /* AVX512 FP16 ISA support*/ \ + decl(AVX10_1, avx10_1 ) /* AVX10 512 bit vector ISA Version 1 support*/ \ + decl(AVX10_2, avx10_2 ) /* AVX10 512 bit vector ISA Version 2 support*/ \ + decl(HYBRID, hybrid ) /* Hybrid architecture */ -#define DECLARE_CPU_FEATURE_FLAG(id, name, bit) CPU_##id = (bit), +#define DECLARE_CPU_FEATURE_FLAG(id, name) CPU_##id, CPU_FEATURE_FLAGS(DECLARE_CPU_FEATURE_FLAG) #undef DECLARE_CPU_FEATURE_FLAG MAX_CPU_FEATURES @@ -517,14 +517,21 @@ protected: return (_features_bitmap[idx] & bit_mask(feature)) != 0; } - bool supports_features(VM_Features* features_to_test) { + bool verify_aot_code_cache_features(VM_Features* features_to_test) { for (int i = 0; i < features_bitmap_element_count(); i++) { - if ((_features_bitmap[i] & features_to_test->_features_bitmap[i]) != features_to_test->_features_bitmap[i]) { + if (_features_bitmap[i] != features_to_test->_features_bitmap[i]) { return false; - } + } } return true; } + + VM_Features aot_code_cache_features() { + VM_Features copy = *this; + // HT does not result in incompatibility of aot code cache + copy.clear_feature(CPU_HT); + return copy; + } }; // CPU feature flags vector, can be affected by VM settings. @@ -1134,7 +1141,7 @@ public: // Size of the buffer must be same as returned by cpu_features_size() static void store_cpu_features(void* buf); - static bool supports_features(void* features_to_test); + static bool verify_aot_code_cache_features(void* features_buffer); }; #endif // CPU_X86_VM_VERSION_X86_HPP diff --git a/src/hotspot/cpu/x86/x86.ad b/src/hotspot/cpu/x86/x86.ad index eaa88d900c7..db87f81d6c4 100644 --- a/src/hotspot/cpu/x86/x86.ad +++ b/src/hotspot/cpu/x86/x86.ad @@ -2159,7 +2159,7 @@ uint MachSpillCopyNode::implementation(C2_MacroAssembler* masm, // Self copy, no move return 0; } - if (bottom_type()->isa_vect() != nullptr && bottom_type()->isa_vectmask() == nullptr) { + if (bottom_type()->isa_vect() != nullptr && bottom_type()->isa_pvectmask() == nullptr) { uint ireg = ideal_reg(); assert((src_first_rc != rc_int && dst_first_rc != rc_int), "sanity"); assert((ireg == Op_VecS || ireg == Op_VecD || ireg == Op_VecX || ireg == Op_VecY || ireg == Op_VecZ ), "sanity"); @@ -3789,8 +3789,8 @@ bool Matcher::vector_rearrange_requires_load_shuffle(BasicType elem_bt, int vlen } bool Matcher::mask_op_prefers_predicate(int opcode, const TypeVect* vt) { - // Prefer predicate if the mask type is "TypeVectMask". - return vt->isa_vectmask() != nullptr; + // Prefer predicate if the mask type is "TypePVectMask". + return vt->isa_pvectmask() != nullptr; } MachOper* Matcher::pd_specialize_generic_vector_operand(MachOper* generic_opnd, uint ideal_reg, bool is_temp) { @@ -4048,7 +4048,7 @@ class FusedPatternMatcher { }; static bool is_bmi_pattern(Node* n, Node* m) { - assert(UseBMI1Instructions, "sanity"); + assert(VM_Version::supports_bmi1() && VM_Version::supports_avx(), "sanity"); if (n != nullptr && m != nullptr) { if (m->Opcode() == Op_LoadI) { FusedPatternMatcher bmii(n, m, Op_ConI); @@ -4068,7 +4068,7 @@ static bool is_bmi_pattern(Node* n, Node* m) { // Should the matcher clone input 'm' of node 'n'? bool Matcher::pd_clone_node(Node* n, Node* m, Matcher::MStack& mstack) { // If 'n' and 'm' are part of a graph for BMI instruction, clone the input 'm'. - if (UseBMI1Instructions && is_bmi_pattern(n, m)) { + if (VM_Version::supports_bmi1() && VM_Version::supports_avx() && is_bmi_pattern(n, m)) { mstack.push(m, Visit); return true; } @@ -4568,7 +4568,7 @@ encode %{ } else if (_method->intrinsic_id() == vmIntrinsicID::_ensureMaterializedForStackWalk) { // The NOP here is purely to ensure that eliding a call to // JVM_EnsureMaterializedForStackWalk doesn't change the code size. - __ addr_nop_5(); + __ nop(5); __ block_comment("call JVM_EnsureMaterializedForStackWalk (elided)"); } else { int method_index = resolved_method_index(masm); @@ -4950,7 +4950,7 @@ operand immN0() %{ operand immP31() %{ - predicate(n->as_Type()->type()->reloc() == relocInfo::none + predicate(n->as_Type()->type()->is_ptr()->reloc() == relocInfo::none && (n->get_ptr() >> 31) == 0); match(ConP); @@ -10899,10 +10899,11 @@ instruct xaddB(memory mem, rRegI newval, rFlagsReg cr) %{ 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); %} @@ -10935,10 +10936,11 @@ instruct xaddS(memory mem, rRegI newval, rFlagsReg cr) %{ 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); %} @@ -11017,18 +11019,20 @@ instruct xaddL(memory mem, rRegL newval, rFlagsReg cr) %{ 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 ); %} @@ -13161,7 +13165,7 @@ instruct andI_mem_imm(memory dst, immI src, rFlagsReg cr) // BMI1 instructions instruct andnI_rReg_rReg_mem(rRegI dst, rRegI src1, memory src2, immI_M1 minus_1, rFlagsReg cr) %{ match(Set dst (AndI (XorI src1 minus_1) (LoadI src2))); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag); @@ -13176,7 +13180,7 @@ instruct andnI_rReg_rReg_mem(rRegI dst, rRegI src1, memory src2, immI_M1 minus_1 instruct andnI_rReg_rReg_rReg(rRegI dst, rRegI src1, rRegI src2, immI_M1 minus_1, rFlagsReg cr) %{ match(Set dst (AndI (XorI src1 minus_1) src2)); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag); @@ -13190,7 +13194,7 @@ instruct andnI_rReg_rReg_rReg(rRegI dst, rRegI src1, rRegI src2, immI_M1 minus_1 instruct blsiI_rReg_rReg(rRegI dst, rRegI src, immI_0 imm_zero, rFlagsReg cr) %{ match(Set dst (AndI (SubI imm_zero src) src)); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag); @@ -13204,7 +13208,7 @@ instruct blsiI_rReg_rReg(rRegI dst, rRegI src, immI_0 imm_zero, rFlagsReg cr) %{ instruct blsiI_rReg_mem(rRegI dst, memory src, immI_0 imm_zero, rFlagsReg cr) %{ match(Set dst (AndI (SubI imm_zero (LoadI src) ) (LoadI src) )); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag); @@ -13220,7 +13224,7 @@ instruct blsiI_rReg_mem(rRegI dst, memory src, immI_0 imm_zero, rFlagsReg cr) %{ instruct blsmskI_rReg_mem(rRegI dst, memory src, immI_M1 minus_1, rFlagsReg cr) %{ match(Set dst (XorI (AddI (LoadI src) minus_1) (LoadI src) ) ); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_clears_zero_flag, PD::Flag_clears_overflow_flag); @@ -13236,7 +13240,7 @@ instruct blsmskI_rReg_mem(rRegI dst, memory src, immI_M1 minus_1, rFlagsReg cr) instruct blsmskI_rReg_rReg(rRegI dst, rRegI src, immI_M1 minus_1, rFlagsReg cr) %{ match(Set dst (XorI (AddI src minus_1) src)); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_clears_zero_flag, PD::Flag_clears_overflow_flag); @@ -13252,7 +13256,7 @@ instruct blsmskI_rReg_rReg(rRegI dst, rRegI src, immI_M1 minus_1, rFlagsReg cr) instruct blsrI_rReg_rReg(rRegI dst, rRegI src, immI_M1 minus_1, rFlagsReg cr) %{ match(Set dst (AndI (AddI src minus_1) src) ); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag); @@ -13268,7 +13272,7 @@ instruct blsrI_rReg_rReg(rRegI dst, rRegI src, immI_M1 minus_1, rFlagsReg cr) instruct blsrI_rReg_mem(rRegI dst, memory src, immI_M1 minus_1, rFlagsReg cr) %{ match(Set dst (AndI (AddI (LoadI src) minus_1) (LoadI src) ) ); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag); @@ -13809,7 +13813,7 @@ instruct btrL_mem_imm(memory dst, immL_NotPow2 con, rFlagsReg cr) // BMI1 instructions instruct andnL_rReg_rReg_mem(rRegL dst, rRegL src1, memory src2, immL_M1 minus_1, rFlagsReg cr) %{ match(Set dst (AndL (XorL src1 minus_1) (LoadL src2))); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag); @@ -13824,7 +13828,7 @@ instruct andnL_rReg_rReg_mem(rRegL dst, rRegL src1, memory src2, immL_M1 minus_1 instruct andnL_rReg_rReg_rReg(rRegL dst, rRegL src1, rRegL src2, immL_M1 minus_1, rFlagsReg cr) %{ match(Set dst (AndL (XorL src1 minus_1) src2)); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag); @@ -13838,7 +13842,7 @@ instruct andnL_rReg_rReg_rReg(rRegL dst, rRegL src1, rRegL src2, immL_M1 minus_1 instruct blsiL_rReg_rReg(rRegL dst, rRegL src, immL0 imm_zero, rFlagsReg cr) %{ match(Set dst (AndL (SubL imm_zero src) src)); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag); @@ -13852,7 +13856,7 @@ instruct blsiL_rReg_rReg(rRegL dst, rRegL src, immL0 imm_zero, rFlagsReg cr) %{ instruct blsiL_rReg_mem(rRegL dst, memory src, immL0 imm_zero, rFlagsReg cr) %{ match(Set dst (AndL (SubL imm_zero (LoadL src) ) (LoadL src) )); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag); @@ -13868,7 +13872,7 @@ instruct blsiL_rReg_mem(rRegL dst, memory src, immL0 imm_zero, rFlagsReg cr) %{ instruct blsmskL_rReg_mem(rRegL dst, memory src, immL_M1 minus_1, rFlagsReg cr) %{ match(Set dst (XorL (AddL (LoadL src) minus_1) (LoadL src) ) ); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_clears_zero_flag, PD::Flag_clears_overflow_flag); @@ -13884,7 +13888,7 @@ instruct blsmskL_rReg_mem(rRegL dst, memory src, immL_M1 minus_1, rFlagsReg cr) instruct blsmskL_rReg_rReg(rRegL dst, rRegL src, immL_M1 minus_1, rFlagsReg cr) %{ match(Set dst (XorL (AddL src minus_1) src)); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_clears_zero_flag, PD::Flag_clears_overflow_flag); @@ -13900,7 +13904,7 @@ instruct blsmskL_rReg_rReg(rRegL dst, rRegL src, immL_M1 minus_1, rFlagsReg cr) instruct blsrL_rReg_rReg(rRegL dst, rRegL src, immL_M1 minus_1, rFlagsReg cr) %{ match(Set dst (AndL (AddL src minus_1) src) ); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag); @@ -13916,7 +13920,7 @@ instruct blsrL_rReg_rReg(rRegL dst, rRegL src, immL_M1 minus_1, rFlagsReg cr) instruct blsrL_rReg_mem(rRegL dst, memory src, immL_M1 minus_1, rFlagsReg cr) %{ match(Set dst (AndL (AddL (LoadL src) minus_1) (LoadL src)) ); - predicate(UseBMI1Instructions); + predicate(VM_Version::supports_bmi1() && VM_Version::supports_avx()); effect(KILL cr); flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_clears_overflow_flag); @@ -16333,7 +16337,7 @@ instruct compP_rReg_mem(rFlagsRegU cr, rRegP op1, memory op2) // and raw pointers have no anti-dependencies. instruct compP_mem_rReg(rFlagsRegU cr, rRegP op1, memory op2) %{ - predicate(n->in(2)->in(2)->bottom_type()->reloc() == relocInfo::none && + predicate(n->in(2)->in(2)->bottom_type()->isa_rawptr() != nullptr && n->in(2)->as_Load()->barrier_data() == 0); match(Set cr (CmpP op1 (LoadP op2))); @@ -18211,7 +18215,7 @@ instruct vconvHF2F(vec dst, vec src) %{ // ---------------------------------------- VectorReinterpret ------------------------------------ instruct reinterpret_mask(kReg dst) %{ - predicate(n->bottom_type()->isa_vectmask() && + predicate(n->bottom_type()->isa_pvectmask() && Matcher::vector_length(n) == Matcher::vector_length(n->in(1))); // dst == src match(Set dst (VectorReinterpret dst)); ins_cost(125); @@ -18224,10 +18228,10 @@ instruct reinterpret_mask(kReg dst) %{ instruct reinterpret_mask_W2B(kReg dst, kReg src, vec xtmp) %{ predicate(UseAVX > 2 && Matcher::vector_length(n) != Matcher::vector_length(n->in(1)) && - n->bottom_type()->isa_vectmask() && - n->in(1)->bottom_type()->isa_vectmask() && - n->in(1)->bottom_type()->is_vectmask()->element_basic_type() == T_SHORT && - n->bottom_type()->is_vectmask()->element_basic_type() == T_BYTE); // dst == src + n->bottom_type()->isa_pvectmask() && + n->in(1)->bottom_type()->isa_pvectmask() && + n->in(1)->bottom_type()->is_pvectmask()->element_basic_type() == T_SHORT && + n->bottom_type()->is_pvectmask()->element_basic_type() == T_BYTE); // dst == src match(Set dst (VectorReinterpret src)); effect(TEMP xtmp); format %{ "vector_mask_reinterpret_W2B $dst $src\t!" %} @@ -18244,11 +18248,11 @@ instruct reinterpret_mask_W2B(kReg dst, kReg src, vec xtmp) %{ instruct reinterpret_mask_D2B(kReg dst, kReg src, vec xtmp) %{ predicate(UseAVX > 2 && Matcher::vector_length(n) != Matcher::vector_length(n->in(1)) && - n->bottom_type()->isa_vectmask() && - n->in(1)->bottom_type()->isa_vectmask() && - (n->in(1)->bottom_type()->is_vectmask()->element_basic_type() == T_INT || - n->in(1)->bottom_type()->is_vectmask()->element_basic_type() == T_FLOAT) && - n->bottom_type()->is_vectmask()->element_basic_type() == T_BYTE); // dst == src + n->bottom_type()->isa_pvectmask() && + n->in(1)->bottom_type()->isa_pvectmask() && + (n->in(1)->bottom_type()->is_pvectmask()->element_basic_type() == T_INT || + n->in(1)->bottom_type()->is_pvectmask()->element_basic_type() == T_FLOAT) && + n->bottom_type()->is_pvectmask()->element_basic_type() == T_BYTE); // dst == src match(Set dst (VectorReinterpret src)); effect(TEMP xtmp); format %{ "vector_mask_reinterpret_D2B $dst $src\t!" %} @@ -18265,11 +18269,11 @@ instruct reinterpret_mask_D2B(kReg dst, kReg src, vec xtmp) %{ instruct reinterpret_mask_Q2B(kReg dst, kReg src, vec xtmp) %{ predicate(UseAVX > 2 && Matcher::vector_length(n) != Matcher::vector_length(n->in(1)) && - n->bottom_type()->isa_vectmask() && - n->in(1)->bottom_type()->isa_vectmask() && - (n->in(1)->bottom_type()->is_vectmask()->element_basic_type() == T_LONG || - n->in(1)->bottom_type()->is_vectmask()->element_basic_type() == T_DOUBLE) && - n->bottom_type()->is_vectmask()->element_basic_type() == T_BYTE); // dst == src + n->bottom_type()->isa_pvectmask() && + n->in(1)->bottom_type()->isa_pvectmask() && + (n->in(1)->bottom_type()->is_pvectmask()->element_basic_type() == T_LONG || + n->in(1)->bottom_type()->is_pvectmask()->element_basic_type() == T_DOUBLE) && + n->bottom_type()->is_pvectmask()->element_basic_type() == T_BYTE); // dst == src match(Set dst (VectorReinterpret src)); effect(TEMP xtmp); format %{ "vector_mask_reinterpret_Q2B $dst $src\t!" %} @@ -18285,7 +18289,7 @@ instruct reinterpret_mask_Q2B(kReg dst, kReg src, vec xtmp) %{ %} instruct reinterpret(vec dst) %{ - predicate(!n->bottom_type()->isa_vectmask() && + predicate(!n->bottom_type()->isa_pvectmask() && Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1))); // dst == src match(Set dst (VectorReinterpret dst)); ins_cost(125); @@ -18321,7 +18325,7 @@ instruct reinterpret_expand(vec dst, vec src) %{ instruct vreinterpret_expand4(legVec dst, vec src) %{ predicate(UseAVX > 0 && - !n->bottom_type()->isa_vectmask() && + !n->bottom_type()->isa_pvectmask() && (Matcher::vector_length_in_bytes(n->in(1)) == 4) && // src (Matcher::vector_length_in_bytes(n->in(1)) < Matcher::vector_length_in_bytes(n))); // src < dst match(Set dst (VectorReinterpret src)); @@ -18336,7 +18340,7 @@ instruct vreinterpret_expand4(legVec dst, vec src) %{ instruct vreinterpret_expand(legVec dst, vec src) %{ predicate(UseAVX > 0 && - !n->bottom_type()->isa_vectmask() && + !n->bottom_type()->isa_pvectmask() && (Matcher::vector_length_in_bytes(n->in(1)) > 4) && // src (Matcher::vector_length_in_bytes(n->in(1)) < Matcher::vector_length_in_bytes(n))); // src < dst match(Set dst (VectorReinterpret src)); @@ -18354,7 +18358,7 @@ instruct vreinterpret_expand(legVec dst, vec src) %{ %} instruct reinterpret_shrink(vec dst, legVec src) %{ - predicate(!n->bottom_type()->isa_vectmask() && + predicate(!n->bottom_type()->isa_pvectmask() && Matcher::vector_length_in_bytes(n->in(1)) > Matcher::vector_length_in_bytes(n)); // src > dst match(Set dst (VectorReinterpret src)); ins_cost(125); @@ -22462,7 +22466,7 @@ instruct vround_reg_evex(vec dst, vec src, rRegP tmp, vec xtmp1, vec xtmp2, kReg // --------------------------------- VectorMaskCmp -------------------------------------- instruct vcmpFD(legVec dst, legVec src1, legVec src2, immI8 cond) %{ - predicate(n->bottom_type()->isa_vectmask() == nullptr && + predicate(n->bottom_type()->isa_pvectmask() == nullptr && Matcher::vector_length_in_bytes(n->in(1)->in(1)) >= 8 && // src1 Matcher::vector_length_in_bytes(n->in(1)->in(1)) <= 32 && // src1 is_floating_point_type(Matcher::vector_element_basic_type(n->in(1)->in(1)))); // src1 T_FLOAT, T_DOUBLE @@ -22482,7 +22486,7 @@ instruct vcmpFD(legVec dst, legVec src1, legVec src2, immI8 cond) %{ instruct evcmpFD64(vec dst, vec src1, vec src2, immI8 cond, kReg ktmp) %{ predicate(Matcher::vector_length_in_bytes(n->in(1)->in(1)) == 64 && // src1 - n->bottom_type()->isa_vectmask() == nullptr && + n->bottom_type()->isa_pvectmask() == nullptr && is_floating_point_type(Matcher::vector_element_basic_type(n->in(1)->in(1)))); // src1 T_FLOAT, T_DOUBLE match(Set dst (VectorMaskCmp (Binary src1 src2) cond)); effect(TEMP ktmp); @@ -22503,12 +22507,12 @@ instruct evcmpFD64(vec dst, vec src1, vec src2, immI8 cond, kReg ktmp) %{ %} instruct evcmpFD(kReg dst, vec src1, vec src2, immI8 cond) %{ - predicate(n->bottom_type()->isa_vectmask() && + predicate(n->bottom_type()->isa_pvectmask() && is_floating_point_type(Matcher::vector_element_basic_type(n->in(1)->in(1)))); // src1 T_FLOAT, T_DOUBLE match(Set dst (VectorMaskCmp (Binary src1 src2) cond)); format %{ "vector_compare_evex $dst,$src1,$src2,$cond\t!" %} ins_encode %{ - assert(bottom_type()->isa_vectmask(), "TypeVectMask expected"); + assert(bottom_type()->isa_pvectmask(), "TypePVectMask expected"); int vlen_enc = vector_length_encoding(this, $src1); Assembler::ComparisonPredicateFP cmp = booltest_pred_to_comparison_pred_fp($cond$$constant); KRegister mask = k0; // The comparison itself is not being masked. @@ -22522,7 +22526,7 @@ instruct evcmpFD(kReg dst, vec src1, vec src2, immI8 cond) %{ %} instruct vcmp_direct(legVec dst, legVec src1, legVec src2, immI8 cond) %{ - predicate(n->bottom_type()->isa_vectmask() == nullptr && + predicate(n->bottom_type()->isa_pvectmask() == nullptr && !Matcher::is_unsigned_booltest_pred(n->in(2)->get_int()) && Matcher::vector_length_in_bytes(n->in(1)->in(1)) >= 4 && // src1 Matcher::vector_length_in_bytes(n->in(1)->in(1)) <= 32 && // src1 @@ -22542,7 +22546,7 @@ instruct vcmp_direct(legVec dst, legVec src1, legVec src2, immI8 cond) %{ %} instruct vcmp_negate(legVec dst, legVec src1, legVec src2, immI8 cond, legVec xtmp) %{ - predicate(n->bottom_type()->isa_vectmask() == nullptr && + predicate(n->bottom_type()->isa_pvectmask() == nullptr && !Matcher::is_unsigned_booltest_pred(n->in(2)->get_int()) && Matcher::vector_length_in_bytes(n->in(1)->in(1)) >= 4 && // src1 Matcher::vector_length_in_bytes(n->in(1)->in(1)) <= 32 && // src1 @@ -22563,7 +22567,7 @@ instruct vcmp_negate(legVec dst, legVec src1, legVec src2, immI8 cond, legVec xt %} instruct vcmpu(legVec dst, legVec src1, legVec src2, immI8 cond, legVec xtmp) %{ - predicate(n->bottom_type()->isa_vectmask() == nullptr && + predicate(n->bottom_type()->isa_pvectmask() == nullptr && Matcher::is_unsigned_booltest_pred(n->in(2)->get_int()) && Matcher::vector_length_in_bytes(n->in(1)->in(1)) >= 4 && // src1 Matcher::vector_length_in_bytes(n->in(1)->in(1)) <= 32 && // src1 @@ -22590,7 +22594,7 @@ instruct vcmpu(legVec dst, legVec src1, legVec src2, immI8 cond, legVec xtmp) %{ %} instruct vcmp64(vec dst, vec src1, vec src2, immI8 cond, kReg ktmp) %{ - predicate((n->bottom_type()->isa_vectmask() == nullptr && + predicate((n->bottom_type()->isa_pvectmask() == nullptr && Matcher::vector_length_in_bytes(n->in(1)->in(1)) == 64) && // src1 is_integral_type(Matcher::vector_element_basic_type(n->in(1)->in(1)))); // src1 match(Set dst (VectorMaskCmp (Binary src1 src2) cond)); @@ -22625,13 +22629,13 @@ instruct vcmp64(vec dst, vec src1, vec src2, immI8 cond, kReg ktmp) %{ instruct evcmp(kReg dst, vec src1, vec src2, immI8 cond) %{ - predicate(n->bottom_type()->isa_vectmask() && + predicate(n->bottom_type()->isa_pvectmask() && is_integral_type(Matcher::vector_element_basic_type(n->in(1)->in(1)))); // src1 match(Set dst (VectorMaskCmp (Binary src1 src2) cond)); format %{ "vector_compared_evex $dst,$src1,$src2,$cond\t!" %} ins_encode %{ assert(UseAVX > 2, "required"); - assert(bottom_type()->isa_vectmask(), "TypeVectMask expected"); + assert(bottom_type()->isa_pvectmask(), "TypePVectMask expected"); int vlen_enc = vector_length_encoding(this, $src1); Assembler::ComparisonPredicate cmp = booltest_pred_to_comparison_pred($cond$$constant); @@ -22800,7 +22804,7 @@ instruct blendvp(vec dst, vec src, vec mask, rxmm0 tmp) %{ instruct vblendvpI(legVec dst, legVec src1, legVec src2, legVec mask) %{ predicate(UseAVX > 0 && !EnableX86ECoreOpts && - n->in(2)->bottom_type()->isa_vectmask() == nullptr && + n->in(2)->bottom_type()->isa_pvectmask() == nullptr && Matcher::vector_length_in_bytes(n) <= 32 && is_integral_type(Matcher::vector_element_basic_type(n))); match(Set dst (VectorBlend (Binary src1 src2) mask)); @@ -22814,7 +22818,7 @@ instruct vblendvpI(legVec dst, legVec src1, legVec src2, legVec mask) %{ instruct vblendvpFD(legVec dst, legVec src1, legVec src2, legVec mask) %{ predicate(UseAVX > 0 && !EnableX86ECoreOpts && - n->in(2)->bottom_type()->isa_vectmask() == nullptr && + n->in(2)->bottom_type()->isa_pvectmask() == nullptr && Matcher::vector_length_in_bytes(n) <= 32 && !is_integral_type(Matcher::vector_element_basic_type(n))); match(Set dst (VectorBlend (Binary src1 src2) mask)); @@ -22828,7 +22832,7 @@ instruct vblendvpFD(legVec dst, legVec src1, legVec src2, legVec mask) %{ instruct vblendvp(legVec dst, legVec src1, legVec src2, legVec mask, legVec vtmp) %{ predicate(UseAVX > 0 && EnableX86ECoreOpts && - n->in(2)->bottom_type()->isa_vectmask() == nullptr && + n->in(2)->bottom_type()->isa_pvectmask() == nullptr && Matcher::vector_length_in_bytes(n) <= 32); match(Set dst (VectorBlend (Binary src1 src2) mask)); format %{ "vector_blend $dst,$src1,$src2,$mask\t! using $vtmp as TEMP" %} @@ -22844,7 +22848,7 @@ instruct vblendvp(legVec dst, legVec src1, legVec src2, legVec mask, legVec vtmp instruct evblendvp64(vec dst, vec src1, vec src2, vec mask, kReg ktmp) %{ predicate(Matcher::vector_length_in_bytes(n) == 64 && - n->in(2)->bottom_type()->isa_vectmask() == nullptr); + n->in(2)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorBlend (Binary src1 src2) mask)); format %{ "vector_blend $dst,$src1,$src2,$mask\t! using k2 as TEMP" %} effect(TEMP ktmp); @@ -22859,7 +22863,7 @@ instruct evblendvp64(vec dst, vec src1, vec src2, vec mask, kReg ktmp) %{ instruct evblendvp64_masked(vec dst, vec src1, vec src2, kReg mask) %{ - predicate(n->in(2)->bottom_type()->isa_vectmask() && + predicate(n->in(2)->bottom_type()->isa_pvectmask() && (!is_subword_type(Matcher::vector_element_basic_type(n)) || VM_Version::supports_avx512bw())); match(Set dst (VectorBlend (Binary src1 src2) mask)); @@ -23058,7 +23062,7 @@ instruct ktest_ge8(rFlagsRegU cr, kReg src1, kReg src2) %{ //------------------------------------- LoadMask -------------------------------------------- instruct loadMask(legVec dst, legVec src) %{ - predicate(n->bottom_type()->isa_vectmask() == nullptr && !VM_Version::supports_avx512vlbw()); + predicate(n->bottom_type()->isa_pvectmask() == nullptr && !VM_Version::supports_avx512vlbw()); match(Set dst (VectorLoadMask src)); effect(TEMP dst); format %{ "vector_loadmask_byte $dst, $src\n\t" %} @@ -23071,7 +23075,7 @@ instruct loadMask(legVec dst, legVec src) %{ %} instruct loadMask64(kReg dst, vec src, vec xtmp) %{ - predicate(n->bottom_type()->isa_vectmask() && !VM_Version::supports_avx512vlbw()); + predicate(n->bottom_type()->isa_pvectmask() && !VM_Version::supports_avx512vlbw()); match(Set dst (VectorLoadMask src)); effect(TEMP xtmp); format %{ "vector_loadmask_64byte $dst, $src\t! using $xtmp as TEMP" %} @@ -23083,7 +23087,7 @@ instruct loadMask64(kReg dst, vec src, vec xtmp) %{ %} instruct loadMask_evex(kReg dst, vec src, vec xtmp) %{ - predicate(n->bottom_type()->isa_vectmask() && VM_Version::supports_avx512vlbw()); + predicate(n->bottom_type()->isa_pvectmask() && VM_Version::supports_avx512vlbw()); match(Set dst (VectorLoadMask src)); effect(TEMP xtmp); format %{ "vector_loadmask_byte $dst, $src\t! using $xtmp as TEMP" %} @@ -23098,7 +23102,7 @@ instruct loadMask_evex(kReg dst, vec src, vec xtmp) %{ //------------------------------------- StoreMask -------------------------------------------- instruct vstoreMask1B(vec dst, vec src, immI_1 size) %{ - predicate(Matcher::vector_length(n) < 64 && n->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(Matcher::vector_length(n) < 64 && n->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorStoreMask src size)); format %{ "vector_store_mask $dst, $src \t! elem size is $size byte[s]" %} ins_encode %{ @@ -23116,7 +23120,7 @@ instruct vstoreMask1B(vec dst, vec src, immI_1 size) %{ %} instruct vstoreMask2B(vec dst, vec src, vec xtmp, immI_2 size) %{ - predicate(Matcher::vector_length(n) <= 16 && n->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(Matcher::vector_length(n) <= 16 && n->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorStoreMask src size)); effect(TEMP_DEF dst, TEMP xtmp); format %{ "vector_store_mask $dst, $src \t! elem size is $size byte[s]" %} @@ -23139,7 +23143,7 @@ instruct vstoreMask2B(vec dst, vec src, vec xtmp, immI_2 size) %{ %} instruct vstoreMask4B(vec dst, vec src, vec xtmp, immI_4 size) %{ - predicate(UseAVX <= 2 && Matcher::vector_length(n) <= 8 && n->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(UseAVX <= 2 && Matcher::vector_length(n) <= 8 && n->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorStoreMask src size)); format %{ "vector_store_mask $dst, $src \t! elem size is $size byte[s]" %} effect(TEMP_DEF dst, TEMP xtmp); @@ -23199,7 +23203,7 @@ instruct storeMask8B_avx(vec dst, vec src, immI_8 size, vec vtmp) %{ %} instruct vstoreMask4B_evex_novectmask(vec dst, vec src, immI_4 size) %{ - predicate(UseAVX > 2 && n->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(UseAVX > 2 && n->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorStoreMask src size)); format %{ "vector_store_mask $dst, $src \t! elem size is $size byte[s]" %} ins_encode %{ @@ -23215,7 +23219,7 @@ instruct vstoreMask4B_evex_novectmask(vec dst, vec src, immI_4 size) %{ %} instruct vstoreMask8B_evex_novectmask(vec dst, vec src, immI_8 size) %{ - predicate(UseAVX > 2 && n->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(UseAVX > 2 && n->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorStoreMask src size)); format %{ "vector_store_mask $dst, $src \t! elem size is $size byte[s]" %} ins_encode %{ @@ -23231,7 +23235,7 @@ instruct vstoreMask8B_evex_novectmask(vec dst, vec src, immI_8 size) %{ %} instruct vstoreMask_evex_vectmask(vec dst, kReg mask, immI size) %{ - predicate(n->in(1)->bottom_type()->isa_vectmask() && !VM_Version::supports_avx512vlbw()); + predicate(n->in(1)->bottom_type()->isa_pvectmask() && !VM_Version::supports_avx512vlbw()); match(Set dst (VectorStoreMask mask size)); effect(TEMP_DEF dst); format %{ "vector_store_mask $dst, $mask \t! elem size is $size byte[s]" %} @@ -23245,7 +23249,7 @@ instruct vstoreMask_evex_vectmask(vec dst, kReg mask, immI size) %{ %} instruct vstoreMask_evex(vec dst, kReg mask, immI size) %{ - predicate(n->in(1)->bottom_type()->isa_vectmask() && VM_Version::supports_avx512vlbw()); + predicate(n->in(1)->bottom_type()->isa_pvectmask() && VM_Version::supports_avx512vlbw()); match(Set dst (VectorStoreMask mask size)); effect(TEMP_DEF dst); format %{ "vector_store_mask $dst, $mask \t! elem size is $size byte[s]" %} @@ -23866,7 +23870,7 @@ instruct vprorate(vec dst, vec src, vec shift) %{ // ---------------------------------- Masked Operations ------------------------------------ instruct vmasked_load_avx_non_subword(vec dst, memory mem, vec mask) %{ - predicate(!n->in(3)->bottom_type()->isa_vectmask()); + predicate(!n->in(3)->bottom_type()->isa_pvectmask()); match(Set dst (LoadVectorMasked mem mask)); format %{ "vector_masked_load $dst, $mem, $mask \t! vector masked copy" %} ins_encode %{ @@ -23879,7 +23883,7 @@ instruct vmasked_load_avx_non_subword(vec dst, memory mem, vec mask) %{ instruct vmasked_load_evex(vec dst, memory mem, kReg mask) %{ - predicate(n->in(3)->bottom_type()->isa_vectmask()); + predicate(n->in(3)->bottom_type()->isa_pvectmask()); match(Set dst (LoadVectorMasked mem mask)); format %{ "vector_masked_load $dst, $mem, $mask \t! vector masked copy" %} ins_encode %{ @@ -23891,7 +23895,7 @@ instruct vmasked_load_evex(vec dst, memory mem, kReg mask) %{ %} instruct vmasked_store_avx_non_subword(memory mem, vec src, vec mask) %{ - predicate(!n->in(3)->in(2)->bottom_type()->isa_vectmask()); + predicate(!n->in(3)->in(2)->bottom_type()->isa_pvectmask()); match(Set mem (StoreVectorMasked mem (Binary src mask))); format %{ "vector_masked_store $mem, $src, $mask \t! vector masked store" %} ins_encode %{ @@ -23904,7 +23908,7 @@ instruct vmasked_store_avx_non_subword(memory mem, vec src, vec mask) %{ %} instruct vmasked_store_evex(memory mem, vec src, kReg mask) %{ - predicate(n->in(3)->in(2)->bottom_type()->isa_vectmask()); + predicate(n->in(3)->in(2)->bottom_type()->isa_pvectmask()); match(Set mem (StoreVectorMasked mem (Binary src mask))); format %{ "vector_masked_store $mem, $src, $mask \t! vector masked store" %} ins_encode %{ @@ -23983,7 +23987,7 @@ instruct vmask_gen_imm(kReg dst, immL len, rRegL temp) %{ %} instruct vmask_tolong_evex(rRegL dst, kReg mask, rFlagsReg cr) %{ - predicate(n->in(1)->bottom_type()->isa_vectmask()); + predicate(n->in(1)->bottom_type()->isa_pvectmask()); match(Set dst (VectorMaskToLong mask)); effect(TEMP dst, KILL cr); format %{ "vector_tolong_evex $dst, $mask \t! vector mask tolong" %} @@ -24000,7 +24004,7 @@ instruct vmask_tolong_evex(rRegL dst, kReg mask, rFlagsReg cr) %{ %} instruct vmask_tolong_bool(rRegL dst, vec mask, vec xtmp, rFlagsReg cr) %{ - predicate(n->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(n->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorMaskToLong mask)); format %{ "vector_tolong_bool $dst, $mask \t! using $xtmp as TEMP" %} effect(TEMP_DEF dst, TEMP xtmp, KILL cr); @@ -24016,7 +24020,7 @@ instruct vmask_tolong_bool(rRegL dst, vec mask, vec xtmp, rFlagsReg cr) %{ %} instruct vmask_tolong_avx(rRegL dst, vec mask, immI size, vec xtmp, rFlagsReg cr) %{ - predicate(n->in(1)->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(n->in(1)->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorMaskToLong (VectorStoreMask mask size))); format %{ "vector_tolong_avx $dst, $mask \t! using $xtmp as TEMP" %} effect(TEMP_DEF dst, TEMP xtmp, KILL cr); @@ -24032,7 +24036,7 @@ instruct vmask_tolong_avx(rRegL dst, vec mask, immI size, vec xtmp, rFlagsReg cr %} instruct vmask_truecount_evex(rRegI dst, kReg mask, rRegL tmp, rFlagsReg cr) %{ - predicate(n->in(1)->bottom_type()->isa_vectmask()); + predicate(n->in(1)->bottom_type()->isa_pvectmask()); match(Set dst (VectorMaskTrueCount mask)); effect(TEMP_DEF dst, TEMP tmp, KILL cr); format %{ "vector_truecount_evex $dst, $mask \t! using $tmp as TEMP" %} @@ -24049,7 +24053,7 @@ instruct vmask_truecount_evex(rRegI dst, kReg mask, rRegL tmp, rFlagsReg cr) %{ %} instruct vmask_truecount_bool(rRegI dst, vec mask, rRegL tmp, vec xtmp, rFlagsReg cr) %{ - predicate(n->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(n->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorMaskTrueCount mask)); effect(TEMP_DEF dst, TEMP tmp, TEMP xtmp, KILL cr); format %{ "vector_truecount_bool $dst, $mask \t! using $tmp, $xtmp as TEMP" %} @@ -24065,7 +24069,7 @@ instruct vmask_truecount_bool(rRegI dst, vec mask, rRegL tmp, vec xtmp, rFlagsRe %} instruct vmask_truecount_avx(rRegI dst, vec mask, immI size, rRegL tmp, vec xtmp, rFlagsReg cr) %{ - predicate(n->in(1)->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(n->in(1)->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorMaskTrueCount (VectorStoreMask mask size))); effect(TEMP_DEF dst, TEMP tmp, TEMP xtmp, KILL cr); format %{ "vector_truecount_avx $dst, $mask \t! using $tmp, $xtmp as TEMP" %} @@ -24081,7 +24085,7 @@ instruct vmask_truecount_avx(rRegI dst, vec mask, immI size, rRegL tmp, vec xtmp %} instruct vmask_first_or_last_true_evex(rRegI dst, kReg mask, rRegL tmp, rFlagsReg cr) %{ - predicate(n->in(1)->bottom_type()->isa_vectmask()); + predicate(n->in(1)->bottom_type()->isa_pvectmask()); match(Set dst (VectorMaskFirstTrue mask)); match(Set dst (VectorMaskLastTrue mask)); effect(TEMP_DEF dst, TEMP tmp, KILL cr); @@ -24099,7 +24103,7 @@ instruct vmask_first_or_last_true_evex(rRegI dst, kReg mask, rRegL tmp, rFlagsRe %} instruct vmask_first_or_last_true_bool(rRegI dst, vec mask, rRegL tmp, vec xtmp, rFlagsReg cr) %{ - predicate(n->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(n->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorMaskFirstTrue mask)); match(Set dst (VectorMaskLastTrue mask)); effect(TEMP_DEF dst, TEMP tmp, TEMP xtmp, KILL cr); @@ -24116,7 +24120,7 @@ instruct vmask_first_or_last_true_bool(rRegI dst, vec mask, rRegL tmp, vec xtmp, %} instruct vmask_first_or_last_true_avx(rRegI dst, vec mask, immI size, rRegL tmp, vec xtmp, rFlagsReg cr) %{ - predicate(n->in(1)->in(1)->bottom_type()->isa_vectmask() == nullptr); + predicate(n->in(1)->in(1)->bottom_type()->isa_pvectmask() == nullptr); match(Set dst (VectorMaskFirstTrue (VectorStoreMask mask size))); match(Set dst (VectorMaskLastTrue (VectorStoreMask mask size))); effect(TEMP_DEF dst, TEMP tmp, TEMP xtmp, KILL cr); @@ -24168,7 +24172,7 @@ instruct vcompress_mask_reg_evex(kReg dst, kReg mask, rRegL rtmp1, rRegL rtmp2, effect(TEMP rtmp1, TEMP rtmp2, KILL cr); format %{ "mask_compress_evex $dst, $mask\t! using $rtmp1 and $rtmp2 as TEMP" %} ins_encode %{ - assert(this->in(1)->bottom_type()->isa_vectmask(), ""); + assert(this->in(1)->bottom_type()->isa_pvectmask(), ""); int mask_len = Matcher::vector_length(this); __ vector_mask_compress($dst$$KRegister, $mask$$KRegister, $rtmp1$$Register, $rtmp2$$Register, mask_len); %} @@ -24838,7 +24842,7 @@ instruct evcmp_masked(kReg dst, vec src1, vec src2, immI8 cond, kReg mask) %{ match(Set dst (VectorMaskCmp (Binary src1 src2) (Binary cond mask))); format %{ "vcmp_masked $dst, $src1, $src2, $cond, $mask" %} ins_encode %{ - assert(bottom_type()->isa_vectmask(), "TypeVectMask expected"); + assert(bottom_type()->isa_pvectmask(), "TypePVectMask expected"); int vlen_enc = vector_length_encoding(this, $src1); BasicType src1_elem_bt = Matcher::vector_element_basic_type(this, $src1); @@ -24920,11 +24924,11 @@ instruct mask_not_imm(kReg dst, kReg src, immI_M1 cnt) %{ ins_pipe( pipe_slow ); %} -instruct long_to_maskLE8_avx(vec dst, rRegL src, rRegL rtmp1, rRegL rtmp2, vec xtmp) %{ - predicate(n->bottom_type()->isa_vectmask() == nullptr && Matcher::vector_length(n) <= 8); +instruct long_to_maskLE8_avx(vec dst, rRegL src, rRegL rtmp1, rRegL rtmp2) %{ + predicate(n->bottom_type()->isa_pvectmask() == nullptr && Matcher::vector_length(n) <= 8); match(Set dst (VectorLongToMask src)); - effect(TEMP dst, TEMP rtmp1, TEMP rtmp2, TEMP xtmp); - format %{ "long_to_mask_avx $dst, $src\t! using $rtmp1, $rtmp2, $xtmp as TEMP" %} + effect(TEMP dst, TEMP rtmp1, TEMP rtmp2); + format %{ "long_to_mask_avx $dst, $src\t! using $rtmp1, $rtmp2" %} ins_encode %{ int mask_len = Matcher::vector_length(this); int vec_enc = vector_length_encoding(mask_len); @@ -24936,7 +24940,7 @@ instruct long_to_maskLE8_avx(vec dst, rRegL src, rRegL rtmp1, rRegL rtmp2, vec x instruct long_to_maskGT8_avx(vec dst, rRegL src, rRegL rtmp1, rRegL rtmp2, vec xtmp1, rFlagsReg cr) %{ - predicate(n->bottom_type()->isa_vectmask() == nullptr && Matcher::vector_length(n) > 8); + predicate(n->bottom_type()->isa_pvectmask() == nullptr && Matcher::vector_length(n) > 8); match(Set dst (VectorLongToMask src)); effect(TEMP dst, TEMP rtmp1, TEMP rtmp2, TEMP xtmp1, KILL cr); format %{ "long_to_mask_avx $dst, $src\t! using $rtmp1, $rtmp2, $xtmp1, as TEMP" %} @@ -24951,7 +24955,7 @@ instruct long_to_maskGT8_avx(vec dst, rRegL src, rRegL rtmp1, rRegL rtmp2, vec x %} instruct long_to_mask_evex(kReg dst, rRegL src) %{ - predicate(n->bottom_type()->isa_vectmask()); + predicate(n->bottom_type()->isa_pvectmask()); match(Set dst (VectorLongToMask src)); format %{ "long_to_mask_evex $dst, $src\t!" %} ins_encode %{ @@ -25317,6 +25321,7 @@ instruct reinterpretHF2S(rRegI dst, regF src) format %{ "evmovw $dst, $src" %} ins_encode %{ __ evmovw($dst$$Register, $src$$XMMRegister); + __ narrow_subword_type($dst$$Register, T_SHORT); %} ins_pipe(pipe_slow); %} diff --git a/src/hotspot/os/aix/os_aix.cpp b/src/hotspot/os/aix/os_aix.cpp index 3cad24d388c..32d845b2b6d 100644 --- a/src/hotspot/os/aix/os_aix.cpp +++ b/src/hotspot/os/aix/os_aix.cpp @@ -578,13 +578,13 @@ void os::init_system_properties_values() { char *ld_library_path = NEW_C_HEAP_ARRAY(char, pathsize, mtInternal); os::snprintf_checked(ld_library_path, pathsize, "%s%s" DEFAULT_LIBPATH, v, v_colon); Arguments::set_library_path(ld_library_path); - FREE_C_HEAP_ARRAY(char, ld_library_path); + FREE_C_HEAP_ARRAY(ld_library_path); // Extensions directories. os::snprintf_checked(buf, bufsize, "%s" EXTENSIONS_DIR, Arguments::get_java_home()); Arguments::set_ext_dirs(buf); - FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(buf); #undef DEFAULT_LIBPATH #undef EXTENSIONS_DIR diff --git a/src/hotspot/os/aix/os_perf_aix.cpp b/src/hotspot/os/aix/os_perf_aix.cpp index cbf78083483..3668ac6ba3f 100644 --- a/src/hotspot/os/aix/os_perf_aix.cpp +++ b/src/hotspot/os/aix/os_perf_aix.cpp @@ -258,10 +258,10 @@ bool CPUPerformanceInterface::CPUPerformance::initialize() { CPUPerformanceInterface::CPUPerformance::~CPUPerformance() { if (_lcpu_names) { - FREE_C_HEAP_ARRAY(perfstat_id_t, _lcpu_names); + FREE_C_HEAP_ARRAY(_lcpu_names); } if (_prev_ticks) { - FREE_C_HEAP_ARRAY(cpu_tick_store_t, _prev_ticks); + FREE_C_HEAP_ARRAY(_prev_ticks); } } @@ -511,12 +511,12 @@ CPUInformationInterface::~CPUInformationInterface() { if (_cpu_info != nullptr) { if (_cpu_info->cpu_name() != nullptr) { const char* cpu_name = _cpu_info->cpu_name(); - FREE_C_HEAP_ARRAY(char, cpu_name); + FREE_C_HEAP_ARRAY(cpu_name); _cpu_info->set_cpu_name(nullptr); } if (_cpu_info->cpu_description() != nullptr) { const char* cpu_desc = _cpu_info->cpu_description(); - FREE_C_HEAP_ARRAY(char, cpu_desc); + FREE_C_HEAP_ARRAY(cpu_desc); _cpu_info->set_cpu_description(nullptr); } delete _cpu_info; @@ -576,7 +576,7 @@ int NetworkPerformanceInterface::NetworkPerformance::network_utilization(Network // check for error if (n_records < 0) { - FREE_C_HEAP_ARRAY(perfstat_netinterface_t, net_stats); + FREE_C_HEAP_ARRAY(net_stats); return OS_ERR; } @@ -593,7 +593,7 @@ int NetworkPerformanceInterface::NetworkPerformance::network_utilization(Network *network_interfaces = new_interface; } - FREE_C_HEAP_ARRAY(perfstat_netinterface_t, net_stats); + FREE_C_HEAP_ARRAY(net_stats); return OS_OK; } diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp index a4d9a2197a5..fc5b9952f78 100644 --- a/src/hotspot/os/bsd/os_bsd.cpp +++ b/src/hotspot/os/bsd/os_bsd.cpp @@ -106,6 +106,14 @@ #include #include #include + + // needed by current_stack_base_and_size() workaround for Mavericks + #define DEFAULT_MAIN_THREAD_STACK_PAGES 2048 + #define OS_X_10_9_0_KERNEL_MAJOR_VERSION 13 +#endif + +#if !defined(__APPLE__) && !defined(__NetBSD__) + #include #endif #ifndef MAP_ANONYMOUS @@ -444,14 +452,14 @@ void os::init_system_properties_values() { char *ld_library_path = NEW_C_HEAP_ARRAY(char, ld_library_path_size, mtInternal); os::snprintf_checked(ld_library_path, ld_library_path_size, "%s%s" SYS_EXT_DIR "/lib/%s:" DEFAULT_LIBPATH, v, v_colon, cpu_arch); Arguments::set_library_path(ld_library_path); - FREE_C_HEAP_ARRAY(char, ld_library_path); + FREE_C_HEAP_ARRAY(ld_library_path); } // Extensions directories. os::snprintf_checked(buf, bufsize, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home()); Arguments::set_ext_dirs(buf); - FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(buf); #else // __APPLE__ @@ -538,7 +546,7 @@ void os::init_system_properties_values() { os::snprintf_checked(ld_library_path, ld_library_path_size, "%s%s%s%s%s" SYS_EXTENSIONS_DIR ":" SYS_EXTENSIONS_DIRS ":.", v, v_colon, l, l_colon, user_home_dir); Arguments::set_library_path(ld_library_path); - FREE_C_HEAP_ARRAY(char, ld_library_path); + FREE_C_HEAP_ARRAY(ld_library_path); } // Extensions directories. @@ -550,7 +558,7 @@ void os::init_system_properties_values() { user_home_dir, Arguments::get_java_home()); Arguments::set_ext_dirs(buf); - FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(buf); #undef SYS_EXTENSIONS_DIR #undef SYS_EXTENSIONS_DIRS @@ -1115,7 +1123,7 @@ bool os::dll_address_to_library_name(address addr, char* buf, // in case of error it checks if .dll/.so was built for the // same architecture as Hotspot is running on -void *os::Bsd::dlopen_helper(const char *filename, int mode, char *ebuf, int ebuflen) { +static void *dlopen_helper(const char *filename, char *ebuf, int ebuflen) { bool ieee_handling = IEEE_subnormal_handling_OK(); if (!ieee_handling) { Events::log_dll_message(nullptr, "IEEE subnormal handling check failed before loading %s", filename); @@ -1199,7 +1207,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) { log_info(os)("attempting shared library load of %s", filename); - return os::Bsd::dlopen_helper(filename, RTLD_LAZY, ebuf, ebuflen); + return dlopen_helper(filename, ebuf, ebuflen); } #else void * os::dll_load(const char *filename, char *ebuf, int ebuflen) { @@ -1210,7 +1218,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) { log_info(os)("attempting shared library load of %s", filename); void* result; - result = os::Bsd::dlopen_helper(filename, RTLD_LAZY, ebuf, ebuflen); + result = dlopen_helper(filename, ebuf, ebuflen); if (result != nullptr) { return result; } @@ -2545,6 +2553,106 @@ bool os::start_debugging(char *buf, int buflen) { return yes; } +// Java thread: +// +// Low memory addresses +// +------------------------+ +// | |\ Java thread created by VM does not have glibc +// | glibc guard page | - guard, attached Java thread usually has +// | |/ 1 glibc guard page. +// P1 +------------------------+ Thread::stack_base() - Thread::stack_size() +// | |\ +// | HotSpot Guard Pages | - red, yellow and reserved pages +// | |/ +// +------------------------+ StackOverflow::stack_reserved_zone_base() +// | |\ +// | Normal Stack | - +// | |/ +// P2 +------------------------+ Thread::stack_base() +// +// Non-Java thread: +// +// Low memory addresses +// +------------------------+ +// | |\ +// | glibc guard page | - usually 1 page +// | |/ +// P1 +------------------------+ Thread::stack_base() - Thread::stack_size() +// | |\ +// | Normal Stack | - +// | |/ +// P2 +------------------------+ Thread::stack_base() +// +// ** P1 (aka bottom) and size are the address and stack size +// returned from pthread_attr_getstack(). +// ** P2 (aka stack top or base) = P1 + size + +void os::current_stack_base_and_size(address* base, size_t* size) { + address bottom; +#ifdef __APPLE__ + pthread_t self = pthread_self(); + *base = (address) pthread_get_stackaddr_np(self); + *size = pthread_get_stacksize_np(self); +# ifdef __x86_64__ + // workaround for OS X 10.9.0 (Mavericks) + // pthread_get_stacksize_np returns 128 pages even though the actual size is 2048 pages + if (pthread_main_np() == 1) { + // At least on Mac OS 10.12 we have observed stack sizes not aligned + // to pages boundaries. This can be provoked by e.g. setrlimit() (ulimit -s xxxx in the + // shell). Apparently Mac OS actually rounds upwards to next multiple of page size, + // however, we round downwards here to be on the safe side. + *size = align_down(*size, getpagesize()); + + if ((*size) < (DEFAULT_MAIN_THREAD_STACK_PAGES * (size_t)getpagesize())) { + char kern_osrelease[256]; + size_t kern_osrelease_size = sizeof(kern_osrelease); + int ret = sysctlbyname("kern.osrelease", kern_osrelease, &kern_osrelease_size, nullptr, 0); + if (ret == 0) { + // get the major number, atoi will ignore the minor amd micro portions of the version string + if (atoi(kern_osrelease) >= OS_X_10_9_0_KERNEL_MAJOR_VERSION) { + *size = (DEFAULT_MAIN_THREAD_STACK_PAGES*getpagesize()); + } + } + } + } +# endif + bottom = *base - *size; +#elif defined(__OpenBSD__) + stack_t ss; + int rslt = pthread_stackseg_np(pthread_self(), &ss); + + if (rslt != 0) + fatal("pthread_stackseg_np failed with error = %d", rslt); + + *base = (address) ss.ss_sp; + *size = ss.ss_size; + bottom = *base - *size; +#else + pthread_attr_t attr; + + int rslt = pthread_attr_init(&attr); + + // JVM needs to know exact stack location, abort if it fails + if (rslt != 0) + fatal("pthread_attr_init failed with error = %d", rslt); + + rslt = pthread_attr_get_np(pthread_self(), &attr); + + if (rslt != 0) + fatal("pthread_attr_get_np failed with error = %d", rslt); + + if (pthread_attr_getstackaddr(&attr, (void **)&bottom) != 0 || + pthread_attr_getstacksize(&attr, size) != 0) { + fatal("Can not locate current stack attributes!"); + } + + *base = bottom + *size; + + pthread_attr_destroy(&attr); +#endif + assert(os::current_stack_pointer() >= bottom && + os::current_stack_pointer() < *base, "just checking"); +} void os::print_memory_mappings(char* addr, size_t bytes, outputStream* st) {} #if INCLUDE_JFR diff --git a/src/hotspot/os/bsd/os_bsd.hpp b/src/hotspot/os/bsd/os_bsd.hpp index e87a680b2d2..91fcb090f50 100644 --- a/src/hotspot/os/bsd/os_bsd.hpp +++ b/src/hotspot/os/bsd/os_bsd.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -76,8 +76,6 @@ class os::Bsd { // Real-time clock functions static void clock_init(void); - static void *dlopen_helper(const char *path, int mode, char *ebuf, int ebuflen); - // Stack repair handling // none present @@ -105,6 +103,7 @@ class os::Bsd { static void set_numa_tonode_memory(numa_tonode_memory_func_t func) { _numa_tonode_memory = func; } static void set_numa_interleave_memory(numa_interleave_memory_func_t func) { _numa_interleave_memory = func; } static void set_numa_all_nodes(unsigned long* ptr) { _numa_all_nodes = ptr; } + public: static int sched_getcpu() { return _sched_getcpu != nullptr ? _sched_getcpu() : -1; } static int numa_node_to_cpus(int node, unsigned long *buffer, int bufferlen) { diff --git a/src/hotspot/os/bsd/os_perf_bsd.cpp b/src/hotspot/os/bsd/os_perf_bsd.cpp index 78d9519c3a7..47fe3a0d7e9 100644 --- a/src/hotspot/os/bsd/os_perf_bsd.cpp +++ b/src/hotspot/os/bsd/os_perf_bsd.cpp @@ -301,7 +301,7 @@ int SystemProcessInterface::SystemProcesses::system_processes(SystemProcess** sy pids_bytes = proc_listpids(PROC_ALL_PIDS, 0, pids, pids_bytes); if (pids_bytes <= 0) { // couldn't fit buffer, retry. - FREE_RESOURCE_ARRAY(pid_t, pids, pid_count); + FREE_RESOURCE_ARRAY(pids, pid_count); pids = nullptr; try_count++; if (try_count > 3) { @@ -381,12 +381,12 @@ CPUInformationInterface::~CPUInformationInterface() { if (_cpu_info != nullptr) { if (_cpu_info->cpu_name() != nullptr) { const char* cpu_name = _cpu_info->cpu_name(); - FREE_C_HEAP_ARRAY(char, cpu_name); + FREE_C_HEAP_ARRAY(cpu_name); _cpu_info->set_cpu_name(nullptr); } if (_cpu_info->cpu_description() != nullptr) { const char* cpu_desc = _cpu_info->cpu_description(); - FREE_C_HEAP_ARRAY(char, cpu_desc); + FREE_C_HEAP_ARRAY(cpu_desc); _cpu_info->set_cpu_description(nullptr); } delete _cpu_info; diff --git a/src/hotspot/os/linux/cgroupSubsystem_linux.cpp b/src/hotspot/os/linux/cgroupSubsystem_linux.cpp index 4a2d75ecdf3..1c183a9bbab 100644 --- a/src/hotspot/os/linux/cgroupSubsystem_linux.cpp +++ b/src/hotspot/os/linux/cgroupSubsystem_linux.cpp @@ -649,7 +649,7 @@ bool CgroupSubsystem::active_processor_count(int (*cpu_bound_func)(), double& va return true; } - int cpu_count = cpu_bound_func(); + double cpu_count = static_cast(cpu_bound_func()); double result = -1; if (!CgroupUtil::processor_count(contrl->controller(), cpu_count, result)) { return false; diff --git a/src/hotspot/os/linux/cgroupUtil_linux.cpp b/src/hotspot/os/linux/cgroupUtil_linux.cpp index f166f6cd5e4..1f7775acfc3 100644 --- a/src/hotspot/os/linux/cgroupUtil_linux.cpp +++ b/src/hotspot/os/linux/cgroupUtil_linux.cpp @@ -25,7 +25,7 @@ #include "cgroupUtil_linux.hpp" -bool CgroupUtil::processor_count(CgroupCpuController* cpu_ctrl, int upper_bound, double& value) { +bool CgroupUtil::processor_count(CgroupCpuController* cpu_ctrl, double upper_bound, double& value) { assert(upper_bound > 0, "upper bound of cpus must be positive"); int quota = -1; int period = -1; @@ -68,8 +68,8 @@ physical_memory_size_type CgroupUtil::get_updated_mem_limit(CgroupMemoryControll // Get an updated cpu limit. The return value is strictly less than or equal to the // passed in 'lowest' value. double CgroupUtil::get_updated_cpu_limit(CgroupCpuController* cpu, - int lowest, - int upper_bound) { + double lowest, + double upper_bound) { assert(lowest > 0 && lowest <= upper_bound, "invariant"); double cpu_limit_val = -1; if (CgroupUtil::processor_count(cpu, upper_bound, cpu_limit_val) && cpu_limit_val != upper_bound) { @@ -145,7 +145,7 @@ void CgroupUtil::adjust_controller(CgroupMemoryController* mem, physical_memory_ os::free(limit_cg_path); } -void CgroupUtil::adjust_controller(CgroupCpuController* cpu, int upper_bound) { +void CgroupUtil::adjust_controller(CgroupCpuController* cpu, double upper_bound) { assert(cpu->cgroup_path() != nullptr, "invariant"); if (strstr(cpu->cgroup_path(), "../") != nullptr) { log_warning(os, container)("Cgroup cpu controller path at '%s' seems to have moved " @@ -163,9 +163,9 @@ void CgroupUtil::adjust_controller(CgroupCpuController* cpu, int upper_bound) { char* cg_path = os::strdup(orig); char* last_slash; assert(cg_path[0] == '/', "cgroup path must start with '/'"); - int lowest_limit = upper_bound; + double lowest_limit = upper_bound; double cpus = get_updated_cpu_limit(cpu, lowest_limit, upper_bound); - int orig_limit = lowest_limit != upper_bound ? lowest_limit : upper_bound; + double orig_limit = lowest_limit != upper_bound ? lowest_limit : upper_bound; char* limit_cg_path = nullptr; while ((last_slash = strrchr(cg_path, '/')) != cg_path) { *last_slash = '\0'; // strip path @@ -193,10 +193,10 @@ void CgroupUtil::adjust_controller(CgroupCpuController* cpu, int upper_bound) { assert(limit_cg_path != nullptr, "limit path must be set"); cpu->set_subsystem_path(limit_cg_path); log_trace(os, container)("Adjusted controller path for cpu to: %s. " - "Lowest limit was: %d", + "Lowest limit was: %.2f", cpu->subsystem_path(), lowest_limit); } else { - log_trace(os, container)("Lowest limit was: %d", lowest_limit); + log_trace(os, container)("Lowest limit was: %.2f", lowest_limit); log_trace(os, container)("No lower limit found for cpu in hierarchy %s, " "adjusting to original path %s", cpu->mount_point(), orig); diff --git a/src/hotspot/os/linux/cgroupUtil_linux.hpp b/src/hotspot/os/linux/cgroupUtil_linux.hpp index 68585c22c2d..c5df7e8efa9 100644 --- a/src/hotspot/os/linux/cgroupUtil_linux.hpp +++ b/src/hotspot/os/linux/cgroupUtil_linux.hpp @@ -32,18 +32,18 @@ class CgroupUtil: AllStatic { public: - static bool processor_count(CgroupCpuController* cpu, int upper_bound, double& value); + static bool processor_count(CgroupCpuController* cpu, double upper_bound, double& value); // Given a memory controller, adjust its path to a point in the hierarchy // that represents the closest memory limit. static void adjust_controller(CgroupMemoryController* m, physical_memory_size_type upper_bound); // Given a cpu controller, adjust its path to a point in the hierarchy // that represents the closest cpu limit. - static void adjust_controller(CgroupCpuController* c, int upper_bound); + static void adjust_controller(CgroupCpuController* c, double upper_bound); private: static physical_memory_size_type get_updated_mem_limit(CgroupMemoryController* m, physical_memory_size_type lowest, physical_memory_size_type upper_bound); - static double get_updated_cpu_limit(CgroupCpuController* c, int lowest, int upper_bound); + static double get_updated_cpu_limit(CgroupCpuController* c, double lowest, double upper_bound); }; #endif // CGROUP_UTIL_LINUX_HPP diff --git a/src/hotspot/os/linux/osContainer_linux.cpp b/src/hotspot/os/linux/osContainer_linux.cpp index da2cbf381e6..511c7bebff7 100644 --- a/src/hotspot/os/linux/osContainer_linux.cpp +++ b/src/hotspot/os/linux/osContainer_linux.cpp @@ -79,9 +79,12 @@ void OSContainer::init() { * that limits enforced by other means (e.g. systemd slice) are properly * detected. */ - const char *reason; - bool any_mem_cpu_limit_present = false; + const char* reason; bool controllers_read_only = cgroup_subsystem->is_containerized(); + + bool any_mem_limit_present = false; + bool cpu_limit_present = false; + if (controllers_read_only) { // in-container case reason = " because all controllers are mounted read-only (container case)"; @@ -89,19 +92,30 @@ void OSContainer::init() { // We can be in one of two cases: // 1.) On a physical Linux system without any limit // 2.) On a physical Linux system with a limit enforced by other means (like systemd slice) + physical_memory_size_type mem_limit_val = value_unlimited; - (void)memory_limit_in_bytes(mem_limit_val); // discard error and use default - double host_cpus = os::Linux::active_processor_count(); + any_mem_limit_present = any_mem_limit_present || (memory_limit_in_bytes(mem_limit_val) && + mem_limit_val != value_unlimited); + + physical_memory_size_type throttle_limit_val = value_unlimited; + any_mem_limit_present = any_mem_limit_present || (memory_throttle_limit_in_bytes(throttle_limit_val) && + throttle_limit_val != value_unlimited); + + physical_memory_size_type soft_limit_val = value_unlimited; + any_mem_limit_present = any_mem_limit_present || (memory_soft_limit_in_bytes(soft_limit_val) && + (soft_limit_val != value_unlimited && soft_limit_val != 0)); + + const double host_cpus = os::Linux::active_processor_count(); double cpus = host_cpus; - (void)active_processor_count(cpus); // discard error and use default - any_mem_cpu_limit_present = mem_limit_val != value_unlimited || host_cpus != cpus; - if (any_mem_cpu_limit_present) { + cpu_limit_present = active_processor_count(cpus) && host_cpus != cpus; + + if (any_mem_limit_present || cpu_limit_present) { reason = " because either a cpu or a memory limit is present"; } else { reason = " because no cpu or memory limit is present"; } } - _is_containerized = controllers_read_only || any_mem_cpu_limit_present; + _is_containerized = controllers_read_only || any_mem_limit_present || cpu_limit_present; log_debug(os, container)("OSContainer::init: is_containerized() = %s%s", _is_containerized ? "true" : "false", reason); diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp index a87c0ab33fa..6927f5108ac 100644 --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp @@ -710,14 +710,14 @@ void os::init_system_properties_values() { char *ld_library_path = NEW_C_HEAP_ARRAY(char, pathsize, mtInternal); os::snprintf_checked(ld_library_path, pathsize, "%s%s" SYS_EXT_DIR "/lib:" DEFAULT_LIBPATH, v, v_colon); Arguments::set_library_path(ld_library_path); - FREE_C_HEAP_ARRAY(char, ld_library_path); + FREE_C_HEAP_ARRAY(ld_library_path); } // Extensions directories. os::snprintf_checked(buf, bufsize, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home()); Arguments::set_ext_dirs(buf); - FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(buf); #undef DEFAULT_LIBPATH #undef SYS_EXT_DIR @@ -3435,7 +3435,7 @@ void os::Linux::rebuild_cpu_to_node_map() { } } } - FREE_C_HEAP_ARRAY(unsigned long, cpu_map); + FREE_C_HEAP_ARRAY(cpu_map); } int os::Linux::numa_node_to_cpus(int node, unsigned long *buffer, int bufferlen) { diff --git a/src/hotspot/os/linux/os_perf_linux.cpp b/src/hotspot/os/linux/os_perf_linux.cpp index 9f91f3b4c0d..c0e863ed2a2 100644 --- a/src/hotspot/os/linux/os_perf_linux.cpp +++ b/src/hotspot/os/linux/os_perf_linux.cpp @@ -545,7 +545,7 @@ bool CPUPerformanceInterface::CPUPerformance::initialize() { CPUPerformanceInterface::CPUPerformance::~CPUPerformance() { if (_counters.cpus != nullptr) { - FREE_C_HEAP_ARRAY(char, _counters.cpus); + FREE_C_HEAP_ARRAY(_counters.cpus); } } @@ -811,7 +811,7 @@ int SystemProcessInterface::SystemProcesses::ProcessIterator::current(SystemProc cmdline = get_cmdline(); if (cmdline != nullptr) { process_info->set_command_line(allocate_string(cmdline)); - FREE_C_HEAP_ARRAY(char, cmdline); + FREE_C_HEAP_ARRAY(cmdline); } return OS_OK; @@ -937,12 +937,12 @@ CPUInformationInterface::~CPUInformationInterface() { if (_cpu_info != nullptr) { if (_cpu_info->cpu_name() != nullptr) { const char* cpu_name = _cpu_info->cpu_name(); - FREE_C_HEAP_ARRAY(char, cpu_name); + FREE_C_HEAP_ARRAY(cpu_name); _cpu_info->set_cpu_name(nullptr); } if (_cpu_info->cpu_description() != nullptr) { const char* cpu_desc = _cpu_info->cpu_description(); - FREE_C_HEAP_ARRAY(char, cpu_desc); + FREE_C_HEAP_ARRAY(cpu_desc); _cpu_info->set_cpu_description(nullptr); } delete _cpu_info; diff --git a/src/hotspot/os/linux/procMapsParser.cpp b/src/hotspot/os/linux/procMapsParser.cpp index 0663cae61f3..00675683e34 100644 --- a/src/hotspot/os/linux/procMapsParser.cpp +++ b/src/hotspot/os/linux/procMapsParser.cpp @@ -45,7 +45,7 @@ ProcSmapsParser::ProcSmapsParser(FILE* f) : } ProcSmapsParser::~ProcSmapsParser() { - FREE_C_HEAP_ARRAY(char, _line); + FREE_C_HEAP_ARRAY(_line); } bool ProcSmapsParser::read_line() { diff --git a/src/hotspot/os/posix/perfMemory_posix.cpp b/src/hotspot/os/posix/perfMemory_posix.cpp index c5046797e02..300c86ffc47 100644 --- a/src/hotspot/os/posix/perfMemory_posix.cpp +++ b/src/hotspot/os/posix/perfMemory_posix.cpp @@ -118,7 +118,7 @@ static void save_memory_to_file(char* addr, size_t size) { } } } - FREE_C_HEAP_ARRAY(char, destfile); + FREE_C_HEAP_ARRAY(destfile); } @@ -483,14 +483,14 @@ static char* get_user_name(uid_t uid) { p->pw_name == nullptr ? "pw_name = null" : "pw_name zero length"); } } - FREE_C_HEAP_ARRAY(char, pwbuf); + FREE_C_HEAP_ARRAY(pwbuf); return nullptr; } char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1, mtInternal); strcpy(user_name, p->pw_name); - FREE_C_HEAP_ARRAY(char, pwbuf); + FREE_C_HEAP_ARRAY(pwbuf); return user_name; } @@ -572,7 +572,7 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) { DIR* subdirp = open_directory_secure(usrdir_name); if (subdirp == nullptr) { - FREE_C_HEAP_ARRAY(char, usrdir_name); + FREE_C_HEAP_ARRAY(usrdir_name); continue; } @@ -583,7 +583,7 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) { // symlink can be exploited. // if (!is_directory_secure(usrdir_name)) { - FREE_C_HEAP_ARRAY(char, usrdir_name); + FREE_C_HEAP_ARRAY(usrdir_name); os::closedir(subdirp); continue; } @@ -607,13 +607,13 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) { // don't follow symbolic links for the file RESTARTABLE(::lstat(filename, &statbuf), result); if (result == OS_ERR) { - FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(filename); continue; } // skip over files that are not regular files. if (!S_ISREG(statbuf.st_mode)) { - FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(filename); continue; } @@ -623,7 +623,7 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) { if (statbuf.st_ctime > oldest_ctime) { char* user = strchr(dentry->d_name, '_') + 1; - FREE_C_HEAP_ARRAY(char, oldest_user); + FREE_C_HEAP_ARRAY(oldest_user); oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal); strcpy(oldest_user, user); @@ -631,11 +631,11 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) { } } - FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(filename); } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, usrdir_name); + FREE_C_HEAP_ARRAY(usrdir_name); } os::closedir(tmpdirp); @@ -1105,11 +1105,11 @@ static char* mmap_create_shared(size_t size) { log_info(perf, memops)("Trying to open %s/%s", dirname, short_filename); fd = create_sharedmem_file(dirname, short_filename, size); - FREE_C_HEAP_ARRAY(char, user_name); - FREE_C_HEAP_ARRAY(char, dirname); + FREE_C_HEAP_ARRAY(user_name); + FREE_C_HEAP_ARRAY(dirname); if (fd == -1) { - FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(filename); return nullptr; } @@ -1121,7 +1121,7 @@ static char* mmap_create_shared(size_t size) { if (mapAddress == MAP_FAILED) { log_debug(perf)("mmap failed - %s", os::strerror(errno)); remove_file(filename); - FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(filename); return nullptr; } @@ -1171,7 +1171,7 @@ static void delete_shared_memory(char* addr, size_t size) { remove_file(backing_store_file_name); // Don't.. Free heap memory could deadlock os::abort() if it is called // from signal handler. OS will reclaim the heap memory. - // FREE_C_HEAP_ARRAY(char, backing_store_file_name); + // FREE_C_HEAP_ARRAY(backing_store_file_name); backing_store_file_name = nullptr; } } @@ -1223,8 +1223,8 @@ static void mmap_attach_shared(int vmid, char** addr, size_t* sizep, TRAPS) { // store file, we don't follow them when attaching either. // if (!is_directory_secure(dirname)) { - FREE_C_HEAP_ARRAY(char, dirname); - FREE_C_HEAP_ARRAY(char, luser); + FREE_C_HEAP_ARRAY(dirname); + FREE_C_HEAP_ARRAY(luser); THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Process not found"); } @@ -1236,9 +1236,9 @@ static void mmap_attach_shared(int vmid, char** addr, size_t* sizep, TRAPS) { int fd = open_sharedmem_file(filename, file_flags, THREAD); // free the c heap resources that are no longer needed - FREE_C_HEAP_ARRAY(char, luser); - FREE_C_HEAP_ARRAY(char, dirname); - FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(luser); + FREE_C_HEAP_ARRAY(dirname); + FREE_C_HEAP_ARRAY(filename); if (HAS_PENDING_EXCEPTION) { assert(fd == OS_ERR, "open_sharedmem_file always return OS_ERR on exceptions"); diff --git a/src/hotspot/os/windows/os_perf_windows.cpp b/src/hotspot/os/windows/os_perf_windows.cpp index 9d04ae65954..d083c72c2e0 100644 --- a/src/hotspot/os/windows/os_perf_windows.cpp +++ b/src/hotspot/os/windows/os_perf_windows.cpp @@ -178,9 +178,9 @@ static void destroy(MultiCounterQueryP query) { for (int i = 0; i < query->noOfCounters; ++i) { close_query(nullptr, &query->counters[i]); } - FREE_C_HEAP_ARRAY(char, query->counters); + FREE_C_HEAP_ARRAY(query->counters); close_query(&query->query.pdh_query_handle, nullptr); - FREE_C_HEAP_ARRAY(MultiCounterQueryS, query); + FREE_C_HEAP_ARRAY(query); } } @@ -189,15 +189,15 @@ static void destroy_query_set(MultiCounterQuerySetP query_set) { for (int j = 0; j < query_set->queries[i].noOfCounters; ++j) { close_query(nullptr, &query_set->queries[i].counters[j]); } - FREE_C_HEAP_ARRAY(char, query_set->queries[i].counters); + FREE_C_HEAP_ARRAY(query_set->queries[i].counters); close_query(&query_set->queries[i].query.pdh_query_handle, nullptr); } - FREE_C_HEAP_ARRAY(MultiCounterQueryS, query_set->queries); + FREE_C_HEAP_ARRAY(query_set->queries); } static void destroy(MultiCounterQuerySetP query) { destroy_query_set(query); - FREE_C_HEAP_ARRAY(MultiCounterQuerySetS, query); + FREE_C_HEAP_ARRAY(query); } static void destroy(ProcessQueryP query) { @@ -229,7 +229,7 @@ static void allocate_counters(ProcessQueryP query, size_t nofCounters) { } static void deallocate_counters(MultiCounterQueryP query) { - FREE_C_HEAP_ARRAY(char, query->counters); + FREE_C_HEAP_ARRAY(query->counters); query->counters = nullptr; query->noOfCounters = 0; } @@ -710,11 +710,11 @@ static const char* pdh_process_image_name() { } static void deallocate_pdh_constants() { - FREE_C_HEAP_ARRAY(char, process_image_name); + FREE_C_HEAP_ARRAY(process_image_name); process_image_name = nullptr; - FREE_C_HEAP_ARRAY(char, pdh_process_instance_IDProcess_counter_fmt); + FREE_C_HEAP_ARRAY(pdh_process_instance_IDProcess_counter_fmt); pdh_process_instance_IDProcess_counter_fmt = nullptr; - FREE_C_HEAP_ARRAY(char, pdh_process_instance_wildcard_IDProcess_counter); + FREE_C_HEAP_ARRAY(pdh_process_instance_wildcard_IDProcess_counter); pdh_process_instance_wildcard_IDProcess_counter = nullptr; } @@ -779,6 +779,114 @@ static OSReturn allocate_pdh_constants() { return OS_OK; } +// Look up the PDH index by reading the English (locale 009) counter name +// registry. See KB Q287159: Using PDH APIs Correctly in a Localized Language +// for details. +static OSReturn lookup_perf_index_by_english_name(const char* english_name, + DWORD* result) { + ResourceMark rm; + + DWORD type = 0; + DWORD size = 0; + + // Determine the required buffer size + if (RegQueryValueEx(HKEY_PERFORMANCE_DATA, "Counter 009", + nullptr, &type, nullptr, &size) != ERROR_SUCCESS) { + return OS_ERR; + } + + // Since registry entries in `HKEY_PERFORMANCE_DATA` are generated on the fly, + // they could change between calls, so we can't rely just on the size returned + // by the first call. Instead, Microsoft's documentation suggests running + // these calls in a loop until the return code is no longer `ERROR_MORE_DATA`. + + char* buffer; + do { + if (size == 0) { + return OS_ERR; + } + + // When `RegQueryValueEx()` returns `ERROR_MORE_DATA`, the value in the + // callback argument is undefined, so we need to create a new variable whose + // address is passed as the callback size argument. + buffer = NEW_RESOURCE_ARRAY(char, size); + + DWORD cb_size = size; + LSTATUS status = RegQueryValueEx(HKEY_PERFORMANCE_DATA, "Counter 009", + nullptr, &type, (LPBYTE)buffer, + &cb_size); + if (status == ERROR_MORE_DATA) { + // We need to increase the buffer size. Since we don't know _how much_ to + // increase it by, we use an estimate (4096) for the increment. + DWORD increment = 4096; + if (size > MAXDWORD - increment) { + return OS_ERR; + } + size += increment; + } else if (status == ERROR_SUCCESS) { + break; + } else { + // If there was some other problem fetching this registry entry, tell the + // caller that we couldn't lookup the index. + return OS_ERR; + } + } while (true); + + if (type != REG_MULTI_SZ) { + return OS_ERR; + } + + // The buffer contains indices and names in the form (\0\0)*, so + // iterate character by character to parse the name and if it matches the + // English name, then we return the integer value of the index. + for (const char* p = buffer; *p != '\0'; ) { + const char* idx_str = p; + p += strlen(p) + 1; + if (*p == '\0') { + break; + } + + const char* name = p; + p += strlen(p) + 1; + if (strcmp(name, english_name) == 0) { + errno = 0; + char* end = nullptr; + unsigned long value = strtoul(idx_str, &end, 10); + if (errno == 0 && end != idx_str && value <= MAXDWORD) { + *result = (DWORD)value; + return OS_OK; + } + } + } + + return OS_ERR; +} + +// Return the counter index of the 'Processor Information' counter, if +// available, or else the 'Processor' counter. The former is aware of the +// possibility of multiple processor groups and thus provides a more accurate +// processor count whereas the latter serves as fallback. +static DWORD get_proc_counter() { + static DWORD pdh_idx = 0; + if (pdh_idx != 0) { + return pdh_idx; + } + + // Some APIs accept English counter names whereas others accept counter names + // in the specific user's locale. We determine the locale-specific name using + // the counter index, but to find the counter index, we use the English name + // of the counter and look for it in a specific registry key. + DWORD info_idx; + if (lookup_perf_index_by_english_name("Processor Information", + &info_idx) != OS_OK) { + info_idx = PDH_PROCESSOR_IDX; + } + + // Assign to the static variable so that the value persists across calls. + pdh_idx = info_idx; + return pdh_idx; +} + /* * Enuerate the Processor PDH object and returns a buffer containing the enumerated instances. * Caller needs ResourceMark; @@ -786,8 +894,11 @@ static OSReturn allocate_pdh_constants() { * @return buffer if successful, null on failure. */ static const char* enumerate_cpu_instances() { - char* processor; //'Processor' == PDH_PROCESSOR_IDX - if (lookup_name_by_index(PDH_PROCESSOR_IDX, &processor) != OS_OK) { + // The `PdhEnumObjectItems()` function accepts a localized name of the perf + // counter. To obtain the name that is specific to the user's locale, we + // perform a reverse lookup from counter index to counter name. + char* processor; + if (lookup_name_by_index(get_proc_counter(), &processor) != OS_OK) { return nullptr; } DWORD c_size = 0; @@ -821,13 +932,17 @@ static const char* enumerate_cpu_instances() { static int count_logical_cpus(const char* instances) { assert(instances != nullptr, "invariant"); - // count logical instances. - DWORD count; - char* tmp; - for (count = 0, tmp = const_cast(instances); *tmp != '\0'; tmp = &tmp[strlen(tmp) + 1], count++); - // PDH reports an instance for each logical processor plus an instance for the total (_Total) - assert(count == os::processor_count() + 1, "invalid enumeration!"); - return count - 1; + DWORD count = 0; + for (const char* tmp = instances; *tmp != '\0'; tmp += strlen(tmp) + 1) { + // In both the 'Processor' counter and the 'Processor Information' counter, + // the output contains totals for the processor group(s). We filter those + // out by looking for the `_Total` substring. + if (strstr(tmp, "_Total") == nullptr) { + count++; + } + } + assert(count >= 1, "invalid enumeration!"); + return count; } static int number_of_logical_cpus() { @@ -847,7 +962,16 @@ static double cpu_factor() { static double cpuFactor = .0; if (numCpus == 0) { numCpus = number_of_logical_cpus(); - assert(os::processor_count() <= (int)numCpus, "invariant"); + + // If we are using the legacy 'Processor' counter, which counts processors + // only in the first processor group, then `numCpus` can undercount, in + // which case, `numCpus` will be likely smaller than `os_processor_count`. + // However, when we use the 'Processor Information' counter, we expect both + // `numCpus` and `os::processorCount` to be identical. In both cases, we + // expect to see at least one CPU. + assert(numCpus >= 1 && numCpus <= (DWORD)os::processor_count(), + "unexpected cpu count"); + cpuFactor = numCpus * 100; } return cpuFactor; @@ -861,8 +985,8 @@ static void log_error_message_on_no_PDH_artifact(const char* counter_path) { static int initialize_cpu_query_counters(MultiCounterQueryP query, DWORD pdh_counter_idx) { assert(query != nullptr, "invariant"); assert(query->counters != nullptr, "invariant"); - char* processor; //'Processor' == PDH_PROCESSOR_IDX - if (lookup_name_by_index(PDH_PROCESSOR_IDX, &processor) != OS_OK) { + char* processor; + if (lookup_name_by_index(get_proc_counter(), &processor) != OS_OK) { return OS_ERR; } char* counter_name = nullptr; @@ -880,7 +1004,11 @@ static int initialize_cpu_query_counters(MultiCounterQueryP query, DWORD pdh_cou counter_len += OBJECT_WITH_INSTANCES_COUNTER_FMT_LEN; // "\\%s(%s)\\%s" const char* instances = enumerate_cpu_instances(); DWORD index = 0; - for (char* tmp = const_cast(instances); *tmp != '\0'; tmp = &tmp[strlen(tmp) + 1], index++) { + for (char* tmp = const_cast(instances); *tmp != '\0'; tmp = &tmp[strlen(tmp) + 1]) { + // Skip totals for each processor group. + if (strstr(tmp, ",_Total") != nullptr) { + continue; + } const size_t tmp_len = strlen(tmp); char* counter_path = NEW_RESOURCE_ARRAY(char, counter_len + tmp_len + 1); const size_t jio_snprintf_result = jio_snprintf(counter_path, @@ -896,6 +1024,7 @@ static int initialize_cpu_query_counters(MultiCounterQueryP query, DWORD pdh_cou // return OS_OK to have the system continue to run without the missing counter return OS_OK; } + index++; } // Query once to initialize the counters which require at least two samples // (like the % CPU usage) to calculate correctly. @@ -1445,9 +1574,9 @@ bool CPUInformationInterface::initialize() { CPUInformationInterface::~CPUInformationInterface() { if (_cpu_info != nullptr) { - FREE_C_HEAP_ARRAY(char, _cpu_info->cpu_name()); + FREE_C_HEAP_ARRAY(_cpu_info->cpu_name()); _cpu_info->set_cpu_name(nullptr); - FREE_C_HEAP_ARRAY(char, _cpu_info->cpu_description()); + FREE_C_HEAP_ARRAY(_cpu_info->cpu_description()); _cpu_info->set_cpu_description(nullptr); delete _cpu_info; } diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp index 9d8fb45f0d1..9a987bf3762 100644 --- a/src/hotspot/os/windows/os_windows.cpp +++ b/src/hotspot/os/windows/os_windows.cpp @@ -334,14 +334,14 @@ void os::init_system_properties_values() { home_path = NEW_C_HEAP_ARRAY(char, strlen(home_dir) + 1, mtInternal); strcpy(home_path, home_dir); Arguments::set_java_home(home_path); - FREE_C_HEAP_ARRAY(char, home_path); + FREE_C_HEAP_ARRAY(home_path); dll_path = NEW_C_HEAP_ARRAY(char, strlen(home_dir) + strlen(bin) + 1, mtInternal); strcpy(dll_path, home_dir); strcat(dll_path, bin); Arguments::set_dll_dir(dll_path); - FREE_C_HEAP_ARRAY(char, dll_path); + FREE_C_HEAP_ARRAY(dll_path); if (!set_boot_path('\\', ';')) { vm_exit_during_initialization("Failed setting boot class path.", nullptr); @@ -396,7 +396,7 @@ void os::init_system_properties_values() { strcat(library_path, ";."); Arguments::set_library_path(library_path); - FREE_C_HEAP_ARRAY(char, library_path); + FREE_C_HEAP_ARRAY(library_path); } // Default extensions directory @@ -1079,7 +1079,7 @@ void os::set_native_thread_name(const char *name) { HRESULT hr = _SetThreadDescription(current, unicode_name); if (FAILED(hr)) { log_debug(os, thread)("set_native_thread_name: SetThreadDescription failed - falling back to debugger method"); - FREE_C_HEAP_ARRAY(WCHAR, unicode_name); + FREE_C_HEAP_ARRAY(unicode_name); } else { log_trace(os, thread)("set_native_thread_name: SetThreadDescription succeeded - new name: %s", name); @@ -1102,7 +1102,7 @@ void os::set_native_thread_name(const char *name) { LocalFree(thread_name); } #endif - FREE_C_HEAP_ARRAY(WCHAR, unicode_name); + FREE_C_HEAP_ARRAY(unicode_name); return; } } else { @@ -2897,7 +2897,7 @@ class NUMANodeListHolder { int _numa_used_node_count; void free_node_list() { - FREE_C_HEAP_ARRAY(int, _numa_used_node_list); + FREE_C_HEAP_ARRAY(_numa_used_node_list); } public: @@ -4744,7 +4744,7 @@ static wchar_t* wide_abs_unc_path(char const* path, errno_t & err, int additiona LPWSTR unicode_path = nullptr; err = convert_to_unicode(buf, &unicode_path); - FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(buf); if (err != ERROR_SUCCESS) { return nullptr; } @@ -4772,9 +4772,9 @@ static wchar_t* wide_abs_unc_path(char const* path, errno_t & err, int additiona } if (converted_path != unicode_path) { - FREE_C_HEAP_ARRAY(WCHAR, converted_path); + FREE_C_HEAP_ARRAY(converted_path); } - FREE_C_HEAP_ARRAY(WCHAR, unicode_path); + FREE_C_HEAP_ARRAY(unicode_path); return static_cast(result); // LPWSTR and wchat_t* are the same type on Windows. } @@ -5827,7 +5827,7 @@ int os::fork_and_exec(const char* cmd) { exit_code = -1; } - FREE_C_HEAP_ARRAY(char, cmd_string); + FREE_C_HEAP_ARRAY(cmd_string); return (int)exit_code; } diff --git a/src/hotspot/os/windows/perfMemory_windows.cpp b/src/hotspot/os/windows/perfMemory_windows.cpp index dad2804f18a..8e698c53d28 100644 --- a/src/hotspot/os/windows/perfMemory_windows.cpp +++ b/src/hotspot/os/windows/perfMemory_windows.cpp @@ -113,7 +113,7 @@ static void save_memory_to_file(char* addr, size_t size) { } } - FREE_C_HEAP_ARRAY(char, destfile); + FREE_C_HEAP_ARRAY(destfile); } // Shared Memory Implementation Details @@ -319,7 +319,7 @@ static char* get_user_name_slow(int vmid) { DIR* subdirp = os::opendir(usrdir_name); if (subdirp == nullptr) { - FREE_C_HEAP_ARRAY(char, usrdir_name); + FREE_C_HEAP_ARRAY(usrdir_name); continue; } @@ -330,7 +330,7 @@ static char* get_user_name_slow(int vmid) { // symlink can be exploited. // if (!is_directory_secure(usrdir_name)) { - FREE_C_HEAP_ARRAY(char, usrdir_name); + FREE_C_HEAP_ARRAY(usrdir_name); os::closedir(subdirp); continue; } @@ -350,13 +350,13 @@ static char* get_user_name_slow(int vmid) { strcat(filename, udentry->d_name); if (::stat(filename, &statbuf) == OS_ERR) { - FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(filename); continue; } // skip over files that are not regular files. if ((statbuf.st_mode & S_IFMT) != S_IFREG) { - FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(filename); continue; } @@ -378,18 +378,18 @@ static char* get_user_name_slow(int vmid) { if (statbuf.st_ctime > latest_ctime) { char* user = strchr(dentry->d_name, '_') + 1; - FREE_C_HEAP_ARRAY(char, latest_user); + FREE_C_HEAP_ARRAY(latest_user); latest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal); strcpy(latest_user, user); latest_ctime = statbuf.st_ctime; } - FREE_C_HEAP_ARRAY(char, filename); + FREE_C_HEAP_ARRAY(filename); } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, usrdir_name); + FREE_C_HEAP_ARRAY(usrdir_name); } os::closedir(tmpdirp); @@ -481,7 +481,7 @@ static void remove_file(const char* dirname, const char* filename) { } } - FREE_C_HEAP_ARRAY(char, path); + FREE_C_HEAP_ARRAY(path); } // returns true if the process represented by pid is alive, otherwise @@ -708,11 +708,11 @@ static void free_security_desc(PSECURITY_DESCRIPTOR pSD) { // be an ACL we enlisted. free the resources. // if (success && exists && pACL != nullptr && !isdefault) { - FREE_C_HEAP_ARRAY(char, pACL); + FREE_C_HEAP_ARRAY(pACL); } // free the security descriptor - FREE_C_HEAP_ARRAY(char, pSD); + FREE_C_HEAP_ARRAY(pSD); } } @@ -768,7 +768,7 @@ static PSID get_user_sid(HANDLE hProcess) { if (!GetTokenInformation(hAccessToken, TokenUser, token_buf, rsize, &rsize)) { log_debug(perf)("GetTokenInformation failure: lasterror = %d, rsize = %d", GetLastError(), rsize); - FREE_C_HEAP_ARRAY(char, token_buf); + FREE_C_HEAP_ARRAY(token_buf); CloseHandle(hAccessToken); return nullptr; } @@ -779,15 +779,15 @@ static PSID get_user_sid(HANDLE hProcess) { if (!CopySid(nbytes, pSID, token_buf->User.Sid)) { log_debug(perf)("GetTokenInformation failure: lasterror = %d, rsize = %d", GetLastError(), rsize); - FREE_C_HEAP_ARRAY(char, token_buf); - FREE_C_HEAP_ARRAY(char, pSID); + FREE_C_HEAP_ARRAY(token_buf); + FREE_C_HEAP_ARRAY(pSID); CloseHandle(hAccessToken); return nullptr; } // close the access token. CloseHandle(hAccessToken); - FREE_C_HEAP_ARRAY(char, token_buf); + FREE_C_HEAP_ARRAY(token_buf); return pSID; } @@ -865,7 +865,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD, if (!InitializeAcl(newACL, newACLsize, ACL_REVISION)) { log_debug(perf)("InitializeAcl failure: lasterror = %d", GetLastError()); - FREE_C_HEAP_ARRAY(char, newACL); + FREE_C_HEAP_ARRAY(newACL); return false; } @@ -876,7 +876,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD, LPVOID ace; if (!GetAce(oldACL, ace_index, &ace)) { log_debug(perf)("InitializeAcl failure: lasterror = %d", GetLastError()); - FREE_C_HEAP_ARRAY(char, newACL); + FREE_C_HEAP_ARRAY(newACL); return false; } if (((ACCESS_ALLOWED_ACE *)ace)->Header.AceFlags && INHERITED_ACE) { @@ -901,7 +901,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD, if (!AddAce(newACL, ACL_REVISION, MAXDWORD, ace, ((PACE_HEADER)ace)->AceSize)) { log_debug(perf)("AddAce failure: lasterror = %d", GetLastError()); - FREE_C_HEAP_ARRAY(char, newACL); + FREE_C_HEAP_ARRAY(newACL); return false; } } @@ -915,7 +915,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD, aces[i].mask, aces[i].pSid)) { log_debug(perf)("AddAccessAllowedAce failure: lasterror = %d", GetLastError()); - FREE_C_HEAP_ARRAY(char, newACL); + FREE_C_HEAP_ARRAY(newACL); return false; } } @@ -928,13 +928,13 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD, LPVOID ace; if (!GetAce(oldACL, ace_index, &ace)) { log_debug(perf)("InitializeAcl failure: lasterror = %d", GetLastError()); - FREE_C_HEAP_ARRAY(char, newACL); + FREE_C_HEAP_ARRAY(newACL); return false; } if (!AddAce(newACL, ACL_REVISION, MAXDWORD, ace, ((PACE_HEADER)ace)->AceSize)) { log_debug(perf)("AddAce failure: lasterror = %d", GetLastError()); - FREE_C_HEAP_ARRAY(char, newACL); + FREE_C_HEAP_ARRAY(newACL); return false; } ace_index++; @@ -944,7 +944,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD, // add the new ACL to the security descriptor. if (!SetSecurityDescriptorDacl(pSD, TRUE, newACL, FALSE)) { log_debug(perf)("SetSecurityDescriptorDacl failure: lasterror = %d", GetLastError()); - FREE_C_HEAP_ARRAY(char, newACL); + FREE_C_HEAP_ARRAY(newACL); return false; } @@ -952,7 +952,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD, // protected prevents that. if (!SetSecurityDescriptorControl(pSD, SE_DACL_PROTECTED, SE_DACL_PROTECTED)) { log_debug(perf)("SetSecurityDescriptorControl failure: lasterror = %d", GetLastError()); - FREE_C_HEAP_ARRAY(char, newACL); + FREE_C_HEAP_ARRAY(newACL); return false; } @@ -1057,7 +1057,7 @@ static LPSECURITY_ATTRIBUTES make_user_everybody_admin_security_attr( // create a security attributes structure with access control // entries as initialized above. LPSECURITY_ATTRIBUTES lpSA = make_security_attr(aces, 3); - FREE_C_HEAP_ARRAY(char, aces[0].pSid); + FREE_C_HEAP_ARRAY(aces[0].pSid); FreeSid(everybodySid); FreeSid(administratorsSid); return(lpSA); @@ -1341,8 +1341,8 @@ static char* mapping_create_shared(size_t size) { // check that the file system is secure - i.e. it supports ACLs. if (!is_filesystem_secure(dirname)) { - FREE_C_HEAP_ARRAY(char, dirname); - FREE_C_HEAP_ARRAY(char, user); + FREE_C_HEAP_ARRAY(dirname); + FREE_C_HEAP_ARRAY(user); return nullptr; } @@ -1358,15 +1358,15 @@ static char* mapping_create_shared(size_t size) { assert(((size != 0) && (size % os::vm_page_size() == 0)), "unexpected PerfMemry region size"); - FREE_C_HEAP_ARRAY(char, user); + FREE_C_HEAP_ARRAY(user); // create the shared memory resources sharedmem_fileMapHandle = create_sharedmem_resources(dirname, filename, objectname, size); - FREE_C_HEAP_ARRAY(char, filename); - FREE_C_HEAP_ARRAY(char, objectname); - FREE_C_HEAP_ARRAY(char, dirname); + FREE_C_HEAP_ARRAY(filename); + FREE_C_HEAP_ARRAY(objectname); + FREE_C_HEAP_ARRAY(dirname); if (sharedmem_fileMapHandle == nullptr) { return nullptr; @@ -1480,8 +1480,8 @@ static void open_file_mapping(int vmid, char** addrp, size_t* sizep, TRAPS) { // store file, we also don't following them when attaching // if (!is_directory_secure(dirname)) { - FREE_C_HEAP_ARRAY(char, dirname); - FREE_C_HEAP_ARRAY(char, luser); + FREE_C_HEAP_ARRAY(dirname); + FREE_C_HEAP_ARRAY(luser); THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Process not found"); } @@ -1498,10 +1498,10 @@ static void open_file_mapping(int vmid, char** addrp, size_t* sizep, TRAPS) { char* robjectname = ResourceArea::strdup(THREAD, objectname); // free the c heap resources that are no longer needed - FREE_C_HEAP_ARRAY(char, luser); - FREE_C_HEAP_ARRAY(char, dirname); - FREE_C_HEAP_ARRAY(char, filename); - FREE_C_HEAP_ARRAY(char, objectname); + FREE_C_HEAP_ARRAY(luser); + FREE_C_HEAP_ARRAY(dirname); + FREE_C_HEAP_ARRAY(filename); + FREE_C_HEAP_ARRAY(objectname); size_t size; if (*sizep == 0) { diff --git a/src/hotspot/os/windows/safefetch_static_windows.cpp b/src/hotspot/os/windows/safefetch_static_windows.cpp index 3ea8b96b32d..f037459f1fb 100644 --- a/src/hotspot/os/windows/safefetch_static_windows.cpp +++ b/src/hotspot/os/windows/safefetch_static_windows.cpp @@ -46,7 +46,8 @@ extern "C" char _SafeFetchN_fault[]; bool handle_safefetch(int exception_code, address pc, void* context) { CONTEXT* ctx = (CONTEXT*)context; - if (exception_code == EXCEPTION_ACCESS_VIOLATION && ctx != nullptr) { + if ((exception_code == EXCEPTION_ACCESS_VIOLATION || + exception_code == EXCEPTION_GUARD_PAGE) && ctx != nullptr) { if (pc == (address)_SafeFetch32_fault) { os::win32::context_set_pc(ctx, (address)_SafeFetch32_continuation); return true; diff --git a/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp b/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp index 49d879731ff..6f31bc284e3 100644 --- a/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp +++ b/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp @@ -81,10 +81,6 @@ # include #endif -#if !defined(__APPLE__) && !defined(__NetBSD__) -# include -#endif - #define SPELL_REG_SP "sp" #ifdef __APPLE__ @@ -415,49 +411,6 @@ size_t os::Posix::default_stack_size(os::ThreadType thr_type) { size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M); return s; } -void os::current_stack_base_and_size(address* base, size_t* size) { - address bottom; -#ifdef __APPLE__ - pthread_t self = pthread_self(); - *base = (address) pthread_get_stackaddr_np(self); - *size = pthread_get_stacksize_np(self); - bottom = *base - *size; -#elif defined(__OpenBSD__) - stack_t ss; - int rslt = pthread_stackseg_np(pthread_self(), &ss); - - if (rslt != 0) - fatal("pthread_stackseg_np failed with error = %d", rslt); - - *base = (address) ss.ss_sp; - *size = ss.ss_size; - bottom = *base - *size; -#else - pthread_attr_t attr; - - int rslt = pthread_attr_init(&attr); - - // JVM needs to know exact stack location, abort if it fails - if (rslt != 0) - fatal("pthread_attr_init failed with error = %d", rslt); - - rslt = pthread_attr_get_np(pthread_self(), &attr); - - if (rslt != 0) - fatal("pthread_attr_get_np failed with error = %d", rslt); - - if (pthread_attr_getstackaddr(&attr, (void **)&bottom) != 0 || - pthread_attr_getstacksize(&attr, size) != 0) { - fatal("Can not locate current stack attributes!"); - } - - *base = bottom + *size; - - pthread_attr_destroy(&attr); -#endif - assert(os::current_stack_pointer() >= bottom && - os::current_stack_pointer() < *base, "just checking"); -} ///////////////////////////////////////////////////////////////////////////// // helper functions for fatal error handler diff --git a/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp b/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp index f1c80594eaf..8668f20e371 100644 --- a/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp +++ b/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp @@ -55,6 +55,7 @@ // put OS-includes here # include # include +# include # include # include # include @@ -73,19 +74,6 @@ # include #endif -#if !defined(__APPLE__) && !defined(__NetBSD__) -# include -#endif - -// needed by current_stack_base_and_size() workaround for Mavericks -#if defined(__APPLE__) -# include -# include -# include -# define DEFAULT_MAIN_THREAD_STACK_PAGES 2048 -# define OS_X_10_9_0_KERNEL_MAJOR_VERSION 13 -#endif - #define SPELL_REG_SP "rsp" #define SPELL_REG_FP "rbp" #define REG_BCP context_r13 @@ -499,104 +487,6 @@ size_t os::Posix::default_stack_size(os::ThreadType thr_type) { } -// Java thread: -// -// Low memory addresses -// +------------------------+ -// | |\ Java thread created by VM does not have glibc -// | glibc guard page | - guard, attached Java thread usually has -// | |/ 1 glibc guard page. -// P1 +------------------------+ Thread::stack_base() - Thread::stack_size() -// | |\ -// | HotSpot Guard Pages | - red, yellow and reserved pages -// | |/ -// +------------------------+ StackOverflow::stack_reserved_zone_base() -// | |\ -// | Normal Stack | - -// | |/ -// P2 +------------------------+ Thread::stack_base() -// -// Non-Java thread: -// -// Low memory addresses -// +------------------------+ -// | |\ -// | glibc guard page | - usually 1 page -// | |/ -// P1 +------------------------+ Thread::stack_base() - Thread::stack_size() -// | |\ -// | Normal Stack | - -// | |/ -// P2 +------------------------+ Thread::stack_base() -// -// ** P1 (aka bottom) and size are the address and stack size -// returned from pthread_attr_getstack(). -// ** P2 (aka stack top or base) = P1 + size - -void os::current_stack_base_and_size(address* base, size_t* size) { - address bottom; -#ifdef __APPLE__ - pthread_t self = pthread_self(); - *base = (address) pthread_get_stackaddr_np(self); - *size = pthread_get_stacksize_np(self); - // workaround for OS X 10.9.0 (Mavericks) - // pthread_get_stacksize_np returns 128 pages even though the actual size is 2048 pages - if (pthread_main_np() == 1) { - // At least on Mac OS 10.12 we have observed stack sizes not aligned - // to pages boundaries. This can be provoked by e.g. setrlimit() (ulimit -s xxxx in the - // shell). Apparently Mac OS actually rounds upwards to next multiple of page size, - // however, we round downwards here to be on the safe side. - *size = align_down(*size, getpagesize()); - - if ((*size) < (DEFAULT_MAIN_THREAD_STACK_PAGES * (size_t)getpagesize())) { - char kern_osrelease[256]; - size_t kern_osrelease_size = sizeof(kern_osrelease); - int ret = sysctlbyname("kern.osrelease", kern_osrelease, &kern_osrelease_size, nullptr, 0); - if (ret == 0) { - // get the major number, atoi will ignore the minor amd micro portions of the version string - if (atoi(kern_osrelease) >= OS_X_10_9_0_KERNEL_MAJOR_VERSION) { - *size = (DEFAULT_MAIN_THREAD_STACK_PAGES*getpagesize()); - } - } - } - } - bottom = *base - *size; -#elif defined(__OpenBSD__) - stack_t ss; - int rslt = pthread_stackseg_np(pthread_self(), &ss); - - if (rslt != 0) - fatal("pthread_stackseg_np failed with error = %d", rslt); - - *base = (address) ss.ss_sp; - *size = ss.ss_size; - bottom = *base - *size; -#else - pthread_attr_t attr; - - int rslt = pthread_attr_init(&attr); - - // JVM needs to know exact stack location, abort if it fails - if (rslt != 0) - fatal("pthread_attr_init failed with error = %d", rslt); - - rslt = pthread_attr_get_np(pthread_self(), &attr); - - if (rslt != 0) - fatal("pthread_attr_get_np failed with error = %d", rslt); - - if (pthread_attr_getstackaddr(&attr, (void **)&bottom) != 0 || - pthread_attr_getstacksize(&attr, size) != 0) { - fatal("Can not locate current stack attributes!"); - } - - *base = bottom + *size; - - pthread_attr_destroy(&attr); -#endif - assert(os::current_stack_pointer() >= bottom && - os::current_stack_pointer() < *base, "just checking"); -} ///////////////////////////////////////////////////////////////////////////// // helper functions for fatal error handler diff --git a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp index facad184426..a089d5981ca 100644 --- a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp +++ b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp @@ -52,7 +52,6 @@ #if !defined(__APPLE__) && !defined(__NetBSD__) #include -# include /* For pthread_attr_get_np */ #endif address os::current_stack_pointer() { @@ -179,52 +178,6 @@ size_t os::Posix::default_stack_size(os::ThreadType thr_type) { return s; } -void os::current_stack_base_and_size(address* base, size_t* size) { - address bottom; - -#ifdef __APPLE__ - pthread_t self = pthread_self(); - *base = (address) pthread_get_stackaddr_np(self); - *size = pthread_get_stacksize_np(self); - bottom = *base - *size; -#elif defined(__OpenBSD__) - stack_t ss; - int rslt = pthread_stackseg_np(pthread_self(), &ss); - - if (rslt != 0) - fatal("pthread_stackseg_np failed with error = %d", rslt); - - *base = (address) ss.ss_sp; - *size = ss.ss_size; - bottom = *base - *size; -#else - pthread_attr_t attr; - - int rslt = pthread_attr_init(&attr); - - // JVM needs to know exact stack location, abort if it fails - if (rslt != 0) - fatal("pthread_attr_init failed with error = %d", rslt); - - rslt = pthread_attr_get_np(pthread_self(), &attr); - - if (rslt != 0) - fatal("pthread_attr_get_np failed with error = %d", rslt); - - if (pthread_attr_getstackaddr(&attr, (void **) &bottom) != 0 || - pthread_attr_getstacksize(&attr, size) != 0) { - fatal("Can not locate current stack attributes!"); - } - - *base = bottom + *size; - - pthread_attr_destroy(&attr); - -#endif - assert(os::current_stack_pointer() >= bottom && - os::current_stack_pointer() < *base, "just checking"); -} - ///////////////////////////////////////////////////////////////////////////// // helper functions for fatal error handler diff --git a/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp b/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp index ee2d3013c4c..e5762fa3ba5 100644 --- a/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp +++ b/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp @@ -123,58 +123,40 @@ int VM_Version::set_and_get_current_sve_vector_length(int length) { return new_length; } +static uint64_t check_feature(uint64_t hwcap, uint64_t feature_bit_mask, uint64_t hwcap_bitmask) { + if (hwcap & hwcap_bitmask) { + return feature_bit_mask; + } else { + return 0; + } +} + void VM_Version::get_os_cpu_info() { uint64_t auxv = getauxval(AT_HWCAP); uint64_t auxv2 = getauxval(AT_HWCAP2); - static_assert(BIT_MASK(CPU_FP) == HWCAP_FP, "Flag CPU_FP must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_ASIMD) == HWCAP_ASIMD, "Flag CPU_ASIMD must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_EVTSTRM) == HWCAP_EVTSTRM, "Flag CPU_EVTSTRM must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_AES) == HWCAP_AES, "Flag CPU_AES must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_PMULL) == HWCAP_PMULL, "Flag CPU_PMULL must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_SHA1) == HWCAP_SHA1, "Flag CPU_SHA1 must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_SHA2) == HWCAP_SHA2, "Flag CPU_SHA2 must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_CRC32) == HWCAP_CRC32, "Flag CPU_CRC32 must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_LSE) == HWCAP_ATOMICS, "Flag CPU_LSE must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_DCPOP) == HWCAP_DCPOP, "Flag CPU_DCPOP must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_SHA3) == HWCAP_SHA3, "Flag CPU_SHA3 must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_SHA512) == HWCAP_SHA512, "Flag CPU_SHA512 must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_SVE) == HWCAP_SVE, "Flag CPU_SVE must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_PACA) == HWCAP_PACA, "Flag CPU_PACA must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_FPHP) == HWCAP_FPHP, "Flag CPU_FPHP must follow Linux HWCAP"); - static_assert(BIT_MASK(CPU_ASIMDHP) == HWCAP_ASIMDHP, "Flag CPU_ASIMDHP must follow Linux HWCAP"); - _features = auxv & ( - HWCAP_FP | - HWCAP_ASIMD | - HWCAP_EVTSTRM | - HWCAP_AES | - HWCAP_PMULL | - HWCAP_SHA1 | - HWCAP_SHA2 | - HWCAP_CRC32 | - HWCAP_ATOMICS | - HWCAP_DCPOP | - HWCAP_SHA3 | - HWCAP_SHA512 | - HWCAP_SVE | - HWCAP_SB | - HWCAP_PACA | - HWCAP_FPHP | - HWCAP_ASIMDHP); - - if (auxv2 & HWCAP2_SVE2) { - set_feature(CPU_SVE2); - } - if (auxv2 & HWCAP2_SVEBITPERM) { - set_feature(CPU_SVEBITPERM); - } - if (auxv2 & HWCAP2_ECV) { - set_feature(CPU_ECV); - } - if (auxv2 & HWCAP2_WFXT) { - set_feature(CPU_WFXT); - } + _features = + check_feature(auxv, BIT_MASK(CPU_FP), HWCAP_FP) | + check_feature(auxv, BIT_MASK(CPU_ASIMD), HWCAP_ASIMD) | + check_feature(auxv, BIT_MASK(CPU_EVTSTRM), HWCAP_EVTSTRM) | + check_feature(auxv, BIT_MASK(CPU_AES), HWCAP_AES) | + check_feature(auxv, BIT_MASK(CPU_PMULL), HWCAP_PMULL) | + check_feature(auxv, BIT_MASK(CPU_SHA1), HWCAP_SHA1) | + check_feature(auxv, BIT_MASK(CPU_SHA2), HWCAP_SHA2) | + check_feature(auxv, BIT_MASK(CPU_CRC32), HWCAP_CRC32) | + check_feature(auxv, BIT_MASK(CPU_LSE), HWCAP_ATOMICS) | + check_feature(auxv, BIT_MASK(CPU_DCPOP), HWCAP_DCPOP) | + check_feature(auxv, BIT_MASK(CPU_SHA3), HWCAP_SHA3) | + check_feature(auxv, BIT_MASK(CPU_SHA512), HWCAP_SHA512) | + check_feature(auxv, BIT_MASK(CPU_SVE), HWCAP_SVE) | + check_feature(auxv, BIT_MASK(CPU_PACA), HWCAP_PACA) | + check_feature(auxv, BIT_MASK(CPU_FPHP), HWCAP_FPHP) | + check_feature(auxv, BIT_MASK(CPU_ASIMDHP), HWCAP_ASIMDHP) | + check_feature(auxv2, BIT_MASK(CPU_SVE2), HWCAP2_SVE2) | + check_feature(auxv2, BIT_MASK(CPU_SVEBITPERM), HWCAP2_SVEBITPERM) | + check_feature(auxv2, BIT_MASK(CPU_ECV), HWCAP2_ECV) | + check_feature(auxv2, BIT_MASK(CPU_WFXT), HWCAP2_WFXT); uint64_t ctr_el0; uint64_t dczid_el0; diff --git a/src/hotspot/os_cpu/windows_aarch64/javaThread_windows_aarch64.cpp b/src/hotspot/os_cpu/windows_aarch64/javaThread_windows_aarch64.cpp index 8f6f1ccd38a..3f77a27f051 100644 --- a/src/hotspot/os_cpu/windows_aarch64/javaThread_windows_aarch64.cpp +++ b/src/hotspot/os_cpu/windows_aarch64/javaThread_windows_aarch64.cpp @@ -26,6 +26,12 @@ #include "runtime/frame.inline.hpp" #include "runtime/javaThread.hpp" +// CRT-provided TLS slot for this module (jvm.dll), set by the OS loader. +extern "C" unsigned long _tls_index; + +// TLS offset read by the assembly code in `aarch64_get_thread_helper()`. +extern "C" ptrdiff_t _jvm_thr_current_tls_offset = JavaThread::get_thr_tls_offset(); + frame JavaThread::pd_last_frame() { assert(has_last_Java_frame(), "must have last_Java_sp() when suspended"); vmassert(_anchor.last_Java_pc() != nullptr, "not walkable"); @@ -87,3 +93,25 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava) } void JavaThread::cache_global_variables() { } + +ptrdiff_t JavaThread::get_thr_tls_offset() { + char* tebPointer = (char*)NtCurrentTeb(); + + // 0x58 is the offset of ThreadLocalStoragePointer within the TEB. This is + // a stable Windows ABI constant but is not exposed in the SDK's minimal + // _TEB struct. + void** tls_array = *(void***)(tebPointer + 0x58); + char* curr_ptr = (char*)&Thread::_thr_current; + char* tls_block = (char*)tls_array[_tls_index]; + + // Compute the offset of Thread::_thr_current within this module's TLS + // block. Unlike ELF, which provides `tlsdesc` relocations that lets + // assembly code resolve TLS variables symbolically at link/load time, + // Windows PE/COFF has no equivalent mechanism for armasm64. So we compute + // the offset here in C++ (where the compiler knows how to access + // __declspec(thread) variables) and store it in a plain global that the + // assembly can load directly. In subsequent calls to + // `aarch64_get_thread_helper()`, the assembly will read the TEB to find the + // TLS block and then add this offset to find `Thread::_thr_current`. + return curr_ptr - tls_block; +} diff --git a/src/hotspot/os_cpu/windows_aarch64/javaThread_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/javaThread_windows_aarch64.hpp index 7d6ed16e629..34984607814 100644 --- a/src/hotspot/os_cpu/windows_aarch64/javaThread_windows_aarch64.hpp +++ b/src/hotspot/os_cpu/windows_aarch64/javaThread_windows_aarch64.hpp @@ -46,8 +46,11 @@ private: bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava); public: - static Thread *aarch64_get_thread_helper() { - return Thread::current(); - } + static Thread *aarch64_get_thread_helper(); + + // Compute the offset of `Thread::_thr_current` in the thread-local storage + // This offset is then used by the assembly code implementation of + // `aarch64_get_thread_helper()`. + static ptrdiff_t get_thr_tls_offset(); #endif // OS_CPU_WINDOWS_AARCH64_JAVATHREAD_WINDOWS_AARCH64_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/sve_windows_aarch64.S b/src/hotspot/os_cpu/windows_aarch64/sve_windows_aarch64.S index e0c85830bd4..137cd0f7753 100644 --- a/src/hotspot/os_cpu/windows_aarch64/sve_windows_aarch64.S +++ b/src/hotspot/os_cpu/windows_aarch64/sve_windows_aarch64.S @@ -24,19 +24,26 @@ ; Support for int get_sve_vector_length(); ; ; Returns the current SVE vector length in bytes. - ; This function uses the INCB instruction which increments a register - ; by the number of bytes in an SVE vector register. + ; This function uses the RDVL instruction which reads a multiple of the + ; vector register size into a scalar register. ; - ; Note: This function will fault if SVE is not available or enabled. - ; The caller must ensure SVE support is detected before calling. + ; Note: This function will fault if SVE is not available or enabled. The + ; caller must ensure SVE support is detected before calling. ALIGN 4 EXPORT get_sve_vector_length AREA sve_text, CODE get_sve_vector_length - mov x0, #0 - incb x0 + ; Older versions of Visual Studio aren't aware of SVE mnemonics, so we use + ; the raw instruction encoding to satisfy the compiler. This function call + ; is gated by `VM_Version::supports_sve()`, so this instruction will never + ; run on non-SVE hardware. + ; + ; See https://www.scs.stanford.edu/~zyedidia/arm64/rdvl_r_i.html for a quick + ; reference to the instruction encoding. + + DCD 0x04BF5020 ; rdvl x0, #1 (i.e. x0 = 1 * vector_length_in_bytes) ret END diff --git a/src/hotspot/os_cpu/windows_aarch64/threadLS_windows_aarch64.S b/src/hotspot/os_cpu/windows_aarch64/threadLS_windows_aarch64.S new file mode 100644 index 00000000000..81749b9a372 --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/threadLS_windows_aarch64.S @@ -0,0 +1,64 @@ +; +; 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. +; + + ; JavaThread::aarch64_get_thread_helper() + ; + ; Optimized TLS access to `Thread::_thr_current` on Windows AArch64. + ; Returns the current thread pointer in x0, clobbers x1, while all other + ; registers are preserved. + + IMPORT _tls_index + IMPORT _jvm_thr_current_tls_offset + + AREA threadls_text, CODE, READONLY + ALIGN 4 + + ; MSVC-decorated name for: static Thread* JavaThread::aarch64_get_thread_helper() + EXPORT |?aarch64_get_thread_helper@JavaThread@@SAPEAVThread@@XZ| + +|?aarch64_get_thread_helper@JavaThread@@SAPEAVThread@@XZ| PROC + + ; x18 holds the TEB, 0x58 is a well-defined offset into the TEB on 64-bit + ; systems, so the following line loads the thread-local storage pointer + ; inside the TEB + ldr x1, [x18, #0x58] + + ; Load `_tls_index` and zero-extend it to 64 bits to occupy x0 + adrp x0, _tls_index + ldr w0, [x0, _tls_index] + + ; `x0` holds the index, `x1` holds the array base address (each entry is 64 + ; bits long), so in the following line, x1 = array_base[_tls_index] + ldr x1, [x1, x0, lsl #3] + + ; Load cached TLS offset of `Thread::_thr_current` + adrp x0, _jvm_thr_current_tls_offset + ldr x0, [x0, _jvm_thr_current_tls_offset] + + ; Load `Thread::_thr_current` value + ldr x0, [x1, x0] + + ret + + ENDP + END diff --git a/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp b/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp index e78a37b4178..e485ae6b8c2 100644 --- a/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp +++ b/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp @@ -26,19 +26,52 @@ #include "runtime/os.hpp" #include "runtime/vm_version.hpp" -// Assembly function to get SVE vector length using INCB instruction +// Since PF_ARM_SVE_INSTRUCTIONS_AVAILABLE and related constants were added in +// Windows 11 (version 24H2) and in Windows Server 2025, we define them here for +// compatibility with older SDK versions. +#ifndef PF_ARM_SVE_INSTRUCTIONS_AVAILABLE +#define PF_ARM_SVE_INSTRUCTIONS_AVAILABLE 46 +#endif + +#ifndef PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE +#define PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE 47 +#endif + +#ifndef PF_ARM_SVE_BITPERM_INSTRUCTIONS_AVAILABLE +#define PF_ARM_SVE_BITPERM_INSTRUCTIONS_AVAILABLE 51 +#endif + +#ifndef PF_ARM_SHA3_INSTRUCTIONS_AVAILABLE +#define PF_ARM_SHA3_INSTRUCTIONS_AVAILABLE 64 +#endif + +#ifndef PF_ARM_SHA512_INSTRUCTIONS_AVAILABLE +#define PF_ARM_SHA512_INSTRUCTIONS_AVAILABLE 65 +#endif + +#ifndef PF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE +#define PF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE 67 +#endif + +// Assembly function to get SVE vector length using RDVL instruction extern "C" int get_sve_vector_length(); int VM_Version::get_current_sve_vector_length() { assert(VM_Version::supports_sve(), "should not call this"); - // Use assembly instruction to get the actual SVE vector length - return VM_Version::supports_sve() ? get_sve_vector_length() : 0; // This value is in bytes + return VM_Version::supports_sve() ? get_sve_vector_length() : 0; } int VM_Version::set_and_get_current_sve_vector_length(int length) { assert(VM_Version::supports_sve(), "should not call this"); - // Use assembly instruction to get the SVE vector length - return VM_Version::supports_sve() ? get_sve_vector_length() : 0; // This value is in bytes + + // Unlike Linux, Windows does not present a way to modify the VL (the + // rationale is that the OS expects the application to use the maximum vector + // length supported by the hardware), so we simply return the current VL. If + // the user sets `MaxVectorSize` that is not the same as the maximum possible + // vector length, then the caller (`VM_Version::initialize()`) will print a + // warning, set `MaxVectorSize` to the value returned by this function, and + // move on. + return VM_Version::supports_sve() ? get_sve_vector_length() : 0; } void VM_Version::get_os_cpu_info() { @@ -67,6 +100,10 @@ void VM_Version::get_os_cpu_info() { if (IsProcessorFeaturePresent(PF_ARM_SVE_BITPERM_INSTRUCTIONS_AVAILABLE)) { set_feature(CPU_SVEBITPERM); } + if (IsProcessorFeaturePresent(PF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE)) { + set_feature(CPU_FPHP); + set_feature(CPU_ASIMDHP); + } if (IsProcessorFeaturePresent(PF_ARM_SHA3_INSTRUCTIONS_AVAILABLE)) { set_feature(CPU_SHA3); } diff --git a/src/hotspot/share/asm/codeBuffer.cpp b/src/hotspot/share/asm/codeBuffer.cpp index 854cf73049b..c6475050592 100644 --- a/src/hotspot/share/asm/codeBuffer.cpp +++ b/src/hotspot/share/asm/codeBuffer.cpp @@ -417,7 +417,7 @@ void CodeSection::expand_locs(int new_capacity) { new_capacity = old_capacity * 2; relocInfo* locs_start; if (_locs_own) { - locs_start = REALLOC_RESOURCE_ARRAY(relocInfo, _locs_start, old_capacity, new_capacity); + locs_start = REALLOC_RESOURCE_ARRAY(_locs_start, old_capacity, new_capacity); } else { locs_start = NEW_RESOURCE_ARRAY(relocInfo, new_capacity); Copy::conjoint_jbytes(_locs_start, locs_start, old_capacity * sizeof(relocInfo)); diff --git a/src/hotspot/share/c1/c1_GraphBuilder.cpp b/src/hotspot/share/c1/c1_GraphBuilder.cpp index f910ecadc16..db55b8c5fa8 100644 --- a/src/hotspot/share/c1/c1_GraphBuilder.cpp +++ b/src/hotspot/share/c1/c1_GraphBuilder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -3558,7 +3558,7 @@ const char* GraphBuilder::check_can_parse(ciMethod* callee) const { // negative filter: should callee NOT be inlined? returns null, ok to inline, or rejection msg const char* GraphBuilder::should_not_inline(ciMethod* callee) const { - if ( compilation()->directive()->should_not_inline(callee)) return "disallowed by CompileCommand"; + if ( compilation()->directive()->should_not_inline(callee, compilation()->env()->comp_level())) return "disallowed by CompileCommand"; if ( callee->dont_inline()) return "don't inline by annotation"; return nullptr; } diff --git a/src/hotspot/share/c1/c1_LIRGenerator.hpp b/src/hotspot/share/c1/c1_LIRGenerator.hpp index ec0ea5dc047..8e30d05af6d 100644 --- a/src/hotspot/share/c1/c1_LIRGenerator.hpp +++ b/src/hotspot/share/c1/c1_LIRGenerator.hpp @@ -330,8 +330,9 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure { // volatile field operations are never patchable because a klass // must be loaded to know it's volatile which means that the offset - // it always known as well. + // is always known as well. void volatile_field_store(LIR_Opr value, LIR_Address* address, CodeEmitInfo* info); + // volatile_field_load provides trailing membar semantics void volatile_field_load(LIR_Address* address, LIR_Opr result, CodeEmitInfo* info); void put_Object_unsafe(LIR_Opr src, LIR_Opr offset, LIR_Opr data, BasicType type, bool is_volatile); diff --git a/src/hotspot/share/c1/c1_Runtime1.cpp b/src/hotspot/share/c1/c1_Runtime1.cpp index 38f563935e0..41504c74dd2 100644 --- a/src/hotspot/share/c1/c1_Runtime1.cpp +++ b/src/hotspot/share/c1/c1_Runtime1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -982,6 +982,7 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* current, StubId stub_id )) constantPoolHandle constants(current, caller_method->constants()); LinkResolver::resolve_field_access(result, constants, field_access.index(), caller_method, Bytecodes::java_code(code), CHECK); patch_field_offset = result.offset(); + patch_field_type = result.field_type(); // If we're patching a field which is volatile then at compile it // must not have been know to be volatile, so the generated code @@ -993,22 +994,6 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* current, StubId stub_id )) // handling in the volatile case. deoptimize_for_volatile = result.access_flags().is_volatile(); - - // If we are patching a field which should be atomic, then - // the generated code is not correct either, force deoptimizing. - // We need to only cover T_LONG and T_DOUBLE fields, as we can - // break access atomicity only for them. - - // Strictly speaking, the deoptimization on 64-bit platforms - // is unnecessary, and T_LONG stores on 32-bit platforms need - // to be handled by special patching code when AlwaysAtomicAccesses - // becomes product feature. At this point, we are still going - // for the deoptimization for consistency against volatile - // accesses. - - patch_field_type = result.field_type(); - deoptimize_for_atomic = (AlwaysAtomicAccesses && (patch_field_type == T_DOUBLE || patch_field_type == T_LONG)); - } else if (load_klass_or_mirror_patch_id) { Klass* k = nullptr; switch (code) { @@ -1081,17 +1066,12 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* current, StubId stub_id )) ShouldNotReachHere(); } - if (deoptimize_for_volatile || deoptimize_for_atomic) { - // At compile time we assumed the field wasn't volatile/atomic but after - // loading it turns out it was volatile/atomic so we have to throw the + if (deoptimize_for_volatile) { + // At compile time we assumed the field wasn't volatile but after + // loading it turns out it was volatile so we have to throw the // compiled code out and let it be regenerated. if (TracePatching) { - if (deoptimize_for_volatile) { - tty->print_cr("Deoptimizing for patching volatile field reference"); - } - if (deoptimize_for_atomic) { - tty->print_cr("Deoptimizing for patching atomic field reference"); - } + tty->print_cr("Deoptimizing for patching volatile field reference"); } // It's possible the nmethod was invalidated in the last diff --git a/src/hotspot/share/cds/aotMetaspace.hpp b/src/hotspot/share/cds/aotMetaspace.hpp index 4607a936abe..2236bae91f3 100644 --- a/src/hotspot/share/cds/aotMetaspace.hpp +++ b/src/hotspot/share/cds/aotMetaspace.hpp @@ -105,7 +105,9 @@ public: // Return true if given address is in the shared metaspace regions (i.e., excluding the // mapped heap region.) static bool in_aot_cache(const void* p) { - return MetaspaceObj::in_aot_cache((const MetaspaceObj*)p); + // This function is called only after the AOT metaspace is initialized, so + // we can skip init checks. + return MetaspaceObj::is_pointer_in_aot_cache_no_init_check(p); } static void set_aot_metaspace_range(void* base, void *static_top, void* top) NOT_CDS_RETURN; diff --git a/src/hotspot/share/cds/aotStreamedHeapLoader.cpp b/src/hotspot/share/cds/aotStreamedHeapLoader.cpp index 39f735543cd..7f9f8cf0628 100644 --- a/src/hotspot/share/cds/aotStreamedHeapLoader.cpp +++ b/src/hotspot/share/cds/aotStreamedHeapLoader.cpp @@ -797,7 +797,7 @@ void AOTStreamedHeapLoader::cleanup() { Universe::vm_global()->release(&handles[num_null_handles], num_handles - num_null_handles); } - FREE_C_HEAP_ARRAY(void*, _object_index_to_heap_object_table); + FREE_C_HEAP_ARRAY(_object_index_to_heap_object_table); // Unmap regions FileMapInfo::current_info()->unmap_region(AOTMetaspace::hp); diff --git a/src/hotspot/share/cds/archiveBuilder.cpp b/src/hotspot/share/cds/archiveBuilder.cpp index 21eef3d7b0b..cf51897c2f1 100644 --- a/src/hotspot/share/cds/archiveBuilder.cpp +++ b/src/hotspot/share/cds/archiveBuilder.cpp @@ -1171,7 +1171,7 @@ void ArchiveBuilder::write_archive(FileMapInfo* mapinfo, AOTMappedHeapInfo* mapp AOTMapLogger::dumptime_log(this, mapinfo, mapped_heap_info, streamed_heap_info, bitmap, bitmap_size_in_bytes); } CDS_JAVA_HEAP_ONLY(HeapShared::destroy_archived_object_cache()); - FREE_C_HEAP_ARRAY(char, bitmap); + FREE_C_HEAP_ARRAY(bitmap); } void ArchiveBuilder::write_region(FileMapInfo* mapinfo, int region_idx, DumpRegion* dump_region, bool read_only, bool allow_exec) { diff --git a/src/hotspot/share/cds/archiveUtils.cpp b/src/hotspot/share/cds/archiveUtils.cpp index 6e0608e196b..7985c62d67b 100644 --- a/src/hotspot/share/cds/archiveUtils.cpp +++ b/src/hotspot/share/cds/archiveUtils.cpp @@ -416,13 +416,22 @@ void DumpRegion::report_gaps(DumpAllocStats* stats) { stats->record_gap(checked_cast(node->key().gap_bytes())); return true; }); + + double unfilled_percent = 0.0; if (_gap_tree.size() > 0) { - log_warning(aot)("Unexpected %zu gaps (%zu bytes) for Klass alignment", - _gap_tree.size(), _total_gap_bytes); + unfilled_percent = percent_of(_total_gap_bytes, _total_gap_allocs); + if (unfilled_percent > 5.0) { + // We have a limited number of small objects, so some small gaps may remain + // unfilled. If more than 5% of the gaps are unfilled, this likely indicates + // a systematic error that should be investigated. Otherwise, do not warn to + // avoid noise. + log_warning(aot)("Unexpected %zu gaps (%zu bytes) for Klass alignment", + _gap_tree.size(), _total_gap_bytes); + } } if (_total_gap_allocs > 0) { - log_info(aot)("Allocated %zu objects of %zu bytes in gaps (remain = %zu bytes)", - _total_gap_allocs, _total_gap_bytes_used, _total_gap_bytes); + log_info(aot)("Allocated %zu objects of %zu bytes in gaps (remain = %zu bytes, %.2f%%)", + _total_gap_allocs, _total_gap_bytes_used, _total_gap_bytes, unfilled_percent); } } diff --git a/src/hotspot/share/cds/cdsConfig.cpp b/src/hotspot/share/cds/cdsConfig.cpp index ecf3c6d2231..21066f76932 100644 --- a/src/hotspot/share/cds/cdsConfig.cpp +++ b/src/hotspot/share/cds/cdsConfig.cpp @@ -520,7 +520,7 @@ static void substitute_aot_filename(JVMFlagsEnum flag_enum) { JVMFlag::Error err = JVMFlagAccess::set_ccstr(flag, &new_filename, JVMFlagOrigin::ERGONOMIC); assert(err == JVMFlag::SUCCESS, "must never fail"); } - FREE_C_HEAP_ARRAY(char, new_filename); + FREE_C_HEAP_ARRAY(new_filename); } void CDSConfig::check_aotmode_record() { diff --git a/src/hotspot/share/cds/cds_globals.hpp b/src/hotspot/share/cds/cds_globals.hpp index 447914b3101..7df498ca5b9 100644 --- a/src/hotspot/share/cds/cds_globals.hpp +++ b/src/hotspot/share/cds/cds_globals.hpp @@ -163,7 +163,7 @@ \ product(uint, AOTCodeMaxSize, 10*M, DIAGNOSTIC, \ "Buffer size in bytes for AOT code caching") \ - range(1*M, max_jint) \ + range(1*M, CODE_CACHE_SIZE_LIMIT) \ \ product(bool, AbortVMOnAOTCodeFailure, false, DIAGNOSTIC, \ "Abort VM on the first occurrence of AOT code load or store " \ diff --git a/src/hotspot/share/cds/classListWriter.cpp b/src/hotspot/share/cds/classListWriter.cpp index 8e1f298e8e3..c90e233df73 100644 --- a/src/hotspot/share/cds/classListWriter.cpp +++ b/src/hotspot/share/cds/classListWriter.cpp @@ -49,7 +49,7 @@ void ClassListWriter::init() { _classlist_file->print_cr("# This file is generated via the -XX:DumpLoadedClassList= option"); _classlist_file->print_cr("# and is used at CDS archive dump time (see -Xshare:dump)."); _classlist_file->print_cr("#"); - FREE_C_HEAP_ARRAY(char, list_name); + FREE_C_HEAP_ARRAY(list_name); } } diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp index 38502b2b2d8..1ed9979ff85 100644 --- a/src/hotspot/share/cds/filemap.cpp +++ b/src/hotspot/share/cds/filemap.cpp @@ -402,7 +402,7 @@ public: ~FileHeaderHelper() { if (_header != nullptr) { - FREE_C_HEAP_ARRAY(char, _header); + FREE_C_HEAP_ARRAY(_header); } if (_fd != -1) { ::close(_fd); @@ -1362,6 +1362,13 @@ bool FileMapInfo::map_aot_code_region(ReservedSpace rs) { return false; } else { assert(mapped_base == requested_base, "must be"); + + if (VerifySharedSpaces && !r->check_region_crc(mapped_base)) { + aot_log_error(aot)("region %d CRC error", AOTMetaspace::ac); + os::unmap_memory(mapped_base, r->used_aligned()); + return false; + } + r->set_mapped_from_file(true); r->set_mapped_base(mapped_base); aot_log_info(aot)("Mapped static region #%d at base " INTPTR_FORMAT " top " INTPTR_FORMAT " (%s)", @@ -1464,14 +1471,14 @@ size_t FileMapInfo::read_bytes(void* buffer, size_t count) { return count; } -// Get the total size in bytes of a read only region +// Get the total size in bytes of all mapped read only region size_t FileMapInfo::readonly_total() { size_t total = 0; - if (current_info() != nullptr) { + if (current_info() != nullptr && current_info()->is_mapped()) { FileMapRegion* r = FileMapInfo::current_info()->region_at(AOTMetaspace::ro); if (r->read_only()) total += r->used(); } - if (dynamic_info() != nullptr) { + if (dynamic_info() != nullptr && current_info()->is_mapped()) { FileMapRegion* r = FileMapInfo::dynamic_info()->region_at(AOTMetaspace::ro); if (r->read_only()) total += r->used(); } diff --git a/src/hotspot/share/ci/ciEnv.hpp b/src/hotspot/share/ci/ciEnv.hpp index b384ff47a89..8167697e84b 100644 --- a/src/hotspot/share/ci/ciEnv.hpp +++ b/src/hotspot/share/ci/ciEnv.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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,6 +236,9 @@ private: ciInstanceKlass* declared_holder = get_instance_klass_for_declared_method_holder(holder); return _factory->get_unloaded_method(declared_holder, name, signature, accessor); } + InstanceKlass::ClassState get_cached_init_state(uint id) { + return (InstanceKlass::ClassState)_factory->cached_init_state(id); + } // Get a ciKlass representing an unloaded klass. // Ensures uniqueness of the result. diff --git a/src/hotspot/share/ci/ciInstanceKlass.cpp b/src/hotspot/share/ci/ciInstanceKlass.cpp index 6243258acd9..293063d0b68 100644 --- a/src/hotspot/share/ci/ciInstanceKlass.cpp +++ b/src/hotspot/share/ci/ciInstanceKlass.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -136,12 +136,14 @@ ciInstanceKlass::ciInstanceKlass(ciSymbol* name, // ------------------------------------------------------------------ -// ciInstanceKlass::compute_shared_is_initialized -void ciInstanceKlass::compute_shared_init_state() { - GUARDED_VM_ENTRY( - InstanceKlass* ik = get_instanceKlass(); - _init_state = ik->init_state(); - ) +InstanceKlass::ClassState ciInstanceKlass::compute_init_state() { + if (_is_shared && is_loaded()) { + // Return cached init state of shared klass + ciEnv* env = CURRENT_ENV; + assert(env->task() != nullptr, "only calls from compilation are expected here"); + return env->get_cached_init_state(ident()); + } + return _init_state; } // ------------------------------------------------------------------ @@ -319,11 +321,11 @@ void ciInstanceKlass::print_impl(outputStream* st) { bool_to_str(has_subklass()), layout_helper()); - _flags.print_klass_flags(); + _flags.print_klass_flags(st); if (_super) { st->print(" super="); - _super->print_name(); + _super->print_name_on(st); } if (_java_mirror) { st->print(" mirror=PRESENT"); diff --git a/src/hotspot/share/ci/ciInstanceKlass.hpp b/src/hotspot/share/ci/ciInstanceKlass.hpp index a84c63981c9..221e6806b5a 100644 --- a/src/hotspot/share/ci/ciInstanceKlass.hpp +++ b/src/hotspot/share/ci/ciInstanceKlass.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -106,43 +106,36 @@ protected: bool is_shared() { return _is_shared; } - void compute_shared_init_state(); + InstanceKlass::ClassState compute_init_state(); bool compute_shared_has_subklass(); int compute_nonstatic_fields(); GrowableArray* compute_nonstatic_fields_impl(GrowableArray* super_fields); bool compute_has_trusted_loader(); - // Update the init_state for shared klasses - void update_if_shared(InstanceKlass::ClassState expected) { - if (_is_shared && _init_state != expected) { - if (is_loaded()) compute_shared_init_state(); - } - } - public: // Has this klass been initialized? bool is_initialized() { - update_if_shared(InstanceKlass::fully_initialized); - return _init_state == InstanceKlass::fully_initialized; + InstanceKlass::ClassState state = compute_init_state(); + return state == InstanceKlass::fully_initialized; } bool is_not_initialized() { - update_if_shared(InstanceKlass::fully_initialized); - return _init_state < InstanceKlass::being_initialized; + InstanceKlass::ClassState state = compute_init_state(); + return state < InstanceKlass::being_initialized; } // Is this klass being initialized? bool is_being_initialized() { - update_if_shared(InstanceKlass::being_initialized); - return _init_state == InstanceKlass::being_initialized; + InstanceKlass::ClassState state = compute_init_state(); + return state == InstanceKlass::being_initialized; } // Has this klass been linked? bool is_linked() { - update_if_shared(InstanceKlass::linked); - return _init_state >= InstanceKlass::linked; + InstanceKlass::ClassState state = compute_init_state(); + return state >= InstanceKlass::linked; } // Is this klass in error state? bool is_in_error_state() { - update_if_shared(InstanceKlass::initialization_error); - return _init_state == InstanceKlass::initialization_error; + InstanceKlass::ClassState state = compute_init_state(); + return state == InstanceKlass::initialization_error; } // General klass information. diff --git a/src/hotspot/share/ci/ciObjectFactory.cpp b/src/hotspot/share/ci/ciObjectFactory.cpp index 2af5d812922..d3bef01f852 100644 --- a/src/hotspot/share/ci/ciObjectFactory.cpp +++ b/src/hotspot/share/ci/ciObjectFactory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -48,6 +48,7 @@ #include "gc/shared/collectedHeap.inline.hpp" #include "memory/allocation.inline.hpp" #include "memory/universe.hpp" +#include "oops/instanceKlass.hpp" #include "oops/oop.inline.hpp" #include "oops/trainingData.hpp" #include "runtime/handles.inline.hpp" @@ -83,6 +84,7 @@ ciObjectFactory::ciObjectFactory(Arena* arena, int expected_size) : _arena(arena), _ci_metadata(arena, expected_size, 0, nullptr), + _cached_init_state(arena, _shared_ident_limit, 0, (u1)0), _unloaded_methods(arena, 4, 0, nullptr), _unloaded_klasses(arena, 8, 0, nullptr), _unloaded_instances(arena, 4, 0, nullptr), @@ -97,6 +99,28 @@ ciObjectFactory::ciObjectFactory(Arena* arena, // If the shared ci objects exist append them to this factory's objects if (_shared_ci_metadata != nullptr) { _ci_metadata.appendAll(_shared_ci_metadata); + // ciInstanceKlass for well-known class is shared by all + // compiler threads and can be updated concurrently by + // other compiler threads during compilation. + // Make local copy of class state to avoid state change + // during compilation. + int len = _ci_metadata.length(); + for (int i = 0; i < len; i++) { + ciMetadata* obj = _ci_metadata.at(i); + if (obj->is_loaded() && obj->is_instance_klass()) { + ciInstanceKlass* cik = obj->as_instance_klass(); + precond(cik->is_shared()); + InstanceKlass::ClassState current_state = cik->_init_state; + InstanceKlass::ClassState state = InstanceKlass::fully_initialized; + if (current_state != state) { + GUARDED_VM_ENTRY( state = cik->get_instanceKlass()->init_state(); ) + // Update state of shared ciInstanceKlass + cik->_init_state = state; + } + // Cache state for current compilation + _cached_init_state.at_put_grow(cik->ident(), (u1)state, 0); + } + } } } diff --git a/src/hotspot/share/ci/ciObjectFactory.hpp b/src/hotspot/share/ci/ciObjectFactory.hpp index fd7ca6bb801..c578aecb564 100644 --- a/src/hotspot/share/ci/ciObjectFactory.hpp +++ b/src/hotspot/share/ci/ciObjectFactory.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -47,6 +47,8 @@ private: Arena* _arena; GrowableArray _ci_metadata; + // Local copy of shared ciInstanceKlass init state for current compilation + GrowableArray _cached_init_state; GrowableArray _unloaded_methods; GrowableArray _unloaded_klasses; GrowableArray _unloaded_instances; @@ -103,6 +105,11 @@ public: ciMetadata* cached_metadata(Metadata* key); ciSymbol* get_symbol(Symbol* key); + // Get cached init state of shared ciInstanceKlass + u1 cached_init_state(uint id) { + return _cached_init_state.at(id); + } + // Get the ciSymbol corresponding to one of the vmSymbols. static ciSymbol* vm_symbol_at(vmSymbolID index); diff --git a/src/hotspot/share/ci/ciReplay.cpp b/src/hotspot/share/ci/ciReplay.cpp index 6266c024260..35522e75877 100644 --- a/src/hotspot/share/ci/ciReplay.cpp +++ b/src/hotspot/share/ci/ciReplay.cpp @@ -600,7 +600,7 @@ class CompileReplay : public StackObj { _nesting.check(); // Check if a reallocation in the resource arena is safe int new_length = _buffer_length * 2; // Next call will throw error in case of OOM. - _buffer = REALLOC_RESOURCE_ARRAY(char, _buffer, _buffer_length, new_length); + _buffer = REALLOC_RESOURCE_ARRAY(_buffer, _buffer_length, new_length); _buffer_length = new_length; } if (c == '\n') { diff --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp index a9ea6fbea11..d5ee16fec32 100644 --- a/src/hotspot/share/classfile/classFileParser.cpp +++ b/src/hotspot/share/classfile/classFileParser.cpp @@ -2363,8 +2363,8 @@ Method* ClassFileParser::parse_method(const ClassFileStream* const cfs, } if (lvt_cnt == max_lvt_cnt) { max_lvt_cnt <<= 1; - localvariable_table_length = REALLOC_RESOURCE_ARRAY(u2, localvariable_table_length, lvt_cnt, max_lvt_cnt); - localvariable_table_start = REALLOC_RESOURCE_ARRAY(const unsafe_u2*, localvariable_table_start, lvt_cnt, max_lvt_cnt); + localvariable_table_length = REALLOC_RESOURCE_ARRAY(localvariable_table_length, lvt_cnt, max_lvt_cnt); + localvariable_table_start = REALLOC_RESOURCE_ARRAY(localvariable_table_start, lvt_cnt, max_lvt_cnt); } localvariable_table_start[lvt_cnt] = parse_localvariable_table(cfs, @@ -2393,8 +2393,8 @@ Method* ClassFileParser::parse_method(const ClassFileStream* const cfs, // Parse local variable type table if (lvtt_cnt == max_lvtt_cnt) { max_lvtt_cnt <<= 1; - localvariable_type_table_length = REALLOC_RESOURCE_ARRAY(u2, localvariable_type_table_length, lvtt_cnt, max_lvtt_cnt); - localvariable_type_table_start = REALLOC_RESOURCE_ARRAY(const unsafe_u2*, localvariable_type_table_start, lvtt_cnt, max_lvtt_cnt); + localvariable_type_table_length = REALLOC_RESOURCE_ARRAY(localvariable_type_table_length, lvtt_cnt, max_lvtt_cnt); + localvariable_type_table_start = REALLOC_RESOURCE_ARRAY(localvariable_type_table_start, lvtt_cnt, max_lvtt_cnt); } localvariable_type_table_start[lvtt_cnt] = parse_localvariable_table(cfs, diff --git a/src/hotspot/share/classfile/classLoader.cpp b/src/hotspot/share/classfile/classLoader.cpp index eced83577cb..bf00185ffa9 100644 --- a/src/hotspot/share/classfile/classLoader.cpp +++ b/src/hotspot/share/classfile/classLoader.cpp @@ -96,9 +96,18 @@ static JImageClose_t JImageClose = nullptr; static JImageFindResource_t JImageFindResource = nullptr; static JImageGetResource_t JImageGetResource = nullptr; -// JimageFile pointer, or null if exploded JDK build. +// JImageFile pointer, or null if exploded JDK build. static JImageFile* JImage_file = nullptr; +// PreviewMode status to control preview behaviour. JImage_file is unusable +// for normal lookup until (Preview_mode != PREVIEW_MODE_UNINITIALIZED). +enum PreviewMode { + PREVIEW_MODE_UNINITIALIZED = 0, + PREVIEW_MODE_DEFAULT = 1, + PREVIEW_MODE_ENABLE_PREVIEW = 2 +}; +static PreviewMode Preview_mode = PREVIEW_MODE_UNINITIALIZED; + // Globals PerfCounter* ClassLoader::_perf_accumulated_time = nullptr; @@ -154,7 +163,7 @@ void ClassLoader::print_counters(outputStream *st) { GrowableArray* ClassLoader::_patch_mod_entries = nullptr; GrowableArray* ClassLoader::_exploded_entries = nullptr; -ClassPathEntry* ClassLoader::_jrt_entry = nullptr; +ClassPathImageEntry* ClassLoader::_jrt_entry = nullptr; ClassPathEntry* volatile ClassLoader::_first_append_entry_list = nullptr; ClassPathEntry* volatile ClassLoader::_last_append_entry = nullptr; @@ -171,15 +180,6 @@ static bool string_starts_with(const char* str, const char* str_to_find) { } #endif -static const char* get_jimage_version_string() { - static char version_string[10] = ""; - if (version_string[0] == '\0') { - jio_snprintf(version_string, sizeof(version_string), "%d.%d", - VM_Version::vm_major_version(), VM_Version::vm_minor_version()); - } - return (const char*)version_string; -} - bool ClassLoader::string_ends_with(const char* str, const char* str_to_find) { size_t str_len = strlen(str); size_t str_to_find_len = strlen(str_to_find); @@ -234,6 +234,69 @@ Symbol* ClassLoader::package_from_class_name(const Symbol* name, bool* bad_class return SymbolTable::new_symbol(name, pointer_delta_as_int(start, base), pointer_delta_as_int(end, base)); } +// -------------------------------- +// The following jimage_xxx static functions encapsulate all JImage_file and Preview_mode access. +// This is done to make it easy to reason about the JImage file state (exists vs initialized etc.). + +// Opens the named JImage file and sets the JImage file reference. +// Returns true if opening the JImage file was successful (see also jimage_is_open()). +static bool jimage_open(const char* modules_path) { + // Currently 'error' is not set to anything useful, so ignore it here. + jint error; + JImage_file = (*JImageOpen)(modules_path, &error); + if (Arguments::has_jimage() && JImage_file == nullptr) { + // The modules file exists but is unreadable or corrupt + vm_exit_during_initialization(err_msg("Unable to load %s", modules_path)); + } + return JImage_file != nullptr; +} + +// Closes and clears the JImage file reference (this will only be called during shutdown). +static void jimage_close() { + if (JImage_file != nullptr) { + (*JImageClose)(JImage_file); + JImage_file = nullptr; + } +} + +// Returns whether a JImage file was opened (but NOT whether it was initialized yet). +static bool jimage_is_open() { + return JImage_file != nullptr; +} + +// Returns the JImage file reference (which may or may not be initialized). +static JImageFile* jimage_non_null() { + assert(jimage_is_open(), "should have been opened by ClassLoader::lookup_vm_options " + "and remains open throughout normal JVM lifetime"); + return JImage_file; +} + +// Returns true if jimage_init() has been called. Once the JImage file is initialized, +// jimage_is_preview_enabled() can be called to correctly determine the access mode. +static bool jimage_is_initialized() { + return jimage_is_open() && Preview_mode != PREVIEW_MODE_UNINITIALIZED; +} + +// Returns the access mode for an initialized JImage file (reflects --enable-preview). +static bool is_preview_enabled() { + return Preview_mode == PREVIEW_MODE_ENABLE_PREVIEW; +} + +// Looks up the location of a named JImage resource. This "raw" lookup function allows +// the preview mode to be manually specified, so must not be accessible outside this +// class. ClassPathImageEntry manages all calls for resources after startup is complete. +static JImageLocationRef jimage_find_resource(const char* module_name, + const char* file_name, + bool is_preview, + jlong* size) { + return ((*JImageFindResource)(jimage_non_null(), + module_name, + file_name, + is_preview, + size)); +} +// -------------------------------- + // Given a fully qualified package name, find its defining package in the class loader's // package entry table. PackageEntry* ClassLoader::get_package_entry(Symbol* pkg_name, ClassLoaderData* loader_data) { @@ -251,7 +314,7 @@ const char* ClassPathEntry::copy_path(const char* path) { } ClassPathDirEntry::~ClassPathDirEntry() { - FREE_C_HEAP_ARRAY(char, _dir); + FREE_C_HEAP_ARRAY(_dir); } ClassFileStream* ClassPathDirEntry::open_stream(JavaThread* current, const char* name) { @@ -280,7 +343,7 @@ ClassFileStream* ClassPathDirEntry::open_stream(JavaThread* current, const char* #ifdef ASSERT // Freeing path is a no-op here as buffer prevents it from being reclaimed. But we keep it for // debug builds so that we guard against use-after-free bugs. - FREE_RESOURCE_ARRAY_IN_THREAD(current, char, path, path_len); + FREE_RESOURCE_ARRAY_IN_THREAD(current, path, path_len); #endif // We don't verify the length of the classfile stream fits in an int, but this is the // bootloader so we have control of this. @@ -291,7 +354,7 @@ ClassFileStream* ClassPathDirEntry::open_stream(JavaThread* current, const char* } } } - FREE_RESOURCE_ARRAY_IN_THREAD(current, char, path, path_len); + FREE_RESOURCE_ARRAY_IN_THREAD(current, path, path_len); return nullptr; } @@ -302,7 +365,7 @@ ClassPathZipEntry::ClassPathZipEntry(jzfile* zip, const char* zip_name) : ClassP ClassPathZipEntry::~ClassPathZipEntry() { ZipLibrary::close(_zip); - FREE_C_HEAP_ARRAY(char, _zip_name); + FREE_C_HEAP_ARRAY(_zip_name); } bool ClassPathZipEntry::has_entry(JavaThread* current, const char* name) { @@ -372,28 +435,15 @@ ClassFileStream* ClassPathZipEntry::open_stream(JavaThread* current, const char* DEBUG_ONLY(ClassPathImageEntry* ClassPathImageEntry::_singleton = nullptr;) -JImageFile* ClassPathImageEntry::jimage() const { - return JImage_file; -} - -JImageFile* ClassPathImageEntry::jimage_non_null() const { - assert(ClassLoader::has_jrt_entry(), "must be"); - assert(jimage() != nullptr, "should have been opened by ClassLoader::lookup_vm_options " - "and remained throughout normal JVM lifetime"); - return jimage(); -} - void ClassPathImageEntry::close_jimage() { - if (jimage() != nullptr) { - (*JImageClose)(jimage()); - JImage_file = nullptr; - } + jimage_close(); } -ClassPathImageEntry::ClassPathImageEntry(JImageFile* jimage, const char* name) : +ClassPathImageEntry::ClassPathImageEntry(const char* name) : ClassPathEntry() { - guarantee(jimage != nullptr, "jimage file is null"); + guarantee(jimage_is_initialized(), "jimage is not initialized"); guarantee(name != nullptr, "jimage file name is null"); + assert(_singleton == nullptr, "VM supports only one jimage"); DEBUG_ONLY(_singleton = this); size_t len = strlen(name) + 1; @@ -412,6 +462,8 @@ ClassFileStream* ClassPathImageEntry::open_stream(JavaThread* current, const cha // 2. A package is in at most one module in the jimage file. // ClassFileStream* ClassPathImageEntry::open_stream_for_loader(JavaThread* current, const char* name, ClassLoaderData* loader_data) { + const bool is_preview = is_preview_enabled(); + jlong size; JImageLocationRef location = 0; @@ -420,7 +472,7 @@ ClassFileStream* ClassPathImageEntry::open_stream_for_loader(JavaThread* current if (pkg_name != nullptr) { if (!Universe::is_module_initialized()) { - location = (*JImageFindResource)(jimage_non_null(), JAVA_BASE_NAME, get_jimage_version_string(), name, &size); + location = jimage_find_resource(JAVA_BASE_NAME, name, is_preview, &size); } else { PackageEntry* package_entry = ClassLoader::get_package_entry(pkg_name, loader_data); if (package_entry != nullptr) { @@ -431,7 +483,7 @@ ClassFileStream* ClassPathImageEntry::open_stream_for_loader(JavaThread* current assert(module->is_named(), "Boot classLoader package is in unnamed module"); const char* module_name = module->name()->as_C_string(); if (module_name != nullptr) { - location = (*JImageFindResource)(jimage_non_null(), module_name, get_jimage_version_string(), name, &size); + location = jimage_find_resource(module_name, name, is_preview, &size); } } } @@ -444,7 +496,7 @@ ClassFileStream* ClassPathImageEntry::open_stream_for_loader(JavaThread* current char* data = NEW_RESOURCE_ARRAY(char, size); (*JImageGetResource)(jimage_non_null(), location, data, size); // Resource allocated - assert(this == (ClassPathImageEntry*)ClassLoader::get_jrt_entry(), "must be"); + assert(this == ClassLoader::get_jrt_entry(), "must be"); return new ClassFileStream((u1*)data, checked_cast(size), _name, @@ -454,16 +506,9 @@ ClassFileStream* ClassPathImageEntry::open_stream_for_loader(JavaThread* current return nullptr; } -JImageLocationRef ClassLoader::jimage_find_resource(JImageFile* jf, - const char* module_name, - const char* file_name, - jlong &size) { - return ((*JImageFindResource)(jf, module_name, get_jimage_version_string(), file_name, &size)); -} - bool ClassPathImageEntry::is_modules_image() const { assert(this == _singleton, "VM supports a single jimage"); - assert(this == (ClassPathImageEntry*)ClassLoader::get_jrt_entry(), "must be used for jrt entry"); + assert(this == ClassLoader::get_jrt_entry(), "must be used for jrt entry"); return true; } @@ -618,14 +663,15 @@ void ClassLoader::setup_bootstrap_search_path_impl(JavaThread* current, const ch struct stat st; if (os::stat(path, &st) == 0) { // Directory found - if (JImage_file != nullptr) { + if (jimage_is_open()) { assert(Arguments::has_jimage(), "sanity check"); const char* canonical_path = get_canonical_path(path, current); assert(canonical_path != nullptr, "canonical_path issue"); - _jrt_entry = new ClassPathImageEntry(JImage_file, canonical_path); + // Hand over lifecycle control of the JImage file to the _jrt_entry singleton + // (see ClassPathImageEntry::close_jimage). The image must be initialized by now. + _jrt_entry = new ClassPathImageEntry(canonical_path); assert(_jrt_entry != nullptr && _jrt_entry->is_modules_image(), "No java runtime image present"); - assert(_jrt_entry->jimage() != nullptr, "No java runtime image"); } // else it's an exploded build. } else { // If path does not exist, exit @@ -645,7 +691,7 @@ void ClassLoader::setup_bootstrap_search_path_impl(JavaThread* current, const ch static const char* get_exploded_module_path(const char* module_name, bool c_heap) { const char *home = Arguments::get_java_home(); const char file_sep = os::file_separator()[0]; - // 10 represents the length of "modules" + 2 file separators + \0 + // 10 represents the length of "modules" (7) + 2 file separators + \0 size_t len = strlen(home) + strlen(module_name) + 10; char *path = c_heap ? NEW_C_HEAP_ARRAY(char, len, mtModule) : NEW_RESOURCE_ARRAY(char, len); jio_snprintf(path, len, "%s%cmodules%c%s", home, file_sep, file_sep, module_name); @@ -707,6 +753,7 @@ ClassPathEntry* ClassLoader::create_class_path_entry(JavaThread* current, 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); @@ -1397,20 +1444,8 @@ void ClassLoader::initialize(TRAPS) { setup_bootstrap_search_path(THREAD); } -static char* lookup_vm_resource(JImageFile *jimage, const char *jimage_version, const char *path) { - jlong size; - JImageLocationRef location = (*JImageFindResource)(jimage, "java.base", jimage_version, path, &size); - if (location == 0) - return nullptr; - char *val = NEW_C_HEAP_ARRAY(char, size+1, mtClass); - (*JImageGetResource)(jimage, location, val, size); - val[size] = '\0'; - return val; -} - // Lookup VM options embedded in the modules jimage file char* ClassLoader::lookup_vm_options() { - jint error; char modules_path[JVM_MAXPATHLEN]; const char* fileSep = os::file_separator(); @@ -1418,32 +1453,41 @@ char* ClassLoader::lookup_vm_options() { load_jimage_library(); jio_snprintf(modules_path, JVM_MAXPATHLEN, "%s%slib%smodules", Arguments::get_java_home(), fileSep, fileSep); - JImage_file =(*JImageOpen)(modules_path, &error); - if (JImage_file == nullptr) { - if (Arguments::has_jimage()) { - // The modules file exists but is unreadable or corrupt - vm_exit_during_initialization(err_msg("Unable to load %s", modules_path)); + if (jimage_open(modules_path)) { + // Special case where we lookup the options string *before* set_preview_mode() is called. + // Since VM arguments have not been parsed, and the ClassPathImageEntry singleton + // has not been created yet, we access the JImage file directly in non-preview mode. + jlong size; + JImageLocationRef location = + jimage_find_resource(JAVA_BASE_NAME, "jdk/internal/vm/options", /* is_preview */ false, &size); + if (location != 0) { + char* options = NEW_C_HEAP_ARRAY(char, size+1, mtClass); + (*JImageGetResource)(jimage_non_null(), location, options, size); + options[size] = '\0'; + return options; } - return nullptr; } + return nullptr; +} - const char *jimage_version = get_jimage_version_string(); - char *options = lookup_vm_resource(JImage_file, jimage_version, "jdk/internal/vm/options"); - return options; +// Finishes initializing the JImageFile (if present) by setting the access mode. +void ClassLoader::set_preview_mode(bool enable_preview) { + assert(Preview_mode == PREVIEW_MODE_UNINITIALIZED, "set_preview_mode must not be called twice"); + Preview_mode = enable_preview ? PREVIEW_MODE_ENABLE_PREVIEW : PREVIEW_MODE_DEFAULT; } bool ClassLoader::is_module_observable(const char* module_name) { assert(JImageOpen != nullptr, "jimage library should have been opened"); - if (JImage_file == nullptr) { + if (!jimage_is_open()) { struct stat st; const char *path = get_exploded_module_path(module_name, true); bool res = os::stat(path, &st) == 0; - FREE_C_HEAP_ARRAY(char, path); + FREE_C_HEAP_ARRAY(path); return res; } + // We don't expect preview mode (i.e. --enable-preview) to affect module visibility. jlong size; - const char *jimage_version = get_jimage_version_string(); - return (*JImageFindResource)(JImage_file, module_name, jimage_version, "module-info.class", &size) != 0; + return jimage_find_resource(module_name, "module-info.class", /* is_preview */ false, &size) != 0; } jlong ClassLoader::classloader_time_ms() { diff --git a/src/hotspot/share/classfile/classLoader.hpp b/src/hotspot/share/classfile/classLoader.hpp index a935d3027ac..ff7e8999688 100644 --- a/src/hotspot/share/classfile/classLoader.hpp +++ b/src/hotspot/share/classfile/classLoader.hpp @@ -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 @@ -99,7 +99,8 @@ class ClassPathZipEntry: public ClassPathEntry { }; -// For java image files +// A singleton path entry which takes ownership of the initialized JImageFile +// reference. Not used for exploded builds. class ClassPathImageEntry: public ClassPathEntry { private: const char* _name; @@ -107,11 +108,12 @@ private: public: bool is_modules_image() const; const char* name() const { return _name == nullptr ? "" : _name; } - JImageFile* jimage() const; - JImageFile* jimage_non_null() const; + // Called to close the JImage during os::abort (normally not called). void close_jimage(); - ClassPathImageEntry(JImageFile* jimage, const char* name); + // Takes effective ownership of the static JImageFile pointer. + ClassPathImageEntry(const char* name); virtual ~ClassPathImageEntry() { ShouldNotReachHere(); } + ClassFileStream* open_stream(JavaThread* current, const char* name); ClassFileStream* open_stream_for_loader(JavaThread* current, const char* name, ClassLoaderData* loader_data); }; @@ -201,10 +203,10 @@ class ClassLoader: AllStatic { static GrowableArray* _patch_mod_entries; // 2. the base piece - // Contains the ClassPathEntry of the modular java runtime image. + // Contains the ClassPathImageEntry of the modular java runtime image. // If no java runtime image is present, this indicates a // build with exploded modules is being used instead. - static ClassPathEntry* _jrt_entry; + static ClassPathImageEntry* _jrt_entry; static GrowableArray* _exploded_entries; enum { EXPLODED_ENTRY_SIZE = 80 }; // Initial number of exploded modules @@ -354,15 +356,20 @@ class ClassLoader: AllStatic { static void append_boot_classpath(ClassPathEntry* new_entry); #endif + // Retrieves additional VM options prior to flags processing. Options held + // in the JImage file are retrieved without fully initializing it. (this is + // the only JImage lookup which can succeed before init_jimage() is called). static char* lookup_vm_options(); + // Called once, after all flags are processed, to finish initializing the + // JImage file. Until this is called, jimage_find_resource(), and any other + // JImage resource lookups or access will fail. + static void set_preview_mode(bool enable_preview); + // Determines if the named module is present in the // modules jimage file or in the exploded modules directory. static bool is_module_observable(const char* module_name); - static JImageLocationRef jimage_find_resource(JImageFile* jf, const char* module_name, - const char* file_name, jlong &size); - static void trace_class_path(const char* msg, const char* name = nullptr); // VM monitoring and management support diff --git a/src/hotspot/share/classfile/compactHashtable.cpp b/src/hotspot/share/classfile/compactHashtable.cpp index de67971c403..f06f1986d8b 100644 --- a/src/hotspot/share/classfile/compactHashtable.cpp +++ b/src/hotspot/share/classfile/compactHashtable.cpp @@ -69,7 +69,7 @@ CompactHashtableWriter::~CompactHashtableWriter() { delete bucket; } - FREE_C_HEAP_ARRAY(GrowableArray*, _buckets); + FREE_C_HEAP_ARRAY(_buckets); } // Add an entry to the temporary hash table diff --git a/src/hotspot/share/classfile/resolutionErrors.cpp b/src/hotspot/share/classfile/resolutionErrors.cpp index c41d5d2f052..958d4812cbb 100644 --- a/src/hotspot/share/classfile/resolutionErrors.cpp +++ b/src/hotspot/share/classfile/resolutionErrors.cpp @@ -114,15 +114,15 @@ ResolutionErrorEntry::~ResolutionErrorEntry() { Symbol::maybe_decrement_refcount(_cause); if (_message != nullptr) { - FREE_C_HEAP_ARRAY(char, _message); + FREE_C_HEAP_ARRAY(_message); } if (_cause_msg != nullptr) { - FREE_C_HEAP_ARRAY(char, _cause_msg); + FREE_C_HEAP_ARRAY(_cause_msg); } if (nest_host_error() != nullptr) { - FREE_C_HEAP_ARRAY(char, nest_host_error()); + FREE_C_HEAP_ARRAY(nest_host_error()); } } diff --git a/src/hotspot/share/classfile/systemDictionaryShared.cpp b/src/hotspot/share/classfile/systemDictionaryShared.cpp index fd30fc6766f..330b8e81d7f 100644 --- a/src/hotspot/share/classfile/systemDictionaryShared.cpp +++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp @@ -1277,7 +1277,7 @@ unsigned int SystemDictionaryShared::hash_for_shared_dictionary(address ptr) { uintx offset = ArchiveBuilder::current()->any_to_offset(ptr); unsigned int hash = primitive_hash(offset); DEBUG_ONLY({ - if (MetaspaceObj::in_aot_cache((const MetaspaceObj*)ptr)) { + if (AOTMetaspace::in_aot_cache(ptr)) { assert(hash == SystemDictionaryShared::hash_for_shared_dictionary_quick(ptr), "must be"); } }); diff --git a/src/hotspot/share/classfile/systemDictionaryShared.hpp b/src/hotspot/share/classfile/systemDictionaryShared.hpp index c837a386344..740c7370d28 100644 --- a/src/hotspot/share/classfile/systemDictionaryShared.hpp +++ b/src/hotspot/share/classfile/systemDictionaryShared.hpp @@ -25,6 +25,7 @@ #ifndef SHARE_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP #define SHARE_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP +#include "cds/aotMetaspace.hpp" #include "cds/cds_globals.hpp" #include "cds/dumpTimeClassInfo.hpp" #include "cds/filemap.hpp" @@ -312,7 +313,7 @@ public: template static unsigned int hash_for_shared_dictionary_quick(T* ptr) { - assert(MetaspaceObj::in_aot_cache((const MetaspaceObj*)ptr), "must be"); + assert(AOTMetaspace::in_aot_cache(ptr), "must be"); assert(ptr > (T*)SharedBaseAddress, "must be"); uintx offset = uintx(ptr) - uintx(SharedBaseAddress); return primitive_hash(offset); diff --git a/src/hotspot/share/code/aotCodeCache.cpp b/src/hotspot/share/code/aotCodeCache.cpp index d4f12936e96..b330ed35d0b 100644 --- a/src/hotspot/share/code/aotCodeCache.cpp +++ b/src/hotspot/share/code/aotCodeCache.cpp @@ -63,6 +63,7 @@ #include "gc/g1/g1HeapRegion.hpp" #endif #if INCLUDE_SHENANDOAHGC +#include "gc/shenandoah/shenandoahHeapRegion.hpp" #include "gc/shenandoah/shenandoahRuntime.hpp" #endif #if INCLUDE_ZGC @@ -83,15 +84,24 @@ const char* aot_code_entry_kind_name[] = { static LogStream& load_failure_log() { static LogStream err_stream(LogLevel::Error, LogTagSetMapping::tagset()); static LogStream dbg_stream(LogLevel::Debug, LogTagSetMapping::tagset()); - if (RequireSharedSpaces) { + if (RequireSharedSpaces || AbortVMOnAOTCodeFailure) { return err_stream; } else { return dbg_stream; } } +// Report AOT code cache failure and exit VM +// if (AOTMode is `on` and AbortVMOnAOTCodeFailure is default) +// or AbortVMOnAOTCodeFailure is `true`. +// +// Note, specifying -XX:-AbortVMOnAOTCodeFailure on command line +// will prevent aborting VM when AOTMode is `on`. It is used for testing. + static void report_load_failure() { - if (AbortVMOnAOTCodeFailure) { + bool abort_vm = AbortVMOnAOTCodeFailure || + (FLAG_IS_DEFAULT(AbortVMOnAOTCodeFailure) && RequireSharedSpaces); + if (abort_vm) { vm_exit_during_initialization("Unable to use AOT Code Cache.", nullptr); } load_failure_log().print_cr("Unable to use AOT Code Cache."); @@ -482,25 +492,25 @@ bool AOTCodeCache::Config::verify_cpu_features(AOTCodeCache* cache) const { log.print_cr("CPU features recorded in AOTCodeCache: %s", ss.as_string()); } - if (VM_Version::supports_features(cached_cpu_features_buffer)) { - if (log.is_enabled()) { - ResourceMark rm; // required for stringStream::as_string() - stringStream ss; - char* runtime_cpu_features = NEW_RESOURCE_ARRAY(char, VM_Version::cpu_features_size()); - VM_Version::store_cpu_features(runtime_cpu_features); - VM_Version::get_missing_features_name(runtime_cpu_features, cached_cpu_features_buffer, ss); - if (!ss.is_empty()) { - log.print_cr("Additional runtime CPU features: %s", ss.as_string()); - } - } - } else { + if (!VM_Version::verify_aot_code_cache_features(cached_cpu_features_buffer)) { if (load_failure_log().is_enabled()) { ResourceMark rm; // required for stringStream::as_string() - stringStream ss; + load_failure_log().print_cr("AOT Code Cache disabled: cpu features are incompatible"); char* runtime_cpu_features = NEW_RESOURCE_ARRAY(char, VM_Version::cpu_features_size()); VM_Version::store_cpu_features(runtime_cpu_features); - VM_Version::get_missing_features_name(cached_cpu_features_buffer, runtime_cpu_features, ss); - load_failure_log().print_cr("AOT Code Cache disabled: required cpu features are missing: %s", ss.as_string()); + + stringStream missing_features; + VM_Version::get_missing_features_name(cached_cpu_features_buffer, runtime_cpu_features, missing_features); + if (!missing_features.is_empty()) { + load_failure_log().print_cr("cpu features that are required: \"%s\"", missing_features.as_string()); + } + + stringStream additional_features; + VM_Version::get_missing_features_name(runtime_cpu_features, cached_cpu_features_buffer, additional_features); + if (!additional_features.is_empty()) { + load_failure_log().print("cpu features that are additional: \"%s\"", additional_features.as_string()); + } + load_failure_log().print_cr(""); } return false; } @@ -652,6 +662,10 @@ void AOTCodeReader::set_read_position(uint pos) { _read_position = pos; } +uint AOTCodeReader::align_read_int() { + return align_up(_read_position, sizeof(int)); +} + bool AOTCodeCache::set_write_position(uint pos) { if (pos == _write_position) { return true; @@ -666,21 +680,29 @@ bool AOTCodeCache::set_write_position(uint pos) { static char align_buffer[256] = { 0 }; -bool AOTCodeCache::align_write() { - // We are not executing code from cache - we copy it by bytes first. - // No need for big alignment (or at all). - uint padding = DATA_ALIGNMENT - (_write_position & (DATA_ALIGNMENT - 1)); - if (padding == DATA_ALIGNMENT) { +bool AOTCodeCache::align_write_bytes(uint alignment) { + uint padding = alignment - (_write_position & (alignment - 1)); + if (padding == alignment) { return true; } uint n = write_bytes((const void*)&align_buffer, padding); if (n != padding) { return false; } - log_trace(aot, codecache)("Adjust write alignment in AOT Code Cache"); + log_trace(aot, codecache)("Adjust write alignment to %d bytes in AOT Code Cache", alignment); return true; } +bool AOTCodeCache::align_write() { + // We are not executing code from cache - we copy it by bytes first. + // No need for big alignment (or at all). + return align_write_bytes(DATA_ALIGNMENT); +} + +bool AOTCodeCache::align_write_int() { + return align_write_bytes(sizeof(int)); +} + // Check to see if AOT code cache has required space to store "nbytes" of data address AOTCodeCache::reserve_bytes(uint nbytes) { assert(for_dump(), "Code Cache file is not created"); @@ -876,7 +898,7 @@ bool AOTCodeCache::finish_write() { current += size; uint n = write_bytes(&(entries_address[i]), sizeof(AOTCodeEntry)); if (n != sizeof(AOTCodeEntry)) { - FREE_C_HEAP_ARRAY(uint, search); + FREE_C_HEAP_ARRAY(search); return false; } search[entries_count*2 + 0] = entries_address[i].id(); @@ -897,7 +919,7 @@ bool AOTCodeCache::finish_write() { } if (entries_count == 0) { log_info(aot, codecache, exit)("AOT Code Cache was not created: no entires"); - FREE_C_HEAP_ARRAY(uint, search); + FREE_C_HEAP_ARRAY(search); return true; // Nothing to write } assert(entries_count <= store_count, "%d > %d", entries_count, store_count); @@ -913,7 +935,7 @@ bool AOTCodeCache::finish_write() { qsort(search, entries_count, 2*sizeof(uint), uint_cmp); search_size = 2 * entries_count * sizeof(uint); copy_bytes((const char*)search, (address)current, search_size); - FREE_C_HEAP_ARRAY(uint, search); + FREE_C_HEAP_ARRAY(search); current += search_size; // Write entries @@ -1012,19 +1034,8 @@ bool AOTCodeCache::store_code_blob(CodeBlob& blob, AOTCodeEntry::Kind entry_kind } uint entry_position = cache->_write_position; - // Write name - uint name_offset = cache->_write_position - entry_position; - uint name_size = (uint)strlen(name) + 1; // Includes '/0' - uint n = cache->write_bytes(name, name_size); - if (n != name_size) { - return false; - } - - // Write CodeBlob - if (!cache->align_write()) { - return false; - } uint blob_offset = cache->_write_position - entry_position; + // Code blob's size is aligned to oopSize address archive_buffer = cache->reserve_bytes(blob.size()); if (archive_buffer == nullptr) { return false; @@ -1056,7 +1067,7 @@ bool AOTCodeCache::store_code_blob(CodeBlob& blob, AOTCodeEntry::Kind entry_kind reloc_count = blob.relocation_size() / sizeof(relocInfo); reloc_data = (address)blob.relocation_begin(); } - n = cache->write_bytes(&reloc_count, sizeof(int)); + uint n = cache->write_bytes(&reloc_count, sizeof(int)); if (n != sizeof(int)) { return false; } @@ -1123,6 +1134,14 @@ bool AOTCodeCache::store_code_blob(CodeBlob& blob, AOTCodeEntry::Kind entry_kind } #endif /* PRODUCT */ + // Write name after code comments + uint name_offset = cache->_write_position - entry_position; + uint name_size = (uint)strlen(name) + 1; // Includes '/0' + n = cache->write_bytes(name, name_size); + if (n != name_size) { + return false; + } + uint entry_size = cache->_write_position - entry_position; AOTCodeEntry* entry = new(cache) AOTCodeEntry(entry_kind, encode_id(entry_kind, id), @@ -1151,6 +1170,9 @@ bool AOTCodeCache::store_code_blob(CodeBlob& blob, AOTCodeEntry::Kind entry_kind } bool AOTCodeCache::write_stub_data(CodeBlob &blob, AOTStubData *stub_data) { + if (!align_write_int()) { + return false; + } BlobId blob_id = stub_data->blob_id(); StubId stub_id = StubInfo::stub_base(blob_id); address blob_base = blob.code_begin(); @@ -1320,7 +1342,8 @@ CodeBlob* AOTCodeReader::compile_code_blob(const char* name, AOTCodeEntry::Kind CodeBlob* archived_blob = (CodeBlob*)addr(offset); offset += archived_blob->size(); - _reloc_count = *(int*)addr(offset); offset += sizeof(int); + _reloc_count = *(int*)addr(offset); + offset += sizeof(int); if (AOTCodeEntry::is_multi_stub_blob(entry_kind)) { // position of relocs will have been aligned to heap word size so // we can install them into a code buffer @@ -1443,7 +1466,7 @@ void AOTCodeReader::read_stub_data(CodeBlob* code_blob, AOTStubData* stub_data) address blob_base = code_blob->code_begin(); uint blob_size = (uint)(code_blob->code_end() - blob_base); - int offset = read_position(); + uint offset = align_read_int(); LogStreamHandle(Trace, aot, codecache, stubs) log; if (log.is_enabled()) { log.print_cr("======== Stub data starts at offset %d", offset); @@ -1571,6 +1594,9 @@ void AOTCodeCache::publish_stub_addresses(CodeBlob &code_blob, BlobId blob_id, A #define BAD_ADDRESS_ID -2 bool AOTCodeCache::write_relocations(CodeBlob& code_blob, RelocIterator& iter) { + if (!align_write_int()) { + return false; + } GrowableArray reloc_data; LogStreamHandle(Trace, aot, codecache, reloc) log; while (iter.next()) { @@ -1653,7 +1679,7 @@ bool AOTCodeCache::write_relocations(CodeBlob& code_blob, RelocIterator& iter) { } void AOTCodeReader::fix_relocations(CodeBlob *code_blob, RelocIterator& iter) { - uint offset = read_position(); + uint offset = align_read_int(); int reloc_count = *(int*)addr(offset); offset += sizeof(int); uint* reloc_data = (uint*)addr(offset); @@ -1726,6 +1752,9 @@ void AOTCodeReader::fix_relocations(CodeBlob *code_blob, RelocIterator& iter) { } bool AOTCodeCache::write_oop_map_set(CodeBlob& cb) { + if (!align_write_int()) { + return false; + } ImmutableOopMapSet* oopmaps = cb.oop_maps(); int oopmaps_size = oopmaps->nr_of_bytes(); if (!write_bytes(&oopmaps_size, sizeof(int))) { @@ -1739,7 +1768,7 @@ bool AOTCodeCache::write_oop_map_set(CodeBlob& cb) { } ImmutableOopMapSet* AOTCodeReader::read_oop_map_set() { - uint offset = read_position(); + uint offset = align_read_int(); int size = *(int *)addr(offset); offset += sizeof(int); ImmutableOopMapSet* oopmaps = (ImmutableOopMapSet *)addr(offset); @@ -1750,6 +1779,9 @@ ImmutableOopMapSet* AOTCodeReader::read_oop_map_set() { #ifndef PRODUCT bool AOTCodeCache::write_asm_remarks(CodeBlob& cb) { + if (!align_write_int()) { + return false; + } // Write asm remarks uint* count_ptr = (uint *)reserve_bytes(sizeof(uint)); if (count_ptr == nullptr) { @@ -1778,7 +1810,7 @@ bool AOTCodeCache::write_asm_remarks(CodeBlob& cb) { void AOTCodeReader::read_asm_remarks(AsmRemarks& asm_remarks) { // Read asm remarks - uint offset = read_position(); + uint offset = align_read_int(); uint count = *(uint *)addr(offset); offset += sizeof(uint); for (uint i = 0; i < count; i++) { @@ -1793,6 +1825,9 @@ void AOTCodeReader::read_asm_remarks(AsmRemarks& asm_remarks) { } bool AOTCodeCache::write_dbg_strings(CodeBlob& cb) { + if (!align_write_int()) { + return false; + } // Write dbg strings uint* count_ptr = (uint *)reserve_bytes(sizeof(uint)); if (count_ptr == nullptr) { @@ -1817,7 +1852,7 @@ bool AOTCodeCache::write_dbg_strings(CodeBlob& cb) { void AOTCodeReader::read_dbg_strings(DbgStrings& dbg_strings) { // Read dbg strings - uint offset = read_position(); + uint offset = align_read_int(); uint count = *(uint *)addr(offset); offset += sizeof(uint); for (uint i = 0; i < count; i++) { @@ -2365,10 +2400,6 @@ int AOTCodeAddressTable::id_for_address(address addr, RelocIterator reloc, CodeB if (addr == (address)-1) { // Static call stub has jump to itself return id; } - // Check card_table_base address first since it can point to any address - BarrierSet* bs = BarrierSet::barrier_set(); - bool is_const_card_table_base = !UseG1GC && !UseShenandoahGC && bs->is_a(BarrierSet::CardTableBarrierSet); - guarantee(!is_const_card_table_base || addr != ci_card_table_address_const(), "sanity"); // fast path for stubs and external addresses if (_hash_table != nullptr) { int *result = _hash_table->get(addr); @@ -2442,6 +2473,7 @@ void AOTRuntimeConstants::initialize_from_runtime() { BarrierSet* bs = BarrierSet::barrier_set(); address card_table_base = nullptr; uint grain_shift = 0; + address cset_base = nullptr; #if INCLUDE_G1GC if (bs->is_a(BarrierSet::G1BarrierSet)) { grain_shift = G1HeapRegion::LogOfHRGrainBytes; @@ -2449,7 +2481,8 @@ void AOTRuntimeConstants::initialize_from_runtime() { #endif #if INCLUDE_SHENANDOAHGC if (bs->is_a(BarrierSet::ShenandoahBarrierSet)) { - grain_shift = 0; + grain_shift = ShenandoahHeapRegion::region_size_bytes_shift_jint(); + cset_base = ShenandoahHeap::in_cset_fast_test_addr(); } else #endif if (bs->is_a(BarrierSet::CardTableBarrierSet)) { @@ -2461,11 +2494,13 @@ void AOTRuntimeConstants::initialize_from_runtime() { } _aot_runtime_constants._card_table_base = card_table_base; _aot_runtime_constants._grain_shift = grain_shift; + _aot_runtime_constants._cset_base = cset_base; } address AOTRuntimeConstants::_field_addresses_list[] = { ((address)&_aot_runtime_constants._card_table_base), ((address)&_aot_runtime_constants._grain_shift), + ((address)&_aot_runtime_constants._cset_base), nullptr }; @@ -2576,10 +2611,6 @@ address AOTStubData::load_archive_data(StubId stub_id, address& end, GrowableArr StubAddrRange &range = _ranges[idx]; int base = range.start_index(); if (base < 0) { -#ifdef DEBUG - // reset index so we can idenitfy which ones we failed to find - range.init_entry(-2, 0); -#endif return nullptr; } int count = range.count(); @@ -2656,3 +2687,23 @@ void AOTStubData::store_archive_data(StubId stub_id, address start, address end, } range.init_entry(base, _address_array.length() - base); } + +void AOTStubData::stub_epilog(StubId stub_id) { + DEBUG_ONLY(check_stored(stub_id)); +} + +#ifdef ASSERT +void AOTStubData::check_stored(StubId stub_id) { + // Only need to check if we are dumping + // + // This excludes cases where the cache got closed because of error + // plus the pre-universe stubs we can never store because they are + // generated prior to cache opening. + if (is_dumping()) { + int idx = StubInfo::stubgen_offset_in_blob(_blob_id, stub_id); + assert(idx >= 0 && idx < _stub_cnt, "invalid index %d for stub count %d", idx, _stub_cnt); + StubAddrRange& range = _ranges[idx]; + assert(range.start_index() != -1, "missing store_archive_data for generated stub %s", StubInfo::name(stub_id)); + } +} +#endif diff --git a/src/hotspot/share/code/aotCodeCache.hpp b/src/hotspot/share/code/aotCodeCache.hpp index 5b773a986f1..039735dc954 100644 --- a/src/hotspot/share/code/aotCodeCache.hpp +++ b/src/hotspot/share/code/aotCodeCache.hpp @@ -252,7 +252,7 @@ private: public: AOTStubData(BlobId blob_id) NOT_CDS({}); - ~AOTStubData() CDS_ONLY({FREE_C_HEAP_ARRAY(StubAddrRange, _ranges);}) NOT_CDS({}) + ~AOTStubData() CDS_ONLY({FREE_C_HEAP_ARRAY(_ranges);}) NOT_CDS({}) bool is_open() CDS_ONLY({ return (_flags & OPEN) != 0; }) NOT_CDS_RETURN_(false); bool is_using() CDS_ONLY({ return (_flags & USING) != 0; }) NOT_CDS_RETURN_(false); @@ -266,6 +266,10 @@ public: address load_archive_data(StubId stub_id, address &end, GrowableArray
* entries = nullptr, GrowableArray
* extras = nullptr) NOT_CDS_RETURN_(nullptr); void store_archive_data(StubId stub_id, address start, address end, GrowableArray
* entries = nullptr, GrowableArray
* extras = nullptr) NOT_CDS_RETURN; + void stub_epilog(StubId stub_id); +#ifdef ASSERT + void check_stored(StubId stub_id); +#endif const AOTStubData* as_const() { return (const AOTStubData*)this; } }; @@ -331,8 +335,6 @@ public: do_var(intx, PrefetchCopyIntervalInBytes) /* array copy stubs */ \ do_var(int, SoftwarePrefetchHintDistance) /* array fill stubs */ \ do_var(bool, UseBlockZeroing) \ - do_var(bool, UseLSE) /* stubs and nmethods */ \ - do_var(uint, UseSVE) /* stubs and nmethods */ \ do_var(bool, UseSecondarySupersCache) \ do_var(bool, UseSIMDForArrayEquals) /* array copy stubs and nmethods */ \ do_var(bool, UseSIMDForBigIntegerShiftIntrinsics) \ @@ -348,8 +350,6 @@ public: #define AOTCODECACHE_CONFIGS_X86_DO(do_var, do_fun) \ do_var(int, AVX3Threshold) /* array copy stubs and nmethods */ \ do_var(bool, EnableX86ECoreOpts) /* nmethods */ \ - do_var(int, UseAVX) /* array copy stubs and nmethods */ \ - do_var(bool, UseAPX) /* nmethods and stubs */ \ do_var(bool, UseLibmIntrinsic) \ do_var(bool, UseIntPolyIntrinsics) \ // END @@ -478,6 +478,8 @@ private: bool set_write_position(uint pos); bool align_write(); + bool align_write_int(); + bool align_write_bytes(uint alignment); address reserve_bytes(uint nbytes); uint write_bytes(const void* buffer, uint nbytes); const char* addr(uint offset) const { return _load_buffer + offset; } @@ -643,6 +645,7 @@ private: uint _read_position; // Position in _load_buffer uint read_position() const { return _read_position; } void set_read_position(uint pos); + uint align_read_int(); const char* addr(uint offset) const { return _load_buffer + offset; } bool _lookup_failed; // Failed to lookup for info (skip only this code load) @@ -685,6 +688,7 @@ class AOTRuntimeConstants { private: address _card_table_base; uint _grain_shift; + address _cset_base; static address _field_addresses_list[]; static AOTRuntimeConstants _aot_runtime_constants; // private constructor for unique singleton @@ -700,6 +704,7 @@ class AOTRuntimeConstants { } static address card_table_base_address(); static address grain_shift_address() { return (address)&_aot_runtime_constants._grain_shift; } + static address cset_base_address() { return (address)&_aot_runtime_constants._cset_base; } static address* field_addresses_list() { return _field_addresses_list; } @@ -707,6 +712,7 @@ class AOTRuntimeConstants { static bool contains(address adr) { return false; } static address card_table_base_address() { return nullptr; } static address grain_shift_address() { return nullptr; } + static address cset_base_address() { return nullptr; } static address* field_addresses_list() { return nullptr; } #endif }; diff --git a/src/hotspot/share/code/codeBlob.cpp b/src/hotspot/share/code/codeBlob.cpp index e0c286937d0..d69ae40be19 100644 --- a/src/hotspot/share/code/codeBlob.cpp +++ b/src/hotspot/share/code/codeBlob.cpp @@ -357,9 +357,12 @@ void RuntimeBlob::trace_new_stub(RuntimeBlob* stub, const char* name1, const cha if (stub != nullptr && (PrintStubCode || Forte::is_enabled() || JvmtiExport::should_post_dynamic_code_generated())) { - char stub_id[256]; - assert(strlen(name1) + strlen(name2) < sizeof(stub_id), ""); - jio_snprintf(stub_id, sizeof(stub_id), "%s%s", name1, name2); + ResourceMark rm; + const size_t name1_len = strlen(name1); + const size_t name2_len = strlen(name2); + const size_t stub_id_size = name1_len + name2_len + 1; + char* stub_id = NEW_RESOURCE_ARRAY(char, stub_id_size); + jio_snprintf(stub_id, stub_id_size, "%s%s", name1, name2); if (PrintStubCode) { ttyLocker ttyl; tty->print_cr("- - - [BEGIN] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"); diff --git a/src/hotspot/share/code/codeCache.cpp b/src/hotspot/share/code/codeCache.cpp index c0b4918102e..ffa88a88b29 100644 --- a/src/hotspot/share/code/codeCache.cpp +++ b/src/hotspot/share/code/codeCache.cpp @@ -65,6 +65,7 @@ #include "sanitizers/leak.hpp" #include "services/memoryService.hpp" #include "utilities/align.hpp" +#include "utilities/integerCast.hpp" #include "utilities/vmError.hpp" #include "utilities/xmlstream.hpp" #ifdef COMPILER1 @@ -228,9 +229,14 @@ void CodeCache::initialize_heaps() { assert(heap_available(CodeBlobType::MethodNonProfiled), "MethodNonProfiled heap is always available for segmented code heap"); - size_t compiler_buffer_size = 0; - COMPILER1_PRESENT(compiler_buffer_size += CompilationPolicy::c1_count() * Compiler::code_buffer_size()); - COMPILER2_PRESENT(compiler_buffer_size += CompilationPolicy::c2_count() * C2Compiler::initial_code_buffer_size()); + uint64_t compiler_buffer_size_uint64 = 0; + COMPILER1_PRESENT(compiler_buffer_size_uint64 += (uint64_t)CompilationPolicy::c1_count() * Compiler::code_buffer_size()); + COMPILER2_PRESENT(compiler_buffer_size_uint64 += (uint64_t)CompilationPolicy::c2_count() * C2Compiler::initial_code_buffer_size()); + if (compiler_buffer_size_uint64 > (uint64_t)CODE_CACHE_SIZE_LIMIT) { + err_msg msg("CICompilerCount is too large (%" PRIdPTR "): compiler buffer size exceeds the CodeCache size limit", CICompilerCount); + vm_exit_during_initialization(msg); + } + size_t compiler_buffer_size = integer_cast_permit_tautology(compiler_buffer_size_uint64); if (!non_nmethod.set) { non_nmethod.size += compiler_buffer_size; @@ -1715,7 +1721,7 @@ void CodeCache::print_internals() { } } - FREE_C_HEAP_ARRAY(int, buckets); + FREE_C_HEAP_ARRAY(buckets); print_memory_overhead(); } @@ -1838,11 +1844,15 @@ void CodeCache::print() { } void CodeCache::print_summary(outputStream* st, bool detailed) { + int total_blob_count = 0; + int total_nmethod_count = 0; + int total_adapter_count = 0; int full_count = 0; julong total_used = 0; julong total_max_used = 0; julong total_free = 0; julong total_size = 0; + FOR_ALL_HEAPS(heap_iterator) { CodeHeap* heap = (*heap_iterator); size_t total = (heap->high_boundary() - heap->low_boundary()); @@ -1868,8 +1878,13 @@ void CodeCache::print_summary(outputStream* st, bool detailed) { p2i(heap->low_boundary()), p2i(heap->high()), p2i(heap->high_boundary())); - - full_count += get_codemem_full_count(heap->code_blob_type()); + st->print_cr(" blobs=" UINT32_FORMAT ", nmethods=" UINT32_FORMAT + ", adapters=" UINT32_FORMAT ", full_count=" UINT32_FORMAT, + heap->blob_count(), heap->nmethod_count(), heap->adapter_count(), heap->full_count()); + total_blob_count += heap->blob_count(); + total_nmethod_count += heap->nmethod_count(); + total_adapter_count += heap->adapter_count(); + full_count += heap->full_count(); } } @@ -1879,10 +1894,10 @@ void CodeCache::print_summary(outputStream* st, bool detailed) { st->print_cr(" size=" JULONG_FORMAT "Kb, used=" JULONG_FORMAT "Kb, max_used=" JULONG_FORMAT "Kb, free=" JULONG_FORMAT "Kb", total_size, total_used, total_max_used, total_free); + st->print_cr(" total blobs=" UINT32_FORMAT ", nmethods=" UINT32_FORMAT + ", adapters=" UINT32_FORMAT ", full_count=" UINT32_FORMAT, + total_blob_count, total_nmethod_count, total_adapter_count, full_count); } - st->print_cr(" total_blobs=" UINT32_FORMAT ", nmethods=" UINT32_FORMAT - ", adapters=" UINT32_FORMAT ", full_count=" UINT32_FORMAT, - blob_count(), nmethod_count(), adapter_count(), full_count); st->print_cr("Compilation: %s, stopped_count=%d, restarted_count=%d", CompileBroker::should_compile_new_jobs() ? "enabled" : Arguments::mode() == Arguments::_int ? diff --git a/src/hotspot/share/code/exceptionHandlerTable.cpp b/src/hotspot/share/code/exceptionHandlerTable.cpp index a295d1271aa..f0ad9921cd0 100644 --- a/src/hotspot/share/code/exceptionHandlerTable.cpp +++ b/src/hotspot/share/code/exceptionHandlerTable.cpp @@ -32,7 +32,7 @@ void ExceptionHandlerTable::add_entry(HandlerTableEntry entry) { // not enough space => grow the table (amortized growth, double its size) guarantee(_size > 0, "no space allocated => cannot grow the table since it is part of nmethod"); int new_size = _size * 2; - _table = REALLOC_RESOURCE_ARRAY(HandlerTableEntry, _table, _size, new_size); + _table = REALLOC_RESOURCE_ARRAY(_table, _size, new_size); _size = new_size; } assert(_length < _size, "sanity check"); @@ -178,7 +178,7 @@ void ImplicitExceptionTable::append( uint exec_off, uint cont_off ) { if (_size == 0) _size = 4; _size *= 2; uint new_size_in_elements = _size*2; - _data = REALLOC_RESOURCE_ARRAY(uint, _data, old_size_in_elements, new_size_in_elements); + _data = REALLOC_RESOURCE_ARRAY(_data, old_size_in_elements, new_size_in_elements); } *(adr(l) ) = exec_off; *(adr(l)+1) = cont_off; diff --git a/src/hotspot/share/compiler/cHeapStringHolder.cpp b/src/hotspot/share/compiler/cHeapStringHolder.cpp index 261658e04eb..5a9c124688e 100644 --- a/src/hotspot/share/compiler/cHeapStringHolder.cpp +++ b/src/hotspot/share/compiler/cHeapStringHolder.cpp @@ -36,7 +36,7 @@ void CHeapStringHolder::set(const char* string) { void CHeapStringHolder::clear() { if (_string != nullptr) { - FREE_C_HEAP_ARRAY(char, _string); + FREE_C_HEAP_ARRAY(_string); _string = nullptr; } } diff --git a/src/hotspot/share/compiler/compilationMemoryStatistic.cpp b/src/hotspot/share/compiler/compilationMemoryStatistic.cpp index 1951fd066fc..82bd4c160d2 100644 --- a/src/hotspot/share/compiler/compilationMemoryStatistic.cpp +++ b/src/hotspot/share/compiler/compilationMemoryStatistic.cpp @@ -487,7 +487,7 @@ public: void clean_details() { if (_detail_stats != nullptr) { - FREE_C_HEAP_ARRAY(Details, _detail_stats); + FREE_C_HEAP_ARRAY(_detail_stats); _detail_stats = nullptr; } } diff --git a/src/hotspot/share/compiler/compilationPolicy.cpp b/src/hotspot/share/compiler/compilationPolicy.cpp index 1cc44602186..e69480560ae 100644 --- a/src/hotspot/share/compiler/compilationPolicy.cpp +++ b/src/hotspot/share/compiler/compilationPolicy.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -814,23 +814,32 @@ CompileTask* CompilationPolicy::select_task(CompileQueue* compile_queue, JavaThr max_method = max_task->method(); } - methodHandle max_method_h(THREAD, max_method); + if (max_task != nullptr && max_method != nullptr) { + methodHandle max_method_h(THREAD, max_method); - if (max_task != nullptr && max_task->comp_level() == CompLevel_full_profile && TieredStopAtLevel > CompLevel_full_profile && - max_method != nullptr && is_method_profiled(max_method_h) && !Arguments::is_compiler_only()) { - max_task->set_comp_level(CompLevel_limited_profile); + if (max_task->comp_level() == CompLevel_full_profile && TieredStopAtLevel > CompLevel_full_profile && + is_method_profiled(max_method_h) && !Arguments::is_compiler_only()) { - if (CompileBroker::compilation_is_complete(max_method_h, max_task->osr_bci(), CompLevel_limited_profile)) { - if (PrintTieredEvents) { - print_event(REMOVE_FROM_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level()); + CompilerDirectiveMatcher directive_matcher(max_method_h, CompLevel_limited_profile); + bool exclude_limited_profile = directive_matcher.directive_set()->ExcludeOption; + + if (!exclude_limited_profile) { + max_task->set_comp_level(CompLevel_limited_profile); + max_task->transfer_directive(directive_matcher); + + if (CompileBroker::compilation_is_complete(max_method_h, max_task->osr_bci(), CompLevel_limited_profile)) { + if (PrintTieredEvents) { + print_event(REMOVE_FROM_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level()); + } + compile_queue->remove_and_mark_stale(max_task); + max_method->clear_queued_for_compilation(); + return nullptr; + } + + if (PrintTieredEvents) { + print_event(UPDATE_IN_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level()); + } } - compile_queue->remove_and_mark_stale(max_task); - max_method->clear_queued_for_compilation(); - return nullptr; - } - - if (PrintTieredEvents) { - print_event(UPDATE_IN_QUEUE, max_method, max_method, max_task->osr_bci(), (CompLevel)max_task->comp_level()); } } return max_task; diff --git a/src/hotspot/share/compiler/compileBroker.cpp b/src/hotspot/share/compiler/compileBroker.cpp index 7b236ed3589..ddd3f8ae5f8 100644 --- a/src/hotspot/share/compiler/compileBroker.cpp +++ b/src/hotspot/share/compiler/compileBroker.cpp @@ -345,6 +345,8 @@ void CompileQueue::add(CompileTask* task) { // Mark the method as being in the compile queue. task->method()->set_queued_for_compilation(); + task->mark_queued(os::elapsed_counter()); + if (CIPrintCompileQueue) { print_tty(); } @@ -1380,10 +1382,9 @@ nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci, } #endif - DirectiveSet* directive = DirectivesStack::getMatchingDirective(method, comp); + CompilerDirectiveMatcher matcher(method, comp_level); // CompileBroker::compile_method can trap and can have pending async exception. - nmethod* nm = CompileBroker::compile_method(method, osr_bci, comp_level, hot_count, compile_reason, directive, THREAD); - DirectivesStack::release(directive); + nmethod* nm = CompileBroker::compile_method(method, osr_bci, comp_level, hot_count, compile_reason, matcher.directive_set(), THREAD); return nm; } @@ -2363,11 +2364,10 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) { if (!ci_env.failing() && !task->is_success()) { - assert(ci_env.failure_reason() != nullptr, "expect failure reason"); - assert(false, "compiler should always document failure: %s", ci_env.failure_reason()); - // The compiler elected, without comment, not to register a result. + const char* reason = task->failure_reason(); + assert(reason != nullptr, "compiler should always document failure"); // Do not attempt further compilations of this method. - ci_env.record_method_not_compilable("compile failed"); + ci_env.record_method_not_compilable(reason != nullptr ? reason : "compile failed: reason unknown"); } // Copy this bit to the enclosing block: @@ -2402,7 +2402,7 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) { } } - DirectivesStack::release(directive); + task->mark_finished(os::elapsed_counter()); methodHandle method(thread, task->method()); @@ -2410,14 +2410,9 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) { collect_statistics(thread, time, task); - if (PrintCompilation && PrintCompilation2) { - tty->print("%7d ", (int) tty->time_stamp().milliseconds()); // print timestamp - tty->print("%4d ", compile_id); // print compilation number - tty->print("%s ", (is_osr ? "%" : " ")); - if (task->is_success()) { - tty->print("size: %d(%d) ", task->nm_total_size(), task->nm_insts_size()); - } - tty->print_cr("time: %d inlined: %d bytes", (int)time.milliseconds(), task->num_inlined_bytecodes()); + if (PrintCompilation2 || directive->PrintCompilation2Option) { + ResourceMark rm; + task->print_post(tty); } Log(compilation, codecache) log; @@ -2614,7 +2609,7 @@ void CompileBroker::collect_statistics(CompilerThread* thread, elapsedTimer time } // Collect statistic per compiler - AbstractCompiler* comp = compiler(comp_level); + AbstractCompiler* comp = task->compiler(); if (comp) { CompilerStatistics* stats = comp->stats(); if (is_osr) { diff --git a/src/hotspot/share/compiler/compileLog.cpp b/src/hotspot/share/compiler/compileLog.cpp index d0ea80d6019..d0833fbe7fa 100644 --- a/src/hotspot/share/compiler/compileLog.cpp +++ b/src/hotspot/share/compiler/compileLog.cpp @@ -64,8 +64,8 @@ CompileLog::~CompileLog() { _out = nullptr; // Remove partial file after merging in CompileLog::finish_log_on_error unlink(_file); - FREE_C_HEAP_ARRAY(char, _identities); - FREE_C_HEAP_ARRAY(char, _file); + FREE_C_HEAP_ARRAY(_identities); + FREE_C_HEAP_ARRAY(_file); } @@ -96,7 +96,7 @@ int CompileLog::identify(ciBaseObject* obj) { if (id >= _identities_capacity) { int new_cap = _identities_capacity * 2; if (new_cap <= id) new_cap = id + 100; - _identities = REALLOC_C_HEAP_ARRAY(char, _identities, new_cap, mtCompiler); + _identities = REALLOC_C_HEAP_ARRAY(_identities, new_cap, mtCompiler); _identities_capacity = new_cap; } while (id >= _identities_limit) { diff --git a/src/hotspot/share/compiler/compileTask.cpp b/src/hotspot/share/compiler/compileTask.cpp index 536d81045d7..b22aa4466a4 100644 --- a/src/hotspot/share/compiler/compileTask.cpp +++ b/src/hotspot/share/compiler/compileTask.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -44,38 +44,36 @@ CompileTask::CompileTask(int compile_id, int comp_level, int hot_count, CompileReason compile_reason, - bool is_blocking) { - Thread* thread = Thread::current(); - _compile_id = compile_id; - _method = method(); - _method_holder = JNIHandles::make_weak_global(Handle(thread, method->method_holder()->klass_holder())); - _osr_bci = osr_bci; - _is_blocking = is_blocking; - JVMCI_ONLY(_has_waiter = CompileBroker::compiler(comp_level)->is_jvmci();) - JVMCI_ONLY(_blocking_jvmci_compile_state = nullptr;) - _comp_level = comp_level; - _num_inlined_bytecodes = 0; - - _is_complete = false; - _is_success = false; - - _hot_count = hot_count; - _time_queued = os::elapsed_counter(); - _time_started = 0; - _compile_reason = compile_reason; - _nm_content_size = 0; - AbstractCompiler* comp = compiler(); - _directive = DirectivesStack::getMatchingDirective(method, comp); - _nm_insts_size = 0; - _nm_total_size = 0; - _failure_reason = nullptr; - _failure_reason_on_C_heap = false; - _training_data = nullptr; - _arena_bytes = 0; - - _next = nullptr; - _prev = nullptr; - + bool is_blocking) : + _compile_id(compile_id), + _method(method()), + _method_holder(JNIHandles::make_weak_global(Handle(Thread::current(), method->method_holder()->klass_holder()))), + _osr_bci(osr_bci), + _is_complete(false), + _is_success(false), + _is_blocking(is_blocking), + _nm_content_size(0), + _nm_total_size(0), + _nm_insts_size(0), + _comp_level(comp_level), + _compiler(CompileBroker::compiler(comp_level)), + _comp_directive_matcher(method, static_cast(comp_level)), + JVMCI_ONLY(_has_waiter(_compiler->is_jvmci()) COMMA) + JVMCI_ONLY(_blocking_jvmci_compile_state(nullptr) COMMA) + _num_inlined_bytecodes(0), + _next(nullptr), + _prev(nullptr), + _time_created(os::elapsed_counter()), + _time_queued(0), + _time_started(0), + _time_finished(0), + _hot_count(hot_count), + _compile_reason(compile_reason), + _failure_reason(nullptr), + _failure_reason_on_C_heap(false), + _training_data(nullptr), + _arena_bytes(0) +{ AtomicAccess::add(&_active_tasks, 1, memory_order_relaxed); } @@ -108,7 +106,8 @@ void CompileTask::wait_for_no_active_tasks() { * Returns the compiler for this task. */ AbstractCompiler* CompileTask::compiler() const { - return CompileBroker::compiler(_comp_level); + assert(_compiler != nullptr, "should be set"); + return _compiler; } // Replace weak handles by strong handles to avoid unloading during compilation. @@ -157,7 +156,7 @@ void CompileTask::metadata_do(MetadataClosure* f) { // void CompileTask::print_line_on_error(outputStream* st, char* buf, int buflen) { // print compiler name - st->print("%s:", CompileBroker::compiler_name(comp_level())); + st->print("%s:", compiler()->name()); print(st); } @@ -168,29 +167,71 @@ void CompileTask::print_tty() { print(tty); } +void CompileTask::print_post(outputStream* st) { + bool is_osr_method = osr_bci() != InvocationEntryBci; + print_impl(st, is_unloaded() ? nullptr : method(), compile_id(), comp_level(), + is_osr_method, osr_bci(), is_blocking(), + compiler()->name(), nullptr, false /* short_form */, true /* cr */, + true /* after_compile_details */, + _num_inlined_bytecodes, _nm_total_size, _nm_insts_size, + _time_created, _time_queued, _time_started, _time_finished); +} + // ------------------------------------------------------------------ // CompileTask::print_impl void CompileTask::print_impl(outputStream* st, Method* method, int compile_id, int comp_level, bool is_osr_method, int osr_bci, bool is_blocking, - const char* msg, bool short_form, bool cr, - jlong time_queued, jlong time_started) { - if (!short_form) { + const char* compiler_name, + const char* msg, bool short_form, bool cr, bool after_compile_details, + int inlined_bytecodes, int nm_total_size, int nm_insts_size, + jlong time_created, jlong time_queued, jlong time_started, jlong time_finished) { + // Use stringStream to avoid breaking the line + stringStream sst; + if (after_compile_details) { + { // Print current time + stringStream ss; + ss.print(UINT64_FORMAT, (uint64_t) tty->time_stamp().milliseconds()); + sst.print("%7s ", ss.freeze()); + } + { // Time waiting to be put on queue + stringStream ss; + if (time_created != 0 && time_queued != 0) { + ss.print("W%.1f", TimeHelper::counter_to_millis(time_queued - time_created)); + } + sst.print("%7s ", ss.freeze()); + } + { // Time in queue + stringStream ss; + if (time_queued != 0 && time_started != 0) { + ss.print("Q%.1f", TimeHelper::counter_to_millis(time_started - time_queued)); + } + sst.print("%7s ", ss.freeze()); + } + { // Time in compilation + stringStream ss; + if (time_started != 0 && time_finished != 0) { + ss.print("C%.1f", TimeHelper::counter_to_millis(time_finished - time_started)); + } + sst.print("%7s ", ss.freeze()); + } + } else if (!short_form) { // Print current time - st->print(UINT64_FORMAT " ", (uint64_t) tty->time_stamp().milliseconds()); + sst.print(UINT64_FORMAT " ", (uint64_t) tty->time_stamp().milliseconds()); if (Verbose && time_queued != 0) { // Print time in queue and time being processed by compiler thread jlong now = os::elapsed_counter(); - st->print("%.0f ", TimeHelper::counter_to_millis(now-time_queued)); + sst.print("%.0f ", TimeHelper::counter_to_millis(now-time_queued)); if (time_started != 0) { - st->print("%.0f ", TimeHelper::counter_to_millis(now-time_started)); + sst.print("%.0f ", TimeHelper::counter_to_millis(now-time_started)); } } } + // print compiler name if requested if (CIPrintCompilerName) { - st->print("%s:", CompileBroker::compiler_name(comp_level)); + sst.print("%s:", compiler_name); } - st->print("%4d ", compile_id); // print compilation number + sst.print("%4d ", compile_id); // print compilation number bool is_synchronized = false; bool has_exception_handler = false; @@ -208,40 +249,52 @@ void CompileTask::print_impl(outputStream* st, Method* method, int compile_id, i const char native_char = is_native ? 'n' : ' '; // print method attributes - st->print("%c%c%c%c%c ", compile_type, sync_char, exception_char, blocking_char, native_char); + sst.print("%c%c%c%c%c ", compile_type, sync_char, exception_char, blocking_char, native_char); if (TieredCompilation) { - if (comp_level != -1) st->print("%d ", comp_level); - else st->print("- "); + if (comp_level != -1) sst.print("%d ", comp_level); + else sst.print("- "); } - st->print(" "); // more indent + sst.print(" "); // more indent if (method == nullptr) { - st->print("(method)"); + sst.print("(method)"); } else { - method->print_short_name(st); - if (is_osr_method) { - st->print(" @ %d", osr_bci); + if (after_compile_details) { + sst.print("%s", method->name_and_sig_as_C_string(true /* use_double_colon */)); + } else { + method->print_short_name(&sst); } - if (method->is_native()) - st->print(" (native)"); - else - st->print(" (%d bytes)", method->code_size()); + if (is_osr_method) { + sst.print(" @ %d", osr_bci); + } + if (method->is_native()) { + sst.print(" (native)"); + } else { + sst.print(" (%d bytes)", method->code_size()); + } + } + if (after_compile_details) { + sst.print(" (inlined %d)", inlined_bytecodes); + sst.print(" (size %d/%d)", nm_total_size, nm_insts_size); } if (msg != nullptr) { - st->print(" %s", msg); + sst.print(" %s", msg); } if (cr) { - st->cr(); + sst.cr(); } + st->print("%s",sst.freeze()); } // ------------------------------------------------------------------ // CompileTask::print_compilation void CompileTask::print(outputStream* st, const char* msg, bool short_form, bool cr) { bool is_osr_method = osr_bci() != InvocationEntryBci; - print_impl(st, is_unloaded() ? nullptr : method(), compile_id(), comp_level(), is_osr_method, osr_bci(), is_blocking(), msg, short_form, cr, _time_queued, _time_started); + print_impl(st, is_unloaded() ? nullptr : method(), compile_id(), comp_level(), + is_osr_method, osr_bci(), is_blocking(), + compiler()->name(), msg, short_form, cr); } // ------------------------------------------------------------------ @@ -435,6 +488,7 @@ void CompileTask::print_ul(const nmethod* nm, const char* msg) { nm->comp_level(), nm->is_osr_method(), nm->is_osr_method() ? nm->osr_entry_bci() : -1, /*is_blocking*/ false, + nm->compiler_name(), msg, /* short form */ true, /* cr */ true); } } diff --git a/src/hotspot/share/compiler/compileTask.hpp b/src/hotspot/share/compiler/compileTask.hpp index 2cc5e9afe3c..b6174af72eb 100644 --- a/src/hotspot/share/compiler/compileTask.hpp +++ b/src/hotspot/share/compiler/compileTask.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ #include "ci/ciMethod.hpp" #include "code/nmethod.hpp" #include "compiler/compileLog.hpp" +#include "compiler/compilerDirectives.hpp" #include "memory/allocation.hpp" #include "runtime/mutexLocker.hpp" #include "utilities/xmlstream.hpp" class CompileTrainingData; -class DirectiveSet; JVMCI_ONLY(class JVMCICompileState;) @@ -93,19 +93,22 @@ class CompileTask : public CHeapObj { CodeSection::csize_t _nm_content_size; CodeSection::csize_t _nm_total_size; CodeSection::csize_t _nm_insts_size; - DirectiveSet* _directive; + int _comp_level; + AbstractCompiler* _compiler; + CompilerDirectiveMatcher _comp_directive_matcher; #if INCLUDE_JVMCI bool _has_waiter; // Compilation state for a blocking JVMCI compilation JVMCICompileState* _blocking_jvmci_compile_state; #endif - int _comp_level; int _num_inlined_bytecodes; CompileTask* _next; CompileTask* _prev; // Fields used for logging why the compilation was initiated: + jlong _time_created; // time when task was created jlong _time_queued; // time when task was enqueued jlong _time_started; // time when compilation started + jlong _time_finished; // time when compilation finished int _hot_count; // information about its invocation counter CompileReason _compile_reason; // more info about the task const char* _failure_reason; @@ -118,6 +121,7 @@ class CompileTask : public CHeapObj { CompileTask(int compile_id, const methodHandle& method, int osr_bci, int comp_level, int hot_count, CompileReason compile_reason, bool is_blocking); ~CompileTask(); + static void wait_for_no_active_tasks(); int compile_id() const { return _compile_id; } @@ -126,7 +130,9 @@ class CompileTask : public CHeapObj { bool is_complete() const { return _is_complete; } bool is_blocking() const { return _is_blocking; } bool is_success() const { return _is_success; } - DirectiveSet* directive() const { return _directive; } + DirectiveSet* directive() const { return _comp_directive_matcher.directive_set(); } + void transfer_directive(CompilerDirectiveMatcher& matcher) { _comp_directive_matcher.transfer_from(matcher); } + CompileReason compile_reason() const { return _compile_reason; } CodeSection::csize_t nm_content_size() { return _nm_content_size; } void set_nm_content_size(CodeSection::csize_t size) { _nm_content_size = size; } CodeSection::csize_t nm_insts_size() { return _nm_insts_size; } @@ -166,8 +172,9 @@ class CompileTask : public CHeapObj { void mark_complete() { _is_complete = true; } void mark_success() { _is_success = true; } + void mark_queued(jlong time) { _time_queued = time; } void mark_started(jlong time) { _time_started = time; } - + void mark_finished(jlong time) { _time_finished = time; } int comp_level() { return _comp_level;} void set_comp_level(int comp_level) { _comp_level = comp_level;} @@ -198,16 +205,20 @@ class CompileTask : public CHeapObj { private: static void print_impl(outputStream* st, Method* method, int compile_id, int comp_level, bool is_osr_method = false, int osr_bci = -1, bool is_blocking = false, + const char* compiler_name = nullptr, const char* msg = nullptr, bool short_form = false, bool cr = true, - jlong time_queued = 0, jlong time_started = 0); + bool after_compile_details = false, + int inlined_bytecodes = 0, int nm_total_size = 0, int nm_insts_size = 0, + jlong time_created = 0, jlong time_queued = 0, + jlong time_started = 0, jlong time_finished = 0); public: void print(outputStream* st = tty, const char* msg = nullptr, bool short_form = false, bool cr = true); void print_ul(const char* msg = nullptr); static void print(outputStream* st, const nmethod* nm, const char* msg = nullptr, bool short_form = false, bool cr = true) { print_impl(st, nm->method(), nm->compile_id(), nm->comp_level(), - nm->is_osr_method(), nm->is_osr_method() ? nm->osr_entry_bci() : -1, /*is_blocking*/ false, - msg, short_form, cr); + nm->is_osr_method(), nm->is_osr_method() ? nm->osr_entry_bci() : -1, /*is_blocking*/ false, + nm->compiler_name(), msg, short_form, cr); } static void print_ul(const nmethod* nm, const char* msg = nullptr); @@ -217,6 +228,7 @@ public: static void print_inline_indent(int inline_level, outputStream* st = tty); void print_tty(); + void print_post(outputStream* st); void print_line_on_error(outputStream* st, char* buf, int buflen); void log_task(xmlStream* log); @@ -224,6 +236,7 @@ public: void log_task_start(CompileLog* log); void log_task_done(CompileLog* log); + const char* failure_reason() const { return _failure_reason; } void set_failure_reason(const char* reason, bool on_C_heap = false) { _failure_reason = reason; _failure_reason_on_C_heap = on_C_heap; diff --git a/src/hotspot/share/compiler/compilerDirectives.cpp b/src/hotspot/share/compiler/compilerDirectives.cpp index 1cd8bd1b510..f61aa111e65 100644 --- a/src/hotspot/share/compiler/compilerDirectives.cpp +++ b/src/hotspot/share/compiler/compilerDirectives.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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,6 +25,7 @@ #include "ci/ciMethod.hpp" #include "ci/ciUtilities.inline.hpp" #include "compiler/abstractCompiler.hpp" +#include "compiler/compileBroker.hpp" #include "compiler/compilerDefinitions.inline.hpp" #include "compiler/compilerDirectives.hpp" #include "compiler/compilerOracle.hpp" @@ -256,7 +257,7 @@ ControlIntrinsicIter::ControlIntrinsicIter(ccstrlist option_value, bool disable_ } ControlIntrinsicIter::~ControlIntrinsicIter() { - FREE_C_HEAP_ARRAY(char, _list); + FREE_C_HEAP_ARRAY(_list); } // pre-increment @@ -378,7 +379,7 @@ class DirectiveSetPtr { // - if some option is changed we need to copy directiveset since it no longer can be shared // - Need to free copy after use // - Requires a modified bit so we don't overwrite options that is set by directives -DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle& method) { +DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle& method, int comp_level) { // Early bail out - checking all options is expensive - we rely on them not being used // Only set a flag if it has not been modified and value changes. // Only copy set if a flag needs to be set @@ -397,7 +398,7 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle // All CompileCommands are not equal so this gets a bit verbose // When CompileCommands have been refactored less clutter will remain. - if (CompilerOracle::should_break_at(method)) { + if (CompilerOracle::should_break_at(method, static_cast(comp_level))) { // If the directives didn't have 'BreakAtCompile' or 'BreakAtExecute', // the sub-command 'Break' of the 'CompileCommand' would become effective. if (!_modified[BreakAtCompileIndex]) { @@ -414,13 +415,13 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle } } - if (CompilerOracle::should_print(method)) { + if (CompilerOracle::should_print(method, static_cast(comp_level))) { if (!_modified[PrintAssemblyIndex]) { set.cloned()->PrintAssemblyOption = true; } } // Exclude as in should not compile == Enabled - if (CompilerOracle::should_exclude(method)) { + if (CompilerOracle::should_exclude(method, static_cast(comp_level))) { if (!_modified[ExcludeIndex]) { set.cloned()->ExcludeOption = true; } @@ -547,7 +548,7 @@ bool DirectiveSet::should_inline(ciMethod* inlinee) { return false; } -bool DirectiveSet::should_not_inline(ciMethod* inlinee) { +bool DirectiveSet::should_not_inline(ciMethod* inlinee, int comp_level) { inlinee->check_is_loaded(); VM_ENTRY_MARK; methodHandle mh(THREAD, inlinee->get_Method()); @@ -556,7 +557,7 @@ bool DirectiveSet::should_not_inline(ciMethod* inlinee) { return matches_inline(mh, InlineMatcher::dont_inline); } if (!CompilerDirectivesIgnoreCompileCommandsOption) { - return CompilerOracle::should_not_inline(mh); + return CompilerOracle::should_not_inline(mh, static_cast(comp_level)); } return false; } @@ -755,7 +756,7 @@ void DirectivesStack::release(DirectiveSet* set) { assert(set != nullptr, "Never nullptr"); MutexLocker locker(DirectivesStack_lock, Mutex::_no_safepoint_check_flag); if (set->is_exclusive_copy()) { - // Old CompilecCmmands forced us to create an exclusive copy + // Old CompileCommands forced us to create an exclusive copy delete set; } else { assert(set->directive() != nullptr, "Never nullptr"); @@ -772,8 +773,9 @@ void DirectivesStack::release(CompilerDirectives* dir) { } } -DirectiveSet* DirectivesStack::getMatchingDirective(const methodHandle& method, AbstractCompiler *comp) { +DirectiveSet* DirectivesStack::getMatchingDirective(const methodHandle& method, int comp_level) { assert(_depth > 0, "Must never be empty"); + AbstractCompiler* comp = CompileBroker::compiler(comp_level); DirectiveSet* match = nullptr; { @@ -798,5 +800,5 @@ DirectiveSet* DirectivesStack::getMatchingDirective(const methodHandle& method, guarantee(match != nullptr, "There should always be a default directive that matches"); // Check for legacy compile commands update, without DirectivesStack_lock - return match->compilecommand_compatibility_init(method); + return match->compilecommand_compatibility_init(method, comp_level); } diff --git a/src/hotspot/share/compiler/compilerDirectives.hpp b/src/hotspot/share/compiler/compilerDirectives.hpp index e4826b3056c..ae814cdc491 100644 --- a/src/hotspot/share/compiler/compilerDirectives.hpp +++ b/src/hotspot/share/compiler/compilerDirectives.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -44,6 +44,7 @@ cflags(MemStat, uintx, 0, MemStat) \ cflags(PrintAssembly, bool, PrintAssembly, PrintAssembly) \ cflags(PrintCompilation, bool, PrintCompilation, PrintCompilation) \ + cflags(PrintCompilation2, bool, PrintCompilation2, PrintCompilation2) \ cflags(PrintInlining, bool, PrintInlining, PrintInlining) \ cflags(PrintNMethods, bool, PrintNMethods, PrintNMethods) \ cflags(BackgroundCompilation, bool, BackgroundCompilation, BackgroundCompilation) \ @@ -105,23 +106,26 @@ class CompilerDirectives; class DirectiveSet; class DirectivesStack : AllStatic { + // To allow access to private methods + friend class CompilerDirectiveMatcher; + friend class DirectiveSetPtr; private: static CompilerDirectives* _top; static CompilerDirectives* _bottom; static int _depth; static void pop_inner(); // no lock version of pop + static DirectiveSet* getMatchingDirective(const methodHandle& mh, int comp_level); + static DirectiveSet* getDefaultDirective(AbstractCompiler* comp); + static void release(DirectiveSet* set); + static void release(CompilerDirectives* dir); public: static void init(); - static DirectiveSet* getMatchingDirective(const methodHandle& mh, AbstractCompiler* comp); - static DirectiveSet* getDefaultDirective(AbstractCompiler* comp); static void push(CompilerDirectives* directive); static void pop(int count); static bool check_capacity(int request_size, outputStream* st); static void clear(); static void print(outputStream* st); - static void release(DirectiveSet* set); - static void release(CompilerDirectives* dir); }; class DirectiveSet : public CHeapObj { @@ -141,10 +145,10 @@ public: bool parse_and_add_inline(char* str, const char*& error_msg); void append_inline(InlineMatcher* m); bool should_inline(ciMethod* inlinee); - bool should_not_inline(ciMethod* inlinee); + bool should_not_inline(ciMethod* inlinee, int comp_level); bool should_delay_inline(ciMethod* inlinee); void print_inline(outputStream* st); - DirectiveSet* compilecommand_compatibility_init(const methodHandle& method); + DirectiveSet* compilecommand_compatibility_init(const methodHandle& method, int comp_level); bool is_exclusive_copy() { return _directive == nullptr; } bool matches_inline(const methodHandle& method, int inline_action); static DirectiveSet* clone(DirectiveSet const* src); @@ -283,7 +287,7 @@ class ControlIntrinsicValidator { ~ControlIntrinsicValidator() { if (_bad != nullptr) { - FREE_C_HEAP_ARRAY(char, _bad); + FREE_C_HEAP_ARRAY(_bad); } } @@ -326,4 +330,40 @@ public: DirectiveSet* _c2_store; }; +// Helper class to get a matching CompilerDirective using RAII pattern. +// CompileDirective ref count is decremented in the destructor. +class CompilerDirectiveMatcher { +private: + DirectiveSet* _match; + + void release_match() { + if (_match != nullptr) { + DirectivesStack::release(_match); + _match = nullptr; + } + } + +public: + // Use this constructor to get default directive + CompilerDirectiveMatcher(AbstractCompiler* comp) { + _match = DirectivesStack::getDefaultDirective(comp); + } + + CompilerDirectiveMatcher(const methodHandle& mh, int comp_level) { + _match = DirectivesStack::getMatchingDirective(mh, comp_level); + } + + ~CompilerDirectiveMatcher() { + release_match(); + } + + DirectiveSet* directive_set() const { return _match; } + + void transfer_from(CompilerDirectiveMatcher& src) { + release_match(); + _match = src._match; + src._match = nullptr; + } +}; + #endif // SHARE_COMPILER_COMPILERDIRECTIVES_HPP diff --git a/src/hotspot/share/compiler/compilerOracle.cpp b/src/hotspot/share/compiler/compilerOracle.cpp index 5bcd01a4d09..241d27eb6be 100644 --- a/src/hotspot/share/compiler/compilerOracle.cpp +++ b/src/hotspot/share/compiler/compilerOracle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -60,6 +60,37 @@ static const char* const default_compile_commands[] = { #endif nullptr }; +// CompLevel | -XX:CompileCommand bitmask +// ---------------------------------------------------- +// 0 (interpreter) | N/A +// 1 (C1) | 1 +// 2 (C1 + counters) | 10 +// 3 (C1 + counters + mdo) | 100 +// 4 (C2/JVMCI) | 1000 +// All C1 levels | 111 +// All levels | 1111 + +static const int comp_level_bitmask[CompLevel_count] = {0, 1, 10, 100, 1000}; +static const int comp_level_bitmask_all_levels = 1111; +static const intx default_comp_level_argument = comp_level_bitmask_all_levels; + +inline bool bitmask_applies_to_comp_level(int bitmask, int comp_level) { + assert(comp_level > CompLevel_none && comp_level < CompLevel_count, "CompLevel out of bounds"); + return (bitmask / comp_level_bitmask[comp_level]) % 10 == 1; +} + +static bool is_valid_comp_level_bitmask(intx bitmask) { + if (bitmask < 0 || bitmask > comp_level_bitmask_all_levels) { + return false; + } + for (; bitmask != 0; bitmask /= 10) { + if (bitmask % 10 > 1) { + return false; + } + } + return true; +} + static const char* optiontype_names[] = { #define enum_of_types(type, name) name, OPTION_TYPES(enum_of_types) @@ -456,36 +487,56 @@ template bool CompilerOracle::option_matches_type(CompileCommandEnum optio template bool CompilerOracle::option_matches_type(CompileCommandEnum option, ccstr& value); template bool CompilerOracle::option_matches_type(CompileCommandEnum option, double& value); +bool CompilerOracle::applies_to_comp_level(const methodHandle& method, CompileCommandEnum command, CompLevel current_level) { + if (current_level == CompLevel_none) { + return false; + } + + intx bitmask = 0; + if (!has_option_value(method, command, bitmask)) { + return false; + } + + // Since we don't have bitmask for interpreter level (0), but still need to call CompilerOracle::should_print() + // from collect_profiled_methods() in java.cpp, a special value of CompLevel_any produces a match with any bitmask, even 0 + return current_level == CompLevel_any + || bitmask_applies_to_comp_level(bitmask, current_level); +} + bool CompilerOracle::has_option(const methodHandle& method, CompileCommandEnum option) { bool value = false; has_option_value(method, option, value); return value; } -bool CompilerOracle::should_exclude(const methodHandle& method) { - if (check_predicate(CompileCommandEnum::Exclude, method)) { +bool CompilerOracle::should_exclude(const methodHandle& method, const CompLevel level) { + if (has_exclude(method, level)) { return true; } if (has_command(CompileCommandEnum::CompileOnly)) { - return !check_predicate(CompileCommandEnum::CompileOnly, method); + return !applies_to_comp_level(method, CompileCommandEnum::CompileOnly, level); } return false; } +bool CompilerOracle::has_exclude(const methodHandle& method, const CompLevel level) { + return applies_to_comp_level(method, CompileCommandEnum::Exclude, level); +} + bool CompilerOracle::should_inline(const methodHandle& method) { return (check_predicate(CompileCommandEnum::Inline, method)); } -bool CompilerOracle::should_not_inline(const methodHandle& method) { - return check_predicate(CompileCommandEnum::DontInline, method) || check_predicate(CompileCommandEnum::Exclude, method); +bool CompilerOracle::should_not_inline(const methodHandle& method, const CompLevel level) { + return check_predicate(CompileCommandEnum::DontInline, method) || has_exclude(method, level); } bool CompilerOracle::should_delay_inline(const methodHandle& method) { return (check_predicate(CompileCommandEnum::DelayInline, method)); } -bool CompilerOracle::should_print(const methodHandle& method) { - return check_predicate(CompileCommandEnum::Print, method); +bool CompilerOracle::should_print(const methodHandle& method, const CompLevel level) { + return applies_to_comp_level(method, CompileCommandEnum::Print, level); } bool CompilerOracle::should_print_methods() { @@ -505,8 +556,8 @@ bool CompilerOracle::should_log(const methodHandle& method) { return (check_predicate(CompileCommandEnum::Log, method)); } -bool CompilerOracle::should_break_at(const methodHandle& method) { - return check_predicate(CompileCommandEnum::Break, method); +bool CompilerOracle::should_break_at(const methodHandle& method, const CompLevel level) { + return applies_to_comp_level(method, CompileCommandEnum::Break, level); } void CompilerOracle::tag_blackhole_if_possible(const methodHandle& method) { @@ -678,6 +729,19 @@ static void usage() { tty->print_cr("from inlining, whereas the 'compileonly' command only excludes methods from"); tty->print_cr("top-level compilations (i.e. they can still be inlined into other compilation units)."); tty->cr(); + tty->print_cr("Compilation levels can be specified in the 'compileonly', 'exclude', 'print',"); + tty->print_cr("and 'break' commands using a binary bitmask as an optional value:"); + tty->print_cr(" -XX:CompileCommand=exclude,java/*.*,1011 -XX:CompileCommand=print,java/*.*,100"); + tty->cr(); + tty->print_cr("The bitmask is calculated by summing the desired compilation level values:"); + tty->print_cr(" C1 without profiling = 1"); + tty->print_cr(" C1 with limited profiling = 10"); + tty->print_cr(" C1 with full profiling = 100"); + tty->print_cr(" C2 = 1000"); + tty->cr(); + tty->print_cr("Note: Excluding specific compilation levels may disrupt normal state transitions"); + tty->print_cr("between the levels, as the VM will not automatically work around the excluded ones."); + tty->cr(); }; static int skip_whitespace(char* &line) { @@ -712,7 +776,7 @@ static bool parseMemLimit(const char* line, intx& value, int& bytes_read, char* size_t s = 0; char* end; if (!parse_integer(line, &end, &s)) { - jio_snprintf(errorbuf, buf_size, "MemLimit: invalid value"); + jio_snprintf(errorbuf, buf_size, ": invalid integer: '%.20s'", line); return false; } bytes_read = (int)(end - line); @@ -726,7 +790,7 @@ static bool parseMemLimit(const char* line, intx& value, int& bytes_read, char* // ok, this is the default bytes_read += 5; } else { - jio_snprintf(errorbuf, buf_size, "MemLimit: invalid option"); + jio_snprintf(errorbuf, buf_size, ": invalid suffix: '%.6s'", end); return false; } } @@ -751,7 +815,7 @@ static bool parseMemStat(const char* line, uintx& value, int& bytes_read, char* }); #undef IF_ENUM_STRING - jio_snprintf(errorbuf, buf_size, "MemStat: invalid option"); + jio_snprintf(errorbuf, buf_size, ": invalid option: '%.8s'", line); return false; } @@ -763,21 +827,42 @@ static bool scan_value(enum OptionType type, char* line, int& total_bytes_read, const char* type_str = optiontype2name(type); int skipped = skip_whitespace(line); total_bytes_read += skipped; + char parse_error_buf[80] = {}; + if (type == OptionType::Intx) { intx value; bool success = false; - if (option == CompileCommandEnum::MemLimit) { - // Special parsing for MemLimit - success = parseMemLimit(line, value, bytes_read, errorbuf, buf_size); - } else { - // Is it a raw number? - success = sscanf(line, "%zd%n", &value, &bytes_read) == 1; + switch (option) { + case CompileCommandEnum::MemLimit: + // Special parsing for MemLimit + success = parseMemLimit(line, value, bytes_read, parse_error_buf, sizeof(parse_error_buf)); + break; + case CompileCommandEnum::Break: + case CompileCommandEnum::CompileOnly: + case CompileCommandEnum::Exclude: + case CompileCommandEnum::Print: + // In the commands above the parameter used to be a boolean. Now it is an int (a compilation level mask). + // For compatibility with previous versions we keep it optional. If user did not specify the mask, assume default value + if (*line == '\0') { + value = default_comp_level_argument; + success = true; + } else { + success = sscanf(line, "%zd%n", &value, &bytes_read) == 1; + if (success && !is_valid_comp_level_bitmask(value)) { + jio_snprintf(parse_error_buf, sizeof(parse_error_buf), ": invalid compilation level bitmask '%.*s'", bytes_read, line); + success = false; + } + } + break; + default: + // Is it a raw number? + success = sscanf(line, "%zd%n", &value, &bytes_read) == 1; } if (success) { total_bytes_read += bytes_read; return register_command(matcher, option, errorbuf, buf_size, value); } else { - jio_snprintf(errorbuf, buf_size, "Value cannot be read for option '%s' of type '%s'", ccname, type_str); + jio_snprintf(errorbuf, buf_size, "Value cannot be read for option '%s' of type '%s'%s", ccname, type_str, parse_error_buf); return false; } } else if (type == OptionType::Uintx) { @@ -785,7 +870,7 @@ static bool scan_value(enum OptionType type, char* line, int& total_bytes_read, bool success = false; if (option == CompileCommandEnum::MemStat) { // Special parsing for MemStat - success = parseMemStat(line, value, bytes_read, errorbuf, buf_size); + success = parseMemStat(line, value, bytes_read, parse_error_buf, sizeof(parse_error_buf)); } else { // parse as raw number success = sscanf(line, "%zu%n", &value, &bytes_read) == 1; @@ -794,7 +879,7 @@ static bool scan_value(enum OptionType type, char* line, int& total_bytes_read, total_bytes_read += bytes_read; return register_command(matcher, option, errorbuf, buf_size, value); } else { - jio_snprintf(errorbuf, buf_size, "Value cannot be read for option '%s' of type '%s'", ccname, type_str); + jio_snprintf(errorbuf, buf_size, "Value cannot be read for option '%s' of type '%s'%s", ccname, type_str, parse_error_buf); return false; } } else if (type == OptionType::Ccstr) { @@ -1089,17 +1174,25 @@ bool CompilerOracle::parse_from_line(char* line) { return false; } return true; - } else if (option == CompileCommandEnum::MemStat) { - // MemStat default action is to collect data but to not print - if (!register_command(matcher, option, error_buf, sizeof(error_buf), (uintx)MemStatAction::collect)) { + } + + switch (option) { + case CompileCommandEnum::Break: + case CompileCommandEnum::CompileOnly: + case CompileCommandEnum::Exclude: + case CompileCommandEnum::Print: + break; + case CompileCommandEnum::MemStat: + // MemStat default action is to collect data but to not print + if (!register_command(matcher, option, error_buf, sizeof(error_buf), (uintx)MemStatAction::collect)) { + print_parse_error(error_buf, original.get()); + return false; + } + return true; + default: + jio_snprintf(error_buf, sizeof(error_buf), " Option '%s' is not followed by a value", option2name(option)); print_parse_error(error_buf, original.get()); return false; - } - return true; - } else { - jio_snprintf(error_buf, sizeof(error_buf), " Option '%s' is not followed by a value", option2name(option)); - print_parse_error(error_buf, original.get()); - return false; } } if (!scan_value(type, line, bytes_read, matcher, option, error_buf, sizeof(error_buf))) { @@ -1209,7 +1302,7 @@ bool CompilerOracle::parse_compile_only(char* line) { if (method_pattern != nullptr) { TypedMethodOptionMatcher* matcher = TypedMethodOptionMatcher::parse_method_pattern(method_pattern, error_buf, sizeof(error_buf)); if (matcher != nullptr) { - if (register_command(matcher, CompileCommandEnum::CompileOnly, error_buf, sizeof(error_buf), true)) { + if (register_command(matcher, CompileCommandEnum::CompileOnly, error_buf, sizeof(error_buf), default_comp_level_argument)) { continue; } } diff --git a/src/hotspot/share/compiler/compilerOracle.hpp b/src/hotspot/share/compiler/compilerOracle.hpp index 665f3b2fbfd..bfed52f12e7 100644 --- a/src/hotspot/share/compiler/compilerOracle.hpp +++ b/src/hotspot/share/compiler/compilerOracle.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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,6 +25,7 @@ #ifndef SHARE_COMPILER_COMPILERORACLE_HPP #define SHARE_COMPILER_COMPILERORACLE_HPP +#include "compiler/compilerDirectives.hpp" #include "memory/allStatic.hpp" #include "oops/oopsHierarchy.hpp" #include "utilities/istream.hpp" @@ -49,20 +50,21 @@ class methodHandle; option(Help, "help", Unknown) \ option(Quiet, "quiet", Unknown) \ option(Log, "log", Bool) \ - option(Print, "print", Bool) \ + option(Print, "print", Intx) \ option(Inline, "inline", Bool) \ option(DelayInline, "delayinline", Bool) \ option(DontInline, "dontinline", Bool) \ option(Blackhole, "blackhole", Bool) \ - option(CompileOnly, "compileonly", Bool)\ - option(Exclude, "exclude", Bool) \ - option(Break, "break", Bool) \ + option(CompileOnly, "compileonly", Intx) \ + option(Exclude, "exclude", Intx) \ + option(Break, "break", Intx) \ option(BreakAtExecute, "BreakAtExecute", Bool) \ option(BreakAtCompile, "BreakAtCompile", Bool) \ option(MemLimit, "MemLimit", Intx) \ option(MemStat, "MemStat", Uintx) \ option(PrintAssembly, "PrintAssembly", Bool) \ option(PrintCompilation, "PrintCompilation", Bool) \ + option(PrintCompilation2, "PrintCompilation2", Bool) \ option(PrintInlining, "PrintInlining", Bool) \ option(PrintIntrinsics, "PrintIntrinsics", Bool) \ option(PrintNMethods, "PrintNMethods", Bool) \ @@ -134,6 +136,9 @@ class CompilerOracle : AllStatic { static bool parse_from_input(inputStream::Input* input, parse_from_line_fn_t* parse_from_line); + static bool has_exclude(const methodHandle& method, CompLevel level); + static bool applies_to_comp_level(const methodHandle& method, CompileCommandEnum command, CompLevel current_level); + public: // True if the command file has been specified or is implicit static bool has_command_file(); @@ -142,14 +147,15 @@ class CompilerOracle : AllStatic { static bool parse_from_file(); // Tells whether we to exclude compilation of method - static bool should_exclude(const methodHandle& method); + static bool should_exclude(const methodHandle & method, CompLevel level); + static bool be_quiet() { return _quiet; } // Tells whether we want to inline this method static bool should_inline(const methodHandle& method); // Tells whether we want to disallow inlining of this method - static bool should_not_inline(const methodHandle& method); + static bool should_not_inline(const methodHandle& method, CompLevel level); // Tells whether we want to delay inlining of this method static bool should_delay_inline(const methodHandle& method); @@ -158,13 +164,14 @@ class CompilerOracle : AllStatic { static bool changes_current_thread(const methodHandle& method); // Tells whether we should print the assembly for this method - static bool should_print(const methodHandle& method); + // If level == CompLevel_none or CompLevel_any, returns true if there is a print command with any mask + static bool should_print(const methodHandle& method, CompLevel level); // Tells whether we should log the compilation data for this method static bool should_log(const methodHandle& method); // Tells whether to break when compiling method - static bool should_break_at(const methodHandle& method); + static bool should_break_at(const methodHandle& method, CompLevel level); // Tells whether there are any methods to print for print_method_statistics() static bool should_print_methods(); diff --git a/src/hotspot/share/compiler/directivesParser.cpp b/src/hotspot/share/compiler/directivesParser.cpp index a2da7c7e0e4..53a8325702e 100644 --- a/src/hotspot/share/compiler/directivesParser.cpp +++ b/src/hotspot/share/compiler/directivesParser.cpp @@ -198,7 +198,7 @@ bool DirectivesParser::push_key(const char* str, size_t len) { strncpy(s, str, len); s[len] = '\0'; error(KEY_ERROR, "No such key: '%s'.", s); - FREE_C_HEAP_ARRAY(char, s); + FREE_C_HEAP_ARRAY(s); return false; } @@ -370,7 +370,7 @@ bool DirectivesParser::set_option_flag(JSON_TYPE t, JSON_VAL* v, const key* opti #endif if (!valid) { - FREE_C_HEAP_ARRAY(char, s); + FREE_C_HEAP_ARRAY(s); return false; } (set->*test)((void *)&s); // Takes ownership. @@ -440,7 +440,7 @@ bool DirectivesParser::set_option(JSON_TYPE t, JSON_VAL* v) { assert (error_msg != nullptr, "Must have valid error message"); error(VALUE_ERROR, "Method pattern error: %s", error_msg); } - FREE_C_HEAP_ARRAY(char, s); + FREE_C_HEAP_ARRAY(s); } break; @@ -472,7 +472,7 @@ bool DirectivesParser::set_option(JSON_TYPE t, JSON_VAL* v) { error(VALUE_ERROR, "Method pattern error: %s", error_msg); } } - FREE_C_HEAP_ARRAY(char, s); + FREE_C_HEAP_ARRAY(s); } break; @@ -622,4 +622,3 @@ bool DirectivesParser::callback(JSON_TYPE t, JSON_VAL* v, uint rlimit) { } } } - diff --git a/src/hotspot/share/compiler/oopMap.cpp b/src/hotspot/share/compiler/oopMap.cpp index 87467d06400..c8d0c5d22ba 100644 --- a/src/hotspot/share/compiler/oopMap.cpp +++ b/src/hotspot/share/compiler/oopMap.cpp @@ -869,7 +869,7 @@ ImmutableOopMapSet* ImmutableOopMapSet::clone() const { } void ImmutableOopMapSet::operator delete(void* p) { - FREE_C_HEAP_ARRAY(unsigned char, p); + FREE_C_HEAP_ARRAY(p); } //------------------------------DerivedPointerTable--------------------------- diff --git a/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp b/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp index 213fc18b8ff..7ec4a0016db 100644 --- a/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp +++ b/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp @@ -70,7 +70,7 @@ public: } ~EpsilonSpaceCounters() { - FREE_C_HEAP_ARRAY(char, _name_space); + FREE_C_HEAP_ARRAY(_name_space); } inline void update_all(size_t capacity, size_t used) { diff --git a/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp b/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp index 34d31702e80..3bf26bf46c9 100644 --- a/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp +++ b/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp @@ -68,7 +68,7 @@ * has happened since the allocation. */ bool G1BarrierSetC2::g1_can_remove_pre_barrier(GraphKit* kit, - PhaseValues* phase, + PhaseGVN* phase, Node* adr, BasicType bt, uint adr_idx) const { diff --git a/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.hpp b/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.hpp index 601d0f1138e..e8a0e797dfa 100644 --- a/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.hpp +++ b/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.hpp @@ -74,7 +74,7 @@ private: protected: bool g1_can_remove_pre_barrier(GraphKit* kit, - PhaseValues* phase, + PhaseGVN* phase, Node* adr, BasicType bt, uint adr_idx) const; diff --git a/src/hotspot/share/gc/g1/g1Allocator.cpp b/src/hotspot/share/gc/g1/g1Allocator.cpp index 78710084ee3..e9d1c13af7a 100644 --- a/src/hotspot/share/gc/g1/g1Allocator.cpp +++ b/src/hotspot/share/gc/g1/g1Allocator.cpp @@ -63,8 +63,8 @@ G1Allocator::~G1Allocator() { _mutator_alloc_regions[i].~MutatorAllocRegion(); _survivor_gc_alloc_regions[i].~SurvivorGCAllocRegion(); } - FREE_C_HEAP_ARRAY(MutatorAllocRegion, _mutator_alloc_regions); - FREE_C_HEAP_ARRAY(SurvivorGCAllocRegion, _survivor_gc_alloc_regions); + FREE_C_HEAP_ARRAY(_mutator_alloc_regions); + FREE_C_HEAP_ARRAY(_survivor_gc_alloc_regions); } #ifdef ASSERT @@ -315,7 +315,7 @@ G1PLABAllocator::PLABData::~PLABData() { for (uint node_index = 0; node_index < _num_alloc_buffers; node_index++) { delete _alloc_buffer[node_index]; } - FREE_C_HEAP_ARRAY(PLAB*, _alloc_buffer); + FREE_C_HEAP_ARRAY(_alloc_buffer); } void G1PLABAllocator::PLABData::initialize(uint num_alloc_buffers, size_t desired_plab_size, size_t tolerated_refills) { diff --git a/src/hotspot/share/gc/g1/g1Arguments.cpp b/src/hotspot/share/gc/g1/g1Arguments.cpp index c3bbd5a3b52..a0acd903b0f 100644 --- a/src/hotspot/share/gc/g1/g1Arguments.cpp +++ b/src/hotspot/share/gc/g1/g1Arguments.cpp @@ -98,7 +98,7 @@ void G1Arguments::initialize_verification_types() { parse_verification_type(token); token = strtok_r(nullptr, delimiter, &save_ptr); } - FREE_C_HEAP_ARRAY(char, type_list); + FREE_C_HEAP_ARRAY(type_list); } } diff --git a/src/hotspot/share/gc/g1/g1CardSet.cpp b/src/hotspot/share/gc/g1/g1CardSet.cpp index 60ad63e812c..f0db638a2fe 100644 --- a/src/hotspot/share/gc/g1/g1CardSet.cpp +++ b/src/hotspot/share/gc/g1/g1CardSet.cpp @@ -145,7 +145,7 @@ G1CardSetConfiguration::G1CardSetConfiguration(uint inline_ptr_bits_per_card, } G1CardSetConfiguration::~G1CardSetConfiguration() { - FREE_C_HEAP_ARRAY(size_t, _card_set_alloc_options); + FREE_C_HEAP_ARRAY(_card_set_alloc_options); } void G1CardSetConfiguration::init_card_set_alloc_options() { diff --git a/src/hotspot/share/gc/g1/g1CardSetMemory.cpp b/src/hotspot/share/gc/g1/g1CardSetMemory.cpp index 0da2f90da3f..95a32bae766 100644 --- a/src/hotspot/share/gc/g1/g1CardSetMemory.cpp +++ b/src/hotspot/share/gc/g1/g1CardSetMemory.cpp @@ -90,7 +90,7 @@ G1CardSetMemoryManager::~G1CardSetMemoryManager() { for (uint i = 0; i < num_mem_object_types(); i++) { _allocators[i].~G1CardSetAllocator(); } - FREE_C_HEAP_ARRAY(G1CardSetAllocator, _allocators); + FREE_C_HEAP_ARRAY(_allocators); } void G1CardSetMemoryManager::free(uint type, void* value) { diff --git a/src/hotspot/share/gc/g1/g1CardTableClaimTable.cpp b/src/hotspot/share/gc/g1/g1CardTableClaimTable.cpp index d8cabaa00a4..27b41ef165f 100644 --- a/src/hotspot/share/gc/g1/g1CardTableClaimTable.cpp +++ b/src/hotspot/share/gc/g1/g1CardTableClaimTable.cpp @@ -39,7 +39,7 @@ G1CardTableClaimTable::G1CardTableClaimTable(uint chunks_per_region) : } G1CardTableClaimTable::~G1CardTableClaimTable() { - FREE_C_HEAP_ARRAY(uint, _card_claims); + FREE_C_HEAP_ARRAY(_card_claims); } void G1CardTableClaimTable::initialize(uint max_reserved_regions) { diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp index 2709e6b3008..0fb2e65f1b9 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp @@ -896,7 +896,7 @@ void G1CollectedHeap::abort_refinement() { // Record any available refinement statistics. policy()->record_refinement_stats(sweep_state.stats()); - sweep_state.complete_work(false /* concurrent */, false /* print_log */); + sweep_state.cancel_refinement(); } sweep_state.reset_stats(); } @@ -944,10 +944,6 @@ void G1CollectedHeap::do_full_collection(size_t allocation_word_size, } void G1CollectedHeap::do_full_collection(bool clear_all_soft_refs) { - // Currently, there is no facility in the do_full_collection(bool) API to notify - // the caller that the collection did not succeed (e.g., because it was locked - // out by the GC locker). So, right now, we'll ignore the return value. - do_full_collection(size_t(0) /* allocation_word_size */, clear_all_soft_refs, false /* do_maximal_compaction */); @@ -2960,7 +2956,7 @@ void G1CollectedHeap::abandon_collection_set() { collection_set()->abandon(); } -size_t G1CollectedHeap::non_young_occupancy_after_allocation(size_t allocation_word_size) { +size_t G1CollectedHeap::non_young_occupancy_after_allocation(size_t allocation_word_size) const { const size_t cur_occupancy = (old_regions_count() + humongous_regions_count()) * G1HeapRegion::GrainBytes - _allocator->free_bytes_in_retained_old_region(); // Humongous allocations will always be assigned to non-young heap, so consider diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp index 3a47453819e..a68d1030636 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp @@ -1032,7 +1032,7 @@ public: // Returns how much memory there is assigned to non-young heap that can not be // allocated into any more without garbage collection after a hypothetical // allocation of allocation_word_size. - size_t non_young_occupancy_after_allocation(size_t allocation_word_size); + size_t non_young_occupancy_after_allocation(size_t allocation_word_size) const; // Determine whether the given region is one that we are using as an // old GC alloc region. diff --git a/src/hotspot/share/gc/g1/g1CollectionSet.cpp b/src/hotspot/share/gc/g1/g1CollectionSet.cpp index b3bcf6094ab..7329e679519 100644 --- a/src/hotspot/share/gc/g1/g1CollectionSet.cpp +++ b/src/hotspot/share/gc/g1/g1CollectionSet.cpp @@ -72,7 +72,7 @@ G1CollectionSet::G1CollectionSet(G1CollectedHeap* g1h, G1Policy* policy) : } G1CollectionSet::~G1CollectionSet() { - FREE_C_HEAP_ARRAY(uint, _regions); + FREE_C_HEAP_ARRAY(_regions); abandon_all_candidates(); } @@ -373,7 +373,7 @@ double G1CollectionSet::finalize_young_part(double target_pause_time_ms, G1Survi // made to regular old regions without remembered sets after a few attempts to save computation costs // of keeping them candidates for very long living pinned regions. void G1CollectionSet::finalize_old_part(double time_remaining_ms) { - double non_young_start_time_sec = os::elapsedTime(); + Ticks start_time = Ticks::now(); if (!candidates()->is_empty()) { candidates()->verify(); @@ -392,8 +392,7 @@ void G1CollectionSet::finalize_old_part(double time_remaining_ms) { log_debug(gc, ergo, cset)("No candidates to reclaim."); } - double non_young_end_time_sec = os::elapsedTime(); - phase_times()->record_non_young_cset_choice_time_ms((non_young_end_time_sec - non_young_start_time_sec) * 1000.0); + phase_times()->record_non_young_cset_choice_time_ms((Ticks::now() - start_time).seconds() * MILLIUNITS); } static void print_finish_message(const char* reason, bool from_marking) { @@ -766,7 +765,7 @@ public: } } ~G1VerifyYoungCSetIndicesClosure() { - FREE_C_HEAP_ARRAY(int, _heap_region_indices); + FREE_C_HEAP_ARRAY(_heap_region_indices); } virtual bool do_heap_region(G1HeapRegion* r) { diff --git a/src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp b/src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp index 2113db1163b..3637d477229 100644 --- a/src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp +++ b/src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp @@ -214,7 +214,7 @@ G1CollectionSetCandidates::G1CollectionSetCandidates() : { } G1CollectionSetCandidates::~G1CollectionSetCandidates() { - FREE_C_HEAP_ARRAY(CandidateOrigin, _contains_map); + FREE_C_HEAP_ARRAY(_contains_map); _from_marking_groups.clear(); _retained_groups.clear(); } @@ -413,7 +413,7 @@ void G1CollectionSetCandidates::verify() { static_cast::type>(verify_map[i])); } - FREE_C_HEAP_ARRAY(CandidateOrigin, verify_map); + FREE_C_HEAP_ARRAY(verify_map); } #endif diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp index dbb5ba509a2..83dda2a043b 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp @@ -249,7 +249,7 @@ G1CMMarkStack::ChunkAllocator::~ChunkAllocator() { } } - FREE_C_HEAP_ARRAY(TaskQueueEntryChunk*, _buckets); + FREE_C_HEAP_ARRAY(_buckets); } bool G1CMMarkStack::ChunkAllocator::reserve(size_t new_capacity) { @@ -524,7 +524,10 @@ void G1ConcurrentMark::fully_initialize() { uint max_num_regions = _g1h->max_num_regions(); ::new (_region_mark_stats) G1RegionMarkStats[max_num_regions]{}; - ::new (_top_at_mark_starts) Atomic[max_num_regions]{}; + for (uint i = 0; i < max_num_regions; i++) { + ::new (&_top_at_mark_starts[i]) Atomic(_g1h->bottom_addr_for_region(i)); + } + // Contrary to TAMS, the default value of _top_at_rebuild_starts needs to be null. ::new (_top_at_rebuild_starts) Atomic[max_num_regions]{}; reset_at_marking_complete(); @@ -676,9 +679,9 @@ void G1ConcurrentMark::reset_at_marking_complete() { } G1ConcurrentMark::~G1ConcurrentMark() { - FREE_C_HEAP_ARRAY(Atomic, _top_at_mark_starts); - FREE_C_HEAP_ARRAY(Atomic, _top_at_rebuild_starts); - FREE_C_HEAP_ARRAY(G1RegionMarkStats, _region_mark_stats); + FREE_C_HEAP_ARRAY(_top_at_mark_starts); + FREE_C_HEAP_ARRAY(_top_at_rebuild_starts); + FREE_C_HEAP_ARRAY(_region_mark_stats); // The G1ConcurrentMark instance is never freed. ShouldNotReachHere(); } @@ -1146,7 +1149,6 @@ bool G1ConcurrentMark::scan_root_regions(WorkerThreads* workers, bool concurrent // completing this work during GC. const uint num_workers = MIN2(num_remaining, _max_concurrent_workers); - assert(num_workers > 0, "no more remaining root regions to process"); G1CMRootRegionScanTask task(this, concurrent); log_debug(gc, ergo)("Running %s using %u workers for %u work units.", diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp index f9287f673d2..1ab4654a490 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp @@ -280,9 +280,9 @@ private: // Typically they contain the areas from TAMS to top of the regions. // We could scan and mark through these objects during the concurrent start pause, // but for pause time reasons we move this work to the concurrent phase. -// We need to complete this procedure before we can evacuate a particular region -// because evacuation might determine that some of these "root objects" are dead, -// potentially dropping some required references. +// Garbage collections that evacuate must either complete or abort this procedure +// before they can move objects because evacuation might determine that some of these +// "root objects" are dead, potentially dropping some references. // Root MemRegions comprise of the contents of survivor regions at the end // of the GC, and any objects copied into the old gen during GC. class G1CMRootMemRegions { diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp index b8c97acd1b0..8fc4d7a2e20 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp @@ -263,23 +263,6 @@ void G1ConcurrentMarkThread::concurrent_mark_cycle_do() { HandleMark hm(Thread::current()); ResourceMark rm; - // We have to ensure that we finish scanning the root regions - // before the next GC takes place. To ensure this we have to - // make sure that we do not join the STS until the root regions - // have been scanned. If we did then it's possible that a - // subsequent GC could block us from joining the STS and proceed - // without the root regions have been scanned which would be a - // correctness issue. - // - // So do not return before the scan root regions phase as a GC waits for a - // notification from it. - // - // For the same reason ConcurrentGCBreakpoints (in the phase methods) before - // here risk deadlock, because a young GC must wait for root region scanning. - // - // We can not easily abort before root region scan either because of the - // reasons mentioned in G1CollectedHeap::abort_concurrent_cycle(). - // Phase 1: Scan root regions. if (phase_scan_root_regions()) return; diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.inline.hpp b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.inline.hpp index 8cb7881e000..64441ccac65 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.inline.hpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.inline.hpp @@ -32,7 +32,7 @@ // Total virtual time so far. inline double G1ConcurrentMarkThread::total_mark_cpu_time_s() { - return static_cast(os::thread_cpu_time(this)) + worker_threads_cpu_time_s(); + return static_cast(os::thread_cpu_time(this)) / NANOSECS_PER_SEC + worker_threads_cpu_time_s(); } // Marking virtual time so far diff --git a/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp b/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp index e12a8c284de..d58d980b651 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp @@ -101,8 +101,6 @@ void G1ConcurrentRefineThreadControl::activate() { } void G1ConcurrentRefineThreadControl::run_task(WorkerTask* task, uint num_workers) { - assert(num_workers >= 1, "must be"); - WithActiveWorkers w(_workers, num_workers); _workers->run_task(task); } @@ -137,12 +135,26 @@ G1ConcurrentRefineSweepState::~G1ConcurrentRefineSweepState() { delete _sweep_table; } -void G1ConcurrentRefineSweepState::set_state_start_time() { - _state_start[static_cast(_state)] = Ticks::now(); +void G1ConcurrentRefineSweepState::enter_state(State state, Ticks timestamp) { + assert(state > State::Idle, "precondition"); + assert(state != State::Last, "preconditon"); + assert(_state == State(static_cast(state) - 1), + "must come from previous state but is %s", state_name(_state)); + + _state_start[static_cast(state)] = timestamp; + _state = state; } -Tickspan G1ConcurrentRefineSweepState::get_duration(State start, State end) { - return _state_start[static_cast(end)] - _state_start[static_cast(start)]; +Tickspan G1ConcurrentRefineSweepState::time_since_start(Ticks completion_time) const { + assert(_state >= State::SwapGlobalCT, "precondition"); + return completion_time - _state_start[static_cast(State::SwapGlobalCT)]; +} + +Tickspan G1ConcurrentRefineSweepState::time_until_state(State state) const { + assert(_state >= State::SwapGlobalCT, "precondition"); + assert(state >= State::SwapGlobalCT, "precondition"); + assert(state <= _state, "precondition"); + return _state_start[static_cast(state)] - _state_start[static_cast(State::SwapGlobalCT)]; } void G1ConcurrentRefineSweepState::reset_stats() { @@ -153,35 +165,11 @@ void G1ConcurrentRefineSweepState::add_yield_during_sweep_duration(jlong duratio stats()->inc_yield_during_sweep_duration(duration); } -bool G1ConcurrentRefineSweepState::advance_state(State next_state) { - bool result = is_in_progress(); - if (result) { - _state = next_state; - } else { - _state = State::Idle; - } - return result; -} - -void G1ConcurrentRefineSweepState::assert_state(State expected) { - assert(_state == expected, "must be %s but is %s", state_name(expected), state_name(_state)); -} - -void G1ConcurrentRefineSweepState::start_work() { - assert_state(State::Idle); - - set_state_start_time(); - +bool G1ConcurrentRefineSweepState::swap_global_card_table() { + enter_state(State::SwapGlobalCT, Ticks::now()); _stats.reset(); - _state = State::SwapGlobalCT; -} - -bool G1ConcurrentRefineSweepState::swap_global_card_table() { - assert_state(State::SwapGlobalCT); - GCTraceTime(Info, gc, refine) tm("Concurrent Refine Global Card Table Swap"); - set_state_start_time(); { // We can't have any new threads being in the process of created while we @@ -192,22 +180,20 @@ bool G1ConcurrentRefineSweepState::swap_global_card_table() { MutexLocker mu(Threads_lock); // A GC that advanced the epoch might have happened, which already switched - // The global card table. Do nothing. + // the global card table. Do nothing. if (is_in_progress()) { G1BarrierSet::g1_barrier_set()->swap_global_card_table(); } } - return advance_state(State::SwapJavaThreadsCT); + return is_in_progress(); } bool G1ConcurrentRefineSweepState::swap_java_threads_ct() { - assert_state(State::SwapJavaThreadsCT); + enter_state(State::SwapJavaThreadsCT, Ticks::now()); GCTraceTime(Info, gc, refine) tm("Concurrent Refine Java Thread CT swap"); - set_state_start_time(); - { // Need to leave the STS to avoid potential deadlock in the handshake. SuspendibleThreadSetLeaver sts; @@ -224,16 +210,14 @@ bool G1ConcurrentRefineSweepState::swap_java_threads_ct() { Handshake::execute(&cl); } - return advance_state(State::SynchronizeGCThreads); - } + return is_in_progress(); +} bool G1ConcurrentRefineSweepState::swap_gc_threads_ct() { - assert_state(State::SynchronizeGCThreads); + enter_state(State::SynchronizeGCThreads, Ticks::now()); GCTraceTime(Info, gc, refine) tm("Concurrent Refine GC Thread CT swap"); - set_state_start_time(); - { class RendezvousGCThreads: public VM_Operation { public: @@ -267,93 +251,148 @@ bool G1ConcurrentRefineSweepState::swap_gc_threads_ct() { VMThread::execute(&op); } - return advance_state(State::SnapshotHeap); + return is_in_progress(); } -void G1ConcurrentRefineSweepState::snapshot_heap(bool concurrent) { - if (concurrent) { - GCTraceTime(Info, gc, refine) tm("Concurrent Refine Snapshot Heap"); +void G1ConcurrentRefineSweepState::snapshot_heap() { + enter_state(State::SnapshotHeap, Ticks::now()); - assert_state(State::SnapshotHeap); + GCTraceTime(Info, gc, refine) tm("Concurrent Refine Snapshot Heap"); - set_state_start_time(); + snapshot_heap_inner(); +} +bool G1ConcurrentRefineSweepState::sweep_refinement_table(jlong& total_yield_duration) { + enter_state(State::SweepRT, Ticks::now()); + + while (true) { + { + GCTraceTime(Info, gc, refine) tm("Concurrent Refine Table Step"); + + G1ConcurrentRefine* cr = G1CollectedHeap::heap()->concurrent_refine(); + + G1ConcurrentRefineSweepTask task(_sweep_table, &_stats, cr->num_threads_wanted()); + cr->run_with_refinement_workers(&task); + + assert(is_in_progress(), "inv"); + if (task.sweep_completed()) { + return true; + } + } + + assert(SuspendibleThreadSet::should_yield(), "must be"); + // Interrupted by safepoint request. + { + jlong yield_start = os::elapsed_counter(); + SuspendibleThreadSet::yield(); + + if (!is_in_progress()) { + return false; + } else { + jlong yield_during_sweep_duration = os::elapsed_counter() - yield_start; + log_trace(gc, refine)("Yielded from card table sweeping for %.2fms, no GC inbetween, continue", + TimeHelper::counter_to_millis(yield_during_sweep_duration)); + total_yield_duration += yield_during_sweep_duration; + } + } + } +} + +static void print_refinement_stats(const Tickspan& total_duration, + const Tickspan& pre_sweep_duration, + const G1ConcurrentRefineStats* stats) { + assert(total_duration >= Tickspan(), "must be non-negative"); + assert(pre_sweep_duration >= Tickspan(), "must be non-negative"); + assert(pre_sweep_duration <= total_duration, "must be bounded by total duration"); + + log_debug(gc, refine)("Refinement took %.2fms (pre-sweep %.2fms card refine %.2fms) " + "(scanned %zu clean %zu (%.2f%%) not_clean %zu (%.2f%%) not_parsable %zu " + "refers_to_cset %zu (%.2f%%) still_refers_to_cset %zu (%.2f%%) no_cross_region %zu pending %zu)", + total_duration.seconds() * 1000.0, + pre_sweep_duration.seconds() * 1000.0, + TimeHelper::counter_to_millis(stats->refine_duration()), + stats->cards_scanned(), + stats->cards_clean(), + percent_of(stats->cards_clean(), stats->cards_scanned()), + stats->cards_not_clean(), + percent_of(stats->cards_not_clean(), stats->cards_scanned()), + stats->cards_not_parsable(), + stats->cards_refer_to_cset(), + percent_of(stats->cards_refer_to_cset(), stats->cards_not_clean()), + stats->cards_already_refer_to_cset(), + percent_of(stats->cards_already_refer_to_cset(), stats->cards_not_clean()), + stats->cards_no_cross_region(), + stats->cards_pending() + ); +} + +void G1ConcurrentRefineSweepState::handle_ongoing_refinement_at_safepoint() { + assert_at_safepoint(); + if (!is_in_progress()) { + return; + } + + const Ticks completion_time = Ticks::now(); + + const Tickspan total_duration = time_since_start(completion_time); + const Tickspan pre_sweep_duration = time_until_state(MIN2(_state, State::SweepRT)); + + print_refinement_stats(total_duration, pre_sweep_duration, &_stats); + + const bool is_in_sweep_rt = _state == State::SweepRT; + + if (!is_in_sweep_rt) { + // Refinement has been interrupted without having a snapshot. There may + // be a mix of already swapped and not-swapped card tables assigned to threads, + // so they might have already dirtied the swapped card tables. + // Conservatively scan all (non-free, non-committed) region's card tables, + // creating the snapshot right now. + log_debug(gc, refine)("Create work from scratch"); snapshot_heap_inner(); - - advance_state(State::SweepRT); } else { - assert_state(State::Idle); - assert_at_safepoint(); - - snapshot_heap_inner(); + log_debug(gc, refine)("Continue existing work"); } + + _state = State::Idle; } -void G1ConcurrentRefineSweepState::sweep_refinement_table_start() { - assert_state(State::SweepRT); - - set_state_start_time(); +void G1ConcurrentRefineSweepState::cancel_refinement() { + _state = State::Idle; } -bool G1ConcurrentRefineSweepState::sweep_refinement_table_step() { - assert_state(State::SweepRT); +void G1ConcurrentRefineSweepState::complete_refinement(jlong total_yield_during_sweep_duration, + jlong epoch_yield_duration, + jlong next_epoch_start) { + enter_state(State::CompleteRefineWork, Ticks::now()); - GCTraceTime(Info, gc, refine) tm("Concurrent Refine Table Step"); + GCTraceTime(Info, gc, refine) tm("Concurrent Refine Complete Work"); - G1ConcurrentRefine* cr = G1CollectedHeap::heap()->concurrent_refine(); + add_yield_during_sweep_duration(total_yield_during_sweep_duration); - G1ConcurrentRefineSweepTask task(_sweep_table, &_stats, cr->num_threads_wanted()); - cr->run_with_refinement_workers(&task); + const Ticks completion_time = Ticks::now(); - if (task.sweep_completed()) { - advance_state(State::CompleteRefineWork); - return true; - } else { - return false; + const Tickspan total_duration = time_since_start(completion_time); + const Tickspan pre_sweep_duration = time_until_state(State::SweepRT); + + print_refinement_stats(total_duration, pre_sweep_duration, &_stats); + + G1CollectedHeap* g1h = G1CollectedHeap::heap(); + G1Policy* policy = g1h->policy(); + policy->record_refinement_stats(stats()); + + { + MutexLocker x(G1ReviseYoungLength_lock, Mutex::_no_safepoint_check_flag); + policy->record_dirtying_stats(TimeHelper::counter_to_millis(g1h->last_refinement_epoch_start()), + TimeHelper::counter_to_millis(next_epoch_start), + _stats.cards_pending(), + TimeHelper::counter_to_millis(epoch_yield_duration), + 0 /* pending_cards_from_gc */, + _stats.cards_to_cset()); + g1h->set_last_refinement_epoch_start(next_epoch_start, epoch_yield_duration); } -} + _stats.reset(); -bool G1ConcurrentRefineSweepState::complete_work(bool concurrent, bool print_log) { - if (concurrent) { - assert_state(State::CompleteRefineWork); - } else { - // May have been forced to complete at any other time. - assert(is_in_progress() && _state != State::CompleteRefineWork, "must be but is %s", state_name(_state)); - } - - set_state_start_time(); - - if (print_log) { - G1ConcurrentRefineStats* s = &_stats; - - State state_bounded_by_sweeprt = (_state == State::SweepRT || _state == State::CompleteRefineWork) - ? State::SweepRT : _state; - - log_debug(gc, refine)("Refinement took %.2fms (pre-sweep %.2fms card refine %.2fms) " - "(scanned %zu clean %zu (%.2f%%) not_clean %zu (%.2f%%) not_parsable %zu " - "refers_to_cset %zu (%.2f%%) still_refers_to_cset %zu (%.2f%%) no_cross_region %zu pending %zu)", - get_duration(State::Idle, _state).seconds() * 1000.0, - get_duration(State::Idle, state_bounded_by_sweeprt).seconds() * 1000.0, - TimeHelper::counter_to_millis(s->refine_duration()), - s->cards_scanned(), - s->cards_clean(), - percent_of(s->cards_clean(), s->cards_scanned()), - s->cards_not_clean(), - percent_of(s->cards_not_clean(), s->cards_scanned()), - s->cards_not_parsable(), - s->cards_refer_to_cset(), - percent_of(s->cards_refer_to_cset(), s->cards_not_clean()), - s->cards_already_refer_to_cset(), - percent_of(s->cards_already_refer_to_cset(), s->cards_not_clean()), - s->cards_no_cross_region(), - s->cards_pending() - ); - } - - bool has_sweep_rt_work = _state == State::SweepRT; - - advance_state(State::Idle); - return has_sweep_rt_work; + _state = State::Idle; } void G1ConcurrentRefineSweepState::snapshot_heap_inner() { @@ -385,10 +424,6 @@ void G1ConcurrentRefineSweepState::snapshot_heap_inner() { G1CollectedHeap::heap()->heap_region_iterate(&cl); } -bool G1ConcurrentRefineSweepState::is_in_progress() const { - return _state != State::Idle; -} - bool G1ConcurrentRefineSweepState::are_java_threads_synched() const { return _state > State::SwapJavaThreadsCT || !is_in_progress(); } @@ -424,19 +459,8 @@ jint G1ConcurrentRefine::initialize() { } G1ConcurrentRefineSweepState& G1ConcurrentRefine::sweep_state_for_merge() { - bool has_sweep_claims = sweep_state().complete_work(false /* concurrent */); - if (has_sweep_claims) { - log_debug(gc, refine)("Continue existing work"); - } else { - // Refinement has been interrupted without having a snapshot. There may - // be a mix of already swapped and not-swapped card tables assigned to threads, - // so they might have already dirtied the swapped card tables. - // Conservatively scan all (non-free, non-committed) region's card tables, - // creating the snapshot right now. - log_debug(gc, refine)("Create work from scratch"); - - sweep_state().snapshot_heap(false /* concurrent */); - } + sweep_state().handle_ongoing_refinement_at_safepoint(); + assert(!sweep_state().is_in_progress(), "postcondition"); return sweep_state(); } diff --git a/src/hotspot/share/gc/g1/g1ConcurrentRefine.hpp b/src/hotspot/share/gc/g1/g1ConcurrentRefine.hpp index 5e96ed738fd..50fb412f3af 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentRefine.hpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentRefine.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -32,6 +32,7 @@ #include "utilities/globalDefinitions.hpp" #include "utilities/growableArray.hpp" #include "utilities/macros.hpp" +#include "utilities/ticks.hpp" // Forward decl class G1CardTableClaimTable; @@ -104,8 +105,10 @@ public: // Calculates statistics about the process to be used in various parts of // the garbage collection. // -// All but step 4 are interruptible by safepoints. In case of a garbage collection, -// the garbage collection will interrupt this process, and go to Idle state. +// Steps 1, 2, 3, and 5 can be interrupted by safepoints. In case of a +// garbage collection, the garbage collection will interrupt this process, +// and go to Idle state. +// Step 4 and 6 can not be interrupted. // class G1ConcurrentRefineSweepState { @@ -137,36 +140,39 @@ class G1ConcurrentRefineSweepState { // Current heap snapshot. G1CardTableClaimTable* _sweep_table; - // Start times for all states. + // Entry timestamps for states in the current refinement cycle. + // The timestamp of a state is only valid if that state has been reached in + // this cycle. State transitions must update _state and _state_start together. Ticks _state_start[static_cast(State::Last)]; - void set_state_start_time(); - Tickspan get_duration(State start, State end); + void enter_state(State state, Ticks timestamp); + Tickspan time_since_start(Ticks completion_time) const; + Tickspan time_until_state(State state) const; G1ConcurrentRefineStats _stats; - // Advances the state to next_state if not interrupted by a changed epoch. Returns - // to Idle otherwise. - bool advance_state(State next_state); - - void assert_state(State expected); - void snapshot_heap_inner(); public: G1ConcurrentRefineSweepState(uint max_reserved_regions); ~G1ConcurrentRefineSweepState(); - void start_work(); - bool swap_global_card_table(); bool swap_java_threads_ct(); bool swap_gc_threads_ct(); - void snapshot_heap(bool concurrent = true); - void sweep_refinement_table_start(); - bool sweep_refinement_table_step(); + void snapshot_heap(); + bool sweep_refinement_table(jlong& total_yield_duration); - bool complete_work(bool concurrent, bool print_log = true); + // Complete refinement for the current epoch. Finalizes the sweep state, + // records stats, and updates policy. + void complete_refinement(jlong total_yield_during_sweep_duration, + jlong epoch_yield_duration, + jlong next_epoch_start); + + void cancel_refinement(); + // Called at safepoint when refinement was interrupted and we need to merge state. + // Logs any accumulated stats and creates a snapshot if SweepRT was not reached. + void handle_ongoing_refinement_at_safepoint(); G1CardTableClaimTable* sweep_table() { return _sweep_table; } G1ConcurrentRefineStats* stats() { return &_stats; } @@ -174,7 +180,7 @@ public: void add_yield_during_sweep_duration(jlong duration); - bool is_in_progress() const; + bool is_in_progress() const { return _state != State::Idle; } bool are_java_threads_synched() const; }; diff --git a/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.cpp b/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.cpp index 7da0066e2f1..4fa32b388bd 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.cpp @@ -25,18 +25,15 @@ #include "gc/g1/g1ConcurrentRefineStats.inline.hpp" #include "runtime/timer.hpp" -void G1ConcurrentRefineStats::add_atomic(G1ConcurrentRefineStats* other) { - _sweep_duration.add_then_fetch(other->_sweep_duration.load_relaxed(), memory_order_relaxed); - _yield_during_sweep_duration.add_then_fetch(other->yield_during_sweep_duration(), memory_order_relaxed); +void G1ConcurrentRefineStats::add_atomic(const G1LocalRefineStats* other) { + _cards_scanned.add_then_fetch(other->_cards_scanned, memory_order_relaxed); + _cards_clean.add_then_fetch(other->_cards_clean, memory_order_relaxed); + _cards_not_parsable.add_then_fetch(other->_cards_not_parsable, memory_order_relaxed); + _cards_already_refer_to_cset.add_then_fetch(other->_cards_already_refer_to_cset, memory_order_relaxed); + _cards_refer_to_cset.add_then_fetch(other->_cards_refer_to_cset, memory_order_relaxed); + _cards_no_cross_region.add_then_fetch(other->_cards_no_cross_region, memory_order_relaxed); - _cards_scanned.add_then_fetch(other->cards_scanned(), memory_order_relaxed); - _cards_clean.add_then_fetch(other->cards_clean(), memory_order_relaxed); - _cards_not_parsable.add_then_fetch(other->cards_not_parsable(), memory_order_relaxed); - _cards_already_refer_to_cset.add_then_fetch(other->cards_already_refer_to_cset(), memory_order_relaxed); - _cards_refer_to_cset.add_then_fetch(other->cards_refer_to_cset(), memory_order_relaxed); - _cards_no_cross_region.add_then_fetch(other->cards_no_cross_region(), memory_order_relaxed); - - _refine_duration.add_then_fetch(other->refine_duration(), memory_order_relaxed); + _refine_duration.add_then_fetch(other->_refine_duration, memory_order_relaxed); } void G1ConcurrentRefineStats::reset() { diff --git a/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.hpp b/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.hpp index a91ad0eb2e4..6f4af71081b 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.hpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.hpp @@ -29,9 +29,27 @@ #include "runtime/atomic.hpp" #include "utilities/globalDefinitions.hpp" -// Collection of statistics for concurrent refinement processing. -// Used for collecting per-thread statistics and for summaries over a -// collection of threads. +// Thread-local refinement statistics. +struct G1LocalRefineStats { + size_t _cards_scanned; + size_t _cards_clean; + size_t _cards_not_parsable; + size_t _cards_already_refer_to_cset; + size_t _cards_refer_to_cset; + size_t _cards_no_cross_region; + jlong _refine_duration; + + G1LocalRefineStats() : + _cards_scanned(0), + _cards_clean(0), + _cards_not_parsable(0), + _cards_already_refer_to_cset(0), + _cards_refer_to_cset(0), + _cards_no_cross_region(0), + _refine_duration(0) {} +}; + +// Global statistics for concurrent refinement processing. class G1ConcurrentRefineStats : public CHeapObj { Atomic _sweep_duration; // Time spent sweeping the table finding non-clean cards // and refining them. @@ -69,18 +87,10 @@ public: inline size_t cards_to_cset() const; - inline void inc_sweep_time(jlong t); + void add_atomic(const G1LocalRefineStats* other); + + inline void inc_sweep_duration(jlong t); inline void inc_yield_during_sweep_duration(jlong t); - inline void inc_refine_duration(jlong t); - - inline void inc_cards_scanned(size_t increment); - inline void inc_cards_clean(size_t increment); - inline void inc_cards_not_parsable(); - inline void inc_cards_already_refer_to_cset(); - inline void inc_cards_refer_to_cset(); - inline void inc_cards_no_cross_region(); - - void add_atomic(G1ConcurrentRefineStats* other); void reset(); }; diff --git a/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.inline.hpp b/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.inline.hpp index e1a296c6494..2ef35caab08 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.inline.hpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentRefineStats.inline.hpp @@ -79,40 +79,12 @@ inline size_t G1ConcurrentRefineStats::cards_to_cset() const { return cards_already_refer_to_cset() + cards_refer_to_cset(); } -inline void G1ConcurrentRefineStats::inc_sweep_time(jlong t) { - _sweep_duration.store_relaxed(_sweep_duration.load_relaxed() + t); +inline void G1ConcurrentRefineStats::inc_sweep_duration(jlong t) { + _sweep_duration.fetch_then_add(t, memory_order_relaxed); } inline void G1ConcurrentRefineStats::inc_yield_during_sweep_duration(jlong t) { - _yield_during_sweep_duration.store_relaxed(yield_during_sweep_duration() + t); -} - -inline void G1ConcurrentRefineStats::inc_refine_duration(jlong t) { - _refine_duration.store_relaxed(refine_duration() + t); -} - -inline void G1ConcurrentRefineStats::inc_cards_scanned(size_t increment) { - _cards_scanned.store_relaxed(cards_scanned() + increment); -} - -inline void G1ConcurrentRefineStats::inc_cards_clean(size_t increment) { - _cards_clean.store_relaxed(cards_clean() + increment); -} - -inline void G1ConcurrentRefineStats::inc_cards_not_parsable() { - _cards_not_parsable.store_relaxed(cards_not_parsable() + 1); -} - -inline void G1ConcurrentRefineStats::inc_cards_already_refer_to_cset() { - _cards_already_refer_to_cset.store_relaxed(cards_already_refer_to_cset() + 1); -} - -inline void G1ConcurrentRefineStats::inc_cards_refer_to_cset() { - _cards_refer_to_cset.store_relaxed(cards_refer_to_cset() + 1); -} - -inline void G1ConcurrentRefineStats::inc_cards_no_cross_region() { - _cards_no_cross_region.store_relaxed(cards_no_cross_region() + 1); + _yield_during_sweep_duration.fetch_then_add(t, memory_order_relaxed); } #endif // SHARE_GC_G1_G1CONCURRENTREFINESTATS_INLINE_HPP diff --git a/src/hotspot/share/gc/g1/g1ConcurrentRefineSweepTask.cpp b/src/hotspot/share/gc/g1/g1ConcurrentRefineSweepTask.cpp index ce944f2254d..2f99611bb99 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentRefineSweepTask.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentRefineSweepTask.cpp @@ -35,8 +35,6 @@ class G1RefineRegionClosure : public G1HeapRegionClosure { uint _worker_id; - size_t _num_collections_at_start; - bool has_work(G1HeapRegion* r) { return _scan_state->has_unclaimed_cards(r->hrm_index()); } @@ -62,22 +60,22 @@ class G1RefineRegionClosure : public G1HeapRegionClosure { switch (res) { case G1RemSet::HasRefToCSet: { *dest_card = G1CardTable::g1_to_cset_card; - _refine_stats.inc_cards_refer_to_cset(); + _per_worker_refine_data._cards_refer_to_cset++; break; } case G1RemSet::AlreadyToCSet: { *dest_card = G1CardTable::g1_to_cset_card; - _refine_stats.inc_cards_already_refer_to_cset(); + _per_worker_refine_data._cards_already_refer_to_cset++; break; } case G1RemSet::NoCrossRegion: { - _refine_stats.inc_cards_no_cross_region(); + _per_worker_refine_data._cards_no_cross_region++; break; } case G1RemSet::CouldNotParse: { // Could not refine - redirty with the original value. *dest_card = *source_card; - _refine_stats.inc_cards_not_parsable(); + _per_worker_refine_data._cards_not_parsable++; break; } case G1RemSet::HasRefToOld : break; // Nothing special to do. @@ -94,7 +92,7 @@ class G1RefineRegionClosure : public G1HeapRegionClosure { public: bool _completed; - G1ConcurrentRefineStats _refine_stats; + G1LocalRefineStats _per_worker_refine_data; G1RefineRegionClosure(uint worker_id, G1CardTableClaimTable* scan_state) : G1HeapRegionClosure(), @@ -102,7 +100,7 @@ public: _scan_state(scan_state), _worker_id(worker_id), _completed(true), - _refine_stats() { } + _per_worker_refine_data() { } bool do_heap_region(G1HeapRegion* r) override { @@ -143,7 +141,7 @@ public: do_claimed_block(dirty_l, dirty_r, dest_card + pointer_delta(dirty_l, start_card, sizeof(CardValue))); num_dirty_cards += pointer_delta(dirty_r, dirty_l, sizeof(CardValue)); - _refine_stats.inc_refine_duration(os::elapsed_counter() - refine_start); + _per_worker_refine_data._refine_duration += os::elapsed_counter() - refine_start; }); if (VerifyDuringGC) { @@ -152,8 +150,8 @@ public: } } - _refine_stats.inc_cards_scanned(claim.size()); - _refine_stats.inc_cards_clean(claim.size() - num_dirty_cards); + _per_worker_refine_data._cards_scanned += claim.size(); + _per_worker_refine_data._cards_clean += claim.size() - num_dirty_cards; if (SuspendibleThreadSet::should_yield()) { _completed = false; @@ -185,8 +183,8 @@ void G1ConcurrentRefineSweepTask::work(uint worker_id) { _sweep_completed = false; } - sweep_cl._refine_stats.inc_sweep_time(os::elapsed_counter() - start); - _stats->add_atomic(&sweep_cl._refine_stats); + _stats->inc_sweep_duration(os::elapsed_counter() - start); + _stats->add_atomic(&sweep_cl._per_worker_refine_data); } -bool G1ConcurrentRefineSweepTask::sweep_completed() const { return _sweep_completed; } \ No newline at end of file +bool G1ConcurrentRefineSweepTask::sweep_completed() const { return _sweep_completed; } diff --git a/src/hotspot/share/gc/g1/g1ConcurrentRefineThread.cpp b/src/hotspot/share/gc/g1/g1ConcurrentRefineThread.cpp index 6b51e5eef62..2c2f8a1977f 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentRefineThread.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentRefineThread.cpp @@ -141,8 +141,6 @@ bool G1ConcurrentRefineThread::wait_for_work() { void G1ConcurrentRefineThread::do_refinement() { G1ConcurrentRefineSweepState& state = _cr->sweep_state(); - state.start_work(); - // Swap card tables. // 1. Global card table @@ -163,72 +161,23 @@ void G1ConcurrentRefineThread::do_refinement() { return; } - G1CollectedHeap* g1h = G1CollectedHeap::heap(); - jlong epoch_yield_duration = g1h->yield_duration_in_refinement_epoch(); + jlong epoch_yield_duration = G1CollectedHeap::heap()->yield_duration_in_refinement_epoch(); jlong next_epoch_start = os::elapsed_counter(); - jlong total_yield_during_sweep_duration = 0; - // 4. Snapshot heap. state.snapshot_heap(); - // 5. Sweep refinement table until done - bool interrupted_by_gc = false; + // 5. Sweep refinement table. + log_info(gc, task)("Concurrent Refine Sweep Using %u of %u Workers", cr()->num_threads_wanted(), cr()->max_num_threads()); - log_info(gc, task)("Concurrent Refine Sweep Using %u of %u Workers", _cr->num_threads_wanted(), _cr->max_num_threads()); - - state.sweep_refinement_table_start(); - while (true) { - bool completed = state.sweep_refinement_table_step(); - - if (completed) { - break; - } - - if (SuspendibleThreadSet::should_yield()) { - jlong yield_during_sweep_start = os::elapsed_counter(); - SuspendibleThreadSet::yield(); - - // The yielding may have completed the task, check. - if (!state.is_in_progress()) { - log_debug(gc, refine)("GC completed sweeping, aborting concurrent operation"); - interrupted_by_gc = true; - break; - } else { - jlong yield_during_sweep_duration = os::elapsed_counter() - yield_during_sweep_start; - log_debug(gc, refine)("Yielded from card table sweeping for %.2fms, no GC inbetween, continue", - TimeHelper::counter_to_millis(yield_during_sweep_duration)); - total_yield_during_sweep_duration += yield_during_sweep_duration; - } - } + jlong total_yield_during_sweep_duration = 0; + if (!state.sweep_refinement_table(total_yield_during_sweep_duration)) { + log_debug(gc, refine)("GC completed sweeping, aborting concurrent operation"); + return; } - if (!interrupted_by_gc) { - GCTraceTime(Info, gc, refine) tm("Concurrent Refine Complete Work"); - - state.add_yield_during_sweep_duration(total_yield_during_sweep_duration); - - state.complete_work(true); - - G1CollectedHeap* g1h = G1CollectedHeap::heap(); - G1Policy* policy = g1h->policy(); - G1ConcurrentRefineStats* stats = state.stats(); - policy->record_refinement_stats(stats); - - { - // The young gen revising mechanism reads the predictor and the values set - // here. Avoid inconsistencies by locking. - MutexLocker x(G1ReviseYoungLength_lock, Mutex::_no_safepoint_check_flag); - policy->record_dirtying_stats(TimeHelper::counter_to_millis(G1CollectedHeap::heap()->last_refinement_epoch_start()), - TimeHelper::counter_to_millis(next_epoch_start), - stats->cards_pending(), - TimeHelper::counter_to_millis(epoch_yield_duration), - 0 /* pending_cards_from_gc */, - stats->cards_to_cset()); - G1CollectedHeap::heap()->set_last_refinement_epoch_start(next_epoch_start, epoch_yield_duration); - } - stats->reset(); - } + // 6. Complete refinement. + state.complete_refinement(total_yield_during_sweep_duration, epoch_yield_duration, next_epoch_start); } void G1ConcurrentRefineThread::update_perf_counter_cpu_time() { diff --git a/src/hotspot/share/gc/g1/g1EvacFailureRegions.cpp b/src/hotspot/share/gc/g1/g1EvacFailureRegions.cpp index 37553e2aa56..03c20346eb3 100644 --- a/src/hotspot/share/gc/g1/g1EvacFailureRegions.cpp +++ b/src/hotspot/share/gc/g1/g1EvacFailureRegions.cpp @@ -55,7 +55,7 @@ void G1EvacFailureRegions::post_collection() { _regions_pinned.resize(0); _regions_alloc_failed.resize(0); - FREE_C_HEAP_ARRAY(uint, _evac_failed_regions); + FREE_C_HEAP_ARRAY(_evac_failed_regions); _evac_failed_regions = nullptr; } diff --git a/src/hotspot/share/gc/g1/g1FullCollector.cpp b/src/hotspot/share/gc/g1/g1FullCollector.cpp index c835dd159a6..8b38509d1d8 100644 --- a/src/hotspot/share/gc/g1/g1FullCollector.cpp +++ b/src/hotspot/share/gc/g1/g1FullCollector.cpp @@ -167,10 +167,10 @@ G1FullCollector::~G1FullCollector() { delete _partial_array_state_manager; - FREE_C_HEAP_ARRAY(G1FullGCMarker*, _markers); - FREE_C_HEAP_ARRAY(G1FullGCCompactionPoint*, _compaction_points); - FREE_C_HEAP_ARRAY(Atomic, _compaction_tops); - FREE_C_HEAP_ARRAY(G1RegionMarkStats, _live_stats); + FREE_C_HEAP_ARRAY(_markers); + FREE_C_HEAP_ARRAY(_compaction_points); + FREE_C_HEAP_ARRAY(_compaction_tops); + FREE_C_HEAP_ARRAY(_live_stats); } class PrepareRegionsClosure : public G1HeapRegionClosure { diff --git a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp index 023790a2422..e13b9d91bc5 100644 --- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp +++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp @@ -181,7 +181,6 @@ void G1GCPhaseTimes::reset() { _cur_resize_heap_time_ms = 0.0; _cur_ref_proc_time_ms = 0.0; _root_region_scan_time_ms = 0.0; - _external_accounted_time_ms = 0.0; _recorded_prepare_heap_roots_time_ms = 0.0; _recorded_young_cset_choice_time_ms = 0.0; _recorded_non_young_cset_choice_time_ms = 0.0; @@ -416,8 +415,6 @@ double G1GCPhaseTimes::print_pre_evacuate_collection_set() const { info_time("Pre Evacuate Collection Set", sum_ms); - // Concurrent tasks of ResetMarkingState and NoteStartOfMark are triggered during - // young collection. However, their execution time are not included in _gc_pause_time_ms. if (_cur_prepare_concurrent_task_time_ms > 0.0) { debug_time("Prepare Concurrent Start", _cur_prepare_concurrent_task_time_ms); debug_phase(_gc_par_phases[ResetMarkingState], 1); @@ -543,10 +540,9 @@ void G1GCPhaseTimes::print_other(double accounted_ms) const { info_time("Other", _gc_pause_time_ms - accounted_ms); } -// Root-region-scan-wait, verify-before and verify-after are part of young GC, +// Root region scan, verify before and verify after are part of young GC, // but these are not measured by G1Policy. i.e. these are not included in // G1Policy::record_young_collection_start() and record_young_collection_end(). -// In addition, these are not included in G1GCPhaseTimes::_gc_pause_time_ms. // See G1YoungCollector::collect(). void G1GCPhaseTimes::print(bool evacuation_failed) { if (_root_region_scan_time_ms > 0.0) { diff --git a/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp b/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp index b57bf0d617e..eb51b340da3 100644 --- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp +++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp @@ -175,7 +175,6 @@ class G1GCPhaseTimes : public CHeapObj { double _cur_collection_nmethod_list_cleanup_time_ms; double _cur_merge_heap_roots_time_ms; - // Merge refinement table time. Note that this time is included in _cur_merge_heap_roots_time_ms. double _cur_merge_refinement_table_time_ms; double _cur_optional_merge_heap_roots_time_ms; @@ -190,11 +189,8 @@ class G1GCPhaseTimes : public CHeapObj { double _cur_resize_heap_time_ms; double _cur_ref_proc_time_ms; - // Not included in _gc_pause_time_ms double _root_region_scan_time_ms; - double _external_accounted_time_ms; - double _recorded_prepare_heap_roots_time_ms; double _recorded_young_cset_choice_time_ms; @@ -210,7 +206,6 @@ class G1GCPhaseTimes : public CHeapObj { double _cur_region_register_time; - // Not included in _gc_pause_time_ms double _cur_verify_before_time_ms; double _cur_verify_after_time_ms; @@ -298,7 +293,7 @@ class G1GCPhaseTimes : public CHeapObj { } void record_merge_heap_roots_time(double ms) { - _cur_merge_heap_roots_time_ms += ms; + _cur_merge_heap_roots_time_ms = ms; } void record_merge_refinement_table_time(double ms) { @@ -373,10 +368,6 @@ class G1GCPhaseTimes : public CHeapObj { _cur_verify_after_time_ms = time_ms; } - void inc_external_accounted_time_ms(double time_ms) { - _external_accounted_time_ms += time_ms; - } - void record_prepare_heap_roots_time_ms(double recorded_prepare_heap_roots_time_ms) { _recorded_prepare_heap_roots_time_ms = recorded_prepare_heap_roots_time_ms; } diff --git a/src/hotspot/share/gc/g1/g1HeapRegion.inline.hpp b/src/hotspot/share/gc/g1/g1HeapRegion.inline.hpp index f92e37fee3c..619aef35a9a 100644 --- a/src/hotspot/share/gc/g1/g1HeapRegion.inline.hpp +++ b/src/hotspot/share/gc/g1/g1HeapRegion.inline.hpp @@ -187,7 +187,16 @@ inline void G1HeapRegion::apply_to_marked_objects(G1CMBitMap* bitmap, ApplyToMar } } - assert(next_addr == limit, "Should stop the scan at the limit."); +#ifdef ASSERT + if (is_starts_humongous() && bitmap->is_marked(bottom())) { + HeapWord* humongous_end = bottom() + cast_to_oop(bottom())->size(); + assert(next_addr == MAX2(limit, humongous_end), + "Should stop the scan at limit or end of humongous object. r %u (%s)", + hrm_index(), get_short_type_str()); + } else { + assert(next_addr == limit, "Should stop the scan at the limit. r %u (%s)", hrm_index(), get_short_type_str()); + } +#endif } inline HeapWord* G1HeapRegion::par_allocate(size_t min_word_size, diff --git a/src/hotspot/share/gc/g1/g1HeapRegionManager.cpp b/src/hotspot/share/gc/g1/g1HeapRegionManager.cpp index 3c0318827ef..214f1a2d2b6 100644 --- a/src/hotspot/share/gc/g1/g1HeapRegionManager.cpp +++ b/src/hotspot/share/gc/g1/g1HeapRegionManager.cpp @@ -718,7 +718,7 @@ G1HeapRegionClaimer::G1HeapRegionClaimer(uint n_workers) : } G1HeapRegionClaimer::~G1HeapRegionClaimer() { - FREE_C_HEAP_ARRAY(uint, _claims); + FREE_C_HEAP_ARRAY(_claims); } uint G1HeapRegionClaimer::offset_for_worker(uint worker_id) const { @@ -759,7 +759,7 @@ public: for (uint worker = 0; worker < _num_workers; worker++) { _worker_freelists[worker].~G1FreeRegionList(); } - FREE_C_HEAP_ARRAY(G1FreeRegionList, _worker_freelists); + FREE_C_HEAP_ARRAY(_worker_freelists); } G1FreeRegionList* worker_freelist(uint worker) { diff --git a/src/hotspot/share/gc/g1/g1HeapRegionSet.cpp b/src/hotspot/share/gc/g1/g1HeapRegionSet.cpp index 70186adcdfc..930a4bd953f 100644 --- a/src/hotspot/share/gc/g1/g1HeapRegionSet.cpp +++ b/src/hotspot/share/gc/g1/g1HeapRegionSet.cpp @@ -384,7 +384,7 @@ G1FreeRegionList::NodeInfo::NodeInfo() : _numa(G1NUMA::numa()), _length_of_node( } G1FreeRegionList::NodeInfo::~NodeInfo() { - FREE_C_HEAP_ARRAY(uint, _length_of_node); + FREE_C_HEAP_ARRAY(_length_of_node); } void G1FreeRegionList::NodeInfo::clear() { diff --git a/src/hotspot/share/gc/g1/g1HeapTransition.cpp b/src/hotspot/share/gc/g1/g1HeapTransition.cpp index 30ad4c72bf6..690bda4e7e6 100644 --- a/src/hotspot/share/gc/g1/g1HeapTransition.cpp +++ b/src/hotspot/share/gc/g1/g1HeapTransition.cpp @@ -55,8 +55,8 @@ G1HeapTransition::Data::Data(G1CollectedHeap* g1_heap) : } G1HeapTransition::Data::~Data() { - FREE_C_HEAP_ARRAY(uint, _eden_length_per_node); - FREE_C_HEAP_ARRAY(uint, _survivor_length_per_node); + FREE_C_HEAP_ARRAY(_eden_length_per_node); + FREE_C_HEAP_ARRAY(_survivor_length_per_node); } G1HeapTransition::G1HeapTransition(G1CollectedHeap* g1_heap) : _g1_heap(g1_heap), _before(g1_heap) { } diff --git a/src/hotspot/share/gc/g1/g1HeapVerifier.cpp b/src/hotspot/share/gc/g1/g1HeapVerifier.cpp index 714a2473a08..304722c13a1 100644 --- a/src/hotspot/share/gc/g1/g1HeapVerifier.cpp +++ b/src/hotspot/share/gc/g1/g1HeapVerifier.cpp @@ -461,35 +461,34 @@ public: G1ConcurrentMark* cm = G1CollectedHeap::heap()->concurrent_mark(); - bool part_of_marking = r->is_old_or_humongous() && !r->is_collection_set_candidate(); HeapWord* top_at_mark_start = cm->top_at_mark_start(r); - if (part_of_marking) { - guarantee(r->bottom() != top_at_mark_start, - "region %u (%s) does not have TAMS set", - r->hrm_index(), r->get_short_type_str()); - size_t marked_bytes = cm->live_bytes(r->hrm_index()); - + if (r->is_old_or_humongous()) { + if (!cm->is_root_region(r)) { + guarantee(r->bottom() != top_at_mark_start, + "region %u (%s) does not have TAMS set although it's going to be marked through", + r->hrm_index(), r->get_short_type_str()); + } MarkedBytesClosure cl; r->apply_to_marked_objects(cm->mark_bitmap(), &cl); + size_t marked_bytes = cm->live_bytes(r->hrm_index()); guarantee(cl.marked_bytes() == marked_bytes, "region %u (%s) live bytes actual %zu and cache %zu differ", r->hrm_index(), r->get_short_type_str(), cl.marked_bytes(), marked_bytes); - } else { + } else if (r->is_young()) { guarantee(r->bottom() == top_at_mark_start, "region %u (%s) has TAMS set " PTR_FORMAT " " PTR_FORMAT, r->hrm_index(), r->get_short_type_str(), p2i(r->bottom()), p2i(top_at_mark_start)); guarantee(cm->live_bytes(r->hrm_index()) == 0, "region %u (%s) has %zu live bytes recorded", r->hrm_index(), r->get_short_type_str(), cm->live_bytes(r->hrm_index())); - guarantee(cm->mark_bitmap()->get_next_marked_addr(r->bottom(), r->end()) == r->end(), - "region %u (%s) has mark", - r->hrm_index(), r->get_short_type_str()); - guarantee(cm->is_root_region(r), - "region %u (%s) should be root region", - r->hrm_index(), r->get_short_type_str()); + guarantee(cm->is_root_region(r), "must be for %u (%s)", r->hrm_index(), r->get_short_type_str()); } + + guarantee(cm->mark_bitmap()->get_next_marked_addr(top_at_mark_start, r->end()) == r->end(), + "region %u (%s) has mark from TAMS to top", + r->hrm_index(), r->get_short_type_str()); return false; } }; diff --git a/src/hotspot/share/gc/g1/g1IHOPControl.cpp b/src/hotspot/share/gc/g1/g1IHOPControl.cpp index 1e1c52477f9..164486123f7 100644 --- a/src/hotspot/share/gc/g1/g1IHOPControl.cpp +++ b/src/hotspot/share/gc/g1/g1IHOPControl.cpp @@ -114,7 +114,7 @@ void G1IHOPControl::add_marking_start_to_mixed_length(double length_s) { // Determine the old generation occupancy threshold at which to start // concurrent marking such that reclamation (first Mixed GC) begins // before the heap reaches a critical occupancy level. -size_t G1IHOPControl::old_gen_threshold_for_conc_mark_start() { +size_t G1IHOPControl::old_gen_threshold_for_conc_mark_start() const { guarantee(_target_occupancy > 0, "Target occupancy must be initialized"); if (!_is_adaptive || !have_enough_data_for_prediction()) { diff --git a/src/hotspot/share/gc/g1/g1IHOPControl.hpp b/src/hotspot/share/gc/g1/g1IHOPControl.hpp index ff209012f02..2836408978b 100644 --- a/src/hotspot/share/gc/g1/g1IHOPControl.hpp +++ b/src/hotspot/share/gc/g1/g1IHOPControl.hpp @@ -115,7 +115,7 @@ class G1IHOPControl : public CHeapObj { void add_marking_start_to_mixed_length(double length_s); // Get the current non-young occupancy at which concurrent marking should start. - size_t old_gen_threshold_for_conc_mark_start(); + size_t old_gen_threshold_for_conc_mark_start() const; void report_statistics(G1NewTracer* tracer, size_t non_young_occupancy); }; diff --git a/src/hotspot/share/gc/g1/g1MonotonicArena.cpp b/src/hotspot/share/gc/g1/g1MonotonicArena.cpp index 3f97870a67f..aea6f4335e8 100644 --- a/src/hotspot/share/gc/g1/g1MonotonicArena.cpp +++ b/src/hotspot/share/gc/g1/g1MonotonicArena.cpp @@ -52,7 +52,7 @@ void G1MonotonicArena::Segment::delete_segment(Segment* segment) { GlobalCounter::write_synchronize(); } segment->~Segment(); - FREE_C_HEAP_ARRAY(_mem_tag, segment); + FREE_C_HEAP_ARRAY(segment); } void G1MonotonicArena::SegmentFreeList::bulk_add(Segment& first, diff --git a/src/hotspot/share/gc/g1/g1MonotonicArenaFreePool.cpp b/src/hotspot/share/gc/g1/g1MonotonicArenaFreePool.cpp index 922c68bfba4..c12321b851a 100644 --- a/src/hotspot/share/gc/g1/g1MonotonicArenaFreePool.cpp +++ b/src/hotspot/share/gc/g1/g1MonotonicArenaFreePool.cpp @@ -159,7 +159,7 @@ G1MonotonicArenaFreePool::~G1MonotonicArenaFreePool() { for (uint i = 0; i < _num_free_lists; i++) { _free_lists[i].~SegmentFreeList(); } - FREE_C_HEAP_ARRAY(mtGC, _free_lists); + FREE_C_HEAP_ARRAY(_free_lists); } G1MonotonicArenaMemoryStats G1MonotonicArenaFreePool::memory_sizes() const { diff --git a/src/hotspot/share/gc/g1/g1NUMA.cpp b/src/hotspot/share/gc/g1/g1NUMA.cpp index 778ed31d7b5..db42b8c10fc 100644 --- a/src/hotspot/share/gc/g1/g1NUMA.cpp +++ b/src/hotspot/share/gc/g1/g1NUMA.cpp @@ -123,8 +123,8 @@ void G1NUMA::initialize(bool use_numa) { G1NUMA::~G1NUMA() { delete _stats; - FREE_C_HEAP_ARRAY(uint, _node_id_to_index_map); - FREE_C_HEAP_ARRAY(uint, _node_ids); + FREE_C_HEAP_ARRAY(_node_id_to_index_map); + FREE_C_HEAP_ARRAY(_node_ids); } void G1NUMA::set_region_info(size_t region_size, size_t page_size) { @@ -280,9 +280,9 @@ G1NodeIndexCheckClosure::~G1NodeIndexCheckClosure() { _ls->print("%u: %u/%u/%u ", numa_ids[i], _matched[i], _mismatched[i], _total[i]); } - FREE_C_HEAP_ARRAY(uint, _matched); - FREE_C_HEAP_ARRAY(uint, _mismatched); - FREE_C_HEAP_ARRAY(uint, _total); + FREE_C_HEAP_ARRAY(_matched); + FREE_C_HEAP_ARRAY(_mismatched); + FREE_C_HEAP_ARRAY(_total); } bool G1NodeIndexCheckClosure::do_heap_region(G1HeapRegion* hr) { diff --git a/src/hotspot/share/gc/g1/g1NUMAStats.cpp b/src/hotspot/share/gc/g1/g1NUMAStats.cpp index aaebfa1be8f..ce62d34f847 100644 --- a/src/hotspot/share/gc/g1/g1NUMAStats.cpp +++ b/src/hotspot/share/gc/g1/g1NUMAStats.cpp @@ -45,9 +45,9 @@ G1NUMAStats::NodeDataArray::NodeDataArray(uint num_nodes) { G1NUMAStats::NodeDataArray::~NodeDataArray() { for (uint row = 0; row < _num_row; row++) { - FREE_C_HEAP_ARRAY(size_t, _data[row]); + FREE_C_HEAP_ARRAY(_data[row]); } - FREE_C_HEAP_ARRAY(size_t*, _data); + FREE_C_HEAP_ARRAY(_data); } void G1NUMAStats::NodeDataArray::create_hit_rate(Stat* result) const { diff --git a/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp b/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp index 52c8d4d4389..45e1b25cb95 100644 --- a/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp +++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp @@ -131,9 +131,9 @@ size_t G1ParScanThreadState::flush_stats(size_t* surviving_young_words, uint num G1ParScanThreadState::~G1ParScanThreadState() { delete _plab_allocator; delete _closures; - FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_base); + FREE_C_HEAP_ARRAY(_surviving_young_words_base); delete[] _oops_into_optional_regions; - FREE_C_HEAP_ARRAY(size_t, _obj_alloc_stat); + FREE_C_HEAP_ARRAY(_obj_alloc_stat); } size_t G1ParScanThreadState::lab_waste_words() const { @@ -444,7 +444,7 @@ void G1ParScanThreadState::do_iterate_object(oop const obj, return; } - ContinuationGCSupport::transform_stack_chunk(obj); + ContinuationGCSupport::transform_stack_chunk(obj, klass); // Check for deduplicating young Strings. if (G1StringDedup::is_candidate_from_evacuation(klass, @@ -730,8 +730,8 @@ G1ParScanThreadStateSet::G1ParScanThreadStateSet(G1CollectedHeap* g1h, G1ParScanThreadStateSet::~G1ParScanThreadStateSet() { assert(_flushed, "thread local state from the per thread states should have been flushed"); - FREE_C_HEAP_ARRAY(G1ParScanThreadState*, _states); - FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_total); + FREE_C_HEAP_ARRAY(_states); + FREE_C_HEAP_ARRAY(_surviving_young_words_total); } #if TASKQUEUE_STATS diff --git a/src/hotspot/share/gc/g1/g1Policy.cpp b/src/hotspot/share/gc/g1/g1Policy.cpp index 78a533d62c0..01afb6a5c77 100644 --- a/src/hotspot/share/gc/g1/g1Policy.cpp +++ b/src/hotspot/share/gc/g1/g1Policy.cpp @@ -728,7 +728,7 @@ bool G1Policy::about_to_start_mixed_phase() const { return collector_state()->is_in_concurrent_cycle() || collector_state()->is_in_prepare_mixed_gc(); } -bool G1Policy::need_to_start_conc_mark(const char* source, size_t allocation_word_size) { +bool G1Policy::need_to_start_conc_mark(const char* source, size_t allocation_word_size) const { if (about_to_start_mixed_phase()) { return false; } @@ -1006,7 +1006,7 @@ void G1Policy::record_young_collection_end(bool concurrent_operation_is_full_mar G1IHOPControl* G1Policy::create_ihop_control(const G1OldGenAllocationTracker* old_gen_alloc_tracker, const G1Predictions* predictor) { - return new G1IHOPControl(InitiatingHeapOccupancyPercent, + return new G1IHOPControl(G1IHOP, old_gen_alloc_tracker, G1UseAdaptiveIHOP, predictor, diff --git a/src/hotspot/share/gc/g1/g1Policy.hpp b/src/hotspot/share/gc/g1/g1Policy.hpp index 5c5c2bc3572..0aa15be9cae 100644 --- a/src/hotspot/share/gc/g1/g1Policy.hpp +++ b/src/hotspot/share/gc/g1/g1Policy.hpp @@ -296,7 +296,7 @@ public: void record_young_gc_pause_start(); void record_young_gc_pause_end(bool evacuation_failed); - bool need_to_start_conc_mark(const char* source, size_t allocation_word_size); + bool need_to_start_conc_mark(const char* source, size_t allocation_word_size) const; bool concurrent_operation_is_full_mark(const char* msg, size_t allocation_word_size); diff --git a/src/hotspot/share/gc/g1/g1RegionMarkStatsCache.cpp b/src/hotspot/share/gc/g1/g1RegionMarkStatsCache.cpp index c5f55e1d20c..a9f4115df94 100644 --- a/src/hotspot/share/gc/g1/g1RegionMarkStatsCache.cpp +++ b/src/hotspot/share/gc/g1/g1RegionMarkStatsCache.cpp @@ -38,7 +38,7 @@ G1RegionMarkStatsCache::G1RegionMarkStatsCache(G1RegionMarkStats* target, uint n } G1RegionMarkStatsCache::~G1RegionMarkStatsCache() { - FREE_C_HEAP_ARRAY(G1RegionMarkStatsCacheEntry, _cache); + FREE_C_HEAP_ARRAY(_cache); } void G1RegionMarkStatsCache::add_live_words(oop obj) { diff --git a/src/hotspot/share/gc/g1/g1RegionsOnNodes.cpp b/src/hotspot/share/gc/g1/g1RegionsOnNodes.cpp index c1c0d471796..9550e57698e 100644 --- a/src/hotspot/share/gc/g1/g1RegionsOnNodes.cpp +++ b/src/hotspot/share/gc/g1/g1RegionsOnNodes.cpp @@ -32,7 +32,7 @@ G1RegionsOnNodes::G1RegionsOnNodes() : _count_per_node(nullptr), _numa(G1NUMA::n } G1RegionsOnNodes::~G1RegionsOnNodes() { - FREE_C_HEAP_ARRAY(uint, _count_per_node); + FREE_C_HEAP_ARRAY(_count_per_node); } void G1RegionsOnNodes::add(G1HeapRegion* hr) { diff --git a/src/hotspot/share/gc/g1/g1RemSet.cpp b/src/hotspot/share/gc/g1/g1RemSet.cpp index 9f9f0ecdf3a..be18a3065e9 100644 --- a/src/hotspot/share/gc/g1/g1RemSet.cpp +++ b/src/hotspot/share/gc/g1/g1RemSet.cpp @@ -124,8 +124,8 @@ class G1RemSetScanState : public CHeapObj { } ~G1DirtyRegions() { - FREE_C_HEAP_ARRAY(uint, _buffer); - FREE_C_HEAP_ARRAY(Atomic, _contains); + FREE_C_HEAP_ARRAY(_buffer); + FREE_C_HEAP_ARRAY(_contains); } void reset() { @@ -245,7 +245,7 @@ public: _scan_top(nullptr) { } ~G1RemSetScanState() { - FREE_C_HEAP_ARRAY(HeapWord*, _scan_top); + FREE_C_HEAP_ARRAY(_scan_top); } void initialize(uint max_reserved_regions) { diff --git a/src/hotspot/share/gc/g1/g1RemSetSummary.cpp b/src/hotspot/share/gc/g1/g1RemSetSummary.cpp index 3e9cf938097..1c0e15757cc 100644 --- a/src/hotspot/share/gc/g1/g1RemSetSummary.cpp +++ b/src/hotspot/share/gc/g1/g1RemSetSummary.cpp @@ -98,7 +98,7 @@ G1RemSetSummary::G1RemSetSummary(bool should_update) : } G1RemSetSummary::~G1RemSetSummary() { - FREE_C_HEAP_ARRAY(jlong, _worker_threads_cpu_times); + FREE_C_HEAP_ARRAY(_worker_threads_cpu_times); } void G1RemSetSummary::set(G1RemSetSummary* other) { diff --git a/src/hotspot/share/gc/g1/g1SurvRateGroup.cpp b/src/hotspot/share/gc/g1/g1SurvRateGroup.cpp index f858b93b13d..15c6d3d1f15 100644 --- a/src/hotspot/share/gc/g1/g1SurvRateGroup.cpp +++ b/src/hotspot/share/gc/g1/g1SurvRateGroup.cpp @@ -65,8 +65,8 @@ void G1SurvRateGroup::start_adding_regions() { void G1SurvRateGroup::stop_adding_regions() { if (_num_added_regions > _stats_arrays_length) { - _accum_surv_rate_pred = REALLOC_C_HEAP_ARRAY(double, _accum_surv_rate_pred, _num_added_regions, mtGC); - _surv_rate_predictors = REALLOC_C_HEAP_ARRAY(TruncatedSeq*, _surv_rate_predictors, _num_added_regions, mtGC); + _accum_surv_rate_pred = REALLOC_C_HEAP_ARRAY(_accum_surv_rate_pred, _num_added_regions, mtGC); + _surv_rate_predictors = REALLOC_C_HEAP_ARRAY(_surv_rate_predictors, _num_added_regions, mtGC); for (uint i = _stats_arrays_length; i < _num_added_regions; ++i) { // Initialize predictors and accumulated survivor rate predictions. diff --git a/src/hotspot/share/gc/g1/g1YoungCollector.cpp b/src/hotspot/share/gc/g1/g1YoungCollector.cpp index 9c12127c864..d26bcc23c08 100644 --- a/src/hotspot/share/gc/g1/g1YoungCollector.cpp +++ b/src/hotspot/share/gc/g1/g1YoungCollector.cpp @@ -246,8 +246,6 @@ G1YoungGCAllocationFailureInjector* G1YoungCollector::allocation_failure_injecto void G1YoungCollector::complete_root_region_scan() { Ticks start = Ticks::now(); - // We have to complete root region scan as it's the only way to ensure that all the - // objects on them have been correctly scanned before we start moving them during the GC. if (concurrent_mark()->complete_root_regions_scan_in_safepoint()) { phase_times()->record_root_region_scan_time((Ticks::now() - start).seconds() * MILLIUNITS); } @@ -1138,9 +1136,7 @@ void G1YoungCollector::collect() { // Individual parallel phases may override this. set_young_collection_default_active_worker_threads(); - // Wait for root region scan here to make sure that it is done before any - // use of the STW workers to maximize cpu use (i.e. all cores are available - // just to do that). + // Complete root region scan before moving any objects to preserve the SATB invariant. complete_root_region_scan(); G1YoungGCVerifierMark vm(this); diff --git a/src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp b/src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp index 14282383e29..11da3cb8263 100644 --- a/src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp +++ b/src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp @@ -802,7 +802,7 @@ public: for (uint worker = 0; worker < _active_workers; worker++) { _worker_stats[worker].~FreeCSetStats(); } - FREE_C_HEAP_ARRAY(FreeCSetStats, _worker_stats); + FREE_C_HEAP_ARRAY(_worker_stats); _g1h->clear_collection_set(); diff --git a/src/hotspot/share/gc/g1/g1YoungGCPreEvacuateTasks.cpp b/src/hotspot/share/gc/g1/g1YoungGCPreEvacuateTasks.cpp index 936457659b6..7889fd4fb31 100644 --- a/src/hotspot/share/gc/g1/g1YoungGCPreEvacuateTasks.cpp +++ b/src/hotspot/share/gc/g1/g1YoungGCPreEvacuateTasks.cpp @@ -73,7 +73,7 @@ public: ~JavaThreadRetireTLABs() { static_assert(std::is_trivially_destructible::value, "must be"); - FREE_C_HEAP_ARRAY(ThreadLocalAllocStats, _local_tlab_stats); + FREE_C_HEAP_ARRAY(_local_tlab_stats); } void do_work(uint worker_id) override { diff --git a/src/hotspot/share/gc/g1/g1_globals.hpp b/src/hotspot/share/gc/g1/g1_globals.hpp index b338c11d5be..14daac4800b 100644 --- a/src/hotspot/share/gc/g1/g1_globals.hpp +++ b/src/hotspot/share/gc/g1/g1_globals.hpp @@ -100,9 +100,8 @@ \ product(bool, G1UseAdaptiveIHOP, true, \ "Adaptively adjust the initiating heap occupancy from the " \ - "initial value of InitiatingHeapOccupancyPercent. The policy " \ - "attempts to start marking in time based on application " \ - "behavior.") \ + "initial value of G1IHOP. The policy attempts to start marking " \ + "in time based on application behavior.") \ \ product(size_t, G1AdaptiveIHOPNumInitialSamples, 3, EXPERIMENTAL, \ "How many completed time periods from concurrent start to first " \ @@ -110,6 +109,19 @@ "of the optimal occupancy to start marking.") \ range(1, max_intx) \ \ + product(uint, G1IHOP, 45, \ + "The Initiating Heap Occupancy Percentage (IHOP) for the " \ + "concurrent cycle. G1IHOP sets the percentage of the current " \ + "Java heap capacity occupied by the old generation at which G1 " \ + "starts this process. If G1UseAdaptiveIHOP is enabled, this " \ + "value is used as the initial threshold and may be adjusted " \ + "ergonomically by G1. " \ + "A value of 0 will result in as frequent as possible concurrent " \ + "cycles. A value of 100 disables concurrent cycles. " \ + "Fragmentation waste in the old generation is not considered " \ + "free space in this calculation.") \ + range(0, 100) \ + \ product(uint, G1ConfidencePercent, 50, \ "Confidence level for MMU/pause predictions. A higher value " \ "means that G1 will use less safety margin for its predictions.") \ @@ -316,7 +328,7 @@ product(bool, G1VerifyHeapRegionCodeRoots, false, DIAGNOSTIC, \ "Verify the code root lists attached to each heap region.") \ \ - develop(bool, G1VerifyBitmaps, false, \ + product(bool, G1VerifyBitmaps, false, DIAGNOSTIC, \ "Verifies the consistency of the marking bitmaps") \ \ product(uintx, G1PeriodicGCInterval, 0, MANAGEABLE, \ diff --git a/src/hotspot/share/gc/parallel/mutableNUMASpace.cpp b/src/hotspot/share/gc/parallel/mutableNUMASpace.cpp index c5d112ffbc1..8b514fe7199 100644 --- a/src/hotspot/share/gc/parallel/mutableNUMASpace.cpp +++ b/src/hotspot/share/gc/parallel/mutableNUMASpace.cpp @@ -55,7 +55,7 @@ MutableNUMASpace::MutableNUMASpace(size_t page_size) : MutableSpace(page_size) { lgrp_spaces()->append(new LGRPSpace(lgrp_ids[i], page_size)); } - FREE_C_HEAP_ARRAY(uint, lgrp_ids); + FREE_C_HEAP_ARRAY(lgrp_ids); } MutableNUMASpace::~MutableNUMASpace() { diff --git a/src/hotspot/share/gc/parallel/psPromotionManager.cpp b/src/hotspot/share/gc/parallel/psPromotionManager.cpp index ac22430aa4c..6a0905e82f3 100644 --- a/src/hotspot/share/gc/parallel/psPromotionManager.cpp +++ b/src/hotspot/share/gc/parallel/psPromotionManager.cpp @@ -294,7 +294,7 @@ oop PSPromotionManager::oop_promotion_failed(oop obj, markWord obj_mark) { ContinuationGCSupport::transform_stack_chunk(obj); - push_contents(obj); + push_contents(obj, obj->klass()); // Save the markWord of promotion-failed objs in _preserved_marks for later // restoration. This way we don't have to walk the young-gen to locate diff --git a/src/hotspot/share/gc/parallel/psPromotionManager.hpp b/src/hotspot/share/gc/parallel/psPromotionManager.hpp index 2b0fc56c0bf..cd59fa578d1 100644 --- a/src/hotspot/share/gc/parallel/psPromotionManager.hpp +++ b/src/hotspot/share/gc/parallel/psPromotionManager.hpp @@ -165,7 +165,7 @@ class PSPromotionManager { template inline void claim_or_forward_depth(T* p); - void push_contents(oop obj); + void push_contents(oop obj, Klass* klass); void push_contents_bounded(oop obj, HeapWord* left, HeapWord* right); }; diff --git a/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp b/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp index 68370a33a54..4b9edeb7072 100644 --- a/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp +++ b/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp @@ -121,10 +121,10 @@ inline void InstanceRefKlass::oop_oop_iterate_reverse(obj, closure); } -inline void PSPromotionManager::push_contents(oop obj) { - if (!obj->klass()->is_typeArray_klass()) { +inline void PSPromotionManager::push_contents(oop obj, Klass* klass) { + if (!klass->is_typeArray_klass()) { PSPushContentsClosure pcc(this); - obj->oop_iterate_backwards(&pcc); + obj->oop_iterate_backwards(&pcc, klass); } } @@ -292,7 +292,7 @@ inline oop PSPromotionManager::copy_unmarked_to_survivor_space(oop o, assert(young_space()->contains(new_obj), "Attempt to push non-promoted obj"); } - ContinuationGCSupport::transform_stack_chunk(new_obj); + ContinuationGCSupport::transform_stack_chunk(new_obj, klass); // Do the size comparison first with new_obj_size, which we // already have. Hopefully, only a few objects are larger than @@ -303,7 +303,7 @@ inline oop PSPromotionManager::copy_unmarked_to_survivor_space(oop o, push_objArray(o, new_obj); } else { // we'll just push its contents - push_contents(new_obj); + push_contents(new_obj, klass); if (StringDedup::is_enabled_string(klass) && psStringDedup::is_candidate_from_evacuation(new_obj, new_obj_is_tenured)) { diff --git a/src/hotspot/share/gc/serial/defNewGeneration.cpp b/src/hotspot/share/gc/serial/defNewGeneration.cpp index ec3726d1dce..0c44e7a8c14 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.cpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.cpp @@ -698,7 +698,8 @@ void DefNewGeneration::handle_promotion_failure(oop old) { oop DefNewGeneration::copy_to_survivor_space(oop old) { assert(is_in_reserved(old) && !old->is_forwarded(), "shouldn't be scavenging this oop"); - size_t s = old->size(); + Klass* klass = old->klass(); + size_t s = old->size_given_klass(klass); oop obj = nullptr; // Try allocating obj in to-space (unless too old) @@ -725,7 +726,7 @@ oop DefNewGeneration::copy_to_survivor_space(oop old) { // Copy obj Copy::aligned_disjoint_words(cast_from_oop(old), cast_from_oop(obj), s); - ContinuationGCSupport::transform_stack_chunk(obj); + ContinuationGCSupport::transform_stack_chunk(obj, klass); if (!new_obj_is_tenured) { // Increment age if obj still in new generation @@ -736,7 +737,7 @@ oop DefNewGeneration::copy_to_survivor_space(oop old) { // Done, insert forward pointer to obj in this header old->forward_to(obj); - if (SerialStringDedup::is_candidate_from_evacuation(obj, new_obj_is_tenured)) { + if (SerialStringDedup::is_candidate_from_evacuation(obj, klass, new_obj_is_tenured)) { // Record old; request adds a new weak reference, which reference // processing expects to refer to a from-space object. _string_dedup_requests.add(old); diff --git a/src/hotspot/share/gc/serial/serialStringDedup.hpp b/src/hotspot/share/gc/serial/serialStringDedup.hpp index 9d4548acf36..76af8a6f5ab 100644 --- a/src/hotspot/share/gc/serial/serialStringDedup.hpp +++ b/src/hotspot/share/gc/serial/serialStringDedup.hpp @@ -27,6 +27,8 @@ #include "memory/allStatic.hpp" #include "oops/oopsHierarchy.hpp" +class Klass; + class SerialStringDedup : AllStatic { public: @@ -37,7 +39,7 @@ public: static bool is_candidate_from_mark(oop java_string); // Candidate selection policy for young during evacuation. - static inline bool is_candidate_from_evacuation(oop obj, bool obj_is_tenured); + static inline bool is_candidate_from_evacuation(oop obj, const Klass* klass, bool obj_is_tenured); }; diff --git a/src/hotspot/share/gc/serial/serialStringDedup.inline.hpp b/src/hotspot/share/gc/serial/serialStringDedup.inline.hpp index ebf29113a0b..bc54f3b34b9 100644 --- a/src/hotspot/share/gc/serial/serialStringDedup.inline.hpp +++ b/src/hotspot/share/gc/serial/serialStringDedup.inline.hpp @@ -30,9 +30,9 @@ #include "oops/oop.inline.hpp" bool SerialStringDedup::is_candidate_from_evacuation(oop obj, + const Klass* klass, bool obj_is_tenured) { - return StringDedup::is_enabled() && - java_lang_String::is_instance(obj) && + return StringDedup::is_enabled_string(klass) && (obj_is_tenured ? StringDedup::is_below_threshold_age(obj->age()) : StringDedup::is_threshold_age(obj->age())); diff --git a/src/hotspot/share/gc/shared/bufferNode.cpp b/src/hotspot/share/gc/shared/bufferNode.cpp index 90e50f52e84..855f872afab 100644 --- a/src/hotspot/share/gc/shared/bufferNode.cpp +++ b/src/hotspot/share/gc/shared/bufferNode.cpp @@ -41,7 +41,7 @@ void* BufferNode::AllocatorConfig::allocate() { void BufferNode::AllocatorConfig::deallocate(void* node) { assert(node != nullptr, "precondition"); - FREE_C_HEAP_ARRAY(char, node); + FREE_C_HEAP_ARRAY(node); } BufferNode::Allocator::Allocator(const char* name, size_t buffer_capacity) : diff --git a/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp b/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp index a31078f7e67..97c24611de4 100644 --- a/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp +++ b/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp @@ -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 @@ -38,16 +38,6 @@ #define __ gen->lir()-> #endif -// Return true iff an access to bt is single-copy atomic. - -// The JMM requires atomicity for all accesses to fields of primitive -// types other than double and long. In practice, HotSpot assumes that -// on all processors, accesses to memory operands of wordSize and -// smaller are atomic. -static bool access_is_atomic(BasicType bt) { - return type2aelembytes(bt) <= wordSize; -} - LIR_Opr BarrierSetC1::resolve_address(LIRAccess& access, bool resolve_in_register) { DecoratorSet decorators = access.decorators(); bool is_array = (decorators & IS_ARRAY) != 0; @@ -150,7 +140,6 @@ LIR_Opr BarrierSetC1::atomic_add_at(LIRAccess& access, LIRItem& value) { void BarrierSetC1::store_at_resolved(LIRAccess& access, LIR_Opr value) { DecoratorSet decorators = access.decorators(); bool is_volatile = (decorators & MO_SEQ_CST) != 0; - bool needs_atomic = AlwaysAtomicAccesses && !access_is_atomic(value->type()); bool needs_patching = (decorators & C1_NEEDS_PATCHING) != 0; bool mask_boolean = (decorators & C1_MASK_BOOLEAN) != 0; LIRGenerator* gen = access.gen(); @@ -164,7 +153,7 @@ void BarrierSetC1::store_at_resolved(LIRAccess& access, LIR_Opr value) { } LIR_PatchCode patch_code = needs_patching ? lir_patch_normal : lir_patch_none; - if ((is_volatile || needs_atomic) && !needs_patching) { + if (is_volatile && !needs_patching) { gen->volatile_field_store(value, access.resolved_addr()->as_address_ptr(), access.access_emit_info()); } else { __ store(value, access.resolved_addr()->as_address_ptr(), access.access_emit_info(), patch_code); @@ -179,10 +168,10 @@ void BarrierSetC1::load_at_resolved(LIRAccess& access, LIR_Opr result) { LIRGenerator *gen = access.gen(); DecoratorSet decorators = access.decorators(); bool is_volatile = (decorators & MO_SEQ_CST) != 0; - bool needs_atomic = AlwaysAtomicAccesses && !access_is_atomic(result->type()); bool needs_patching = (decorators & C1_NEEDS_PATCHING) != 0; bool mask_boolean = (decorators & C1_MASK_BOOLEAN) != 0; bool in_native = (decorators & IN_NATIVE) != 0; + bool needs_trailing_membar = is_volatile; if (support_IRIW_for_not_multiple_copy_atomic_cpu && is_volatile) { __ membar(); @@ -191,13 +180,16 @@ void BarrierSetC1::load_at_resolved(LIRAccess& access, LIR_Opr result) { LIR_PatchCode patch_code = needs_patching ? lir_patch_normal : lir_patch_none; if (in_native) { __ move_wide(access.resolved_addr()->as_address_ptr(), result); - } else if ((is_volatile || needs_atomic) && !needs_patching) { + } else if (is_volatile && !needs_patching) { + // volatile_field_load provides trailing membar semantics. + // Hence separate trailing membar is not needed. + needs_trailing_membar = false; gen->volatile_field_load(access.resolved_addr()->as_address_ptr(), result, access.access_emit_info()); } else { __ load(access.resolved_addr()->as_address_ptr(), result, access.access_emit_info(), patch_code); } - if (is_volatile) { + if (needs_trailing_membar) { __ membar_acquire(); } diff --git a/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp b/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp index afe7d2acfa7..239cce16aa3 100644 --- a/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp +++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp @@ -395,17 +395,11 @@ MemNode::MemOrd C2Access::mem_node_mo() const { void C2Access::fixup_decorators() { bool default_mo = (_decorators & MO_DECORATOR_MASK) == 0; - bool is_unordered = (_decorators & MO_UNORDERED) != 0 || default_mo; bool anonymous = (_decorators & C2_UNSAFE_ACCESS) != 0; bool is_read = (_decorators & C2_READ_ACCESS) != 0; bool is_write = (_decorators & C2_WRITE_ACCESS) != 0; - if (AlwaysAtomicAccesses && is_unordered) { - _decorators &= ~MO_DECORATOR_MASK; // clear the MO bits - _decorators |= MO_RELAXED; // Force the MO_RELAXED decorator with AlwaysAtomicAccess - } - _decorators = AccessInternal::decorator_fixup(_decorators, _type); if (is_read && !is_write && anonymous) { diff --git a/src/hotspot/share/gc/shared/c2/cardTableBarrierSetC2.cpp b/src/hotspot/share/gc/shared/c2/cardTableBarrierSetC2.cpp index f7445ff254f..381a9f65295 100644 --- a/src/hotspot/share/gc/shared/c2/cardTableBarrierSetC2.cpp +++ b/src/hotspot/share/gc/shared/c2/cardTableBarrierSetC2.cpp @@ -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 @@ -126,7 +126,7 @@ Node* CardTableBarrierSetC2::byte_map_base_node(IdealKit* kit) const { #endif CardTable::CardValue* card_table_base = ci_card_table_address_const(); if (card_table_base != nullptr) { - return kit->makecon(TypeRawPtr::make((address)card_table_base)); + return kit->makecon(TypeRawPtr::make((address)card_table_base, relocInfo::none)); } else { return kit->makecon(Type::get_zero_type(T_ADDRESS)); } diff --git a/src/hotspot/share/gc/shared/classUnloadingContext.cpp b/src/hotspot/share/gc/shared/classUnloadingContext.cpp index 4eac2561e67..d2b4a2fc636 100644 --- a/src/hotspot/share/gc/shared/classUnloadingContext.cpp +++ b/src/hotspot/share/gc/shared/classUnloadingContext.cpp @@ -54,7 +54,7 @@ ClassUnloadingContext::~ClassUnloadingContext() { for (uint i = 0; i < _num_nmethod_unlink_workers; ++i) { delete _unlinked_nmethods[i]; } - FREE_C_HEAP_ARRAY(NMethodSet*, _unlinked_nmethods); + FREE_C_HEAP_ARRAY(_unlinked_nmethods); assert(_context == this, "context not set correctly"); _context = nullptr; diff --git a/src/hotspot/share/gc/shared/collectorCounters.cpp b/src/hotspot/share/gc/shared/collectorCounters.cpp index f01997f9854..1624c693470 100644 --- a/src/hotspot/share/gc/shared/collectorCounters.cpp +++ b/src/hotspot/share/gc/shared/collectorCounters.cpp @@ -62,7 +62,7 @@ CollectorCounters::CollectorCounters(const char* name, int ordinal) { } CollectorCounters::~CollectorCounters() { - FREE_C_HEAP_ARRAY(char, _name_space); + FREE_C_HEAP_ARRAY(_name_space); } TraceCollectorStats::TraceCollectorStats(CollectorCounters* c) : diff --git a/src/hotspot/share/gc/shared/continuationGCSupport.hpp b/src/hotspot/share/gc/shared/continuationGCSupport.hpp index dda983e0bd8..8aa0245201d 100644 --- a/src/hotspot/share/gc/shared/continuationGCSupport.hpp +++ b/src/hotspot/share/gc/shared/continuationGCSupport.hpp @@ -28,6 +28,8 @@ #include "memory/allStatic.hpp" #include "oops/oopsHierarchy.hpp" +class Klass; + class ContinuationGCSupport : public AllStatic { public: // Relativize the given oop if it is a stack chunk. @@ -35,6 +37,7 @@ public: // Relativize and transform to use a bitmap for future oop iteration for the // given oop if it is a stack chunk. static void transform_stack_chunk(oop obj); + static void transform_stack_chunk(oop obj, Klass* klass); }; #endif // SHARE_GC_SHARED_CONTINUATIONGCSUPPORT_HPP diff --git a/src/hotspot/share/gc/shared/continuationGCSupport.inline.hpp b/src/hotspot/share/gc/shared/continuationGCSupport.inline.hpp index 72a828b7396..321ef51f9ae 100644 --- a/src/hotspot/share/gc/shared/continuationGCSupport.inline.hpp +++ b/src/hotspot/share/gc/shared/continuationGCSupport.inline.hpp @@ -43,7 +43,11 @@ inline bool ContinuationGCSupport::relativize_stack_chunk(oop obj) { } inline void ContinuationGCSupport::transform_stack_chunk(oop obj) { - if (!obj->is_stackChunk()) { + transform_stack_chunk(obj, obj->klass()); +} + +inline void ContinuationGCSupport::transform_stack_chunk(oop obj, Klass* klass) { + if (!klass->is_stack_chunk_instance_klass()) { return; } diff --git a/src/hotspot/share/gc/shared/gcArguments.cpp b/src/hotspot/share/gc/shared/gcArguments.cpp index 424427c12b6..ec3d758c00a 100644 --- a/src/hotspot/share/gc/shared/gcArguments.cpp +++ b/src/hotspot/share/gc/shared/gcArguments.cpp @@ -25,10 +25,12 @@ #include "gc/shared/cardTable.hpp" #include "gc/shared/gcArguments.hpp" +#include "gc/shared/genArguments.hpp" #include "logging/log.hpp" #include "runtime/arguments.hpp" #include "runtime/globals.hpp" #include "runtime/globals_extension.hpp" +#include "runtime/os.hpp" #include "utilities/formatBuffer.hpp" #include "utilities/macros.hpp" @@ -56,6 +58,141 @@ void GCArguments::initialize() { } } +size_t GCArguments::limit_heap_by_allocatable_memory(size_t limit) { + // Limits the given heap size by the maximum amount of virtual + // memory this process is currently allowed to use. It also takes + // the virtual-to-physical ratio of the current GC into account. + size_t fraction = MaxVirtMemFraction * heap_virtual_to_physical_ratio(); + size_t max_allocatable = os::commit_memory_limit(); + + return MIN2(limit, max_allocatable / fraction); +} + +// Use static initialization to get the default before parsing +static const size_t DefaultHeapBaseMinAddress = HeapBaseMinAddress; + +static size_t clamp_by_size_t_max(uint64_t value) { + return (size_t)MIN2(value, (uint64_t)std::numeric_limits::max()); +} + +void GCArguments::set_heap_size() { + // Check if the user has configured any limit on the amount of RAM we may use. + bool has_ram_limit = !FLAG_IS_DEFAULT(MaxRAMPercentage) || + !FLAG_IS_DEFAULT(MinRAMPercentage) || + !FLAG_IS_DEFAULT(InitialRAMPercentage); + + const physical_memory_size_type avail_mem = os::physical_memory(); + + // If the maximum heap size has not been set with -Xmx, then set it as + // fraction of the size of physical memory, respecting the maximum and + // minimum sizes of the heap. + if (FLAG_IS_DEFAULT(MaxHeapSize)) { + uint64_t min_memory = (uint64_t)(((double)avail_mem * MinRAMPercentage) / 100); + uint64_t max_memory = (uint64_t)(((double)avail_mem * MaxRAMPercentage) / 100); + + const size_t reasonable_min = clamp_by_size_t_max(min_memory); + size_t reasonable_max = clamp_by_size_t_max(max_memory); + + if (reasonable_min < MaxHeapSize) { + // Small physical memory, so use a minimum fraction of it for the heap + reasonable_max = reasonable_min; + } else { + // Not-small physical memory, so require a heap at least + // as large as MaxHeapSize + reasonable_max = MAX2(reasonable_max, MaxHeapSize); + } + + if (!FLAG_IS_DEFAULT(ErgoHeapSizeLimit) && ErgoHeapSizeLimit != 0) { + // Limit the heap size to ErgoHeapSizeLimit + reasonable_max = MIN2(reasonable_max, ErgoHeapSizeLimit); + } + + reasonable_max = limit_heap_by_allocatable_memory(reasonable_max); + + if (!FLAG_IS_DEFAULT(InitialHeapSize)) { + // An initial heap size was specified on the command line, + // so be sure that the maximum size is consistent. Done + // after call to limit_heap_by_allocatable_memory because that + // method might reduce the allocation size. + reasonable_max = MAX2(reasonable_max, InitialHeapSize); + } else if (!FLAG_IS_DEFAULT(MinHeapSize)) { + reasonable_max = MAX2(reasonable_max, MinHeapSize); + } + +#ifdef _LP64 + if (UseCompressedOops) { + // HeapBaseMinAddress can be greater than default but not less than. + if (!FLAG_IS_DEFAULT(HeapBaseMinAddress)) { + if (HeapBaseMinAddress < DefaultHeapBaseMinAddress) { + // matches compressed oops printing flags + log_debug(gc, heap, coops)("HeapBaseMinAddress must be at least %zu " + "(%zuG) which is greater than value given %zu", + DefaultHeapBaseMinAddress, + DefaultHeapBaseMinAddress/G, + HeapBaseMinAddress); + FLAG_SET_ERGO(HeapBaseMinAddress, DefaultHeapBaseMinAddress); + } + } + + uintptr_t heap_end = HeapBaseMinAddress + MaxHeapSize; + uintptr_t max_coop_heap = Arguments::max_heap_for_compressed_oops(); + + // Limit the heap size to the maximum possible when using compressed oops + if (heap_end < max_coop_heap) { + // Heap should be above HeapBaseMinAddress to get zero based compressed + // oops but it should be not less than default MaxHeapSize. + max_coop_heap -= HeapBaseMinAddress; + } + + // If the user has configured any limit on the amount of RAM we may use, + // then disable compressed oops if the calculated max exceeds max_coop_heap + // and UseCompressedOops was not specified. + if (reasonable_max > max_coop_heap) { + if (FLAG_IS_ERGO(UseCompressedOops) && has_ram_limit) { + log_debug(gc, heap, coops)("UseCompressedOops disabled due to " + "max heap %zu > compressed oop heap %zu. " + "Please check the setting of MaxRAMPercentage %5.2f.", + reasonable_max, (size_t)max_coop_heap, MaxRAMPercentage); + FLAG_SET_ERGO(UseCompressedOops, false); + } else { + reasonable_max = max_coop_heap; + } + } + } +#endif // _LP64 + + log_trace(gc, heap)(" Maximum heap size %zu", reasonable_max); + FLAG_SET_ERGO(MaxHeapSize, reasonable_max); + } + + // If the minimum or initial heap_size have not been set or requested to be set + // ergonomically, set them accordingly. + if (InitialHeapSize == 0 || MinHeapSize == 0) { + size_t reasonable_minimum = clamp_by_size_t_max((uint64_t)OldSize + (uint64_t)NewSize); + reasonable_minimum = MIN2(reasonable_minimum, MaxHeapSize); + reasonable_minimum = limit_heap_by_allocatable_memory(reasonable_minimum); + + if (InitialHeapSize == 0) { + uint64_t initial_memory = (uint64_t)(((double)avail_mem * InitialRAMPercentage) / 100); + size_t reasonable_initial = clamp_by_size_t_max(initial_memory); + reasonable_initial = limit_heap_by_allocatable_memory(reasonable_initial); + + reasonable_initial = MAX3(reasonable_initial, reasonable_minimum, MinHeapSize); + reasonable_initial = MIN2(reasonable_initial, MaxHeapSize); + + FLAG_SET_ERGO(InitialHeapSize, (size_t)reasonable_initial); + log_trace(gc, heap)(" Initial heap size %zu", InitialHeapSize); + } + + // If the minimum heap size has not been set (via -Xms or -XX:MinHeapSize), + // synchronize with InitialHeapSize to avoid errors with the default value. + if (MinHeapSize == 0) { + FLAG_SET_ERGO(MinHeapSize, MIN2(reasonable_minimum, InitialHeapSize)); + log_trace(gc, heap)(" Minimum heap size %zu", MinHeapSize); + } + } +} + void GCArguments::initialize_heap_sizes() { initialize_alignments(); initialize_heap_flags_and_sizes(); diff --git a/src/hotspot/share/gc/shared/gcArguments.hpp b/src/hotspot/share/gc/shared/gcArguments.hpp index 7e9fffedaba..6f44fc420aa 100644 --- a/src/hotspot/share/gc/shared/gcArguments.hpp +++ b/src/hotspot/share/gc/shared/gcArguments.hpp @@ -40,10 +40,13 @@ protected: virtual void initialize_heap_flags_and_sizes(); virtual void initialize_size_info(); + size_t limit_heap_by_allocatable_memory(size_t size); + DEBUG_ONLY(void assert_flags();) DEBUG_ONLY(void assert_size_info();) public: + virtual void set_heap_size(); virtual void initialize(); // Return the (conservative) maximum heap alignment diff --git a/src/hotspot/share/gc/shared/gc_globals.hpp b/src/hotspot/share/gc/shared/gc_globals.hpp index c9102944197..1ff6fd493a7 100644 --- a/src/hotspot/share/gc/shared/gc_globals.hpp +++ b/src/hotspot/share/gc/shared/gc_globals.hpp @@ -262,10 +262,6 @@ "and ObjArrayMarkingStride.") \ constraint(ArrayMarkingMinStrideConstraintFunc,AfterErgo) \ \ - product(bool, AggressiveHeap, false, \ - "(Deprecated) Optimize heap options for long-running memory " \ - "intensive apps") \ - \ product(size_t, ErgoHeapSizeLimit, 0, \ "Maximum ergonomically set heap size (in bytes); zero means use " \ "(System RAM) * MaxRAMPercentage / 100") \ diff --git a/src/hotspot/share/gc/shared/generationCounters.cpp b/src/hotspot/share/gc/shared/generationCounters.cpp index f6bbc1c2618..85da4c99cbb 100644 --- a/src/hotspot/share/gc/shared/generationCounters.cpp +++ b/src/hotspot/share/gc/shared/generationCounters.cpp @@ -64,7 +64,7 @@ GenerationCounters::GenerationCounters(const char* name, } GenerationCounters::~GenerationCounters() { - FREE_C_HEAP_ARRAY(char, _name_space); + FREE_C_HEAP_ARRAY(_name_space); } void GenerationCounters::update_capacity(size_t curr_capacity) { diff --git a/src/hotspot/share/gc/shared/hSpaceCounters.cpp b/src/hotspot/share/gc/shared/hSpaceCounters.cpp index a873bc2f45c..5dd9d5bfaa8 100644 --- a/src/hotspot/share/gc/shared/hSpaceCounters.cpp +++ b/src/hotspot/share/gc/shared/hSpaceCounters.cpp @@ -66,7 +66,7 @@ HSpaceCounters::HSpaceCounters(const char* name_space, } HSpaceCounters::~HSpaceCounters() { - FREE_C_HEAP_ARRAY(char, _name_space); + FREE_C_HEAP_ARRAY(_name_space); } void HSpaceCounters::update_capacity(size_t v) { diff --git a/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp b/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp index 4d7ffce3a5d..096bee9e4a0 100644 --- a/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp +++ b/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp @@ -283,7 +283,7 @@ JVMFlag::Error SoftMaxHeapSizeConstraintFunc(size_t value, bool verbose) { } JVMFlag::Error HeapBaseMinAddressConstraintFunc(size_t value, bool verbose) { - // If an overflow happened in Arguments::set_heap_size(), MaxHeapSize will have too large a value. + // If an overflow happened in GCArguments::set_heap_size(), MaxHeapSize will have too large a value. // Check for this by ensuring that MaxHeapSize plus the requested min base address still fit within max_uintx. if (value > (max_uintx - MaxHeapSize)) { JVMFlag::printError(verbose, diff --git a/src/hotspot/share/gc/shared/oopStorage.cpp b/src/hotspot/share/gc/shared/oopStorage.cpp index 21e63f6fc32..8aea565cdf7 100644 --- a/src/hotspot/share/gc/shared/oopStorage.cpp +++ b/src/hotspot/share/gc/shared/oopStorage.cpp @@ -136,7 +136,7 @@ OopStorage::ActiveArray* OopStorage::ActiveArray::create(size_t size, void OopStorage::ActiveArray::destroy(ActiveArray* ba) { ba->~ActiveArray(); - FREE_C_HEAP_ARRAY(char, ba); + FREE_C_HEAP_ARRAY(ba); } size_t OopStorage::ActiveArray::size() const { @@ -362,7 +362,7 @@ OopStorage::Block* OopStorage::Block::new_block(const OopStorage* owner) { void OopStorage::Block::delete_block(const Block& block) { void* memory = block._memory; block.Block::~Block(); - FREE_C_HEAP_ARRAY(char, memory); + FREE_C_HEAP_ARRAY(memory); } // This can return a false positive if ptr is not contained by some diff --git a/src/hotspot/share/gc/shared/partialArrayState.cpp b/src/hotspot/share/gc/shared/partialArrayState.cpp index d3b21c2fdaa..4679ac2f51c 100644 --- a/src/hotspot/share/gc/shared/partialArrayState.cpp +++ b/src/hotspot/share/gc/shared/partialArrayState.cpp @@ -114,7 +114,7 @@ PartialArrayStateManager::PartialArrayStateManager(uint max_allocators) PartialArrayStateManager::~PartialArrayStateManager() { reset(); - FREE_C_HEAP_ARRAY(Arena, _arenas); + FREE_C_HEAP_ARRAY(_arenas); } Arena* PartialArrayStateManager::register_allocator() { diff --git a/src/hotspot/share/gc/shared/preservedMarks.cpp b/src/hotspot/share/gc/shared/preservedMarks.cpp index 605b7afe072..6a69fe10f95 100644 --- a/src/hotspot/share/gc/shared/preservedMarks.cpp +++ b/src/hotspot/share/gc/shared/preservedMarks.cpp @@ -148,7 +148,7 @@ void PreservedMarksSet::reclaim() { } if (_in_c_heap) { - FREE_C_HEAP_ARRAY(Padded, _stacks); + FREE_C_HEAP_ARRAY(_stacks); } else { // the array was resource-allocated, so nothing to do } diff --git a/src/hotspot/share/gc/shared/referencePolicy.cpp b/src/hotspot/share/gc/shared/referencePolicy.cpp index d1867291479..6c5f459ebb4 100644 --- a/src/hotspot/share/gc/shared/referencePolicy.cpp +++ b/src/hotspot/share/gc/shared/referencePolicy.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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,21 +28,17 @@ #include "gc/shared/referencePolicy.hpp" #include "memory/universe.hpp" #include "runtime/globals.hpp" +#include "utilities/integerCast.hpp" -LRUCurrentHeapPolicy::LRUCurrentHeapPolicy() { - setup(); -} - -// Capture state (of-the-VM) information needed to evaluate the policy -void LRUCurrentHeapPolicy::setup() { - _max_interval = (Universe::heap()->free_at_last_gc() / M) * SoftRefLRUPolicyMSPerMB; - assert(_max_interval >= 0,"Sanity check"); +void AbstractLRUReferencePolicy::set_max_interval(jlong max_interval) { + assert(max_interval >= 0, "Sanity check"); + _max_interval = max_interval; } // The oop passed in is the SoftReference object, and not // the object the SoftReference points to. -bool LRUCurrentHeapPolicy::should_clear_reference(oop p, - jlong timestamp_clock) { +bool AbstractLRUReferencePolicy::should_clear_reference(oop p, jlong timestamp_clock) { + assert(_max_interval >= 0, "Forgot to call setup"); jlong interval = timestamp_clock - java_lang_ref_SoftReference::timestamp(p); assert(interval >= 0, "Sanity check"); @@ -54,10 +50,9 @@ bool LRUCurrentHeapPolicy::should_clear_reference(oop p, return true; } -/////////////////////// MaxHeap ////////////////////// - -LRUMaxHeapPolicy::LRUMaxHeapPolicy() { - setup(); +// Capture state (of-the-VM) information needed to evaluate the policy +void LRUCurrentHeapPolicy::setup() { + set_max_interval(integer_cast(Universe::heap()->free_at_last_gc() / M) * SoftRefLRUPolicyMSPerMB); } // Capture state (of-the-VM) information needed to evaluate the policy @@ -66,21 +61,5 @@ void LRUMaxHeapPolicy::setup() { max_heap -= Universe::heap()->used_at_last_gc(); max_heap /= M; - _max_interval = max_heap * SoftRefLRUPolicyMSPerMB; - assert(_max_interval >= 0,"Sanity check"); -} - -// The oop passed in is the SoftReference object, and not -// the object the SoftReference points to. -bool LRUMaxHeapPolicy::should_clear_reference(oop p, - jlong timestamp_clock) { - jlong interval = timestamp_clock - java_lang_ref_SoftReference::timestamp(p); - assert(interval >= 0, "Sanity check"); - - // The interval will be zero if the ref was accessed since the last scavenge/gc. - if(interval <= _max_interval) { - return false; - } - - return true; + set_max_interval(integer_cast(max_heap) * SoftRefLRUPolicyMSPerMB); } diff --git a/src/hotspot/share/gc/shared/referencePolicy.hpp b/src/hotspot/share/gc/shared/referencePolicy.hpp index cf0382b036b..0fd918fa723 100644 --- a/src/hotspot/share/gc/shared/referencePolicy.hpp +++ b/src/hotspot/share/gc/shared/referencePolicy.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -56,28 +56,28 @@ class AlwaysClearPolicy : public ReferencePolicy { } }; -class LRUCurrentHeapPolicy : public ReferencePolicy { +class AbstractLRUReferencePolicy : public ReferencePolicy { private: - jlong _max_interval; + jlong _max_interval = -1; + + protected: + void set_max_interval(jlong max_interval); public: - LRUCurrentHeapPolicy(); - - // Capture state (of-the-VM) information needed to evaluate the policy - void setup(); - virtual bool should_clear_reference(oop p, jlong timestamp_clock); + bool should_clear_reference(oop p, jlong timestamp_clock) final; + void setup() override = 0; }; -class LRUMaxHeapPolicy : public ReferencePolicy { - private: - jlong _max_interval; - +class LRUCurrentHeapPolicy : public AbstractLRUReferencePolicy { public: - LRUMaxHeapPolicy(); - // Capture state (of-the-VM) information needed to evaluate the policy - void setup(); - virtual bool should_clear_reference(oop p, jlong timestamp_clock); + void setup() final; +}; + +class LRUMaxHeapPolicy : public AbstractLRUReferencePolicy { + public: + // Capture state (of-the-VM) information needed to evaluate the policy + void setup() final; }; #endif // SHARE_GC_SHARED_REFERENCEPOLICY_HPP diff --git a/src/hotspot/share/gc/shared/stringdedup/stringDedup.cpp b/src/hotspot/share/gc/shared/stringdedup/stringDedup.cpp index b3f96da1cce..ab1b15b0447 100644 --- a/src/hotspot/share/gc/shared/stringdedup/stringDedup.cpp +++ b/src/hotspot/share/gc/shared/stringdedup/stringDedup.cpp @@ -182,7 +182,7 @@ void StringDedup::Requests::flush() { assert(_storage_for_requests != nullptr, "invariant"); _storage_for_requests->storage()->release(_buffer, _index); } - FREE_C_HEAP_ARRAY(oop*, _buffer); + FREE_C_HEAP_ARRAY(_buffer); _buffer = nullptr; } if (_storage_for_requests != nullptr) { diff --git a/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp b/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp index a376f3b96de..546efa4774b 100644 --- a/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp +++ b/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp @@ -455,7 +455,7 @@ void StringDedup::Table::free_buckets(Bucket* buckets, size_t number_of_buckets) while (number_of_buckets > 0) { buckets[--number_of_buckets].~Bucket(); } - FREE_C_HEAP_ARRAY(Bucket, buckets); + FREE_C_HEAP_ARRAY(buckets); } // Compute the hash code for obj using halfsiphash_32. As this is a high diff --git a/src/hotspot/share/gc/shared/taskqueue.inline.hpp b/src/hotspot/share/gc/shared/taskqueue.inline.hpp index b142aadc580..c942b6cc3e9 100644 --- a/src/hotspot/share/gc/shared/taskqueue.inline.hpp +++ b/src/hotspot/share/gc/shared/taskqueue.inline.hpp @@ -48,7 +48,7 @@ inline GenericTaskQueueSet::GenericTaskQueueSet(uint n) : _n(n) { template inline GenericTaskQueueSet::~GenericTaskQueueSet() { - FREE_C_HEAP_ARRAY(T*, _queues); + FREE_C_HEAP_ARRAY(_queues); } #if TASKQUEUE_STATS diff --git a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp index f9b8694eb04..59d7befb32d 100644 --- a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp +++ b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp @@ -58,7 +58,11 @@ ThreadLocalAllocBuffer::ThreadLocalAllocBuffer() : // do nothing. TLABs must be inited by initialize() calls } -size_t ThreadLocalAllocBuffer::initial_refill_waste_limit() { return desired_size() / TLABRefillWasteFraction; } +size_t ThreadLocalAllocBuffer::initial_refill_waste_limit() { + assert(TLABRefillWasteFraction != 0, "inv"); + return desired_size() / TLABRefillWasteFraction; +} + size_t ThreadLocalAllocBuffer::min_size() { return align_object_size(MinTLABSize / HeapWordSize) + alignment_reserve(); } size_t ThreadLocalAllocBuffer::refill_waste_limit_increment() { return TLABWasteIncrement; } diff --git a/src/hotspot/share/gc/shared/workerDataArray.inline.hpp b/src/hotspot/share/gc/shared/workerDataArray.inline.hpp index 34549bc079e..3b7658ec4c8 100644 --- a/src/hotspot/share/gc/shared/workerDataArray.inline.hpp +++ b/src/hotspot/share/gc/shared/workerDataArray.inline.hpp @@ -72,7 +72,7 @@ WorkerDataArray::~WorkerDataArray() { for (uint i = 0; i < MaxThreadWorkItems; i++) { delete _thread_work_items[i]; } - FREE_C_HEAP_ARRAY(T, _data); + FREE_C_HEAP_ARRAY(_data); } template diff --git a/src/hotspot/share/gc/shared/workerThread.cpp b/src/hotspot/share/gc/shared/workerThread.cpp index 2738c98e5c3..35749452c85 100644 --- a/src/hotspot/share/gc/shared/workerThread.cpp +++ b/src/hotspot/share/gc/shared/workerThread.cpp @@ -39,6 +39,8 @@ WorkerTaskDispatcher::WorkerTaskDispatcher() : _end_semaphore() {} void WorkerTaskDispatcher::coordinator_distribute_task(WorkerTask* task, uint num_workers) { + guarantee(num_workers > 0, "must use at least one worker, deadlocks otherwise"); + // No workers are allowed to read the state variables until they have been signaled. _task = task; _not_finished.store_relaxed(num_workers); @@ -129,9 +131,9 @@ WorkerThread* WorkerThreads::create_worker(uint name_suffix) { } uint WorkerThreads::set_active_workers(uint num_workers) { - assert(num_workers > 0 && num_workers <= _max_workers, - "Invalid number of active workers %u (should be 1-%u)", - num_workers, _max_workers); + guarantee(num_workers > 0 && num_workers <= _max_workers, + "Invalid number of active workers %u (should be 1-%u)", + num_workers, _max_workers); while (_created_workers < num_workers) { WorkerThread* const worker = create_worker(_created_workers); diff --git a/src/hotspot/share/gc/shared/workerUtils.cpp b/src/hotspot/share/gc/shared/workerUtils.cpp index 1826b9d7df8..736a9b007dd 100644 --- a/src/hotspot/share/gc/shared/workerUtils.cpp +++ b/src/hotspot/share/gc/shared/workerUtils.cpp @@ -122,7 +122,7 @@ bool SubTasksDone::try_claim_task(uint t) { SubTasksDone::~SubTasksDone() { assert(_verification_done.load_relaxed(), "all_tasks_claimed must have been called."); - FREE_C_HEAP_ARRAY(Atomic, _tasks); + FREE_C_HEAP_ARRAY(_tasks); } // *** SequentialSubTasksDone diff --git a/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp b/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp index ad1dca47503..637ed6e6407 100644 --- a/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp +++ b/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp @@ -133,7 +133,6 @@ LIR_Opr ShenandoahBarrierSetC1::load_reference_barrier_impl(LIRGenerator* gen, L addr = ensure_in_register(gen, addr, T_ADDRESS); assert(addr->is_register(), "must be a register at this point"); LIR_Opr result = gen->result_register_for(obj->value_type()); - __ move(obj, result); LIR_Opr tmp1 = gen->new_register(T_ADDRESS); LIR_Opr tmp2 = gen->new_register(T_ADDRESS); @@ -164,6 +163,11 @@ LIR_Opr ShenandoahBarrierSetC1::load_reference_barrier_impl(LIRGenerator* gen, L CodeStub* slow = new ShenandoahLoadReferenceBarrierStub(obj, addr, result, tmp1, tmp2, decorators); __ branch(lir_cond_notEqual, slow); + + // No barrier is needed, move obj to result now. + __ move(obj, result); + + // Slow-path re-enters here with result set. __ branch_destination(slow->continuation()); return result; @@ -199,7 +203,7 @@ void ShenandoahBarrierSetC1::store_at_resolved(LIRAccess& access, LIR_Opr value) bool precise = is_array || on_anonymous; LIR_Opr post_addr = precise ? access.resolved_addr() : access.base().opr(); - post_barrier(access, post_addr, value); + post_barrier(access, post_addr); } } @@ -314,7 +318,7 @@ bool ShenandoahBarrierSetC1::generate_c1_runtime_stubs(BufferBlob* buffer_blob) return true; } -void ShenandoahBarrierSetC1::post_barrier(LIRAccess& access, LIR_Opr addr, LIR_Opr new_val) { +void ShenandoahBarrierSetC1::post_barrier(LIRAccess& access, LIR_Opr addr) { assert(ShenandoahCardBarrier, "Should have been checked by caller"); DecoratorSet decorators = access.decorators(); @@ -368,3 +372,71 @@ void ShenandoahBarrierSetC1::post_barrier(LIRAccess& access, LIR_Opr addr, LIR_O __ move(dirty, card_addr); } } + +LIR_Opr ShenandoahBarrierSetC1::atomic_cmpxchg_at_resolved(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value) { + if (!access.is_oop()) { + return BarrierSetC1::atomic_cmpxchg_at_resolved(access, cmp_value, new_value); + } + + LIRGenerator* gen = access.gen(); + + LIR_Opr tmp = gen->new_register(T_OBJECT); + LIR_Opr addr = access.resolved_addr(); + + // Handle the previous value through SATB, as we are about to perform the store. + __ load(addr->as_address_ptr(), tmp); + if (ShenandoahSATBBarrier) { + pre_barrier(gen, access.access_emit_info(), access.decorators(), + /* addr_opr (unused) = */ LIR_OprFact::illegalOpr, + /* pre_val = */ tmp); + } + + // Perform LRB on location to fix it up for this and all following accesses. + // This guarantees there are no false negatives due to concurrent evacuation, + // and the value loaded later by CAS is sanitized by some LRB, or is null. + if (ShenandoahLoadRefBarrier) { + load_reference_barrier(gen, /* obj = */ tmp, /* addr = */ addr, access.decorators()); + } + + LIR_Opr result = BarrierSetC1::atomic_cmpxchg_at_resolved(access, cmp_value, new_value); + + if (ShenandoahCardBarrier) { + post_barrier(access, /* addr = */ addr); + } + + return result; +} + +LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value) { + if (!access.is_oop()) { + return BarrierSetC1::atomic_xchg_at_resolved(access, value); + } + + LIRGenerator* gen = access.gen(); + + LIR_Opr tmp = gen->new_register(T_OBJECT); + LIR_Opr addr = access.resolved_addr(); + + // Handle the previous value through SATB, as we are about to perform the store. + __ load(addr->as_address_ptr(), tmp); + if (ShenandoahSATBBarrier) { + pre_barrier(gen, access.access_emit_info(), access.decorators(), + /* addr_opr (unused) = */ LIR_OprFact::illegalOpr, + /* pre_val = */ tmp); + } + + // Perform LRB on location to fix it up for this and all following accesses. + // This is purely opportunistic: we would not have any false negatives here. + // This guarantees the value loaded later by XCHG is sanitized by some LRB, or is null. + if (ShenandoahLoadRefBarrier) { + load_reference_barrier(gen, /* obj = */ tmp, /* addr = */ addr, access.decorators()); + } + + LIR_Opr result = BarrierSetC1::atomic_xchg_at_resolved(access, value); + + if (ShenandoahCardBarrier) { + post_barrier(access, /* addr = */ addr); + } + + return result; +} diff --git a/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.hpp b/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.hpp index 1b4f2c79bd2..413777a61ee 100644 --- a/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.hpp +++ b/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.hpp @@ -127,6 +127,7 @@ public: visitor->do_input(_addr); visitor->do_temp(_addr); visitor->do_temp(_result); + visitor->do_output(_result); visitor->do_temp(_tmp1); visitor->do_temp(_tmp2); } @@ -135,61 +136,6 @@ public: #endif // PRODUCT }; -class LIR_OpShenandoahCompareAndSwap : public LIR_Op { - friend class LIR_OpVisitState; - -private: - LIR_Opr _addr; - LIR_Opr _cmp_value; - LIR_Opr _new_value; - LIR_Opr _tmp1; - LIR_Opr _tmp2; - -public: - LIR_OpShenandoahCompareAndSwap(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value, - LIR_Opr t1, LIR_Opr t2, LIR_Opr result) - : LIR_Op(lir_none, result, nullptr) // no info - , _addr(addr) - , _cmp_value(cmp_value) - , _new_value(new_value) - , _tmp1(t1) - , _tmp2(t2) { } - - LIR_Opr addr() const { return _addr; } - LIR_Opr cmp_value() const { return _cmp_value; } - LIR_Opr new_value() const { return _new_value; } - LIR_Opr tmp1() const { return _tmp1; } - LIR_Opr tmp2() const { return _tmp2; } - - virtual void visit(LIR_OpVisitState* state) { - if (_info) state->do_info(_info); - assert(_addr->is_valid(), "used"); state->do_input(_addr); - state->do_temp(_addr); - assert(_cmp_value->is_valid(), "used"); state->do_input(_cmp_value); - state->do_temp(_cmp_value); - assert(_new_value->is_valid(), "used"); state->do_input(_new_value); - state->do_temp(_new_value); - if (_tmp1->is_valid()) state->do_temp(_tmp1); - if (_tmp2->is_valid()) state->do_temp(_tmp2); - if (_result->is_valid()) state->do_output(_result); - } - - virtual void emit_code(LIR_Assembler* masm); - - virtual void print_instr(outputStream* out) const { - addr()->print(out); out->print(" "); - cmp_value()->print(out); out->print(" "); - new_value()->print(out); out->print(" "); - tmp1()->print(out); out->print(" "); - tmp2()->print(out); out->print(" "); - } -#ifndef PRODUCT - virtual const char* name() const { - return "shenandoah_cas_obj"; - } -#endif // PRODUCT -}; - class ShenandoahBarrierSetC1 : public BarrierSetC1 { private: CodeBlob* _pre_barrier_c1_runtime_code_blob; @@ -244,7 +190,7 @@ protected: virtual LIR_Opr atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value); - void post_barrier(LIRAccess& access, LIR_Opr addr, LIR_Opr new_val); + void post_barrier(LIRAccess& access, LIR_Opr addr); public: diff --git a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp index f721c3cd001..deab648a108 100644 --- a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp +++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp @@ -73,7 +73,7 @@ void ShenandoahBarrierSetC2State::remove_load_reference_barrier(ShenandoahLoadRe #define __ kit-> -bool ShenandoahBarrierSetC2::satb_can_remove_pre_barrier(GraphKit* kit, PhaseValues* phase, Node* adr, +bool ShenandoahBarrierSetC2::satb_can_remove_pre_barrier(GraphKit* kit, PhaseGVN* phase, Node* adr, BasicType bt, uint adr_idx) const { intptr_t offset = 0; Node* base = AddPNode::Ideal_base_and_offset(adr, phase, offset); @@ -990,19 +990,23 @@ void ShenandoahBarrierSetC2::eliminate_gc_barrier(PhaseMacroExpand* macro, Node* shenandoah_eliminate_wb_pre(node, ¯o->igvn()); } if (ShenandoahCardBarrier && node->Opcode() == Op_CastP2X) { - Node* shift = node->unique_out(); - Node* addp = shift->unique_out(); - for (DUIterator_Last jmin, j = addp->last_outs(jmin); j >= jmin; --j) { - Node* mem = addp->last_out(j); - if (UseCondCardMark && mem->is_Load()) { - assert(mem->Opcode() == Op_LoadB, "unexpected code shape"); - // The load is checking if the card has been written so - // replace it with zero to fold the test. - macro->replace_node(mem, macro->intcon(0)); - continue; + for (DUIterator_Last imin, i = node->last_outs(imin); i >= imin; --i) { + Node* shift = node->last_out(i); + for (DUIterator_Last kmin, k = shift->last_outs(kmin); k >= kmin; --k) { + Node* addp = shift->last_out(k); + for (DUIterator_Last jmin, j = addp->last_outs(jmin); j >= jmin; --j) { + Node* mem = addp->last_out(j); + if (UseCondCardMark && mem->is_Load()) { + assert(mem->Opcode() == Op_LoadB, "unexpected code shape"); + // The load is checking if the card has been written so + // replace it with zero to fold the test. + macro->replace_node(mem, macro->intcon(0)); + continue; + } + assert(mem->is_Store(), "store required"); + macro->replace_node(mem, mem->in(MemNode::Memory)); + } } - assert(mem->is_Store(), "store required"); - macro->replace_node(mem, mem->in(MemNode::Memory)); } } } diff --git a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.hpp b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.hpp index 108eaa0998b..c77a9da63fc 100644 --- a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.hpp +++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.hpp @@ -46,7 +46,7 @@ class ShenandoahBarrierSetC2 : public BarrierSetC2 { private: void shenandoah_eliminate_wb_pre(Node* call, PhaseIterGVN* igvn) const; - bool satb_can_remove_pre_barrier(GraphKit* kit, PhaseValues* phase, Node* adr, + bool satb_can_remove_pre_barrier(GraphKit* kit, PhaseGVN* phase, Node* adr, BasicType bt, uint adr_idx) const; void satb_write_barrier_pre(GraphKit* kit, bool do_load, Node* obj, diff --git a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp index 015276feb5c..86de9eef459 100644 --- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp +++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp @@ -25,6 +25,7 @@ #include "classfile/javaClasses.hpp" +#include "code/aotCodeCache.hpp" #include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp" #include "gc/shenandoah/c2/shenandoahSupport.hpp" #include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp" @@ -928,12 +929,31 @@ void ShenandoahBarrierC2Support::test_in_cset(Node*& ctrl, Node*& not_cset_ctrl, PhaseIterGVN& igvn = phase->igvn(); Node* raw_val = new CastP2XNode(old_ctrl, val); - Node* cset_idx = new URShiftXNode(raw_val, igvn.intcon(ShenandoahHeapRegion::region_size_bytes_shift_jint())); + Node* region_size_shift = nullptr; + if (AOTCodeCache::is_on_for_dump()) { + Node* aot_addr = igvn.makecon(TypeRawPtr::make(AOTRuntimeConstants::grain_shift_address())); + region_size_shift = new LoadINode(old_ctrl, raw_mem, aot_addr, + DEBUG_ONLY(phase->C->get_adr_type(Compile::AliasIdxRaw)) NOT_DEBUG(nullptr), + TypeInt::INT, MemNode::unordered); + phase->register_new_node(region_size_shift, old_ctrl); + } else { + region_size_shift = igvn.intcon(ShenandoahHeapRegion::region_size_bytes_shift_jint()); + } + Node* cset_idx = new URShiftXNode(raw_val, region_size_shift); // Figure out the target cset address with raw pointer math. // This avoids matching AddP+LoadB that would emit inefficient code. // See JDK-8245465. - Node* cset_addr_ptr = igvn.makecon(TypeRawPtr::make(ShenandoahHeap::in_cset_fast_test_addr())); + Node* cset_addr_ptr = nullptr; + if (AOTCodeCache::is_on_for_dump()) { + Node* aot_addr = igvn.makecon(TypeRawPtr::make(AOTRuntimeConstants::cset_base_address())); + cset_addr_ptr = new LoadPNode(old_ctrl, raw_mem, aot_addr, + DEBUG_ONLY(phase->C->get_adr_type(Compile::AliasIdxRaw)) NOT_DEBUG(nullptr), + TypeRawPtr::NOTNULL, MemNode::unordered); + phase->register_new_node(cset_addr_ptr, old_ctrl); + } else { + cset_addr_ptr = igvn.makecon(TypeRawPtr::make(ShenandoahHeap::in_cset_fast_test_addr())); + } Node* cset_addr = new CastP2XNode(old_ctrl, cset_addr_ptr); Node* cset_load_addr = new AddXNode(cset_addr, cset_idx); Node* cset_load_ptr = new CastX2PNode(cset_load_addr); diff --git a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp index c595d1fd9cd..ce74e8cf199 100644 --- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp +++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp @@ -111,12 +111,12 @@ ShenandoahAdaptiveHeuristics::ShenandoahAdaptiveHeuristics(ShenandoahSpaceInfo* } ShenandoahAdaptiveHeuristics::~ShenandoahAdaptiveHeuristics() { - FREE_C_HEAP_ARRAY(double, _spike_acceleration_rate_samples); - FREE_C_HEAP_ARRAY(double, _spike_acceleration_rate_timestamps); - FREE_C_HEAP_ARRAY(double, _gc_time_timestamps); - FREE_C_HEAP_ARRAY(double, _gc_time_samples); - FREE_C_HEAP_ARRAY(double, _gc_time_xy); - FREE_C_HEAP_ARRAY(double, _gc_time_xx); + FREE_C_HEAP_ARRAY(_spike_acceleration_rate_samples); + FREE_C_HEAP_ARRAY(_spike_acceleration_rate_timestamps); + FREE_C_HEAP_ARRAY(_gc_time_timestamps); + FREE_C_HEAP_ARRAY(_gc_time_samples); + FREE_C_HEAP_ARRAY(_gc_time_xy); + FREE_C_HEAP_ARRAY(_gc_time_xx); } void ShenandoahAdaptiveHeuristics::initialize() { @@ -428,9 +428,7 @@ bool ShenandoahAdaptiveHeuristics::should_start_gc() { double predicted_future_gc_time = 0; double future_planned_gc_time = 0; bool future_planned_gc_time_is_average = false; - double avg_time_to_deplete_available = 0.0; bool is_spiking = false; - double spike_time_to_deplete_available = 0.0; log_debug(gc, ergo)("should_start_gc calculation: available: " PROPERFMT ", soft_max_capacity: " PROPERFMT ", " "allocated_since_gc_start: " PROPERFMT, @@ -650,9 +648,8 @@ bool ShenandoahAdaptiveHeuristics::should_start_gc() { _space_info->name(), avg_cycle_time * 1000, predicted_future_gc_time * 1000, byte_size_in_proper_unit(avg_alloc_rate), proper_unit_for_byte_size(avg_alloc_rate)); size_t allocatable_bytes = allocatable_words * HeapWordSize; - avg_time_to_deplete_available = allocatable_bytes / avg_alloc_rate; - if (future_planned_gc_time > avg_time_to_deplete_available) { + if (future_planned_gc_time * avg_alloc_rate > allocatable_bytes) { log_trigger("%s GC time (%.2f ms) is above the time for average allocation rate (%.0f %sB/s)" " to deplete free headroom (%zu%s) (margin of error = %.2f)", future_planned_gc_time_is_average? "Average": "Linear prediction of", future_planned_gc_time * 1000, @@ -675,8 +672,7 @@ bool ShenandoahAdaptiveHeuristics::should_start_gc() { } is_spiking = _allocation_rate.is_spiking(rate, _spike_threshold_sd); - spike_time_to_deplete_available = (rate == 0)? 0: allocatable_bytes / rate; - if (is_spiking && (rate != 0) && (future_planned_gc_time > spike_time_to_deplete_available)) { + if (is_spiking && (future_planned_gc_time * rate > allocatable_bytes)) { log_trigger("%s GC time (%.2f ms) is above the time for instantaneous allocation rate (%.0f %sB/s)" " to deplete free headroom (%zu%s) (spike threshold = %.2f)", future_planned_gc_time_is_average? "Average": "Linear prediction of", future_planned_gc_time * 1000, @@ -837,19 +833,29 @@ double ShenandoahAllocationRate::force_sample(size_t allocated, size_t &unaccoun const double MinSampleTime = 0.002; // Do not sample if time since last update is less than 2 ms double now = os::elapsedTime(); double time_since_last_update = now - _last_sample_time; + double rate = 0.0; if (time_since_last_update < MinSampleTime) { + // If we choose not to sample right now, the unaccounted_bytes_allocated will be added + // into the next sample taken. These unaccounted_bytes_allocated will be added to + // any additional bytes that are allocated during this GC cycle at the time the rate is + // next sampled. We do not overwrite _last_sample_time on this path, because the + // unaccounted_bytes_allocated were allocated following _last_sample_time. unaccounted_bytes_allocated = allocated - _last_sample_value; - _last_sample_value = 0; - return 0.0; } else { - double rate = instantaneous_rate(now, allocated); + rate = instantaneous_rate(now, allocated); _rate.add(rate); _rate_avg.add(_rate.avg()); _last_sample_time = now; - _last_sample_value = allocated; unaccounted_bytes_allocated = 0; - return rate; } + // force_sample() is called when resetting bytes allocated since gc start. All subsequent + // requests to sample allocated bytes during this GC cycle are measured as a delta from + // _last_sample_value. In the case that we choose not to sample now, we will count the + // unaccounted_bytes_allocated as if they were allocated following the start of this GC + // cycle (but the time span over which these bytes were allocated begins at + // _last_sample_time, which we do not overwrite). + _last_sample_value = 0; + return rate; } double ShenandoahAllocationRate::sample(size_t allocated) { @@ -898,9 +904,7 @@ bool ShenandoahAllocationRate::is_spiking(double rate, double threshold) const { } double ShenandoahAllocationRate::instantaneous_rate(double time, size_t allocated) const { - size_t last_value = _last_sample_value; - double last_time = _last_sample_time; - size_t allocation_delta = (allocated > last_value) ? (allocated - last_value) : 0; - double time_delta_sec = time - last_time; - return (time_delta_sec > 0) ? (allocation_delta / time_delta_sec) : 0; + assert(allocated >= _last_sample_value, "Must be"); + assert(time > _last_sample_time, "Must be"); + return (allocated - _last_sample_value) / (time - _last_sample_time); } diff --git a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGenerationalHeuristics.cpp b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGenerationalHeuristics.cpp index 594367e2972..840459288c3 100644 --- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGenerationalHeuristics.cpp +++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGenerationalHeuristics.cpp @@ -91,19 +91,6 @@ void ShenandoahGenerationalHeuristics::choose_collection_set_from_regiondata(She heap->shenandoah_policy()->record_mixed_cycle(); } - if (_generation->is_global()) { - // We have just chosen a collection set for a global cycle. The mark bitmap covering old regions is complete, so - // the remembered set scan can use that to avoid walking into garbage. When the next old mark begins, we will - // use the mark bitmap to make the old regions parsable by coalescing and filling any unmarked objects. Thus, - // we prepare for old collections by remembering which regions are old at this time. Note that any objects - // promoted into old regions will be above TAMS, and so will be considered marked. However, free regions that - // become old after this point will not be covered correctly by the mark bitmap, so we must be careful not to - // coalesce those regions. Only the old regions which are not part of the collection set at this point are - // eligible for coalescing. As implemented now, this has the side effect of possibly initiating mixed-evacuations - // after a global cycle for old regions that were not included in this collection set. - heap->old_generation()->transition_old_generation_after_global_gc(); - } - ShenandoahTracer::report_promotion_info(collection_set, in_place_promotions.humongous_region_stats().count, in_place_promotions.humongous_region_stats().garbage, diff --git a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp index 3091b19b600..d2010d921b1 100644 --- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp +++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp @@ -73,7 +73,7 @@ ShenandoahHeuristics::ShenandoahHeuristics(ShenandoahSpaceInfo* space_info) : } ShenandoahHeuristics::~ShenandoahHeuristics() { - FREE_C_HEAP_ARRAY(RegionGarbage, _region_data); + FREE_C_HEAP_ARRAY(_region_data); } void ShenandoahHeuristics::choose_collection_set(ShenandoahCollectionSet* collection_set) { diff --git a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp index 0789fd5cb1c..4f820f26075 100644 --- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp +++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp @@ -428,7 +428,7 @@ void ShenandoahOldHeuristics::prepare_for_old_collections() { } // else, regions that were promoted in place had 0 old live data at mark start - if (region->is_regular() || region->is_regular_pinned()) { + if (region->is_regular_or_regular_pinned()) { // Only place regular or pinned regions with live data into the candidate set. // Pinned regions cannot be evacuated, but we are not actually choosing candidates // for the collection set here. That happens later during the next young GC cycle, @@ -539,7 +539,7 @@ void ShenandoahOldHeuristics::prepare_for_old_collections() { while ((defrag_count < bound_on_additional_regions) && (total_uncollected_old_regions < 7 * span_of_uncollected_regions / 8)) { ShenandoahHeapRegion* r = candidates[_last_old_collection_candidate].get_region(); - assert(r->is_regular() || r->is_regular_pinned(), "Region %zu has wrong state for collection: %s", + assert(r->is_regular_or_regular_pinned(), "Region %zu has wrong state for collection: %s", r->index(), ShenandoahHeapRegion::region_state_to_string(r->state())); const size_t region_garbage = r->garbage(); const size_t region_free = r->free(); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.cpp b/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.cpp index a81efa99d70..4989c929b32 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.cpp @@ -70,15 +70,15 @@ ShenandoahAgeCensus::~ShenandoahAgeCensus() { for (uint i = 0; i < MAX_SNAPSHOTS; i++) { delete _global_age_tables[i]; } - FREE_C_HEAP_ARRAY(AgeTable*, _global_age_tables); - FREE_C_HEAP_ARRAY(uint, _tenuring_threshold); - CENSUS_NOISE(FREE_C_HEAP_ARRAY(ShenandoahNoiseStats, _global_noise)); + FREE_C_HEAP_ARRAY(_global_age_tables); + FREE_C_HEAP_ARRAY(_tenuring_threshold); + CENSUS_NOISE(FREE_C_HEAP_ARRAY(_global_noise)); if (_local_age_tables) { for (uint i = 0; i < _max_workers; i++) { delete _local_age_tables[i]; } - FREE_C_HEAP_ARRAY(AgeTable*, _local_age_tables); - CENSUS_NOISE(FREE_C_HEAP_ARRAY(ShenandoahNoiseStats, _local_noise)); + FREE_C_HEAP_ARRAY(_local_age_tables); + CENSUS_NOISE(FREE_C_HEAP_ARRAY(_local_noise)); } } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp index e9d6a686694..5ce131b3c80 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp @@ -44,6 +44,16 @@ void ShenandoahArguments::initialize() { vm_exit_during_initialization("Shenandoah GC is not supported on this platform."); #endif + // Shenandoah relies on the object header bits (including the self-forwarded bit + // at markWord::self_fwd_mask_in_place) being preserved across monitor inflation, + // which only holds with UseObjectMonitorTable. + if (!UseObjectMonitorTable) { + if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) { + vm_exit_during_initialization("Shenandoah requires UseObjectMonitorTable"); + } + FLAG_SET_DEFAULT(UseObjectMonitorTable, true); + } + #if 0 // leave this block as stepping stone for future platforms log_warning(gc)("Shenandoah GC is not fully supported on this platform:"); log_warning(gc)(" concurrent modes are not supported, only STW cycles are enabled;"); @@ -207,7 +217,8 @@ void ShenandoahArguments::initialize() { } size_t ShenandoahArguments::conservative_max_heap_alignment() { - size_t align = next_power_of_2(ShenandoahMaxRegionSize); + static_assert(is_power_of_2(ShenandoahHeapRegion::MAX_REGION_SIZE), "Max region size must be a power of 2."); + size_t align = ShenandoahHeapRegion::MAX_REGION_SIZE; if (UseLargePages) { align = MAX2(align, os::large_page_size()); } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp index e7a0ed57740..06e16af24c6 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp @@ -96,7 +96,6 @@ public: void on_thread_detach(Thread* thread) override; static inline oop resolve_forwarded_not_null(oop p); - static inline oop resolve_forwarded_not_null_mutator(oop p); static inline oop resolve_forwarded(oop p); template @@ -109,7 +108,7 @@ public: inline oop load_reference_barrier(oop obj); - template + template inline oop load_reference_barrier_mutator(oop obj, T* load_addr); template diff --git a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp index f4b35e29b09..f4a6d2b9038 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp @@ -34,7 +34,6 @@ #include "gc/shenandoah/shenandoahAsserts.hpp" #include "gc/shenandoah/shenandoahCardTable.hpp" #include "gc/shenandoah/shenandoahCollectionSet.inline.hpp" -#include "gc/shenandoah/shenandoahEvacOOMHandler.inline.hpp" #include "gc/shenandoah/shenandoahForwarding.inline.hpp" #include "gc/shenandoah/shenandoahGeneration.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" @@ -56,20 +55,52 @@ inline oop ShenandoahBarrierSet::resolve_forwarded(oop p) { } } -inline oop ShenandoahBarrierSet::resolve_forwarded_not_null_mutator(oop p) { - return ShenandoahForwarding::get_forwardee_mutator(p); -} - -template +template inline oop ShenandoahBarrierSet::load_reference_barrier_mutator(oop obj, T* load_addr) { - assert(ShenandoahLoadRefBarrier, "should be enabled"); - shenandoah_assert_in_cset(load_addr, obj); + assert(ShenandoahLoadRefBarrier, "Should be enabled"); - oop fwd = resolve_forwarded_not_null_mutator(obj); + constexpr bool on_weak = HasDecorator::value; + constexpr bool on_phantom = HasDecorator::value; + + // Handle nulls. Strong loads filtered nulls with cset checks. + // Weak/phantom loads need to check for nulls here. + if (on_weak || on_phantom) { + if (obj == nullptr) { + return nullptr; + } + } else { + assert(obj != nullptr, "Should have been filtered before"); + } + + // Prevent resurrection of unreachable phantom (i.e. weak-native) references. + if (on_phantom && + _heap->is_concurrent_weak_root_in_progress() && + _heap->is_in_active_generation(obj) && + !_heap->marking_context()->is_marked(obj)) { + return nullptr; + } + + // Prevent resurrection of unreachable weak references. + if (on_weak && + _heap->is_concurrent_weak_root_in_progress() && + _heap->is_in_active_generation(obj) && + !_heap->marking_context()->is_marked_strong(obj)) { + return nullptr; + } + + // Weak/phantom loads need additional cset check. + if (on_phantom || on_weak) { + if (!_heap->has_forwarded_objects() || !_heap->in_collection_set(obj)) { + return obj; + } + } else { + shenandoah_assert_in_cset(load_addr, obj); + } + + oop fwd = ShenandoahForwarding::get_forwardee_mutator(obj); if (obj == fwd) { assert(_heap->is_evacuation_in_progress(), "evac should be in progress"); Thread* const t = Thread::current(); - ShenandoahEvacOOMScope scope(t); fwd = _heap->evacuate_object(obj, t); } @@ -91,7 +122,6 @@ inline oop ShenandoahBarrierSet::load_reference_barrier(oop obj) { oop fwd = resolve_forwarded_not_null(obj); if (obj == fwd && _heap->is_evacuation_in_progress()) { Thread* t = Thread::current(); - ShenandoahEvacOOMScope oom_evac_scope(t); return _heap->evacuate_object(obj, t); } return fwd; @@ -219,29 +249,35 @@ inline oop ShenandoahBarrierSet::oop_load(DecoratorSet decorators, T* addr) { template inline oop ShenandoahBarrierSet::oop_cmpxchg(DecoratorSet decorators, T* addr, oop compare_value, oop new_value) { - oop res; - oop expected = compare_value; - do { - compare_value = expected; - res = RawAccess<>::oop_atomic_cmpxchg(addr, compare_value, new_value); - expected = res; - } while ((compare_value != expected) && (resolve_forwarded(compare_value) == resolve_forwarded(expected))); + shenandoah_assert_not_in_cset_except(nullptr, compare_value, (compare_value == nullptr || ShenandoahHeap::heap()->cancelled_gc())); + shenandoah_assert_not_in_cset_except(nullptr, new_value, (new_value == nullptr || ShenandoahHeap::heap()->cancelled_gc())); - // Note: We don't need a keep-alive-barrier here. We already enqueue any loaded reference for SATB anyway, - // because it must be the previous value. - res = load_reference_barrier(decorators, res, static_cast(nullptr)); - satb_enqueue(res); - return res; + // Handle the previous value through SATB, as we are about to perform the store. + oop prev = RawAccess<>::oop_load(addr); + satb_enqueue(prev); + + // Perform LRB on location to fix it up for this and all following accesses. + // This guarantees there are no false negatives due to concurrent evacuation, + // and the value loaded later by CAS is sanitized by some LRB, or is null. + load_reference_barrier(decorators, prev, addr); + + return RawAccess<>::oop_atomic_cmpxchg(addr, compare_value, new_value); } template inline oop ShenandoahBarrierSet::oop_xchg(DecoratorSet decorators, T* addr, oop new_value) { - oop previous = RawAccess<>::oop_atomic_xchg(addr, new_value); - // Note: We don't need a keep-alive-barrier here. We already enqueue any loaded reference for SATB anyway, - // because it must be the previous value. - previous = load_reference_barrier(decorators, previous, static_cast(nullptr)); - satb_enqueue(previous); - return previous; + shenandoah_assert_not_in_cset_except(nullptr, new_value, (new_value == nullptr || ShenandoahHeap::heap()->cancelled_gc())); + + // Handle the previous value through SATB, as we are about to perform the store. + oop prev = RawAccess<>::oop_load(addr); + satb_enqueue(prev); + + // Perform LRB on location to fix it up for this and all following accesses. + // This is purely opportunistic: we would not have any false negatives here. + // This guarantees the value loaded later by XCHG is sanitized by some LRB, or is null. + load_reference_barrier(decorators, prev, addr); + + return RawAccess<>::oop_atomic_xchg(addr, new_value); } template @@ -308,7 +344,8 @@ inline void ShenandoahBarrierSet::AccessBarrier::oop_st template template inline oop ShenandoahBarrierSet::AccessBarrier::oop_atomic_cmpxchg_not_in_heap(T* addr, oop compare_value, oop new_value) { - assert((decorators & (AS_NO_KEEPALIVE | ON_UNKNOWN_OOP_REF)) == 0, "must be absent"); + assert((decorators & AS_NO_KEEPALIVE) == 0, "CAS only with keep-alive"); + assert((decorators & ON_STRONG_OOP_REF) != 0, "CAS only for strong refs"); ShenandoahBarrierSet* bs = ShenandoahBarrierSet::barrier_set(); return bs->oop_cmpxchg(decorators, addr, compare_value, new_value); } @@ -316,7 +353,8 @@ inline oop ShenandoahBarrierSet::AccessBarrier::oop_ato template template inline oop ShenandoahBarrierSet::AccessBarrier::oop_atomic_cmpxchg_in_heap(T* addr, oop compare_value, oop new_value) { - assert((decorators & (AS_NO_KEEPALIVE | ON_UNKNOWN_OOP_REF)) == 0, "must be absent"); + assert((decorators & AS_NO_KEEPALIVE) == 0, "CAS only with keep-alive"); + assert((decorators & ON_STRONG_OOP_REF) != 0, "CAS only for strong refs"); ShenandoahBarrierSet* bs = ShenandoahBarrierSet::barrier_set(); oop result = bs->oop_cmpxchg(decorators, addr, compare_value, new_value); if (ShenandoahCardBarrier) { @@ -327,9 +365,20 @@ inline oop ShenandoahBarrierSet::AccessBarrier::oop_ato template inline oop ShenandoahBarrierSet::AccessBarrier::oop_atomic_cmpxchg_in_heap_at(oop base, ptrdiff_t offset, oop compare_value, oop new_value) { - assert((decorators & AS_NO_KEEPALIVE) == 0, "must be absent"); + assert((decorators & AS_NO_KEEPALIVE) == 0, "CAS only with keep-alive"); + assert((decorators & (ON_STRONG_OOP_REF | ON_UNKNOWN_OOP_REF)) != 0, "CAS only for strong refs OR unknown refs (Unsafe)"); ShenandoahBarrierSet* bs = ShenandoahBarrierSet::barrier_set(); + + // Unsafe.compareAndExchange/Set come here with ON_UNKNOWN_OOP_REF set. + // These are normally strong refs, but one can use Unsafe on Reference.referent. + // We cannot deal with that case. If application does Unsafe operations on + // Reference.referent field, this likely breaks weak reference semantics already. + // We upgrade the access to strong in (sometimes futile) attempt to maintain heap + // integrity, and assert in debug builds for better diagnostics. DecoratorSet resolved_decorators = AccessBarrierSupport::resolve_possibly_unknown_oop_ref_strength(base, offset); + assert((resolved_decorators & ON_STRONG_OOP_REF) != 0, "Application error: CAS on weak location"); + resolved_decorators = (resolved_decorators & ~ON_DECORATOR_MASK) | ON_STRONG_OOP_REF; + auto addr = AccessInternal::oop_field_addr(base, offset); oop result = bs->oop_cmpxchg(resolved_decorators, addr, compare_value, new_value); if (ShenandoahCardBarrier) { @@ -341,7 +390,8 @@ inline oop ShenandoahBarrierSet::AccessBarrier::oop_ato template template inline oop ShenandoahBarrierSet::AccessBarrier::oop_atomic_xchg_not_in_heap(T* addr, oop new_value) { - assert((decorators & (AS_NO_KEEPALIVE | ON_UNKNOWN_OOP_REF)) == 0, "must be absent"); + assert((decorators & AS_NO_KEEPALIVE) == 0, "XCHG only with keep-alive"); + assert((decorators & ON_STRONG_OOP_REF) != 0, "XCHG only for strong refs"); ShenandoahBarrierSet* bs = ShenandoahBarrierSet::barrier_set(); return bs->oop_xchg(decorators, addr, new_value); } @@ -349,7 +399,8 @@ inline oop ShenandoahBarrierSet::AccessBarrier::oop_ato template template inline oop ShenandoahBarrierSet::AccessBarrier::oop_atomic_xchg_in_heap(T* addr, oop new_value) { - assert((decorators & (AS_NO_KEEPALIVE | ON_UNKNOWN_OOP_REF)) == 0, "must be absent"); + assert((decorators & AS_NO_KEEPALIVE) == 0, "XCHG only with keep-alive"); + assert((decorators & ON_STRONG_OOP_REF) != 0, "XCHG only for strong refs"); ShenandoahBarrierSet* bs = ShenandoahBarrierSet::barrier_set(); oop result = bs->oop_xchg(decorators, addr, new_value); if (ShenandoahCardBarrier) { @@ -360,9 +411,20 @@ inline oop ShenandoahBarrierSet::AccessBarrier::oop_ato template inline oop ShenandoahBarrierSet::AccessBarrier::oop_atomic_xchg_in_heap_at(oop base, ptrdiff_t offset, oop new_value) { - assert((decorators & AS_NO_KEEPALIVE) == 0, "must be absent"); + assert((decorators & AS_NO_KEEPALIVE) == 0, "XCHG only with keep-alive"); + assert((decorators & (ON_STRONG_OOP_REF | ON_UNKNOWN_OOP_REF)) != 0, "XCHG only for strong refs OR unknown refs (Unsafe)"); ShenandoahBarrierSet* bs = ShenandoahBarrierSet::barrier_set(); + + // Unsafe.getAndSet comes here with ON_UNKNOWN_OOP_REF set. + // These are normally strong refs, but one can use Unsafe on Reference.referent. + // We cannot deal with that case. If application does Unsafe operations on + // Reference.referent field, this likely breaks weak reference semantics already. + // We upgrade the access to strong in (sometimes futile) attempt to maintain heap + // integrity, and assert in debug builds for better diagnostics. DecoratorSet resolved_decorators = AccessBarrierSupport::resolve_possibly_unknown_oop_ref_strength(base, offset); + assert((resolved_decorators & ON_STRONG_OOP_REF) != 0, "Application error: XCHG on weak location"); + resolved_decorators = (resolved_decorators & ~ON_DECORATOR_MASK) | ON_STRONG_OOP_REF; + auto addr = AccessInternal::oop_field_addr(base, offset); oop result = bs->oop_xchg(resolved_decorators, addr, new_value); if (ShenandoahCardBarrier) { @@ -478,7 +540,6 @@ template void ShenandoahBarrierSet::arraycopy_evacuation(T* src, size_t count) { assert(_heap->is_evacuation_in_progress(), "only during evacuation"); if (need_bulk_update(reinterpret_cast(src))) { - ShenandoahEvacOOMScope oom_evac; arraycopy_work(src, count); } } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSetClone.inline.hpp b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSetClone.inline.hpp index 8b83cc6b32c..487fbd9ef62 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSetClone.inline.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSetClone.inline.hpp @@ -29,7 +29,6 @@ #include "gc/shenandoah/shenandoahBarrierSet.inline.hpp" #include "gc/shenandoah/shenandoahCollectionSet.inline.hpp" -#include "gc/shenandoah/shenandoahEvacOOMHandler.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" #include "memory/iterator.inline.hpp" #include "oops/access.hpp" @@ -77,7 +76,6 @@ public: void ShenandoahBarrierSet::clone_evacuation(oop obj) { assert(_heap->is_evacuation_in_progress(), "only during evacuation"); if (need_bulk_update(cast_from_oop(obj))) { - ShenandoahEvacOOMScope oom_evac_scope; ShenandoahUpdateRefsForOopClosure cl; obj->oop_iterate(&cl); } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahCardStats.hpp b/src/hotspot/share/gc/shenandoah/shenandoahCardStats.hpp index 0ef0eaadb6b..c9bc94c31a8 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahCardStats.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahCardStats.hpp @@ -88,10 +88,10 @@ public: _local_card_stats[MAX_CLEAN_RUN].add(percent_of(_max_clean_run, _cards_in_cluster)); // Update global stats for dirty obj scan counts - _local_card_stats[DIRTY_SCAN_OBJS].add(_dirty_scan_obj_cnt); + _local_card_stats[DIRTY_SCAN_OBJS].add(static_cast(_dirty_scan_obj_cnt)); // Update global stats for alternation counts - _local_card_stats[ALTERNATIONS].add(_alternation_cnt); + _local_card_stats[ALTERNATIONS].add(static_cast(_alternation_cnt)); } } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahClosures.inline.hpp b/src/hotspot/share/gc/shenandoah/shenandoahClosures.inline.hpp index 96ecbad1145..7580b8d1015 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahClosures.inline.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahClosures.inline.hpp @@ -30,7 +30,6 @@ #include "gc/shared/barrierSetNMethod.hpp" #include "gc/shenandoah/shenandoahAsserts.hpp" #include "gc/shenandoah/shenandoahBarrierSet.hpp" -#include "gc/shenandoah/shenandoahEvacOOMHandler.inline.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" #include "gc/shenandoah/shenandoahMark.inline.hpp" #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp" @@ -132,22 +131,12 @@ void ShenandoahKeepAliveClosure::do_oop_work(T* p) { template void ShenandoahEvacuateUpdateRootClosureBase::do_oop(oop* p) { - if (CONCURRENT) { - ShenandoahEvacOOMScope scope; - do_oop_work(p); - } else { - do_oop_work(p); - } + do_oop_work(p); } template void ShenandoahEvacuateUpdateRootClosureBase::do_oop(narrowOop* p) { - if (CONCURRENT) { - ShenandoahEvacOOMScope scope; - do_oop_work(p); - } else { - do_oop_work(p); - } + do_oop_work(p); } template diff --git a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp index 7cf60cdf65c..3116ec30665 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp @@ -27,7 +27,6 @@ #include "code/nmethod.hpp" #include "gc/shared/classUnloadingContext.hpp" #include "gc/shenandoah/shenandoahClosures.inline.hpp" -#include "gc/shenandoah/shenandoahEvacOOMHandler.inline.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" #include "gc/shenandoah/shenandoahNMethod.inline.hpp" #include "gc/shenandoah/shenandoahUtils.hpp" @@ -117,7 +116,6 @@ public: // Heal oops if (_bs->is_armed(nm)) { - ShenandoahEvacOOMScope oom_evac_scope; ShenandoahNMethod::heal_nmethod_metadata(nm_data); // Must remain armed to complete remaining work in nmethod entry barrier assert(_bs->is_armed(nm), "Should remain armed"); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp index 6723bb89021..929f3b30afe 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp @@ -854,8 +854,6 @@ public: } void work(uint worker_id) override { - // ShenandoahEvacOOMScope has to be setup by ShenandoahContextEvacuateUpdateRootsClosure. - // Otherwise, may deadlock with watermark lock ShenandoahContextEvacuateUpdateRootsClosure oops_cl; ShenandoahConcurrentEvacThreadClosure thr_cl(&oops_cl); _java_threads.threads_do(&thr_cl, worker_id); @@ -969,9 +967,8 @@ public: void work(uint worker_id) override { ShenandoahConcurrentWorkerSession worker_session(worker_id); - ShenandoahSuspendibleThreadSetJoiner sts_join; + SuspendibleThreadSetJoiner sts_join; { - ShenandoahEvacOOMScope oom; // jni_roots and weak_roots are OopStorage backed roots, concurrent iteration // may race against OopStorage::release() calls. ShenandoahEvacUpdateCleanupOopStorageRootsClosure cl(_generation); @@ -1044,9 +1041,6 @@ public: void do_nmethod(nmethod* n) { ShenandoahNMethod* data = ShenandoahNMethod::gc_data(n); ShenandoahNMethodLocker locker(data->lock()); - // Setup EvacOOM scope below reentrant lock to avoid deadlock with - // nmethod_entry_barrier - ShenandoahEvacOOMScope oom; data->oops_do(&_cl, /* fix_relocations = */ true); ShenandoahNMethod::disarm_nmethod(n); } @@ -1071,7 +1065,6 @@ public: void work(uint worker_id) { ShenandoahConcurrentWorkerSession worker_session(worker_id); { - ShenandoahEvacOOMScope oom; { // vm_roots and weak_roots are OopStorage backed roots, concurrent iteration // may race against OopStorage::release() calls. @@ -1086,7 +1079,6 @@ public: } } - // Cannot setup ShenandoahEvacOOMScope here, due to potential deadlock with nmethod_entry_barrier. if (!ShenandoahHeap::heap()->unload_classes()) { ShenandoahWorkerTimingsTracker timer(_phase, ShenandoahPhaseTimings::CodeCacheRoots, worker_id); ShenandoahEvacUpdateCodeCacheClosure cl; diff --git a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp index 367a15abfa4..be0da3e54ba 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp @@ -58,7 +58,7 @@ public: void work(uint worker_id) { ShenandoahConcurrentWorkerSession worker_session(worker_id); ShenandoahWorkerTimingsTracker timer(ShenandoahPhaseTimings::conc_mark, ShenandoahPhaseTimings::ParallelMark, worker_id, true); - ShenandoahSuspendibleThreadSetJoiner stsj; + SuspendibleThreadSetJoiner stsj; StringDedup::Requests requests; _cm->mark_loop(worker_id, _terminator, GENERATION, true /*cancellable*/, ShenandoahStringDedup::is_enabled() ? ENQUEUE_DEDUP : NO_DEDUP, @@ -300,7 +300,11 @@ void ShenandoahConcurrentMark::finish_mark_work() { default: ShouldNotReachHere(); } - + if (!generation()->is_old() && heap->is_concurrent_young_mark_in_progress()) { + // Lastly, ensure all the invisible roots are marked. + ShenandoahInvisibleRootsMarkClosure cl; + Threads::java_threads_do(&cl); + } assert(task_queues()->is_empty(), "Should be empty"); } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp b/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp index 84b22f13d47..7be3141a4fa 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp @@ -56,9 +56,10 @@ bool ShenandoahDegenGC::collect(GCCause::Cause cause) { ShenandoahHeap* heap = ShenandoahHeap::heap(); if (heap->mode()->is_generational()) { bool is_bootstrap_gc = heap->young_generation()->is_bootstrap_cycle(); - heap->mmu_tracker()->record_degenerated(GCId::current(), is_bootstrap_gc); - const char* msg = is_bootstrap_gc? "At end of Degenerated Bootstrap Old GC": "At end of Degenerated Young GC"; - heap->log_heap_status(msg); + FormatBuffer<32> buf("Degenerated %s GC", _generation->name()); + const char* msg = is_bootstrap_gc ? "Degenerated Bootstrap Old GC" : buf.buffer(); + heap->mmu_tracker()->record_degenerated(GCId::current(), msg); + heap->log_heap_status(FormatBuffer<64>("At end of %s", msg)); } return true; } @@ -95,6 +96,16 @@ void ShenandoahDegenGC::op_degenerated() { // some phase, we have to upgrade the Degenerate GC to Full GC. heap->clear_cancelled_gc(); + // If we degenerated from evacuation or update-refs, some objects in cset may + // have been self-forwarded by the failing thread. Clear those marks now so + // the remainder of this cycle (re-evac, update-refs, verification) sees a + // clean forwarding state. + if (_degen_point == ShenandoahDegenPoint::_degenerated_evac || + _degen_point == ShenandoahDegenPoint::_degenerated_update_refs) { + ShenandoahGCPhase phase(ShenandoahPhaseTimings::degen_gc_un_self_forward); + heap->un_self_forward_cset_regions(); + } + // If it's passive mode with ShenandoahCardBarrier turned on: clean the write table // without swapping the tables since no scan happens in passive mode anyway if (ShenandoahCardBarrier && !heap->mode()->is_generational()) { @@ -304,6 +315,8 @@ void ShenandoahDegenGC::op_degenerated() { ShouldNotReachHere(); } + DEBUG_ONLY(heap->assert_no_self_forwards()); + if (ShenandoahVerify) { heap->verifier()->verify_after_degenerated(_generation); } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.cpp b/src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.cpp deleted file mode 100644 index 5b24140ac1c..00000000000 --- a/src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (c) 2018, 2020, Red Hat, 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. - * - */ - - -#include "gc/shenandoah/shenandoahEvacOOMHandler.inline.hpp" -#include "gc/shenandoah/shenandoahUtils.hpp" -#include "runtime/javaThread.hpp" -#include "runtime/os.hpp" - -const jint ShenandoahEvacOOMCounter::OOM_MARKER_MASK = 0x80000000; - -ShenandoahEvacOOMCounter::ShenandoahEvacOOMCounter() : - _bits(0) { -} - -void ShenandoahEvacOOMCounter::decrement() { - assert(unmasked_count() > 0, "sanity"); - // NOTE: It's ok to simply decrement, even with mask set, because unmasked value is positive. - _bits.fetch_then_sub(1); -} - -void ShenandoahEvacOOMCounter::clear() { - assert(unmasked_count() == 0, "sanity"); - _bits.release_store_fence((jint)0); -} - -void ShenandoahEvacOOMCounter::set_oom_bit(bool decrement) { - jint threads_in_evac = _bits.load_acquire(); - while (true) { - jint newval = decrement - ? (threads_in_evac - 1) | OOM_MARKER_MASK - : threads_in_evac | OOM_MARKER_MASK; - - jint other = _bits.compare_exchange(threads_in_evac, newval); - if (other == threads_in_evac) { - // Success: wait for other threads to get out of the protocol and return. - break; - } else { - // Failure: try again with updated new value. - threads_in_evac = other; - } - } -} - -bool ShenandoahEvacOOMCounter::try_increment() -{ - jint threads_in_evac = _bits.load_acquire(); - - while (true) { - // Cannot enter evacuation if OOM_MARKER_MASK is set. - if ((threads_in_evac & OOM_MARKER_MASK) != 0) { - return false; - } - - jint other = _bits.compare_exchange(threads_in_evac, threads_in_evac + 1); - if (other == threads_in_evac) { - // Success: caller may safely enter evacuation - return true; - } else { - threads_in_evac = other; - } - } -} - -ShenandoahEvacOOMHandler::ShenandoahEvacOOMHandler() : - _num_counters(calc_num_counters()) { - - assert(_num_counters > 0, "sanity"); - assert(is_power_of_2(_num_counters), "must be"); - - _threads_in_evac = NEW_C_HEAP_ARRAY(ShenandoahEvacOOMCounter, _num_counters, mtGC); - for (int i = 0; i < _num_counters; i++) { - new (&_threads_in_evac[i]) ShenandoahEvacOOMCounter(); - } -} - -int ShenandoahEvacOOMHandler::calc_num_counters() { - // Scale the number of counter buckets with the number of CPUs to - // minimise contention. Also make sure the number is a power of two - // so we can map hash values to buckets with a simple mask. - const int nproc = os::active_processor_count(); - const int clamped = MAX2(1, MIN2(nproc, 128)); - return round_up_power_of_2(clamped); -} - -uint64_t ShenandoahEvacOOMHandler::hash_pointer(const void* p) { - // Bit mixing function from MurmurHash3 - uint64_t key = (uintptr_t)p; - key ^= (key >> 33); - key *= UINT64_C(0xff51afd7ed558ccd); - key ^= (key >> 33); - key *= UINT64_C(0xc4ceb9fe1a85ec53); - key ^= (key >> 33); - return key; -} - -ShenandoahEvacOOMCounter* ShenandoahEvacOOMHandler::counter_for_thread(Thread* t) { - const uint64_t key = hash_pointer(t); - return &_threads_in_evac[key & (_num_counters - 1)]; -} - -void ShenandoahEvacOOMHandler::wait_for_one_counter(ShenandoahEvacOOMCounter* ptr) { - // We might be racing against handle_out_of_memory_during_evacuation() - // setting the OOM_MARKER_MASK bit so we must make sure it is set here - // *and* the counter is zero. - while (ptr->load_acquire() != ShenandoahEvacOOMCounter::OOM_MARKER_MASK) { - os::naked_short_sleep(1); - } -} - -void ShenandoahEvacOOMHandler::wait_for_no_evac_threads() { - // Once the OOM_MARKER_MASK bit is set the counter can only decrease - // so it's safe to check each bucket in turn. - for (int i = 0; i < _num_counters; i++) { - wait_for_one_counter(&_threads_in_evac[i]); - } - // At this point we are sure that no threads can evacuate anything. Raise - // the thread-local oom_during_evac flag to indicate that any attempt - // to evacuate should simply return the forwarding pointer instead (which is safe now). - ShenandoahThreadLocalData::set_oom_during_evac(Thread::current(), true); -} - -void ShenandoahEvacOOMHandler::register_thread(Thread* thr) { - assert(!ShenandoahThreadLocalData::is_oom_during_evac(Thread::current()), "TL oom-during-evac must not be set"); - - ShenandoahEvacOOMCounter* counter = counter_for_thread(thr); - if (!counter->try_increment()) { - // Counter has OOM_MARKER_MASK set, loop until no more threads in evac - wait_for_no_evac_threads(); - } -} - -void ShenandoahEvacOOMHandler::unregister_thread(Thread* thr) { - if (!ShenandoahThreadLocalData::is_oom_during_evac(thr)) { - counter_for_thread(thr)->decrement(); - } else { - // If we get here, the current thread has already gone through the - // OOM-during-evac protocol and has thus either never entered or successfully left - // the evacuation region. Simply flip its TL oom-during-evac flag back off. - ShenandoahThreadLocalData::set_oom_during_evac(thr, false); - } - assert(!ShenandoahThreadLocalData::is_oom_during_evac(thr), "TL oom-during-evac must be turned off"); -} - -void ShenandoahEvacOOMHandler::handle_out_of_memory_during_evacuation() { - assert(ShenandoahThreadLocalData::is_evac_allowed(Thread::current()), "sanity"); - assert(!ShenandoahThreadLocalData::is_oom_during_evac(Thread::current()), "TL oom-during-evac must not be set"); - - ShenandoahEvacOOMCounter* self = counter_for_thread(Thread::current()); - assert(self->unmasked_count() > 0, "sanity"); - - for (int i = 0; i < _num_counters; i++) { - ShenandoahEvacOOMCounter* counter = &_threads_in_evac[i]; - counter->set_oom_bit(counter == self); - } - - wait_for_no_evac_threads(); -} - -void ShenandoahEvacOOMHandler::clear() { - assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "must be at a safepoint"); - for (int i = 0; i < _num_counters; i++) { - _threads_in_evac[i].clear(); - } -} diff --git a/src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.hpp b/src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.hpp deleted file mode 100644 index 3e28d9ac88e..00000000000 --- a/src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.hpp +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2018, 2020, Red Hat, 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. - * - */ - -#ifndef SHARE_GC_SHENANDOAH_SHENANDOAHEVACOOMHANDLER_HPP -#define SHARE_GC_SHENANDOAH_SHENANDOAHEVACOOMHANDLER_HPP - -#include "gc/shenandoah/shenandoahPadding.hpp" -#include "memory/allocation.hpp" -#include "runtime/atomic.hpp" -#include "runtime/javaThread.hpp" -#include "utilities/globalDefinitions.hpp" - -/** - * Striped counter used to implement the OOM protocol described below. - */ -class ShenandoahEvacOOMCounter { -private: - // Combination of a 31-bit counter and 1-bit OOM marker. - Atomic _bits; - - // This class must be at least a cache line in size to prevent false sharing. - shenandoah_padding_minus_size(0, sizeof(jint)); - -public: - static const jint OOM_MARKER_MASK; - - ShenandoahEvacOOMCounter(); - - void decrement(); - bool try_increment(); - void clear(); - void set_oom_bit(bool decrement); - - inline jint unmasked_count(); - inline jint load_acquire(); -}; - -/** - * Provides safe handling of out-of-memory situations during evacuation. - * - * When a Java thread encounters out-of-memory while evacuating an object in a - * load-reference-barrier (i.e. it cannot copy the object to to-space), it does not - * necessarily follow we can return immediately from the LRB (and store to from-space). - * - * In very basic case, on such failure we may wait until the evacuation is over, - * and then resolve the forwarded copy, and to the store there. This is possible - * because other threads might still have space in their GCLABs, and successfully - * evacuate the object. - * - * But, there is a race due to non-atomic evac_in_progress transition. Consider - * thread A is stuck waiting for the evacuation to be over -- it cannot leave with - * from-space copy yet. Control thread drops evacuation_in_progress preparing for - * next STW phase that has to recover from OOME. Thread B misses that update, and - * successfully evacuates the object, does the write to to-copy. But, before - * Thread B is able to install the fwdptr, thread A discovers evac_in_progress is - * down, exits from here, reads the fwdptr, discovers old from-copy, and stores there. - * Thread B then wakes up and installs to-copy. This breaks to-space invariant, and - * silently corrupts the heap: we accepted two writes to separate copies of the object. - * - * The way it is solved here is to maintain a counter of threads inside the - * 'evacuation path'. The 'evacuation path' is the part of evacuation that does the actual - * allocation, copying and CASing of the copy object, and is protected by this - * OOM-during-evac-handler. The handler allows multiple threads to enter and exit - * evacuation path, but on OOME it requires all threads that experienced OOME to wait - * for current threads to leave, and blocks other threads from entering. The counter state - * is striped across multiple cache lines to reduce contention when many threads attempt - * to enter or leave the protocol at the same time. - * - * Detailed state change: - * - * Upon entry of the evac-path, entering thread will attempt to increase the counter, - * using a CAS. Depending on the result of the CAS: - * - success: carry on with evac - * - failure: - * - if offending value is a valid counter, then try again - * - if offending value is OOM-during-evac special value: loop until - * counter drops to 0, then exit with resolving the ptr - * - * Upon exit, exiting thread will decrease the counter using atomic dec. - * - * Upon OOM-during-evac, any thread will attempt to CAS OOM-during-evac - * special value into the counter. Depending on result: - * - success: busy-loop until counter drops to zero, then exit with resolve - * - failure: - * - offender is valid counter update: try again - * - offender is OOM-during-evac: busy loop until counter drops to - * zero, then exit with resolve - */ -class ShenandoahEvacOOMHandler { -private: - const int _num_counters; - - shenandoah_padding(0); - ShenandoahEvacOOMCounter* _threads_in_evac; - - ShenandoahEvacOOMCounter* counter_for_thread(Thread* t); - - void wait_for_no_evac_threads(); - void wait_for_one_counter(ShenandoahEvacOOMCounter* ptr); - - static uint64_t hash_pointer(const void* p); - static int calc_num_counters(); -public: - ShenandoahEvacOOMHandler(); - - /** - * Attempt to enter the protected evacuation path. - * - * When this returns true, it is safe to continue with normal evacuation. - * When this method returns false, evacuation must not be entered, and caller - * may safely continue with a simple resolve (if Java thread). - */ - inline void enter_evacuation(Thread* t); - - /** - * Leave evacuation path. - */ - inline void leave_evacuation(Thread* t); - - /** - * Signal out-of-memory during evacuation. It will prevent any other threads - * from entering the evacuation path, then wait until all threads have left the - * evacuation path, and then return. It is then safe to continue with a simple resolve. - */ - void handle_out_of_memory_during_evacuation(); - - void clear(); - -private: - // Register/Unregister thread to evacuation OOM protocol - void register_thread(Thread* t); - void unregister_thread(Thread* t); -}; - -class ShenandoahEvacOOMScope : public StackObj { -private: - Thread* const _thread; - -public: - inline ShenandoahEvacOOMScope(); - inline ShenandoahEvacOOMScope(Thread* t); - inline ~ShenandoahEvacOOMScope(); -}; - -#endif // SHARE_GC_SHENANDOAH_SHENANDOAHEVACOOMHANDLER_HPP diff --git a/src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.inline.hpp b/src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.inline.hpp deleted file mode 100644 index 4bd4381068a..00000000000 --- a/src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.inline.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2020, Red Hat, 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. - * - */ - -#ifndef SHARE_GC_SHENANDOAH_SHENANDOAHEVACOOMHANDLER_INLINE_HPP -#define SHARE_GC_SHENANDOAH_SHENANDOAHEVACOOMHANDLER_INLINE_HPP - -#include "gc/shenandoah/shenandoahEvacOOMHandler.hpp" - -#include "gc/shenandoah/shenandoahHeap.inline.hpp" -#include "gc/shenandoah/shenandoahThreadLocalData.hpp" - -jint ShenandoahEvacOOMCounter::load_acquire() { - return _bits.load_acquire(); -} - -jint ShenandoahEvacOOMCounter::unmasked_count() { - return _bits.load_acquire() & ~OOM_MARKER_MASK; -} - -void ShenandoahEvacOOMHandler::enter_evacuation(Thread* thr) { - uint8_t level = ShenandoahThreadLocalData::push_evac_oom_scope(thr); - if (level == 0) { - // Entering top level scope, register this thread. - register_thread(thr); - } else if (!ShenandoahThreadLocalData::is_oom_during_evac(thr)) { - ShenandoahEvacOOMCounter* counter = counter_for_thread(thr); - jint threads_in_evac = counter->load_acquire(); - // If OOM is in progress, handle it. - if ((threads_in_evac & ShenandoahEvacOOMCounter::OOM_MARKER_MASK) != 0) { - counter->decrement(); - wait_for_no_evac_threads(); - } - } -} - -void ShenandoahEvacOOMHandler::leave_evacuation(Thread* thr) { - uint8_t level = ShenandoahThreadLocalData::pop_evac_oom_scope(thr); - // Not top level, just return - if (level > 1) { - return; - } - - // Leaving top level scope, unregister this thread. - unregister_thread(thr); -} - -ShenandoahEvacOOMScope::ShenandoahEvacOOMScope() : - _thread(Thread::current()) { - ShenandoahHeap::heap()->enter_evacuation(_thread); -} - -ShenandoahEvacOOMScope::ShenandoahEvacOOMScope(Thread* t) : - _thread(t) { - ShenandoahHeap::heap()->enter_evacuation(_thread); -} - -ShenandoahEvacOOMScope::~ShenandoahEvacOOMScope() { - ShenandoahHeap::heap()->leave_evacuation(_thread); -} - -#endif // SHARE_GC_SHENANDOAH_SHENANDOAHEVACOOMHANDLER_INLINE_HPP diff --git a/src/hotspot/share/gc/shenandoah/shenandoahForwarding.hpp b/src/hotspot/share/gc/shenandoah/shenandoahForwarding.hpp index fb57c55e09a..6f2f124f6b1 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahForwarding.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahForwarding.hpp @@ -25,43 +25,68 @@ #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHFORWARDING_HPP #define SHARE_GC_SHENANDOAH_SHENANDOAHFORWARDING_HPP +#include "oops/markWord.hpp" #include "oops/oop.hpp" #include "utilities/globalDefinitions.hpp" class ShenandoahForwarding { public: - /* Gets forwardee from the given object. + /* Gets forwardee from the given object. For a self-forwarded object + * (evacuation failure), returns the object itself. */ static inline oop get_forwardee(oop obj); /* Gets forwardee from the given object. Only from mutator thread. + * For a self-forwarded object, returns the object itself. */ static inline oop get_forwardee_mutator(oop obj); - /* Returns the raw value from forwardee slot. + /* Returns the raw value from forwardee slot. For a self-forwarded + * object, returns the object itself. */ static inline oop get_forwardee_raw(oop obj); /* Returns the raw value from forwardee slot without any checks. - * Used for quick verification. + * Used for quick verification. For a self-forwarded object, + * returns the object itself. */ static inline oop get_forwardee_raw_unchecked(oop obj); /** - * Returns true if the object is forwarded, false otherwise. + * Returns true if the object is forwarded (including self-forwarded), + * false otherwise. */ static inline bool is_forwarded(oop obj); + /** + * Returns true iff obj has been self-forwarded (i.e. evacuation has + * failed for this object in the current cycle). + */ + static inline bool is_self_forwarded(oop obj); + /* Tries to atomically update forwardee in $holder object to $update. * Assumes $holder points at itself. * Asserts $holder is in from-space. * Asserts $update is in to-space. * * Returns the new object 'update' upon success, or - * the new forwardee that a competing thread installed. + * the new forwardee that a competing thread installed. If another + * thread self-forwarded the object, returns the object itself. */ static inline oop try_update_forwardee(oop obj, oop update); + /* Tries to atomically self-forward obj. Used by the evacuation path + * when the copy allocation fails: the failing thread installs the + * self-forwarded bit so other threads see the object as "already + * handled" and return it unchanged. + * + * Returns nullptr on success (we installed the self-forward), or + * the winning forwardee when another thread raced ahead (either a + * real forwardee pointing at a copy, or obj itself if the winner + * also self-forwarded). + */ + static inline oop try_forward_to_self(oop obj, markWord old_mark); + static inline size_t size(oop obj); static inline Klass* klass(oop obj); }; diff --git a/src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp b/src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp index ccdbb81f33b..6bb58920eb9 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp @@ -48,6 +48,8 @@ inline oop ShenandoahForwarding::get_forwardee_raw_unchecked(oop obj) { return cast_to_oop(fwdptr); } } + // Self-forwarded (evacuation failure): the object stays put; the + // self-fwd bit is set alongside normal lock bits. return obj; } @@ -61,9 +63,9 @@ inline oop ShenandoahForwarding::get_forwardee_mutator(oop obj) { HeapWord* fwdptr = (HeapWord*) mark.clear_lock_bits().to_pointer(); assert(fwdptr != nullptr, "Forwarding pointer is never null here"); return cast_to_oop(fwdptr); - } else { - return obj; } + // Self-forwarded or not forwarded: return the object itself. + return obj; } inline oop ShenandoahForwarding::get_forwardee(oop obj) { @@ -72,7 +74,11 @@ inline oop ShenandoahForwarding::get_forwardee(oop obj) { } inline bool ShenandoahForwarding::is_forwarded(oop obj) { - return obj->mark().is_marked(); + return obj->mark().is_forwarded(); +} + +inline bool ShenandoahForwarding::is_self_forwarded(oop obj) { + return obj->mark().is_self_forwarded(); } inline oop ShenandoahForwarding::try_update_forwardee(oop obj, oop update) { @@ -80,14 +86,50 @@ inline oop ShenandoahForwarding::try_update_forwardee(oop obj, oop update) { if (old_mark.is_marked()) { return cast_to_oop(old_mark.clear_lock_bits().to_pointer()); } + if (old_mark.is_self_forwarded()) { + // Another thread lost the evacuation race; the object stays put. + return obj; + } markWord new_mark = markWord::encode_pointer_as_mark(update); markWord prev_mark = obj->cas_set_mark(new_mark, old_mark, memory_order_conservative); if (prev_mark == old_mark) { return update; - } else { + } + // Concurrent writers on a cset object's mark can only be other evacuation + // threads installing forwarding (real or self). Mutators cannot reach the + // mark of a not-yet-forwarded cset object: LRB + stack watermark barriers + // redirect all reference uses before a Java-level operation can touch it. + // So the only possible failure modes are a regular forwardee (marked) or + // a self-forward (possibly with mutator lock/hash mods layered on top + // after the self-forward became visible). + if (prev_mark.is_marked()) { return cast_to_oop(prev_mark.clear_lock_bits().to_pointer()); } + assert(prev_mark.is_self_forwarded(), + "concurrent writers on cset objects must install forwarding: prev=" INTPTR_FORMAT, + prev_mark.value()); + return obj; +} + +inline oop ShenandoahForwarding::try_forward_to_self(oop obj, markWord old_mark) { + assert(!old_mark.is_forwarded(), + "caller must pass a non-forwarded mark: old=" INTPTR_FORMAT, old_mark.value()); + markWord new_mark = old_mark.set_self_forwarded(); + markWord prev_mark = obj->cas_set_mark(new_mark, old_mark, memory_order_conservative); + if (prev_mark == old_mark) { + // We installed the self-forward. + return nullptr; + } + // Same invariant as in try_update_forwardee: the only races on a + // cset object's mark come from other evac threads installing forwarding. + if (prev_mark.is_marked()) { + return cast_to_oop(prev_mark.clear_lock_bits().to_pointer()); + } + assert(prev_mark.is_self_forwarded(), + "concurrent writers on cset objects must install forwarding: prev=" INTPTR_FORMAT, + prev_mark.value()); + return obj; } inline Klass* ShenandoahForwarding::klass(oop obj) { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp index 1807383123b..fdce385e0f6 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp @@ -223,7 +223,9 @@ ShenandoahFreeSetPartitionId ShenandoahFreeSet::prepare_to_promote_in_place(size } inline bool ShenandoahFreeSet::can_allocate_from(ShenandoahHeapRegion *r) const { - return r->is_empty() || (r->is_trash() && !_heap->is_concurrent_weak_root_in_progress()); + const auto state = r->state(); + return ShenandoahHeapRegion::is_empty_state(state) + || (ShenandoahHeapRegion::is_trash(state) && !_heap->is_concurrent_weak_root_in_progress()); } inline bool ShenandoahFreeSet::can_allocate_from(size_t idx) const { @@ -666,7 +668,7 @@ void ShenandoahRegionPartitions::retire_range_from_partition( #ifdef ASSERT ShenandoahHeapRegion* r = ShenandoahHeap::heap()->get_region(idx); assert (in_free_set(partition, idx), "Must be in partition to remove from partition"); - assert(r->is_empty() || r->is_trash(), "Region must be empty or trash"); + assert(r->is_empty_or_trash(), "Region must be empty or trash"); #endif _membership[int(partition)].clear_bit(idx); } @@ -2822,7 +2824,7 @@ size_t ShenandoahFreeSet::reserve_regions(size_t to_reserve, size_t to_reserve_o // be collected in the near future. if (r->is_trash() || !r->is_affiliated()) { // OLD regions that have available memory are already in the old_collector free set. - assert(r->is_empty() || r->is_trash(), "Not affiliated implies region %zu is empty", r->index()); + assert(r->is_empty_or_trash(), "Not affiliated implies region %zu is empty", r->index()); if (idx < old_collector_low_idx) { old_collector_low_idx = idx; } @@ -3166,7 +3168,7 @@ void ShenandoahFreeSet::log_status() { size_t free = alloc_capacity(r); max = MAX2(max, free); size_t used_in_region = r->used(); - if (r->is_empty() || r->is_trash()) { + if (r->is_empty_or_trash()) { used_in_region = 0; total_free_ext += free; if (last_idx + 1 == idx) { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp index eeff0fde87c..f7ba1f05f47 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp @@ -680,32 +680,18 @@ public: } inline size_t get_bytes_allocated_since_previous_sample() { - size_t total_bytes = get_total_bytes_allocated(); - size_t result; - if (total_bytes < _mutator_bytes_at_last_sample) { - // This rare condition may occur if bytes allocated overflows (wraps around) size_t tally of allocations. - // This may also occur in the very rare situation that get_total_bytes_allocated() is queried in the middle of - // reset_bytes_allocated_since_gc_start(). Note that there is no lock to assure that the two global variables - // it modifies are modified atomically (_total_bytes_previously_allocated and _mutator_byts_allocated_since_gc_start) - // This has been observed to occur when an out-of-cycle degenerated cycle is starting (and thus calls - // reset_bytes_allocated_since_gc_start()) at the same time that the control (non-generational mode) or - // regulator (generational-mode) thread calls should_start_gc() (which invokes get_bytes_allocated_since_previous_sample()). - // - // Handle this rare situation by responding with the "innocent" value 0 and resetting internal state so that the - // the next query can recalibrate. - result = 0; - } else { - // Note: there's always the possibility that the tally of total allocations exceeds the 64-bit capacity of our size_t - // counter. We assume that the difference between relevant samples does not exceed this count. Example: - // Suppose _mutator_words_at_last_sample is 0xffff_ffff_ffff_fff0 (18,446,744,073,709,551,600 Decimal) - // and _total_words is 0x0000_0000_0000_0800 ( 32,768 Decimal) - // Then, total_words - _mutator_words_at_last_sample can be done adding 1's complement of subtrahend: - // 1's complement of _mutator_words_at_last_sample is: 0x0000_0000_0000_0010 ( 16 Decimal)) - // plus total_words: 0x0000_0000_0000_0800 (32,768 Decimal) - // sum: 0x0000_0000_0000_0810 (32,784 Decimal) - result = total_bytes - _mutator_bytes_at_last_sample; - } - _mutator_bytes_at_last_sample = total_bytes; + const size_t total_bytes_allocated = get_total_bytes_allocated(); + // total_bytes_allocated could overflow (wraps around) size_t in rare condition, we are relying on + // wrap-around arithmetic of size_t type to produce meaningful result when total_bytes_allocated overflows + // its 64-bit counter. The expression below is equivalent to code: + // if (total_bytes < _mutator_bytes_at_last_sample) { + // // overflow + // return total_bytes + (SIZE_T_MAX - _mutator_bytes_at_last_sample) + 1; + // } else { + // return total_bytes - _mutator_bytes_at_last_sample; + // } + const size_t result = total_bytes_allocated - _mutator_bytes_at_last_sample; + _mutator_bytes_at_last_sample = total_bytes_allocated; return result; } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahFullGC.cpp b/src/hotspot/share/gc/shenandoah/shenandoahFullGC.cpp index 21b1fd9e0a8..365226a054c 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahFullGC.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahFullGC.cpp @@ -137,6 +137,15 @@ void ShenandoahFullGC::op_full(GCCause::Cause cause) { void ShenandoahFullGC::do_it(GCCause::Cause gc_cause) { ShenandoahHeap* heap = ShenandoahHeap::heap(); + // A full GC may be entered directly, or as an upgrade from a failed + // degenerated GC. In the latter case, self-forwarded objects may be + // present from the failed evacuation. Drain those marks before any phase + // (verify, update_roots, phase1_mark_heap) walks headers. + { + ShenandoahGCPhase phase(ShenandoahPhaseTimings::full_gc_un_self_forward); + heap->un_self_forward_cset_regions(); + } + if (heap->mode()->is_generational()) { ShenandoahGenerationalFullGC::prepare(); } @@ -261,11 +270,13 @@ void ShenandoahFullGC::do_it(GCCause::Cause gc_cause) { for (uint i = 0; i < heap->max_workers(); i++) { delete worker_slices[i]; } - FREE_C_HEAP_ARRAY(ShenandoahHeapRegionSet*, worker_slices); + FREE_C_HEAP_ARRAY(worker_slices); heap->set_full_gc_move_in_progress(false); heap->set_full_gc_in_progress(false); + DEBUG_ONLY(heap->assert_no_self_forwards()); + if (ShenandoahVerify) { heap->verifier()->verify_after_fullgc(_generation); } @@ -688,7 +699,7 @@ void ShenandoahFullGC::distribute_slices(ShenandoahHeapRegionSet** worker_slices } } - FREE_C_HEAP_ARRAY(size_t, live); + FREE_C_HEAP_ARRAY(live); #ifdef ASSERT ResourceBitMap map(n_regions); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp b/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp index 5b26ee67653..493736f4194 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp @@ -284,15 +284,6 @@ void ShenandoahGeneration::prepare_regions_and_collection_set(bool concurrent) { // along with the census done during marking, and compute the tenuring threshold. ShenandoahAgeCensus* census = ShenandoahGenerationalHeap::heap()->age_census(); census->update_census(age0_pop); -#ifndef PRODUCT - size_t total_pop = age0_cl.get_total_population(); - size_t total_census = census->get_total(); - // Usually total_pop > total_census, but not by too much. - // We use integer division so anything up to just less than 2 is considered - // reasonable, and the "+1" is to avoid divide-by-zero. - assert((total_pop+1)/(total_census+1) == 1, "Extreme divergence: " - "%zu/%zu", total_pop, total_census); -#endif } { @@ -303,8 +294,20 @@ void ShenandoahGeneration::prepare_regions_and_collection_set(bool concurrent) { ShenandoahHeapLocker locker(heap->lock()); heap->assert_pinned_region_status(this); _heuristics->choose_collection_set(collection_set); - } + if (is_generational && is_global()) { + // We have finished marking the entire heap. The mark bitmap covering old regions is complete, so + // the remembered set scan can use that to avoid walking into garbage. When the next old mark begins, we will + // use the mark bitmap to make the old regions parsable by coalescing and filling any unmarked objects. Thus, + // we prepare for old collections by remembering which regions are old at this time. Note that any objects + // promoted into old regions will be above TAMS, and so will be considered marked. However, free regions that + // become old after this point will not be covered correctly by the mark bitmap, so we must be careful not to + // coalesce those regions. Only the old regions which are not part of the collection set at this point are + // eligible for coalescing. As implemented now, this has the side effect of possibly initiating mixed-evacuations + // after a global cycle for old regions that were not included in this collection set. + heap->old_generation()->transition_old_generation_after_global_gc(); + } + } { ShenandoahGCPhase phase(concurrent ? ShenandoahPhaseTimings::final_rebuild_freeset : diff --git a/src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp b/src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp index bbad82de1dc..bc2028d077d 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp @@ -580,7 +580,7 @@ void ShenandoahGenerationalControlThread::service_concurrent_cycle(ShenandoahGen assert(generation->is_global(), "If not young, must be GLOBAL"); assert(!do_old_gc_bootstrap, "Do not bootstrap with GLOBAL GC"); if (_heap->cancelled_gc()) { - msg = "At end of Interrupted Concurrent GLOBAL GC"; + msg = "At end of Interrupted Concurrent Global GC"; } else { // We only record GC results if GC was successful msg = "At end of Concurrent Global GC"; diff --git a/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp b/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp index ca15c6db443..750022b274e 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp @@ -63,7 +63,7 @@ ShenandoahGenerationalEvacuationTask::ShenandoahGenerationalEvacuationTask(Shena void ShenandoahGenerationalEvacuationTask::work(uint worker_id) { if (_concurrent) { ShenandoahConcurrentWorkerSession worker_session(worker_id); - ShenandoahSuspendibleThreadSetJoiner stsj; + SuspendibleThreadSetJoiner stsj; do_work(); } else { ShenandoahParallelWorkerSession worker_session(worker_id); @@ -73,12 +73,10 @@ void ShenandoahGenerationalEvacuationTask::work(uint worker_id) { void ShenandoahGenerationalEvacuationTask::do_work() { if (_only_promote_regions) { - // No allocations will be made, do not enter oom-during-evac protocol. assert(_heap->collection_set()->is_empty(), "Should not have a collection set here"); promote_regions(); } else { assert(!_heap->collection_set()->is_empty(), "Should have a collection set here"); - ShenandoahEvacOOMScope oom_evac_scope; evacuate_and_promote_regions(); } } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp b/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp index 1694121b955..f203a8d1238 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp @@ -199,13 +199,6 @@ void ShenandoahGenerationalHeap::promote_regions_in_place(ShenandoahGeneration* oop ShenandoahGenerationalHeap::evacuate_object(oop p, Thread* thread) { assert(thread == Thread::current(), "Expected thread parameter to be current thread."); - if (ShenandoahThreadLocalData::is_oom_during_evac(thread)) { - // This thread went through the OOM during evac protocol and it is safe to return - // the forward pointer. It must not attempt to evacuate anymore. - return ShenandoahBarrierSet::resolve_forwarded(p); - } - - assert(ShenandoahThreadLocalData::is_evac_allowed(thread), "must be enclosed in oom-evac scope"); ShenandoahHeapRegion* from_region = heap_region_containing(p); assert(!from_region->is_humongous(), "never evacuate humongous objects"); @@ -329,8 +322,23 @@ oop ShenandoahGenerationalHeap::try_evacuate_object(oop p, Thread* thread, uint } control_thread()->handle_alloc_failure_evac(size); - oom_evac_handler()->handle_out_of_memory_during_evacuation(); - return ShenandoahBarrierSet::resolve_forwarded(p); + + // Install the self-forwarded bit so other evacuators/LRBs see the + // object as "already handled, do not try to evacuate". The CAS may + // fail if another thread concurrently installed a real forwardee or + // self-forwarded first. + markWord old_mark = p->mark(); + if (old_mark.is_forwarded()) { + return ShenandoahForwarding::get_forwardee(p); + } + oop winner = ShenandoahForwarding::try_forward_to_self(p, old_mark); + if (winner == nullptr) { + // We own the self-forwarding. Flag the from-region so the degen/full + // GC entry drain knows to scan it for self_fwd bits to clear. + heap_region_containing(p)->set_has_self_forwards(); + return p; + } + return winner; } if (ShenandoahEvacTracking) { @@ -717,7 +725,7 @@ public: void work(uint worker_id) override { if (CONCURRENT) { ShenandoahConcurrentWorkerSession worker_session(worker_id); - ShenandoahSuspendibleThreadSetJoiner stsj; + SuspendibleThreadSetJoiner stsj; do_work(worker_id); } else { ShenandoahParallelWorkerSession worker_session(worker_id); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp index 4b01ea1cd52..2bedc53e24b 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp @@ -62,6 +62,7 @@ #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp" #include "gc/shenandoah/shenandoahMemoryPool.hpp" #include "gc/shenandoah/shenandoahMonitoringSupport.hpp" +#include "gc/shenandoah/shenandoahObjArrayAllocator.hpp" #include "gc/shenandoah/shenandoahOldGeneration.hpp" #include "gc/shenandoah/shenandoahPadding.hpp" #include "gc/shenandoah/shenandoahParallelCleaning.inline.hpp" @@ -1073,6 +1074,11 @@ HeapWord* ShenandoahHeap::mem_allocate(size_t size) { return allocate_memory(req); } +oop ShenandoahHeap::array_allocate(Klass* klass, size_t size, int length, bool do_zero, TRAPS) { + ShenandoahObjArrayAllocator allocator(klass, size, length, do_zero, THREAD); + return allocator.allocate(); +} + MetaWord* ShenandoahHeap::satisfy_failed_metadata_allocation(ClassLoaderData* loader_data, size_t size, Metaspace::MetadataType mdtype) { @@ -1143,12 +1149,10 @@ public: void work(uint worker_id) { if (_concurrent) { ShenandoahConcurrentWorkerSession worker_session(worker_id); - ShenandoahSuspendibleThreadSetJoiner stsj; - ShenandoahEvacOOMScope oom_evac_scope; + SuspendibleThreadSetJoiner stsj; do_work(); } else { ShenandoahParallelWorkerSession worker_session(worker_id); - ShenandoahEvacOOMScope oom_evac_scope; do_work(); } } @@ -1296,13 +1300,6 @@ void ShenandoahHeap::concurrent_final_roots(HandshakeClosure* handshake_closure) oop ShenandoahHeap::evacuate_object(oop p, Thread* thread) { assert(thread == Thread::current(), "Expected thread parameter to be current thread."); - if (ShenandoahThreadLocalData::is_oom_during_evac(thread)) { - // This thread went through the OOM during evac protocol. It is safe to return - // the forward pointer. It must not attempt to evacuate any other objects. - return ShenandoahBarrierSet::resolve_forwarded(p); - } - - assert(ShenandoahThreadLocalData::is_evac_allowed(thread), "must be enclosed in oom-evac scope"); ShenandoahHeapRegion* r = heap_region_containing(p); assert(!r->is_humongous(), "never evacuate humongous objects"); @@ -1341,9 +1338,22 @@ oop ShenandoahHeap::try_evacuate_object(oop p, Thread* thread, ShenandoahHeapReg if (copy == nullptr) { control_thread()->handle_alloc_failure_evac(size); - _oom_evac_handler.handle_out_of_memory_during_evacuation(); - - return ShenandoahBarrierSet::resolve_forwarded(p); + // Install the self-forwarded bit on p so other evacuators/LRBs see + // the object as "already handled, do not try to evacuate". The CAS + // may fail if another thread concurrently installed a real forwardee + // (they succeeded where we failed) or self-forwarded first. + markWord old_mark = p->mark(); + if (old_mark.is_forwarded()) { + return ShenandoahForwarding::get_forwardee(p); + } + oop winner = ShenandoahForwarding::try_forward_to_self(p, old_mark); + if (winner == nullptr) { + // We own the self-forwarding. Flag the region so the degen/full GC + // entry drain knows to scan it for self_fwd bits to clear. + from_region->set_has_self_forwards(); + return p; + } + return winner; } if (ShenandoahEvacTracking) { @@ -1398,6 +1408,71 @@ oop ShenandoahHeap::try_evacuate_object(oop p, Thread* thread, ShenandoahHeapReg } } +// Clear the self_fwd bit on a live cset object, if set. Runs at a safepoint, +// so a plain store is sufficient — no concurrent writers to the mark word. +class ShenandoahUnSelfForwardObjectClosure : public ObjectClosure { +public: + void do_object(oop obj) override { + markWord m = obj->mark(); + if (m.is_self_forwarded()) { + obj->set_mark(m.unset_self_forwarded()); + } + } +}; + +// Parallel task over flagged cset regions. Iterates the live objects via the +// mark bitmap (skipping evacuated and never-marked memory), clears self_fwd +// bits, and resets the region flag once done. +class ShenandoahUnSelfForwardTask : public WorkerTask { +private: + ShenandoahHeap* const _heap; + ShenandoahCollectionSet* const _cs; + +public: + ShenandoahUnSelfForwardTask(ShenandoahHeap* heap, ShenandoahCollectionSet* cs) : + WorkerTask("Shenandoah Un-Self-Forward"), + _heap(heap), + _cs(cs) {} + + void work(uint worker_id) override { + ShenandoahParallelWorkerSession worker_session(worker_id); + ShenandoahUnSelfForwardObjectClosure cl; + ShenandoahHeapRegion* r; + while ((r = _cs->claim_next()) != nullptr) { + if (r->has_self_forwards()) { + _heap->marked_object_iterate(r, &cl); + r->clear_has_self_forwards(); + } + } + } +}; + +void ShenandoahHeap::un_self_forward_cset_regions() { + assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "must be at safepoint"); + ShenandoahCollectionSet* cs = collection_set(); + if (cs == nullptr || cs->is_empty()) { + return; + } + cs->clear_current_index(); + ShenandoahUnSelfForwardTask task(this, cs); + workers()->run_task(&task); + DEBUG_ONLY(assert_no_self_forwards()); +} + +#ifdef ASSERT +void ShenandoahHeap::assert_no_self_forwards() const { + assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "must be at safepoint"); + ShenandoahCollectionSet* cs = collection_set(); + if (cs == nullptr) return; + cs->clear_current_index(); + ShenandoahHeapRegion* r; + while ((r = cs->next()) != nullptr) { + assert(!r->has_self_forwards(), "region still flagged after drain"); + } + cs->clear_current_index(); +} +#endif + void ShenandoahHeap::trash_cset_regions() { ShenandoahHeapLocker locker(lock()); @@ -2279,6 +2354,11 @@ void ShenandoahHeap::stw_unload_classes(bool full_gc) { } // Resize and verify metaspace MetaspaceGC::compute_new_size(); + + if (mode()->is_generational()) { + old_generation()->set_parsable(false); + } + DEBUG_ONLY(MetaspaceUtils::verify();) } @@ -2345,24 +2425,23 @@ address ShenandoahHeap::in_cset_fast_test_addr() { void ShenandoahHeap::reset_bytes_allocated_since_gc_start() { // It is important to force_alloc_rate_sample() before the associated generation's bytes_allocated has been reset. - // Note that there is no lock to prevent additional alloations between sampling bytes_allocated_since_gc_start() and - // reset_bytes_allocated_since_gc_start(). If additional allocations happen, they will be ignored in the average - // allocation rate computations. This effect is considered to be be negligible. - - // unaccounted_bytes is the bytes not accounted for by our forced sample. If the sample interval is too short, - // the "forced sample" will not happen, and any recently allocated bytes are "unaccounted for". We pretend these - // bytes are allocated after the start of subsequent gc. - size_t unaccounted_bytes; - ShenandoahFreeSet* _free_set = free_set(); - size_t bytes_allocated = _free_set->get_bytes_allocated_since_gc_start(); - if (mode()->is_generational()) { - unaccounted_bytes = young_generation()->heuristics()->force_alloc_rate_sample(bytes_allocated); - } else { - // Single-gen Shenandoah uses global heuristics. - unaccounted_bytes = heuristics()->force_alloc_rate_sample(bytes_allocated); + // Note that we obtain heap lock to prevent additional allocations between sampling bytes_allocated_since_gc_start() + // and reset_bytes_allocated_since_gc_start() + { + ShenandoahHeapLocker locker(lock()); + // unaccounted_bytes is the bytes not accounted for by our forced sample. If the sample interval is too short, + // the "forced sample" will not happen, and any recently allocated bytes are "unaccounted for". We pretend these + // bytes are allocated after the start of subsequent gc. + size_t unaccounted_bytes; + size_t bytes_allocated = _free_set->get_bytes_allocated_since_gc_start(); + if (mode()->is_generational()) { + unaccounted_bytes = young_generation()->heuristics()->force_alloc_rate_sample(bytes_allocated); + } else { + // Single-gen Shenandoah uses global heuristics. + unaccounted_bytes = heuristics()->force_alloc_rate_sample(bytes_allocated); + } + _free_set->reset_bytes_allocated_since_gc_start(unaccounted_bytes); } - ShenandoahHeapLocker locker(lock()); - _free_set->reset_bytes_allocated_since_gc_start(unaccounted_bytes); } void ShenandoahHeap::set_degenerated_gc_in_progress(bool in_progress) { @@ -2497,7 +2576,7 @@ public: void work(uint worker_id) { if (CONCURRENT) { ShenandoahConcurrentWorkerSession worker_session(worker_id); - ShenandoahSuspendibleThreadSetJoiner stsj; + SuspendibleThreadSetJoiner stsj; do_work(worker_id); } else { ShenandoahParallelWorkerSession worker_session(worker_id); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp b/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp index bed26a093d0..fa435eaa1be 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp @@ -33,7 +33,6 @@ #include "gc/shenandoah/shenandoahAllocRequest.hpp" #include "gc/shenandoah/shenandoahAsserts.hpp" #include "gc/shenandoah/shenandoahController.hpp" -#include "gc/shenandoah/shenandoahEvacOOMHandler.hpp" #include "gc/shenandoah/shenandoahEvacTracker.hpp" #include "gc/shenandoah/shenandoahGenerationType.hpp" #include "gc/shenandoah/shenandoahLock.hpp" @@ -558,8 +557,6 @@ public: ShenandoahPhaseTimings* phase_timings() const { return _phase_timings; } - ShenandoahEvacOOMHandler* oom_evac_handler() { return &_oom_evac_handler; } - ShenandoahEvacuationTracker* evac_tracker() const { return _evac_tracker; } @@ -709,6 +706,7 @@ private: public: HeapWord* allocate_memory(ShenandoahAllocRequest& request); HeapWord* mem_allocate(size_t size) override; + oop array_allocate(Klass* klass, size_t size, int length, bool do_zero, TRAPS) override; MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data, size_t size, Metaspace::MetadataType mdtype) override; @@ -792,7 +790,6 @@ public: // private: ShenandoahCollectionSet* _collection_set; - ShenandoahEvacOOMHandler _oom_evac_handler; oop try_evacuate_object(oop src, Thread* thread, ShenandoahHeapRegion* from_region, ShenandoahAffiliation target_gen); @@ -812,12 +809,16 @@ public: inline bool in_collection_set_loc(void* loc) const; // Evacuates or promotes object src. Returns the evacuated object, either evacuated - // by this thread, or by some other thread. + // by this thread, or by some other thread. On allocation failure, installs the + // self-forwarded bit on src, flags src's region, and returns src. virtual oop evacuate_object(oop src, Thread* thread); - // Call before/after evacuation. - inline void enter_evacuation(Thread* t); - inline void leave_evacuation(Thread* t); + // Parallel scan of flagged cset regions to clear self-forwarded bits on live + // objects. Must be called at a safepoint; intended for the degenerated and + // full GC entry paths. + void un_self_forward_cset_regions(); + + DEBUG_ONLY(void assert_no_self_forwards() const;) // ---------- Helper functions // diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp b/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp index 6d77cccaa6a..b8db14e5ee7 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp @@ -100,14 +100,6 @@ inline ShenandoahHeapRegion* ShenandoahHeap::heap_region_containing(const void* return result; } -inline void ShenandoahHeap::enter_evacuation(Thread* t) { - _oom_evac_handler.enter_evacuation(t); -} - -inline void ShenandoahHeap::leave_evacuation(Thread* t) { - _oom_evac_handler.leave_evacuation(t); -} - template inline void ShenandoahHeap::non_conc_update_with_forwarded(T* p) { T o = RawAccess<>::oop_load(p); @@ -272,7 +264,6 @@ inline GCCause::Cause ShenandoahHeap::cancelled_cause() const { inline void ShenandoahHeap::clear_cancelled_gc() { _cancelled_gc.set(GCCause::_no_gc); reset_cancellation_time(); - _oom_evac_handler.clear(); } inline GCCause::Cause ShenandoahHeap::clear_cancellation(const GCCause::Cause expected) { @@ -455,7 +446,7 @@ inline bool ShenandoahHeap::in_collection_set_loc(void* p) const { } inline char ShenandoahHeap::gc_state() const { - return _gc_state.raw_value(); + return integer_cast(_gc_state.raw_value()); } inline bool ShenandoahHeap::is_gc_state(GCState state) const { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp index c031569b7c6..c5b9c929eed 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp @@ -90,6 +90,7 @@ ShenandoahHeapRegion::ShenandoahHeapRegion(HeapWord* start, size_t index, bool c SpaceMangler::mangle_region(MemRegion(_bottom, _end)); } _recycling.unset(); + _has_self_forwards.unset(); } void ShenandoahHeapRegion::report_illegal_transition(const char *method) { @@ -572,12 +573,13 @@ void ShenandoahHeapRegion::recycle_internal() { reset_alloc_metadata(); heap->marking_context()->reset_top_at_mark_start(this); set_update_watermark(bottom()); + clear_has_self_forwards(); if (is_old()) { heap->old_generation()->clear_cards_for(this); } if (ZapUnusedHeapArea) { - SpaceMangler::mangle_region(MemRegion(bottom(), end())); + SpaceMangler::mangle_region(MemRegion(bottom(), top())); } set_top(bottom()); set_affiliation(FREE); @@ -668,13 +670,6 @@ size_t ShenandoahHeapRegion::block_size(const HeapWord* p) const { } size_t ShenandoahHeapRegion::setup_sizes(size_t max_heap_size) { - // Absolute minimums we should not ever break. - static const size_t MIN_REGION_SIZE = 256*K; - - if (FLAG_IS_DEFAULT(ShenandoahMinRegionSize)) { - FLAG_SET_DEFAULT(ShenandoahMinRegionSize, MIN_REGION_SIZE); - } - // Generational Shenandoah needs this alignment for card tables. if (strcmp(ShenandoahGCMode, "generational") == 0) { max_heap_size = align_up(max_heap_size , CardTable::ct_max_alignment_constraint()); @@ -682,47 +677,13 @@ size_t ShenandoahHeapRegion::setup_sizes(size_t max_heap_size) { size_t region_size; if (FLAG_IS_DEFAULT(ShenandoahRegionSize)) { - if (ShenandoahMinRegionSize > max_heap_size / MIN_NUM_REGIONS) { - err_msg message("Max heap size (%zu%s) is too low to afford the minimum number " - "of regions (%zu) of minimum region size (%zu%s).", - byte_size_in_proper_unit(max_heap_size), proper_unit_for_byte_size(max_heap_size), - MIN_NUM_REGIONS, - byte_size_in_proper_unit(ShenandoahMinRegionSize), proper_unit_for_byte_size(ShenandoahMinRegionSize)); - vm_exit_during_initialization("Invalid -XX:ShenandoahMinRegionSize option", message); - } - if (ShenandoahMinRegionSize < MIN_REGION_SIZE) { - err_msg message("%zu%s should not be lower than minimum region size (%zu%s).", - byte_size_in_proper_unit(ShenandoahMinRegionSize), proper_unit_for_byte_size(ShenandoahMinRegionSize), - byte_size_in_proper_unit(MIN_REGION_SIZE), proper_unit_for_byte_size(MIN_REGION_SIZE)); - vm_exit_during_initialization("Invalid -XX:ShenandoahMinRegionSize option", message); - } - if (ShenandoahMinRegionSize < MinTLABSize) { - err_msg message("%zu%s should not be lower than TLAB size size (%zu%s).", - byte_size_in_proper_unit(ShenandoahMinRegionSize), proper_unit_for_byte_size(ShenandoahMinRegionSize), - byte_size_in_proper_unit(MinTLABSize), proper_unit_for_byte_size(MinTLABSize)); - vm_exit_during_initialization("Invalid -XX:ShenandoahMinRegionSize option", message); - } - if (ShenandoahMaxRegionSize < MIN_REGION_SIZE) { - err_msg message("%zu%s should not be lower than min region size (%zu%s).", - byte_size_in_proper_unit(ShenandoahMaxRegionSize), proper_unit_for_byte_size(ShenandoahMaxRegionSize), - byte_size_in_proper_unit(MIN_REGION_SIZE), proper_unit_for_byte_size(MIN_REGION_SIZE)); - vm_exit_during_initialization("Invalid -XX:ShenandoahMaxRegionSize option", message); - } - if (ShenandoahMinRegionSize > ShenandoahMaxRegionSize) { - err_msg message("Minimum (%zu%s) should be larger than maximum (%zu%s).", - byte_size_in_proper_unit(ShenandoahMinRegionSize), proper_unit_for_byte_size(ShenandoahMinRegionSize), - byte_size_in_proper_unit(ShenandoahMaxRegionSize), proper_unit_for_byte_size(ShenandoahMaxRegionSize)); - vm_exit_during_initialization("Invalid -XX:ShenandoahMinRegionSize or -XX:ShenandoahMaxRegionSize", message); - } - // We rapidly expand to max_heap_size in most scenarios, so that is the measure // for usual heap sizes. Do not depend on initial_heap_size here. region_size = max_heap_size / ShenandoahTargetNumRegions; // Now make sure that we don't go over or under our limits. - region_size = MAX2(ShenandoahMinRegionSize, region_size); - region_size = MIN2(ShenandoahMaxRegionSize, region_size); - + region_size = MAX2(MIN_REGION_SIZE, region_size); + region_size = MIN2(MAX_REGION_SIZE, region_size); } else { if (ShenandoahRegionSize > max_heap_size / MIN_NUM_REGIONS) { err_msg message("Max heap size (%zu%s) is too low to afford the minimum number " @@ -732,16 +693,16 @@ size_t ShenandoahHeapRegion::setup_sizes(size_t max_heap_size) { byte_size_in_proper_unit(ShenandoahRegionSize), proper_unit_for_byte_size(ShenandoahRegionSize)); vm_exit_during_initialization("Invalid -XX:ShenandoahRegionSize option", message); } - if (ShenandoahRegionSize < ShenandoahMinRegionSize) { + if (ShenandoahRegionSize < MIN_REGION_SIZE) { err_msg message("Heap region size (%zu%s) should be larger than min region size (%zu%s).", byte_size_in_proper_unit(ShenandoahRegionSize), proper_unit_for_byte_size(ShenandoahRegionSize), - byte_size_in_proper_unit(ShenandoahMinRegionSize), proper_unit_for_byte_size(ShenandoahMinRegionSize)); + byte_size_in_proper_unit(MIN_REGION_SIZE), proper_unit_for_byte_size(MIN_REGION_SIZE)); vm_exit_during_initialization("Invalid -XX:ShenandoahRegionSize option", message); } - if (ShenandoahRegionSize > ShenandoahMaxRegionSize) { + if (ShenandoahRegionSize > MAX_REGION_SIZE) { err_msg message("Heap region size (%zu%s) should be lower than max region size (%zu%s).", byte_size_in_proper_unit(ShenandoahRegionSize), proper_unit_for_byte_size(ShenandoahRegionSize), - byte_size_in_proper_unit(ShenandoahMaxRegionSize), proper_unit_for_byte_size(ShenandoahMaxRegionSize)); + byte_size_in_proper_unit(MAX_REGION_SIZE), proper_unit_for_byte_size(MAX_REGION_SIZE)); vm_exit_during_initialization("Invalid -XX:ShenandoahRegionSize option", message); } region_size = ShenandoahRegionSize; diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp index e27bbbb737d..7853238f080 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp @@ -197,11 +197,13 @@ public: bool is_regular() const { return state() == _regular; } bool is_humongous_continuation() const { return state() == _humongous_cont; } bool is_regular_pinned() const { return state() == _pinned; } - bool is_trash() const { return state() == _trash; } + bool is_trash() const { return is_trash(state()); } // Derived state predicates (boolean combinations of individual states) + bool static is_trash(RegionState state) { return state == _trash; } bool static is_empty_state(RegionState state) { return state == _empty_committed || state == _empty_uncommitted; } bool static is_humongous_start_state(RegionState state) { return state == _humongous_start || state == _pinned_humongous_start; } + bool is_empty_or_trash() const { auto cur_state = state(); return is_empty_state(cur_state) || cur_state == _trash; } bool is_empty() const { return is_empty_state(this->state()); } bool is_active() const { auto cur_state = state(); return !is_empty_state(cur_state) && cur_state != _trash; } bool is_humongous_start() const { return is_humongous_start_state(state()); } @@ -209,6 +211,7 @@ public: bool is_committed() const { return !is_empty_uncommitted(); } bool is_cset() const { auto cur_state = state(); return cur_state == _cset || cur_state == _pinned_cset; } bool is_pinned() const { auto cur_state = state(); return cur_state == _pinned || cur_state == _pinned_cset || cur_state == _pinned_humongous_start; } + bool is_regular_or_regular_pinned() const { auto cur_state = state(); return cur_state == _regular || cur_state == _pinned; } inline bool is_young() const; inline bool is_old() const; @@ -272,12 +275,20 @@ private: ShenandoahSharedFlag _recycling; // Used to indicate that the region is being recycled; see try_recycle*(). + // Set when an evacuation failure self-forwarded at least one object in this + // region. The drain at degen/full GC entry scans flagged regions and CAS- + // clears the self_fwd bits. Safety-net reset on region recycle. + ShenandoahSharedFlag _has_self_forwards; + bool _needs_bitmap_reset; public: ShenandoahHeapRegion(HeapWord* start, size_t index, bool committed); + // Absolute minimums and maximums we should not ever break. static const size_t MIN_NUM_REGIONS = 10; + static const size_t MIN_REGION_SIZE = 256*K; + static const size_t MAX_REGION_SIZE = 32*M; // Return adjusted max heap size static size_t setup_sizes(size_t max_heap_size); @@ -526,6 +537,13 @@ public: _needs_bitmap_reset = false; } + // Self-forward accounting: set by an evacuating thread after it successfully + // installs a self-forward mark on an object in this region. Tested and cleared + // at the drain phase (degen/full GC entry) and again on region recycle. + bool has_self_forwards() const { return _has_self_forwards.is_set(); } + void set_has_self_forwards() { _has_self_forwards.set(); } + void clear_has_self_forwards() { _has_self_forwards.unset(); } + private: void decrement_humongous_waste(); void do_commit(); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegionCounters.cpp b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegionCounters.cpp index aaf152e2890..3e809ea84b9 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegionCounters.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegionCounters.cpp @@ -77,8 +77,8 @@ ShenandoahHeapRegionCounters::ShenandoahHeapRegionCounters() : } ShenandoahHeapRegionCounters::~ShenandoahHeapRegionCounters() { - if (_name_space != nullptr) FREE_C_HEAP_ARRAY(char, _name_space); - if (_regions_data != nullptr) FREE_C_HEAP_ARRAY(PerfVariable*, _regions_data); + if (_name_space != nullptr) FREE_C_HEAP_ARRAY(_name_space); + if (_regions_data != nullptr) FREE_C_HEAP_ARRAY(_regions_data); } void ShenandoahHeapRegionCounters::write_snapshot(PerfLongVariable** regions, diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegionSet.cpp b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegionSet.cpp index 560de816db9..1d2cd97b75d 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegionSet.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegionSet.cpp @@ -47,7 +47,7 @@ ShenandoahHeapRegionSet::ShenandoahHeapRegionSet() : } ShenandoahHeapRegionSet::~ShenandoahHeapRegionSet() { - FREE_C_HEAP_ARRAY(jbyte, _set_map); + FREE_C_HEAP_ARRAY(_set_map); } void ShenandoahHeapRegionSet::add_region(ShenandoahHeapRegion* r) { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahMark.cpp b/src/hotspot/share/gc/shenandoah/shenandoahMark.cpp index a3c28e2c6d3..dfd921fdf0b 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahMark.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahMark.cpp @@ -199,7 +199,7 @@ void ShenandoahMark::mark_loop_work(T* cl, ShenandoahLiveData* live_data, uint w if (work == 0) { // No work encountered in current stride, try to terminate. // Need to leave the STS here otherwise it might block safepoints. - ShenandoahSuspendibleThreadSetLeaver stsl(CANCELLABLE); + SuspendibleThreadSetLeaver stsl(CANCELLABLE); ShenandoahTerminatorTerminator tt(heap); if (terminator->offer_termination(&tt)) return; } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.cpp b/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.cpp index 5867478d734..0b38f6e0cea 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.cpp @@ -140,13 +140,11 @@ void ShenandoahMmuTracker::record_mixed(size_t gcid) { update_utilization(gcid, "Mixed Concurrent GC"); } -void ShenandoahMmuTracker::record_degenerated(size_t gcid, bool is_old_bootstrap) { +void ShenandoahMmuTracker::record_degenerated(size_t gcid, const char* msg) { if ((gcid == _most_recent_gcid) && _most_recent_is_full) { // Do nothing. This is a redundant recording for the full gc that just completed. - } else if (is_old_bootstrap) { - update_utilization(gcid, "Degenerated Bootstrap Old GC"); } else { - update_utilization(gcid, "Degenerated Young GC"); + update_utilization(gcid, msg); } } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.hpp b/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.hpp index 89dbf921cd4..cb2db12c233 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.hpp @@ -72,6 +72,8 @@ private: ShenandoahMmuTask* _mmu_periodic_task; TruncatedSeq _mmu_average; + // Updates and logs the GC and mutator CPU utilization since the last cycle, where "msg" + // identifies the GC cycle type. void update_utilization(size_t gcid, const char* msg); static void fetch_cpu_times(double &gc_time, double &mutator_time); @@ -95,7 +97,8 @@ public: void record_old_marking_increment(bool old_marking_done); void record_mixed(size_t gcid); void record_full(size_t gcid); - void record_degenerated(size_t gcid, bool is_old_boostrap); + // Records GC utilization for a degenerated cycle, where "msg" describes the degeneration type. + void record_degenerated(size_t gcid, const char* msg); // This is called by the periodic task timer. The interval is defined by // GCPauseIntervalMillis and defaults to 5 seconds. This method computes diff --git a/src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp b/src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp index 594ad614d90..5b24cfc979a 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp @@ -48,7 +48,7 @@ ShenandoahNMethod::ShenandoahNMethod(nmethod* nm, GrowableArray& oops, boo ShenandoahNMethod::~ShenandoahNMethod() { if (_oops != nullptr) { - FREE_C_HEAP_ARRAY(oop*, _oops); + FREE_C_HEAP_ARRAY(_oops); } } @@ -60,7 +60,7 @@ void ShenandoahNMethod::update() { detect_reloc_oops(nm(), oops, non_immediate_oops); if (oops.length() != _oops_count) { if (_oops != nullptr) { - FREE_C_HEAP_ARRAY(oop*, _oops); + FREE_C_HEAP_ARRAY(_oops); _oops = nullptr; } @@ -126,7 +126,6 @@ void ShenandoahNMethod::heal_nmethod(nmethod* nm) { ShenandoahHeap* const heap = ShenandoahHeap::heap(); if (heap->is_concurrent_weak_root_in_progress() || heap->is_concurrent_strong_root_in_progress()) { - ShenandoahEvacOOMScope evac_scope; heal_nmethod_metadata(data); } else if (heap->is_concurrent_mark_in_progress()) { ShenandoahKeepAliveClosure cl; @@ -394,7 +393,7 @@ ShenandoahNMethodList::ShenandoahNMethodList(int size) : ShenandoahNMethodList::~ShenandoahNMethodList() { assert(_list != nullptr, "Sanity"); assert(_ref_count == 0, "Must be"); - FREE_C_HEAP_ARRAY(ShenandoahNMethod*, _list); + FREE_C_HEAP_ARRAY(_list); } void ShenandoahNMethodList::transfer(ShenandoahNMethodList* const list, int limit) { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahNumberSeq.cpp b/src/hotspot/share/gc/shenandoah/shenandoahNumberSeq.cpp index 1ddd8e1c032..82b027faca2 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahNumberSeq.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahNumberSeq.cpp @@ -39,10 +39,10 @@ HdrSeq::~HdrSeq() { for (int c = 0; c < MagBuckets; c++) { int* sub = _hdr[c]; if (sub != nullptr) { - FREE_C_HEAP_ARRAY(int, sub); + FREE_C_HEAP_ARRAY(sub); } } - FREE_C_HEAP_ARRAY(int*, _hdr); + FREE_C_HEAP_ARRAY(_hdr); } void HdrSeq::add(double val) { @@ -191,7 +191,7 @@ BinaryMagnitudeSeq::BinaryMagnitudeSeq() { } BinaryMagnitudeSeq::~BinaryMagnitudeSeq() { - FREE_C_HEAP_ARRAY(size_t, _mags); + FREE_C_HEAP_ARRAY(_mags); } void BinaryMagnitudeSeq::clear() { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahObjArrayAllocator.cpp b/src/hotspot/share/gc/shenandoah/shenandoahObjArrayAllocator.cpp new file mode 100644 index 00000000000..dc9fef16cf6 --- /dev/null +++ b/src/hotspot/share/gc/shenandoah/shenandoahObjArrayAllocator.cpp @@ -0,0 +1,124 @@ +/* + * 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/shared/memAllocator.hpp" +#include "gc/shenandoah/shenandoahBarrierSet.inline.hpp" +#include "gc/shenandoah/shenandoahHeap.inline.hpp" +#include "gc/shenandoah/shenandoahHeapRegion.hpp" +#include "gc/shenandoah/shenandoahObjArrayAllocator.hpp" +#include "gc/shenandoah/shenandoahThreadLocalData.hpp" +#include "memory/universe.hpp" +#include "oops/arrayKlass.hpp" +#include "oops/arrayOop.hpp" +#include "runtime/interfaceSupport.inline.hpp" +#include "utilities/copy.hpp" +#include "utilities/globalDefinitions.hpp" + +ShenandoahObjArrayAllocator::ShenandoahObjArrayAllocator( + Klass* klass, size_t word_size, int length, bool do_zero, Thread* thread) + : ObjArrayAllocator(klass, word_size, length, do_zero, thread) { + assert(_length >= 0, "length should be non-negative"); +} + +oop ShenandoahObjArrayAllocator::initialize(HeapWord* mem) const { + // threshold of object size, while above this size current mutator will yield to safepoint + // when it clears the array content. + constexpr size_t THRESHOLD = 64 * K / BytesPerWord; + + ShenandoahHeap* const heap = ShenandoahHeap::heap(); + + // Fast path: delegate to base class for small arrays or no-zero case. + // In no-zero case(_do_zero is false), the content of the array won't be zeroed, therefore no need to fall into slow-path. + if (!_do_zero || _word_size <= THRESHOLD) { + return ObjArrayAllocator::initialize(mem); + } + + // Slow path: yield to safepoint when clearing for large arrays + + // Compute clearing bounds + const BasicType element_type = ArrayKlass::cast(_klass)->element_type(); + const size_t base_offset_in_bytes = (size_t)arrayOopDesc::base_offset_in_bytes(element_type); + const size_t process_start_offset_in_bytes = align_up(base_offset_in_bytes, (size_t)BytesPerWord); + + const size_t process_start = process_start_offset_in_bytes / BytesPerWord; + const size_t process_size = _word_size - process_start; + + // Pin the region before clearing to avoid moving the object until it is done + ShenandoahHeapRegion* region = heap->heap_region_containing(mem); + region->record_pin(); + + // Always initialize the mem with primitive array first so GC won't look into the elements in the array. + // For obj array, the header will be corrected to object array after clearing the memory. + Klass* filling_klass = _klass; + const bool is_ref_type = is_reference_type(element_type); + + if (is_ref_type) { + filling_klass = LP64_ONLY(UseCompressedOops ? Universe::intArrayKlass() : Universe::longArrayKlass()) NOT_LP64(Universe::intArrayKlass()); + assert(type2aelembytes(ArrayKlass::cast(filling_klass)->element_type()) == type2aelembytes(element_type), "filling element size must match ref size"); + } + // Use _length directly: it matches the ref count, and the filling element size equals the ref size. + ObjArrayAllocator filling_array_allocator(filling_klass, _word_size, _length, /* do_zero */ false); + filling_array_allocator.initialize(mem); + + // Invisible roots will be scanned and marked at the end of marking. + ShenandoahThreadLocalData::set_invisible_root(_thread, mem, _word_size); + + { + // The mem has been initialized as primitive array, the entire clearing work is safe for safepoint + ThreadBlockInVM tbivm(JavaThread::cast(_thread)); // Allow safepoint to proceed. + // Handle potential 4-byte alignment gap before array data + if (process_start_offset_in_bytes != base_offset_in_bytes) { + assert(process_start_offset_in_bytes - base_offset_in_bytes == 4, "Must be 4-byte aligned"); + *reinterpret_cast(reinterpret_cast(mem) + base_offset_in_bytes) = 0; + } + + Copy::zero_to_words(mem + process_start, process_size); + + if (!is_ref_type) { + // zap paddings + mem_zap_start_padding(mem); + mem_zap_end_padding(mem); + } + } + + // reference array, header need to be overridden to its own. + if (is_ref_type) { + finish(mem); + // zap paddings after setting correct klass + mem_zap_start_padding(mem); + mem_zap_end_padding(mem); + } + + oop arrayObj = cast_to_oop(mem); + if (heap->is_concurrent_young_mark_in_progress() && !heap->marking_context()->allocated_after_mark_start(arrayObj)) { + // Keep the obj alive because we don't know the progress of marking, + // current concurrent marking could have done and VM is calling safepoint for final mark. + heap->keep_alive(arrayObj); + } + ShenandoahThreadLocalData::clear_invisible_root(_thread); + + region->record_unpin(); + + return arrayObj; +} diff --git a/src/hotspot/share/gc/shenandoah/shenandoahObjArrayAllocator.hpp b/src/hotspot/share/gc/shenandoah/shenandoahObjArrayAllocator.hpp new file mode 100644 index 00000000000..7605b69eb7e --- /dev/null +++ b/src/hotspot/share/gc/shenandoah/shenandoahObjArrayAllocator.hpp @@ -0,0 +1,40 @@ +/* + * 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. + * + */ + +#ifndef SHARE_GC_SHENANDOAH_SHENANDOAHOBJARRAYALLOCATOR_HPP +#define SHARE_GC_SHENANDOAH_SHENANDOAHOBJARRAYALLOCATOR_HPP + +#include "gc/shared/memAllocator.hpp" + +class ShenandoahObjArrayAllocator : public ObjArrayAllocator { +private: + // Override: clearing with safepoint yields for large arrays + oop initialize(HeapWord* mem) const override; + +public: + ShenandoahObjArrayAllocator(Klass* klass, size_t word_size, int length, + bool do_zero, Thread* thread); +}; + +#endif // SHARE_GC_SHENANDOAH_SHENANDOAHOBJARRAYALLOCATOR_HPP diff --git a/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp b/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp index 37de5966554..1dd38deb4d7 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp @@ -675,9 +675,9 @@ void ShenandoahOldGeneration::log_failed_promotion(LogStream& ls, Thread* thread void ShenandoahOldGeneration::update_card_table() { for_each_region([this](ShenandoahHeapRegion* region) { - if (region->is_regular()) { + if (region->is_regular_or_regular_pinned()) { // Humongous regions are promoted in place, remembered set maintenance is handled there - // Regular regions that are promoted in place have their rset maintenance handled for + // Regular/pinned regions that are promoted in place have their rset maintenance handled for // the objects in the region when it was promoted. We record TEAS for such a region // when the in-place-promotion is completed. Such a region may be used for additional // promotions in the same cycle it was itself promoted. diff --git a/src/hotspot/share/gc/shenandoah/shenandoahParallelCleaning.cpp b/src/hotspot/share/gc/shenandoah/shenandoahParallelCleaning.cpp index 6c82f970606..a7a74f30a4b 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahParallelCleaning.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahParallelCleaning.cpp @@ -26,7 +26,6 @@ #include "gc/shenandoah/shenandoahClosures.inline.hpp" #include "gc/shenandoah/shenandoahCodeRoots.hpp" -#include "gc/shenandoah/shenandoahEvacOOMHandler.hpp" #include "gc/shenandoah/shenandoahParallelCleaning.hpp" #include "runtime/safepoint.hpp" diff --git a/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp b/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp index 6a316e2265a..bb21cd5be66 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp @@ -138,6 +138,7 @@ class outputStream; \ f(degen_gc_gross, "Pause Degenerated GC (G)") \ f(degen_gc, "Pause Degenerated GC (N)") \ + f(degen_gc_un_self_forward, " Un-Self-Forward") \ f(degen_gc_stw_mark, " Degen STW Mark") \ SHENANDOAH_PAR_PHASE_DO(degen_gc_stw_mark_, " DSM: ", f) \ f(degen_gc_mark, " Degen Mark") \ @@ -170,6 +171,7 @@ class outputStream; \ f(full_gc_gross, "Pause Full GC (G)") \ f(full_gc, "Pause Full GC (N)") \ + f(full_gc_un_self_forward, " Un-Self-Forward") \ f(full_gc_heapdump_pre, " Pre Heap Dump") \ f(full_gc_prepare, " Prepare") \ f(full_gc_update_roots, " Update Roots") \ diff --git a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp index 4504ac96819..a62f1c7fd66 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp @@ -141,6 +141,49 @@ public: } }; +class ShenandoahInvisibleRootsMarkClosure : public ThreadClosure { +public: + void do_thread(Thread* t) { + assert_at_safepoint(); + + HeapWord* invisible_root = ShenandoahThreadLocalData::get_invisible_root(t); + if (invisible_root == nullptr) { + return; + } + size_t invisible_root_word_size = ShenandoahThreadLocalData::get_invisible_root_word_size(t); + + ShenandoahHeap* const heap = ShenandoahHeap::heap(); + ShenandoahMarkingContext* const marking_context = heap->marking_context(); + // Mark the invisible root if it is not marked. + if (!marking_context->is_marked(invisible_root)) { + bool was_upgraded = false; + if (!marking_context->mark_strong(cast_to_oop(invisible_root), was_upgraded)) { + return; + } + + // Update region liveness data + ShenandoahHeapRegion* region = heap->heap_region_containing(invisible_root); + if (region->is_regular_or_regular_pinned()) { + assert(!ShenandoahHeapRegion::requires_humongous(invisible_root_word_size), "Must not be humongous."); + region->increase_live_data_alloc_words(invisible_root_word_size); + } else if (region->is_humongous_start()) { + DEBUG_ONLY(size_t total_live_words = 0;) + do { + size_t current = region->get_live_data_words(); + size_t region_used_words = region->used() >> LogHeapWordSize; + DEBUG_ONLY(total_live_words += region_used_words;) + assert(current == 0 || current == region_used_words, "Must be"); + if (current == 0) { + region->increase_live_data_alloc_words(region_used_words); + } + region = heap->get_region(region->index() + 1); + } while (region != nullptr && region->is_humongous_continuation()); + assert(total_live_words == invisible_root_word_size, "Must be"); + } + } + } +}; + // The rationale for selecting the roots to scan is as follows: // a. With unload_classes = true, we only want to scan the actual strong roots from the // code cache. This will allow us to identify the dead classes, unload them, *and* diff --git a/src/hotspot/share/gc/shenandoah/shenandoahRuntime.cpp b/src/hotspot/share/gc/shenandoah/shenandoahRuntime.cpp index 0bee8b4cf42..e106cc37627 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahRuntime.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahRuntime.cpp @@ -49,27 +49,27 @@ JRT_LEAF(void, ShenandoahRuntime::write_barrier_pre(oopDesc* orig)) JRT_END JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_strong(oopDesc* src, oop* load_addr)) - return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src, load_addr); + return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src, load_addr); JRT_END JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_strong_narrow(oopDesc* src, narrowOop* load_addr)) - return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src, load_addr); + return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src, load_addr); JRT_END JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_weak(oopDesc* src, oop* load_addr)) - return (oopDesc*) ShenandoahBarrierSet::barrier_set()->load_reference_barrier(ON_WEAK_OOP_REF, oop(src), load_addr); + return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src, load_addr); JRT_END JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_weak_narrow(oopDesc* src, narrowOop* load_addr)) - return (oopDesc*) ShenandoahBarrierSet::barrier_set()->load_reference_barrier(ON_WEAK_OOP_REF, oop(src), load_addr); + return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src, load_addr); JRT_END JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_phantom(oopDesc* src, oop* load_addr)) - return (oopDesc*) ShenandoahBarrierSet::barrier_set()->load_reference_barrier(ON_PHANTOM_OOP_REF, oop(src), load_addr); + return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src, load_addr); JRT_END JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_phantom_narrow(oopDesc* src, narrowOop* load_addr)) - return (oopDesc*) ShenandoahBarrierSet::barrier_set()->load_reference_barrier(ON_PHANTOM_OOP_REF, oop(src), load_addr); + return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator(src, load_addr); JRT_END JRT_LEAF(void, ShenandoahRuntime::clone_barrier(oopDesc* src)) diff --git a/src/hotspot/share/gc/shenandoah/shenandoahSTWMark.cpp b/src/hotspot/share/gc/shenandoah/shenandoahSTWMark.cpp index 5b4ce6d0bc9..73935ed4e91 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahSTWMark.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahSTWMark.cpp @@ -104,6 +104,12 @@ void ShenandoahSTWMark::mark() { heap->workers()->run_task(&task); assert(task_queues()->is_empty(), "Should be empty"); + + if (!generation()->is_old()) { + // Lastly, ensure all the invisible roots are marked. + ShenandoahInvisibleRootsMarkClosure cl; + Threads::java_threads_do(&cl); + } } _generation->set_mark_complete(); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp b/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp index 8d7ba2dc46f..7ae148a7144 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp @@ -798,7 +798,7 @@ void ShenandoahScanRememberedTask::work(uint worker_id) { if (_is_concurrent) { // This sets up a thread local reference to the worker_id which is needed by the weak reference processor. ShenandoahConcurrentWorkerSession worker_session(worker_id); - ShenandoahSuspendibleThreadSetJoiner stsj; + SuspendibleThreadSetJoiner stsj; do_work(worker_id); } else { // This sets up a thread local reference to the worker_id which is needed by the weak reference processor. diff --git a/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp b/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp index 53f00e64a03..244ed7edd4c 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp @@ -413,7 +413,7 @@ public: } ~ShenandoahCardCluster() { - FREE_C_HEAP_ARRAY(crossing_info, _object_starts); + FREE_C_HEAP_ARRAY(_object_starts); _object_starts = nullptr; } @@ -751,7 +751,7 @@ public: for (uint i = 0; i < ParallelGCThreads; i++) { delete _card_stats[i]; } - FREE_C_HEAP_ARRAY(HdrSeq*, _card_stats); + FREE_C_HEAP_ARRAY(_card_stats); _card_stats = nullptr; } assert(_card_stats == nullptr, "Error"); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahSimpleBitMap.cpp b/src/hotspot/share/gc/shenandoah/shenandoahSimpleBitMap.cpp index 82a759e34db..d0029b60167 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahSimpleBitMap.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahSimpleBitMap.cpp @@ -35,7 +35,7 @@ ShenandoahSimpleBitMap::ShenandoahSimpleBitMap(idx_t num_bits) : ShenandoahSimpleBitMap::~ShenandoahSimpleBitMap() { if (_bitmap != nullptr) { - FREE_C_HEAP_ARRAY(uintx, _bitmap); + FREE_C_HEAP_ARRAY(_bitmap); } } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahSimpleBitMap.hpp b/src/hotspot/share/gc/shenandoah/shenandoahSimpleBitMap.hpp index ea51c5f7f63..d47b6440d36 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahSimpleBitMap.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahSimpleBitMap.hpp @@ -27,6 +27,7 @@ #include "cppstdlib/cstddef.hpp" #include "gc/shenandoah/shenandoahAsserts.hpp" +#include "utilities/integerCast.hpp" // TODO: Merge the enhanced capabilities of ShenandoahSimpleBitMap into src/hotspot/share/utilities/bitMap.hpp // and deprecate ShenandoahSimpleBitMap. The key enhanced capabilities to be integrated include: @@ -110,7 +111,7 @@ public: assert((idx >= 0) && (idx < _num_bits), "precondition"); size_t array_idx = idx >> LogBitsPerWord; uintx bit_number = idx & (BitsPerWord - 1); - uintx the_bit = nth_bit(bit_number); + uintx the_bit = nth_bit(integer_cast(bit_number)); _bitmap[array_idx] |= the_bit; } @@ -118,7 +119,7 @@ public: assert((idx >= 0) && (idx < _num_bits), "precondition"); size_t array_idx = idx >> LogBitsPerWord; uintx bit_number = idx & (BitsPerWord - 1); - uintx the_bit = nth_bit(bit_number); + uintx the_bit = nth_bit(integer_cast(bit_number)); _bitmap[array_idx] &= ~the_bit; } @@ -126,7 +127,7 @@ public: assert((idx >= 0) && (idx < _num_bits), "precondition"); size_t array_idx = idx >> LogBitsPerWord; uintx bit_number = idx & (BitsPerWord - 1); - uintx the_bit = nth_bit(bit_number); + uintx the_bit = nth_bit(integer_cast(bit_number)); return (_bitmap[array_idx] & the_bit) != 0; } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp b/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp index dbae1b35c6f..ad4e29a5cc2 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp @@ -158,8 +158,8 @@ private: static const uintptr_t weak_extract_mask = 1 << 1; static const uintptr_t chunk_pow_extract_mask = ~right_n_bits(oop_bits); - static const int chunk_range_mask = right_n_bits(chunk_bits); - static const int pow_range_mask = right_n_bits(pow_bits); + static const int chunk_range_mask = right_n_bits(chunk_bits); + static const int pow_range_mask = right_n_bits(pow_bits); inline oop decode_oop(uintptr_t val) const { STATIC_ASSERT(oop_shift == 0); @@ -249,7 +249,7 @@ public: } static int chunk_size() { - return nth_bit(chunk_bits); + return nth_bit(chunk_bits); } }; #else diff --git a/src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.cpp b/src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.cpp index 1f3ce76cc1c..4aeab028983 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.cpp @@ -31,14 +31,14 @@ ShenandoahThreadLocalData::ShenandoahThreadLocalData() : _gc_state(0), - _oom_scope_nesting_level(0), - _oom_during_evac(false), _satb_mark_queue(&ShenandoahBarrierSet::satb_mark_queue_set()), _card_table(nullptr), _gclab(nullptr), _gclab_size(0), _shenandoah_plab(nullptr), - _evacuation_stats(new ShenandoahEvacuationStats()) { + _evacuation_stats(new ShenandoahEvacuationStats()), + _invisible_root(nullptr), + _invisible_root_word_size(0) { } ShenandoahThreadLocalData::~ShenandoahThreadLocalData() { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.hpp b/src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.hpp index b1b923bbfce..0ac8f7e0f31 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.hpp @@ -45,9 +45,6 @@ class ShenandoahThreadLocalData { private: char _gc_state; - // Evacuation OOM state - uint8_t _oom_scope_nesting_level; - bool _oom_during_evac; SATBMarkQueue _satb_mark_queue; @@ -67,6 +64,9 @@ private: ShenandoahEvacuationStats* _evacuation_stats; + Atomic _invisible_root; + Atomic _invisible_root_word_size; + ShenandoahThreadLocalData(); ~ShenandoahThreadLocalData(); @@ -157,39 +157,6 @@ public: return data(thread)->_shenandoah_plab; } - // Evacuation OOM handling - static bool is_oom_during_evac(Thread* thread) { - return data(thread)->_oom_during_evac; - } - - static void set_oom_during_evac(Thread* thread, bool oom) { - data(thread)->_oom_during_evac = oom; - } - - static uint8_t evac_oom_scope_level(Thread* thread) { - return data(thread)->_oom_scope_nesting_level; - } - - // Push the scope one level deeper, return previous level - static uint8_t push_evac_oom_scope(Thread* thread) { - uint8_t level = evac_oom_scope_level(thread); - assert(level < 254, "Overflow nesting level"); // UINT8_MAX = 255 - data(thread)->_oom_scope_nesting_level = level + 1; - return level; - } - - // Pop the scope by one level, return previous level - static uint8_t pop_evac_oom_scope(Thread* thread) { - uint8_t level = evac_oom_scope_level(thread); - assert(level > 0, "Underflow nesting level"); - data(thread)->_oom_scope_nesting_level = level - 1; - return level; - } - - static bool is_evac_allowed(Thread* thread) { - return evac_oom_scope_level(thread) > 0; - } - // Offsets static ByteSize satb_mark_queue_index_offset() { return satb_mark_queue_offset() + SATBMarkQueue::byte_offset_of_index(); @@ -206,6 +173,25 @@ public: static ByteSize card_table_offset() { return Thread::gc_data_offset() + byte_offset_of(ShenandoahThreadLocalData, _card_table); } + + // invisible root are the partially initialized obj array set by ShenandoahObjArrayAllocator + static void set_invisible_root(Thread* thread, HeapWord* invisible_root, size_t word_size) { + data(thread)->_invisible_root.store_relaxed(invisible_root); + data(thread)->_invisible_root_word_size.store_relaxed(word_size); + } + + static void clear_invisible_root(Thread* thread) { + data(thread)->_invisible_root.store_relaxed(nullptr); + data(thread)->_invisible_root_word_size.store_relaxed(0); + } + + static HeapWord* get_invisible_root(Thread* thread) { + return data(thread)->_invisible_root.load_relaxed(); + } + + static size_t get_invisible_root_word_size(Thread* thread) { + return data(thread)->_invisible_root_word_size.load_relaxed(); + } }; STATIC_ASSERT(sizeof(ShenandoahThreadLocalData) <= sizeof(GCThreadLocalData)); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp b/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp index 1ed6e43e3e1..b6e084c9091 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp @@ -221,30 +221,6 @@ public: ~ShenandoahParallelWorkerSession(); }; -class ShenandoahSuspendibleThreadSetJoiner { -private: - SuspendibleThreadSetJoiner _joiner; -public: - ShenandoahSuspendibleThreadSetJoiner(bool active = true) : _joiner(active) { - assert(!ShenandoahThreadLocalData::is_evac_allowed(Thread::current()), "STS should be joined before evac scope"); - } - ~ShenandoahSuspendibleThreadSetJoiner() { - assert(!ShenandoahThreadLocalData::is_evac_allowed(Thread::current()), "STS should be left after evac scope"); - } -}; - -class ShenandoahSuspendibleThreadSetLeaver { -private: - SuspendibleThreadSetLeaver _leaver; -public: - ShenandoahSuspendibleThreadSetLeaver(bool active = true) : _leaver(active) { - assert(!ShenandoahThreadLocalData::is_evac_allowed(Thread::current()), "STS should be left after evac scope"); - } - ~ShenandoahSuspendibleThreadSetLeaver() { - assert(!ShenandoahThreadLocalData::is_evac_allowed(Thread::current()), "STS should be joined before evac scope"); - } -}; - // Regions cannot be uncommitted when concurrent reset is zeroing out the bitmaps. // This CADR class enforces this by forbidding region uncommits while it is in scope. class ShenandoahNoUncommitMark : public StackObj { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp b/src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp index 8299cbe62c6..5df88c0fc0a 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp @@ -1073,7 +1073,7 @@ void ShenandoahVerifier::verify_at_safepoint(ShenandoahGeneration* generation, log_info(gc)("Verify %s, Level %zd (%zu reachable, %zu marked)", label, ShenandoahVerifyLevel, count_reachable, count_marked); - FREE_C_HEAP_ARRAY(ShenandoahLivenessData, ld); + FREE_C_HEAP_ARRAY(ld); } void ShenandoahVerifier::verify_generic(ShenandoahGeneration* generation, VerifyOption vo) { @@ -1187,7 +1187,7 @@ void ShenandoahVerifier::verify_after_update_refs(ShenandoahGeneration* generati "After Updating References", _verify_remembered_disable, // do not verify remembered set _verify_forwarded_none, // no forwarded references - _verify_marked_complete, // bitmaps might be stale, but alloc-after-mark should be well + _verify_marked_disable, // no need to check unreachable objects, end of cycle _verify_cset_none, // no cset references, all updated _verify_liveness_disable, // no reliable liveness data anymore _verify_regions_nocset, // no cset regions, trash regions have appeared @@ -1204,7 +1204,7 @@ void ShenandoahVerifier::verify_after_gc(ShenandoahGeneration* generation) { "After GC", _verify_remembered_disable, // do not verify remembered set _verify_forwarded_none, // no forwarded references - _verify_marked_complete, // bitmaps might be stale, but alloc-after-mark should be well + _verify_marked_disable, // no need to check unreachable objects, end of cycle _verify_cset_none, // no cset references, all updated _verify_liveness_disable, // no reliable liveness data anymore _verify_regions_nocset, // no cset regions, trash regions have appeared @@ -1220,7 +1220,7 @@ void ShenandoahVerifier::verify_after_degenerated(ShenandoahGeneration* generati "After Degenerated GC", _verify_remembered_disable, // do not verify remembered set _verify_forwarded_none, // all objects are non-forwarded - _verify_marked_complete, // all objects are marked in complete bitmap + _verify_marked_disable, // no need to check unreachable objects, end of cycle _verify_cset_none, // no cset references _verify_liveness_disable, // no reliable liveness data anymore _verify_regions_notrash_nocset, // no trash, no cset @@ -1248,14 +1248,14 @@ void ShenandoahVerifier::verify_after_fullgc(ShenandoahGeneration* generation) { verify_at_safepoint( generation, "After Full GC", - _verify_remembered_after_full_gc, // verify read-write remembered set - _verify_forwarded_none, // all objects are non-forwarded - _verify_marked_incomplete, // all objects are marked in incomplete bitmap - _verify_cset_none, // no cset references - _verify_liveness_disable, // no reliable liveness data anymore - _verify_regions_notrash_nocset, // no trash, no cset - _verify_size_exact, // expect generation and heap sizes to match exactly - _verify_gcstate_stable // full gc cleaned up everything + _verify_remembered_after_full_gc, // verify read-write remembered set + _verify_forwarded_none, // all objects are non-forwarded + _verify_marked_disable, // no need to check unreachable objects, end of cycle + _verify_cset_none, // no cset references + _verify_liveness_disable, // no reliable liveness data anymore + _verify_regions_notrash_nocset, // no trash, no cset + _verify_size_exact, // expect generation and heap sizes to match exactly + _verify_gcstate_stable // full gc cleaned up everything ); } diff --git a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp index 2c5ba726ef2..d26959edf89 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp @@ -196,14 +196,6 @@ "of regions that would be used, within min/max region size " \ "limits.") \ \ - product(size_t, ShenandoahMinRegionSize, 256 * K, EXPERIMENTAL, \ - "With automatic region sizing, the regions would be at least " \ - "this large.") \ - \ - product(size_t, ShenandoahMaxRegionSize, 32 * M, EXPERIMENTAL, \ - "With automatic region sizing, the regions would be at most " \ - "this large.") \ - \ product(ccstr, ShenandoahGCMode, "satb", \ "GC mode to use. Among other things, this defines which " \ "barriers are in in use. Possible values are:" \ diff --git a/src/hotspot/share/gc/z/zForwardingAllocator.cpp b/src/hotspot/share/gc/z/zForwardingAllocator.cpp index 451a1d62754..37b5b8f520c 100644 --- a/src/hotspot/share/gc/z/zForwardingAllocator.cpp +++ b/src/hotspot/share/gc/z/zForwardingAllocator.cpp @@ -30,11 +30,11 @@ ZForwardingAllocator::ZForwardingAllocator() _top(nullptr) {} ZForwardingAllocator::~ZForwardingAllocator() { - FREE_C_HEAP_ARRAY(char, _start); + FREE_C_HEAP_ARRAY(_start); } void ZForwardingAllocator::reset(size_t size) { - _start = REALLOC_C_HEAP_ARRAY(char, _start, size, mtGC); + _start = REALLOC_C_HEAP_ARRAY(_start, size, mtGC); _top.store_relaxed(_start); _end = _start + size; } diff --git a/src/hotspot/share/gc/z/zIterator.hpp b/src/hotspot/share/gc/z/zIterator.hpp index e048002e52e..0e9ef808dff 100644 --- a/src/hotspot/share/gc/z/zIterator.hpp +++ b/src/hotspot/share/gc/z/zIterator.hpp @@ -31,11 +31,14 @@ class ZIterator : AllStatic { private: static bool is_invisible_object(oop obj); static bool is_invisible_object_array(oop obj); + static bool is_invisible_object_array(oop obj, Klass* klass); public: // This iterator skips invisible roots template static void oop_iterate_safe(oop obj, OopClosureT* cl); + template + static void oop_iterate_safe(oop obj, Klass* klass, OopClosureT* cl); template static void oop_iterate(oop obj, OopClosureT* cl); @@ -46,6 +49,8 @@ public: // This function skips invisible roots template static void basic_oop_iterate_safe(oop obj, Function function); + template + static void basic_oop_iterate_safe(oop obj, Klass* klass, Function function); template static void basic_oop_iterate(oop obj, Function function); diff --git a/src/hotspot/share/gc/z/zIterator.inline.hpp b/src/hotspot/share/gc/z/zIterator.inline.hpp index cbfe1a79aaf..6e51929c7b4 100644 --- a/src/hotspot/share/gc/z/zIterator.inline.hpp +++ b/src/hotspot/share/gc/z/zIterator.inline.hpp @@ -45,17 +45,27 @@ inline bool ZIterator::is_invisible_object(oop obj) { } inline bool ZIterator::is_invisible_object_array(oop obj) { - return obj->klass()->is_objArray_klass() && is_invisible_object(obj); + return is_invisible_object_array(obj, obj->klass()); } -// This iterator skips invisible object arrays +inline bool ZIterator::is_invisible_object_array(oop obj, Klass* klass) { + return klass->is_objArray_klass() && is_invisible_object(obj); +} + +// These iterators skips invisible object arrays + template void ZIterator::oop_iterate_safe(oop obj, OopClosureT* cl) { + oop_iterate_safe(obj, obj->klass(), cl); +} + +template +void ZIterator::oop_iterate_safe(oop obj, Klass* klass, OopClosureT* cl) { // Skip invisible object arrays - we only filter out *object* arrays, // because that check is arguably faster than the is_invisible_object // check, and primitive arrays are cheap to call oop_iterate on. - if (!is_invisible_object_array(obj)) { - obj->oop_iterate(cl); + if (!is_invisible_object_array(obj, klass)) { + OopIteratorClosureDispatch::oop_oop_iterate(cl, obj, klass); } } @@ -89,11 +99,17 @@ public: } }; -// This function skips invisible roots +// These functions skip invisible roots + template void ZIterator::basic_oop_iterate_safe(oop obj, Function function) { + basic_oop_iterate_safe(obj, obj->klass(), function); +} + +template +void ZIterator::basic_oop_iterate_safe(oop obj, Klass* klass, Function function) { ZBasicOopIterateClosure cl(function); - oop_iterate_safe(obj, &cl); + oop_iterate_safe(obj, klass, &cl); } template diff --git a/src/hotspot/share/gc/z/zRelocate.cpp b/src/hotspot/share/gc/z/zRelocate.cpp index d51cf5abbae..1c2a4078904 100644 --- a/src/hotspot/share/gc/z/zRelocate.cpp +++ b/src/hotspot/share/gc/z/zRelocate.cpp @@ -1272,7 +1272,7 @@ public: for (ZPage* page; _iter.next(&page);) { page->object_iterate([&](oop obj) { // Remap oops and add remset if needed - ZIterator::basic_oop_iterate_safe(obj, remap_and_maybe_add_remset); + ZIterator::basic_oop_iterate_safe(obj, obj->klass(), remap_and_maybe_add_remset); // String dedup string_dedup_context.request(obj); diff --git a/src/hotspot/share/interpreter/bytecodeTracer.cpp b/src/hotspot/share/interpreter/bytecodeTracer.cpp index 4578a3eec4e..cbe28e92c51 100644 --- a/src/hotspot/share/interpreter/bytecodeTracer.cpp +++ b/src/hotspot/share/interpreter/bytecodeTracer.cpp @@ -40,21 +40,17 @@ #include "utilities/align.hpp" // Prints the current bytecode and its attributes using bytecode-specific information. +// Printing bytecodes is not an idempotent operation, as this relies on modifying state. +// An instance of this class is thus intended to only print a single bytecode. All state +// shared between multiple bytecodes needs to be in BytecodeTracerData. class BytecodePrinter { private: - // %%% This field is not GC-ed, and so can contain garbage - // between critical sections. Use only pointer-comparison - // operations on the pointer, except within a critical section. - // (Also, ensure that occasional false positives are benign.) - Method* _current_method; - bool _is_wide; - Bytecodes::Code _code; - address _next_pc; // current decoding position - int _flags; - bool _use_cp_cache; + BytecodeTracerData* _data; + int _flags; + Bytecodes::Code _raw_code; // note: some methods translate this to the Java bytecode + address _next_pc; // current decoding position, destructive - bool use_cp_cache() const { return _use_cp_cache; } void align() { _next_pc = align_up(_next_pc, sizeof(jint)); } int get_byte() { return *(jbyte*) _next_pc++; } // signed int get_index_u1() { return *(address)_next_pc++; } // returns 0x00 - 0xff as an int @@ -65,11 +61,22 @@ class BytecodePrinter { int get_Java_index_u2() { int i = Bytes::get_Java_u2 (_next_pc); _next_pc += 2; return i; } int get_Java_index_u4() { int i = Bytes::get_Java_u4 (_next_pc); _next_pc += 4; return i; } int get_index_special() { return (is_wide()) ? get_Java_index_u2() : get_index_u1(); } - Method* method() const { return _current_method; } - bool is_wide() const { return _is_wide; } - Bytecodes::Code raw_code() const { return Bytecodes::Code(_code); } - ConstantPool* constants() const { return method()->constants(); } - ConstantPoolCache* cpcache() const { assert(use_cp_cache(), "must be"); return constants()->cache(); } + + // Warning: only do pointer comparison between critical sections. + Method* method() const { return _data->current_method(); } + void set_method(Method* current) { _data->set_current_method(current); } + + // Warning: should only be used for comparison and not dereferenced. + intptr_t* fp() const { return _data->current_fp(); } + void set_fp(intptr_t* current) { _data->set_current_fp(current); } + + bool is_wide() const { return _data->is_wide(); } + void set_wide(bool wide) { _data->set_wide(wide); } + + ConstantPool* constants() const { return method()->constants(); } + // This may be called during linking after bytecodes are rewritten to point to the cpCache. + bool use_cp_cache() const { return constants()->cache() != nullptr; } + ConstantPoolCache* cpcache() const { assert(use_cp_cache(), "must be"); return constants()->cache(); } void print_constant(int i, outputStream* st); void print_cpcache_entry(int cpc_index, outputStream* st); @@ -81,35 +88,32 @@ class BytecodePrinter { void print_method_data_at(int bci, outputStream* st); public: - BytecodePrinter(int flags = 0) : _is_wide(false), _code(Bytecodes::_illegal), _flags(flags) {} + BytecodePrinter(BytecodeTracerData* data, int flags = 0) : + _data(data), + _flags(flags), + _raw_code(Bytecodes::_illegal), + _next_pc(nullptr) {} #ifndef PRODUCT - BytecodePrinter(Method* prev_method) : BytecodePrinter(0) { - _current_method = prev_method; - } - // This method is called while executing the raw bytecodes, so none of // the adjustments that BytecodeStream performs applies. - void trace(const methodHandle& method, address bcp, uintptr_t tos, uintptr_t tos2, outputStream* st) { + void trace(const methodHandle& method, intptr_t* fp, address bcp, uintptr_t tos, uintptr_t tos2, outputStream* st) { + assert(_raw_code == Bytecodes::_illegal, "invariant"); ResourceMark rm; - bool method_changed = _current_method != method(); - _current_method = method(); - _use_cp_cache = method->constants()->cache() != nullptr; + // Method changes can be another method getting called, or a self-recursive call. + bool method_changed = (this->method() != method()) || (this->fp() != fp); + set_method(method()); + set_fp(fp); assert(method->method_holder()->is_linked(), "this function must be called on methods that are already executing"); - + // If the method changed (new method call, return to previous method after call finishes), + // the signature needs to be re-printed for interpretability. if (method_changed) { - // Note 1: This code will not work as expected with true MT/MP. - // Need an explicit lock or a different solution. - // It is possible for this block to be skipped, if a garbage - // _current_method pointer happens to have the same bits as - // the incoming method. We could lose a line of trace output. - // This is acceptable in a debug-only feature. - st->cr(); st->print("[%zu] ", Thread::current()->osthread()->thread_id_for_printing()); method->print_name(st); st->cr(); } + Bytecodes::Code code; if (is_wide()) { // bcp wasn't advanced if previous bytecode was _wide. @@ -117,14 +121,13 @@ class BytecodePrinter { } else { code = Bytecodes::code_at(method(), bcp); } - _code = code; + _raw_code = code; _next_pc = is_wide() ? bcp+2 : bcp+1; + + bool is_terminal = Bytecodes::is_terminal(code); // Trace each bytecode unless we're truncating the tracing output, then only print the first - // bytecode in every method as well as returns/throws that pop control flow - if (!TraceBytecodesTruncated || method_changed || - code == Bytecodes::_athrow || - code == Bytecodes::_return_register_finalizer || - (code >= Bytecodes::_ireturn && code <= Bytecodes::_return)) { + // bytecode in every method as well as returns/throws that pop control flow. + if (!TraceBytecodesTruncated || method_changed || is_terminal) { int bci = (int)(bcp - method->code_base()); st->print("[%zu] ", Thread::current()->osthread()->thread_id_for_printing()); if (Verbose) { @@ -138,8 +141,16 @@ class BytecodePrinter { } // Set is_wide for the next one, since the caller of this doesn't skip // the next bytecode. - _is_wide = (code == Bytecodes::_wide); - _code = Bytecodes::_illegal; + set_wide(code == Bytecodes::_wide); + // Finished using the code, reset to illegal. + _raw_code = Bytecodes::_illegal; + + // Invalidate the current method to force a signature change. In some + // rare cases, the method and frame pointers aren't enough to determine + // a new method invocation, so this ensures the signature is re-printed. + if (is_terminal) { + set_method(nullptr); + } if (TraceBytecodesStopAt != 0 && BytecodeCounter::counter_value() >= TraceBytecodesStopAt) { TraceBytecodes = false; @@ -150,17 +161,16 @@ class BytecodePrinter { // Used for Method::print_codes(). The input bcp comes from // BytecodeStream, which will skip wide bytecodes. void trace(const methodHandle& method, address bcp, outputStream* st) { - _current_method = method(); - // This may be called during linking after bytecodes are rewritten to point to the cpCache. - _use_cp_cache = method->constants()->cache() != nullptr; + assert(_raw_code == Bytecodes::_illegal, "invariant"); + set_method(method()); ResourceMark rm; Bytecodes::Code code = Bytecodes::code_at(method(), bcp); // Set is_wide - _is_wide = (code == Bytecodes::_wide); + set_wide(code == Bytecodes::_wide); if (is_wide()) { code = Bytecodes::code_at(method(), bcp+1); } - _code = code; + _raw_code = code; int bci = (int)(bcp - method->code_base()); // Print bytecode index and name if (ClassPrinter::has_mode(_flags, ClassPrinter::PRINT_BYTECODE_ADDR)) { @@ -180,26 +190,20 @@ class BytecodePrinter { }; #ifndef PRODUCT -// We need a global instance to keep track of the method being printed so we can report that -// the method has changed. If this method is redefined and removed, that's ok because the method passed -// in won't match, and this will print the method passed in again. Racing threads changing this global -// will result in reprinting the method passed in again. -static Method* _method_currently_being_printed = nullptr; - -void BytecodeTracer::trace_interpreter(const methodHandle& method, address bcp, uintptr_t tos, uintptr_t tos2, outputStream* st) { +void BytecodeTracer::trace_interpreter(const methodHandle& method, intptr_t* fp, address bcp, uintptr_t tos, uintptr_t tos2, outputStream* st) { if (TraceBytecodes && BytecodeCounter::counter_value() >= TraceBytecodesAt) { - BytecodePrinter printer(AtomicAccess::load_acquire(&_method_currently_being_printed)); - stringStream buf; - printer.trace(method, bcp, tos, tos2, &buf); - st->print("%s", buf.freeze()); - // Save method currently being printed to detect when method printing changes. - AtomicAccess::release_store(&_method_currently_being_printed, method()); + BytecodeTracerData* data = JavaThread::current()->bytecode_tracer_data(); + BytecodePrinter printer(data); + printer.trace(method, fp, bcp, tos, tos2, st); } } #endif void BytecodeTracer::print_method_codes(const methodHandle& method, int from, int to, outputStream* st, int flags, bool buffered) { - BytecodePrinter method_printer(flags); + // Debug builds can't re-use the data in the Java Thread as that is used for tracing + // the current bytecodes, rather than to print diagnostic information as is the + // case here. Always stack-allocate for this printing. + BytecodeTracerData data; BytecodeStream s(method); s.set_interval(from, to); @@ -207,6 +211,7 @@ void BytecodeTracer::print_method_codes(const methodHandle& method, int from, in stringStream ss; outputStream* out = buffered ? &ss : st; while (s.next() >= 0) { + BytecodePrinter method_printer(&data, flags); method_printer.trace(method, s.bcp(), out); } if (buffered) { @@ -345,7 +350,7 @@ void BytecodePrinter::print_bsm(int cp_index, outputStream* st) { void BytecodePrinter::print_attributes(int bci, outputStream* st) { // Show attributes of pre-rewritten codes - Bytecodes::Code code = Bytecodes::java_code(raw_code()); + Bytecodes::Code code = Bytecodes::java_code(_raw_code); // If the code doesn't have any fields there's nothing to print. // note this is ==1 because the tableswitch and lookupswitch are // zero size (for some reason) and we want to print stuff out for them. @@ -366,7 +371,7 @@ void BytecodePrinter::print_attributes(int bci, outputStream* st) { case Bytecodes::_ldc: { int cp_index; - if (Bytecodes::uses_cp_cache(raw_code())) { + if (Bytecodes::uses_cp_cache(_raw_code)) { assert(use_cp_cache(), "fast ldc bytecode must be in linked classes"); int obj_index = get_index_u1(); cp_index = constants()->object_to_cp_index(obj_index); @@ -381,7 +386,7 @@ void BytecodePrinter::print_attributes(int bci, outputStream* st) { case Bytecodes::_ldc2_w: { int cp_index; - if (Bytecodes::uses_cp_cache(raw_code())) { + if (Bytecodes::uses_cp_cache(_raw_code)) { assert(use_cp_cache(), "fast ldc bytecode must be in linked classes"); int obj_index = get_native_index_u2(); cp_index = constants()->object_to_cp_index(obj_index); @@ -533,7 +538,7 @@ void BytecodePrinter::print_attributes(int bci, outputStream* st) { cp_index = method_entry->constant_pool_index(); print_field_or_method(cp_index, st); - if (raw_code() == Bytecodes::_invokehandle && + if (_raw_code == Bytecodes::_invokehandle && ClassPrinter::has_mode(_flags, ClassPrinter::PRINT_METHOD_HANDLE)) { assert(use_cp_cache(), "invokehandle is only in rewritten methods"); method_entry->print_on(st); diff --git a/src/hotspot/share/interpreter/bytecodeTracer.hpp b/src/hotspot/share/interpreter/bytecodeTracer.hpp index ab66030b6cd..03340fbe5bf 100644 --- a/src/hotspot/share/interpreter/bytecodeTracer.hpp +++ b/src/hotspot/share/interpreter/bytecodeTracer.hpp @@ -25,21 +25,54 @@ #ifndef SHARE_INTERPRETER_BYTECODETRACER_HPP #define SHARE_INTERPRETER_BYTECODETRACER_HPP +#include "interpreter/bytecodes.hpp" #include "memory/allStatic.hpp" #include "utilities/globalDefinitions.hpp" -// The BytecodeTracer is a helper class used by the interpreter for run-time -// bytecode tracing. If TraceBytecodes turned on, trace_interpreter() will be called -// for each bytecode. - +class Method; class methodHandle; class outputStream; - class BytecodeClosure; + +// The BytecodeTracer is a helper class used by the interpreter for run-time +// bytecode tracing. If TraceBytecodes is turned on, trace_interpreter() will be called +// for each bytecode. class BytecodeTracer: AllStatic { public: - NOT_PRODUCT(static void trace_interpreter(const methodHandle& method, address bcp, uintptr_t tos, uintptr_t tos2, outputStream* st);) + NOT_PRODUCT(static void trace_interpreter(const methodHandle& method, intptr_t* fp, address bcp, uintptr_t tos, uintptr_t tos2, outputStream* st);) static void print_method_codes(const methodHandle& method, int from, int to, outputStream* st, int flags, bool buffered = true); }; +// Provides tracing-centric context whose lifespan exceeds the printing of +// a single bytecode. For instance, it is needed to determine method switches +// in order to print the appropriate signature once a switch happens. +class BytecodeTracerData { + private: + Method* _current_method; // for method switches + intptr_t* _current_fp; // for self-recursion + bool _is_wide; // to parse the next bytecode properly + + public: + BytecodeTracerData() : _current_method(nullptr), + _current_fp(nullptr), + _is_wide(false) {} + + // The current method may point to a stale/garbage Method. While pointer + // comparison is safe, it should only be dereferenced while guaranteed to + // be valid. For example, if the current method is set to the result of a + // methodHandle call, current_method() may be dereferenced while the handle + // is live. It is always up to the caller to ensure that current_method() + // is safe to dereference. + Method* current_method() const { return _current_method; } + void set_current_method(Method* current) { _current_method = current; } + + // The frame pointer should only ever be used for pointer comparison and may + // never be dereferenced. + intptr_t* current_fp() const { return _current_fp; } + void set_current_fp(intptr_t* current) { _current_fp = current; } + + bool is_wide() const { return _is_wide; } + void set_wide(bool wide) { _is_wide = wide; } +}; + #endif // SHARE_INTERPRETER_BYTECODETRACER_HPP diff --git a/src/hotspot/share/interpreter/bytecodes.hpp b/src/hotspot/share/interpreter/bytecodes.hpp index 629cca706ae..6f77e95f5bd 100644 --- a/src/hotspot/share/interpreter/bytecodes.hpp +++ b/src/hotspot/share/interpreter/bytecodes.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2023, 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 @@ -418,6 +418,9 @@ class Bytecodes: AllStatic { static bool is_zero_const (Code code) { return (code == _aconst_null || code == _iconst_0 || code == _fconst_0 || code == _dconst_0); } static bool is_return (Code code) { return (_ireturn <= code && code <= _return); } + static bool is_terminal (Code code) { return is_return(code) || + code == _return_register_finalizer || + code == _athrow; } static bool is_invoke (Code code) { return (_invokevirtual <= code && code <= _invokedynamic); } static bool is_field_code (Code code) { return (_getstatic <= java_code(code) && java_code(code) <= _putfield); } static bool has_receiver (Code code) { assert(is_invoke(code), ""); return code == _invokevirtual || diff --git a/src/hotspot/share/interpreter/interpreterRuntime.cpp b/src/hotspot/share/interpreter/interpreterRuntime.cpp index cd0a062ebc8..375cb402892 100644 --- a/src/hotspot/share/interpreter/interpreterRuntime.cpp +++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp @@ -1487,23 +1487,32 @@ JRT_ENTRY(void, InterpreterRuntime::member_name_arg_or_null(JavaThread* current, Method* method, address bcp)) Bytecodes::Code code = Bytecodes::code_at(method, bcp); if (code != Bytecodes::_invokestatic) { + current->set_vm_result_oop(nullptr); return; } + ConstantPool* cpool = method->constants(); int cp_index = Bytes::get_native_u2(bcp + 1); Symbol* cname = cpool->klass_name_at(cpool->klass_ref_index_at(cp_index, code)); Symbol* mname = cpool->name_ref_at(cp_index, code); - if (MethodHandles::has_member_arg(cname, mname)) { - oop member_name_oop = cast_to_oop(member_name); - if (java_lang_invoke_DirectMethodHandle::is_instance(member_name_oop)) { - // FIXME: remove after j.l.i.InvokerBytecodeGenerator code shape is updated. - member_name_oop = java_lang_invoke_DirectMethodHandle::member(member_name_oop); - } - current->set_vm_result_oop(member_name_oop); - } else { + if (!MethodHandles::has_member_arg(cname, mname)) { current->set_vm_result_oop(nullptr); + return; } + + oop member_name_oop = cast_to_oop(member_name); + + guarantee(member_name_oop != nullptr, "member_name_oop should not be nullptr"); + guarantee(oopDesc::is_oop(member_name_oop), "member_name_oop should be an oop"); + guarantee(java_lang_invoke_MemberName::is_instance(member_name_oop) || + java_lang_invoke_DirectMethodHandle::is_instance(member_name_oop), + "member_name_oop is not MemberName or DMH"); + + if (java_lang_invoke_DirectMethodHandle::is_instance(member_name_oop)) { + member_name_oop = java_lang_invoke_DirectMethodHandle::member(member_name_oop); + } + current->set_vm_result_oop(member_name_oop); JRT_END #endif // INCLUDE_JVMTI @@ -1517,7 +1526,9 @@ JRT_LEAF(intptr_t, InterpreterRuntime::trace_bytecode(JavaThread* current, intpt LastFrameAccessor last_frame(current); assert(last_frame.is_interpreted_frame(), "must be an interpreted frame"); methodHandle mh(current, last_frame.method()); - BytecodeTracer::trace_interpreter(mh, last_frame.bcp(), tos, tos2, tty); + stringStream st; + BytecodeTracer::trace_interpreter(mh, last_frame.get_frame().real_fp(), last_frame.bcp(), tos, tos2, &st); + tty->print("%s", st.freeze()); return preserve_this_value; JRT_END #endif // !PRODUCT diff --git a/src/hotspot/share/interpreter/oopMapCache.cpp b/src/hotspot/share/interpreter/oopMapCache.cpp index af45f7f9bed..34e226b00bf 100644 --- a/src/hotspot/share/interpreter/oopMapCache.cpp +++ b/src/hotspot/share/interpreter/oopMapCache.cpp @@ -156,7 +156,7 @@ InterpreterOopMap::InterpreterOopMap() { InterpreterOopMap::~InterpreterOopMap() { if (has_valid_mask() && mask_size() > small_mask_limit) { assert(_bit_mask[0] != 0, "should have pointer to C heap"); - FREE_C_HEAP_ARRAY(uintptr_t, _bit_mask[0]); + FREE_C_HEAP_ARRAY((uintptr_t*)_bit_mask[0]); } } @@ -288,7 +288,7 @@ void OopMapCacheEntry::deallocate_bit_mask() { if (mask_size() > small_mask_limit && _bit_mask[0] != 0) { assert(!Thread::current()->resource_area()->contains((void*)_bit_mask[0]), "This bit mask should not be in the resource area"); - FREE_C_HEAP_ARRAY(uintptr_t, _bit_mask[0]); + FREE_C_HEAP_ARRAY((uintptr_t*)_bit_mask[0]); DEBUG_ONLY(_bit_mask[0] = 0;) } } diff --git a/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp b/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp index a6e97ab227a..32710595d27 100644 --- a/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp +++ b/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp @@ -528,7 +528,7 @@ const char* JfrJavaSupport::c_str(jstring string, Thread* thread, bool c_heap /* void JfrJavaSupport::free_c_str(const char* str, bool c_heap) { if (c_heap) { - FREE_C_HEAP_ARRAY(char, str); + FREE_C_HEAP_ARRAY(str); } } diff --git a/src/hotspot/share/jfr/leakprofiler/leakProfiler.cpp b/src/hotspot/share/jfr/leakprofiler/leakProfiler.cpp index e8ad79783c0..9098a0af6b3 100644 --- a/src/hotspot/share/jfr/leakprofiler/leakProfiler.cpp +++ b/src/hotspot/share/jfr/leakprofiler/leakProfiler.cpp @@ -34,9 +34,15 @@ #include "runtime/vmThread.hpp" bool LeakProfiler::is_supported() { - if (UseShenandoahGC) { + if (UseShenandoahGC || UseZGC) { // Leak Profiler uses mark words in the ways that might interfere // with concurrent GC uses of them. This affects Shenandoah. + // + // Generational ZGC only does weak reference processing in the old generation. + // All objects that would usually die, because we are sampling stuff + // that immediately becomes garbage, will be artificially kept alive + // until an old-generation collection. This incurs a significant + // performance hit by causing allocation stalls. return false; } return true; @@ -58,7 +64,8 @@ bool LeakProfiler::start(int sample_count) { // Exit cleanly if not supported if (!is_supported()) { - log_trace(jfr, system)("Object sampling is not supported"); + log_info(jfr, system)("jdk.OldObjectSample event is currently not supported for %s.", + UseShenandoahGC ? "ShenandoahGC" : "ZGC"); return false; } diff --git a/src/hotspot/share/jfr/leakprofiler/sampling/samplePriorityQueue.cpp b/src/hotspot/share/jfr/leakprofiler/sampling/samplePriorityQueue.cpp index 644cd25ec8a..5eac068467f 100644 --- a/src/hotspot/share/jfr/leakprofiler/sampling/samplePriorityQueue.cpp +++ b/src/hotspot/share/jfr/leakprofiler/sampling/samplePriorityQueue.cpp @@ -36,7 +36,7 @@ SamplePriorityQueue::SamplePriorityQueue(size_t size) : } SamplePriorityQueue::~SamplePriorityQueue() { - FREE_C_HEAP_ARRAY(ObjectSample*, _items); + FREE_C_HEAP_ARRAY(_items); _items = nullptr; } diff --git a/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.cpp b/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.cpp index 11e211f6505..1650ad7d9c0 100644 --- a/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.cpp +++ b/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.cpp @@ -46,7 +46,7 @@ static GrowableArray* _interfaces = nullptr; void JfrNetworkUtilization::destroy() { if (_interfaces != nullptr) { for (int i = 0; i < _interfaces->length(); ++i) { - FREE_C_HEAP_ARRAY(char, _interfaces->at(i).name); + FREE_C_HEAP_ARRAY(_interfaces->at(i).name); } delete _interfaces; _interfaces = nullptr; diff --git a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp index 969c9ca60c1..92f406bd095 100644 --- a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp +++ b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp @@ -256,10 +256,7 @@ TRACE_REQUEST_FUNC(SystemProcess) { // feature is implemented, write real event while (processes != nullptr) { SystemProcess* tmp = processes; - const char* info = processes->command_line(); - if (info == nullptr) { - info = processes->path(); - } + const char* info = processes->path(); if (info == nullptr) { info = processes->name(); } diff --git a/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp b/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp index b212ee4ccba..ec8ab36d75a 100644 --- a/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp +++ b/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp @@ -799,7 +799,7 @@ void JfrOptionSet::release_start_flight_recording_options() { if (start_flight_recording_options_array != nullptr) { const int length = start_flight_recording_options_array->length(); for (int i = 0; i < length; ++i) { - FREE_C_HEAP_ARRAY(char, start_flight_recording_options_array->at(i)); + FREE_C_HEAP_ARRAY(start_flight_recording_options_array->at(i)); } delete start_flight_recording_options_array; start_flight_recording_options_array = nullptr; diff --git a/src/hotspot/share/jfr/recorder/stacktrace/jfrStackFilter.cpp b/src/hotspot/share/jfr/recorder/stacktrace/jfrStackFilter.cpp index 1eb057b564e..39a1c621888 100644 --- a/src/hotspot/share/jfr/recorder/stacktrace/jfrStackFilter.cpp +++ b/src/hotspot/share/jfr/recorder/stacktrace/jfrStackFilter.cpp @@ -55,6 +55,6 @@ JfrStackFilter::~JfrStackFilter() { Symbol::maybe_decrement_refcount(_method_names[i]); Symbol::maybe_decrement_refcount(_class_names[i]); } - FREE_C_HEAP_ARRAY(Symbol*, _method_names); - FREE_C_HEAP_ARRAY(Symbol*, _class_names); + FREE_C_HEAP_ARRAY(_method_names); + FREE_C_HEAP_ARRAY(_class_names); } diff --git a/src/hotspot/share/jfr/recorder/stacktrace/jfrStackFilterRegistry.cpp b/src/hotspot/share/jfr/recorder/stacktrace/jfrStackFilterRegistry.cpp index 0721604b1c1..cb9811e7cae 100644 --- a/src/hotspot/share/jfr/recorder/stacktrace/jfrStackFilterRegistry.cpp +++ b/src/hotspot/share/jfr/recorder/stacktrace/jfrStackFilterRegistry.cpp @@ -43,8 +43,8 @@ int64_t JfrStackFilterRegistry::add(jobjectArray classes, jobjectArray methods, Symbol** method_names = JfrJavaSupport::symbol_array(methods, jt, &m_size, true); assert(method_names != nullptr, "invariant"); if (c_size != m_size) { - FREE_C_HEAP_ARRAY(Symbol*, class_names); - FREE_C_HEAP_ARRAY(Symbol*, method_names); + FREE_C_HEAP_ARRAY(class_names); + FREE_C_HEAP_ARRAY(method_names); JfrJavaSupport::throw_internal_error("Method array size doesn't match class array size", jt); return STACK_FILTER_ERROR_CODE; } diff --git a/src/hotspot/share/jfr/support/methodtracer/jfrFilter.cpp b/src/hotspot/share/jfr/support/methodtracer/jfrFilter.cpp index 2a977f9e823..767036b57f2 100644 --- a/src/hotspot/share/jfr/support/methodtracer/jfrFilter.cpp +++ b/src/hotspot/share/jfr/support/methodtracer/jfrFilter.cpp @@ -51,10 +51,10 @@ JfrFilter::~JfrFilter() { Symbol::maybe_decrement_refcount(_method_names[i]); Symbol::maybe_decrement_refcount(_annotation_names[i]); } - FREE_C_HEAP_ARRAY(Symbol*, _class_names); - FREE_C_HEAP_ARRAY(Symbol*, _method_names); - FREE_C_HEAP_ARRAY(Symbol*, _annotation_names); - FREE_C_HEAP_ARRAY(int, _modifications); + FREE_C_HEAP_ARRAY(_class_names); + FREE_C_HEAP_ARRAY(_method_names); + FREE_C_HEAP_ARRAY(_annotation_names); + FREE_C_HEAP_ARRAY(_modifications); } bool JfrFilter::can_instrument_module(const ModuleEntry* module) const { diff --git a/src/hotspot/share/jfr/support/methodtracer/jfrFilterManager.cpp b/src/hotspot/share/jfr/support/methodtracer/jfrFilterManager.cpp index d9081efa08c..ea031f9f205 100644 --- a/src/hotspot/share/jfr/support/methodtracer/jfrFilterManager.cpp +++ b/src/hotspot/share/jfr/support/methodtracer/jfrFilterManager.cpp @@ -130,10 +130,10 @@ bool JfrFilterManager::install(jobjectArray classes, jobjectArray methods, jobje modifications[i] = modification_tah->int_at(i); } if (class_size != method_size || class_size != annotation_size || class_size != modification_size) { - FREE_C_HEAP_ARRAY(Symbol*, class_names); - FREE_C_HEAP_ARRAY(Symbol*, method_names); - FREE_C_HEAP_ARRAY(Symbol*, annotation_names); - FREE_C_HEAP_ARRAY(int, modifications); + FREE_C_HEAP_ARRAY(class_names); + FREE_C_HEAP_ARRAY(method_names); + FREE_C_HEAP_ARRAY(annotation_names); + FREE_C_HEAP_ARRAY(modifications); JfrJavaSupport::throw_internal_error("Method array sizes don't match", jt); return false; } diff --git a/src/hotspot/share/jfr/utilities/jfrConcurrentHashtable.inline.hpp b/src/hotspot/share/jfr/utilities/jfrConcurrentHashtable.inline.hpp index 6d6908234a3..22028a96e55 100644 --- a/src/hotspot/share/jfr/utilities/jfrConcurrentHashtable.inline.hpp +++ b/src/hotspot/share/jfr/utilities/jfrConcurrentHashtable.inline.hpp @@ -59,7 +59,7 @@ inline JfrConcurrentHashtable::JfrConcurrentHashtable(uns template class TableEntry> inline JfrConcurrentHashtable::~JfrConcurrentHashtable() { - FREE_C_HEAP_ARRAY(Bucket, _buckets); + FREE_C_HEAP_ARRAY(_buckets); } template class TableEntry> diff --git a/src/hotspot/share/jfr/utilities/jfrHashtable.hpp b/src/hotspot/share/jfr/utilities/jfrHashtable.hpp index 0be2d92ed19..ce4c920cf8b 100644 --- a/src/hotspot/share/jfr/utilities/jfrHashtable.hpp +++ b/src/hotspot/share/jfr/utilities/jfrHashtable.hpp @@ -93,7 +93,7 @@ class JfrBasicHashtable : public CHeapObj { --_number_of_entries; } void free_buckets() { - FREE_C_HEAP_ARRAY(Bucket, _buckets); + FREE_C_HEAP_ARRAY(_buckets); } TableEntry* bucket(size_t i) { return _buckets[i].get_entry();} TableEntry** bucket_addr(size_t i) { return _buckets[i].entry_addr(); } diff --git a/src/hotspot/share/jfr/utilities/jfrSet.hpp b/src/hotspot/share/jfr/utilities/jfrSet.hpp index c443434800a..3e828d51ec3 100644 --- a/src/hotspot/share/jfr/utilities/jfrSet.hpp +++ b/src/hotspot/share/jfr/utilities/jfrSet.hpp @@ -82,7 +82,7 @@ class JfrSetStorage : public AnyObj { ~JfrSetStorage() { if (CONFIG::alloc_type() == C_HEAP) { - FREE_C_HEAP_ARRAY(K, _table); + FREE_C_HEAP_ARRAY(_table); } } @@ -160,7 +160,7 @@ class JfrSet : public JfrSetStorage { } } if (CONFIG::alloc_type() == AnyObj::C_HEAP) { - FREE_C_HEAP_ARRAY(K, old_table); + FREE_C_HEAP_ARRAY(old_table); } assert(_table_mask + 1 == this->_table_size, "invariant"); assert(_resize_threshold << 1 == this->_table_size, "invariant"); diff --git a/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp b/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp index ce617a4a514..6043b400e3b 100644 --- a/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp +++ b/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp @@ -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 @@ -818,9 +818,8 @@ JVMCI::CodeInstallResult CodeInstaller::install(JVMCICompiler* compiler, cb = nm; if (compile_state == nullptr) { // This compile didn't come through the CompileBroker so perform the printing here - DirectiveSet* directive = DirectivesStack::getMatchingDirective(method, compiler); - nm->maybe_print_nmethod(directive); - DirectivesStack::release(directive); + CompilerDirectiveMatcher matcher(method, CompLevel_full_optimization); + nm->maybe_print_nmethod(matcher.directive_set()); // Since this compilation didn't pass through the broker it wasn't logged yet. if (PrintCompilation) { diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp index a01f95d8cd5..5d0d2aedc62 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp @@ -585,7 +585,7 @@ C2V_END C2V_VMENTRY_0(jboolean, hasNeverInlineDirective,(JNIEnv* env, jobject, ARGUMENT_PAIR(method))) methodHandle method (THREAD, UNPACK_PAIR(Method, method)); - return !Inline || CompilerOracle::should_not_inline(method) || method->dont_inline(); + return !Inline || CompilerOracle::should_not_inline(method, CompLevel_full_optimization) || method->dont_inline(); C2V_END C2V_VMENTRY_0(jboolean, shouldInlineMethod,(JNIEnv* env, jobject, ARGUMENT_PAIR(method))) diff --git a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp index 1fdf98588fd..4a1ddf13d60 100644 --- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp @@ -1017,7 +1017,7 @@ static_field(VM_Version, _rop_protection, bool) \ volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) -#define DECLARE_INT_CPU_FEATURE_CONSTANT(id, name, bit) GENERATE_VM_INT_CONSTANT_ENTRY(VM_Version::CPU_##id) +#define DECLARE_INT_CPU_FEATURE_CONSTANT(id, name) GENERATE_VM_INT_CONSTANT_ENTRY(VM_Version::CPU_##id) #define VM_INT_CPU_FEATURE_CONSTANTS CPU_FEATURE_FLAGS(DECLARE_INT_CPU_FEATURE_CONSTANT) #endif @@ -1037,7 +1037,7 @@ declare_constant(frame::interpreter_frame_sender_sp_offset) \ declare_constant(frame::interpreter_frame_last_sp_offset) -#define DECLARE_LONG_CPU_FEATURE_CONSTANT(id, name, bit) GENERATE_VM_LONG_CONSTANT_ENTRY(VM_Version::CPU_##id) +#define DECLARE_LONG_CPU_FEATURE_CONSTANT(id, name) GENERATE_VM_LONG_CONSTANT_ENTRY(VM_Version::CPU_##id) #define VM_LONG_CPU_FEATURE_CONSTANTS \ CPU_FEATURE_FLAGS(DECLARE_LONG_CPU_FEATURE_CONSTANT) diff --git a/src/hotspot/share/libadt/vectset.cpp b/src/hotspot/share/libadt/vectset.cpp index 176660d8302..bd9e97d9877 100644 --- a/src/hotspot/share/libadt/vectset.cpp +++ b/src/hotspot/share/libadt/vectset.cpp @@ -51,7 +51,7 @@ void VectorSet::grow(uint new_word_capacity) { assert(new_word_capacity < (1U << 30), ""); uint x = next_power_of_2(new_word_capacity); if (x > _data_size) { - _data = REALLOC_ARENA_ARRAY(_set_arena, uint32_t, _data, _size, x); + _data = REALLOC_ARENA_ARRAY(_set_arena, _data, _size, x); _data_size = x; } Copy::zero_to_bytes(_data + _size, (x - _size) * sizeof(uint32_t)); diff --git a/src/hotspot/share/logging/logAsyncWriter.hpp b/src/hotspot/share/logging/logAsyncWriter.hpp index a93b1ca58f6..933482929c7 100644 --- a/src/hotspot/share/logging/logAsyncWriter.hpp +++ b/src/hotspot/share/logging/logAsyncWriter.hpp @@ -124,7 +124,7 @@ class AsyncLogWriter : public NonJavaThread { } ~Buffer() { - FREE_C_HEAP_ARRAY(char, _buf); + FREE_C_HEAP_ARRAY(_buf); } void push_flush_token(); diff --git a/src/hotspot/share/logging/logConfiguration.cpp b/src/hotspot/share/logging/logConfiguration.cpp index b883dbccacf..1ba45cc050f 100644 --- a/src/hotspot/share/logging/logConfiguration.cpp +++ b/src/hotspot/share/logging/logConfiguration.cpp @@ -123,7 +123,7 @@ void LogConfiguration::initialize(jlong vm_start_time) { void LogConfiguration::finalize() { disable_outputs(); - FREE_C_HEAP_ARRAY(LogOutput*, _outputs); + FREE_C_HEAP_ARRAY(_outputs); } // Normalizes the given LogOutput name to type=name form. @@ -206,7 +206,7 @@ LogOutput* LogConfiguration::new_output(const char* name, size_t LogConfiguration::add_output(LogOutput* output) { size_t idx = _n_outputs++; - _outputs = REALLOC_C_HEAP_ARRAY(LogOutput*, _outputs, _n_outputs, mtLogging); + _outputs = REALLOC_C_HEAP_ARRAY(_outputs, _n_outputs, mtLogging); _outputs[idx] = output; return idx; } @@ -218,7 +218,7 @@ void LogConfiguration::delete_output(size_t idx) { LogOutput* output = _outputs[idx]; // Swap places with the last output and shrink the array _outputs[idx] = _outputs[--_n_outputs]; - _outputs = REALLOC_C_HEAP_ARRAY(LogOutput*, _outputs, _n_outputs, mtLogging); + _outputs = REALLOC_C_HEAP_ARRAY(_outputs, _n_outputs, mtLogging); delete output; } @@ -546,7 +546,7 @@ bool LogConfiguration::parse_log_arguments(const char* outputstr, } } - FREE_C_HEAP_ARRAY(char, normalized); + FREE_C_HEAP_ARRAY(normalized); if (idx == SIZE_MAX) { return false; } @@ -724,8 +724,7 @@ void LogConfiguration::register_update_listener(UpdateListenerFunction cb) { assert(cb != nullptr, "Should not register nullptr as listener"); ConfigurationLock cl; size_t idx = _n_listener_callbacks++; - _listener_callbacks = REALLOC_C_HEAP_ARRAY(UpdateListenerFunction, - _listener_callbacks, + _listener_callbacks = REALLOC_C_HEAP_ARRAY(_listener_callbacks, _n_listener_callbacks, mtLogging); _listener_callbacks[idx] = cb; diff --git a/src/hotspot/share/logging/logFileOutput.cpp b/src/hotspot/share/logging/logFileOutput.cpp index 9d6d19d739e..c805a3e1077 100644 --- a/src/hotspot/share/logging/logFileOutput.cpp +++ b/src/hotspot/share/logging/logFileOutput.cpp @@ -160,8 +160,8 @@ static uint next_file_number(const char* filename, } } - FREE_C_HEAP_ARRAY(char, oldest_name); - FREE_C_HEAP_ARRAY(char, archive_name); + FREE_C_HEAP_ARRAY(oldest_name); + FREE_C_HEAP_ARRAY(archive_name); return next_num; } diff --git a/src/hotspot/share/logging/logMessageBuffer.cpp b/src/hotspot/share/logging/logMessageBuffer.cpp index 8f308b1f015..4714cd65f8a 100644 --- a/src/hotspot/share/logging/logMessageBuffer.cpp +++ b/src/hotspot/share/logging/logMessageBuffer.cpp @@ -31,7 +31,7 @@ static void grow(T*& buffer, size_t& capacity, size_t minimum_length = 0) { if (new_size < minimum_length) { new_size = minimum_length; } - buffer = REALLOC_C_HEAP_ARRAY(T, buffer, new_size, mtLogging); + buffer = REALLOC_C_HEAP_ARRAY(buffer, new_size, mtLogging); capacity = new_size; } @@ -48,8 +48,8 @@ LogMessageBuffer::LogMessageBuffer() : _message_buffer_size(0), LogMessageBuffer::~LogMessageBuffer() { if (_allocated) { - FREE_C_HEAP_ARRAY(char, _message_buffer); - FREE_C_HEAP_ARRAY(LogLine, _lines); + FREE_C_HEAP_ARRAY(_message_buffer); + FREE_C_HEAP_ARRAY(_lines); } } diff --git a/src/hotspot/share/logging/logOutput.cpp b/src/hotspot/share/logging/logOutput.cpp index e3c68b49b13..f74e614e539 100644 --- a/src/hotspot/share/logging/logOutput.cpp +++ b/src/hotspot/share/logging/logOutput.cpp @@ -181,7 +181,7 @@ static void add_selections(LogSelection** selections, // Ensure there's enough room for both wildcard_match and exact_match if (*n_selections + 2 > *selections_cap) { *selections_cap *= 2; - *selections = REALLOC_C_HEAP_ARRAY(LogSelection, *selections, *selections_cap, mtLogging); + *selections = REALLOC_C_HEAP_ARRAY(*selections, *selections_cap, mtLogging); } // Add found matching selections to the result array @@ -317,8 +317,8 @@ void LogOutput::update_config_string(const size_t on_level[LogLevel::Count]) { break; } } - FREE_C_HEAP_ARRAY(LogTagSet*, deviates); - FREE_C_HEAP_ARRAY(Selection, selections); + FREE_C_HEAP_ARRAY(deviates); + FREE_C_HEAP_ARRAY(selections); } bool LogOutput::parse_options(const char* options, outputStream* errstream) { diff --git a/src/hotspot/share/logging/logTagSet.cpp b/src/hotspot/share/logging/logTagSet.cpp index 667c76ec306..28b0d697b14 100644 --- a/src/hotspot/share/logging/logTagSet.cpp +++ b/src/hotspot/share/logging/logTagSet.cpp @@ -215,5 +215,5 @@ void LogTagSet::list_all_tagsets(outputStream* out) { os::free(tagset_labels[idx]); } out->cr(); - FREE_C_HEAP_ARRAY(char*, tagset_labels); + FREE_C_HEAP_ARRAY(tagset_labels); } diff --git a/src/hotspot/share/memory/allocation.cpp b/src/hotspot/share/memory/allocation.cpp index 2a109688ca6..f5e4e1f3df6 100644 --- a/src/hotspot/share/memory/allocation.cpp +++ b/src/hotspot/share/memory/allocation.cpp @@ -28,6 +28,7 @@ #include "memory/metaspace.hpp" #include "memory/resourceArea.hpp" #include "nmt/memTracker.hpp" +#include "runtime/atomicAccess.hpp" #include "runtime/os.hpp" #include "runtime/task.hpp" #include "utilities/ostream.hpp" @@ -66,9 +67,24 @@ void FreeHeap(void* p) { os::free(p); } +// These are used by the Serviceability Agent even if CDS is disabled void* MetaspaceObj::_aot_metaspace_base = nullptr; void* MetaspaceObj::_aot_metaspace_top = nullptr; +#if INCLUDE_CDS +volatile bool MetaspaceObj::_aot_metaspace_range_initialized = false; + +void MetaspaceObj::set_aot_metaspace_range(void* base, void* top) { + _aot_metaspace_base = base; + _aot_metaspace_top = top; + AtomicAccess::release_store(&_aot_metaspace_range_initialized, true); +} + +bool MetaspaceObj::aot_metaspace_range_initialized() { + return AtomicAccess::load_acquire(&_aot_metaspace_range_initialized); +} +#endif + void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, MetaspaceObj::Type type, TRAPS) throw() { @@ -168,7 +184,8 @@ void AnyObj::set_in_aot_cache() { } bool AnyObj::in_aot_cache() const { - if (AOTMetaspace::in_aot_cache(this)) { + if (MetaspaceObj::is_pointer_in_aot_cache(this)) { + // "this" can be AOT space only if aot_metaspace_range_initialized() precond(_allocation_t[0] == 0); precond(_allocation_t[1] == 0); return true; diff --git a/src/hotspot/share/memory/allocation.hpp b/src/hotspot/share/memory/allocation.hpp index 15b7750a363..a49f9ce9a0b 100644 --- a/src/hotspot/share/memory/allocation.hpp +++ b/src/hotspot/share/memory/allocation.hpp @@ -95,7 +95,7 @@ typedef AllocFailStrategy::AllocFailEnum AllocFailType; // // char* AllocateHeap(size_t size, MemTag mem_tag, const NativeCallStack& stack, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); // char* AllocateHeap(size_t size, MemTag mem_tag, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); -// char* ReallocateHeap(char *old, size_t size, MemTag mem_tag, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); +// char* ReallocateHeap(char* old, size_t size, MemTag mem_tag, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); // void FreeHeap(void* p); // @@ -112,7 +112,7 @@ char* AllocateHeap(size_t size, MemTag mem_tag, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); -char* ReallocateHeap(char *old, +char* ReallocateHeap(char* old, size_t size, MemTag mem_tag, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); @@ -260,11 +260,8 @@ class MetaspaceObj { // void deallocate_contents(ClassLoaderData* loader_data); friend class VMStructs; - // All metsapce objects in the AOT cache (CDS archive) are mapped - // into a single contiguous memory block, so we can use these - // two pointers to quickly determine if a MetaspaceObj is in the - // AOT cache. - // When AOT/CDS is not enabled, both pointers are set to null. + + // These are used by the Serviceability Agent even if CDS is disabled static void* _aot_metaspace_base; // (inclusive) low address static void* _aot_metaspace_top; // (exclusive) high address @@ -275,28 +272,48 @@ class MetaspaceObj { // regular- or aot metaspace. static bool is_valid(const MetaspaceObj* p); -#if INCLUDE_CDS - static bool in_aot_cache(const MetaspaceObj* p) { +#if !INCLUDE_CDS + static bool is_pointer_in_aot_cache(const void* p) { return false; } + static bool is_pointer_in_aot_cache_no_init_check(const void* p) { return false; } +#else +private: + // All metsapce objects in the AOT cache (CDS archive) are mapped + // into a single contiguous memory block, so we can use these + // two pointers to quickly determine if a MetaspaceObj is in the + // AOT cache. + // When AOT/CDS is not enabled, both pointers are set to null. + static volatile bool _aot_metaspace_range_initialized; + static bool aot_metaspace_range_initialized(); + +public: + inline static bool is_pointer_in_aot_cache(const void* p) { + return aot_metaspace_range_initialized() && is_pointer_in_aot_cache_no_init_check(p); + } + + // Call this ONLY if you know that the AOT metaspace has already been initialized. + inline static bool is_pointer_in_aot_cache_no_init_check(const void* p) { + precond(aot_metaspace_range_initialized()); + // If no shared metaspace regions are mapped, _aot_metaspace_{base,top} will // both be null and all values of p will be rejected quickly. - return (((void*)p) < _aot_metaspace_top && - ((void*)p) >= _aot_metaspace_base); + return (p < _aot_metaspace_top && + p >= _aot_metaspace_base); } - bool in_aot_cache() const { return MetaspaceObj::in_aot_cache(this); } -#else - static bool in_aot_cache(const MetaspaceObj* p) { return false; } - bool in_aot_cache() const { return false; } -#endif - void print_address_on(outputStream* st) const; // nonvirtual address printing - - static void set_aot_metaspace_range(void* base, void* top) { - _aot_metaspace_base = base; - _aot_metaspace_top = top; - } + static void set_aot_metaspace_range(void* base, void* top); static void* aot_metaspace_base() { return _aot_metaspace_base; } static void* aot_metaspace_top() { return _aot_metaspace_top; } +#endif // INCLUDE_CDS + + bool in_aot_cache() const { + // MetaspaceObjects are only created or loaded from the AOT cache after + // the AOT metaspace has been initialized, so we can skip init checks. + return is_pointer_in_aot_cache_no_init_check(this); + } + + void print_address_on(outputStream* st) const; // nonvirtual address printing + #define METASPACE_OBJ_TYPES_DO(f) \ f(Class) \ @@ -374,9 +391,9 @@ extern char* resource_allocate_bytes(size_t size, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); extern char* resource_allocate_bytes(Thread* thread, size_t size, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); -extern char* resource_reallocate_bytes( char *old, size_t old_size, size_t new_size, +extern char* resource_reallocate_bytes(char* old, size_t old_size, size_t new_size, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM); -extern void resource_free_bytes( Thread* thread, char *old, size_t size ); +extern void resource_free_bytes(Thread* thread, char* obj, size_t size); //---------------------------------------------------------------------- // Base class for objects allocated in the resource area. @@ -479,6 +496,8 @@ protected: #endif // PRODUCT }; +#define REALLOC_RETURN_TYPE(old) typename std::remove_reference::type + // One of the following macros must be used when allocating an array // or object to determine whether it should reside in the C heap on in // the resource area. @@ -495,21 +514,18 @@ protected: #define NEW_RESOURCE_ARRAY_IN_THREAD_RETURN_NULL(thread, type, size)\ (type*) resource_allocate_bytes(thread, (size) * sizeof(type), AllocFailStrategy::RETURN_NULL) -#define REALLOC_RESOURCE_ARRAY(type, old, old_size, new_size)\ - (type*) resource_reallocate_bytes((char*)(old), (old_size) * sizeof(type), (new_size) * sizeof(type)) +#define REALLOC_RESOURCE_ARRAY(old, old_size, new_size)\ + (REALLOC_RETURN_TYPE(old)) resource_reallocate_bytes((char*)(old), (old_size) * sizeof(*old), (new_size) * sizeof(*old)) -#define REALLOC_RESOURCE_ARRAY_RETURN_NULL(type, old, old_size, new_size)\ - (type*) resource_reallocate_bytes((char*)(old), (old_size) * sizeof(type),\ - (new_size) * sizeof(type), AllocFailStrategy::RETURN_NULL) +#define REALLOC_RESOURCE_ARRAY_RETURN_NULL(old, old_size, new_size)\ + (REALLOC_RETURN_TYPE(old)) resource_reallocate_bytes((char*)(old), (old_size) * sizeof(*old), \ + (new_size) * sizeof(*old), AllocFailStrategy::RETURN_NULL) -#define FREE_RESOURCE_ARRAY(type, old, size)\ - resource_free_bytes(Thread::current(), (char*)(old), (size) * sizeof(type)) +#define FREE_RESOURCE_ARRAY(obj, size)\ + resource_free_bytes(Thread::current(), (char*)(obj), (size) * sizeof(*obj)) -#define FREE_RESOURCE_ARRAY_IN_THREAD(thread, type, old, size)\ - resource_free_bytes(thread, (char*)(old), (size) * sizeof(type)) - -#define FREE_FAST(old)\ - /* nop */ +#define FREE_RESOURCE_ARRAY_IN_THREAD(thread, obj, size)\ + resource_free_bytes(thread, (char*)(obj), (size) * sizeof(*obj)) #define NEW_RESOURCE_OBJ(type)\ NEW_RESOURCE_ARRAY(type, 1) @@ -532,14 +548,14 @@ protected: #define NEW_C_HEAP_ARRAY_RETURN_NULL(type, size, mem_tag)\ NEW_C_HEAP_ARRAY2(type, (size), mem_tag, AllocFailStrategy::RETURN_NULL) -#define REALLOC_C_HEAP_ARRAY(type, old, size, mem_tag)\ - (type*) (ReallocateHeap((char*)(old), (size) * sizeof(type), mem_tag)) +#define REALLOC_C_HEAP_ARRAY(old, size, mem_tag)\ + (REALLOC_RETURN_TYPE(old)) ReallocateHeap((char*)(old), (size) * sizeof(*old), mem_tag) -#define REALLOC_C_HEAP_ARRAY_RETURN_NULL(type, old, size, mem_tag)\ - (type*) (ReallocateHeap((char*)(old), (size) * sizeof(type), mem_tag, AllocFailStrategy::RETURN_NULL)) +#define REALLOC_C_HEAP_ARRAY_RETURN_NULL(old, size, mem_tag)\ + (REALLOC_RETURN_TYPE(old)) ReallocateHeap((char*)(old), (size) * sizeof(*old), mem_tag, AllocFailStrategy::RETURN_NULL) -#define FREE_C_HEAP_ARRAY(type, old) \ - FreeHeap((char*)(old)) +#define FREE_C_HEAP_ARRAY(obj) \ + FreeHeap((void*)(obj)) // allocate type in heap without calling ctor #define NEW_C_HEAP_OBJ(type, mem_tag)\ @@ -548,9 +564,9 @@ protected: #define NEW_C_HEAP_OBJ_RETURN_NULL(type, mem_tag)\ NEW_C_HEAP_ARRAY_RETURN_NULL(type, 1, mem_tag) -// deallocate obj of type in heap without calling dtor -#define FREE_C_HEAP_OBJ(objname)\ - FreeHeap((char*)objname); +// deallocate obj in heap without calling dtor +#define FREE_C_HEAP_OBJ(obj)\ + FREE_C_HEAP_ARRAY(obj) //------------------------------ReallocMark--------------------------------- diff --git a/src/hotspot/share/memory/arena.hpp b/src/hotspot/share/memory/arena.hpp index 7d88c79ca52..252e511f615 100644 --- a/src/hotspot/share/memory/arena.hpp +++ b/src/hotspot/share/memory/arena.hpp @@ -240,12 +240,12 @@ private: #define NEW_ARENA_ARRAY(arena, type, size) \ (type*) (arena)->Amalloc((size) * sizeof(type)) -#define REALLOC_ARENA_ARRAY(arena, type, old, old_size, new_size) \ - (type*) (arena)->Arealloc((char*)(old), (old_size) * sizeof(type), \ - (new_size) * sizeof(type) ) +#define REALLOC_ARENA_ARRAY(arena, old, old_size, new_size) \ + (REALLOC_RETURN_TYPE(old)) (arena)->Arealloc((char*)(old), (old_size) * sizeof(*old), \ + (new_size) * sizeof(*old) ) -#define FREE_ARENA_ARRAY(arena, type, old, size) \ - (arena)->Afree((char*)(old), (size) * sizeof(type)) +#define FREE_ARENA_ARRAY(arena, obj, size) \ + (arena)->Afree((char*)(obj), (size) * sizeof(*obj)) #define NEW_ARENA_OBJ(arena, type) \ NEW_ARENA_ARRAY(arena, type, 1) diff --git a/src/hotspot/share/memory/heapInspection.cpp b/src/hotspot/share/memory/heapInspection.cpp index aae3c99a634..5abb7e4ddcc 100644 --- a/src/hotspot/share/memory/heapInspection.cpp +++ b/src/hotspot/share/memory/heapInspection.cpp @@ -189,7 +189,7 @@ KlassInfoTable::~KlassInfoTable() { for (int index = 0; index < _num_buckets; index++) { _buckets[index].empty(); } - FREE_C_HEAP_ARRAY(KlassInfoBucket, _buckets); + FREE_C_HEAP_ARRAY(_buckets); _buckets = nullptr; } } diff --git a/src/hotspot/share/memory/memRegion.cpp b/src/hotspot/share/memory/memRegion.cpp index 3c481926025..dde4b0ace9a 100644 --- a/src/hotspot/share/memory/memRegion.cpp +++ b/src/hotspot/share/memory/memRegion.cpp @@ -115,5 +115,5 @@ void MemRegion::destroy_array(MemRegion* array, size_t length) { for (size_t i = 0; i < length; i++) { array[i].~MemRegion(); } - FREE_C_HEAP_ARRAY(MemRegion, array); + FREE_C_HEAP_ARRAY(array); } diff --git a/src/hotspot/share/memory/memoryReserver.cpp b/src/hotspot/share/memory/memoryReserver.cpp index 1c44f76ed11..f9359420693 100644 --- a/src/hotspot/share/memory/memoryReserver.cpp +++ b/src/hotspot/share/memory/memoryReserver.cpp @@ -656,11 +656,12 @@ ReservedHeapSpace HeapReserver::Instance::reserve_compressed_oops_heap(const siz #endif // _LP64 ReservedHeapSpace HeapReserver::Instance::reserve_heap(size_t size, size_t alignment, size_t page_size) { - if (UseCompressedOops) { #ifdef _LP64 + if (UseCompressedOops) { return reserve_compressed_oops_heap(size, alignment, page_size); + } else #endif - } else { + { return reserve_uncompressed_oops_heap(size, alignment, page_size); } } diff --git a/src/hotspot/share/memory/metaspace.cpp b/src/hotspot/share/memory/metaspace.cpp index da6ebc991c8..b97ae9ab540 100644 --- a/src/hotspot/share/memory/metaspace.cpp +++ b/src/hotspot/share/memory/metaspace.cpp @@ -739,6 +739,9 @@ void Metaspace::global_initialize() { AOTMetaspace::initialize_runtime_shared_and_meta_spaces(); // If any of the archived space fails to map, UseSharedSpaces // is reset to false. + } else { + // Trivially set the range to empty to satisfy the assert in MetaspaceObj::is_pointer_in_aot_cache() + MetaspaceObj::set_aot_metaspace_range(nullptr, nullptr); } #endif // INCLUDE_CDS diff --git a/src/hotspot/share/memory/metaspace/rootChunkArea.cpp b/src/hotspot/share/memory/metaspace/rootChunkArea.cpp index a178e122788..39407b46999 100644 --- a/src/hotspot/share/memory/metaspace/rootChunkArea.cpp +++ b/src/hotspot/share/memory/metaspace/rootChunkArea.cpp @@ -473,7 +473,7 @@ RootChunkAreaLUT::~RootChunkAreaLUT() { for (int i = 0; i < _num; i++) { _arr[i].~RootChunkArea(); } - FREE_C_HEAP_ARRAY(RootChunkArea, _arr); + FREE_C_HEAP_ARRAY(_arr); } #ifdef ASSERT diff --git a/src/hotspot/share/memory/metaspaceClosure.hpp b/src/hotspot/share/memory/metaspaceClosure.hpp index ac42dd13c6c..20e5528e9bc 100644 --- a/src/hotspot/share/memory/metaspaceClosure.hpp +++ b/src/hotspot/share/memory/metaspaceClosure.hpp @@ -37,19 +37,6 @@ #include "utilities/macros.hpp" #include "utilities/resizableHashTable.hpp" -// This macro just check for the existence of a member with the name "metaspace_pointers_do". If the -// parameter list is not (MetaspaceClosure* it), you will get a compilation error. -#define HAS_METASPACE_POINTERS_DO(T) HasMetaspacePointersDo::value - -template -class HasMetaspacePointersDo { - template static void* test(decltype(&U::metaspace_pointers_do)); - template static int test(...); - using test_type = decltype(test(nullptr)); -public: - static constexpr bool value = std::is_pointer_v; -}; - // class MetaspaceClosure -- // // This class is used for iterating the class metadata objects. It @@ -98,7 +85,6 @@ public: // only in the Metadata class. // // To work around the lack of a vtable, we use the Ref class with templates - // (see MSORef, OtherArrayRef, MSOArrayRef, and MSOPointerArrayRef) // so that we can statically discover the type of a object. The use of Ref // depends on the fact that: // @@ -194,15 +180,6 @@ private: return obj->size_in_heapwords(); } - static MetaspaceClosureType as_type(MetaspaceClosureType t) { - return t; - } - - static MetaspaceClosureType as_type(MetaspaceObj::Type msotype) { - precond(msotype < MetaspaceObj::_number_of_types); - return (MetaspaceClosureType)msotype; - } - // MSORef -- iterate an instance of T, where T::metaspace_pointers_do() exists. template class MSORef : public Ref { T** _mpp; @@ -210,99 +187,22 @@ private: return strip_tags(*_mpp); } protected: - virtual void** mpp() const { + virtual void** mpp() const override { return (void**)_mpp; } public: MSORef(T** mpp, Writability w) : Ref(w), _mpp(mpp) {} - virtual bool is_read_only_by_default() const { return T::is_read_only_by_default(); } - virtual bool not_null() const { return dereference() != nullptr; } - virtual int size() const { return get_size(dereference()); } - virtual MetaspaceClosureType type() const { return as_type(dereference()->type()); } - - virtual void metaspace_pointers_do(MetaspaceClosure *it) const { + virtual bool is_read_only_by_default() const override { return T::is_read_only_by_default(); } + virtual bool not_null() const override { return dereference() != nullptr; } + virtual int size() const override { return get_size(dereference()); } + virtual MetaspaceClosureType type() const override { return as_type(dereference()->type()); } + virtual void metaspace_pointers_do(MetaspaceClosure *it) const override { dereference()->metaspace_pointers_do(it); } }; - //--------------------- - // Support for Array - //--------------------- - - // Abstract base class for MSOArrayRef, MSOPointerArrayRef and OtherArrayRef. - // These are used for iterating Array. - template class ArrayRef : public Ref { - Array** _mpp; - protected: - Array* dereference() const { - return strip_tags(*_mpp); - } - virtual void** mpp() const { - return (void**)_mpp; - } - - ArrayRef(Array** mpp, Writability w) : Ref(w), _mpp(mpp) {} - - // all Arrays are read-only by default - virtual bool is_read_only_by_default() const { return true; } - virtual bool not_null() const { return dereference() != nullptr; } - virtual int size() const { return dereference()->size(); } - virtual MetaspaceClosureType type() const { return as_type(MetaspaceObj::array_type(sizeof(T))); } - }; - - // OtherArrayRef -- iterate an instance of Array, where T does NOT have metaspace_pointer_do(). - // T can be a primitive type, such as int, or a structure. However, we do not scan - // the fields inside T, so you should not embed any pointers inside T. - template class OtherArrayRef : public ArrayRef { - public: - OtherArrayRef(Array** mpp, Writability w) : ArrayRef(mpp, w) {} - - virtual void metaspace_pointers_do(MetaspaceClosure *it) const { - Array* array = ArrayRef::dereference(); - log_trace(aot)("Iter(OtherArray): %p [%d]", array, array->length()); - } - }; - - // MSOArrayRef -- iterate an instance of Array, where T has metaspace_pointer_do(). - // We recursively call T::metaspace_pointers_do() for each element in this array. - template class MSOArrayRef : public ArrayRef { - public: - MSOArrayRef(Array** mpp, Writability w) : ArrayRef(mpp, w) {} - - virtual void metaspace_pointers_do(MetaspaceClosure *it) const { - metaspace_pointers_do_at_impl(it, ArrayRef::dereference()); - } - private: - void metaspace_pointers_do_at_impl(MetaspaceClosure *it, Array* array) const { - log_trace(aot)("Iter(MSOArray): %p [%d]", array, array->length()); - for (int i = 0; i < array->length(); i++) { - T* elm = array->adr_at(i); - elm->metaspace_pointers_do(it); - } - } - }; - - // MSOPointerArrayRef -- iterate an instance of Array, where T has metaspace_pointer_do(). - // We recursively call MetaspaceClosure::push() for each pointer in this array. - template class MSOPointerArrayRef : public ArrayRef { - public: - MSOPointerArrayRef(Array** mpp, Writability w) : ArrayRef(mpp, w) {} - - virtual void metaspace_pointers_do(MetaspaceClosure *it) const { - metaspace_pointers_do_at_impl(it, ArrayRef::dereference()); - } - private: - void metaspace_pointers_do_at_impl(MetaspaceClosure *it, Array* array) const { - log_trace(aot)("Iter(MSOPointerArray): %p [%d]", array, array->length()); - for (int i = 0; i < array->length(); i++) { - T** mpp = array->adr_at(i); - it->push(mpp); - } - } - }; - //-------------------------------- // Support for GrowableArray //-------------------------------- @@ -314,28 +214,27 @@ private: return *_mpp; } - public: - GrowableArrayRef(GrowableArray** mpp, Writability w) : Ref(w), _mpp(mpp) {} - - virtual void** mpp() const { + protected: + virtual void** mpp() const override { return (void**)_mpp; } - virtual void metaspace_pointers_do(MetaspaceClosure *it) const { + public: + GrowableArrayRef(GrowableArray** mpp, Writability w) : Ref(w), _mpp(mpp) {} + + virtual bool is_read_only_by_default() const override { return false; } + virtual bool not_null() const override { return dereference() != nullptr; } + virtual int size() const override { return (int)heap_word_size(sizeof(*dereference())); } + virtual MetaspaceClosureType type() const override { return MetaspaceClosureType::GrowableArrayType; } + virtual void metaspace_pointers_do(MetaspaceClosure *it) const override { GrowableArray* array = dereference(); log_trace(aot)("Iter(GrowableArray): %p [%d]", array, array->length()); array->assert_on_C_heap(); it->push_c_array(array->data_addr(), array->capacity()); } - - virtual bool is_read_only_by_default() const { return false; } - virtual bool not_null() const { return dereference() != nullptr; } - virtual int size() const { return (int)heap_word_size(sizeof(*dereference())); } - virtual MetaspaceClosureType type() const { return MetaspaceClosureType::GrowableArrayType; } }; - // Abstract base class for MSOCArrayRef, MSOPointerCArrayRef and OtherCArrayRef. - // These are used for iterating the buffer held by GrowableArray. + // For iterating the buffer held by GrowableArray. template class CArrayRef : public Ref { T** _mpp; int _num_elems; // Number of elements @@ -344,83 +243,57 @@ private: return _num_elems * sizeof(T); } - protected: - // C pointer arrays don't support tagged pointers. + // Gives you back the GrowableArray::_data T* dereference() const { return *_mpp; } - virtual void** mpp() const { - return (void**)_mpp; - } + int num_elems() const { return _num_elems; } + + protected: + virtual void** mpp() const override { + return (void**)_mpp; + } + public: CArrayRef(T** mpp, int num_elems, Writability w) : Ref(w), _mpp(mpp), _num_elems(num_elems) { assert(is_aligned(byte_size(), BytesPerWord), "must be"); } - virtual bool is_read_only_by_default() const { return false; } - virtual bool not_null() const { return dereference() != nullptr; } - virtual int size() const { return (int)heap_word_size(byte_size()); } - virtual MetaspaceClosureType type() const { return MetaspaceClosureType::CArrayType; } - }; - - // OtherCArrayRef -- iterate a C array of type T, where T does NOT have metaspace_pointer_do(). - // T can be a primitive type, such as int, or a structure. However, we do not scan - // the fields inside T, so you should not embed any pointers inside T. - template class OtherCArrayRef : public CArrayRef { - public: - OtherCArrayRef(T** mpp, int num_elems, Writability w) : CArrayRef(mpp, num_elems, w) {} - - virtual void metaspace_pointers_do(MetaspaceClosure *it) const { - T* array = CArrayRef::dereference(); - log_trace(aot)("Iter(OtherCArray): %p [%d]", array, CArrayRef::num_elems()); + virtual bool is_read_only_by_default() const override { return false; } + virtual bool not_null() const override { precond(dereference() != nullptr); return true; } + virtual int size() const override { return (int)heap_word_size(byte_size()); } + virtual MetaspaceClosureType type() const override { return MetaspaceClosureType::CArrayType; } + virtual void metaspace_pointers_do(MetaspaceClosure *it) const override { + metaspace_pointers_do_impl(it, dereference()); } - }; - // MSOCArrayRef -- iterate a C array of type T, where T has metaspace_pointer_do(). - // We recursively call T::metaspace_pointers_do() for each element in this array. - // This is for supporting GrowableArray. - // - // E.g., PackageEntry* _pkg_entry_pointers[2]; // a buffer that has 2 PackageEntry objects - // ... - // it->push(&_pkg_entry_pointers, 2); - // /* calls _pkg_entry_pointers[0].metaspace_pointers_do(it); */ - // /* calls _pkg_entry_pointers[1].metaspace_pointers_do(it); */ - template class MSOCArrayRef : public CArrayRef { - public: - MSOCArrayRef(T** mpp, int num_elems, Writability w) : CArrayRef(mpp, num_elems, w) {} + private: + // E.g., GrowableArray + template ::value && !HAS_METASPACE_POINTERS_DO(U))> + void metaspace_pointers_do_impl(MetaspaceClosure* it, T* array) const { + log_trace(aot)("Iter(OtherCArray): %p [%d]", array, num_elems()); + } - virtual void metaspace_pointers_do(MetaspaceClosure *it) const { - T* array = CArrayRef::dereference(); - log_trace(aot)("Iter(MSOCArray): %p [%d]", array, CArrayRef::num_elems()); - for (int i = 0; i < CArrayRef::num_elems(); i++) { + // E.g., GrowableArray + template ::value && HAS_METASPACE_POINTERS_DO(U))> + void metaspace_pointers_do_impl(MetaspaceClosure* it, T* array) const { + log_trace(aot)("Iter(MSOCArray): %p [%d]", array, num_elems()); + for (int i = 0; i < num_elems(); i++) { T* elm = array + i; elm->metaspace_pointers_do(it); } } - }; - // MSOPointerCArrayRef -- iterate a C array of type T*, where T has metaspace_pointer_do(). - // We recursively call MetaspaceClosure::push() for each pointer in this array. - // This is for supporting GrowableArray. - // - // E.g., PackageEntry** _pkg_entry_pointers[2]; // a buffer that has 2 PackageEntry pointers - // ... - // it->push(&_pkg_entry_pointers, 2); - // /* calls _pkg_entry_pointers[0]->metaspace_pointers_do(it); */ - // /* calls _pkg_entry_pointers[1]->metaspace_pointers_do(it); */ - template class MSOPointerCArrayRef : public CArrayRef { - public: - MSOPointerCArrayRef(T*** mpp, int num_elems, Writability w) : CArrayRef(mpp, num_elems, w) {} - - virtual void metaspace_pointers_do(MetaspaceClosure *it) const { - T** array = CArrayRef::dereference(); - log_trace(aot)("Iter(MSOPointerCArray): %p [%d]", array, CArrayRef::num_elems()); - for (int i = 0; i < CArrayRef::num_elems(); i++) { - T** mpp = array + i; + // E.g., GrowableArray + template ::value && HAS_METASPACE_POINTERS_DO(typename std::remove_pointer::type))> + void metaspace_pointers_do_impl(MetaspaceClosure* it, T* array) const { + log_trace(aot)("Iter(MSOPointerCArray): %p [%d]", array, num_elems()); + for (int i = 0; i < num_elems(); i++) { + T* mpp = array + i; it->push(mpp); } } @@ -462,17 +335,12 @@ public: // // MetaspaceClosure* it = ...; // Klass* o = ...; it->push(&o); => MSORef - // Array* a1 = ...; it->push(&a1); => OtherArrayRef - // Array* a2 = ...; it->push(&a2); => MSOArrayRef - // Array* a3 = ...; it->push(&a3); => MSOPointerArrayRef - // Array*>* a4 = ...; it->push(&a4); => MSOPointerArrayRef - // Array* a5 = ...; it->push(&a5); => MSOPointerArrayRef // // GrowableArrays have a separate "C array" buffer, so they are scanned in two steps: // - // GrowableArray* ga1 = ...; it->push(&ga1); => GrowableArrayRef => OtherCArrayRef - // GrowableArray* ga2 = ...; it->push(&ga2); => GrowableArrayRef => MSOCArrayRef - // GrowableArray* ga3 = ...; it->push(&ga3); => GrowableArrayRef => MSOPointerCArrayRef + // GrowableArray* ga1 = ...; it->push(&ga1); => GrowableArrayRef => CArrayRef + // GrowableArray* ga2 = ...; it->push(&ga2); => GrowableArrayRef => CArrayRef + // GrowableArray* ga3 = ...; it->push(&ga3); => GrowableArrayRef => CArrayRef // // Note that the following will fail to compile: // @@ -487,43 +355,15 @@ public: push_with_ref>(mpp, w); } - // --- Array - template - void push(Array** mpp, Writability w = _default) { - push_with_ref>(mpp, w); - } - - template - void push(Array** mpp, Writability w = _default) { - push_with_ref>(mpp, w); - } - - template - void push(Array** mpp, Writability w = _default) { - static_assert(HAS_METASPACE_POINTERS_DO(T), "Do not push Arrays of arbitrary pointer types"); - push_with_ref>(mpp, w); - } - template void push(GrowableArray** mpp, Writability w = _default) { push_with_ref>(mpp, w); } // --- The buffer of GrowableArray - template - void push_c_array(T** mpp, int num_elems, Writability w = _default) { - push_impl(new OtherCArrayRef(mpp, num_elems, w)); - } - - template - void push_c_array(T** mpp, int num_elems, Writability w = _default) { - push_impl(new MSOCArrayRef(mpp, num_elems, w)); - } - template - void push_c_array(T*** mpp, int num_elems, Writability w = _default) { - static_assert(HAS_METASPACE_POINTERS_DO(T), "Do not push C arrays of arbitrary pointer types"); - push_impl(new MSOPointerCArrayRef(mpp, num_elems, w)); + void push_c_array(T** mpp, int num_elems, Writability w = _default) { + push_impl(new CArrayRef(mpp, num_elems, w)); } }; diff --git a/src/hotspot/share/memory/metaspaceClosureType.hpp b/src/hotspot/share/memory/metaspaceClosureType.hpp index adf6805521b..2dbba34ab67 100644 --- a/src/hotspot/share/memory/metaspaceClosureType.hpp +++ b/src/hotspot/share/memory/metaspaceClosureType.hpp @@ -26,6 +26,7 @@ #define SHARE_MEMORY_METASPACECLOSURETYPE_HPP #include "memory/allocation.hpp" +#include "metaprogramming/enableIf.hpp" // MetaspaceClosure is able to iterate on MetaspaceObjs, plus the following classes #define METASPACE_CLOSURE_TYPES_DO(f) \ @@ -42,5 +43,29 @@ enum class MetaspaceClosureType : int { _number_of_types }; +inline MetaspaceClosureType as_type(MetaspaceClosureType t) { + return t; +} + +inline MetaspaceClosureType as_type(MetaspaceObj::Type msotype) { + precond(msotype < MetaspaceObj::_number_of_types); + return (MetaspaceClosureType)msotype; +} + +// This macro checks for the existence of a member with the name metaspace_pointers_do +#define HAS_METASPACE_POINTERS_DO(T) HasMetaspacePointersDo::value + +template +class HasMetaspacePointersDo { + template static void* test(decltype(&U::metaspace_pointers_do)); + template static int test(...); + + // - If the first template matches, test_type will be void* + // - If the first template doesn't match, test will match second template, + // and test_type will be int + using test_type = decltype(test(nullptr)); +public: + static constexpr bool value = std::is_pointer_v; +}; #endif // SHARE_MEMORY_METASPACECLOSURETYPE_HPP diff --git a/src/hotspot/share/memory/resourceArea.cpp b/src/hotspot/share/memory/resourceArea.cpp index bab652c17ea..63f7ed61d17 100644 --- a/src/hotspot/share/memory/resourceArea.cpp +++ b/src/hotspot/share/memory/resourceArea.cpp @@ -70,10 +70,10 @@ extern char* resource_allocate_bytes(Thread* thread, size_t size, AllocFailType return thread->resource_area()->allocate_bytes(size, alloc_failmode); } -extern char* resource_reallocate_bytes( char *old, size_t old_size, size_t new_size, AllocFailType alloc_failmode){ +extern char* resource_reallocate_bytes(char* old, size_t old_size, size_t new_size, AllocFailType alloc_failmode){ return (char*)Thread::current()->resource_area()->Arealloc(old, old_size, new_size, alloc_failmode); } -extern void resource_free_bytes( Thread* thread, char *old, size_t size ) { - thread->resource_area()->Afree(old, size); +extern void resource_free_bytes(Thread* thread, char* obj, size_t size) { + thread->resource_area()->Afree(obj, size); } diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp index a78b245cc07..f83f1b1786f 100644 --- a/src/hotspot/share/memory/universe.cpp +++ b/src/hotspot/share/memory/universe.cpp @@ -1256,7 +1256,7 @@ void Universe::initialize_verify_flags() { } token = strtok_r(nullptr, delimiter, &save_ptr); } - FREE_C_HEAP_ARRAY(char, subset_list); + FREE_C_HEAP_ARRAY(subset_list); } bool Universe::should_verify_subset(uint subset) { @@ -1348,7 +1348,7 @@ static void log_cpu_time() { const double gc_string_dedup_cpu_time = (double) CPUTimeUsage::GC::stringdedup() / NANOSECS_PER_SEC; const double gc_cpu_time = (double) gc_threads_cpu_time + gc_vm_thread_cpu_time + gc_string_dedup_cpu_time; - const double elasped_time = os::elapsedTime(); + const double elapsed_time = os::elapsedTime(); const bool has_error = CPUTimeUsage::Error::has_error(); if (gc_cpu_time < process_cpu_time) { @@ -1359,13 +1359,13 @@ static void log_cpu_time() { cpuLog.print(" CPUs"); cpuLog.print(" s %% utilized"); cpuLog.print(" Process"); - cpuLog.print(" Total %30.4f %6.2f %8.1f", process_cpu_time, 100.0, process_cpu_time / elasped_time); - cpuLog.print(" Garbage Collection %30.4f %6.2f %8.1f", gc_cpu_time, percent_of(gc_cpu_time, process_cpu_time), gc_cpu_time / elasped_time); - cpuLog.print(" GC Threads %30.4f %6.2f %8.1f", gc_threads_cpu_time, percent_of(gc_threads_cpu_time, process_cpu_time), gc_threads_cpu_time / elasped_time); - cpuLog.print(" VM Thread %30.4f %6.2f %8.1f", gc_vm_thread_cpu_time, percent_of(gc_vm_thread_cpu_time, process_cpu_time), gc_vm_thread_cpu_time / elasped_time); + cpuLog.print(" Total %30.4f %6.2f %8.1f", process_cpu_time, 100.0, process_cpu_time / elapsed_time); + cpuLog.print(" Garbage Collection %30.4f %6.2f %8.1f", gc_cpu_time, percent_of(gc_cpu_time, process_cpu_time), gc_cpu_time / elapsed_time); + cpuLog.print(" GC Threads %30.4f %6.2f %8.1f", gc_threads_cpu_time, percent_of(gc_threads_cpu_time, process_cpu_time), gc_threads_cpu_time / elapsed_time); + cpuLog.print(" VM Thread %30.4f %6.2f %8.1f", gc_vm_thread_cpu_time, percent_of(gc_vm_thread_cpu_time, process_cpu_time), gc_vm_thread_cpu_time / elapsed_time); if (UseStringDeduplication) { - cpuLog.print(" String Deduplication %30.4f %6.2f %8.1f", gc_string_dedup_cpu_time, percent_of(gc_string_dedup_cpu_time, process_cpu_time), gc_string_dedup_cpu_time / elasped_time); + cpuLog.print(" String Deduplication %30.4f %6.2f %8.1f", gc_string_dedup_cpu_time, percent_of(gc_string_dedup_cpu_time, process_cpu_time), gc_string_dedup_cpu_time / elapsed_time); } cpuLog.print("====================================================================================="); } diff --git a/src/hotspot/share/nmt/nmtNativeCallStackStorage.cpp b/src/hotspot/share/nmt/nmtNativeCallStackStorage.cpp index 9a2ecd57ecc..bbf93c5d898 100644 --- a/src/hotspot/share/nmt/nmtNativeCallStackStorage.cpp +++ b/src/hotspot/share/nmt/nmtNativeCallStackStorage.cpp @@ -55,7 +55,7 @@ NativeCallStackStorage::NativeCallStackStorage(bool is_detailed_mode, int table_ } } NativeCallStackStorage::~NativeCallStackStorage() { - FREE_C_HEAP_ARRAY(LinkPtr, _table); + FREE_C_HEAP_ARRAY(_table); } NativeCallStackStorage::NativeCallStackStorage(const NativeCallStackStorage& other) diff --git a/src/hotspot/share/nmt/vmatree.cpp b/src/hotspot/share/nmt/vmatree.cpp index 6c5ab691f6d..1fc05133d22 100644 --- a/src/hotspot/share/nmt/vmatree.cpp +++ b/src/hotspot/share/nmt/vmatree.cpp @@ -807,7 +807,7 @@ void VMATree::SummaryDiff::grow_and_rehash() { // Clear previous -- if applicable if (_members != _small) { - FREE_C_HEAP_ARRAY(KVEntry, _members); + FREE_C_HEAP_ARRAY(_members); } _members = NEW_C_HEAP_ARRAY(KVEntry, new_len, mtNMT); @@ -847,7 +847,7 @@ void VMATree::SummaryDiff::add(const SummaryDiff& other) { void VMATree::SummaryDiff::clear() { if (_members != _small) { - FREE_C_HEAP_ARRAY(KVEntry, _members); + FREE_C_HEAP_ARRAY(_members); } memset(_small, 0, sizeof(_small)); } diff --git a/src/hotspot/share/nmt/vmatree.hpp b/src/hotspot/share/nmt/vmatree.hpp index ae732a4b0d3..7054249319f 100644 --- a/src/hotspot/share/nmt/vmatree.hpp +++ b/src/hotspot/share/nmt/vmatree.hpp @@ -264,7 +264,7 @@ public: } ~SummaryDiff() { if (_members != _small) { - FREE_C_HEAP_ARRAY(KVEntry, _members); + FREE_C_HEAP_ARRAY(_members); } } diff --git a/src/hotspot/share/oops/accessDecorators.hpp b/src/hotspot/share/oops/accessDecorators.hpp index b972c54a064..852b7ecddd4 100644 --- a/src/hotspot/share/oops/accessDecorators.hpp +++ b/src/hotspot/share/oops/accessDecorators.hpp @@ -108,7 +108,8 @@ const DecoratorSet INTERNAL_DECORATOR_MASK = INTERNAL_CONVERT_COMPRESS // - Guarantees from relaxed loads hold. // * MO_SEQ_CST: Sequentially consistent loads. // - These loads observe MO_SEQ_CST stores in the same order on other processors -// - Preceding loads and stores in program order are not reordered with subsequent loads and stores in program order. +// - Preceding MO_SEQ_CST loads and stores in program order are not reordered with +// subsequent MO_SEQ_CST loads and stores in program order. // - Guarantees from acquiring loads hold. // === Atomic Cmpxchg === // * MO_RELAXED: Atomic but relaxed cmpxchg. @@ -137,10 +138,26 @@ const DecoratorSet MO_DECORATOR_MASK = MO_UNORDERED | MO_RELAXED | // - Accesses on HeapWord* translate to a runtime check choosing one of the above // - Accesses on other types translate to raw memory accesses without runtime checks // * AS_NO_KEEPALIVE: The barrier is used only on oop references and will not keep any involved objects -// alive, regardless of the type of reference being accessed. It will however perform the memory access -// in a consistent way w.r.t. e.g. concurrent compaction, so that the right field is being accessed, -// or maintain, e.g. intergenerational or interregional pointers if applicable. This should be used with -// extreme caution in isolated scopes. +// alive, regardless of the type of reference being accessed. This should be used with extreme caution +// in isolated scopes. +// AS_NO_KEEPALIVE stores are currently used primarily by the VM implementation of java.lang.ref.Reference +// and reference processing. AS_NO_KEEPALIVE loads have broader use, e.g. VM / serviceability introspection, +// printing, liveness checks, and weak (hash) table lookups. +// AS_NO_KEEPALIVE does not establish liveness for the current GC cycle. The oop returned by such +// a load, and any oop reached only by traversing from it, must not be stored as a new oop edge into +// GC-visible state (GC roots and the object graph). For SATB marking, violating this rule breaks +// the snapshot invariant. This includes, but is not limited to: +// - object graph storage (e.g. static and non-static Object fields, Object array elements) +// - local root storage (e.g. Handles, OopMap/GC-tracked frame / register slots) +// - other root storage (e.g. OopHandles, WeakHandles, nmethod and class metadata) +// Before such an oop is stored into GC-visible state, liveness must first be explicitly re-established, +// for example by: +// - re-resolving without AS_NO_KEEPALIVE +// - using CollectedHeap::keep_alive(oop) +// Related special case: for CLD-owned OopHandles (notably java mirrors), loading the oop does not +// keep the owning CLD / Klass alive. In those cases, a plain resolve() is insufficient; use the corresponding +// owner keep-alive helper (e.g. Klass::keep_alive()) or CollectedHeap::keep_alive(oop), or have some +// other guarantee of liveness before storing the oop into GC-visible state. // * AS_NORMAL: The accesses will be resolved to an accessor on the BarrierSet class, giving the // responsibility of performing the access and what barriers to be performed to the GC. This is the default. // Note that primitive accesses will only be resolved on the barrier set if the appropriate build-time diff --git a/src/hotspot/share/oops/array.hpp b/src/hotspot/share/oops/array.hpp index 82067e007ea..0c720c85478 100644 --- a/src/hotspot/share/oops/array.hpp +++ b/src/hotspot/share/oops/array.hpp @@ -25,6 +25,7 @@ #ifndef SHARE_OOPS_ARRAY_HPP #define SHARE_OOPS_ARRAY_HPP +#include "memory/metaspaceClosureType.hpp" #include "runtime/atomicAccess.hpp" #include "utilities/align.hpp" #include "utilities/exceptions.hpp" @@ -159,8 +160,48 @@ protected: st->print("Array(" PTR_FORMAT ")", p2i(this)); } - // This function does nothing. The iteration of the elements are done inside metaspaceClosure.hpp - void metaspace_pointers_do(MetaspaceClosure* it) {} + MetaspaceClosureType type() const { return as_type(MetaspaceObj::array_type(sizeof(T))); } + + static bool is_read_only_by_default() { + return is_read_only_by_default_impl(); + } + +private: + // Elements are neither pointers nor metadata objects => no need to relocate, so put the array + // in read-only region by default. + template ::value && !HAS_METASPACE_POINTERS_DO(U))> + static bool is_read_only_by_default_impl() { + return true; + } + + // The opposite of the above => the array may contain relocatable pointers, so put it + // in read-write region by default. + template ::value || HAS_METASPACE_POINTERS_DO(U))> + static bool is_read_only_by_default_impl() { + return false; + } + +public: + void metaspace_pointers_do(MetaspaceClosure* it) { + metaspace_pointers_do_impl(it); + } + +private: + // E.g., Array + template ::value && !HAS_METASPACE_POINTERS_DO(U))> + void metaspace_pointers_do_impl(MetaspaceClosure* it) { + // No pointers to follow + } + + // E.g., Array + template ::value && HAS_METASPACE_POINTERS_DO(U))> + void metaspace_pointers_do_impl(MetaspaceClosure* it); + + // E.g., Array + template ::value && HAS_METASPACE_POINTERS_DO(typename std::remove_pointer::type))> + void metaspace_pointers_do_impl(MetaspaceClosure* it); + +public: #ifndef PRODUCT void print(outputStream* st) { diff --git a/src/hotspot/share/oops/array.inline.hpp b/src/hotspot/share/oops/array.inline.hpp index 30cf2e38f77..e6c8ef94a12 100644 --- a/src/hotspot/share/oops/array.inline.hpp +++ b/src/hotspot/share/oops/array.inline.hpp @@ -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 @@ -29,6 +29,7 @@ #include "memory/allocation.hpp" #include "memory/metaspace.hpp" +#include "memory/metaspaceClosure.hpp" template inline void* Array::operator new(size_t size, ClassLoaderData* loader_data, int length, TRAPS) throw() { @@ -52,4 +53,26 @@ inline void* Array::operator new(size_t size, int length, MemTag flags) throw return p; } +// E.g., Array +template +template ::value && HAS_METASPACE_POINTERS_DO(U))> +void Array::metaspace_pointers_do_impl(MetaspaceClosure* it) { + log_trace(aot)("Iter(MSOArray): %p [%d]", this, length()); + for (int i = 0; i < length(); i++) { + T* elm = adr_at(i); + elm->metaspace_pointers_do(it); + } +} + +// E.g., Array +template +template ::value && HAS_METASPACE_POINTERS_DO(typename std::remove_pointer::type))> +void Array::metaspace_pointers_do_impl(MetaspaceClosure* it) { + log_trace(aot)("Iter(MSOPtrArray): %p [%d]", this, length()); + for (int i = 0; i < length(); i++) { + T* mpp = adr_at(i); + it->push(mpp); + } +} + #endif // SHARE_OOPS_ARRAY_INLINE_HPP diff --git a/src/hotspot/share/oops/bsmAttribute.hpp b/src/hotspot/share/oops/bsmAttribute.hpp index 32bc58b5b07..dba00395c30 100644 --- a/src/hotspot/share/oops/bsmAttribute.hpp +++ b/src/hotspot/share/oops/bsmAttribute.hpp @@ -73,7 +73,7 @@ public: } void set_argument(u2 index, u2 value) { - assert(index >= 0 && index < argument_count(), "invariant"); + assert(index < argument_count(), "invariant"); argument_indexes()[index] = value; } diff --git a/src/hotspot/share/oops/constantPool.cpp b/src/hotspot/share/oops/constantPool.cpp index 456333efad0..f3beb15aaee 100644 --- a/src/hotspot/share/oops/constantPool.cpp +++ b/src/hotspot/share/oops/constantPool.cpp @@ -48,6 +48,7 @@ #include "memory/resourceArea.hpp" #include "memory/universe.hpp" #include "oops/array.hpp" +#include "oops/bsmAttribute.inline.hpp" #include "oops/constantPool.inline.hpp" #include "oops/cpCache.inline.hpp" #include "oops/fieldStreams.inline.hpp" diff --git a/src/hotspot/share/oops/constantPool.hpp b/src/hotspot/share/oops/constantPool.hpp index b4cff2bbbe6..dcc3fa7e22e 100644 --- a/src/hotspot/share/oops/constantPool.hpp +++ b/src/hotspot/share/oops/constantPool.hpp @@ -27,7 +27,7 @@ #include "memory/allocation.hpp" #include "oops/arrayOop.hpp" -#include "oops/bsmAttribute.inline.hpp" +#include "oops/bsmAttribute.hpp" #include "oops/cpCache.hpp" #include "oops/objArrayOop.hpp" #include "oops/oopHandle.hpp" diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp index d675e61cc05..fd1cf1b1457 100644 --- a/src/hotspot/share/oops/instanceKlass.cpp +++ b/src/hotspot/share/oops/instanceKlass.cpp @@ -2542,7 +2542,7 @@ void InstanceKlass::update_methods_jmethod_cache() { new_cache[i] = cache[i]; } _methods_jmethod_ids = new_cache; - FREE_C_HEAP_ARRAY(jmethodID, cache); + FREE_C_HEAP_ARRAY(cache); } } } @@ -3016,7 +3016,7 @@ void InstanceKlass::release_C_heap_structures(bool release_sub_metadata) { } #endif - FREE_C_HEAP_ARRAY(char, _source_debug_extension); + FREE_C_HEAP_ARRAY(_source_debug_extension); if (release_sub_metadata) { constants()->release_C_heap_structures(); @@ -3702,13 +3702,27 @@ const char* InstanceKlass::init_state_name() const { return state_names[init_state()]; } +void InstanceKlass::print_class_flags(outputStream* st) const { + AccessFlags flags(compute_modifier_flags()); + if (flags.is_public ()) st->print("public "); + if (flags.is_private ()) st->print("private "); + if (flags.is_protected ()) st->print("protected "); + if (flags.is_static ()) st->print("static "); + if (flags.is_final ()) st->print("final "); + if (flags.is_interface ()) st->print("interface "); + if (flags.is_abstract ()) st->print("abstract "); + if (flags.is_annotation()) st->print("annotation "); + if (flags.is_enum ()) st->print("enum "); + if (flags.is_synthetic ()) st->print("synthetic "); +} + void InstanceKlass::print_on(outputStream* st) const { assert(is_klass(), "must be klass"); Klass::print_on(st); st->print(BULLET"instance size: %d", size_helper()); st->cr(); st->print(BULLET"klass size: %d", size()); st->cr(); - st->print(BULLET"access: "); access_flags().print_on(st); st->cr(); + st->print(BULLET"access: "); print_class_flags(st); st->cr(); st->print(BULLET"flags: "); _misc_flags.print_on(st); st->cr(); st->print(BULLET"state: "); st->print_cr("%s", init_state_name()); st->print(BULLET"name: "); name()->print_value_on(st); st->cr(); @@ -3848,7 +3862,7 @@ void InstanceKlass::print_on(outputStream* st) const { void InstanceKlass::print_value_on(outputStream* st) const { assert(is_klass(), "must be klass"); - if (Verbose || WizardMode) access_flags().print_on(st); + if (Verbose || WizardMode) print_class_flags(st); name()->print_value_on(st); } diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp index dd563ad3492..983f0f91699 100644 --- a/src/hotspot/share/oops/instanceKlass.hpp +++ b/src/hotspot/share/oops/instanceKlass.hpp @@ -330,9 +330,6 @@ class InstanceKlass: public Klass { bool defined_by_other_loaders() const { return _misc_flags.defined_by_other_loaders(); } void set_class_loader_type() { _misc_flags.set_class_loader_type(_class_loader_data); } - // Check if the class can be shared in CDS - bool is_shareable() const; - bool shared_loading_failed() const { return _misc_flags.shared_loading_failed(); } void set_shared_loading_failed() { _misc_flags.set_shared_loading_failed(true); } @@ -1136,8 +1133,6 @@ private: void link_previous_versions(InstanceKlass* pv) { _previous_versions = pv; } void mark_newly_obsolete_methods(Array* old_methods, int emcp_method_count); #endif - // log class name to classlist - void log_to_classlist() const; public: #if INCLUDE_CDS @@ -1169,6 +1164,7 @@ public: // Printing void print_on(outputStream* st) const override; void print_value_on(outputStream* st) const override; + void print_class_flags(outputStream* st) const; void oop_print_value_on(oop obj, outputStream* st) override; diff --git a/src/hotspot/share/oops/klassVtable.cpp b/src/hotspot/share/oops/klassVtable.cpp index ead413dfa2c..5fefcdfbaaf 100644 --- a/src/hotspot/share/oops/klassVtable.cpp +++ b/src/hotspot/share/oops/klassVtable.cpp @@ -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 @@ -1066,7 +1066,7 @@ void klassVtable::dump_vtable() { Method* m = unchecked_method_at(i); if (m != nullptr) { tty->print(" (%5d) ", i); - m->access_flags().print_on(tty); + m->print_access_flags(tty); if (m->is_default_method()) { tty->print("default "); } @@ -1421,7 +1421,7 @@ void klassItable::dump_itable() { Method* m = ime->method(); if (m != nullptr) { tty->print(" (%5d) ", i); - m->access_flags().print_on(tty); + m->print_access_flags(tty); if (m->is_default_method()) { tty->print("default "); } diff --git a/src/hotspot/share/oops/markWord.hpp b/src/hotspot/share/oops/markWord.hpp index 4583e6bd3a1..e67d632fdf6 100644 --- a/src/hotspot/share/oops/markWord.hpp +++ b/src/hotspot/share/oops/markWord.hpp @@ -30,6 +30,7 @@ #include "oops/compressedKlass.hpp" #include "oops/oopsHierarchy.hpp" #include "runtime/globals.hpp" +#include "utilities/powerOfTwo.hpp" // The markWord describes the header of an object. // @@ -37,32 +38,44 @@ // // 32 bits: // -------- -// hash:25 ------------>| age:4 self-fwd:1 lock:2 (normal object) +// hash:25 age:4 self-fwd:1 lock:2 // -// 64 bits: -// -------- -// unused:22 hash:31 -->| unused_gap:4 age:4 self-fwd:1 lock:2 (normal object) +// 64 bits (without compact headers): +// ---------------------------------- +// unused:22 hash:31 valhalla:4 age:4 self-fwd:1 lock:2 // // 64 bits (with compact headers): // ------------------------------- -// klass:22 hash:31 -->| unused_gap:4 age:4 self-fwd:1 lock:2 (normal object) +// klass:22 hash:31 valhalla:4 age:4 self-fwd:1 lock:2 // -// - hash contains the identity hash value: largest value is -// 31 bits, see os::random(). Also, 64-bit vm's require -// a hash value no bigger than 32 bits because they will not -// properly generate a mask larger than that: see library_call.cpp -// -// - the two lock bits are used to describe three states: locked/unlocked and monitor. +// - lock bits are used to describe lock states: locked/unlocked/monitor-locked +// and to indicate that an object has been GC marked / forwarded. // // [header | 00] locked locked regular object header (fast-locking in use) // [header | 01] unlocked regular object header -// [ptr | 10] monitor inflated lock (header is swapped out, UseObjectMonitorTable == false) // [header | 10] monitor inflated lock (UseObjectMonitorTable == true) -// [ptr | 11] marked used to mark an object +// [ptr | 10] monitor inflated lock (UseObjectMonitorTable == false, header is swapped out) +// [ptr | 11] marked used to mark an object (header is swapped out) +// +// - self-fwd - used by some GCs to indicate in-place forwarding. +// +// Note the position of 'self-fwd' is not by accident. When forwarding an +// object to a new heap position, HeapWord alignment guarantees the lower +// bits, including 'self-fwd' are 0. "is_self_forwarded()" will be correctly +// set to false. Otherwise encode_pointer_as_mark() may have 'self-fwd' set. +// +// - age - used by some GCs to track the age of objects. +// +// - valhalla - reserved for valhalla +// +// - hash - contains the identity hash value: largest value is 31 bits, see +// os::random(). Also, 64-bit VMs require a hash value no bigger than 32 +// bits because they will not properly generate a mask larger than that: +// see library_call.cpp +// +// - klass - klass identifier used when UseCompactObjectHeaders == true -class BasicLock; class ObjectMonitor; -class JavaThread; class outputStream; class markWord { @@ -97,33 +110,42 @@ class markWord { // Conversion uintptr_t value() const { return _value; } - // Constants - static const int age_bits = 4; + // Constants, in least significant bit order + + // Number of bits static const int lock_bits = 2; static const int self_fwd_bits = 1; - static const int max_hash_bits = BitsPerWord - age_bits - lock_bits - self_fwd_bits; + static const int age_bits = 4; + static const int valhalla_reserved_bits = LP64_ONLY(4) NOT_LP64(0); + static const int max_hash_bits = BitsPerWord - age_bits - lock_bits - self_fwd_bits - valhalla_reserved_bits; static const int hash_bits = max_hash_bits > 31 ? 31 : max_hash_bits; - static const int unused_gap_bits = LP64_ONLY(4) NOT_LP64(0); // Reserved for Valhalla. + // Shifts static const int lock_shift = 0; static const int self_fwd_shift = lock_shift + lock_bits; static const int age_shift = self_fwd_shift + self_fwd_bits; - static const int hash_shift = age_shift + age_bits + unused_gap_bits; + static const int valhalla_reserved_shift = age_shift + age_bits; + static const int hash_shift = valhalla_reserved_shift + valhalla_reserved_bits; - static const uintptr_t lock_mask = right_n_bits(lock_bits); - static const uintptr_t lock_mask_in_place = lock_mask << lock_shift; - static const uintptr_t self_fwd_mask = right_n_bits(self_fwd_bits); - static const uintptr_t self_fwd_mask_in_place = self_fwd_mask << self_fwd_shift; - static const uintptr_t age_mask = right_n_bits(age_bits); - static const uintptr_t age_mask_in_place = age_mask << age_shift; - static const uintptr_t hash_mask = right_n_bits(hash_bits); - static const uintptr_t hash_mask_in_place = hash_mask << hash_shift; + // Masks (in-place) + static const uintptr_t lock_mask_in_place = right_n_bits(lock_bits) << lock_shift; + static const uintptr_t self_fwd_bit_in_place = right_n_bits(self_fwd_bits) << self_fwd_shift; + static const uintptr_t age_mask_in_place = right_n_bits(age_bits) << age_shift; + static const uintptr_t hash_mask_in_place = right_n_bits(hash_bits) << hash_shift; + + // Verify that _bit_in_place refers to constants with only one bit. + static_assert(is_power_of_2(self_fwd_bit_in_place)); + + // Masks (unshifted) + static const uintptr_t lock_mask = lock_mask_in_place >> lock_shift; + static const uintptr_t age_mask = age_mask_in_place >> age_shift; + static const uintptr_t hash_mask = hash_mask_in_place >> hash_shift; #ifdef _LP64 // Used only with compact headers: // We store the (narrow) Klass* in the bits 43 to 64. - // These are for bit-precise extraction of the narrow Klass* from the 64-bit Markword + // These are for bit-precise extraction of the narrow Klass* from the 64-bit markWord static constexpr int klass_offset_in_bytes = 4; static constexpr int klass_shift = hash_shift + hash_bits; static constexpr int klass_shift_at_offset = klass_shift - klass_offset_in_bytes * BitsPerByte; @@ -132,7 +154,6 @@ class markWord { static constexpr uintptr_t klass_mask_in_place = klass_mask << klass_shift; #endif - static const uintptr_t locked_value = 0; static const uintptr_t unlocked_value = 1; static const uintptr_t monitor_value = 2; @@ -157,17 +178,19 @@ class markWord { bool is_marked() const { return (mask_bits(value(), lock_mask_in_place) == marked_value); } - bool is_forwarded() const { - // Returns true for normal forwarded (0b011) and self-forwarded (0b1xx). - return mask_bits(value(), lock_mask_in_place | self_fwd_mask_in_place) >= static_cast(marked_value); - } + bool is_neutral() const { // Not locked, or marked - a "clean" neutral state return (mask_bits(value(), lock_mask_in_place) == unlocked_value); } + bool is_forwarded() const { + // Returns true for normal forwarded (0b011) and self-forwarded (0b1xx). + return mask_bits(value(), lock_mask_in_place | self_fwd_bit_in_place) >= static_cast(marked_value); + } + // Should this header be preserved during GC? bool must_be_preserved() const { - return (!is_unlocked() || !has_no_hash()); + return !is_unlocked() || !has_no_hash(); } // WARNING: The following routines are used EXCLUSIVELY by @@ -204,10 +227,14 @@ class markWord { return markWord(tmp | monitor_value); } - bool has_displaced_mark_helper() const { + bool has_monitor_pointer() const { intptr_t lockbits = value() & lock_mask_in_place; return !UseObjectMonitorTable && lockbits == monitor_value; } + + bool has_displaced_mark_helper() const { + return has_monitor_pointer(); + } markWord displaced_mark_helper() const; void set_displaced_mark_helper(markWord m) const; @@ -248,7 +275,7 @@ class markWord { // Prototype mark for initialization static markWord prototype() { - return markWord( no_hash_in_place | no_lock_in_place ); + return markWord(unlocked_value); } // Debugging @@ -261,15 +288,15 @@ class markWord { inline void* decode_pointer() const { return (void*)clear_lock_bits().value(); } inline bool is_self_forwarded() const { - return mask_bits(value(), self_fwd_mask_in_place) != 0; + return mask_bits(value(), self_fwd_bit_in_place) != 0; } inline markWord set_self_forwarded() const { - return markWord(value() | self_fwd_mask_in_place); + return markWord(value() | self_fwd_bit_in_place); } inline markWord unset_self_forwarded() const { - return markWord(value() & ~self_fwd_mask_in_place); + return markWord(value() & ~self_fwd_bit_in_place); } inline oop forwardee() const { diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp index 949441585d8..d0d31ae115a 100644 --- a/src/hotspot/share/oops/method.cpp +++ b/src/hotspot/share/oops/method.cpp @@ -184,24 +184,30 @@ address Method::get_c2i_no_clinit_check_entry() { return adapter()->get_c2i_no_clinit_check_entry(); } -char* Method::name_and_sig_as_C_string() const { - return name_and_sig_as_C_string(constants()->pool_holder(), name(), signature()); +char* Method::name_and_sig_as_C_string(bool use_double_colon) const { + return name_and_sig_as_C_string(constants()->pool_holder(), name(), signature(), use_double_colon); } char* Method::name_and_sig_as_C_string(char* buf, int size) const { return name_and_sig_as_C_string(constants()->pool_holder(), name(), signature(), buf, size); } -char* Method::name_and_sig_as_C_string(Klass* klass, Symbol* method_name, Symbol* signature) { +char* Method::name_and_sig_as_C_string(Klass* klass, Symbol* method_name, Symbol* signature, bool use_double_colon) { const char* klass_name = klass->external_name(); int klass_name_len = (int)strlen(klass_name); int method_name_len = method_name->utf8_length(); - int len = klass_name_len + 1 + method_name_len + signature->utf8_length(); + int separator_len = use_double_colon ? 2 : 1; + int len = klass_name_len + separator_len + method_name_len + signature->utf8_length(); char* dest = NEW_RESOURCE_ARRAY(char, len + 1); strcpy(dest, klass_name); - dest[klass_name_len] = '.'; - strcpy(&dest[klass_name_len + 1], method_name->as_C_string()); - strcpy(&dest[klass_name_len + 1 + method_name_len], signature->as_C_string()); + if (use_double_colon) { + dest[klass_name_len + 0] = ':'; + dest[klass_name_len + 1] = ':'; + } else { + dest[klass_name_len] = '.'; + } + strcpy(&dest[klass_name_len + separator_len], method_name->as_C_string()); + strcpy(&dest[klass_name_len + separator_len + method_name_len], signature->as_C_string()); dest[len] = 0; return dest; } @@ -2204,7 +2210,7 @@ void Method::print_on(outputStream* st) const { st->print (" - method holder: "); method_holder()->print_value_on(st); st->cr(); st->print (" - constants: " PTR_FORMAT " ", p2i(constants())); constants()->print_value_on(st); st->cr(); - st->print (" - access: 0x%x ", access_flags().as_method_flags()); access_flags().print_on(st); st->cr(); + st->print (" - access: 0x%x ", access_flags().as_method_flags()); print_access_flags(st); st->cr(); st->print (" - flags: 0x%x ", _flags.as_int()); _flags.print_on(st); st->cr(); st->print (" - name: "); name()->print_value_on(st); st->cr(); st->print (" - signature: "); signature()->print_value_on(st); st->cr(); @@ -2278,8 +2284,8 @@ void Method::print_on(outputStream* st) const { } } -void Method::print_linkage_flags(outputStream* st) { - access_flags().print_on(st); +void Method::print_linkage_flags(outputStream* st) const { + print_access_flags(st); if (is_default_method()) { st->print("default "); } @@ -2289,6 +2295,22 @@ void Method::print_linkage_flags(outputStream* st) { } #endif //PRODUCT +void Method::print_access_flags(outputStream* st) const { + AccessFlags flags = access_flags(); + if (flags.is_public ()) st->print("public "); + if (flags.is_private ()) st->print("private "); + if (flags.is_protected ()) st->print("protected "); + if (flags.is_static ()) st->print("static "); + if (flags.is_final ()) st->print("final "); + if (flags.is_synchronized()) st->print("synchronized "); + if (flags.is_bridge ()) st->print("bridge "); + if (flags.is_varargs ()) st->print("varargs "); + if (flags.is_native ()) st->print("native "); + if (flags.is_abstract ()) st->print("abstract "); + if (flags.is_strictfp ()) st->print("strict "); + if (flags.is_synthetic ()) st->print("synthetic "); +} + void Method::print_value_on(outputStream* st) const { assert(is_method(), "must be method"); st->print("%s", internal_name()); diff --git a/src/hotspot/share/oops/method.hpp b/src/hotspot/share/oops/method.hpp index e7479671dcf..5ef23595037 100644 --- a/src/hotspot/share/oops/method.hpp +++ b/src/hotspot/share/oops/method.hpp @@ -171,11 +171,11 @@ class Method : public Metadata { // C string, for the purpose of providing more useful // fatal error handling. The string is allocated in resource // area if a buffer is not provided by the caller. - char* name_and_sig_as_C_string() const; + char* name_and_sig_as_C_string(bool use_double_colon = false) const; char* name_and_sig_as_C_string(char* buf, int size) const; // Static routine in the situations we don't have a Method* - static char* name_and_sig_as_C_string(Klass* klass, Symbol* method_name, Symbol* signature); + static char* name_and_sig_as_C_string(Klass* klass, Symbol* method_name, Symbol* signature, bool use_double_colon = false); static char* name_and_sig_as_C_string(Klass* klass, Symbol* method_name, Symbol* signature, char* buf, int size); // Get return type + klass name + "." + method name + ( parameters types ) @@ -859,7 +859,8 @@ public: void print_on(outputStream* st) const; #endif void print_value_on(outputStream* st) const; - void print_linkage_flags(outputStream* st) PRODUCT_RETURN; + void print_access_flags(outputStream* st) const; + void print_linkage_flags(outputStream* st) const PRODUCT_RETURN; const char* internal_name() const { return "{method}"; } diff --git a/src/hotspot/share/oops/methodData.hpp b/src/hotspot/share/oops/methodData.hpp index 45529618afb..7e5466b91a3 100644 --- a/src/hotspot/share/oops/methodData.hpp +++ b/src/hotspot/share/oops/methodData.hpp @@ -34,6 +34,7 @@ #include "runtime/mutex.hpp" #include "utilities/align.hpp" #include "utilities/copy.hpp" +#include "utilities/integerCast.hpp" class BytecodeStream; @@ -206,7 +207,7 @@ public: } bool set_flag_at(u1 flag_number) { - const u1 bit = 1 << flag_number; + const u1 bit = integer_cast(1 << flag_number); u1 compare_value; do { compare_value = _header._struct._flags; @@ -219,7 +220,7 @@ public: } bool clear_flag_at(u1 flag_number) { - const u1 bit = 1 << flag_number; + const u1 bit = integer_cast(1 << flag_number); u1 compare_value; u1 exchange_value; do { diff --git a/src/hotspot/share/oops/oop.hpp b/src/hotspot/share/oops/oop.hpp index d6cc71a60d8..daa192d5124 100644 --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp @@ -90,6 +90,7 @@ class oopDesc { void set_narrow_klass(narrowKlass nk) NOT_CDS_JAVA_HEAP_RETURN; inline narrowKlass narrow_klass() const; + inline narrowKlass narrow_klass_acquire() const; inline void set_klass(Klass* k); static inline void release_set_klass(HeapWord* mem, Klass* k); diff --git a/src/hotspot/share/oops/oop.inline.hpp b/src/hotspot/share/oops/oop.inline.hpp index d5cb80e1122..066ba7a8e20 100644 --- a/src/hotspot/share/oops/oop.inline.hpp +++ b/src/hotspot/share/oops/oop.inline.hpp @@ -95,49 +95,19 @@ void oopDesc::init_mark() { } Klass* oopDesc::klass() const { - switch (ObjLayout::klass_mode()) { - case ObjLayout::Compact: - return mark().klass(); - case ObjLayout::Compressed: - return CompressedKlassPointers::decode_not_null(_compressed_klass); - default: - ShouldNotReachHere(); - } + return CompressedKlassPointers::decode_not_null(narrow_klass()); } Klass* oopDesc::klass_or_null() const { - switch (ObjLayout::klass_mode()) { - case ObjLayout::Compact: - return mark().klass_or_null(); - case ObjLayout::Compressed: - return CompressedKlassPointers::decode(_compressed_klass); - default: - ShouldNotReachHere(); - } + return CompressedKlassPointers::decode(narrow_klass()); } Klass* oopDesc::klass_or_null_acquire() const { - switch (ObjLayout::klass_mode()) { - case ObjLayout::Compact: - return mark_acquire().klass(); - case ObjLayout::Compressed: { - narrowKlass narrow_klass = AtomicAccess::load_acquire(&_compressed_klass); - return CompressedKlassPointers::decode(narrow_klass); - } - default: - ShouldNotReachHere(); - } + return CompressedKlassPointers::decode(narrow_klass_acquire()); } Klass* oopDesc::klass_without_asserts() const { - switch (ObjLayout::klass_mode()) { - case ObjLayout::Compact: - return mark().klass_without_asserts(); - case ObjLayout::Compressed: - return CompressedKlassPointers::decode_without_asserts(_compressed_klass); - default: - ShouldNotReachHere(); - } + return CompressedKlassPointers::decode_without_asserts(narrow_klass()); } narrowKlass oopDesc::narrow_klass() const { @@ -151,6 +121,17 @@ narrowKlass oopDesc::narrow_klass() const { } } +narrowKlass oopDesc::narrow_klass_acquire() const { + switch (ObjLayout::klass_mode()) { + case ObjLayout::Compact: + return mark_acquire().narrow_klass(); + case ObjLayout::Compressed: + return AtomicAccess::load_acquire(&_compressed_klass); + default: + ShouldNotReachHere(); + } +} + void oopDesc::set_klass(Klass* k) { assert(Universe::is_bootstrapping() || (k != nullptr && k->is_klass()), "incorrect Klass"); assert(!UseCompactObjectHeaders, "don't set Klass* with compact headers"); diff --git a/src/hotspot/share/oops/trainingData.cpp b/src/hotspot/share/oops/trainingData.cpp index 7976da35374..f14ed36daa8 100644 --- a/src/hotspot/share/oops/trainingData.cpp +++ b/src/hotspot/share/oops/trainingData.cpp @@ -727,7 +727,7 @@ void TrainingData::metaspace_pointers_do(MetaspaceClosure* iter) { } bool TrainingData::Key::can_compute_cds_hash(const Key* const& k) { - return k->meta() == nullptr || MetaspaceObj::in_aot_cache(k->meta()); + return k->meta() == nullptr || k->meta()->in_aot_cache(); } uint TrainingData::Key::cds_hash(const Key* const& k) { diff --git a/src/hotspot/share/oops/trainingData.hpp b/src/hotspot/share/oops/trainingData.hpp index a6decdce7f0..50f97153d8c 100644 --- a/src/hotspot/share/oops/trainingData.hpp +++ b/src/hotspot/share/oops/trainingData.hpp @@ -31,6 +31,7 @@ #include "compiler/compilerDefinitions.hpp" #include "memory/allocation.hpp" #include "memory/metaspaceClosure.hpp" +#include "oops/array.inline.hpp" #include "oops/instanceKlass.hpp" #include "oops/method.hpp" #include "oops/objArrayKlass.hpp" diff --git a/src/hotspot/share/opto/block.cpp b/src/hotspot/share/opto/block.cpp index a93e2e43a29..1da63ce8180 100644 --- a/src/hotspot/share/opto/block.cpp +++ b/src/hotspot/share/opto/block.cpp @@ -1430,7 +1430,7 @@ void UnionFind::extend( uint from_idx, uint to_idx ) { if( from_idx >= _max ) { uint size = 16; while( size <= from_idx ) size <<=1; - _indices = REALLOC_RESOURCE_ARRAY( uint, _indices, _max, size ); + _indices = REALLOC_RESOURCE_ARRAY( _indices, _max, size ); _max = size; } while( _cnt <= from_idx ) _indices[_cnt++] = 0; diff --git a/src/hotspot/share/opto/bytecodeInfo.cpp b/src/hotspot/share/opto/bytecodeInfo.cpp index 5b48b33aa46..330a8688110 100644 --- a/src/hotspot/share/opto/bytecodeInfo.cpp +++ b/src/hotspot/share/opto/bytecodeInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -234,7 +234,7 @@ bool InlineTree::should_not_inline(ciMethod* callee_method, ciMethod* caller_met return false; } - if (C->directive()->should_not_inline(callee_method)) { + if (C->directive()->should_not_inline(callee_method, CompLevel_full_optimization)) { set_msg("disallowed by CompileCommand"); return true; } @@ -391,11 +391,13 @@ bool InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_method, // suppress a few checks for accessors and trivial methods if (callee_method->code_size() > MaxTrivialSize) { - - // don't inline into giant methods + // We don't want to inline a call into a sufficiently large graph. However, this cannot be + // decided during parsing because there are more bytecodes in the caller that need parsing, and + // determining dead nodes is hard. As a result, we stop parse inlining at a relatively + // conservative threshold, and resume during incremental inlining, when there is no more + // parsing in the caller, and node liveness is more easily determined. if (C->over_inlining_cutoff()) { - if ((!callee_method->force_inline() && !caller_method->is_compiled_lambda_form()) - || !IncrementalInline) { + if (!C->should_delay_after_inlining_cutoff(callee_method, caller_method)) { set_msg("NodeCountInliningCutoff"); return false; } else { diff --git a/src/hotspot/share/opto/c2_globals.hpp b/src/hotspot/share/opto/c2_globals.hpp index dacc8ce9c26..401f6110142 100644 --- a/src/hotspot/share/opto/c2_globals.hpp +++ b/src/hotspot/share/opto/c2_globals.hpp @@ -507,9 +507,13 @@ /* controls for heat-based inlining */ \ \ develop(intx, NodeCountInliningCutoff, 18000, \ - "If parser node generation exceeds limit stop inlining") \ + "If node count exceeds limit stop inlining") \ range(0, max_jint) \ \ + product(bool, DelayAfterInliningCutoff, true, DIAGNOSTIC, \ + "If node count exceeds limit during parsing, attempt inlining " \ + "later instead of giving up completely") \ + \ product(intx, MaxNodeLimit, 80000, \ "Maximum number of nodes") \ range(1000, max_jint / 3) \ diff --git a/src/hotspot/share/opto/callGenerator.cpp b/src/hotspot/share/opto/callGenerator.cpp index 49897ca3c17..1ef7e3210c6 100644 --- a/src/hotspot/share/opto/callGenerator.cpp +++ b/src/hotspot/share/opto/callGenerator.cpp @@ -646,6 +646,12 @@ void CallGenerator::do_late_inline_helper() { for (uint i1 = 0; i1 < size; i1++) { map->init_req(i1, call->in(i1)); } + // Call node has in(ReturnAdr) set to top() node. + // We have to set map->in(ReturnAdr) to correct value + // because it is used by uncommon traps. + Node* ret_adr = C->start()->proj_out_or_null(TypeFunc::ReturnAdr); + precond(ret_adr != nullptr); + map->set_req(TypeFunc::ReturnAdr, ret_adr); // Make sure the state is a MergeMem for parsing. if (!map->in(TypeFunc::Memory)->is_MergeMem()) { @@ -661,6 +667,7 @@ void CallGenerator::do_late_inline_helper() { map->set_req(TypeFunc::Parms + i1, top); } jvms->set_map(map); + precond(ret_adr == jvms->map()->returnadr()); // Make enough space in the expression stack to transfer // the incoming arguments and return value. diff --git a/src/hotspot/share/opto/callnode.hpp b/src/hotspot/share/opto/callnode.hpp index e4c548fc744..6bf61730ca0 100644 --- a/src/hotspot/share/opto/callnode.hpp +++ b/src/hotspot/share/opto/callnode.hpp @@ -879,11 +879,14 @@ public: // calls and optimized virtual calls, plus calls to wrappers for run-time // routines); generates static stub. class CallStaticJavaNode : public CallJavaNode { + // If this is an uncommon trap guarded by some condition, is it safe to change the condition to a narrower condition? + // See comment in PhaseIdealLoop::do_split_if() + bool _safe_for_fold_compare; virtual bool cmp( const Node &n ) const; virtual uint size_of() const; // Size is bigger public: CallStaticJavaNode(Compile* C, const TypeFunc* tf, address addr, ciMethod* method) - : CallJavaNode(tf, addr, method) { + : CallJavaNode(tf, addr, method), _safe_for_fold_compare(true) { init_class_id(Class_CallStaticJava); if (C->eliminate_boxing() && (method != nullptr) && method->is_boxing_method()) { init_flags(Flag_is_macro); @@ -891,7 +894,7 @@ public: } } CallStaticJavaNode(const TypeFunc* tf, address addr, const char* name, const TypePtr* adr_type) - : CallJavaNode(tf, addr, nullptr) { + : CallJavaNode(tf, addr, nullptr), _safe_for_fold_compare(true) { init_class_id(Class_CallStaticJava); // This node calls a runtime stub, which often has narrow memory effects. _adr_type = adr_type; @@ -915,6 +918,14 @@ public: virtual int Opcode() const; virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); + void clear_safe_for_fold_compare() { + _safe_for_fold_compare = false; + } + + bool safe_for_fold_compare() const { + return _safe_for_fold_compare; + } + #ifndef PRODUCT virtual void dump_spec(outputStream *st) const; virtual void dump_compact_spec(outputStream *st) const; diff --git a/src/hotspot/share/opto/cfgnode.hpp b/src/hotspot/share/opto/cfgnode.hpp index 6af2972e688..5f5e68255db 100644 --- a/src/hotspot/share/opto/cfgnode.hpp +++ b/src/hotspot/share/opto/cfgnode.hpp @@ -477,6 +477,7 @@ public: #endif bool same_condition(const Node* dom, PhaseIterGVN* igvn) const; + void mark_projections_unsafe_for_fold_compare() const; }; class RangeCheckNode : public IfNode { diff --git a/src/hotspot/share/opto/chaitin.cpp b/src/hotspot/share/opto/chaitin.cpp index ef017ee15ec..606d45d4a12 100644 --- a/src/hotspot/share/opto/chaitin.cpp +++ b/src/hotspot/share/opto/chaitin.cpp @@ -265,7 +265,7 @@ PhaseChaitin::PhaseChaitin(uint unique, PhaseCFG &cfg, Matcher &matcher, bool sc assert((&buckets[0][0] + nr_blocks) == offset, "should be"); // Free the now unused memory - FREE_RESOURCE_ARRAY(Block*, buckets[1], (NUMBUCKS-1)*nr_blocks); + FREE_RESOURCE_ARRAY(buckets[1], (NUMBUCKS-1)*nr_blocks); // Finally, point the _blks to our memory _blks = buckets[0]; diff --git a/src/hotspot/share/opto/chaitin.hpp b/src/hotspot/share/opto/chaitin.hpp index 2d4f7eeb3f2..fd834c1002b 100644 --- a/src/hotspot/share/opto/chaitin.hpp +++ b/src/hotspot/share/opto/chaitin.hpp @@ -353,7 +353,8 @@ public: return _names.at(idx); } - uint live_range_id(const Node *node) const { + uint live_range_id(const Node* node) const { + precond(node != nullptr); return _names.at(node->_idx); } diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp index e05df8ea716..25975334dcb 100644 --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -646,6 +646,7 @@ Compile::Compile(ciEnv* ci_env, ciMethod* target, int osr_bci, _stub_id(StubId::NO_STUBID), _stub_entry_point(nullptr), _max_node_limit(MaxNodeLimit), + _node_count_inlining_cutoff(NodeCountInliningCutoff), _post_loop_opts_phase(false), _merge_stores_phase(false), _allow_macro_nodes(true), @@ -922,6 +923,7 @@ Compile::Compile(ciEnv* ci_env, _stub_id(stub_id), _stub_entry_point(nullptr), _max_node_limit(MaxNodeLimit), + _node_count_inlining_cutoff(NodeCountInliningCutoff), _post_loop_opts_phase(false), _merge_stores_phase(false), _allow_macro_nodes(true), @@ -1618,7 +1620,7 @@ void Compile::grow_alias_types() { const int new_ats = old_ats; // how many more? const int grow_ats = old_ats+new_ats; // how many now? _max_alias_types = grow_ats; - _alias_types = REALLOC_ARENA_ARRAY(comp_arena(), AliasType*, _alias_types, old_ats, grow_ats); + _alias_types = REALLOC_ARENA_ARRAY(comp_arena(), _alias_types, old_ats, grow_ats); AliasType* ats = NEW_ARENA_ARRAY(comp_arena(), AliasType, new_ats); Copy::zero_to_bytes(ats, sizeof(AliasType)*new_ats); for (int i = 0; i < new_ats; i++) _alias_types[old_ats+i] = &ats[i]; @@ -2170,8 +2172,8 @@ void Compile::inline_incrementally(PhaseIterGVN& igvn) { } while (_late_inlines.length() > 0) { - if (live_nodes() > (uint)LiveNodeCountInliningCutoff) { - if (low_live_nodes < (uint)LiveNodeCountInliningCutoff * 8 / 10) { + if (live_nodes() > node_count_inlining_cutoff()) { + if (low_live_nodes < node_count_inlining_cutoff() * 8 / 10) { TracePhase tp(_t_incrInline_ideal); // PhaseIdealLoop is expensive so we only try it once we are // out of live nodes and we only try it again if the previous @@ -2182,7 +2184,7 @@ void Compile::inline_incrementally(PhaseIterGVN& igvn) { _major_progress = true; } - if (live_nodes() > (uint)LiveNodeCountInliningCutoff) { + if (live_nodes() > node_count_inlining_cutoff()) { bool do_print_inlining = print_inlining() || print_intrinsics(); if (do_print_inlining || log() != nullptr) { // Print inlining message for candidates that we couldn't inline for lack of space. @@ -2584,14 +2586,13 @@ void Compile::Optimize() { assert(igvn._worklist.size() == 0, "not empty"); - assert(_late_inlines.length() == 0 || IncrementalInlineMH || IncrementalInlineVirtual, "not empty"); - if (_late_inlines.length() > 0) { // More opportunities to optimize virtual and MH calls. // Though it's maybe too late to perform inlining, strength-reducing them to direct calls is still an option. process_late_inline_calls_no_inline(igvn); if (failing()) return; } + assert(_late_inlines.length() == 0, "late inline queue must be drained"); } // (End scope of igvn; run destructor if necessary for asserts.) check_no_dead_use(); @@ -2691,7 +2692,7 @@ static bool is_vector_bitwise_op(Node* n) { } static bool is_vector_bitwise_cone_root(Node* n) { - if (n->bottom_type()->isa_vectmask() || !is_vector_bitwise_op(n)) { + if (n->bottom_type()->isa_pvectmask() || !is_vector_bitwise_op(n)) { return false; } for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) { @@ -3156,30 +3157,20 @@ void Compile::Code_Gen() { } //------------------------------Final_Reshape_Counts--------------------------- -// This class defines counters to help identify when a method -// may/must be executed using hardware with only 24-bit precision. +// This class defines counters and node lists collected during +// the final graph reshaping. struct Final_Reshape_Counts : public StackObj { - int _call_count; // count non-inlined 'common' calls - int _float_count; // count float ops requiring 24-bit precision - int _double_count; // count double ops requiring more precision int _java_call_count; // count non-inlined 'java' calls int _inner_loop_count; // count loops which need alignment VectorSet _visited; // Visitation flags Node_List _tests; // Set of IfNodes & PCTableNodes Final_Reshape_Counts() : - _call_count(0), _float_count(0), _double_count(0), _java_call_count(0), _inner_loop_count(0) { } - void inc_call_count () { _call_count ++; } - void inc_float_count () { _float_count ++; } - void inc_double_count() { _double_count++; } void inc_java_call_count() { _java_call_count++; } void inc_inner_loop_count() { _inner_loop_count++; } - int get_call_count () const { return _call_count ; } - int get_float_count () const { return _float_count ; } - int get_double_count() const { return _double_count; } int get_java_call_count() const { return _java_call_count; } int get_inner_loop_count() const { return _inner_loop_count; } }; @@ -3235,8 +3226,13 @@ void Compile::final_graph_reshaping_impl(Node *n, Final_Reshape_Counts& frc, Uni assert(mb->trailing_membar()->leading_membar() == mb, "bad membar pair"); } } + if (n->is_CallLeafPure()) { + // A pure call whose result projection is unused should have been + // eliminated by CallLeafPureNode::Ideal during IGVN. + assert(n->as_CallLeafPure()->proj_out_or_null(TypeFunc::Parms) != nullptr, + "unused CallLeafPureNode should have been removed before final graph reshaping"); + } #endif - // Count FPU ops and common calls, implements item (3) bool gc_handled = BarrierSet::barrier_set()->barrier_set_c2()->final_graph_reshaping(this, n, nop, dead_nodes); if (!gc_handled) { final_graph_reshaping_main_switch(n, frc, nop, dead_nodes); @@ -3281,50 +3277,6 @@ void Compile::handle_div_mod_op(Node* n, BasicType bt, bool is_unsigned) { void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& frc, uint nop, Unique_Node_List& dead_nodes) { switch( nop ) { - // Count all float operations that may use FPU - case Op_AddHF: - case Op_MulHF: - case Op_AddF: - case Op_SubF: - case Op_MulF: - case Op_DivF: - case Op_NegF: - case Op_ModF: - case Op_ConvI2F: - case Op_ConF: - case Op_CmpF: - case Op_CmpF3: - case Op_StoreF: - case Op_LoadF: - // case Op_ConvL2F: // longs are split into 32-bit halves - frc.inc_float_count(); - break; - - case Op_ConvF2D: - case Op_ConvD2F: - frc.inc_float_count(); - frc.inc_double_count(); - break; - - // Count all double operations that may use FPU - case Op_AddD: - case Op_SubD: - case Op_MulD: - case Op_DivD: - case Op_NegD: - case Op_ModD: - case Op_ConvI2D: - case Op_ConvD2I: - // case Op_ConvL2D: // handled by leaf call - // case Op_ConvD2L: // handled by leaf call - case Op_ConD: - case Op_CmpD: - case Op_CmpD3: - case Op_StoreD: - case Op_LoadD: - case Op_LoadD_unaligned: - frc.inc_double_count(); - break; case Op_Opaque1: // Remove Opaque Nodes before matching n->subsume_by(n->in(1), this); break; @@ -3344,7 +3296,6 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f } n->subsume_by(new_call, this); } - frc.inc_call_count(); break; } case Op_CallStaticJava: @@ -3357,13 +3308,8 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f case Op_CallLeafNoFP: { assert (n->is_Call(), ""); CallNode *call = n->as_Call(); - // Count call sites where the FP mode bit would have to be flipped. - // Do not count uncommon runtime calls: - // uncommon_trap, _complete_monitor_locking, _complete_monitor_unlocking, - // _new_Java, _new_typeArray, _new_objArray, _rethrow_Java, ... - if (!call->is_CallStaticJava() || !call->as_CallStaticJava()->_name) { - frc.inc_call_count(); // Count the call site - } else { // See if uncommon argument is shared + // See if uncommon argument is shared + if (call->is_CallStaticJava() && call->as_CallStaticJava()->_name) { Node *n = call->in(TypeFunc::Parms); int nop = n->Opcode(); // Clone shared simple arguments to uncommon calls, item (1). @@ -3381,6 +3327,13 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f } break; } + + // Mem nodes need explicit cases to satisfy assert(!n->is_Mem()) in default. + case Op_StoreF: + case Op_LoadF: + case Op_StoreD: + case Op_LoadD: + case Op_LoadD_unaligned: case Op_StoreB: case Op_StoreC: case Op_StoreI: @@ -3428,6 +3381,12 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f case Op_LoadN: case Op_LoadRange: case Op_LoadS: + case Op_LoadVectorGather: + case Op_StoreVectorScatter: + case Op_LoadVectorGatherMasked: + case Op_StoreVectorScatterMasked: + case Op_LoadVectorMasked: + case Op_StoreVectorMasked: break; case Op_AddP: { // Assert sane base pointers @@ -3778,35 +3737,6 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f #endif break; - case Op_LoadVectorGather: - case Op_StoreVectorScatter: - case Op_LoadVectorGatherMasked: - case Op_StoreVectorScatterMasked: - case Op_VectorCmpMasked: - case Op_VectorMaskGen: - case Op_LoadVectorMasked: - case Op_StoreVectorMasked: - break; - - case Op_AddReductionVI: - case Op_AddReductionVL: - case Op_AddReductionVHF: - case Op_AddReductionVF: - case Op_AddReductionVD: - case Op_MulReductionVI: - case Op_MulReductionVL: - case Op_MulReductionVHF: - case Op_MulReductionVF: - case Op_MulReductionVD: - case Op_MinReductionV: - case Op_MaxReductionV: - case Op_UMinReductionV: - case Op_UMaxReductionV: - case Op_AndReductionV: - case Op_OrReductionV: - case Op_XorReductionV: - break; - case Op_PackB: case Op_PackS: case Op_PackI: @@ -3882,8 +3812,6 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f } break; } - case Op_Blackhole: - break; case Op_RangeCheck: { RangeCheckNode* rc = n->as_RangeCheck(); Node* iff = new IfNode(rc->in(0), rc->in(1), rc->_prob, rc->_fcnt); @@ -4052,20 +3980,13 @@ void Compile::final_graph_reshaping_walk(Node_Stack& nstack, Node* root, Final_R // Intel update-in-place two-address operations and better register usage // on RISCs. Must come after regular optimizations to avoid GVN Ideal // calls canonicalizing them back. -// (3) Count the number of double-precision FP ops, single-precision FP ops -// and call sites. On Intel, we can get correct rounding either by -// forcing singles to memory (requires extra stores and loads after each -// FP bytecode) or we can set a rounding mode bit (requires setting and -// clearing the mode bit around call sites). The mode bit is only used -// if the relative frequency of single FP ops to calls is low enough. -// This is a key transform for SPEC mpeg_audio. -// (4) Detect infinite loops; blobs of code reachable from above but not +// (3) Detect infinite loops; blobs of code reachable from above but not // below. Several of the Code_Gen algorithms fail on such code shapes, // so we simply bail out. Happens a lot in ZKM.jar, but also happens // from time to time in other codes (such as -Xcomp finalizer loops, etc). // Detection is by looking for IfNodes where only 1 projection is // reachable from below or CatchNodes missing some targets. -// (5) Assert for insane oop offsets in debug mode. +// (4) Assert for insane oop offsets in debug mode. bool Compile::final_graph_reshaping() { // an infinite loop may have been eliminated by the optimizer, diff --git a/src/hotspot/share/opto/compile.hpp b/src/hotspot/share/opto/compile.hpp index ff0085d79de..6db3f27218f 100644 --- a/src/hotspot/share/opto/compile.hpp +++ b/src/hotspot/share/opto/compile.hpp @@ -319,6 +319,7 @@ class Compile : public Phase { int _fixed_slots; // count of frame slots not allocated by the register // allocator i.e. locks, original deopt pc, etc. uintx _max_node_limit; // Max unique node count during a single compilation. + uint _node_count_inlining_cutoff; // Number of nodes in the graph above which inlining is denied bool _post_loop_opts_phase; // Loop opts are finished. bool _merge_stores_phase; // Phase for merging stores, after post loop opts phase. @@ -654,6 +655,8 @@ public: void set_print_intrinsics(bool z) { _print_intrinsics = z; } uint max_node_limit() const { return (uint)_max_node_limit; } void set_max_node_limit(uint n) { _max_node_limit = n; } + uint node_count_inlining_cutoff() const { return _node_count_inlining_cutoff; } + void set_node_count_inlining_cutoff(uint n) { _node_count_inlining_cutoff = n; } bool clinit_barrier_on_entry() { return _clinit_barrier_on_entry; } void set_clinit_barrier_on_entry(bool z) { _clinit_barrier_on_entry = z; } bool has_monitors() const { return _has_monitors; } @@ -1004,6 +1007,7 @@ public: should_delay_boxing_inlining(call_method, jvms) || should_delay_vector_inlining(call_method, jvms); } + bool should_delay_after_inlining_cutoff(ciMethod* callee, ciMethod* caller); bool should_delay_string_inlining(ciMethod* call_method, JVMState* jvms); bool should_delay_boxing_inlining(ciMethod* call_method, JVMState* jvms); bool should_delay_vector_inlining(ciMethod* call_method, JVMState* jvms); @@ -1117,7 +1121,7 @@ public: // and avoid thrashing when live node count is close to the limit. // Keep in mind that live_nodes() isn't accurate during inlining until // dead node elimination step happens (see Compile::inline_incrementally). - return live_nodes() > (uint)LiveNodeCountInliningCutoff * 11 / 10; + return live_nodes() > node_count_inlining_cutoff() * 11 / 10; } } diff --git a/src/hotspot/share/opto/doCall.cpp b/src/hotspot/share/opto/doCall.cpp index d6e75f17f50..90454408a43 100644 --- a/src/hotspot/share/opto/doCall.cpp +++ b/src/hotspot/share/opto/doCall.cpp @@ -415,6 +415,22 @@ CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool } } +// After Compile::over_inlining_cutoff, should we decline inlining the callee, or should we try +// inlining again later +bool Compile::should_delay_after_inlining_cutoff(ciMethod* callee, ciMethod* caller) { + if (!IncrementalInline) { + return false; + } + + if (DelayAfterInliningCutoff) { + return true; + } else if (callee->force_inline() || caller->is_compiled_lambda_form()) { + return true; + } else { + return false; + } +} + // Return true for methods that shouldn't be inlined early so that // they are easier to analyze and optimize as intrinsics. bool Compile::should_delay_string_inlining(ciMethod* call_method, JVMState* jvms) { @@ -551,6 +567,7 @@ void Parse::do_call() { // Bump max node limit for JSR292 users if (bc() == Bytecodes::_invokedynamic || orig_callee->is_method_handle_intrinsic()) { C->set_max_node_limit(3*MaxNodeLimit); + C->set_node_count_inlining_cutoff(LiveNodeCountInliningCutoff); } // uncommon-trap when callee is unloaded, uninitialized or will not link diff --git a/src/hotspot/share/opto/escape.cpp b/src/hotspot/share/opto/escape.cpp index a05ad0ef99a..366a9b3fb4b 100644 --- a/src/hotspot/share/opto/escape.cpp +++ b/src/hotspot/share/opto/escape.cpp @@ -4539,7 +4539,8 @@ void ConnectionGraph::split_unique_types(GrowableArray &alloc_worklist, const TypePtr* adr_type = proj->adr_type(); const TypePtr* new_adr_type = tinst->add_offset(adr_type->offset()); if (adr_type != new_adr_type && !init->already_has_narrow_mem_proj_with_adr_type(new_adr_type)) { - DEBUG_ONLY( uint alias_idx = _compile->get_alias_index(new_adr_type); ) + // Do NOT remove the next line: ensure a new alias index is allocated for the instance type. + uint alias_idx = _compile->get_alias_index(new_adr_type); assert(_compile->get_general_index(alias_idx) == _compile->get_alias_index(adr_type), "new adr type should be narrowed down from existing adr type"); NarrowMemProjNode* new_proj = new NarrowMemProjNode(init, new_adr_type); igvn->set_type(new_proj, new_proj->bottom_type()); @@ -4812,8 +4813,14 @@ void ConnectionGraph::split_unique_types(GrowableArray &alloc_worklist, if (visited.test_set(n->_idx)) { continue; } - if (n->is_Phi() || n->is_ClearArray()) { - // we don't need to do anything, but the users must be pushed + if (n->is_Phi()) { + if ((uint) _compile->get_alias_index(n->as_Phi()->adr_type()) < new_index_start) { + // Push memory phis on the orig_phis worklist to update + // during Phase 4 if needed. + orig_phis.append_if_missing(n->as_Phi()); + } + } else if (n->is_ClearArray()) { + // we don't need to do anything, but the users must be pushed } else if (n->is_MemBar()) { // MemBar nodes if (!n->is_Initialize()) { // memory projections for Initialize pushed below (so we get to all their uses) // we don't need to do anything, but the users must be pushed diff --git a/src/hotspot/share/opto/gcm.cpp b/src/hotspot/share/opto/gcm.cpp index e3d3108a22e..ce1ea8a59e2 100644 --- a/src/hotspot/share/opto/gcm.cpp +++ b/src/hotspot/share/opto/gcm.cpp @@ -1743,6 +1743,9 @@ void PhaseCFG::schedule_late(VectorSet &visited, Node_Stack &stack) { // are needed make sure that after placement in a block we don't // need any new precedence edges. verify_anti_dependences(late, self); + if (C->failing()) { + return; + } } #endif } // Loop until all nodes have been visited diff --git a/src/hotspot/share/opto/ifnode.cpp b/src/hotspot/share/opto/ifnode.cpp index ad8f0ced6ea..9f99874d76a 100644 --- a/src/hotspot/share/opto/ifnode.cpp +++ b/src/hotspot/share/opto/ifnode.cpp @@ -879,6 +879,10 @@ bool IfNode::has_only_uncommon_traps(IfProjNode* proj, IfProjNode*& success, IfP return false; } + if (!dom_unc->safe_for_fold_compare()) { + return false; + } + // See merge_uncommon_traps: the reason of the uncommon trap // will be changed and the state of the dominating If will be // used. Checked that we didn't apply this transformation in a @@ -1671,6 +1675,57 @@ bool IfNode::same_condition(const Node* dom, PhaseIterGVN* igvn) const { return true; } +void IfNode::mark_projections_unsafe_for_fold_compare() const { + // With the following code pattern + // + // if (some_condition) { + // v = 0; + // } else { + // v = 1; + // } // v is Phi(0, 1) + // if (v == 0) { + // uncommon_trap(); // reexecutes the "if (v == 0) {" above, captures v as stack argument to ifeq bytecode + // } + // if (some_other_condition) { + // uncommon_trap(); // reexecutes the "if (some_other_condition) {" + // } + // + // if the second if is split thru Phi, the result is: + // + // if (some_condition) { + // uncommon_trap(); // reexecutes the "if (v == 0) {" that was removed above, captures v = 0 as stack argument to ifeq bytecode + // } + // if (some_other_condition) { + // uncommon_trap(); // reexecutes the "if (some_other_condition) {" + // } + // + // some_condition and some_other_condition could be folded into + // a single new condition that is narrower than some_condition + // (done by IfNode::fold_compares(), for instance): + // + // if (combined_narrower_condition) { + // uncommon_trap(); // reexecutes the "if (v == 0) {" that was removed, captures v = 0 as stack argument to ifeq bytecode + // } + // + // Then combined_narrower_condition is true for some input value for + // which some_condition is false. When such an input value is used + // at runtime, the trap is taken which causes "if (v == 0) {" to be + // reexecuted with v = 0 even though some_condition is wrong, causing + // the wrong branch to be executed. + // + // Mark the uncommon trap nodes to prevent such a transformation + // from happening. + IfProjNode* true_projection = true_proj(); + IfProjNode* false_projection = false_proj(); + CallStaticJavaNode* unc = true_projection->is_uncommon_trap_proj(); + if (unc != nullptr) { + unc->clear_safe_for_fold_compare(); + } + unc = false_projection->is_uncommon_trap_proj(); + if (unc != nullptr) { + unc->clear_safe_for_fold_compare(); + } +} static int subsuming_bool_test_encode(Node*); diff --git a/src/hotspot/share/opto/library_call.cpp b/src/hotspot/share/opto/library_call.cpp index ff7bc2c10d3..f6a9014c9e1 100644 --- a/src/hotspot/share/opto/library_call.cpp +++ b/src/hotspot/share/opto/library_call.cpp @@ -6932,7 +6932,8 @@ bool LibraryCallKit::inline_reference_get0() { DecoratorSet decorators = IN_HEAP | ON_WEAK_OOP_REF; Node* result = load_field_from_object(reference_obj, "referent", "Ljava/lang/Object;", - decorators, /*is_static*/ false, nullptr); + decorators, /*is_static*/ false, + env()->Reference_klass()); if (result == nullptr) return false; // Add memory barrier to prevent commoning reads from this field @@ -6955,7 +6956,8 @@ bool LibraryCallKit::inline_reference_refersTo0(bool is_phantom) { DecoratorSet decorators = IN_HEAP | AS_NO_KEEPALIVE; decorators |= (is_phantom ? ON_PHANTOM_OOP_REF : ON_WEAK_OOP_REF); Node* referent = load_field_from_object(reference_obj, "referent", "Ljava/lang/Object;", - decorators, /*is_static*/ false, nullptr); + decorators, /*is_static*/ false, + env()->Reference_klass()); if (referent == nullptr) return false; // Add memory barrier to prevent commoning reads from this field @@ -7042,8 +7044,6 @@ Node* LibraryCallKit::load_field_from_object(Node* fromObj, const char* fieldNam assert(tinst != nullptr, "obj is null"); assert(tinst->is_loaded(), "obj is not loaded"); fromKls = tinst->instance_klass(); - } else { - assert(is_static, "only for static field access"); } ciField* field = fromKls->get_field_by_name(ciSymbol::make(fieldName), ciSymbol::make(fieldTypeString), diff --git a/src/hotspot/share/opto/loopTransform.cpp b/src/hotspot/share/opto/loopTransform.cpp index b65f90093ab..e488421ff03 100644 --- a/src/hotspot/share/opto/loopTransform.cpp +++ b/src/hotspot/share/opto/loopTransform.cpp @@ -4145,7 +4145,7 @@ bool PhaseIdealLoop::intrinsify_fill(IdealLoopTree* lpt) { call->init_req(TypeFunc::Control, head->init_control()); call->init_req(TypeFunc::I_O, C->top()); // Does no I/O. call->init_req(TypeFunc::Memory, mem_phi->in(LoopNode::EntryControl)); - call->init_req(TypeFunc::ReturnAdr, C->start()->proj_out_or_null(TypeFunc::ReturnAdr)); + call->init_req(TypeFunc::ReturnAdr, C->top()); Node* frame = new ParmNode(C->start(), TypeFunc::FramePtr); _igvn.register_new_node_with_optimizer(frame); call->init_req(TypeFunc::FramePtr, frame); diff --git a/src/hotspot/share/opto/loopnode.cpp b/src/hotspot/share/opto/loopnode.cpp index 35a9108892c..13feeb77947 100644 --- a/src/hotspot/share/opto/loopnode.cpp +++ b/src/hotspot/share/opto/loopnode.cpp @@ -5938,8 +5938,8 @@ void PhaseIdealLoop::set_idom(Node* d, Node* n, uint dom_depth) { uint idx = d->_idx; if (idx >= _idom_size) { uint newsize = next_power_of_2(idx); - _idom = REALLOC_ARENA_ARRAY(&_arena, Node*, _idom,_idom_size,newsize); - _dom_depth = REALLOC_ARENA_ARRAY(&_arena, uint, _dom_depth,_idom_size,newsize); + _idom = REALLOC_ARENA_ARRAY(&_arena, _idom, _idom_size, newsize); + _dom_depth = REALLOC_ARENA_ARRAY(&_arena, _dom_depth, _idom_size, newsize); memset( _dom_depth + _idom_size, 0, (newsize - _idom_size) * sizeof(uint) ); _idom_size = newsize; } diff --git a/src/hotspot/share/opto/loopnode.hpp b/src/hotspot/share/opto/loopnode.hpp index 26b82259327..4eef2fed415 100644 --- a/src/hotspot/share/opto/loopnode.hpp +++ b/src/hotspot/share/opto/loopnode.hpp @@ -914,7 +914,7 @@ class PhaseIdealLoop : public PhaseTransform { void reallocate_preorders() { _nesting.check(); // Check if a potential re-allocation in the resource arena is safe if ( _max_preorder < C->unique() ) { - _preorders = REALLOC_RESOURCE_ARRAY(uint, _preorders, _max_preorder, C->unique()); + _preorders = REALLOC_RESOURCE_ARRAY(_preorders, _max_preorder, C->unique()); _max_preorder = C->unique(); } memset(_preorders, 0, sizeof(uint) * _max_preorder); @@ -926,7 +926,7 @@ class PhaseIdealLoop : public PhaseTransform { _nesting.check(); // Check if a potential re-allocation in the resource arena is safe if ( _max_preorder < C->unique() ) { uint newsize = _max_preorder<<1; // double size of array - _preorders = REALLOC_RESOURCE_ARRAY(uint, _preorders, _max_preorder, newsize); + _preorders = REALLOC_RESOURCE_ARRAY(_preorders, _max_preorder, newsize); memset(&_preorders[_max_preorder],0,sizeof(uint)*(newsize-_max_preorder)); _max_preorder = newsize; } diff --git a/src/hotspot/share/opto/matcher.cpp b/src/hotspot/share/opto/matcher.cpp index 69098befa38..d2a9250b3ee 100644 --- a/src/hotspot/share/opto/matcher.cpp +++ b/src/hotspot/share/opto/matcher.cpp @@ -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 @@ -2550,7 +2550,7 @@ bool Matcher::gen_narrow_oop_implicit_null_checks() { // Advice matcher to perform null checks on the narrow oop side. // Implicit checks are not possible on the uncompressed oop side anyway // (at least not for read accesses). - // Performs significantly better (especially on Power 6). + // Performs significantly better. if (!os::zero_page_read_protected()) { return true; } diff --git a/src/hotspot/share/opto/matcher.hpp b/src/hotspot/share/opto/matcher.hpp index 4de41d6f2ef..a3d0f8e7d6c 100644 --- a/src/hotspot/share/opto/matcher.hpp +++ b/src/hotspot/share/opto/matcher.hpp @@ -341,7 +341,7 @@ public: // Identify if a vector mask operation prefers the input/output mask to be // saved with a predicate type or not. - // - Return true if it prefers a predicate type (i.e. TypeVectMask). + // - Return true if it prefers a predicate type (i.e. TypePVectMask). // - Return false if it prefers a general vector type (i.e. TypeVectA to TypeVectZ). static bool mask_op_prefers_predicate(int opcode, const TypeVect* vt); diff --git a/src/hotspot/share/opto/memnode.cpp b/src/hotspot/share/opto/memnode.cpp index a49d4708d32..1521f89af4e 100644 --- a/src/hotspot/share/opto/memnode.cpp +++ b/src/hotspot/share/opto/memnode.cpp @@ -442,7 +442,7 @@ Node *MemNode::Ideal_common(PhaseGVN *phase, bool can_reshape) { // and 'DomResult::EncounteredDeadCode' if we can't decide due to // dead code, but at the end of IGVN, we know the definite result // once the dead code is cleaned up. -Node::DomResult MemNode::maybe_all_controls_dominate(Node* dom, Node* sub) { +Node::DomResult MemNode::maybe_all_controls_dominate(Node* dom, Node* sub, PhaseGVN* phase) { if (dom == nullptr || dom->is_top() || sub == nullptr || sub->is_top()) { return DomResult::EncounteredDeadCode; // Conservative answer for dead code } @@ -522,6 +522,9 @@ Node::DomResult MemNode::maybe_all_controls_dominate(Node* dom, Node* sub) { return dom_result; } } else { + if (n->Value(phase) == Type::TOP) { + return DomResult::EncounteredDeadCode; + } // First, own control edge. Node* m = n->find_exact_control(n->in(0)); if (m != nullptr) { @@ -552,7 +555,7 @@ Node::DomResult MemNode::maybe_all_controls_dominate(Node* dom, Node* sub) { // if any, which have been previously discovered by the caller. bool MemNode::detect_ptr_independence(Node* p1, AllocateNode* a1, Node* p2, AllocateNode* a2, - PhaseTransform* phase) { + PhaseGVN* phase) { // Trivial case: Non-overlapping values. Be careful, we can cast a raw pointer to an oop (e.g. in // the allocation pattern) so joining the types only works if both are oops. join may also give // an incorrect result when both pointers are nullable and the result is supposed to be @@ -575,9 +578,9 @@ bool MemNode::detect_ptr_independence(Node* p1, AllocateNode* a1, return (a1 != a2); } else if (a1 != nullptr) { // one allocation a1 // (Note: p2->is_Con implies p2->in(0)->is_Root, which dominates.) - return all_controls_dominate(p2, a1); + return all_controls_dominate(p2, a1, phase); } else { //(a2 != null) // one allocation a2 - return all_controls_dominate(p1, a2); + return all_controls_dominate(p1, a2, phase); } return false; } @@ -695,7 +698,7 @@ ArrayCopyNode* MemNode::find_array_copy_clone(Node* ld_alloc, Node* mem) const { // specific to loads and stores, so they are handled by the callers. // (Currently, only LoadNode::Ideal has steps (c), (d). More later.) // -Node* MemNode::find_previous_store(PhaseValues* phase) { +Node* MemNode::find_previous_store(PhaseGVN* phase) { AccessAnalyzer analyzer(phase, this); Node* mem = in(MemNode::Memory); // start searching here... @@ -771,7 +774,7 @@ uint8_t MemNode::barrier_data(const Node* n) { return 0; } -AccessAnalyzer::AccessAnalyzer(PhaseValues* phase, MemNode* n) +AccessAnalyzer::AccessAnalyzer(PhaseGVN* phase, MemNode* n) : _phase(phase), _n(n), _memory_size(n->memory_size()), _alias_idx(-1) { Node* adr = _n->in(MemNode::Address); _offset = 0; @@ -883,7 +886,7 @@ AccessAnalyzer::AccessIndependence AccessAnalyzer::detect_access_independence(No known_identical = true; } else if (_alloc != nullptr) { known_independent = true; - } else if (MemNode::all_controls_dominate(_n, st_alloc)) { + } else if (MemNode::all_controls_dominate(_n, st_alloc, _phase)) { known_independent = true; } @@ -1684,11 +1687,11 @@ bool LoadNode::can_split_through_phi_base(PhaseGVN* phase) { } if (!mem->is_Phi()) { - if (!MemNode::all_controls_dominate(mem, base->in(0))) { + if (!MemNode::all_controls_dominate(mem, base->in(0), phase)) { return false; } } else if (base->in(0) != mem->in(0)) { - if (!MemNode::all_controls_dominate(mem, base->in(0))) { + if (!MemNode::all_controls_dominate(mem, base->in(0), phase)) { return false; } } @@ -1783,20 +1786,20 @@ Node* LoadNode::split_through_phi(PhaseGVN* phase, bool ignore_missing_instance_ region = mem->in(0); // Skip if the region dominates some control edge of the address. // We will check `dom_result` later. - dom_result = MemNode::maybe_all_controls_dominate(address, region); + dom_result = MemNode::maybe_all_controls_dominate(address, region, phase); } else if (!mem->is_Phi()) { assert(base_is_phi, "sanity"); region = base->in(0); // Skip if the region dominates some control edge of the memory. // We will check `dom_result` later. - dom_result = MemNode::maybe_all_controls_dominate(mem, region); + dom_result = MemNode::maybe_all_controls_dominate(mem, region, phase); } else if (base->in(0) != mem->in(0)) { assert(base_is_phi && mem->is_Phi(), "sanity"); - dom_result = MemNode::maybe_all_controls_dominate(mem, base->in(0)); + dom_result = MemNode::maybe_all_controls_dominate(mem, base->in(0), phase); if (dom_result == DomResult::Dominate) { region = base->in(0); } else { - dom_result = MemNode::maybe_all_controls_dominate(address, mem->in(0)); + dom_result = MemNode::maybe_all_controls_dominate(address, mem->in(0), phase); if (dom_result == DomResult::Dominate) { region = mem->in(0); } @@ -1964,7 +1967,7 @@ Node *LoadNode::Ideal(PhaseGVN *phase, bool can_reshape) { if (in(MemNode::Control) != nullptr && can_remove_control() && phase->type(base)->higher_equal(TypePtr::NOTNULL) - && all_controls_dominate(base, phase->C->start())) { + && all_controls_dominate(base, phase->C->start(), phase)) { // A method-invariant, non-null address (constant or 'this' argument). set_req(MemNode::Control, nullptr); return this; @@ -4829,7 +4832,7 @@ bool InitializeNode::detect_init_independence(Node* value, PhaseGVN* phase) { // must have preceded the init, or else be equal to the init. // Even after loop optimizations (which might change control edges) // a store is never pinned *before* the availability of its inputs. - if (!MemNode::all_controls_dominate(n, this)) { + if (!MemNode::all_controls_dominate(n, this, phase)) { return false; // failed to prove a good control } } diff --git a/src/hotspot/share/opto/memnode.hpp b/src/hotspot/share/opto/memnode.hpp index 8efb5521e7c..f3f65608972 100644 --- a/src/hotspot/share/opto/memnode.hpp +++ b/src/hotspot/share/opto/memnode.hpp @@ -103,15 +103,15 @@ public: // Helpers for the optimizer. Documented in memnode.cpp. static bool detect_ptr_independence(Node* p1, AllocateNode* a1, Node* p2, AllocateNode* a2, - PhaseTransform* phase); + PhaseGVN* phase); static bool adr_phi_is_loop_invariant(Node* adr_phi, Node* cast); static Node *optimize_simple_memory_chain(Node *mchain, const TypeOopPtr *t_oop, Node *load, PhaseGVN *phase); static Node *optimize_memory_chain(Node *mchain, const TypePtr *t_adr, Node *load, PhaseGVN *phase); // The following two should probably be phase-specific functions: - static DomResult maybe_all_controls_dominate(Node* dom, Node* sub); - static bool all_controls_dominate(Node* dom, Node* sub) { - DomResult dom_result = maybe_all_controls_dominate(dom, sub); + static DomResult maybe_all_controls_dominate(Node* dom, Node* sub, PhaseGVN* phase); + static bool all_controls_dominate(Node* dom, Node* sub, PhaseGVN* phase) { + DomResult dom_result = maybe_all_controls_dominate(dom, sub, phase); return dom_result == DomResult::Dominate; } @@ -156,7 +156,7 @@ public: // Search through memory states which precede this node (load or store). // Look for an exact match for the address, with no intervening // aliased stores. - Node* find_previous_store(PhaseValues* phase); + Node* find_previous_store(PhaseGVN* phase); // Can this node (load or store) accurately see a stored value in // the given memory state? (The state may or may not be in(Memory).) @@ -186,7 +186,7 @@ public: // Analyze a MemNode to try to prove that it is independent from other memory accesses class AccessAnalyzer : StackObj { private: - PhaseValues* const _phase; + PhaseGVN* const _phase; MemNode* const _n; Node* _base; intptr_t _offset; @@ -197,7 +197,7 @@ private: int _alias_idx; public: - AccessAnalyzer(PhaseValues* phase, MemNode* n); + AccessAnalyzer(PhaseGVN* phase, MemNode* n); // The result of deciding whether a memory node 'other' writes into the memory which '_n' // observes. diff --git a/src/hotspot/share/opto/multnode.cpp b/src/hotspot/share/opto/multnode.cpp index 05867a35268..941304e1f6d 100644 --- a/src/hotspot/share/opto/multnode.cpp +++ b/src/hotspot/share/opto/multnode.cpp @@ -265,5 +265,6 @@ CallStaticJavaNode* ProjNode::is_uncommon_trap_if_pattern(Deoptimization::DeoptR NarrowMemProjNode::NarrowMemProjNode(InitializeNode* src, const TypePtr* adr_type) : ProjNode(src, TypeFunc::Memory), _adr_type(adr_type) { + assert(Compile::current()->have_alias_type(adr_type), "alias index should have been allocated already"); init_class_id(Class_NarrowMemProj); } diff --git a/src/hotspot/share/opto/node.cpp b/src/hotspot/share/opto/node.cpp index 3eafd97d7c1..997ce92fe1c 100644 --- a/src/hotspot/share/opto/node.cpp +++ b/src/hotspot/share/opto/node.cpp @@ -3095,7 +3095,7 @@ void Node_Stack::grow() { size_t old_top = pointer_delta(_inode_top,_inodes,sizeof(INode)); // save _top size_t old_max = pointer_delta(_inode_max,_inodes,sizeof(INode)); size_t max = old_max << 1; // max * 2 - _inodes = REALLOC_ARENA_ARRAY(_a, INode, _inodes, old_max, max); + _inodes = REALLOC_ARENA_ARRAY(_a, _inodes, old_max, max); _inode_max = _inodes + max; _inode_top = _inodes + old_top; // restore _top } @@ -3213,4 +3213,3 @@ Node* TypeNode::Ideal(PhaseGVN* phase, bool can_reshape) { return Node::Ideal(phase, can_reshape); } - diff --git a/src/hotspot/share/opto/phasetype.hpp b/src/hotspot/share/opto/phasetype.hpp index 2b599ace03a..3d316112b2d 100644 --- a/src/hotspot/share/opto/phasetype.hpp +++ b/src/hotspot/share/opto/phasetype.hpp @@ -204,7 +204,7 @@ class PhaseNameValidator { ~PhaseNameValidator() { if (_bad != nullptr) { - FREE_C_HEAP_ARRAY(char, _bad); + FREE_C_HEAP_ARRAY(_bad); } } diff --git a/src/hotspot/share/opto/regmask.cpp b/src/hotspot/share/opto/regmask.cpp index dcbc4dbac8e..3b1d45a4f77 100644 --- a/src/hotspot/share/opto/regmask.cpp +++ b/src/hotspot/share/opto/regmask.cpp @@ -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 @@ -248,8 +248,15 @@ OptoReg::Name RegMask::find_first_set(LRG &lrg, const int size) const { for (unsigned i = _lwm; i <= _hwm; i++) { if (rm_word(i) != 0) { // Found some bits // Convert to bit number, return hi bit in pair - return OptoReg::Name(offset_bits() + (i << LogBitsPerWord) + - find_lowest_bit(rm_word(i)) + (size - 1)); + OptoReg::Name hi_bit = OptoReg::Name(offset_bits() + + (i << LogBitsPerWord) + find_lowest_bit(rm_word(i)) + (size - 1)); + if (!can_represent(hi_bit)) { + // For scalable vector registers, whose actual length exceeds + // SlotsPerVecA bits, the mask may not contain the highest register + // number in the set (hi_bit). + return OptoReg::Bad; + } + return hi_bit; } } return OptoReg::Bad; diff --git a/src/hotspot/share/opto/regmask.hpp b/src/hotspot/share/opto/regmask.hpp index 421031fdf61..99b10c1c557 100644 --- a/src/hotspot/share/opto/regmask.hpp +++ b/src/hotspot/share/opto/regmask.hpp @@ -285,8 +285,9 @@ class RegMask { _rm_word_ext = NEW_ARENA_ARRAY(_arena, uintptr_t, new_ext_size); } else { assert(_original_ext_address == &_rm_word_ext, "clone sanity check"); - _rm_word_ext = REALLOC_ARENA_ARRAY(_arena, uintptr_t, _rm_word_ext, + _rm_word_ext = REALLOC_ARENA_ARRAY(_arena, _rm_word_ext, old_ext_size, new_ext_size); + } if (initialize_by_infinite_stack) { int fill = 0; diff --git a/src/hotspot/share/opto/runtime.cpp b/src/hotspot/share/opto/runtime.cpp index c01e8578e43..02a7c21fb5d 100644 --- a/src/hotspot/share/opto/runtime.cpp +++ b/src/hotspot/share/opto/runtime.cpp @@ -256,11 +256,10 @@ address OptoRuntime::generate_stub(ciEnv* env, bool return_pc) { // Matching the default directive, we currently have no method to match. - DirectiveSet* directive = DirectivesStack::getDefaultDirective(CompileBroker::compiler(CompLevel_full_optimization)); - CompilationMemoryStatisticMark cmsm(directive); + CompilerDirectiveMatcher default_directive(CompileBroker::compiler(CompLevel_full_optimization)); + CompilationMemoryStatisticMark cmsm(default_directive.directive_set()); ResourceMark rm; - Compile C(env, gen, C_function, name, stub_id, is_fancy_jump, pass_tls, return_pc, directive); - DirectivesStack::release(directive); + Compile C(env, gen, C_function, name, stub_id, is_fancy_jump, pass_tls, return_pc, default_directive.directive_set()); return C.stub_entry_point(); } diff --git a/src/hotspot/share/opto/split_if.cpp b/src/hotspot/share/opto/split_if.cpp index e5f8043ae19..c8f25f92de3 100644 --- a/src/hotspot/share/opto/split_if.cpp +++ b/src/hotspot/share/opto/split_if.cpp @@ -615,7 +615,7 @@ void PhaseIdealLoop::handle_use( Node *use, Node *def, small_cache *cache, Node // Found an If getting its condition-code input from a Phi in the same block. // Split thru the Region. void PhaseIdealLoop::do_split_if(Node* iff, RegionNode** new_false_region, RegionNode** new_true_region) { - + iff->as_If()->mark_projections_unsafe_for_fold_compare(); C->set_major_progress(); RegionNode *region = iff->in(0)->as_Region(); Node *region_dom = idom(region); diff --git a/src/hotspot/share/opto/subnode.cpp b/src/hotspot/share/opto/subnode.cpp index 548df58eb35..014f41f82cc 100644 --- a/src/hotspot/share/opto/subnode.cpp +++ b/src/hotspot/share/opto/subnode.cpp @@ -981,15 +981,6 @@ const Type *CmpPNode::sub( const Type *t1, const Type *t2 ) const { const TypeKlassPtr* k0 = r0->isa_klassptr(); const TypeKlassPtr* k1 = r1->isa_klassptr(); if ((p0 && p1) || (k0 && k1)) { - if (p0 && p1) { - Node* in1 = in(1)->uncast(); - Node* in2 = in(2)->uncast(); - AllocateNode* alloc1 = AllocateNode::Ideal_allocation(in1); - AllocateNode* alloc2 = AllocateNode::Ideal_allocation(in2); - if (MemNode::detect_ptr_independence(in1, alloc1, in2, alloc2, nullptr)) { - return TypeInt::CC_GT; // different pointers - } - } bool xklass0 = p0 ? p0->klass_is_exact() : k0->klass_is_exact(); bool xklass1 = p1 ? p1->klass_is_exact() : k1->klass_is_exact(); bool unrelated_classes = false; @@ -1192,6 +1183,24 @@ Node *CmpPNode::Ideal( PhaseGVN *phase, bool can_reshape ) { return this; } +const Type* CmpPNode::Value(PhaseGVN* phase) const { + const Type* res = CmpNode::Value(phase); + if (res == TypeInt::CC) { + const TypeOopPtr* p0 = phase->type(in(1))->isa_oopptr(); + const TypeOopPtr* p1 = phase->type(in(2))->isa_oopptr(); + if (p0 != nullptr && p1 != nullptr) { + Node* in1 = in(1)->uncast(); + Node* in2 = in(2)->uncast(); + AllocateNode* alloc1 = AllocateNode::Ideal_allocation(in1); + AllocateNode* alloc2 = AllocateNode::Ideal_allocation(in2); + if (MemNode::detect_ptr_independence(in1, alloc1, in2, alloc2, phase)) { + return TypeInt::CC_GT; // different pointers + } + } + } + return res; +} + //============================================================================= //------------------------------sub-------------------------------------------- // Simplify an CmpN (compare 2 pointers) node, based on local information. diff --git a/src/hotspot/share/opto/subnode.hpp b/src/hotspot/share/opto/subnode.hpp index 54cb1d20cd0..29ec25b41f8 100644 --- a/src/hotspot/share/opto/subnode.hpp +++ b/src/hotspot/share/opto/subnode.hpp @@ -198,6 +198,7 @@ public: CmpPNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {} virtual int Opcode() const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); + virtual const Type* Value(PhaseGVN* phase) const; virtual const Type *sub( const Type *, const Type * ) const; }; @@ -519,7 +520,12 @@ class SqrtDNode : public Node { public: SqrtDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) { init_flags(Flag_is_expensive); - C->add_expensive_node(this); + // Treat node only as expensive if a control input is set because it might + // be created from SqrtVDNode in VectorNode::push_through_replicate which + // does not have control input. + if (c != nullptr) { + C->add_expensive_node(this); + } } virtual int Opcode() const; const Type *bottom_type() const { return Type::DOUBLE; } diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index 53845a94c1c..8acdf2b8000 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -2487,7 +2487,7 @@ static bool can_subword_truncate(Node* in, const Type* type) { } // Vector nodes should not truncate. - if (type->isa_vect() != nullptr || type->isa_vectmask() != nullptr || in->is_Reduction()) { + if (type->isa_vect() != nullptr || type->isa_pvectmask() != nullptr || in->is_Reduction()) { return false; } diff --git a/src/hotspot/share/opto/traceAutoVectorizationTag.hpp b/src/hotspot/share/opto/traceAutoVectorizationTag.hpp index 4f67aff9b07..47def1aed1e 100644 --- a/src/hotspot/share/opto/traceAutoVectorizationTag.hpp +++ b/src/hotspot/share/opto/traceAutoVectorizationTag.hpp @@ -142,7 +142,7 @@ class TraceAutoVectorizationTagValidator { ~TraceAutoVectorizationTagValidator() { if (_bad != nullptr) { - FREE_C_HEAP_ARRAY(char, _bad); + FREE_C_HEAP_ARRAY(_bad); } } diff --git a/src/hotspot/share/opto/traceMergeStoresTag.hpp b/src/hotspot/share/opto/traceMergeStoresTag.hpp index 214173c02f7..32ade413673 100644 --- a/src/hotspot/share/opto/traceMergeStoresTag.hpp +++ b/src/hotspot/share/opto/traceMergeStoresTag.hpp @@ -111,7 +111,7 @@ namespace TraceMergeStores { ~TagValidator() { if (_bad != nullptr) { - FREE_C_HEAP_ARRAY(char, _bad); + FREE_C_HEAP_ARRAY(_bad); } } diff --git a/src/hotspot/share/opto/type.cpp b/src/hotspot/share/opto/type.cpp index 308ec819773..4d1d05c596d 100644 --- a/src/hotspot/share/opto/type.cpp +++ b/src/hotspot/share/opto/type.cpp @@ -62,66 +62,66 @@ Dict* Type::_shared_type_dict = nullptr; // Array which maps compiler types to Basic Types const Type::TypeInfo Type::_type_info[Type::lastype] = { - { Bad, T_ILLEGAL, "bad", false, Node::NotAMachineReg, relocInfo::none }, // Bad - { Control, T_ILLEGAL, "control", false, 0, relocInfo::none }, // Control - { Bottom, T_VOID, "top", false, 0, relocInfo::none }, // Top - { Bad, T_INT, "int:", false, Op_RegI, relocInfo::none }, // Int - { Bad, T_LONG, "long:", false, Op_RegL, relocInfo::none }, // Long - { Half, T_VOID, "half", false, 0, relocInfo::none }, // Half - { Bad, T_NARROWOOP, "narrowoop:", false, Op_RegN, relocInfo::none }, // NarrowOop - { Bad, T_NARROWKLASS,"narrowklass:", false, Op_RegN, relocInfo::none }, // NarrowKlass - { Bad, T_ILLEGAL, "tuple:", false, Node::NotAMachineReg, relocInfo::none }, // Tuple - { Bad, T_ARRAY, "array:", false, Node::NotAMachineReg, relocInfo::none }, // Array - { Bad, T_ARRAY, "interfaces:", false, Node::NotAMachineReg, relocInfo::none }, // Interfaces + { Bad, T_ILLEGAL, "bad", false, Node::NotAMachineReg}, // Bad + { Control, T_ILLEGAL, "control", false, 0 }, // Control + { Bottom, T_VOID, "top", false, 0 }, // Top + { Bad, T_INT, "int:", false, Op_RegI }, // Int + { Bad, T_LONG, "long:", false, Op_RegL }, // Long + { Half, T_VOID, "half", false, 0 }, // Half + { Bad, T_NARROWOOP, "narrowoop:", false, Op_RegN }, // NarrowOop + { Bad, T_NARROWKLASS,"narrowklass:", false, Op_RegN }, // NarrowKlass + { Bad, T_ILLEGAL, "tuple:", false, Node::NotAMachineReg}, // Tuple + { Bad, T_ARRAY, "array:", false, Node::NotAMachineReg}, // Array + { Bad, T_ARRAY, "interfaces:", false, Node::NotAMachineReg}, // Interfaces #if defined(PPC64) - { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask. - { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA. - { Bad, T_ILLEGAL, "vectors:", false, 0, relocInfo::none }, // VectorS - { Bad, T_ILLEGAL, "vectord:", false, Op_RegL, relocInfo::none }, // VectorD - { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX - { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY - { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ + { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask }, // VectorMask. + { Bad, T_ILLEGAL, "vectora:", false, Op_VecA }, // VectorA. + { Bad, T_ILLEGAL, "vectors:", false, 0 }, // VectorS + { Bad, T_ILLEGAL, "vectord:", false, Op_RegL }, // VectorD + { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX }, // VectorX + { Bad, T_ILLEGAL, "vectory:", false, 0 }, // VectorY + { Bad, T_ILLEGAL, "vectorz:", false, 0 }, // VectorZ #elif defined(S390) - { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask. - { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA. - { Bad, T_ILLEGAL, "vectors:", false, 0, relocInfo::none }, // VectorS - { Bad, T_ILLEGAL, "vectord:", false, Op_RegL, relocInfo::none }, // VectorD - { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX - { Bad, T_ILLEGAL, "vectory:", false, 0, relocInfo::none }, // VectorY - { Bad, T_ILLEGAL, "vectorz:", false, 0, relocInfo::none }, // VectorZ + { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask }, // VectorMask. + { Bad, T_ILLEGAL, "vectora:", false, Op_VecA }, // VectorA. + { Bad, T_ILLEGAL, "vectors:", false, 0 }, // VectorS + { Bad, T_ILLEGAL, "vectord:", false, Op_RegL }, // VectorD + { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX }, // VectorX + { Bad, T_ILLEGAL, "vectory:", false, 0 }, // VectorY + { Bad, T_ILLEGAL, "vectorz:", false, 0 }, // VectorZ #else // all other - { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask, relocInfo::none }, // VectorMask. - { Bad, T_ILLEGAL, "vectora:", false, Op_VecA, relocInfo::none }, // VectorA. - { Bad, T_ILLEGAL, "vectors:", false, Op_VecS, relocInfo::none }, // VectorS - { Bad, T_ILLEGAL, "vectord:", false, Op_VecD, relocInfo::none }, // VectorD - { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX, relocInfo::none }, // VectorX - { Bad, T_ILLEGAL, "vectory:", false, Op_VecY, relocInfo::none }, // VectorY - { Bad, T_ILLEGAL, "vectorz:", false, Op_VecZ, relocInfo::none }, // VectorZ + { Bad, T_ILLEGAL, "vectormask:", false, Op_RegVectMask }, // VectorMask. + { Bad, T_ILLEGAL, "vectora:", false, Op_VecA }, // VectorA. + { Bad, T_ILLEGAL, "vectors:", false, Op_VecS }, // VectorS + { Bad, T_ILLEGAL, "vectord:", false, Op_VecD }, // VectorD + { Bad, T_ILLEGAL, "vectorx:", false, Op_VecX }, // VectorX + { Bad, T_ILLEGAL, "vectory:", false, Op_VecY }, // VectorY + { Bad, T_ILLEGAL, "vectorz:", false, Op_VecZ }, // VectorZ #endif - { Bad, T_ADDRESS, "anyptr:", false, Op_RegP, relocInfo::none }, // AnyPtr - { Bad, T_ADDRESS, "rawptr:", false, Op_RegP, relocInfo::external_word_type }, // RawPtr - { Bad, T_OBJECT, "oop:", true, Op_RegP, relocInfo::oop_type }, // OopPtr - { Bad, T_OBJECT, "inst:", true, Op_RegP, relocInfo::oop_type }, // InstPtr - { Bad, T_OBJECT, "ary:", true, Op_RegP, relocInfo::oop_type }, // AryPtr - { Bad, T_METADATA, "metadata:", false, Op_RegP, relocInfo::metadata_type }, // MetadataPtr - { Bad, T_METADATA, "klass:", false, Op_RegP, relocInfo::metadata_type }, // KlassPtr - { Bad, T_METADATA, "instklass:", false, Op_RegP, relocInfo::metadata_type }, // InstKlassPtr - { Bad, T_METADATA, "aryklass:", false, Op_RegP, relocInfo::metadata_type }, // AryKlassPtr - { Bad, T_OBJECT, "func", false, 0, relocInfo::none }, // Function - { Abio, T_ILLEGAL, "abIO", false, 0, relocInfo::none }, // Abio - { Return_Address, T_ADDRESS, "return_address",false, Op_RegP, relocInfo::none }, // Return_Address - { Memory, T_ILLEGAL, "memory", false, 0, relocInfo::none }, // Memory - { HalfFloatBot, T_SHORT, "halffloat_top", false, Op_RegF, relocInfo::none }, // HalfFloatTop - { HalfFloatCon, T_SHORT, "hfcon:", false, Op_RegF, relocInfo::none }, // HalfFloatCon - { HalfFloatTop, T_SHORT, "short", false, Op_RegF, relocInfo::none }, // HalfFloatBot - { FloatBot, T_FLOAT, "float_top", false, Op_RegF, relocInfo::none }, // FloatTop - { FloatCon, T_FLOAT, "ftcon:", false, Op_RegF, relocInfo::none }, // FloatCon - { FloatTop, T_FLOAT, "float", false, Op_RegF, relocInfo::none }, // FloatBot - { DoubleBot, T_DOUBLE, "double_top", false, Op_RegD, relocInfo::none }, // DoubleTop - { DoubleCon, T_DOUBLE, "dblcon:", false, Op_RegD, relocInfo::none }, // DoubleCon - { DoubleTop, T_DOUBLE, "double", false, Op_RegD, relocInfo::none }, // DoubleBot - { Top, T_ILLEGAL, "bottom", false, 0, relocInfo::none } // Bottom + { Bad, T_ADDRESS, "anyptr:", false, Op_RegP }, // AnyPtr + { Bad, T_ADDRESS, "rawptr:", false, Op_RegP }, // RawPtr + { Bad, T_OBJECT, "oop:", true, Op_RegP }, // OopPtr + { Bad, T_OBJECT, "inst:", true, Op_RegP }, // InstPtr + { Bad, T_OBJECT, "ary:", true, Op_RegP }, // AryPtr + { Bad, T_METADATA, "metadata:", false, Op_RegP }, // MetadataPtr + { Bad, T_METADATA, "klass:", false, Op_RegP }, // KlassPtr + { Bad, T_METADATA, "instklass:", false, Op_RegP }, // InstKlassPtr + { Bad, T_METADATA, "aryklass:", false, Op_RegP }, // AryKlassPtr + { Bad, T_OBJECT, "func", false, 0 }, // Function + { Abio, T_ILLEGAL, "abIO", false, 0 }, // Abio + { Return_Address, T_ADDRESS, "return_address",false, Op_RegP }, // Return_Address + { Memory, T_ILLEGAL, "memory", false, 0 }, // Memory + { HalfFloatBot, T_SHORT, "halffloat_top", false, Op_RegF }, // HalfFloatTop + { HalfFloatCon, T_SHORT, "hfcon:", false, Op_RegF }, // HalfFloatCon + { HalfFloatTop, T_SHORT, "short", false, Op_RegF }, // HalfFloatBot + { FloatBot, T_FLOAT, "float_top", false, Op_RegF }, // FloatTop + { FloatCon, T_FLOAT, "ftcon:", false, Op_RegF }, // FloatCon + { FloatTop, T_FLOAT, "float", false, Op_RegF }, // FloatBot + { DoubleBot, T_DOUBLE, "double_top", false, Op_RegD }, // DoubleTop + { DoubleCon, T_DOUBLE, "dblcon:", false, Op_RegD }, // DoubleCon + { DoubleTop, T_DOUBLE, "double", false, Op_RegD }, // DoubleBot + { Top, T_ILLEGAL, "bottom", false, 0 } // Bottom }; // Map ideal registers (machine types) to ideal types @@ -235,7 +235,7 @@ const Type* Type::get_typeflow_type(ciType* type) { case T_ADDRESS: assert(type->is_return_address(), ""); - return TypeRawPtr::make((address)(intptr_t)type->as_return_address()->bci()); + return TypeRawPtr::make((address)(intptr_t)type->as_return_address()->bci(), relocInfo::none); default: // make sure we did not mix up the cases: @@ -704,7 +704,7 @@ void Type::Initialize_shared(Compile* current) { // get_zero_type() should not happen for T_CONFLICT _zero_type[T_CONFLICT]= nullptr; - TypeVect::VECTMASK = (TypeVect*)(new TypeVectMask(T_BOOLEAN, MaxVectorSize))->hashcons(); + TypeVect::VECTMASK = (TypeVect*)(new TypePVectMask(T_BOOLEAN, MaxVectorSize))->hashcons(); mreg2type[Op_RegVectMask] = TypeVect::VECTMASK; if (Matcher::supports_scalable_vector()) { @@ -2369,7 +2369,7 @@ const TypePtr* TypePtr::with_inline_depth(int depth) const { if (!UseInlineDepthForSpeculativeTypes) { return this; } - return make(AnyPtr, _ptr, _offset, _speculative, depth); + return make(AnyPtr, _ptr, _offset, _speculative, depth, _reloc); } //------------------------------dump2------------------------------------------ @@ -2466,7 +2466,7 @@ const TypeVect* TypeVect::make(BasicType elem_bt, uint length, bool is_mask) { } // Create a vector mask type with the given element basic type and length. -// - Returns "TypeVectMask" (PVectMask) for platforms that support the predicate +// - Returns "TypePVectMask" (PVectMask) for platforms that support the predicate // feature and it is implemented properly in the backend, allowing the mask to // be stored in a predicate/mask register. // - Returns a normal vector type "TypeVectA ~ TypeVectZ" (NVectMask) otherwise, @@ -2474,7 +2474,7 @@ const TypeVect* TypeVect::make(BasicType elem_bt, uint length, bool is_mask) { const TypeVect* TypeVect::makemask(BasicType elem_bt, uint length) { if (Matcher::has_predicated_vectors() && Matcher::match_rule_supported_vector_masked(Op_VectorLoadMask, length, elem_bt)) { - return TypeVectMask::make(elem_bt, length); + return TypePVectMask::make(elem_bt, length); } else { return make(elem_bt, length); } @@ -2574,8 +2574,8 @@ void TypeVect::dump2(Dict& d, uint depth, outputStream* st) const { } #endif -const TypeVectMask* TypeVectMask::make(const BasicType elem_bt, uint length) { - return (TypeVectMask*) (new TypeVectMask(elem_bt, length))->hashcons(); +const TypePVectMask* TypePVectMask::make(const BasicType elem_bt, uint length) { + return (TypePVectMask*) (new TypePVectMask(elem_bt, length))->hashcons(); } //============================================================================= @@ -2597,15 +2597,17 @@ const TypePtr::PTR TypePtr::ptr_meet[TypePtr::lastPTR][TypePtr::lastPTR] = { }; //------------------------------make------------------------------------------- -const TypePtr *TypePtr::make(TYPES t, enum PTR ptr, int offset, const TypePtr* speculative, int inline_depth) { - return (TypePtr*)(new TypePtr(t,ptr,offset, speculative, inline_depth))->hashcons(); +const TypePtr* TypePtr::make(TYPES t, enum PTR ptr, int offset, + const TypePtr* speculative, int inline_depth, + relocInfo::relocType reloc) { + return (TypePtr*)(new TypePtr(t, ptr, offset, reloc, speculative, inline_depth))->hashcons(); } //------------------------------cast_to_ptr_type------------------------------- const TypePtr* TypePtr::cast_to_ptr_type(PTR ptr) const { assert(_base == AnyPtr, "subclass must override cast_to_ptr_type"); if( ptr == _ptr ) return this; - return make(_base, ptr, _offset, _speculative, _inline_depth); + return make(_base, ptr, _offset, _speculative, _inline_depth, _reloc); } //------------------------------get_con---------------------------------------- @@ -2707,7 +2709,7 @@ const TypePtr::PTR TypePtr::ptr_dual[TypePtr::lastPTR] = { BotPTR, NotNull, Constant, Null, AnyNull, TopPTR }; const Type *TypePtr::xdual() const { - return new TypePtr(AnyPtr, dual_ptr(), dual_offset(), dual_speculative(), dual_inline_depth()); + return new TypePtr(AnyPtr, dual_ptr(), dual_offset(), relocInfo::none, dual_speculative(), dual_inline_depth()); } //------------------------------xadd_offset------------------------------------ @@ -2728,24 +2730,25 @@ int TypePtr::xadd_offset( intptr_t offset ) const { //------------------------------add_offset------------------------------------- const TypePtr *TypePtr::add_offset( intptr_t offset ) const { - return make(AnyPtr, _ptr, xadd_offset(offset), _speculative, _inline_depth); + return make(AnyPtr, _ptr, xadd_offset(offset), _speculative, _inline_depth, _reloc); } const TypePtr *TypePtr::with_offset(intptr_t offset) const { - return make(AnyPtr, _ptr, offset, _speculative, _inline_depth); + return make(AnyPtr, _ptr, offset, _speculative, _inline_depth, _reloc); } //------------------------------eq--------------------------------------------- // Structural equality check for Type representations bool TypePtr::eq( const Type *t ) const { const TypePtr *a = (const TypePtr*)t; - return _ptr == a->ptr() && _offset == a->offset() && eq_speculative(a) && _inline_depth == a->_inline_depth; + return _ptr == a->ptr() && _offset == a->offset() && _reloc == a->reloc() && + eq_speculative(a) && _inline_depth == a->_inline_depth; } //------------------------------hash------------------------------------------- // Type-specific hashing function. uint TypePtr::hash(void) const { - return (uint)_ptr + (uint)_offset + (uint)hash_speculative() + (uint)_inline_depth; + return (uint)_ptr + (uint)_offset + (uint)_reloc + (uint)hash_speculative() + (uint)_inline_depth; } /** @@ -2756,7 +2759,7 @@ const TypePtr* TypePtr::remove_speculative() const { return this; } assert(_inline_depth == InlineDepthTop || _inline_depth == InlineDepthBottom, "non speculative type shouldn't have inline depth"); - return make(AnyPtr, _ptr, _offset, nullptr, _inline_depth); + return make(AnyPtr, _ptr, _offset, nullptr, _inline_depth, _reloc); } /** @@ -3071,12 +3074,12 @@ const TypeRawPtr *TypeRawPtr::NOTNULL; const TypeRawPtr *TypeRawPtr::make( enum PTR ptr ) { assert( ptr != Constant, "what is the constant?" ); assert( ptr != Null, "Use TypePtr for null" ); - return (TypeRawPtr*)(new TypeRawPtr(ptr,nullptr))->hashcons(); + return (TypeRawPtr*)(new TypeRawPtr(ptr, nullptr, relocInfo::none))->hashcons(); } -const TypeRawPtr *TypeRawPtr::make(address bits) { +const TypeRawPtr* TypeRawPtr::make(address bits, relocInfo::relocType reloc) { assert(bits != nullptr, "Use TypePtr for null"); - return (TypeRawPtr*)(new TypeRawPtr(Constant,bits))->hashcons(); + return (TypeRawPtr*)(new TypeRawPtr(Constant, bits, reloc))->hashcons(); } //------------------------------cast_to_ptr_type------------------------------- @@ -3151,7 +3154,7 @@ const Type *TypeRawPtr::xmeet( const Type *t ) const { //------------------------------xdual------------------------------------------ // Dual: compute field-by-field dual const Type *TypeRawPtr::xdual() const { - return new TypeRawPtr( dual_ptr(), _bits ); + return new TypeRawPtr(dual_ptr(), _bits, _reloc); } //------------------------------add_offset------------------------------------- @@ -3174,7 +3177,7 @@ const TypePtr* TypeRawPtr::add_offset(intptr_t offset) const { } else if ( sum == 0 ) { return TypePtr::NULL_PTR; } else { - return make( (address)sum ); + return make((address)sum, _reloc); } } default: ShouldNotReachHere(); @@ -3469,7 +3472,7 @@ bool TypeInterfaces::has_non_array_interface() const { //------------------------------TypeOopPtr------------------------------------- TypeOopPtr::TypeOopPtr(TYPES t, PTR ptr, ciKlass* k, const TypeInterfaces* interfaces, bool xk, ciObject* o, int offset, int instance_id, const TypePtr* speculative, int inline_depth) - : TypePtr(t, ptr, offset, speculative, inline_depth), + : TypePtr(t, ptr, offset, relocInfo::oop_type, speculative, inline_depth), _const_oop(o), _klass(k), _interfaces(interfaces), _klass_is_exact(xk), @@ -4066,29 +4069,6 @@ const TypeInterfaces* TypePtr::interfaces(ciKlass*& k, bool klass, bool interfac return TypeAryPtr::_array_interfaces; } -/** - * Create constant type for a constant boxed value - */ -const Type* TypeInstPtr::get_const_boxed_value() const { - assert(is_ptr_to_boxed_value(), "should be called only for boxed value"); - assert((const_oop() != nullptr), "should be called only for constant object"); - ciConstant constant = const_oop()->as_instance()->field_value_by_offset(offset()); - BasicType bt = constant.basic_type(); - switch (bt) { - case T_BOOLEAN: return TypeInt::make(constant.as_boolean()); - case T_INT: return TypeInt::make(constant.as_int()); - case T_CHAR: return TypeInt::make(constant.as_char()); - case T_BYTE: return TypeInt::make(constant.as_byte()); - case T_SHORT: return TypeInt::make(constant.as_short()); - case T_FLOAT: return TypeF::make(constant.as_float()); - case T_DOUBLE: return TypeD::make(constant.as_double()); - case T_LONG: return TypeLong::make(constant.as_long()); - default: break; - } - fatal("Invalid boxed value type '%s'", type2name(bt)); - return nullptr; -} - //------------------------------cast_to_ptr_type------------------------------- const TypeInstPtr* TypeInstPtr::cast_to_ptr_type(PTR ptr) const { if( ptr == _ptr ) return this; @@ -5513,7 +5493,7 @@ void TypeMetadataPtr::dump2( Dict &d, uint depth, outputStream *st ) const { const TypeMetadataPtr *TypeMetadataPtr::BOTTOM; TypeMetadataPtr::TypeMetadataPtr(PTR ptr, ciMetadata* metadata, int offset): - TypePtr(MetadataPtr, ptr, offset), _metadata(metadata) { + TypePtr(MetadataPtr, ptr, offset, relocInfo::metadata_type), _metadata(metadata) { } const TypeMetadataPtr* TypeMetadataPtr::make(ciMethod* m) { @@ -5561,7 +5541,7 @@ const TypeKlassPtr* TypeKlassPtr::make(PTR ptr, ciKlass* klass, int offset, Inte //------------------------------TypeKlassPtr----------------------------------- TypeKlassPtr::TypeKlassPtr(TYPES t, PTR ptr, ciKlass* klass, const TypeInterfaces* interfaces, int offset) - : TypePtr(t, ptr, offset), _klass(klass), _interfaces(interfaces) { + : TypePtr(t, ptr, offset, relocInfo::metadata_type), _klass(klass), _interfaces(interfaces) { assert(klass == nullptr || !klass->is_loaded() || (klass->is_instance_klass() && !klass->is_interface()) || klass->is_type_array_klass() || !klass->as_obj_array_klass()->base_element_klass()->is_interface(), "no interface here"); } diff --git a/src/hotspot/share/opto/type.hpp b/src/hotspot/share/opto/type.hpp index 135f37f7267..728b7af9c24 100644 --- a/src/hotspot/share/opto/type.hpp +++ b/src/hotspot/share/opto/type.hpp @@ -63,7 +63,7 @@ class TypeVectD; class TypeVectX; class TypeVectY; class TypeVectZ; -class TypeVectMask; +class TypePVectMask; class TypePtr; class TypeRawPtr; class TypeOopPtr; @@ -157,7 +157,6 @@ private: const char* msg; bool isa_oop; uint ideal_reg; - relocInfo::relocType reloc; } TypeInfo; // Dictionary of types shared among compilations. @@ -313,8 +312,8 @@ public: const TypeAry *isa_ary() const; // Returns null of not ary const TypeVect *is_vect() const; // Vector const TypeVect *isa_vect() const; // Returns null if not a Vector - const TypeVectMask *is_vectmask() const; // Predicate/Mask Vector - const TypeVectMask *isa_vectmask() const; // Returns null if not a Vector Predicate/Mask + const TypePVectMask *is_pvectmask() const; // Predicate/Mask Vector + const TypePVectMask *isa_pvectmask() const; // Returns null if not a Vector Predicate/Mask const TypePtr *is_ptr() const; // Asserts it is a ptr type const TypePtr *isa_ptr() const; // Returns null if not ptr type const TypeRawPtr *isa_rawptr() const; // NOT Java oop @@ -459,7 +458,6 @@ public: uint ideal_reg() const { return _type_info[_base].ideal_reg; } const char* msg() const { return _type_info[_base].msg; } bool isa_oop_ptr() const { return _type_info[_base].isa_oop; } - relocInfo::relocType reloc() const { return _type_info[_base].reloc; } // Mapping from CI type system to compiler type: static const Type* get_typeflow_type(ciType* type); @@ -1108,14 +1106,14 @@ class TypeVectZ : public TypeVect { TypeVectZ(BasicType elem_bt, uint length) : TypeVect(VectorZ, elem_bt, length) {} }; -// Class of TypeVectMask, representing vector masks with "PVectMask" layout (see +// Class of TypePVectMask, representing vector masks with "PVectMask" layout (see // vectornode.hpp for detailed notes on vector mask representations), mapped to // dedicated hardware predicate/mask registers. -class TypeVectMask : public TypeVect { +class TypePVectMask : public TypeVect { public: friend class TypeVect; - TypeVectMask(BasicType elem_bt, uint length) : TypeVect(VectorMask, elem_bt, length) {} - static const TypeVectMask* make(const BasicType elem_bt, uint length); + TypePVectMask(BasicType elem_bt, uint length) : TypeVect(VectorMask, elem_bt, length) {} + static const TypePVectMask* make(const BasicType elem_bt, uint length); }; // Set of implemented interfaces. Referenced from TypeOopPtr and TypeKlassPtr. @@ -1176,10 +1174,11 @@ public: enum PTR { TopPTR, AnyNull, Constant, Null, NotNull, BotPTR, lastPTR }; protected: TypePtr(TYPES t, PTR ptr, int offset, + relocInfo::relocType reloc, const TypePtr* speculative = nullptr, int inline_depth = InlineDepthBottom) : Type(t), _speculative(speculative), _inline_depth(inline_depth), _offset(offset), - _ptr(ptr) {} + _ptr(ptr), _reloc(reloc) {} static const PTR ptr_meet[lastPTR][lastPTR]; static const PTR ptr_dual[lastPTR]; static const char * const ptr_msg[lastPTR]; @@ -1247,13 +1246,16 @@ protected: public: const int _offset; // Offset into oop, with TOP & BOT const PTR _ptr; // Pointer equivalence class + const relocInfo::relocType _reloc; int offset() const { return _offset; } PTR ptr() const { return _ptr; } + relocInfo::relocType reloc() const { return _reloc; } static const TypePtr *make(TYPES t, PTR ptr, int offset, const TypePtr* speculative = nullptr, - int inline_depth = InlineDepthBottom); + int inline_depth = InlineDepthBottom, + relocInfo::relocType reloc = relocInfo::none); // Return a 'ptr' version of this type virtual const TypePtr* cast_to_ptr_type(PTR ptr) const; @@ -1316,15 +1318,15 @@ public: // include the stack pointer, top of heap, card-marking area, handles, etc. class TypeRawPtr : public TypePtr { protected: - TypeRawPtr( PTR ptr, address bits ) : TypePtr(RawPtr,ptr,0), _bits(bits){} + TypeRawPtr(PTR ptr, address bits, relocInfo::relocType reloc) : TypePtr(RawPtr, ptr, 0, reloc), _bits(bits){} public: virtual bool eq( const Type *t ) const; virtual uint hash() const; // Type specific hashing const address _bits; // Constant value, if applicable - static const TypeRawPtr *make( PTR ptr ); - static const TypeRawPtr *make( address bits ); + static const TypeRawPtr* make(PTR ptr); + static const TypeRawPtr* make(address bits, relocInfo::relocType reloc = relocInfo::external_word_type); // Return a 'ptr' version of this type virtual const TypeRawPtr* cast_to_ptr_type(PTR ptr) const; @@ -1586,9 +1588,6 @@ public: return make(ptr, k, interfaces, xk, o, offset, instance_id); } - /** Create constant type for a constant boxed value */ - const Type* get_const_boxed_value() const; - // If this is a java.lang.Class constant, return the type for it or null. // Pass to Type::get_const_type to turn it to a type, which will usually // be a TypeInstPtr, but may also be a TypeInt::INT for int.class, etc. @@ -2305,13 +2304,13 @@ inline const TypeAry *Type::isa_ary() const { return ((_base == Array) ? (TypeAry*)this : nullptr); } -inline const TypeVectMask *Type::is_vectmask() const { +inline const TypePVectMask *Type::is_pvectmask() const { assert( _base == VectorMask, "Not a Vector Mask" ); - return (TypeVectMask*)this; + return (TypePVectMask*)this; } -inline const TypeVectMask *Type::isa_vectmask() const { - return (_base == VectorMask) ? (TypeVectMask*)this : nullptr; +inline const TypePVectMask *Type::isa_pvectmask() const { + return (_base == VectorMask) ? (TypePVectMask*)this : nullptr; } inline const TypeVect *Type::is_vect() const { diff --git a/src/hotspot/share/opto/vector.cpp b/src/hotspot/share/opto/vector.cpp index d35717c5922..f9fa02317bc 100644 --- a/src/hotspot/share/opto/vector.cpp +++ b/src/hotspot/share/opto/vector.cpp @@ -365,7 +365,7 @@ Node* PhaseVector::expand_vbox_alloc_node(VectorBoxAllocateNode* vbox_alloc, // If boxed mask value is present in a predicate register, it must be // spilled to a vector though a VectorStoreMaskOperation before actual StoreVector // operation to vector payload field. - if (is_mask && (value->bottom_type()->isa_vectmask() || bt != T_BOOLEAN)) { + if (is_mask && (value->bottom_type()->isa_pvectmask() || bt != T_BOOLEAN)) { value = gvn.transform(VectorStoreMaskNode::make(gvn, value, bt, num_elem)); // Although type of mask depends on its definition, in terms of storage everything is stored in boolean array. bt = T_BOOLEAN; diff --git a/src/hotspot/share/opto/vectorIntrinsics.cpp b/src/hotspot/share/opto/vectorIntrinsics.cpp index 7fc06db4b78..f5162c4bb2f 100644 --- a/src/hotspot/share/opto/vectorIntrinsics.cpp +++ b/src/hotspot/share/opto/vectorIntrinsics.cpp @@ -1645,7 +1645,7 @@ bool LibraryCallKit::inline_vector_test() { Node* opd1 = unbox_vector(argument(4), vbox_type, elem_bt, num_elem); Node* opd2; if (Matcher::vectortest_needs_second_argument(booltest == BoolTest::overflow, - opd1->bottom_type()->isa_vectmask())) { + opd1->bottom_type()->isa_pvectmask())) { opd2 = unbox_vector(argument(5), vbox_type, elem_bt, num_elem); } else { opd2 = opd1; @@ -1656,7 +1656,7 @@ bool LibraryCallKit::inline_vector_test() { Node* cmp = gvn().transform(trace_vector(new VectorTestNode(opd1, opd2, booltest))); BoolTest::mask test = Matcher::vectortest_mask(booltest == BoolTest::overflow, - opd1->bottom_type()->isa_vectmask(), num_elem); + opd1->bottom_type()->isa_pvectmask(), num_elem); Node* bol = gvn().transform(new BoolNode(cmp, test)); Node* res = gvn().transform(new CMoveINode(bol, gvn().intcon(0), gvn().intcon(1), TypeInt::BOOL)); @@ -2421,8 +2421,8 @@ bool LibraryCallKit::inline_vector_convert() { // where certain masks (depending on the species) are either propagated // through a vector or predicate register. if (is_mask && - ((src_type->isa_vectmask() == nullptr && dst_type->isa_vectmask()) || - (dst_type->isa_vectmask() == nullptr && src_type->isa_vectmask()))) { + ((src_type->isa_pvectmask() == nullptr && dst_type->isa_pvectmask()) || + (dst_type->isa_pvectmask() == nullptr && src_type->isa_pvectmask()))) { return false; } diff --git a/src/hotspot/share/opto/vectornode.cpp b/src/hotspot/share/opto/vectornode.cpp index d19aa476196..a54fe6e3a73 100644 --- a/src/hotspot/share/opto/vectornode.cpp +++ b/src/hotspot/share/opto/vectornode.cpp @@ -22,10 +22,12 @@ */ #include "memory/allocation.inline.hpp" +#include "opto/addnode.hpp" #include "opto/c2_globals.hpp" #include "opto/compile.hpp" #include "opto/connode.hpp" #include "opto/convertnode.hpp" +#include "opto/divnode.hpp" #include "opto/mulnode.hpp" #include "opto/subnode.hpp" #include "opto/vectornode.hpp" @@ -290,7 +292,146 @@ int VectorNode::opcode(int sopc, BasicType bt) { assert(!VectorNode::is_convert_opcode(sopc), "Convert node %s should be processed by VectorCastNode::opcode()", NodeClassNames[sopc]); - return 0; // Unimplemented + return 0; // not handled + } +} + +// Return the scalar opcode for the specified vector opcode and basic type. +// Returns 0 if not handled. +int VectorNode::scalar_opcode(int vopc, BasicType bt) { + switch (vopc) { + case Op_AddVB: + case Op_AddVS: + case Op_AddVI: + return Op_AddI; + case Op_AddVL: + return Op_AddL; + case Op_AddVF: + return Op_AddF; + case Op_AddVD: + return Op_AddD; + + case Op_SubVB: + case Op_SubVS: + case Op_SubVI: + return Op_SubI; + case Op_SubVL: + return Op_SubL; + case Op_SubVF: + return Op_SubF; + case Op_SubVD: + return Op_SubD; + + case Op_MulVB: + case Op_MulVS: + case Op_MulVI: + return Op_MulI; + case Op_MulVL: + return Op_MulL; + case Op_MulVF: + return Op_MulF; + case Op_MulVD: + return Op_MulD; + + case Op_DivVF: + return Op_DivF; + case Op_DivVD: + return Op_DivD; + + case Op_AndV: + switch (bt) { + case T_BOOLEAN: + case T_CHAR: + case T_BYTE: + case T_SHORT: + case T_INT: + return Op_AndI; + case T_LONG: + return Op_AndL; + default: + return 0; + } + + case Op_OrV: + switch (bt) { + case T_BOOLEAN: + case T_CHAR: + case T_BYTE: + case T_SHORT: + case T_INT: + return Op_OrI; + case T_LONG: + return Op_OrL; + default: + return 0; + } + + case Op_XorV: + switch (bt) { + case T_BOOLEAN: + case T_CHAR: + case T_BYTE: + case T_SHORT: + case T_INT: + return Op_XorI; + case T_LONG: + return Op_XorL; + default: + return 0; + } + + case Op_MinV: + switch (bt) { + case T_BOOLEAN: + case T_CHAR: + // unsigned, not supported for Min + return 0; + case T_BYTE: + case T_SHORT: + case T_INT: + return Op_MinI; + case T_LONG: + return Op_MinL; + case T_FLOAT: + return Op_MinF; + case T_DOUBLE: + return Op_MinD; + default: + return 0; + } + + case Op_MaxV: + switch (bt) { + case T_BOOLEAN: + case T_CHAR: + // unsigned, not supported for Max + return 0; + case T_BYTE: + case T_SHORT: + case T_INT: + return Op_MaxI; + case T_LONG: + return Op_MaxL; + case T_FLOAT: + return Op_MaxF; + case T_DOUBLE: + return Op_MaxD; + default: + return 0; + } + + case Op_SqrtVD: + return Op_SqrtD; + case Op_SqrtVF: + return Op_SqrtF; + + case Op_FmaVF: + return Op_FmaF; + case Op_FmaVD: + return Op_FmaD; + + default: + return 0; // not handled } } @@ -984,17 +1125,9 @@ static Node* ideal_partial_operations(PhaseGVN* phase, Node* node, const TypeVec } } -bool VectorNode::should_swap_inputs_to_help_global_value_numbering() { - // Predicated vector operations are sensitive to ordering of inputs. - // When the mask corresponding to a vector lane is false then - // the result of the operation is corresponding lane of its first operand. - // i.e. RES = VEC1.lanewise(OPER, VEC2, MASK) is semantically equivalent to - // RES = BLEND(VEC1, VEC1.lanewise(OPER, VEC2), MASK) - if (is_predicated_vector()) { - return false; - } - - switch(Opcode()) { +// Check if the vector operation is commutative (assuming that it is not predicated/masked). +static bool is_commutative_vector_operation(int opcode) { + switch(opcode) { case Op_AddVB: case Op_AddVS: case Op_AddVI: @@ -1022,18 +1155,228 @@ bool VectorNode::should_swap_inputs_to_help_global_value_numbering() { case Op_XorVMask: case Op_SaturatingAddV: - assert(req() == 3, "Must be a binary operation"); - // For non-predicated commutative operations, sort the inputs in - // increasing order of node indices. - if (in(1)->_idx > in(2)->_idx) { - return true; - } - // fallthrough + return true; default: return false; } } +bool VectorNode::should_swap_inputs_to_help_global_value_numbering() { + // Predicated vector operations are sensitive to ordering of inputs. + // When the mask corresponding to a vector lane is false then + // the result of the operation is corresponding lane of its first operand. + // i.e. RES = VEC1.lanewise(OPER, VEC2, MASK) is semantically equivalent to + // RES = BLEND(VEC1, VEC1.lanewise(OPER, VEC2), MASK) + if (is_predicated_vector()) { + return false; + } + + if (is_commutative_vector_operation(Opcode())) { + assert(req() == 3, "Must be a binary operation"); + // For non-predicated commutative operations, sort the inputs in + // increasing order of node indices. + if (in(1)->_idx > in(2)->_idx) { + return true; + } + } + + return false; +} + +// Check whether we can push this vector op through replicate (all inputs are Replicate). +bool VectorNode::can_push_through_replicate(BasicType bt) { + if (scalar_opcode(Opcode(), bt) == 0) { + return false; + } + + // Skip over predicated vector operations for now, for masked lanes we preserve + // destination/first source vector contents. + if (is_predicated_vector()) { + return false; + } + + for (uint i = 1; i < req(); i++) { + if (in(i)->Opcode() != Op_Replicate) { + return false; + } + } + return true; +} + +Node* VectorNode::make_scalar(Compile* c, int vopc, BasicType bt, Node* control, Node* in1, Node* in2, Node* in3) { + int sopc = scalar_opcode(vopc, bt); + assert(sopc != 0, "unhandled vector opcode %s", NodeClassNames[vopc]); + assert(opcode(sopc, bt) == vopc, "scalar_opcode and opcode must agree for %s", NodeClassNames[vopc]); + switch (sopc) { + case Op_AddI: + return new AddINode(in1, in2); + case Op_AddL: + return new AddLNode(in1, in2); + case Op_AddF: + return new AddFNode(in1, in2); + case Op_AddD: + return new AddDNode(in1, in2); + case Op_MulI: + return new MulINode(in1, in2); + case Op_MulL: + return new MulLNode(in1, in2); + case Op_MulF: + return new MulFNode(in1, in2); + case Op_MulD: + return new MulDNode(in1, in2); + case Op_AndI: + return new AndINode(in1, in2); + case Op_AndL: + return new AndLNode(in1, in2); + case Op_DivF: + return new DivFNode(control, in1, in2); + case Op_DivD: + return new DivDNode(control, in1, in2); + case Op_OrI: + return new OrINode(in1, in2); + case Op_OrL: + return new OrLNode(in1, in2); + case Op_XorI: + return new XorINode(in1, in2); + case Op_XorL: + return new XorLNode(in1, in2); + case Op_SubI: + return new SubINode(in1, in2); + case Op_SubL: + return new SubLNode(in1, in2); + case Op_SubF: + return new SubFNode(in1, in2); + case Op_SubD: + return new SubDNode(in1, in2); + case Op_MinI: + return new MinINode(in1, in2); + case Op_MinL: + return new MinLNode(c, in1, in2); + case Op_MinF: + return new MinFNode(in1, in2); + case Op_MinD: + return new MinDNode(in1, in2); + case Op_MaxI: + return new MaxINode(in1, in2); + case Op_MaxL: + return new MaxLNode(c, in1, in2); + case Op_MaxF: + return new MaxFNode(in1, in2); + case Op_MaxD: + return new MaxDNode(in1, in2); + case Op_SqrtF: + return new SqrtFNode(c, control, in1); + case Op_SqrtD: + return new SqrtDNode(c, control, in1); + case Op_FmaF: + return new FmaFNode(in1, in2, in3); + case Op_FmaD: + return new FmaDNode(in1, in2, in3); + default: + assert(false, "unexpected scalar opcode"); + return nullptr; + } +} + +// Re-wires and creates a new ideal graph pallet with following connectivity +// parent(child(cinput1, cinput2), pinput2) +Node* VectorNode::create_reassociated_node(Node* parent, Node* child, Node* cinput1, Node* cinput2, + Node* pinput2, PhaseGVN* phase) { + Node* cloned_child = child->clone(); + cloned_child->set_req(1, cinput1); + cloned_child->set_req(2, cinput2); + cloned_child = phase->transform(cloned_child); + Node* cloned_parent = parent->clone(); + cloned_parent->set_req(1, cloned_child); + cloned_parent->set_req(2, pinput2); + return cloned_parent; +} + +// Try to reassociate commutative vector operations using the following ideal transformation, +// this will facilitate strength reducing a vector operation with all replicated inputs to +// a scalar operation. +// +// VectorOp (Replicate INP1) (VectorOp (Replicate INP2) INP3) => +// VectorOp (VectorOp (Replicate INP1) (Replicate INP2)) INP3 +// +Node* VectorNode::reassociate_vector_operation(PhaseGVN* phase) { + // Enable re-association for integral vector operations. + if (!is_integral_type(vect_type()->element_basic_type())) { + return nullptr; + } + + // Enable re-association for commutative vector operations. + if (!is_commutative_vector_operation(Opcode())) { + return nullptr; + } + + Node* in1 = in(1); + Node* in2 = in(2); + if (in2->Opcode() == Op_Replicate && in1->Opcode() == Opcode()) { + swap(in1, in2); + } + + if (in1->Opcode() != Op_Replicate || in2->Opcode() != Opcode()) { + return nullptr; + } + + // Skip predicated vector operations, mask semantics prevent reassociation. + if (is_predicated_vector() || in2->as_Vector()->is_predicated_vector()) { + return nullptr; + } + + Node* in2_1 = in2->in(1); + Node* in2_2 = in2->in(2); + if (in2_1->Opcode() == Op_Replicate) { + return create_reassociated_node(this, in2, in1, in2_1, in2_2, phase); + } else if (in2_2->Opcode() == Op_Replicate) { + return create_reassociated_node(this, in2, in1, in2_2, in2_1, phase); + } + + return nullptr; +} + +// Convert vector operation with all Replicate inputs to scalar operation using following +// ideal transformation. +// +// VectorOp (Replicate INP1, Replicate INP2) => +// Replicate (ScalarOp INP1, INP2) +// +Node* VectorNode::push_through_replicate(PhaseGVN* phase) { + BasicType bt = vect_type()->element_basic_type(); + if (!can_push_through_replicate(bt)) { + return nullptr; + } + + assert(req() >= 2 && req() <= 4, "unexpected req() %u for %s", req(), NodeClassNames[Opcode()]); + + Node* sinp1 = nullptr; + Node* sinp2 = nullptr; + Node* sinp3 = nullptr; + + assert(in(1)->Opcode() == Op_Replicate, ""); + sinp1 = in(1)->in(1); + + if (req() > 2) { + assert(in(2)->Opcode() == Op_Replicate, ""); + sinp2 = in(2)->in(1); + } + + if (req() > 3) { + assert(in(3)->Opcode() == Op_Replicate, ""); + sinp3 = in(3)->in(1); + } + + Node* sop = make_scalar(phase->C, Opcode(), bt, in(0), sinp1, sinp2, sinp3); + if (sop == nullptr) { + return nullptr; + } + + sop = phase->transform(sop); + + return new ReplicateNode(sop, vect_type()); +} + Node* VectorNode::Ideal(PhaseGVN* phase, bool can_reshape) { Node* n = ideal_partial_operations(phase, this, vect_type()); if (n != nullptr) { @@ -1044,7 +1387,13 @@ Node* VectorNode::Ideal(PhaseGVN* phase, bool can_reshape) { if (should_swap_inputs_to_help_global_value_numbering()) { swap_edges(1, 2); } - return nullptr; + + n = push_through_replicate(phase); + if (n != nullptr) { + return n; + } + + return reassociate_vector_operation(phase); } // Traverses a chain of VectorMaskCast and returns the first non VectorMaskCast node. @@ -1485,7 +1834,7 @@ static Node* convertFromLongToMaskAll(PhaseGVN* phase, const TypeLong* bits_type } else { con = phase->intcon(con_value); } - Node* res = VectorNode::scalar2vector(con, vlen, maskall_bt, vt->isa_vectmask() != nullptr); + Node* res = VectorNode::scalar2vector(con, vlen, maskall_bt, vt->isa_pvectmask() != nullptr); // Convert back to the original floating-point data type. if (is_floating_point_type(bt)) { res = new VectorMaskCastNode(phase->transform(res), vt); @@ -1752,7 +2101,7 @@ MacroLogicVNode* MacroLogicVNode::make(PhaseGVN& gvn, Node* in1, Node* in2, Node assert(in1->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch"); assert(in2->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch"); assert(in3->bottom_type()->is_vect()->length_in_bytes() == vt->length_in_bytes(), "mismatch"); - assert(!mask || mask->bottom_type()->isa_vectmask(), "predicated register type expected"); + assert(!mask || mask->bottom_type()->isa_pvectmask(), "predicated register type expected"); Node* fn = gvn.intcon(truth_table); return new MacroLogicVNode(in1, in2, in3, fn, mask, vt); } @@ -1962,7 +2311,7 @@ Node* VectorMaskGenNode::make(Node* length, BasicType mask_bt) { } Node* VectorMaskGenNode::make(Node* length, BasicType mask_bt, int mask_len) { - const TypeVectMask* t_vmask = TypeVectMask::make(mask_bt, mask_len); + const TypePVectMask* t_vmask = TypePVectMask::make(mask_bt, mask_len); return new VectorMaskGenNode(length, t_vmask); } @@ -2051,7 +2400,7 @@ Node* VectorMaskToLongNode::Identity(PhaseGVN* phase) { Node* VectorLongToMaskNode::Ideal(PhaseGVN* phase, bool can_reshape) { const TypeVect* dst_type = bottom_type()->is_vect(); uint vlen = dst_type->length(); - const TypeVectMask* is_mask = dst_type->isa_vectmask(); + const TypePVectMask* is_mask = dst_type->isa_pvectmask(); // Pattern: (VectorLongToMask (AndL (VectorMaskToLong src) mask)) // Replace with: (VectorMaskCast src) @@ -2065,7 +2414,7 @@ Node* VectorLongToMaskNode::Ideal(PhaseGVN* phase, bool can_reshape) { Node* src = in(1)->in(1)->in(1); const TypeVect* src_type = src->bottom_type()->is_vect(); if (src_type->length() == vlen && - ((src_type->isa_vectmask() == nullptr) == (is_mask == nullptr))) { + ((src_type->isa_pvectmask() == nullptr) == (is_mask == nullptr))) { return new VectorMaskCastNode(src, dst_type); } } @@ -2094,7 +2443,7 @@ Node* FmaVNode::Ideal(PhaseGVN* phase, bool can_reshape) { swap_edges(1, 2); return this; } - return nullptr; + return VectorNode::Ideal(phase, can_reshape); } // Generate other vector nodes to implement the masked/non-masked vector negation. @@ -2398,7 +2747,7 @@ Node* XorVNode::Ideal(PhaseGVN* phase, bool can_reshape) { if (!is_predicated_vector() && (in(1) == in(2))) { BasicType bt = vect_type()->element_basic_type(); Node* zero = phase->transform(phase->zerocon(bt)); - return VectorNode::scalar2vector(zero, length(), bt, bottom_type()->isa_vectmask() != nullptr); + return VectorNode::scalar2vector(zero, length(), bt, bottom_type()->isa_pvectmask() != nullptr); } Node* res = Ideal_XorV_VectorMaskCmp(phase, can_reshape); diff --git a/src/hotspot/share/opto/vectornode.hpp b/src/hotspot/share/opto/vectornode.hpp index 91cff9fcae8..6bcb7702d13 100644 --- a/src/hotspot/share/opto/vectornode.hpp +++ b/src/hotspot/share/opto/vectornode.hpp @@ -49,7 +49,7 @@ // // - PVectMask: Platform-specific mask stored in predicate/mask registers. Generated // on architectures with predicate/mask feature, such as AArch64 SVE, x86 AVX-512, -// and RISC-V Vector Extension (RVV). The corresponding type is TypeVectMask. +// and RISC-V Vector Extension (RVV). The corresponding type is TypePVectMask. // // NVectMask and PVectMask encode element data type and vector length information. // They are the primary mask representations used in most mask and masked vector @@ -146,12 +146,20 @@ class VectorNode : public TypeNode { static bool is_minmax_opcode(int opc); bool should_swap_inputs_to_help_global_value_numbering(); + Node* reassociate_vector_operation(PhaseGVN* phase); + static Node* create_reassociated_node(Node* parent, Node* child, Node* cinput1, Node* cinput2, + Node* pinput2, PhaseGVN* phase); static bool is_vshift_cnt_opcode(int opc); static bool is_rotate_opcode(int opc); static int opcode(int sopc, BasicType bt); // scalar_opc -> vector_opc + static int scalar_opcode(int vopc, BasicType bt); // vector_opc -> scalar_opc, 0 if not handled + static Node* make_scalar(Compile* c, int vopc, BasicType bt, Node* control, Node* in1, Node* in2, Node* in3); + + bool can_push_through_replicate(BasicType bt); + Node* push_through_replicate(PhaseGVN* phase); static int shift_count_opcode(int opc); @@ -1332,7 +1340,7 @@ class StoreVectorScatterMaskedNode : public StoreVectorNode { : StoreVectorNode(c, mem, adr, at, val) { init_class_id(Class_StoreVectorScatterMasked); assert(indices->bottom_type()->is_vect(), "indices must be in vector"); - assert(mask->bottom_type()->isa_vectmask(), "sanity"); + assert(mask->bottom_type()->isa_pvectmask(), "sanity"); add_req(indices); add_req(mask); assert(req() == MemNode::ValueIn + 3, "match_edge expects that last input is in MemNode::ValueIn+2"); @@ -1887,7 +1895,7 @@ class VectorMaskCastNode : public VectorNode { assert(in_vt->length() == vt->length(), "vector length must match"); assert((in_vt->element_basic_type() == T_BOOLEAN) == (vt->element_basic_type() == T_BOOLEAN), "Cast from/to BVectMask not allowed, use VectorLoadMask/VectorStoreMask instead"); - assert((in_vt->isa_vectmask() == nullptr) == (vt->isa_vectmask() == nullptr), + assert((in_vt->isa_pvectmask() == nullptr) == (vt->isa_pvectmask() == nullptr), "Both BVectMask, or both NVectMask, or both PVectMask"); } Node* Identity(PhaseGVN* phase); @@ -1904,7 +1912,7 @@ class VectorReinterpretNode : public VectorNode { public: VectorReinterpretNode(Node* in, const TypeVect* src_vt, const TypeVect* dst_vt) : VectorNode(in, dst_vt), _src_vt(src_vt) { - assert((!dst_vt->isa_vectmask() && !src_vt->isa_vectmask()) || + assert((!dst_vt->isa_pvectmask() && !src_vt->isa_pvectmask()) || (type2aelembytes(src_vt->element_basic_type()) >= type2aelembytes(dst_vt->element_basic_type())), "unsupported mask widening reinterpretation"); init_class_id(Class_VectorReinterpret); diff --git a/src/hotspot/share/prims/jni.cpp b/src/hotspot/share/prims/jni.cpp index 73082c6047d..318f40374a6 100644 --- a/src/hotspot/share/prims/jni.cpp +++ b/src/hotspot/share/prims/jni.cpp @@ -2835,6 +2835,10 @@ JNI_ENTRY(void*, jni_GetPrimitiveArrayCritical(JNIEnv *env, jarray array, jboole Handle a(thread, JNIHandles::resolve_non_null(array)); assert(a->is_typeArray(), "just checking"); + // We must defer JVM TI suspension while we have access to a Java object + // as it could surprise the debugger if we mutate it concurrently whilst + // logically suspended. + thread->enter_jni_deferred_suspension(); // Pin object Universe::heap()->pin_object(thread, a()); @@ -2852,6 +2856,7 @@ JNI_ENTRY(void, jni_ReleasePrimitiveArrayCritical(JNIEnv *env, jarray array, voi HOTSPOT_JNI_RELEASEPRIMITIVEARRAYCRITICAL_ENTRY(env, array, carray, mode); // Unpin object Universe::heap()->unpin_object(thread, JNIHandles::resolve_non_null(array)); + thread->exit_jni_deferred_suspension(); HOTSPOT_JNI_RELEASEPRIMITIVEARRAYCRITICAL_RETURN(); JNI_END @@ -2859,6 +2864,13 @@ JNI_END JNI_ENTRY(const jchar*, jni_GetStringCritical(JNIEnv *env, jstring string, jboolean *isCopy)) HOTSPOT_JNI_GETSTRINGCRITICAL_ENTRY(env, string, (uintptr_t *) isCopy); oop s = JNIHandles::resolve_non_null(string); + + // We must defer JVM TI suspension while we have access to a Java object. + // Even if we are taking a private copy we must not be considered + // suspended as the debugger could be mutating the string we are about + // to copy. + thread->enter_jni_deferred_suspension(); + jchar* ret; if (!java_lang_String::is_latin1(s)) { typeArrayHandle s_value(thread, java_lang_String::value(s)); @@ -2879,6 +2891,10 @@ JNI_ENTRY(const jchar*, jni_GetStringCritical(JNIEnv *env, jstring string, jbool ret[i] = ((jchar) s_value->byte_at(i)) & 0xff; } ret[s_len] = 0; + } else { + // If we return null there should not be a paired release operation + // so we have to cancel suspension deferral here. + thread->exit_jni_deferred_suspension(); } if (isCopy != nullptr) *isCopy = JNI_TRUE; } @@ -2895,7 +2911,7 @@ JNI_ENTRY(void, jni_ReleaseStringCritical(JNIEnv *env, jstring str, const jchar if (is_latin1) { // For latin1 string, free jchar array allocated by earlier call to GetStringCritical. // This assumes that ReleaseStringCritical bookends GetStringCritical. - FREE_C_HEAP_ARRAY(jchar, chars); + FREE_C_HEAP_ARRAY(chars); } else { // StringDedup can have replaced the value array, so don't fetch the array from 's'. // Instead, we calculate the address based on the jchar array exposed with GetStringCritical. @@ -2904,6 +2920,7 @@ JNI_ENTRY(void, jni_ReleaseStringCritical(JNIEnv *env, jstring str, const jchar // Unpin value array Universe::heap()->unpin_object(thread, value); } + thread->exit_jni_deferred_suspension(); HOTSPOT_JNI_RELEASESTRINGCRITICAL_RETURN(); JNI_END diff --git a/src/hotspot/share/prims/jvmtiAgent.cpp b/src/hotspot/share/prims/jvmtiAgent.cpp index 66cb68b44b0..5fe5378995b 100644 --- a/src/hotspot/share/prims/jvmtiAgent.cpp +++ b/src/hotspot/share/prims/jvmtiAgent.cpp @@ -247,7 +247,7 @@ static void vm_exit(const JvmtiAgent* agent, const char* sub_msg1, const char* s jio_snprintf(buf, len, "%s%s%s%s", not_found_error_msg, agent->name(), sub_msg1, &ebuf[0]); } vm_exit_during_initialization(buf, nullptr); - FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(buf); } #ifdef ASSERT diff --git a/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp b/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp index 5077a1743b9..3037ffa5063 100644 --- a/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp +++ b/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp @@ -955,7 +955,7 @@ address JvmtiClassFileReconstituter::writeable_address(size_t size) { * initial_buffer_size; // VM goes belly-up if the memory isn't available, so cannot do OOM processing - _buffer = REALLOC_RESOURCE_ARRAY(u1, _buffer, _buffer_size, new_buffer_size); + _buffer = REALLOC_RESOURCE_ARRAY(_buffer, _buffer_size, new_buffer_size); _buffer_size = new_buffer_size; _buffer_ptr = _buffer + used_size; } diff --git a/src/hotspot/share/prims/jvmtiExport.cpp b/src/hotspot/share/prims/jvmtiExport.cpp index fca348fda26..98d8cfd990d 100644 --- a/src/hotspot/share/prims/jvmtiExport.cpp +++ b/src/hotspot/share/prims/jvmtiExport.cpp @@ -1160,7 +1160,7 @@ class JvmtiCompiledMethodLoadEventMark : public JvmtiMethodEventMark { JvmtiCodeBlobEvents::build_jvmti_addr_location_map(nm, &_map, &_map_length); } ~JvmtiCompiledMethodLoadEventMark() { - FREE_C_HEAP_ARRAY(jvmtiAddrLocationMap, _map); + FREE_C_HEAP_ARRAY(_map); } jint code_size() { return _code_size; } diff --git a/src/hotspot/share/prims/jvmtiExtensions.cpp b/src/hotspot/share/prims/jvmtiExtensions.cpp index 855c7bd4eba..332d4655715 100644 --- a/src/hotspot/share/prims/jvmtiExtensions.cpp +++ b/src/hotspot/share/prims/jvmtiExtensions.cpp @@ -198,7 +198,7 @@ void JvmtiExtensions::register_extensions() { static jvmtiExtensionFunctionInfo ext_func0 = { (jvmtiExtensionFunction)IsClassUnloadingEnabled, (char*)"com.sun.hotspot.functions.IsClassUnloadingEnabled", - (char*)"Tell if class unloading is enabled (-noclassgc)", + (char*)"Tell if class unloading is enabled (-Xnoclassgc)", sizeof(func_params0)/sizeof(func_params0[0]), func_params0, 0, // no non-universal errors diff --git a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp index 8beddc5d406..a040812bc73 100644 --- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp +++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp @@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -4544,7 +4544,7 @@ void VM_RedefineClasses::dump_methods() { LogStreamHandle(Trace, redefine, class, dump) log_stream; Method* m = _old_methods->at(j); log_stream.print("%4d (%5d) ", j, m->vtable_index()); - m->access_flags().print_on(&log_stream); + m->print_access_flags(&log_stream); log_stream.print(" -- "); m->print_name(&log_stream); log_stream.cr(); @@ -4554,7 +4554,7 @@ void VM_RedefineClasses::dump_methods() { LogStreamHandle(Trace, redefine, class, dump) log_stream; Method* m = _new_methods->at(j); log_stream.print("%4d (%5d) ", j, m->vtable_index()); - m->access_flags().print_on(&log_stream); + m->print_access_flags(&log_stream); log_stream.print(" -- "); m->print_name(&log_stream); log_stream.cr(); @@ -4564,14 +4564,14 @@ void VM_RedefineClasses::dump_methods() { LogStreamHandle(Trace, redefine, class, dump) log_stream; Method* m = _matching_old_methods[j]; log_stream.print("%4d (%5d) ", j, m->vtable_index()); - m->access_flags().print_on(&log_stream); + m->print_access_flags(&log_stream); log_stream.print(" -- "); m->print_name(); log_stream.cr(); m = _matching_new_methods[j]; log_stream.print(" (%5d) ", m->vtable_index()); - m->access_flags().print_on(&log_stream); + m->print_access_flags(&log_stream); log_stream.cr(); } log_trace(redefine, class, dump)("_deleted_methods --"); @@ -4579,7 +4579,7 @@ void VM_RedefineClasses::dump_methods() { LogStreamHandle(Trace, redefine, class, dump) log_stream; Method* m = _deleted_methods[j]; log_stream.print("%4d (%5d) ", j, m->vtable_index()); - m->access_flags().print_on(&log_stream); + m->print_access_flags(&log_stream); log_stream.print(" -- "); m->print_name(&log_stream); log_stream.cr(); @@ -4589,7 +4589,7 @@ void VM_RedefineClasses::dump_methods() { LogStreamHandle(Trace, redefine, class, dump) log_stream; Method* m = _added_methods[j]; log_stream.print("%4d (%5d) ", j, m->vtable_index()); - m->access_flags().print_on(&log_stream); + m->print_access_flags(&log_stream); log_stream.print(" -- "); m->print_name(&log_stream); log_stream.cr(); diff --git a/src/hotspot/share/prims/jvmtiTagMap.cpp b/src/hotspot/share/prims/jvmtiTagMap.cpp index 04cb70863cd..9724a61ba3d 100644 --- a/src/hotspot/share/prims/jvmtiTagMap.cpp +++ b/src/hotspot/share/prims/jvmtiTagMap.cpp @@ -136,20 +136,6 @@ bool JvmtiTagMap::is_empty() { return hashmap()->is_empty(); } -// This checks for posting before operations that use -// this tagmap table. -void JvmtiTagMap::check_hashmap(GrowableArray* objects) { - assert(is_locked(), "checking"); - - if (is_empty()) { return; } - - if (_needs_cleaning && - objects != nullptr && - env()->is_enabled(JVMTI_EVENT_OBJECT_FREE)) { - remove_dead_entries_locked(objects); - } -} - // This checks for posting and is called from the heap walks. void JvmtiTagMap::check_hashmaps_for_heapwalk(GrowableArray* objects) { assert(SafepointSynchronize::is_at_safepoint(), "called from safepoints"); @@ -162,7 +148,7 @@ void JvmtiTagMap::check_hashmaps_for_heapwalk(GrowableArray* objects) { if (tag_map != nullptr) { // The ZDriver may be walking the hashmaps concurrently so this lock is needed. MutexLocker ml(tag_map->lock(), Mutex::_no_safepoint_check_flag); - tag_map->check_hashmap(objects); + tag_map->remove_dead_entries_locked(objects); } } } @@ -329,11 +315,6 @@ class TwoOopCallbackWrapper : public CallbackWrapper { void JvmtiTagMap::set_tag(jobject object, jlong tag) { MutexLocker ml(lock(), Mutex::_no_safepoint_check_flag); - // SetTag should not post events because the JavaThread has to - // transition to native for the callback and this cannot stop for - // safepoints with the hashmap lock held. - check_hashmap(nullptr); /* don't collect dead objects */ - // resolve the object oop o = JNIHandles::resolve_non_null(object); @@ -354,11 +335,6 @@ void JvmtiTagMap::set_tag(jobject object, jlong tag) { jlong JvmtiTagMap::get_tag(jobject object) { MutexLocker ml(lock(), Mutex::_no_safepoint_check_flag); - // GetTag should not post events because the JavaThread has to - // transition to native for the callback and this cannot stop for - // safepoints with the hashmap lock held. - check_hashmap(nullptr); /* don't collect dead objects */ - // resolve the object oop o = JNIHandles::resolve_non_null(object); @@ -716,7 +692,7 @@ static jint invoke_string_value_callback(jvmtiStringPrimitiveValueCallback cb, user_data); if (is_latin1 && s_len > 0) { - FREE_C_HEAP_ARRAY(jchar, value); + FREE_C_HEAP_ARRAY(value); } return res; } diff --git a/src/hotspot/share/prims/jvmtiTagMap.hpp b/src/hotspot/share/prims/jvmtiTagMap.hpp index 08ab52ed686..1401157911f 100644 --- a/src/hotspot/share/prims/jvmtiTagMap.hpp +++ b/src/hotspot/share/prims/jvmtiTagMap.hpp @@ -51,8 +51,6 @@ class JvmtiTagMap : public CHeapObj { // accessors inline JvmtiEnv* env() const { return _env; } - void check_hashmap(GrowableArray* objects); - void entry_iterate(JvmtiTagMapKeyClosure* closure); public: diff --git a/src/hotspot/share/prims/methodHandles.cpp b/src/hotspot/share/prims/methodHandles.cpp index 03cb98d8e75..99a58b09e75 100644 --- a/src/hotspot/share/prims/methodHandles.cpp +++ b/src/hotspot/share/prims/methodHandles.cpp @@ -267,7 +267,7 @@ oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info) { ls.print_cr("memberName: invokeinterface method_holder::method: %s, itableindex: %d, access_flags:", Method::name_and_sig_as_C_string(m->method_holder(), m->name(), m->signature()), vmindex); - m->access_flags().print_on(&ls); + m->print_access_flags(&ls); if (!m->is_abstract()) { if (!m->is_private()) { ls.print("default"); @@ -314,7 +314,7 @@ oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info) { ls.print_cr("memberName: invokevirtual method_holder::method: %s, receiver: %s, vtableindex: %d, access_flags:", Method::name_and_sig_as_C_string(m->method_holder(), m->name(), m->signature()), m_klass->internal_name(), vmindex); - m->access_flags().print_on(&ls); + m->print_access_flags(&ls); if (m->is_default_method()) { ls.print("default"); } diff --git a/src/hotspot/share/prims/scopedMemoryAccess.cpp b/src/hotspot/share/prims/scopedMemoryAccess.cpp index 26ae5bc03f5..792bf74afcf 100644 --- a/src/hotspot/share/prims/scopedMemoryAccess.cpp +++ b/src/hotspot/share/prims/scopedMemoryAccess.cpp @@ -31,11 +31,13 @@ #include "oops/access.inline.hpp" #include "oops/oop.inline.hpp" #include "prims/stackwalk.hpp" +#include "runtime/atomic.hpp" #include "runtime/deoptimization.hpp" #include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/vframe.inline.hpp" +#include "utilities/spinYield.hpp" template static void for_scoped_methods(JavaThread* jt, bool agents_loaded, const Func& func) { @@ -128,19 +130,37 @@ static frame get_last_frame(JavaThread* jt) { return last_frame; } +// There are two properties that we rely on for these handshakes to work correctly: +// 1. Async handshakes are always 'self processed' by the target thread, which means they +// only run when the target thread is itself stopped at a safepoint poll, and not when +// the thread is actively executing code, such as a memory access. +// 2. After the handshake sets the thread's pending exception, it will be thrown immediately +// when continuing execution. The important part is that no more code is executed, and +// the thread unwinds out of the scoped access it was in. class ScopedAsyncExceptionHandshakeClosure : public AsyncExceptionHandshakeClosure { OopHandle _session; + Atomic* _async_exceptions; + bool _processed; + + // non-copyable to make sure counter remains consistent + NONCOPYABLE(ScopedAsyncExceptionHandshakeClosure); public: - ScopedAsyncExceptionHandshakeClosure(OopHandle& session, OopHandle& error) - : AsyncExceptionHandshakeClosure(error), - _session(session) {} + ScopedAsyncExceptionHandshakeClosure(OopHandle& session, OopHandle& error, Atomic* async_exceptions) + : AsyncExceptionHandshakeClosure(error, "ScopedAsyncExceptionHandshakeClosure"), + _session(session), _async_exceptions(async_exceptions), _processed(false) { + _async_exceptions->add_then_fetch(1); + } ~ScopedAsyncExceptionHandshakeClosure() { + guarantee(_processed, "must process to avoid hang"); _session.release(Universe::vm_global()); } virtual void do_thread(Thread* thread) { + _processed = true; + // We are stopped, safe to free memory. + _async_exceptions->sub_then_fetch(1); JavaThread* jt = JavaThread::cast(thread); bool ignored; if (is_accessing_session(jt, _session.resolve(), ignored)) { @@ -153,12 +173,14 @@ public: class CloseScopedMemoryHandshakeClosure : public HandshakeClosure { jobject _session; jobject _error; + Atomic* _async_exceptions; public: - CloseScopedMemoryHandshakeClosure(jobject session, jobject error) - : HandshakeClosure("CloseScopedMemory") + CloseScopedMemoryHandshakeClosure(jobject session, jobject error, Atomic* async_exceptions) + : HandshakeClosure("CloseScopedMemoryHandshakeClosure") , _session(session) - , _error(error) {} + , _error(error) + , _async_exceptions(async_exceptions) {} void do_thread(Thread* thread) { JavaThread* jt = JavaThread::cast(thread); @@ -180,9 +202,16 @@ public: // An asynchronous handshake is sent to the target thread, telling it // to throw an exception, which will unwind the target thread out from // the scoped access. + // + // Since CloseScopedMemoryHandshakeClosure::do_thread may run concurrently + // with the target thread, because the target thread might be in native + // code, we may not install the async exception directly. Instead, we + // install another handshake that will deliver the exception the next + // time the target thread stops at a safepoint poll and is able to handle + // async exceptions. OopHandle session(Universe::vm_global(), JNIHandles::resolve(_session)); OopHandle error(Universe::vm_global(), JNIHandles::resolve(_error)); - jt->install_async_exception(new ScopedAsyncExceptionHandshakeClosure(session, error)); + jt->install_async_exception(new ScopedAsyncExceptionHandshakeClosure(session, error, _async_exceptions)); } else if (!in_scoped) { frame last_frame = get_last_frame(jt); if (last_frame.is_compiled_frame() && last_frame.can_be_deoptimized()) { @@ -230,14 +259,28 @@ public: /* * This function performs a thread-local handshake against all threads running at the time - * the given session (deopt) was closed. If the handshake for a given thread is processed while - * one or more threads is found inside a scoped method (that is, a method inside the ScopedMemoryAccess - * class annotated with the '@Scoped' annotation), and whose local variables mention the session being - * closed (deopt), this method returns false, signalling that the session cannot be closed safely. + * the given session was closed. If a thread is found to be accessing the given session, + * it is made to throw the given exception (error). */ JVM_ENTRY(void, ScopedMemoryAccess_closeScope(JNIEnv *env, jobject receiver, jobject session, jobject error)) - CloseScopedMemoryHandshakeClosure cl(session, error); + Atomic async_exceptions; + CloseScopedMemoryHandshakeClosure cl(session, error, &async_exceptions); + // We rely on the fact that executing a handshake + // synchronizes this thread with all other threads, + // which means that each thread will see any updates + // to the liveness bit of the session we made before + // this point, and will see the session as closed, + // after the handshake finishes. Handshake::execute(&cl); + + // Wait until any async exceptions are delivered before continuing, + // because we will free the memory after this. This guarantees the target + // thread does not continue to access the memory. + ThreadBlockInVM tbivm(thread); + SpinYield spin_yield; + while (async_exceptions.load_acquire() > 0) { + spin_yield.wait(); + } JVM_END /// JVM_RegisterUnsafeMethods diff --git a/src/hotspot/share/prims/unsafe.cpp b/src/hotspot/share/prims/unsafe.cpp index c950690e8ab..b7f5b427eda 100644 --- a/src/hotspot/share/prims/unsafe.cpp +++ b/src/hotspot/share/prims/unsafe.cpp @@ -76,30 +76,6 @@ #define UNSAFE_LEAF(result_type, header) \ JVM_LEAF(static result_type, header) -// All memory access methods (e.g. getInt, copyMemory) must use this macro. -// We call these methods "scoped" methods, as access to these methods is -// typically governed by a "scope" (a MemorySessionImpl object), and no -// access is allowed when the scope is no longer alive. -// -// Closing a scope object (cf. scopedMemoryAccess.cpp) can install -// an async exception during a safepoint. When that happens, -// scoped methods are not allowed to touch the underlying memory (as that -// memory might have been released). Therefore, when entering a scoped method -// we check if an async exception has been installed, and return immediately -// if that is the case. -// -// As a rule, we disallow safepoints in the middle of a scoped method. -// If an async exception handshake were installed in such a safepoint, -// memory access might still occur before the handshake is honored by -// the accessing thread. -// -// Corollary: as threads in native state are considered to be at a safepoint, -// scoped methods must NOT be executed while in the native thread state. -// Because of this, there can be no UNSAFE_LEAF_SCOPED. -#define UNSAFE_ENTRY_SCOPED(result_type, header) \ - JVM_ENTRY(static result_type, header) \ - if (thread->has_async_exception_condition()) {return (result_type)0;} - #define UNSAFE_END JVM_END @@ -301,11 +277,11 @@ UNSAFE_ENTRY(jobject, Unsafe_GetUncompressedObject(JNIEnv *env, jobject unsafe, #define DEFINE_GETSETOOP(java_type, Type) \ \ -UNSAFE_ENTRY_SCOPED(java_type, Unsafe_Get##Type(JNIEnv *env, jobject unsafe, jobject obj, jlong offset)) { \ +UNSAFE_ENTRY(java_type, Unsafe_Get##Type(JNIEnv *env, jobject unsafe, jobject obj, jlong offset)) { \ return MemoryAccess(thread, obj, offset).get(); \ } UNSAFE_END \ \ -UNSAFE_ENTRY_SCOPED(void, Unsafe_Put##Type(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, java_type x)) { \ +UNSAFE_ENTRY(void, Unsafe_Put##Type(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, java_type x)) { \ MemoryAccess(thread, obj, offset).put(x); \ } UNSAFE_END \ \ @@ -324,11 +300,11 @@ DEFINE_GETSETOOP(jdouble, Double); #define DEFINE_GETSETOOP_VOLATILE(java_type, Type) \ \ -UNSAFE_ENTRY_SCOPED(java_type, Unsafe_Get##Type##Volatile(JNIEnv *env, jobject unsafe, jobject obj, jlong offset)) { \ +UNSAFE_ENTRY(java_type, Unsafe_Get##Type##Volatile(JNIEnv *env, jobject unsafe, jobject obj, jlong offset)) { \ return MemoryAccess(thread, obj, offset).get_volatile(); \ } UNSAFE_END \ \ -UNSAFE_ENTRY_SCOPED(void, Unsafe_Put##Type##Volatile(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, java_type x)) { \ +UNSAFE_ENTRY(void, Unsafe_Put##Type##Volatile(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, java_type x)) { \ MemoryAccess(thread, obj, offset).put_volatile(x); \ } UNSAFE_END \ \ @@ -384,7 +360,7 @@ UNSAFE_LEAF(void, Unsafe_FreeMemory0(JNIEnv *env, jobject unsafe, jlong addr)) { os::free(p); } UNSAFE_END -UNSAFE_ENTRY_SCOPED(void, Unsafe_SetMemory0(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong size, jbyte value)) { +UNSAFE_ENTRY(void, Unsafe_SetMemory0(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong size, jbyte value)) { size_t sz = (size_t)size; oop base = JNIHandles::resolve(obj); @@ -401,7 +377,7 @@ UNSAFE_ENTRY_SCOPED(void, Unsafe_SetMemory0(JNIEnv *env, jobject unsafe, jobject } } UNSAFE_END -UNSAFE_ENTRY_SCOPED(void, Unsafe_CopyMemory0(JNIEnv *env, jobject unsafe, jobject srcObj, jlong srcOffset, jobject dstObj, jlong dstOffset, jlong size)) { +UNSAFE_ENTRY(void, Unsafe_CopyMemory0(JNIEnv *env, jobject unsafe, jobject srcObj, jlong srcOffset, jobject dstObj, jlong dstOffset, jlong size)) { size_t sz = (size_t)size; oop srcp = JNIHandles::resolve(srcObj); @@ -420,19 +396,39 @@ UNSAFE_ENTRY_SCOPED(void, Unsafe_CopyMemory0(JNIEnv *env, jobject unsafe, jobjec } } UNSAFE_END -UNSAFE_ENTRY_SCOPED(void, Unsafe_CopySwapMemory0(JNIEnv *env, jobject unsafe, jobject srcObj, jlong srcOffset, jobject dstObj, jlong dstOffset, jlong size, jlong elemSize)) { +// This function is a leaf since if the source and destination are both in native memory +// the copy may potentially be very large, and we don't want to disable GC if we can avoid it. +// If either source or destination (or both) are on the heap, the function will enter VM using +// JVM_ENTRY_FROM_LEAF +UNSAFE_LEAF(void, Unsafe_CopySwapMemory0(JNIEnv *env, jobject unsafe, jobject srcObj, jlong srcOffset, jobject dstObj, jlong dstOffset, jlong size, jlong elemSize)) { size_t sz = (size_t)size; size_t esz = (size_t)elemSize; - oop srcp = JNIHandles::resolve(srcObj); - oop dstp = JNIHandles::resolve(dstObj); - address src = (address)index_oop_from_field_offset_long(srcp, srcOffset); - address dst = (address)index_oop_from_field_offset_long(dstp, dstOffset); + if (srcObj == nullptr && dstObj == nullptr) { + // Both src & dst are in native memory + address src = (address)srcOffset; + address dst = (address)dstOffset; - { - GuardUnsafeAccess guard(thread); - Copy::conjoint_swap(src, dst, sz, esz); + { + JavaThread* thread = JavaThread::thread_from_jni_environment(env); + GuardUnsafeAccess guard(thread); + Copy::conjoint_swap(src, dst, sz, esz); + } + } else { + // At least one of src/dst are on heap, transition to VM to access raw pointers + + JVM_ENTRY_FROM_LEAF(env, void, Unsafe_CopySwapMemory0) { + oop srcp = JNIHandles::resolve(srcObj); + oop dstp = JNIHandles::resolve(dstObj); + + address src = (address)index_oop_from_field_offset_long(srcp, srcOffset); + address dst = (address)index_oop_from_field_offset_long(dstp, dstOffset); + { + GuardUnsafeAccess guard(thread); + Copy::conjoint_swap(src, dst, sz, esz); + } + } JVM_END } } UNSAFE_END @@ -702,11 +698,11 @@ static jclass Unsafe_DefineClass_impl(JNIEnv *env, jstring name, jbyteArray data result = JVM_DefineClass(env, utfName, loader, body, length, pd); if (utfName && utfName != buf) { - FREE_C_HEAP_ARRAY(char, utfName); + FREE_C_HEAP_ARRAY(utfName); } free_body: - FREE_C_HEAP_ARRAY(jbyte, body); + FREE_C_HEAP_ARRAY(body); return result; } @@ -734,13 +730,13 @@ UNSAFE_ENTRY(jobject, Unsafe_CompareAndExchangeReference(JNIEnv *env, jobject un return JNIHandles::make_local(THREAD, res); } UNSAFE_END -UNSAFE_ENTRY_SCOPED(jint, Unsafe_CompareAndExchangeInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) { +UNSAFE_ENTRY(jint, Unsafe_CompareAndExchangeInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) { oop p = JNIHandles::resolve(obj); volatile jint* addr = (volatile jint*)index_oop_from_field_offset_long(p, offset); return AtomicAccess::cmpxchg(addr, e, x); } UNSAFE_END -UNSAFE_ENTRY_SCOPED(jlong, Unsafe_CompareAndExchangeLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x)) { +UNSAFE_ENTRY(jlong, Unsafe_CompareAndExchangeLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x)) { oop p = JNIHandles::resolve(obj); volatile jlong* addr = (volatile jlong*)index_oop_from_field_offset_long(p, offset); return AtomicAccess::cmpxchg(addr, e, x); @@ -755,13 +751,13 @@ UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetReference(JNIEnv *env, jobject unsafe return ret == e; } UNSAFE_END -UNSAFE_ENTRY_SCOPED(jboolean, Unsafe_CompareAndSetInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) { +UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) { oop p = JNIHandles::resolve(obj); volatile jint* addr = (volatile jint*)index_oop_from_field_offset_long(p, offset); return AtomicAccess::cmpxchg(addr, e, x) == e; } UNSAFE_END -UNSAFE_ENTRY_SCOPED(jboolean, Unsafe_CompareAndSetLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x)) { +UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x)) { oop p = JNIHandles::resolve(obj); volatile jlong* addr = (volatile jlong*)index_oop_from_field_offset_long(p, offset); return AtomicAccess::cmpxchg(addr, e, x) == e; diff --git a/src/hotspot/share/prims/whitebox.cpp b/src/hotspot/share/prims/whitebox.cpp index de140fb95ff..4bbaa9eda3c 100644 --- a/src/hotspot/share/prims/whitebox.cpp +++ b/src/hotspot/share/prims/whitebox.cpp @@ -872,14 +872,12 @@ WB_ENTRY(jboolean, WB_IsMethodCompiled(JNIEnv* env, jobject o, jobject method, j return !code->is_marked_for_deoptimization(); WB_END -static bool is_excluded_for_compiler(AbstractCompiler* comp, methodHandle& mh) { +static bool is_excluded_for_compiler(AbstractCompiler* comp, int comp_level, methodHandle& mh) { if (comp == nullptr) { return true; } - DirectiveSet* directive = DirectivesStack::getMatchingDirective(mh, comp); - bool exclude = directive->ExcludeOption; - DirectivesStack::release(directive); - return exclude; + CompilerDirectiveMatcher matcher(mh, comp_level); + return matcher.directive_set()->ExcludeOption; } static bool can_be_compiled_at_level(methodHandle& mh, jboolean is_osr, int level) { @@ -904,8 +902,10 @@ WB_ENTRY(jboolean, WB_IsMethodCompilable(JNIEnv* env, jobject o, jobject method, // to exclude a compilation of 'method'. if (comp_level == CompLevel_any) { // Both compilers could have ExcludeOption set. Check all combinations. - bool excluded_c1 = is_excluded_for_compiler(CompileBroker::compiler1(), mh); - bool excluded_c2 = is_excluded_for_compiler(CompileBroker::compiler2(), mh); + bool excluded_c1 = is_excluded_for_compiler(CompileBroker::compiler1(), CompLevel_simple, mh) + && is_excluded_for_compiler(CompileBroker::compiler1(), CompLevel_limited_profile, mh) + && is_excluded_for_compiler(CompileBroker::compiler1(), CompLevel_full_profile, mh); + bool excluded_c2 = is_excluded_for_compiler(CompileBroker::compiler2(), CompLevel_full_optimization, mh); if (excluded_c1 && excluded_c2) { // Compilation of 'method' excluded by both compilers. return false; @@ -916,9 +916,11 @@ WB_ENTRY(jboolean, WB_IsMethodCompilable(JNIEnv* env, jobject o, jobject method, return can_be_compiled_at_level(mh, is_osr, CompLevel_full_optimization); } else if (excluded_c2) { // C2 only has ExcludeOption set: Check if compilable with C1. - return can_be_compiled_at_level(mh, is_osr, CompLevel_simple); + return can_be_compiled_at_level(mh, is_osr, CompLevel_simple) + || can_be_compiled_at_level(mh, is_osr, CompLevel_limited_profile) + || can_be_compiled_at_level(mh, is_osr, CompLevel_full_profile); } - } else if (comp_level > CompLevel_none && is_excluded_for_compiler(CompileBroker::compiler((int)comp_level), mh)) { + } else if (comp_level > CompLevel_none && is_excluded_for_compiler(CompileBroker::compiler((int)comp_level), comp_level, mh)) { // Compilation of 'method' excluded by compiler used for 'comp_level'. return false; } @@ -950,19 +952,17 @@ WB_ENTRY(jboolean, WB_IsIntrinsicAvailable(JNIEnv* env, jobject o, jobject metho CHECK_JNI_EXCEPTION_(env, JNI_FALSE); methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(method_id)); - DirectiveSet* directive; if (compilation_context != nullptr) { compilation_context_id = reflected_method_to_jmid(thread, env, compilation_context); CHECK_JNI_EXCEPTION_(env, JNI_FALSE); methodHandle cch(THREAD, Method::checked_resolve_jmethod_id(compilation_context_id)); - directive = DirectivesStack::getMatchingDirective(cch, comp); + CompilerDirectiveMatcher matcher(cch, compLevel); + return comp->is_intrinsic_available(mh, matcher.directive_set()); } else { // Calling with null matches default directive - directive = DirectivesStack::getDefaultDirective(comp); + CompilerDirectiveMatcher default_directive(comp); + return comp->is_intrinsic_available(mh, default_directive.directive_set()); } - bool result = comp->is_intrinsic_available(mh, directive); - DirectivesStack::release(directive); - return result; WB_END WB_ENTRY(jint, WB_GetMethodCompilationLevel(JNIEnv* env, jobject o, jobject method, jboolean is_osr)) @@ -1136,9 +1136,8 @@ bool WhiteBox::compile_method(Method* method, int comp_level, int bci, JavaThrea // Check if compilation is blocking methodHandle mh(THREAD, method); - DirectiveSet* directive = DirectivesStack::getMatchingDirective(mh, comp); - bool is_blocking = !directive->BackgroundCompilationOption; - DirectivesStack::release(directive); + CompilerDirectiveMatcher matcher(mh, comp_level); + bool is_blocking = !matcher.directive_set()->BackgroundCompilationOption; // Compile method and check result nmethod* nm = CompileBroker::compile_method(mh, bci, comp_level, mh->invocation_count(), CompileTask::Reason_Whitebox, CHECK_false); @@ -1156,7 +1155,7 @@ bool WhiteBox::compile_method(Method* method, int comp_level, int bci, JavaThrea } else if (mh->lookup_osr_nmethod_for(bci, comp_level, false) != nullptr) { return true; } - tty->print("WB error: failed to %s compile at level %d method ", is_blocking ? "blocking" : "", comp_level); + tty->print("WB error: failed to%s compile at level %d method ", is_blocking ? " blocking" : "", comp_level); mh->print_short_name(tty); tty->cr(); if (is_blocking && is_queued) { @@ -1189,11 +1188,8 @@ WB_ENTRY(jboolean, WB_ShouldPrintAssembly(JNIEnv* env, jobject o, jobject method CHECK_JNI_EXCEPTION_(env, JNI_FALSE); methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid)); - DirectiveSet* directive = DirectivesStack::getMatchingDirective(mh, CompileBroker::compiler(comp_level)); - bool result = directive->PrintAssemblyOption; - DirectivesStack::release(directive); - - return result; + CompilerDirectiveMatcher matcher(mh, comp_level); + return matcher.directive_set()->PrintAssemblyOption; WB_END WB_ENTRY(jint, WB_MatchesInline(JNIEnv* env, jobject o, jobject method, jstring pattern)) diff --git a/src/hotspot/share/runtime/abstract_vm_version.hpp b/src/hotspot/share/runtime/abstract_vm_version.hpp index 794fa4dabcf..9ad79b91871 100644 --- a/src/hotspot/share/runtime/abstract_vm_version.hpp +++ b/src/hotspot/share/runtime/abstract_vm_version.hpp @@ -45,19 +45,22 @@ class outputStream; class stringStream; enum class vmIntrinsicID; +#define SINGLE_INST_WARNING_MSG " instruction is not available on this CPU" +#define MULTI_INST_WARNING_MSG " instructions are not available on this CPU" + // Helper macro to test and set VM flag and corresponding cpu feature -#define CHECK_CPU_FEATURE(feature_test_fn, feature) \ - if (feature_test_fn()) { \ - if (FLAG_IS_DEFAULT(Use##feature)) { \ - FLAG_SET_DEFAULT(Use##feature, true); \ - } else if (!Use##feature) { \ - clear_feature(CPU_##feature); \ +#define CHECK_CPU_FEATURE(vmflag, feature_id, predicate, warning_msg) \ + if (predicate) { \ + if (FLAG_IS_DEFAULT(vmflag)) { \ + FLAG_SET_DEFAULT(vmflag, true); \ + } else if (!vmflag) { \ + clear_feature(CPU_##feature_id); \ } \ - } else if (Use##feature) { \ - if (!FLAG_IS_DEFAULT(Use##feature)) { \ - warning(#feature " instructions are not available on this CPU"); \ + } else if (vmflag) { \ + if (!FLAG_IS_DEFAULT(vmflag)) { \ + warning(warning_msg); \ } \ - FLAG_SET_DEFAULT(Use##feature, false); \ + FLAG_SET_DEFAULT(vmflag, false); \ } // Abstract_VM_Version provides information about the VM. @@ -255,8 +258,8 @@ class Abstract_VM_Version: AllStatic { // Size of the buffer must be same as returned by cpu_features_size() static void store_cpu_features(void* buf) { return; } - // features_to_test is an opaque object that stores arch specific representation of cpu features - static bool supports_features(void* features_to_test) { return false; }; + // features_buffer is an opaque object that stores arch specific representation of cpu features + static bool verify_aot_code_cache_features(void* features_buffer) { return false; }; }; #endif // SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index 2d40ee1822a..341e0b80a5f 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -35,7 +35,6 @@ #include "gc/shared/gc_globals.hpp" #include "gc/shared/gcArguments.hpp" #include "gc/shared/gcConfig.hpp" -#include "gc/shared/genArguments.hpp" #include "gc/shared/stringdedup/stringDedup.hpp" #include "gc/shared/tlab_globals.hpp" #include "jvm.h" @@ -533,9 +532,9 @@ static SpecialFlag const special_jvm_flags[] = { { "DynamicDumpSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() }, { "RequireSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() }, { "UseSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() }, - { "AggressiveHeap", JDK_Version::jdk(26), JDK_Version::jdk(27), JDK_Version::jdk(28) }, // --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in: { "CreateMinidumpOnCrash", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() }, + { "InitiatingHeapOccupancyPercent", JDK_Version::jdk(27), JDK_Version::jdk(28), JDK_Version::jdk(29) }, // -------------- Obsolete Flags - sorted by expired_in -------------- @@ -556,6 +555,7 @@ static SpecialFlag const special_jvm_flags[] = { { "AlwaysActAsServerClassMachine", JDK_Version::jdk(26), JDK_Version::jdk(27), JDK_Version::jdk(28) }, { "UseXMMForArrayCopy", JDK_Version::undefined(), JDK_Version::jdk(27), JDK_Version::jdk(28) }, { "UseNewLongLShift", JDK_Version::undefined(), JDK_Version::jdk(27), JDK_Version::jdk(28) }, + { "AggressiveHeap", JDK_Version::jdk(26), JDK_Version::jdk(27), JDK_Version::jdk(28) }, #ifdef ASSERT { "DummyObsoleteTestFlag", JDK_Version::undefined(), JDK_Version::jdk(18), JDK_Version::undefined() }, @@ -583,6 +583,7 @@ typedef struct { static AliasedFlag const aliased_jvm_flags[] = { { "CreateMinidumpOnCrash", "CreateCoredumpOnCrash" }, + G1GC_ONLY({"InitiatingHeapOccupancyPercent" COMMA "G1IHOP" } COMMA) { nullptr, nullptr} }; @@ -851,7 +852,7 @@ static bool set_string_flag(JVMFlag* flag, const char* value, JVMFlagOrigin orig } if (JVMFlagAccess::set_ccstr(flag, &value, origin) != JVMFlag::SUCCESS) return false; // Contract: JVMFlag always returns a pointer that needs freeing. - FREE_C_HEAP_ARRAY(char, value); + FREE_C_HEAP_ARRAY(value); return true; } @@ -876,9 +877,9 @@ static bool append_to_string_flag(JVMFlag* flag, const char* new_value, JVMFlagO } (void) JVMFlagAccess::set_ccstr(flag, &value, origin); // JVMFlag always returns a pointer that needs freeing. - FREE_C_HEAP_ARRAY(char, value); + FREE_C_HEAP_ARRAY(value); // JVMFlag made its own copy, so I must delete my own temp. buffer. - FREE_C_HEAP_ARRAY(char, free_this_too); + FREE_C_HEAP_ARRAY(free_this_too); return true; } @@ -1013,7 +1014,7 @@ void Arguments::add_string(char*** bldarray, int* count, const char* arg) { if (*bldarray == nullptr) { *bldarray = NEW_C_HEAP_ARRAY(char*, new_count, mtArguments); } else { - *bldarray = REALLOC_C_HEAP_ARRAY(char*, *bldarray, new_count, mtArguments); + *bldarray = REALLOC_C_HEAP_ARRAY(*bldarray, new_count, mtArguments); } (*bldarray)[*count] = os::strdup_check_oom(arg); *count = new_count; @@ -1489,245 +1490,6 @@ jint Arguments::set_ergonomics_flags() { return JNI_OK; } -size_t Arguments::limit_heap_by_allocatable_memory(size_t limit) { - // The AggressiveHeap check is a temporary workaround to avoid calling - // GCarguments::heap_virtual_to_physical_ratio() before a GC has been - // selected. This works because AggressiveHeap implies UseParallelGC - // where we know the ratio will be 1. Once the AggressiveHeap option is - // removed, this can be cleaned up. - size_t heap_virtual_to_physical_ratio = (AggressiveHeap ? 1 : GCConfig::arguments()->heap_virtual_to_physical_ratio()); - size_t fraction = MaxVirtMemFraction * heap_virtual_to_physical_ratio; - size_t max_allocatable = os::commit_memory_limit(); - - return MIN2(limit, max_allocatable / fraction); -} - -// Use static initialization to get the default before parsing -static const size_t DefaultHeapBaseMinAddress = HeapBaseMinAddress; - -static size_t clamp_by_size_t_max(uint64_t value) { - return (size_t)MIN2(value, (uint64_t)std::numeric_limits::max()); -} - -void Arguments::set_heap_size() { - // Check if the user has configured any limit on the amount of RAM we may use. - bool has_ram_limit = !FLAG_IS_DEFAULT(MaxRAMPercentage) || - !FLAG_IS_DEFAULT(MinRAMPercentage) || - !FLAG_IS_DEFAULT(InitialRAMPercentage); - - const physical_memory_size_type avail_mem = os::physical_memory(); - - // If the maximum heap size has not been set with -Xmx, then set it as - // fraction of the size of physical memory, respecting the maximum and - // minimum sizes of the heap. - if (FLAG_IS_DEFAULT(MaxHeapSize)) { - uint64_t min_memory = (uint64_t)(((double)avail_mem * MinRAMPercentage) / 100); - uint64_t max_memory = (uint64_t)(((double)avail_mem * MaxRAMPercentage) / 100); - - const size_t reasonable_min = clamp_by_size_t_max(min_memory); - size_t reasonable_max = clamp_by_size_t_max(max_memory); - - if (reasonable_min < MaxHeapSize) { - // Small physical memory, so use a minimum fraction of it for the heap - reasonable_max = reasonable_min; - } else { - // Not-small physical memory, so require a heap at least - // as large as MaxHeapSize - reasonable_max = MAX2(reasonable_max, MaxHeapSize); - } - - if (!FLAG_IS_DEFAULT(ErgoHeapSizeLimit) && ErgoHeapSizeLimit != 0) { - // Limit the heap size to ErgoHeapSizeLimit - reasonable_max = MIN2(reasonable_max, ErgoHeapSizeLimit); - } - - reasonable_max = limit_heap_by_allocatable_memory(reasonable_max); - - if (!FLAG_IS_DEFAULT(InitialHeapSize)) { - // An initial heap size was specified on the command line, - // so be sure that the maximum size is consistent. Done - // after call to limit_heap_by_allocatable_memory because that - // method might reduce the allocation size. - reasonable_max = MAX2(reasonable_max, InitialHeapSize); - } else if (!FLAG_IS_DEFAULT(MinHeapSize)) { - reasonable_max = MAX2(reasonable_max, MinHeapSize); - } - -#ifdef _LP64 - if (UseCompressedOops) { - // HeapBaseMinAddress can be greater than default but not less than. - if (!FLAG_IS_DEFAULT(HeapBaseMinAddress)) { - if (HeapBaseMinAddress < DefaultHeapBaseMinAddress) { - // matches compressed oops printing flags - log_debug(gc, heap, coops)("HeapBaseMinAddress must be at least %zu " - "(%zuG) which is greater than value given %zu", - DefaultHeapBaseMinAddress, - DefaultHeapBaseMinAddress/G, - HeapBaseMinAddress); - FLAG_SET_ERGO(HeapBaseMinAddress, DefaultHeapBaseMinAddress); - } - } - - uintptr_t heap_end = HeapBaseMinAddress + MaxHeapSize; - uintptr_t max_coop_heap = max_heap_for_compressed_oops(); - - // Limit the heap size to the maximum possible when using compressed oops - if (heap_end < max_coop_heap) { - // Heap should be above HeapBaseMinAddress to get zero based compressed - // oops but it should be not less than default MaxHeapSize. - max_coop_heap -= HeapBaseMinAddress; - } - - // If the user has configured any limit on the amount of RAM we may use, - // then disable compressed oops if the calculated max exceeds max_coop_heap - // and UseCompressedOops was not specified. - if (reasonable_max > max_coop_heap) { - if (FLAG_IS_ERGO(UseCompressedOops) && has_ram_limit) { - log_debug(gc, heap, coops)("UseCompressedOops disabled due to " - "max heap %zu > compressed oop heap %zu. " - "Please check the setting of MaxRAMPercentage %5.2f.", - reasonable_max, (size_t)max_coop_heap, MaxRAMPercentage); - FLAG_SET_ERGO(UseCompressedOops, false); - } else { - reasonable_max = max_coop_heap; - } - } - } -#endif // _LP64 - - log_trace(gc, heap)(" Maximum heap size %zu", reasonable_max); - FLAG_SET_ERGO(MaxHeapSize, reasonable_max); - } - - // If the minimum or initial heap_size have not been set or requested to be set - // ergonomically, set them accordingly. - if (InitialHeapSize == 0 || MinHeapSize == 0) { - size_t reasonable_minimum = clamp_by_size_t_max((uint64_t)OldSize + (uint64_t)NewSize); - reasonable_minimum = MIN2(reasonable_minimum, MaxHeapSize); - reasonable_minimum = limit_heap_by_allocatable_memory(reasonable_minimum); - - if (InitialHeapSize == 0) { - uint64_t initial_memory = (uint64_t)(((double)avail_mem * InitialRAMPercentage) / 100); - size_t reasonable_initial = clamp_by_size_t_max(initial_memory); - reasonable_initial = limit_heap_by_allocatable_memory(reasonable_initial); - - reasonable_initial = MAX3(reasonable_initial, reasonable_minimum, MinHeapSize); - reasonable_initial = MIN2(reasonable_initial, MaxHeapSize); - - FLAG_SET_ERGO(InitialHeapSize, (size_t)reasonable_initial); - log_trace(gc, heap)(" Initial heap size %zu", InitialHeapSize); - } - - // If the minimum heap size has not been set (via -Xms or -XX:MinHeapSize), - // synchronize with InitialHeapSize to avoid errors with the default value. - if (MinHeapSize == 0) { - FLAG_SET_ERGO(MinHeapSize, MIN2(reasonable_minimum, InitialHeapSize)); - log_trace(gc, heap)(" Minimum heap size %zu", MinHeapSize); - } - } -} - -// This option inspects the machine and attempts to set various -// parameters to be optimal for long-running, memory allocation -// intensive jobs. It is intended for machines with large -// amounts of cpu and memory. -jint Arguments::set_aggressive_heap_flags() { - // initHeapSize is needed since _initial_heap_size is 4 bytes on a 32 bit - // VM, but we may not be able to represent the total physical memory - // available (like having 8gb of memory on a box but using a 32bit VM). - // Thus, we need to make sure we're using a julong for intermediate - // calculations. - julong initHeapSize; - physical_memory_size_type phys_mem = os::physical_memory(); - julong total_memory = static_cast(phys_mem); - - if (total_memory < (julong) 256 * M) { - jio_fprintf(defaultStream::error_stream(), - "You need at least 256mb of memory to use -XX:+AggressiveHeap\n"); - vm_exit(1); - } - - // The heap size is half of available memory, or (at most) - // all of possible memory less 160mb (leaving room for the OS - // when using ISM). This is the maximum; because adaptive sizing - // is turned on below, the actual space used may be smaller. - - initHeapSize = MIN2(total_memory / (julong) 2, - total_memory - (julong) 160 * M); - - initHeapSize = limit_heap_by_allocatable_memory(initHeapSize); - - if (FLAG_IS_DEFAULT(MaxHeapSize)) { - if (FLAG_SET_CMDLINE(MaxHeapSize, initHeapSize) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - if (FLAG_SET_CMDLINE(InitialHeapSize, initHeapSize) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - if (FLAG_SET_CMDLINE(MinHeapSize, initHeapSize) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - } - if (FLAG_IS_DEFAULT(NewSize)) { - // Make the young generation 3/8ths of the total heap. - if (FLAG_SET_CMDLINE(NewSize, - ((julong) MaxHeapSize / (julong) 8) * (julong) 3) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - if (FLAG_SET_CMDLINE(MaxNewSize, NewSize) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - } - -#if !defined(_ALLBSD_SOURCE) && !defined(AIX) // UseLargePages is not yet supported on BSD and AIX. - FLAG_SET_DEFAULT(UseLargePages, true); -#endif - - // Increase some data structure sizes for efficiency - if (FLAG_SET_CMDLINE(ResizeTLAB, false) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - if (FLAG_SET_CMDLINE(TLABSize, 256 * K) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - - // See the OldPLABSize comment below, but replace 'after promotion' - // with 'after copying'. YoungPLABSize is the size of the survivor - // space per-gc-thread buffers. The default is 4kw. - if (FLAG_SET_CMDLINE(YoungPLABSize, 256 * K) != JVMFlag::SUCCESS) { // Note: this is in words - return JNI_EINVAL; - } - - // OldPLABSize is the size of the buffers in the old gen that - // UseParallelGC uses to promote live data that doesn't fit in the - // survivor spaces. At any given time, there's one for each gc thread. - // The default size is 1kw. These buffers are rarely used, since the - // survivor spaces are usually big enough. For specjbb, however, there - // are occasions when there's lots of live data in the young gen - // and we end up promoting some of it. We don't have a definite - // explanation for why bumping OldPLABSize helps, but the theory - // is that a bigger PLAB results in retaining something like the - // original allocation order after promotion, which improves mutator - // locality. A minor effect may be that larger PLABs reduce the - // number of PLAB allocation events during gc. The value of 8kw - // was arrived at by experimenting with specjbb. - if (FLAG_SET_CMDLINE(OldPLABSize, 8 * K) != JVMFlag::SUCCESS) { // Note: this is in words - return JNI_EINVAL; - } - - // Enable parallel GC and adaptive generation sizing - if (FLAG_SET_CMDLINE(UseParallelGC, true) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - - // Encourage steady state memory management - if (FLAG_SET_CMDLINE(ThresholdTolerance, 100) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - - return JNI_OK; -} - // This must be called after ergonomics. void Arguments::set_bytecode_flags() { if (!RewriteBytecodes) { @@ -1810,14 +1572,6 @@ bool Arguments::check_vm_args_consistency() { // Note: Needs platform-dependent factoring. bool status = true; - if (TLABRefillWasteFraction == 0) { - jio_fprintf(defaultStream::error_stream(), - "TLABRefillWasteFraction should be a denominator, " - "not %zu\n", - TLABRefillWasteFraction); - status = false; - } - status = CompilerConfig::check_args_consistency(status); #if INCLUDE_JVMCI if (status && EnableJVMCI) { @@ -2050,7 +1804,7 @@ int Arguments::process_patch_mod_option(const char* patch_mod_tail) { *(module_name + module_len) = '\0'; // The path piece begins one past the module_equal sign add_patch_mod_prefix(module_name, module_equal + 1); - FREE_C_HEAP_ARRAY(char, module_name); + FREE_C_HEAP_ARRAY(module_name); if (!create_numbered_module_property("jdk.module.patch", patch_mod_tail, patch_mod_count++)) { return JNI_ENOMEM; } @@ -2201,8 +1955,8 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, JVMFlagOrigin } #endif // !INCLUDE_JVMTI JvmtiAgentList::add_xrun(name, options, false); - FREE_C_HEAP_ARRAY(char, name); - FREE_C_HEAP_ARRAY(char, options); + FREE_C_HEAP_ARRAY(name); + FREE_C_HEAP_ARRAY(options); } } else if (match_option(option, "--add-reads=", &tail)) { if (!create_numbered_module_property("jdk.module.addreads", tail, addreads_count++)) { @@ -2331,7 +2085,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, JVMFlagOrigin char *options = NEW_C_HEAP_ARRAY(char, length, mtArguments); jio_snprintf(options, length, "%s", tail); JvmtiAgentList::add("instrument", options, false); - FREE_C_HEAP_ARRAY(char, options); + FREE_C_HEAP_ARRAY(options); // java agents need module java.instrument if (!create_numbered_module_property("jdk.module.addmods", "java.instrument", _addmods_count++)) { @@ -2600,14 +2354,6 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, JVMFlagOrigin if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) { return JNI_EINVAL; } - } else if (strcmp(tail, ":none") == 0) { - if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, false) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - warning("Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release."); } else if (is_bad_option(option, args->ignoreUnrecognized, "verification")) { return JNI_EINVAL; } @@ -2938,16 +2684,6 @@ jint Arguments::finalize_vm_init_args() { return JNI_ERR; } - // This must be done after all arguments have been processed - // and the container support has been initialized since AggressiveHeap - // relies on the amount of total memory available. - if (AggressiveHeap) { - jint result = set_aggressive_heap_flags(); - if (result != JNI_OK) { - return result; - } - } - // CompileThresholdScaling == 0.0 is same as -Xint: Disable compilation (enable interpreter-only mode), // but like -Xint, leave compilation thresholds unaffected. // With tiered compilation disabled, setting CompileThreshold to 0 disables compilation as well. @@ -2983,6 +2719,10 @@ jint Arguments::finalize_vm_init_args() { return JNI_ERR; } + // Called after ClassLoader::lookup_vm_options() but before class loading begins. + // TODO: Obtain and pass correct preview mode flag value here. + ClassLoader::set_preview_mode(false); + if (!check_vm_args_consistency()) { return JNI_ERR; } @@ -3066,7 +2806,7 @@ class ScopedVMInitArgs : public StackObj { for (int i = 0; i < _args.nOptions; i++) { os::free(_args.options[i].optionString); } - FREE_C_HEAP_ARRAY(JavaVMOption, _args.options); + FREE_C_HEAP_ARRAY(_args.options); } // Insert options into this option list, to replace option at @@ -3215,7 +2955,7 @@ jint Arguments::parse_vm_options_file(const char* file_name, ScopedVMInitArgs* v ssize_t bytes_read = ::read(fd, (void *)buf, (unsigned)bytes_alloc); ::close(fd); if (bytes_read < 0) { - FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(buf); jio_fprintf(defaultStream::error_stream(), "Could not read options file '%s'\n", file_name); return JNI_ERR; @@ -3223,13 +2963,13 @@ jint Arguments::parse_vm_options_file(const char* file_name, ScopedVMInitArgs* v if (bytes_read == 0) { // tell caller there is no option data and that is ok - FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(buf); return JNI_OK; } retcode = parse_options_buffer(file_name, buf, bytes_read, vm_args); - FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(buf); return retcode; } @@ -3562,7 +3302,7 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) { char *vmoptions = ClassLoader::lookup_vm_options(); if (vmoptions != nullptr) { code = parse_options_buffer("vm options resource", vmoptions, strlen(vmoptions), &initial_vm_options_args); - FREE_C_HEAP_ARRAY(char, vmoptions); + FREE_C_HEAP_ARRAY(vmoptions); if (code != JNI_OK) { return code; } @@ -3802,7 +3542,7 @@ jint Arguments::apply_ergo() { if (result != JNI_OK) return result; // Set heap size based on available physical memory - set_heap_size(); + GCConfig::arguments()->set_heap_size(); GCConfig::arguments()->initialize(); diff --git a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp index f2bcc21e123..0c5e3b6c441 100644 --- a/src/hotspot/share/runtime/arguments.hpp +++ b/src/hotspot/share/runtime/arguments.hpp @@ -273,12 +273,6 @@ class Arguments : AllStatic { static void set_use_compressed_oops(); static jint set_ergonomics_flags(); static void set_compact_headers_flags(); - // Limits the given heap size by the maximum amount of virtual - // memory this process is currently allowed to use. It also takes - // the virtual-to-physical ratio of the current GC into account. - static size_t limit_heap_by_allocatable_memory(size_t size); - // Setup heap size - static void set_heap_size(); // Bytecode rewriting static void set_bytecode_flags(); @@ -303,8 +297,6 @@ class Arguments : AllStatic { // Aggressive optimization flags. static jint set_aggressive_opts_flags(); - static jint set_aggressive_heap_flags(); - // Argument parsing static bool parse_argument(const char* arg, JVMFlagOrigin origin); static bool process_argument(const char* arg, jboolean ignore_unrecognized, JVMFlagOrigin origin); diff --git a/src/hotspot/share/runtime/continuationFreezeThaw.cpp b/src/hotspot/share/runtime/continuationFreezeThaw.cpp index 9df89f1f12a..1350297ec3d 100644 --- a/src/hotspot/share/runtime/continuationFreezeThaw.cpp +++ b/src/hotspot/share/runtime/continuationFreezeThaw.cpp @@ -193,6 +193,7 @@ static void verify_continuation(oop continuation) { Continuation::debug_verify_c static void do_deopt_after_thaw(JavaThread* thread); static bool do_verify_after_thaw(JavaThread* thread, stackChunkOop chunk, outputStream* st); +static bool verify_deopt_state(const frame& f); static void log_frames(JavaThread* thread); static void log_frames_after_thaw(JavaThread* thread, ContinuationWrapper& cont, intptr_t* sp); static void print_frame_layout(const frame& f, bool callee_complete, outputStream* st = tty); @@ -2054,10 +2055,12 @@ protected: intptr_t* _fastpath; bool _barriers; bool _preempted_case; + bool _should_patch_caller_pc; bool _process_args_at_top; intptr_t* _top_unextended_sp_before_thaw; int _align_size; - DEBUG_ONLY(intptr_t* _top_stack_address); + DEBUG_ONLY(intptr_t* _top_stack_address;) + DEBUG_ONLY(address _caller_raw_pc;) // Only used for preemption on ObjectLocker ObjectMonitor* _init_lock; @@ -2479,6 +2482,7 @@ NOINLINE intptr_t* Thaw::thaw_slow(stackChunkOop chunk, Continuation::t } frame caller; // the thawed caller on the stack + _should_patch_caller_pc = false; recurse_thaw(heap_frame, caller, num_frames, _preempted_case); finish_thaw(caller); // caller is now the topmost thawed frame _cont.write(); @@ -2561,6 +2565,8 @@ void ThawBase::finalize_thaw(frame& entry, int argsize) { assert(entry.sp() == _cont.entrySP(), ""); assert(Continuation::is_continuation_enterSpecial(entry), ""); assert(_cont.is_entry_frame(entry), ""); + assert(entry.pc() == entry.raw_pc(), ""); + DEBUG_ONLY(_caller_raw_pc = entry.pc();) } inline void ThawBase::before_thaw_java_frame(const frame& hf, const frame& caller, bool bottom, int num_frame) { @@ -2590,10 +2596,12 @@ inline void ThawBase::patch(frame& f, const frame& caller, bool bottom) { if (bottom) { ContinuationHelper::Frame::patch_pc(caller, _cont.is_empty() ? caller.pc() : StubRoutines::cont_returnBarrier()); - } else { - // caller might have been deoptimized during thaw but we've overwritten the return address when copying f from the heap. - // If the caller is not deoptimized, pc is unchanged. + } else if (_should_patch_caller_pc) { + // Caller was deoptimized during thaw but we've overwritten the return address when copying f from the heap. + // Also, on some platforms, if the caller is interpreted but the callee not we also need to patch. + assert(caller.is_deoptimized_frame() PPC64_ONLY(|| caller.is_interpreted_frame()), ""); ContinuationHelper::Frame::patch_pc(caller, caller.raw_pc()); + _should_patch_caller_pc = false; } patch_pd(f, caller); @@ -2604,6 +2612,7 @@ inline void ThawBase::patch(frame& f, const frame& caller, bool bottom) { assert(!bottom || !_cont.is_empty() || Continuation::is_continuation_entry_frame(f, nullptr), ""); assert(!bottom || (_cont.is_empty() != Continuation::is_cont_barrier_frame(f)), ""); + assert(!caller.is_compiled_frame() || verify_deopt_state(caller), ""); } void ThawBase::clear_bitmap_bits(address start, address end) { @@ -2805,6 +2814,10 @@ NOINLINE void ThawBase::recurse_thaw_interpreted_frame(const frame& hf, frame& c } DEBUG_ONLY(after_thaw_java_frame(f, is_bottom_frame);) + DEBUG_ONLY(address return_pc = ContinuationHelper::InterpretedFrame::return_pc(f);) + assert(return_pc == _caller_raw_pc || (is_bottom_frame && return_pc == StubRoutines::cont_returnBarrier()), "wrong return pc"); + assert(f.pc() == f.raw_pc(), ""); + DEBUG_ONLY(_caller_raw_pc = f.pc();) caller = f; } @@ -2855,6 +2868,7 @@ void ThawBase::recurse_thaw_compiled_frame(const frame& hf, frame& caller, int n assert(!f.is_deoptimized_frame(), ""); if (hf.is_deoptimized_frame()) { maybe_set_fastpath(f.sp()); + f.set_deoptimized(); } else if (_thread->is_interp_only_mode() || (stub_caller && f.cb()->as_nmethod()->is_marked_for_deoptimization())) { // The caller of the safepoint stub when the continuation is preempted is not at a call instruction, and so @@ -2868,6 +2882,8 @@ void ThawBase::recurse_thaw_compiled_frame(const frame& hf, frame& caller, int n assert(f.is_deoptimized_frame(), ""); assert(ContinuationHelper::Frame::is_deopt_return(f.raw_pc(), f), ""); maybe_set_fastpath(f.sp()); + assert(!_should_patch_caller_pc, ""); + _should_patch_caller_pc = true; } if (!is_bottom_frame) { @@ -2881,6 +2897,9 @@ void ThawBase::recurse_thaw_compiled_frame(const frame& hf, frame& caller, int n } DEBUG_ONLY(after_thaw_java_frame(f, is_bottom_frame);) + DEBUG_ONLY(address return_pc = ContinuationHelper::CompiledFrame::return_pc(f);) + assert(return_pc == _caller_raw_pc || (is_bottom_frame && return_pc == StubRoutines::cont_returnBarrier()), "wrong return pc"); + DEBUG_ONLY(_caller_raw_pc = f.raw_pc();) caller = f; } @@ -2930,6 +2949,7 @@ void ThawBase::recurse_thaw_stub_frame(const frame& hf, frame& caller, int num_f _cont.tail()->fix_thawed_frame(caller, &map); DEBUG_ONLY(after_thaw_java_frame(f, false /*is_bottom_frame*/);) + assert(ContinuationHelper::StubFrame::return_pc(f) == _caller_raw_pc, "wrong return pc"); caller = f; } @@ -2979,6 +2999,7 @@ void ThawBase::recurse_thaw_native_frame(const frame& hf, frame& caller, int num _cont.tail()->fix_thawed_frame(caller, SmallRegisterMap::instance_no_args()); DEBUG_ONLY(after_thaw_java_frame(f, false /* bottom */);) + assert(ContinuationHelper::NativeFrame::return_pc(f) == _caller_raw_pc, "wrong return pc"); caller = f; } @@ -3023,8 +3044,7 @@ void ThawBase::finish_thaw(frame& f) { } void ThawBase::push_return_frame(const frame& f) { // see generate_cont_thaw - assert(!f.is_compiled_frame() || f.is_deoptimized_frame() == f.cb()->as_nmethod()->is_deopt_pc(f.raw_pc()), ""); - assert(!f.is_compiled_frame() || f.is_deoptimized_frame() == (f.pc() != f.raw_pc()), ""); + assert(!f.is_compiled_frame() || verify_deopt_state(f), ""); LogTarget(Trace, continuations) lt; if (lt.develop_is_enabled()) { @@ -3170,6 +3190,14 @@ static bool do_verify_after_thaw(JavaThread* thread, stackChunkOop chunk, output return true; } +static bool verify_deopt_state(const frame& f) { + nmethod* nm = f.cb()->as_nmethod(); + assert(f.is_deoptimized_frame() == nm->is_deopt_pc(f.raw_pc()), ""); + assert(f.is_deoptimized_frame() == (f.pc() != f.raw_pc()), ""); + assert(f.is_deoptimized_frame() == nm->is_deopt_pc(ContinuationHelper::Frame::real_pc(f)), ""); + return true; +} + static void log_frames(JavaThread* thread) { const static int show_entry_callers = 3; LogTarget(Trace, continuations) lt; diff --git a/src/hotspot/share/runtime/deoptimization.cpp b/src/hotspot/share/runtime/deoptimization.cpp index cfdcf52a5eb..9db9c676268 100644 --- a/src/hotspot/share/runtime/deoptimization.cpp +++ b/src/hotspot/share/runtime/deoptimization.cpp @@ -249,9 +249,9 @@ Deoptimization::UnrollBlock::UnrollBlock(int size_of_deoptimized_frame, } Deoptimization::UnrollBlock::~UnrollBlock() { - FREE_C_HEAP_ARRAY(intptr_t, _frame_sizes); - FREE_C_HEAP_ARRAY(intptr_t, _frame_pcs); - FREE_C_HEAP_ARRAY(intptr_t, _register_block); + FREE_C_HEAP_ARRAY(_frame_sizes); + FREE_C_HEAP_ARRAY(_frame_pcs); + FREE_C_HEAP_ARRAY(_register_block); } int Deoptimization::UnrollBlock::size_of_frames() const { diff --git a/src/hotspot/share/runtime/deoptimization.hpp b/src/hotspot/share/runtime/deoptimization.hpp index d168d9c8af6..f42976fa5de 100644 --- a/src/hotspot/share/runtime/deoptimization.hpp +++ b/src/hotspot/share/runtime/deoptimization.hpp @@ -355,7 +355,7 @@ class Deoptimization : AllStatic { } static int trap_request_debug_id(int trap_request) { if (trap_request < 0) { - return ((~(trap_request) >> _debug_id_shift) & right_n_bits(_debug_id_bits)); + return (~(trap_request) >> _debug_id_shift) & right_n_bits(_debug_id_bits); } else { // standard action for unloaded CP entry return 0; diff --git a/src/hotspot/share/runtime/fieldDescriptor.cpp b/src/hotspot/share/runtime/fieldDescriptor.cpp index 491157d5bf7..4ad916cfff7 100644 --- a/src/hotspot/share/runtime/fieldDescriptor.cpp +++ b/src/hotspot/share/runtime/fieldDescriptor.cpp @@ -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 @@ -108,8 +108,21 @@ void fieldDescriptor::reinitialize(InstanceKlass* ik, const FieldInfo& fieldinfo guarantee(_fieldinfo.name_index() != 0 && _fieldinfo.signature_index() != 0, "bad constant pool index for fieldDescriptor"); } +void fieldDescriptor::print_access_flags(outputStream* st) const { + AccessFlags flags = access_flags(); + if (flags.is_public ()) st->print("public "); + if (flags.is_private ()) st->print("private "); + if (flags.is_protected()) st->print("protected "); + if (flags.is_static ()) st->print("static "); + if (flags.is_final ()) st->print("final "); + if (flags.is_volatile ()) st->print("volatile "); + if (flags.is_transient()) st->print("transient "); + if (flags.is_enum ()) st->print("enum "); + if (flags.is_synthetic()) st->print("synthetic "); +} + void fieldDescriptor::print_on(outputStream* st) const { - access_flags().print_on(st); + print_access_flags(st); if (field_flags().is_injected()) st->print("injected "); name()->print_value_on(st); st->print(" "); diff --git a/src/hotspot/share/runtime/fieldDescriptor.hpp b/src/hotspot/share/runtime/fieldDescriptor.hpp index fa3d1b9d23c..1b423377cc2 100644 --- a/src/hotspot/share/runtime/fieldDescriptor.hpp +++ b/src/hotspot/share/runtime/fieldDescriptor.hpp @@ -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 @@ -111,6 +111,7 @@ class fieldDescriptor { void print() const; void print_on(outputStream* st) const; void print_on_for(outputStream* st, oop obj); + void print_access_flags(outputStream* st) const; }; #endif // SHARE_RUNTIME_FIELDDESCRIPTOR_HPP diff --git a/src/hotspot/share/runtime/flags/jvmFlag.cpp b/src/hotspot/share/runtime/flags/jvmFlag.cpp index 405b47e1813..1c965360599 100644 --- a/src/hotspot/share/runtime/flags/jvmFlag.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlag.cpp @@ -648,7 +648,7 @@ void JVMFlag::printSetFlags(outputStream* out) { } } out->cr(); - FREE_C_HEAP_ARRAY(JVMFlag*, array); + FREE_C_HEAP_ARRAY(array); } #ifndef PRODUCT diff --git a/src/hotspot/share/runtime/flags/jvmFlagAccess.cpp b/src/hotspot/share/runtime/flags/jvmFlagAccess.cpp index 2db9f198ddd..8efa8f2de62 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagAccess.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlagAccess.cpp @@ -329,7 +329,7 @@ JVMFlag::Error JVMFlagAccess::set_ccstr(JVMFlag* flag, ccstr* value, JVMFlagOrig flag->set_ccstr(new_value); if (!flag->is_default() && old_value != nullptr) { // Old value is heap allocated so free it. - FREE_C_HEAP_ARRAY(char, old_value); + FREE_C_HEAP_ARRAY(old_value); } // Unlike the other APIs, the old value is NOT returned, so the caller won't need to free it. // The callers typically don't care what the old value is. diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp index 36eece6f013..ebcf6b4e14e 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp @@ -61,9 +61,21 @@ JVMFlag::Error CICompilerCountConstraintFunc(intx value, bool verbose) { "at least %d \n", value, min_number_of_compiler_threads); return JVMFlag::VIOLATES_CONSTRAINT; - } else { - return JVMFlag::SUCCESS; } + + // Limit CICompilerCount to a reasonable value in product builds. +#ifndef ASSERT + int active_processor_count = os::active_processor_count(); + // On a single-CPU machine we still can run C1 and C2 compiler threads, so allow up to 2x for tiered. + int reasonable_threads_num = CompilerConfig::is_tiered() ? active_processor_count * 2 : active_processor_count; + if (value > reasonable_threads_num) { + JVMFlag::printError(verbose, "CICompilerCount is too large (%" PRIdPTR ") for current active processor count %d \n", + CICompilerCount, active_processor_count); + return JVMFlag::VIOLATES_CONSTRAINT; + } +#endif + + return JVMFlag::SUCCESS; } JVMFlag::Error AllocatePrefetchStepSizeConstraintFunc(int value, bool verbose) { diff --git a/src/hotspot/share/runtime/frame.cpp b/src/hotspot/share/runtime/frame.cpp index d691a3c8028..68010a17ea4 100644 --- a/src/hotspot/share/runtime/frame.cpp +++ b/src/hotspot/share/runtime/frame.cpp @@ -1133,22 +1133,6 @@ void frame::oops_upcall_do(OopClosure* f, const RegisterMap* map) const { _cb->as_upcall_stub()->oops_do(f, *this); } -bool frame::is_deoptimized_frame() const { - assert(_deopt_state != unknown, "not answerable"); - if (_deopt_state == is_deoptimized) { - return true; - } - - /* This method only checks if the frame is deoptimized - * as in return address being patched. - * It doesn't care if the OP that we return to is a - * deopt instruction */ - /*if (_cb != nullptr && _cb->is_nmethod()) { - return NativeDeoptInstruction::is_deopt_at(_pc); - }*/ - return false; -} - void frame::oops_do_internal(OopClosure* f, NMethodClosure* cf, DerivedOopClosure* df, DerivedPointerIterationMode derived_mode, const RegisterMap* map, bool use_interpreter_oop_map_cache) const { diff --git a/src/hotspot/share/runtime/frame.hpp b/src/hotspot/share/runtime/frame.hpp index f54553086f6..a80d12d7853 100644 --- a/src/hotspot/share/runtime/frame.hpp +++ b/src/hotspot/share/runtime/frame.hpp @@ -214,6 +214,9 @@ class frame { // tells whether this frame can be deoptimized bool can_be_deoptimized() const; + // used by virtual thread thaw code to fix deopt state + inline void set_deoptimized(); + // the frame size in machine words inline int frame_size() const; diff --git a/src/hotspot/share/runtime/frame.inline.hpp b/src/hotspot/share/runtime/frame.inline.hpp index cbf01dd5763..fbd51d117cf 100644 --- a/src/hotspot/share/runtime/frame.inline.hpp +++ b/src/hotspot/share/runtime/frame.inline.hpp @@ -84,6 +84,19 @@ inline address frame::get_deopt_original_pc() const { return nullptr; } +inline bool frame::is_deoptimized_frame() const { + assert(_deopt_state != unknown, "not answerable"); + return _deopt_state == is_deoptimized; +} + +inline void frame::set_deoptimized() { + assert(is_compiled_frame(), "invalid operation"); + assert(_cb == CodeCache::find_blob(_pc), "invalid _pc"); + DEBUG_ONLY(nmethod* nm = _cb->as_nmethod();) + assert(!nm->is_deopt_pc(_pc) && nm->get_original_pc(this) == _pc, "wrong _pc"); + _deopt_state = is_deoptimized; +} + template inline address frame::oopmapreg_to_location(VMReg reg, const RegisterMapT* reg_map) const { if (reg->is_reg()) { diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 9d38a44cbd5..80729c32a78 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -147,6 +147,11 @@ const int ObjectAlignmentInBytes = 8; #endif // _LP64 +// Default value for PrintAssemblyOptions, set via --with-print-assembly-options. +#ifndef DEFAULT_PRINT_ASSEMBLY_OPTIONS +#define DEFAULT_PRINT_ASSEMBLY_OPTIONS nullptr +#endif + #define RUNTIME_FLAGS(develop, \ develop_pd, \ product, \ @@ -611,7 +616,8 @@ const int ObjectAlignmentInBytes = 8; product(bool, PrintAssembly, false, DIAGNOSTIC, \ "Print assembly code (using external disassembler.so)") \ \ - product(ccstr, PrintAssemblyOptions, nullptr, DIAGNOSTIC, \ + product(ccstr, PrintAssemblyOptions, DEFAULT_PRINT_ASSEMBLY_OPTIONS, \ + DIAGNOSTIC, \ "Print options string passed to disassembler.so") \ \ develop(bool, PrintNMethodStatistics, false, \ @@ -1846,9 +1852,6 @@ const int ObjectAlignmentInBytes = 8; product(bool, WhiteBoxAPI, false, DIAGNOSTIC, \ "Enable internal testing APIs") \ \ - product(bool, AlwaysAtomicAccesses, false, EXPERIMENTAL, \ - "Accesses to all variables should always be atomic") \ - \ product(bool, UseUnalignedAccesses, false, DIAGNOSTIC, \ "Use unaligned memory accesses in Unsafe") \ \ @@ -1937,7 +1940,7 @@ const int ObjectAlignmentInBytes = 8; "Use a table to record inflated monitors rather than the first " \ "word of the object.") \ \ - product(int, FastLockingSpins, 13, DIAGNOSTIC, \ + product(int, FastLockingSpins, 8, DIAGNOSTIC, \ "Specifies the number of times fast locking will attempt to " \ "CAS the markWord before inflating. Between each CAS it will " \ "spin for exponentially more time, resulting in a total number " \ diff --git a/src/hotspot/share/runtime/handshake.cpp b/src/hotspot/share/runtime/handshake.cpp index b54068d65d6..d61be7631cb 100644 --- a/src/hotspot/share/runtime/handshake.cpp +++ b/src/hotspot/share/runtime/handshake.cpp @@ -83,8 +83,10 @@ class HandshakeOperation : public CHeapObj { int32_t pending_threads() { return AtomicAccess::load(&_pending_threads); } const char* name() { return _handshake_cl->name(); } bool is_async() { return _handshake_cl->is_async(); } - bool is_suspend() { return _handshake_cl->is_suspend(); } + bool is_self_suspend() { return _handshake_cl->is_self_suspend(); } + bool is_suspend_request() { return _handshake_cl->is_suspend_request(); } bool is_async_exception() { return _handshake_cl->is_async_exception(); } + bool is_enabled() { return _handshake_cl->is_enabled(_target); } }; class AsyncHandshakeOperation : public HandshakeOperation { @@ -472,18 +474,24 @@ void Handshake::execute(AsyncHandshakeClosure* hs_cl, JavaThread* target) { } // Filters + +// op is enabled and can be executed by the current thread rather than the target. static bool non_self_executable_filter(HandshakeOperation* op) { - return !op->is_async(); + return !op->is_async() && op->is_enabled(); } +// op is not an async-exception op static bool no_async_exception_filter(HandshakeOperation* op) { return !op->is_async_exception(); } +// op is an async-exception op static bool async_exception_filter(HandshakeOperation* op) { return op->is_async_exception(); } +// op is not any kind of suspend op, nor an async-exception op static bool no_suspend_no_async_exception_filter(HandshakeOperation* op) { - return !op->is_suspend() && !op->is_async_exception(); + return !op->is_self_suspend() && !op->is_suspend_request() && !op->is_async_exception(); } +// All ops static bool all_ops_filter(HandshakeOperation* op) { return true; } @@ -521,8 +529,12 @@ HandshakeOperation* HandshakeState::get_op_for_self(bool allow_suspend, bool che assert(_lock.owned_by_self(), "Lock must be held"); assert(allow_suspend || !check_async_exception, "invalid case"); #if INCLUDE_JVMTI - if (allow_suspend && (_handshakee->is_disable_suspend() || _handshakee->is_vthread_transition_disabler())) { - // filter out suspend operations while JavaThread can not be suspended + // Filter out suspend operations while JavaThread can not be suspended. + // Potentially this could be folded into the `is_enabled` state of the operation + // and filtered directly through _queue.peek, but the incoming `allow_suspend` + // complicates that so we just maintain the explicit checks for now. + if (allow_suspend && (_handshakee->is_disable_suspend() || _handshakee->is_vthread_transition_disabler() || + _handshakee->jni_deferred_suspension())) { allow_suspend = false; } #endif @@ -565,12 +577,16 @@ void HandshakeState::clean_async_exception_operation() { } } +// Returns true if there is an enabled op that the current thread can execute +// on behalf of the handshakee. bool HandshakeState::have_non_self_executable_operation() { assert(_handshakee != Thread::current(), "Must not be called by self"); assert(_lock.owned_by_self(), "Lock must be held"); return _queue.contains(non_self_executable_filter); } +// Returns an enabled op that the current thread can execute +// on behalf of the handshakee. HandshakeOperation* HandshakeState::get_op() { assert(_handshakee != Thread::current(), "Must not be called by self"); assert(_lock.owned_by_self(), "Lock must be held"); @@ -683,7 +699,7 @@ HandshakeState::ProcessResult HandshakeState::try_process(HandshakeOperation* ma return HandshakeState::_not_safe; } - // Claim the mutex if there still an operation to be executed. + // Claim the mutex if there still an enabled operation to be executed. if (!claim_handshake()) { return HandshakeState::_claim_failed; } @@ -699,8 +715,14 @@ HandshakeState::ProcessResult HandshakeState::try_process(HandshakeOperation* ma Thread* current_thread = Thread::current(); HandshakeOperation* op = get_op(); + // It is possible that since we claimed the handshake the op has + // transitioned to a disabled state and so won't be returned by get_op. + if (op == nullptr) { + _lock.unlock(); + return HandshakeState::_no_operation; + } - assert(op != nullptr, "Must have an op"); + assert(op->is_enabled(), "Should not reach here with a disabled op"); assert(SafepointMechanism::local_poll_armed(_handshakee), "Must be"); assert(op->_target == nullptr || _handshakee == op->_target, "Wrong thread"); diff --git a/src/hotspot/share/runtime/handshake.hpp b/src/hotspot/share/runtime/handshake.hpp index c764bbcfcd2..cfdaf2e82df 100644 --- a/src/hotspot/share/runtime/handshake.hpp +++ b/src/hotspot/share/runtime/handshake.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2025, 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 @@ -50,8 +50,10 @@ class HandshakeClosure : public ThreadClosure, public CHeapObj { virtual ~HandshakeClosure() {} const char* name() const { return _name; } virtual bool is_async() { return false; } - virtual bool is_suspend() { return false; } + virtual bool is_self_suspend() { return false; } + virtual bool is_suspend_request() { return false; } virtual bool is_async_exception() { return false; } + virtual bool is_enabled(Thread* target) { return true; } virtual void do_thread(Thread* thread) = 0; }; @@ -99,7 +101,6 @@ class HandshakeState { Monitor _lock; // Set to the thread executing the handshake operation. Thread* volatile _active_handshaker; - bool claim_handshake(); bool possibly_can_process_handshake(); bool can_process_handshake(); diff --git a/src/hotspot/share/runtime/interfaceSupport.inline.hpp b/src/hotspot/share/runtime/interfaceSupport.inline.hpp index cd3a45a8d3c..bf9bd82b47c 100644 --- a/src/hotspot/share/runtime/interfaceSupport.inline.hpp +++ b/src/hotspot/share/runtime/interfaceSupport.inline.hpp @@ -423,6 +423,14 @@ extern "C" { \ VM_LEAF_BASE(result_type, header) +#define JVM_ENTRY_FROM_LEAF(env, result_type, header) \ + { { \ + JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ + ThreadInVMfromNative __tiv(thread); \ + DEBUG_ONLY(VMNativeEntryWrapper __vew;) \ + VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread) + + #define JVM_END } } #endif // SHARE_RUNTIME_INTERFACESUPPORT_INLINE_HPP diff --git a/src/hotspot/share/runtime/java.cpp b/src/hotspot/share/runtime/java.cpp index 758051a7351..e501930b3a0 100644 --- a/src/hotspot/share/runtime/java.cpp +++ b/src/hotspot/share/runtime/java.cpp @@ -29,6 +29,7 @@ #include "cds/dynamicArchive.hpp" #include "classfile/classLoader.hpp" #include "classfile/classLoaderDataGraph.hpp" +#include "classfile/classPrinter.hpp" #include "classfile/javaClasses.hpp" #include "classfile/stringTable.hpp" #include "classfile/symbolTable.hpp" @@ -114,11 +115,16 @@ static int compare_methods(Method** a, Method** b) { return (diff < 0) ? -1 : (diff > 0) ? 1 : 0; } +inline CompLevel method_code_comp_level(const Method* m) { + const nmethod* code = m->code(); + return code != nullptr ? static_cast(code->comp_level()) : CompLevel_any; +} + static void collect_profiled_methods(Method* m) { Thread* thread = Thread::current(); methodHandle mh(thread, m); if ((m->method_data() != nullptr) && - (PrintMethodData || CompilerOracle::should_print(mh))) { + (PrintMethodData || CompilerOracle::should_print(mh, method_code_comp_level(m)))) { collected_profiled_methods->push(m); } } @@ -152,7 +158,7 @@ static void print_method_profiling_data() { m->method_data()->parameters_type_data()->print_data_on(&ss); } // Buffering to a stringStream, disable internal buffering so it's not done twice. - m->print_codes_on(&ss, 0, false); + m->print_codes_on(&ss, ClassPrinter::PRINT_METHOD_DATA, false); tty->print("%s", ss.as_string()); // print all at once total_size += m->method_data()->size_in_bytes(); } diff --git a/src/hotspot/share/runtime/javaThread.cpp b/src/hotspot/share/runtime/javaThread.cpp index 77a567d4a09..ec1c8f64619 100644 --- a/src/hotspot/share/runtime/javaThread.cpp +++ b/src/hotspot/share/runtime/javaThread.cpp @@ -37,6 +37,7 @@ #include "gc/shared/oopStorage.hpp" #include "gc/shared/oopStorageSet.hpp" #include "gc/shared/tlab_globals.hpp" +#include "interpreter/bytecodeTracer.hpp" #include "jfr/jfrEvents.hpp" #include "jvm.h" #include "jvmtifiles/jvmtiEnv.hpp" @@ -308,7 +309,7 @@ static jlong* resize_counters_array(jlong* old_counters, int current_size, int n if (new_size > current_size) { memset(new_counters + current_size, 0, sizeof(jlong) * (new_size - current_size)); } - FREE_C_HEAP_ARRAY(jlong, old_counters); + FREE_C_HEAP_ARRAY(old_counters); } return new_counters; } @@ -432,6 +433,8 @@ JavaThread::JavaThread(MemTag mem_tag) : _visited_for_critical_count(false), #endif + NOT_PRODUCT(_bytecode_tracer_data{} COMMA) + _terminated(_not_terminated), _in_deopt_handler(0), _doing_unsafe_access(false), @@ -466,6 +469,7 @@ JavaThread::JavaThread(MemTag mem_tag) : _exception_handler_pc(nullptr), _jni_active_critical(0), + _jni_deferred_suspension_count(0), _pending_jni_exception_check_fn(nullptr), _depth_first_number(0), @@ -700,7 +704,7 @@ JavaThread::~JavaThread() { #if INCLUDE_JVMCI if (JVMCICounterSize > 0) { - FREE_C_HEAP_ARRAY(jlong, _jvmci_counters); + FREE_C_HEAP_ARRAY(_jvmci_counters); } #endif // INCLUDE_JVMCI } @@ -1884,7 +1888,7 @@ WordSize JavaThread::popframe_preserved_args_size_in_words() { void JavaThread::popframe_free_preserved_args() { assert(_popframe_preserved_args != nullptr, "should not free PopFrame preserved arguments twice"); - FREE_C_HEAP_ARRAY(char, (char*)_popframe_preserved_args); + FREE_C_HEAP_ARRAY((char*)_popframe_preserved_args); _popframe_preserved_args = nullptr; _popframe_preserved_args_size = 0; } diff --git a/src/hotspot/share/runtime/javaThread.hpp b/src/hotspot/share/runtime/javaThread.hpp index 755a6abe0d8..5dd84fcc01d 100644 --- a/src/hotspot/share/runtime/javaThread.hpp +++ b/src/hotspot/share/runtime/javaThread.hpp @@ -26,6 +26,9 @@ #ifndef SHARE_RUNTIME_JAVATHREAD_HPP #define SHARE_RUNTIME_JAVATHREAD_HPP +#ifndef PRODUCT +#include "interpreter/bytecodeTracer.hpp" +#endif // PRODUCT #include "jni.h" #include "memory/allocation.hpp" #include "oops/oop.hpp" @@ -291,6 +294,16 @@ class JavaThread: public Thread { } #endif // ASSERT +#ifndef PRODUCT + private: + BytecodeTracerData _bytecode_tracer_data; + + public: + BytecodeTracerData* bytecode_tracer_data() { + return &_bytecode_tracer_data; + } +#endif // PRODUCT + // JavaThread termination support public: enum TerminatedTypes { @@ -445,9 +458,12 @@ class JavaThread: public Thread { volatile address _exception_handler_pc; // PC for handler of exception private: - // support for JNI critical regions + // support for JNI critical regions interaction with GC jint _jni_active_critical; // count of entries into JNI critical region + // support for JNI critical regions deferral of JVM TI suspension + jint _jni_deferred_suspension_count; + // Checked JNI: function name requires exception check char* _pending_jni_exception_check_fn; @@ -967,10 +983,19 @@ public: _jni_active_critical--; assert(_jni_active_critical >= 0, "JNI critical nesting problem?"); } - // Atomic version; invoked by a thread other than the owning thread. bool in_critical_atomic() { return AtomicAccess::load(&_jni_active_critical) > 0; } + bool jni_deferred_suspension() { return AtomicAccess::load(&_jni_deferred_suspension_count); } + inline void enter_jni_deferred_suspension(); + void exit_jni_deferred_suspension() { + precond(Thread::current() == this); + int sc = AtomicAccess::load(&_jni_deferred_suspension_count); + AtomicAccess::store(&_jni_deferred_suspension_count, sc - 1); + assert(_jni_deferred_suspension_count >= 0, + "JNI deferred suspension nesting problem?"); + } + // Checked JNI: is the programmer required to check for exceptions, if so specify // which function name. Returning to a Java frame should implicitly clear the // pending check, this is done for Native->Java transitions (i.e. user JNI code). diff --git a/src/hotspot/share/runtime/javaThread.inline.hpp b/src/hotspot/share/runtime/javaThread.inline.hpp index bffacef24d0..5b4556b5666 100644 --- a/src/hotspot/share/runtime/javaThread.inline.hpp +++ b/src/hotspot/share/runtime/javaThread.inline.hpp @@ -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. * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -91,10 +91,14 @@ class AsyncExceptionHandshakeClosure : public AsyncHandshakeClosure { } void do_thread(Thread* thr) { + PRAGMA_DIAG_PUSH + PRAGMA_NONNULL_IGNORED + // Suppress GCC warning for nonnull as it doesn't recognize that `thr` is always the current thread. JavaThread* self = JavaThread::cast(thr); assert(self == JavaThread::current(), "must be"); self->handle_async_exception(exception()); + PRAGMA_DIAG_POP } oop exception() { assert(!_exception.is_empty(), "invariant"); @@ -192,6 +196,14 @@ void JavaThread::enter_critical() { _jni_active_critical++; } +void JavaThread::enter_jni_deferred_suspension() { + precond(JavaThread::current() == this); + assert(_thread_state != _thread_in_native && _thread_state != _thread_blocked, + "Must not defer suspension when handshake-safe"); + int sc = AtomicAccess::load(&_jni_deferred_suspension_count); + AtomicAccess::store(&_jni_deferred_suspension_count, sc + 1); +} + inline void JavaThread::set_done_attaching_via_jni() { _jni_attach_state = _attached_via_jni; OrderAccess::fence(); diff --git a/src/hotspot/share/runtime/nonJavaThread.cpp b/src/hotspot/share/runtime/nonJavaThread.cpp index cb0c3f8910d..e8f01086058 100644 --- a/src/hotspot/share/runtime/nonJavaThread.cpp +++ b/src/hotspot/share/runtime/nonJavaThread.cpp @@ -133,7 +133,7 @@ NamedThread::NamedThread() : {} NamedThread::~NamedThread() { - FREE_C_HEAP_ARRAY(char, _name); + FREE_C_HEAP_ARRAY(_name); } void NamedThread::set_name(const char* format, ...) { diff --git a/src/hotspot/share/runtime/objectMonitor.cpp b/src/hotspot/share/runtime/objectMonitor.cpp index 9fc834f4b6b..22cc0c84891 100644 --- a/src/hotspot/share/runtime/objectMonitor.cpp +++ b/src/hotspot/share/runtime/objectMonitor.cpp @@ -1898,17 +1898,16 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) { // although the raw address of the object may have changed. // (Don't cache naked oops over safepoints, of course). - // Post monitor waited event. Note that this is past-tense, we are done waiting. - // An event could have been enabled after notification, in this case - // a thread will have TS_ENTER state and posting the event may hit a suspension point. - // From a debugging perspective, it is more important to have no missing events. - if (interruptible && JvmtiExport::should_post_monitor_waited() && node.TState != ObjectWaiter::TS_ENTER) { + // When the thread is not on the _entry_list, the re-enter path does not have a suspension point if + // there is no contention, so we need to check for suspension now. + if (interruptible && node.TState != ObjectWaiter::TS_ENTER) { // Process suspend requests now if any, before posting the event. { ThreadBlockInVM tbvm(current, true); } - // Re-check the condition as the monitor waited events can be disabled whilst thread was suspended. + + // Post monitor waited event. Note that this is past-tense, we are done waiting. if (JvmtiExport::should_post_monitor_waited()) { JvmtiExport::post_monitor_waited(current, this, ret == OS_TIMEOUT); } diff --git a/src/hotspot/share/runtime/objectMonitorTable.cpp b/src/hotspot/share/runtime/objectMonitorTable.cpp index bc173992d7a..9f087ad5dee 100644 --- a/src/hotspot/share/runtime/objectMonitorTable.cpp +++ b/src/hotspot/share/runtime/objectMonitorTable.cpp @@ -192,7 +192,7 @@ public: } ~Table() { - FREE_C_HEAP_ARRAY(Atomic, _buckets); + FREE_C_HEAP_ARRAY(_buckets); } Table* prev() { diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp index d55cf454256..f9e3a513a78 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -303,10 +303,10 @@ static void free_array_of_char_arrays(char** a, size_t n) { while (n > 0) { n--; if (a[n] != nullptr) { - FREE_C_HEAP_ARRAY(char, a[n]); + FREE_C_HEAP_ARRAY(a[n]); } } - FREE_C_HEAP_ARRAY(char*, a); + FREE_C_HEAP_ARRAY(a); } bool os::dll_locate_lib(char *buffer, size_t buflen, @@ -353,7 +353,7 @@ bool os::dll_locate_lib(char *buffer, size_t buflen, } } - FREE_C_HEAP_ARRAY(char*, fullfname); + FREE_C_HEAP_ARRAY(fullfname); return retval; } @@ -562,7 +562,7 @@ void* os::find_agent_function(JvmtiAgent *agent_lib, bool check_lib, const char char* agent_function_name = build_agent_function_name(sym, lib_name, agent_lib->is_absolute_path()); if (agent_function_name != nullptr) { entryName = dll_lookup(handle, agent_function_name); - FREE_C_HEAP_ARRAY(char, agent_function_name); + FREE_C_HEAP_ARRAY(agent_function_name); } return entryName; } @@ -1510,20 +1510,20 @@ bool os::set_boot_path(char fileSep, char pathSep) { bool has_jimage = (os::stat(jimage, &st) == 0); if (has_jimage) { Arguments::set_boot_class_path(jimage, true); - FREE_C_HEAP_ARRAY(char, jimage); + FREE_C_HEAP_ARRAY(jimage); return true; } - FREE_C_HEAP_ARRAY(char, jimage); + FREE_C_HEAP_ARRAY(jimage); // check if developer build with exploded modules char* base_classes = format_boot_path("%/modules/" JAVA_BASE_NAME, home, home_len, fileSep, pathSep); if (base_classes == nullptr) return false; if (os::stat(base_classes, &st) == 0) { Arguments::set_boot_class_path(base_classes, false); - FREE_C_HEAP_ARRAY(char, base_classes); + FREE_C_HEAP_ARRAY(base_classes); return true; } - FREE_C_HEAP_ARRAY(char, base_classes); + FREE_C_HEAP_ARRAY(base_classes); return false; } @@ -1653,7 +1653,7 @@ char** os::split_path(const char* path, size_t* elements, size_t file_name_lengt opath[i] = s; p += len + 1; } - FREE_C_HEAP_ARRAY(char, inpath); + FREE_C_HEAP_ARRAY(inpath); *elements = count; return opath; } diff --git a/src/hotspot/share/runtime/os_perf.hpp b/src/hotspot/share/runtime/os_perf.hpp index 8e39b75deb6..a9a82a41b7e 100644 --- a/src/hotspot/share/runtime/os_perf.hpp +++ b/src/hotspot/share/runtime/os_perf.hpp @@ -152,9 +152,9 @@ class SystemProcess : public CHeapObj { } virtual ~SystemProcess(void) { - FREE_C_HEAP_ARRAY(char, _name); - FREE_C_HEAP_ARRAY(char, _path); - FREE_C_HEAP_ARRAY(char, _command_line); + FREE_C_HEAP_ARRAY(_name); + FREE_C_HEAP_ARRAY(_path); + FREE_C_HEAP_ARRAY(_command_line); } }; diff --git a/src/hotspot/share/runtime/perfData.cpp b/src/hotspot/share/runtime/perfData.cpp index 7532ada8f5a..1502995203d 100644 --- a/src/hotspot/share/runtime/perfData.cpp +++ b/src/hotspot/share/runtime/perfData.cpp @@ -118,9 +118,9 @@ PerfData::PerfData(CounterNS ns, const char* name, Units u, Variability v) } PerfData::~PerfData() { - FREE_C_HEAP_ARRAY(char, _name); + FREE_C_HEAP_ARRAY(_name); if (is_on_c_heap()) { - FREE_C_HEAP_ARRAY(PerfDataEntry, _pdep); + FREE_C_HEAP_ARRAY(_pdep); } } diff --git a/src/hotspot/share/runtime/perfData.hpp b/src/hotspot/share/runtime/perfData.hpp index d910f8662fe..9c87f87f688 100644 --- a/src/hotspot/share/runtime/perfData.hpp +++ b/src/hotspot/share/runtime/perfData.hpp @@ -233,7 +233,7 @@ class PerfData : public CHeapObj { public: // the Variability enum must be kept in synchronization with the - // the com.sun.hotspot.perfdata.Variability class + // the sun.management.counter.Variability class enum Variability { V_Constant = 1, V_Monotonic = 2, @@ -242,7 +242,7 @@ class PerfData : public CHeapObj { }; // the Units enum must be kept in synchronization with the - // the com.sun.hotspot.perfdata.Units class + // the sun.management.counter.Units class enum Units { U_None = 1, U_Bytes = 2, diff --git a/src/hotspot/share/runtime/perfMemory.cpp b/src/hotspot/share/runtime/perfMemory.cpp index 9594149333e..134d1c47230 100644 --- a/src/hotspot/share/runtime/perfMemory.cpp +++ b/src/hotspot/share/runtime/perfMemory.cpp @@ -247,7 +247,7 @@ char* PerfMemory::get_perfdata_file_path() { dest_file = NEW_C_HEAP_ARRAY(char, JVM_MAXPATHLEN, mtInternal); if(!Arguments::copy_expand_pid(PerfDataSaveFile, strlen(PerfDataSaveFile), dest_file, JVM_MAXPATHLEN)) { - FREE_C_HEAP_ARRAY(char, dest_file); + FREE_C_HEAP_ARRAY(dest_file); log_debug(perf)("invalid performance data file path name specified, fall back to a default name"); } else { return dest_file; diff --git a/src/hotspot/share/runtime/sharedRuntime.cpp b/src/hotspot/share/runtime/sharedRuntime.cpp index 352c90f913b..3d0ed5d2a23 100644 --- a/src/hotspot/share/runtime/sharedRuntime.cpp +++ b/src/hotspot/share/runtime/sharedRuntime.cpp @@ -3085,7 +3085,7 @@ AdapterHandlerEntry::~AdapterHandlerEntry() { _fingerprint = nullptr; } #ifdef ASSERT - FREE_C_HEAP_ARRAY(unsigned char, _saved_code); + FREE_C_HEAP_ARRAY(_saved_code); #endif FreeHeap(this); } @@ -3194,11 +3194,10 @@ void AdapterHandlerLibrary::create_native_wrapper(const methodHandle& method) { } } - DirectiveSet* directive = DirectivesStack::getMatchingDirective(method, CompileBroker::compiler(CompLevel_simple)); - if (directive->PrintAssemblyOption) { + CompilerDirectiveMatcher matcher(method, CompLevel_simple); + if (matcher.directive_set()->PrintAssemblyOption) { nm->print_code(); } - DirectivesStack::release(directive); } } } // Unlock AdapterHandlerLibrary_lock @@ -3376,7 +3375,7 @@ JRT_LEAF(intptr_t*, SharedRuntime::OSR_migration_begin( JavaThread *current) ) JRT_END JRT_LEAF(void, SharedRuntime::OSR_migration_end( intptr_t* buf) ) - FREE_C_HEAP_ARRAY(intptr_t, buf); + FREE_C_HEAP_ARRAY(buf); JRT_END const char* AdapterHandlerLibrary::name(AdapterHandlerEntry* handler) { diff --git a/src/hotspot/share/runtime/stubCodeGenerator.cpp b/src/hotspot/share/runtime/stubCodeGenerator.cpp index 45e40f4a754..252f90e1bde 100644 --- a/src/hotspot/share/runtime/stubCodeGenerator.cpp +++ b/src/hotspot/share/runtime/stubCodeGenerator.cpp @@ -178,6 +178,9 @@ void StubCodeGenerator::stub_prolog(StubCodeDesc* cdesc) { } void StubCodeGenerator::stub_epilog(StubCodeDesc* cdesc) { + if (_stub_data != nullptr && _stub_data->is_dumping()) { + _stub_data->stub_epilog(cdesc->stub_id()); + } print_stub_code_desc(cdesc); } @@ -252,25 +255,39 @@ void StubCodeGenerator::print_statistics_on(outputStream* st) { } #ifdef ASSERT -void StubCodeGenerator::verify_stub(StubId stub_id) { - assert(StubRoutines::stub_to_blob(stub_id) == blob_id(), "wrong blob %s for generation of stub %s", StubRoutines::get_blob_name(blob_id()), StubRoutines::get_stub_name(stub_id)); +void StubCodeGenerator::verify_stub(const char* name, StubId stub_id) { + if (_stub_data != nullptr) { + // we are collecting stub data for the current blob so the stub + // code should have been marked using a stub id + assert(stub_id != StubId::NO_STUBID, "StubCodeMark for stub %s must be declared with stub id as argument", name); + } + if (stub_id != StubId::NO_STUBID) { + // we may not always be collecting stub data but any stub id that + // is provided needs to belong to the current blob id and its name + // ought to have been retrieved via a call to StubInfo::name + assert(StubRoutines::stub_to_blob(stub_id) == blob_id(), "wrong blob %s for generation of stub %s", StubRoutines::get_blob_name(blob_id()), StubRoutines::get_stub_name(stub_id)); + assert(name == StubInfo::name(stub_id), "name %s does not match declared stub name %s", name, StubInfo::name(stub_id)); + } } #endif // Implementation of CodeMark -StubCodeMark::StubCodeMark(StubCodeGenerator* cgen, const char* group, const char* name) { +StubCodeMark::StubCodeMark(StubCodeGenerator* cgen, const char* group, const char* name, StubId stub_id) { _cgen = cgen; - _cdesc = new StubCodeDesc(group, name, _cgen->assembler()->pc()); + _cdesc = new StubCodeDesc(group, name, _cgen->assembler()->pc(), nullptr, stub_id); _cgen->stub_prolog(_cdesc); // define the stub's beginning (= entry point) to be after the prolog: _cdesc->set_begin(_cgen->assembler()->pc()); +#ifdef ASSERT + cgen->verify_stub(name, stub_id); +#endif } -StubCodeMark::StubCodeMark(StubCodeGenerator* cgen, StubId stub_id) : StubCodeMark(cgen, "StubRoutines", StubRoutines::get_stub_name(stub_id)) { -#ifdef ASSERT - cgen->verify_stub(stub_id); -#endif +StubCodeMark::StubCodeMark(StubCodeGenerator* cgen, const char* group, const char* name) : StubCodeMark(cgen, group, name, StubId::NO_STUBID) { +} + +StubCodeMark::StubCodeMark(StubCodeGenerator* cgen, StubId stub_id) : StubCodeMark(cgen, "StubRoutines", StubRoutines::get_stub_name(stub_id), stub_id) { } StubCodeMark::~StubCodeMark() { diff --git a/src/hotspot/share/runtime/stubCodeGenerator.hpp b/src/hotspot/share/runtime/stubCodeGenerator.hpp index 958fa76543b..9f796b43fba 100644 --- a/src/hotspot/share/runtime/stubCodeGenerator.hpp +++ b/src/hotspot/share/runtime/stubCodeGenerator.hpp @@ -50,6 +50,8 @@ class StubCodeDesc: public CHeapObj { address _end; // points to the first byte after the stub code (excluded) uint _disp; // Displacement relative base address in buffer. bool _loaded_from_cache; + // id when this is an enumerated stub otherwise StubId::NO_STUBID + StubId _stub_id; friend class StubCodeMark; friend class StubCodeGenerator; @@ -75,7 +77,7 @@ class StubCodeDesc: public CHeapObj { static StubCodeDesc* desc_for(address pc); // returns the code descriptor for the code containing pc or null - StubCodeDesc(const char* group, const char* name, address begin, address end = nullptr) { + StubCodeDesc(const char* group, const char* name, address begin, address end = nullptr, StubId stub_id = StubId::NO_STUBID) { assert(!_frozen, "no modifications allowed"); assert(name != nullptr, "no name specified"); _next = _list; @@ -86,6 +88,7 @@ class StubCodeDesc: public CHeapObj { _disp = 0; _list = this; _loaded_from_cache = false; + _stub_id = stub_id; }; static void freeze(); @@ -99,6 +102,7 @@ class StubCodeDesc: public CHeapObj { int size_in_bytes() const { return pointer_delta_as_int(_end, _begin); } bool contains(address pc) const { return _begin <= pc && pc < _end; } bool loaded_from_cache() const { return _loaded_from_cache; } + StubId stub_id() const { return _stub_id; } void print_on(outputStream* st) const; void print() const; }; @@ -184,7 +188,7 @@ public: address load_archive_data(StubId stub_id, GrowableArray
*entries = nullptr, GrowableArray
* extras = nullptr); void store_archive_data(StubId stub_id, address start, address end, GrowableArray
*entries = nullptr, GrowableArray
* extras = nullptr); #ifdef ASSERT - void verify_stub(StubId stub_id); + void verify_stub(const char* name, StubId stub_id); #endif }; @@ -199,7 +203,8 @@ class StubCodeMark: public StackObj { StubCodeGenerator* _cgen; StubCodeDesc* _cdesc; - public: + StubCodeMark(StubCodeGenerator* cgen, const char* group, const char* name, StubId stub_id); + public: StubCodeMark(StubCodeGenerator* cgen, const char* group, const char* name); StubCodeMark(StubCodeGenerator* cgen, StubId stub_id); ~StubCodeMark(); diff --git a/src/hotspot/share/runtime/suspendResumeManager.cpp b/src/hotspot/share/runtime/suspendResumeManager.cpp index 3408d763e57..3181c0f78aa 100644 --- a/src/hotspot/share/runtime/suspendResumeManager.cpp +++ b/src/hotspot/share/runtime/suspendResumeManager.cpp @@ -48,7 +48,7 @@ public: current->set_thread_state(jts); current->suspend_resume_manager()->set_async_suspend_handshake(false); } - virtual bool is_suspend() { return true; } + virtual bool is_self_suspend() { return true; } }; // This is the closure that synchronously honors the suspend request. @@ -64,6 +64,16 @@ public: _did_suspend = target->suspend_resume_manager()->suspend_with_handshake(_register_vthread_SR); } bool did_suspend() { return _did_suspend; } + virtual bool is_suspend_request() { return true; } + + // If the target is in a JNI deferred suspension region, then we cannot + // process this operation. This must be checked with the HandshakeState lock + // held, which together with the fact the target only enters a deferred + // region from a handshake-unsafe state, means we cannot race with the + // target entering that region. + virtual bool is_enabled(Thread* target) { + return !JavaThread::cast(target)->jni_deferred_suspension(); + } }; void SuspendResumeManager::set_suspended(bool is_suspend, bool register_vthread_SR) { diff --git a/src/hotspot/share/runtime/threadSMR.cpp b/src/hotspot/share/runtime/threadSMR.cpp index 4c68648fec8..d70b7dcbd34 100644 --- a/src/hotspot/share/runtime/threadSMR.cpp +++ b/src/hotspot/share/runtime/threadSMR.cpp @@ -667,7 +667,7 @@ ThreadsList::ThreadsList(int entries) : ThreadsList::~ThreadsList() { if (_threads != empty_threads_list_data) { - FREE_C_HEAP_ARRAY(JavaThread*, _threads); + FREE_C_HEAP_ARRAY(_threads); } _magic = 0xDEADBEEF; } diff --git a/src/hotspot/share/runtime/threads.cpp b/src/hotspot/share/runtime/threads.cpp index b83389a1929..27c4c588429 100644 --- a/src/hotspot/share/runtime/threads.cpp +++ b/src/hotspot/share/runtime/threads.cpp @@ -1062,7 +1062,7 @@ void Threads::destroy_vm() { #if INCLUDE_JVMCI if (JVMCICounterSize > 0) { - FREE_C_HEAP_ARRAY(jlong, JavaThread::_jvmci_old_thread_counters); + FREE_C_HEAP_ARRAY(JavaThread::_jvmci_old_thread_counters); } #endif diff --git a/src/hotspot/share/runtime/vmStructs.cpp b/src/hotspot/share/runtime/vmStructs.cpp index ad9463443b2..6ae9de05518 100644 --- a/src/hotspot/share/runtime/vmStructs.cpp +++ b/src/hotspot/share/runtime/vmStructs.cpp @@ -2086,10 +2086,10 @@ static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool s[len-1] = '\0'; // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); if (recursiveFindType(origtypes, s, true) == 1) { - FREE_C_HEAP_ARRAY(char, s); + FREE_C_HEAP_ARRAY(s); return 1; } - FREE_C_HEAP_ARRAY(char, s); + FREE_C_HEAP_ARRAY(s); } const char* start = nullptr; if (strstr(typeName, "GrowableArray<") == typeName) { @@ -2105,10 +2105,10 @@ static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool s[len-1] = '\0'; // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); if (recursiveFindType(origtypes, s, true) == 1) { - FREE_C_HEAP_ARRAY(char, s); + FREE_C_HEAP_ARRAY(s); return 1; } - FREE_C_HEAP_ARRAY(char, s); + FREE_C_HEAP_ARRAY(s); } if (strstr(typeName, "const ") == typeName) { const char * s = typeName + strlen("const "); diff --git a/src/hotspot/share/services/diagnosticArgument.cpp b/src/hotspot/share/services/diagnosticArgument.cpp index 247ab50bde7..0ba7bda2719 100644 --- a/src/hotspot/share/services/diagnosticArgument.cpp +++ b/src/hotspot/share/services/diagnosticArgument.cpp @@ -36,7 +36,7 @@ StringArrayArgument::StringArrayArgument() { StringArrayArgument::~StringArrayArgument() { for (int i=0; i<_array->length(); i++) { - FREE_C_HEAP_ARRAY(char, _array->at(i)); + FREE_C_HEAP_ARRAY(_array->at(i)); } delete _array; } @@ -183,7 +183,7 @@ template <> void DCmdArgument::init_value(TRAPS) { template <> void DCmdArgument::destroy_value() { } template <> void DCmdArgument::destroy_value() { - FREE_C_HEAP_ARRAY(char, _value); + FREE_C_HEAP_ARRAY(_value); set_value(nullptr); } @@ -194,14 +194,14 @@ template <> void DCmdArgument::parse_value(const char* str, } else { // Use realloc as we may have a default set. if (strcmp(type(), "FILE") == 0) { - _value = REALLOC_C_HEAP_ARRAY(char, _value, JVM_MAXPATHLEN, mtInternal); + _value = REALLOC_C_HEAP_ARRAY(_value, JVM_MAXPATHLEN, mtInternal); if (!Arguments::copy_expand_pid(str, len, _value, JVM_MAXPATHLEN)) { stringStream error_msg; error_msg.print("File path invalid or too long: %s", str); THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), error_msg.base()); } } else { - _value = REALLOC_C_HEAP_ARRAY(char, _value, len + 1, mtInternal); + _value = REALLOC_C_HEAP_ARRAY(_value, len + 1, mtInternal); int n = os::snprintf(_value, len + 1, "%.*s", (int)len, str); assert((size_t)n <= len, "Unexpected number of characters in string"); } diff --git a/src/hotspot/share/services/finalizerService.cpp b/src/hotspot/share/services/finalizerService.cpp index 9acf17b8cfd..d57d0fb5b50 100644 --- a/src/hotspot/share/services/finalizerService.cpp +++ b/src/hotspot/share/services/finalizerService.cpp @@ -93,7 +93,7 @@ FinalizerEntry::FinalizerEntry(const InstanceKlass* ik) : _total_finalizers_run(0) {} FinalizerEntry::~FinalizerEntry() { - FREE_C_HEAP_ARRAY(char, _codesource); + FREE_C_HEAP_ARRAY(_codesource); } const InstanceKlass* FinalizerEntry::klass() const { diff --git a/src/hotspot/share/services/heapDumper.cpp b/src/hotspot/share/services/heapDumper.cpp index bfb4546a8a1..c850a3a711f 100644 --- a/src/hotspot/share/services/heapDumper.cpp +++ b/src/hotspot/share/services/heapDumper.cpp @@ -2308,7 +2308,7 @@ class VM_HeapDumper : public VM_GC_Operation, public WorkerTask, public Unmounte for (int i = 0; i < _thread_dumpers_count; i++) { delete _thread_dumpers[i]; } - FREE_C_HEAP_ARRAY(ThreadDumper*, _thread_dumpers); + FREE_C_HEAP_ARRAY(_thread_dumpers); } if (_dumper_controller != nullptr) { diff --git a/src/hotspot/share/services/management.cpp b/src/hotspot/share/services/management.cpp index 664fb5a8ef3..36db3df056f 100644 --- a/src/hotspot/share/services/management.cpp +++ b/src/hotspot/share/services/management.cpp @@ -1715,7 +1715,7 @@ ThreadTimesClosure::~ThreadTimesClosure() { for (int i = 0; i < _count; i++) { os::free(_names_chars[i]); } - FREE_C_HEAP_ARRAY(char *, _names_chars); + FREE_C_HEAP_ARRAY(_names_chars); } // Fills names with VM internal thread names and times with the corresponding diff --git a/src/hotspot/share/services/memoryManager.cpp b/src/hotspot/share/services/memoryManager.cpp index ef9babbb20d..2d725db85b5 100644 --- a/src/hotspot/share/services/memoryManager.cpp +++ b/src/hotspot/share/services/memoryManager.cpp @@ -163,8 +163,8 @@ GCStatInfo::GCStatInfo(int num_pools) { } GCStatInfo::~GCStatInfo() { - FREE_C_HEAP_ARRAY(MemoryUsage*, _before_gc_usage_array); - FREE_C_HEAP_ARRAY(MemoryUsage*, _after_gc_usage_array); + FREE_C_HEAP_ARRAY(_before_gc_usage_array); + FREE_C_HEAP_ARRAY(_after_gc_usage_array); } void GCStatInfo::set_gc_usage(int pool_index, MemoryUsage usage, bool before_gc) { diff --git a/src/hotspot/share/services/threadService.cpp b/src/hotspot/share/services/threadService.cpp index 35c7de48d2e..cab6c6a4f27 100644 --- a/src/hotspot/share/services/threadService.cpp +++ b/src/hotspot/share/services/threadService.cpp @@ -1179,13 +1179,14 @@ public: OopHandle _carrier_thread; GrowableArray* _locks; Blocker _blocker; + bool _processed; GetThreadSnapshotHandshakeClosure(Handle thread_h): HandshakeClosure("GetThreadSnapshotHandshakeClosure"), _thread_h(thread_h), _java_thread(nullptr), _frame_count(0), _methods(nullptr), _bcis(nullptr), - _thread_status(), _thread_name(nullptr), - _locks(nullptr), _blocker() { + _thread_status(JavaThreadStatus::NEW), _thread_name(nullptr), + _locks(nullptr), _blocker(), _processed(false) { } virtual ~GetThreadSnapshotHandshakeClosure() { delete _methods; @@ -1274,6 +1275,7 @@ public: void do_thread(Thread* th) override { Thread* current = Thread::current(); _java_thread = th != nullptr ? JavaThread::cast(th) : nullptr; + _processed = true; bool is_virtual = java_lang_VirtualThread::is_instance(_thread_h()); if (_java_thread != nullptr) { @@ -1473,10 +1475,11 @@ oop ThreadSnapshotFactory::get_thread_snapshot(jobject jthread, TRAPS) { Handshake::execute(&cl, &tlh, java_thread); } - assert(cl._thread_status != JavaThreadStatus::NEW, "unstarted Thread"); - if (is_virtual && (cl._thread_status == JavaThreadStatus::TERMINATED)) { - return nullptr; // virtual thread terminated + assert(cl._processed || (!is_virtual && java_thread->is_terminated()), "should have executed handshake closure"); + if (!cl._processed || cl._thread_status == JavaThreadStatus::TERMINATED) { + return nullptr; // thread terminated } + assert(cl._thread_status != JavaThreadStatus::NEW, "unstarted Thread"); // StackTrace InstanceKlass* ste_klass = vmClasses::StackTraceElement_klass(); diff --git a/src/hotspot/share/utilities/accessFlags.cpp b/src/hotspot/share/utilities/accessFlags.cpp index ab4c7cde709..0988da18c51 100644 --- a/src/hotspot/share/utilities/accessFlags.cpp +++ b/src/hotspot/share/utilities/accessFlags.cpp @@ -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 @@ -22,29 +22,8 @@ * */ -#include "oops/oop.inline.hpp" -#include "runtime/atomicAccess.hpp" #include "utilities/accessFlags.hpp" -#if !defined(PRODUCT) || INCLUDE_JVMTI - -void AccessFlags::print_on(outputStream* st) const { - if (is_public ()) st->print("public " ); - if (is_private ()) st->print("private " ); - if (is_protected ()) st->print("protected " ); - if (is_static ()) st->print("static " ); - if (is_final ()) st->print("final " ); - if (is_synchronized()) st->print("synchronized "); - if (is_volatile ()) st->print("volatile " ); - if (is_transient ()) st->print("transient " ); - if (is_native ()) st->print("native " ); - if (is_interface ()) st->print("interface " ); - if (is_abstract ()) st->print("abstract " ); - if (is_synthetic ()) st->print("synthetic " ); -} - -#endif // !PRODUCT || INCLUDE_JVMTI - void accessFlags_init() { assert(sizeof(AccessFlags) == sizeof(u2), "just checking size of flags"); } diff --git a/src/hotspot/share/utilities/accessFlags.hpp b/src/hotspot/share/utilities/accessFlags.hpp index 54bbaeb2c13..a0aef9daa0c 100644 --- a/src/hotspot/share/utilities/accessFlags.hpp +++ b/src/hotspot/share/utilities/accessFlags.hpp @@ -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 @@ -53,10 +53,15 @@ class AccessFlags { bool is_synchronized() const { return (_flags & JVM_ACC_SYNCHRONIZED) != 0; } bool is_super () const { return (_flags & JVM_ACC_SUPER ) != 0; } bool is_volatile () const { return (_flags & JVM_ACC_VOLATILE ) != 0; } + bool is_bridge () const { return (_flags & JVM_ACC_BRIDGE ) != 0; } bool is_transient () const { return (_flags & JVM_ACC_TRANSIENT ) != 0; } + bool is_varargs () const { return (_flags & JVM_ACC_VARARGS ) != 0; } bool is_native () const { return (_flags & JVM_ACC_NATIVE ) != 0; } + bool is_enum () const { return (_flags & JVM_ACC_ENUM ) != 0; } + bool is_annotation () const { return (_flags & JVM_ACC_ANNOTATION ) != 0; } bool is_interface () const { return (_flags & JVM_ACC_INTERFACE ) != 0; } bool is_abstract () const { return (_flags & JVM_ACC_ABSTRACT ) != 0; } + bool is_strictfp () const { return (_flags & JVM_ACC_STRICT ) != 0; } // Attribute flags bool is_synthetic () const { return (_flags & JVM_ACC_SYNTHETIC ) != 0; } @@ -92,13 +97,6 @@ class AccessFlags { assert((_flags & JVM_RECOGNIZED_CLASS_MODIFIERS) == _flags, "only recognized flags"); return _flags; } - - // Printing/debugging -#if INCLUDE_JVMTI - void print_on(outputStream* st) const; -#else - void print_on(outputStream* st) const PRODUCT_RETURN; -#endif }; inline AccessFlags accessFlags_from(u2 flags) { diff --git a/src/hotspot/share/utilities/concurrentHashTable.inline.hpp b/src/hotspot/share/utilities/concurrentHashTable.inline.hpp index 62d2dd29dab..d5f6dee336b 100644 --- a/src/hotspot/share/utilities/concurrentHashTable.inline.hpp +++ b/src/hotspot/share/utilities/concurrentHashTable.inline.hpp @@ -217,7 +217,7 @@ template inline ConcurrentHashTable:: InternalTable::~InternalTable() { - FREE_C_HEAP_ARRAY(Bucket, _buckets); + FREE_C_HEAP_ARRAY(_buckets); } // ScopedCS diff --git a/src/hotspot/share/utilities/elfFile.cpp b/src/hotspot/share/utilities/elfFile.cpp index 0b7713e9ca9..e81f9128292 100644 --- a/src/hotspot/share/utilities/elfFile.cpp +++ b/src/hotspot/share/utilities/elfFile.cpp @@ -942,7 +942,7 @@ bool DwarfFile::ArangesCache::add_entry(const AddressDescriptor& descriptor, uin bool DwarfFile::ArangesCache::grow() { size_t new_capacity = _capacity == 0 ? 128 : _capacity * 1.5; - ArangesEntry* new_entries = REALLOC_C_HEAP_ARRAY_RETURN_NULL(ArangesEntry, _entries, new_capacity, mtInternal); + ArangesEntry* new_entries = REALLOC_C_HEAP_ARRAY_RETURN_NULL(_entries, new_capacity, mtInternal); if (new_entries == nullptr) { return false; } diff --git a/src/hotspot/share/utilities/elfFile.hpp b/src/hotspot/share/utilities/elfFile.hpp index 8abd846364c..0bfa821e256 100644 --- a/src/hotspot/share/utilities/elfFile.hpp +++ b/src/hotspot/share/utilities/elfFile.hpp @@ -487,7 +487,7 @@ class DwarfFile : public ElfFile { bool grow(); void free() { if (_entries != nullptr) { - FREE_C_HEAP_ARRAY(ArangesEntry, _entries); + FREE_C_HEAP_ARRAY(_entries); _entries = nullptr; } } diff --git a/src/hotspot/share/utilities/growableArray.cpp b/src/hotspot/share/utilities/growableArray.cpp index 9cc0813a1f6..dc6c24ea7e0 100644 --- a/src/hotspot/share/utilities/growableArray.cpp +++ b/src/hotspot/share/utilities/growableArray.cpp @@ -57,7 +57,7 @@ void* GrowableArrayCHeapAllocator::allocate(int max, int element_size, MemTag me } void GrowableArrayCHeapAllocator::deallocate(void* elements) { - if (!AOTMetaspace::in_aot_cache(elements)) { + if (!MetaspaceObj::is_pointer_in_aot_cache(elements)) { FreeHeap(elements); } } diff --git a/src/hotspot/share/utilities/istream.cpp b/src/hotspot/share/utilities/istream.cpp index ce622c2c282..c78fa5d1efa 100644 --- a/src/hotspot/share/utilities/istream.cpp +++ b/src/hotspot/share/utilities/istream.cpp @@ -265,7 +265,7 @@ bool inputStream::expand_buffer(size_t new_length) { } else { // realloc COV(EXB_R); - new_buf = REALLOC_C_HEAP_ARRAY(char, _buffer, new_length, mtInternal); + new_buf = REALLOC_C_HEAP_ARRAY(_buffer, new_length, mtInternal); assert(new_buf != nullptr, "would have exited VM if OOM"); } diff --git a/src/hotspot/share/utilities/numberSeq.cpp b/src/hotspot/share/utilities/numberSeq.cpp index 536f6563866..9d4ece105ed 100644 --- a/src/hotspot/share/utilities/numberSeq.cpp +++ b/src/hotspot/share/utilities/numberSeq.cpp @@ -144,7 +144,7 @@ TruncatedSeq::TruncatedSeq(int length, double alpha): } TruncatedSeq::~TruncatedSeq() { - FREE_C_HEAP_ARRAY(double, _sequence); + FREE_C_HEAP_ARRAY(_sequence); } void TruncatedSeq::add(double val) { diff --git a/src/hotspot/share/utilities/ostream.cpp b/src/hotspot/share/utilities/ostream.cpp index ded233d48bf..f052431d55e 100644 --- a/src/hotspot/share/utilities/ostream.cpp +++ b/src/hotspot/share/utilities/ostream.cpp @@ -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 @@ -369,7 +369,7 @@ void stringStream::grow(size_t new_capacity) { } zero_terminate(); } else { - _buffer = REALLOC_C_HEAP_ARRAY(char, _buffer, new_capacity, mtInternal); + _buffer = REALLOC_C_HEAP_ARRAY(_buffer, new_capacity, mtInternal); _capacity = new_capacity; } } @@ -425,11 +425,6 @@ char* stringStream::as_string(bool c_heap) const { NEW_C_HEAP_ARRAY(char, _written + 1, mtInternal) : NEW_RESOURCE_ARRAY(char, _written + 1); ::memcpy(copy, _buffer, _written); copy[_written] = '\0'; // terminating null - if (c_heap) { - // Need to ensure our content is written to memory before we return - // the pointer to it. - OrderAccess::storestore(); - } return copy; } @@ -442,7 +437,7 @@ char* stringStream::as_string(Arena* arena) const { stringStream::~stringStream() { if (!_is_fixed && _buffer != _small_buffer) { - FREE_C_HEAP_ARRAY(char, _buffer); + FREE_C_HEAP_ARRAY(_buffer); } } @@ -681,7 +676,7 @@ fileStream* defaultStream::open_file(const char* log_name) { } fileStream* file = new (mtInternal) fileStream(try_name); - FREE_C_HEAP_ARRAY(char, try_name); + FREE_C_HEAP_ARRAY(try_name); if (file->is_open()) { return file; } @@ -699,7 +694,7 @@ fileStream* defaultStream::open_file(const char* log_name) { jio_printf("Warning: Forcing option -XX:LogFile=%s\n", try_name); file = new (mtInternal) fileStream(try_name); - FREE_C_HEAP_ARRAY(char, try_name); + FREE_C_HEAP_ARRAY(try_name); if (file->is_open()) { return file; } @@ -1056,7 +1051,7 @@ void bufferedStream::write(const char* s, size_t len) { } } if (buffer_length < end) { - buffer = REALLOC_C_HEAP_ARRAY(char, buffer, end, mtInternal); + buffer = REALLOC_C_HEAP_ARRAY(buffer, end, mtInternal); buffer_length = end; } } @@ -1075,7 +1070,7 @@ char* bufferedStream::as_string() { } bufferedStream::~bufferedStream() { - FREE_C_HEAP_ARRAY(char, buffer); + FREE_C_HEAP_ARRAY(buffer); } #ifndef PRODUCT diff --git a/src/hotspot/share/utilities/rbTree.hpp b/src/hotspot/share/utilities/rbTree.hpp index 9c04ccbe9ab..fb505ebe9ca 100644 --- a/src/hotspot/share/utilities/rbTree.hpp +++ b/src/hotspot/share/utilities/rbTree.hpp @@ -385,6 +385,15 @@ public: void free_node(RBNode* node); + // Updates the key in the given node or node cursor. + // This will never trigger a tree rebalancing. + // The user must ensure that no tree properties are broken: + // There must not exist any node with the new key + // For all nodes with key < old_key, must also have key < new_key + // For all nodes with key > old_key, must also have key > new_key + void update_key(const Cursor& node_cursor, const K& new_key); + void update_key(RBNode* node, const K& new_key); + // Inserts a node with the given key/value into the tree, // if the key already exist, the value is updated instead. // Returns false if and only if allocation of a new node failed. diff --git a/src/hotspot/share/utilities/rbTree.inline.hpp b/src/hotspot/share/utilities/rbTree.inline.hpp index 381cb916405..1bd8ba8faf8 100644 --- a/src/hotspot/share/utilities/rbTree.inline.hpp +++ b/src/hotspot/share/utilities/rbTree.inline.hpp @@ -1147,6 +1147,29 @@ inline void RBTree::free_node(RBNode* node) { _allocator.free(node); } +template +inline void RBTree::update_key(const Cursor& node_cursor, const K& new_key) { + precond(node_cursor.valid()); + precond(node_cursor.found()); + + RBNode* node = node_cursor.node(); + update_key(node, new_key); +} + +template +inline void RBTree::update_key(RBNode* node, const K& new_key) { + precond(node != nullptr); + #ifdef ASSERT + const RBNode* prev = node->prev(); + const RBNode* next = node->next(); + + if (prev != nullptr) assert(COMPARATOR::cmp(new_key, prev->key()) == RBTreeOrdering::GT, "updated key not GT previous node's key."); + if (next != nullptr) assert(COMPARATOR::cmp(new_key, next->key()) == RBTreeOrdering::LT, "updated key not LT next node's key."); + #endif // ASSERT + + node->_key = new_key; +} + template inline bool RBTree::upsert(const K& key, const V& val, const RBNode* hint_node) { Cursor node_cursor = cursor(key, hint_node); diff --git a/src/hotspot/share/utilities/resizableHashTable.hpp b/src/hotspot/share/utilities/resizableHashTable.hpp index a5b53698b11..8e6528f6a3c 100644 --- a/src/hotspot/share/utilities/resizableHashTable.hpp +++ b/src/hotspot/share/utilities/resizableHashTable.hpp @@ -45,7 +45,7 @@ protected: ~ResizeableHashTableStorage() { if (ALLOC_TYPE == C_HEAP) { - FREE_C_HEAP_ARRAY(Node*, _table); + FREE_C_HEAP_ARRAY(_table); } } @@ -151,7 +151,7 @@ public: } if (ALLOC_TYPE == AnyObj::C_HEAP) { - FREE_C_HEAP_ARRAY(Node*, old_table); + FREE_C_HEAP_ARRAY(old_table); } BASE::_table = new_table; BASE::_table_size = new_size; diff --git a/src/hotspot/share/utilities/stack.inline.hpp b/src/hotspot/share/utilities/stack.inline.hpp index 49ccf416629..78e575a0eaf 100644 --- a/src/hotspot/share/utilities/stack.inline.hpp +++ b/src/hotspot/share/utilities/stack.inline.hpp @@ -145,7 +145,7 @@ E* Stack::alloc(size_t bytes) template void Stack::free(E* addr, size_t bytes) { - FREE_C_HEAP_ARRAY(char, (char*) addr); + FREE_C_HEAP_ARRAY((char*) addr); } // Stack is used by the GC code and in some hot paths a lot of the Stack diff --git a/src/hotspot/share/utilities/stringUtils.cpp b/src/hotspot/share/utilities/stringUtils.cpp index 0872ce43d4b..d133d21e52f 100644 --- a/src/hotspot/share/utilities/stringUtils.cpp +++ b/src/hotspot/share/utilities/stringUtils.cpp @@ -125,7 +125,7 @@ bool StringUtils::is_star_match(const char* star_pattern, const char* str) { } StringUtils::CommaSeparatedStringIterator::~CommaSeparatedStringIterator() { - FREE_C_HEAP_ARRAY(char, _list); + FREE_C_HEAP_ARRAY(_list); } ccstrlist StringUtils::CommaSeparatedStringIterator::canonicalize(ccstrlist option_value) { diff --git a/src/hotspot/share/utilities/unsigned5.hpp b/src/hotspot/share/utilities/unsigned5.hpp index 8e3724a0012..1fc6aeaffb6 100644 --- a/src/hotspot/share/utilities/unsigned5.hpp +++ b/src/hotspot/share/utilities/unsigned5.hpp @@ -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 @@ -280,6 +280,7 @@ class UNSIGNED5 : AllStatic { int len = next_length(); // 0 or length in [1..5] if (len == 0) break; _position += len; + ++actual; } return actual; } diff --git a/src/hotspot/share/utilities/xmlstream.cpp b/src/hotspot/share/utilities/xmlstream.cpp index 6dacab1dc25..3ebc1b4b4ac 100644 --- a/src/hotspot/share/utilities/xmlstream.cpp +++ b/src/hotspot/share/utilities/xmlstream.cpp @@ -65,7 +65,7 @@ void xmlStream::initialize(outputStream* out) { #ifdef ASSERT xmlStream::~xmlStream() { - FREE_C_HEAP_ARRAY(char, _element_close_stack_low); + FREE_C_HEAP_ARRAY(_element_close_stack_low); } #endif @@ -169,7 +169,7 @@ void xmlStream::see_tag(const char* tag, bool push) { _element_close_stack_high = new_high; _element_close_stack_low = new_low; _element_close_stack_ptr = new_ptr; - FREE_C_HEAP_ARRAY(char, old_low); + FREE_C_HEAP_ARRAY(old_low); push_ptr = new_ptr - (tag_len+1); } assert(push_ptr >= _element_close_stack_low, "in range"); diff --git a/src/java.base/macosx/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java b/src/java.base/macosx/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java index e24a986782d..888e4ad7d83 100644 --- a/src/java.base/macosx/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java +++ b/src/java.base/macosx/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java @@ -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 @@ -26,11 +26,14 @@ package sun.util.locale.provider; import java.lang.ref.SoftReference; +import java.time.DateTimeException; +import java.time.format.DateTimeFormatterPatternProvider; import java.text.*; import java.text.spi.DateFormatProvider; import java.text.spi.DateFormatSymbolsProvider; import java.text.spi.DecimalFormatSymbolsProvider; import java.text.spi.NumberFormatProvider; +import java.time.format.FormatStyle; import java.util.Collections; import java.util.Calendar; import java.util.HashMap; @@ -48,7 +51,6 @@ import java.util.spi.CalendarNameProvider; import java.util.spi.CurrencyNameProvider; import java.util.spi.LocaleNameProvider; import java.util.spi.TimeZoneNameProvider; -import sun.text.spi.JavaTimeDateTimePatternProvider; import sun.util.spi.CalendarProvider; /** @@ -149,8 +151,8 @@ public class HostLocaleProviderAdapterImpl { return Locale.forLanguageTag(langTag); } - public static JavaTimeDateTimePatternProvider getJavaTimeDateTimePatternProvider() { - return new JavaTimeDateTimePatternProvider() { + public static DateTimeFormatterPatternProvider getDateTimeFormatterPatternProvider() { + return new DateTimeFormatterPatternProvider() { @Override public Locale[] getAvailableLocales() { return getSupportedCalendarLocales(); @@ -162,11 +164,20 @@ public class HostLocaleProviderAdapterImpl { } @Override - public String getJavaTimeDateTimePattern(int timeStyle, int dateStyle, String calType, Locale locale) { - return toJavaTimeDateTimePattern(calType, getDateTimePattern(dateStyle, timeStyle, locale)); + public String getDateTimeFormatterPattern(FormatStyle dateStyle, FormatStyle timeStyle, String calType, Locale locale) { + return toDateTimeFormatterPattern(calType, getDateTimePattern( + dateStyle != null ? dateStyle.ordinal() : -1, + timeStyle != null ? timeStyle.ordinal() : -1, locale)); } + @Override + public String getDateTimeFormatterPattern(String requestedTemplate, String calType, Locale locale) { + throw new DateTimeException(""" + Formatting pattern is not available for the requested template: "%s", calType: "%s", locale: "%s". + """.formatted(requestedTemplate, calType, locale)); + } + private String getDateTimePattern(int dateStyle, int timeStyle, Locale locale) { AtomicReferenceArray dateFormatPatterns; SoftReference> ref = dateFormatPatternsMap.get(locale); @@ -193,7 +204,7 @@ public class HostLocaleProviderAdapterImpl { * This method will convert JRE Date/time Pattern String to JSR310 * type Date/Time Pattern */ - private String toJavaTimeDateTimePattern(String calendarType, String jrePattern) { + private String toDateTimeFormatterPattern(String calendarType, String jrePattern) { int length = jrePattern.length(); StringBuilder sb = new StringBuilder(length); boolean inQuote = false; diff --git a/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m b/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m index 6d8eb832370..d59cb6c5abb 100644 --- a/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m +++ b/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m @@ -292,7 +292,10 @@ static void addIdentitiesToKeystore(JNIEnv *env, jobject keyStore, jmethodID jm_ if (searchResult == noErr) { // Get the cert from the identity, then generate a chain. SecCertificateRef certificate; - SecIdentityCopyCertificate(theIdentity, &certificate); + OSStatus res = SecIdentityCopyCertificate(theIdentity, &certificate); + if (res != errSecSuccess) { + goto errOut; + } // *** Should do something with this error... err = completeCertChain(theIdentity, NULL, TRUE, &certChain); @@ -302,18 +305,21 @@ static void addIdentitiesToKeystore(JNIEnv *env, jobject keyStore, jmethodID jm_ // Make a java array of certificate data from the chain. jclass byteArrayClass = (*env)->FindClass(env, "[B"); if (byteArrayClass == NULL) { + CFRelease(certificate); goto errOut; } jobjectArray javaCertArray = (*env)->NewObjectArray(env, certCount, byteArrayClass, NULL); // Cleanup first then check for a NULL return code (*env)->DeleteLocalRef(env, byteArrayClass); if (javaCertArray == NULL) { + CFRelease(certificate); goto errOut; } // And, make an array of the certificate refs. jlongArray certRefArray = (*env)->NewLongArray(env, certCount); if (certRefArray == NULL) { + CFRelease(certificate); goto errOut; } @@ -322,10 +328,12 @@ static void addIdentitiesToKeystore(JNIEnv *env, jobject keyStore, jmethodID jm_ for (i = 0; i < certCount; i++) { CSSM_DATA currCertData; - if (i == 0) + if (i == 0) { currCertRef = certificate; - else + } else { currCertRef = (SecCertificateRef)CFArrayGetValueAtIndex(certChain, i); + CFRetain(currCertRef); + } bzero(&currCertData, sizeof(CSSM_DATA)); err = SecCertificateGetData(currCertRef, &currCertData); @@ -342,10 +350,14 @@ static void addIdentitiesToKeystore(JNIEnv *env, jobject keyStore, jmethodID jm_ // Get the private key. When needed we'll export the data from it later. SecKeyRef privateKeyRef; err = SecIdentityCopyPrivateKey(theIdentity, &privateKeyRef); + if (err != errSecSuccess) { + goto errOut; + } // Find the label. It's a 'blob', but we interpret as characters. jstring alias = getLabelFromItem(env, (SecKeychainItemRef)certificate); if (alias == NULL) { + CFRelease(privateKeyRef); goto errOut; } diff --git a/src/java.base/share/classes/com/sun/crypto/provider/ML_KEM.java b/src/java.base/share/classes/com/sun/crypto/provider/ML_KEM.java index 56a119893a7..6564f40545a 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/ML_KEM.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/ML_KEM.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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 @@ -527,6 +527,8 @@ public final class ML_KEM { } catch (DigestException e) { // This should never happen. throw new RuntimeException(e); + } finally { + mlKemH.reset(); } // The 2nd 32-byte `z` is copied into decapsKey System.arraycopy(kem_d_z, 32, decapsKey, @@ -562,7 +564,6 @@ public final class ML_KEM { var randomCoins = Arrays.copyOfRange(kHatAndRandomCoins, 32, 64); var cipherText = kPkeEncrypt(new K_PKE_EncryptionKey(encapsulationKey.keyBytes), randomMessage, randomCoins); - Arrays.fill(randomCoins, (byte) 0); byte[] sharedSecret = Arrays.copyOfRange(kHatAndRandomCoins, 0, 32); Arrays.fill(kHatAndRandomCoins, (byte) 0); @@ -613,6 +614,7 @@ public final class ML_KEM { var fakeResult = mlKemJ.digest(); var computedCipherText = kPkeEncrypt( new K_PKE_EncryptionKey(encapsKeyBytes), mCandidate, coins); + Arrays.fill(mCandidate, (byte)0); // The rest of this method implements the following in constant time // @@ -648,9 +650,11 @@ public final class ML_KEM { MessageDigest mlKemG; SHAKE256 mlKemJ; + int cbdInputLen = 64 * mlKem_eta1; + byte[] cbdInput = new byte[cbdInputLen]; try { mlKemG = MessageDigest.getInstance(HASH_G_NAME); - mlKemJ = new SHAKE256(64 * mlKem_eta1); + mlKemJ = new SHAKE256(cbdInputLen); } catch (NoSuchAlgorithmException e) { // This should never happen. throw new RuntimeException(e); @@ -671,22 +675,26 @@ public final class ML_KEM { int keyGenN = 0; byte[] prfSeed = new byte[sigma.length + 1]; System.arraycopy(sigma, 0, prfSeed, 0, sigma.length); - byte[] cbdInput; short[][] keyGenS = new short[mlKem_k][]; short[][] keyGenE = new short[mlKem_k][]; - for (int i = 0; i < mlKem_k; i++) { - prfSeed[sigma.length] = (byte) (keyGenN++); - mlKemJ.update(prfSeed); - cbdInput = mlKemJ.digest(); - keyGenS[i] = centeredBinomialDistribution(mlKem_eta1, cbdInput); - } - for (int i = 0; i < mlKem_k; i++) { - prfSeed[sigma.length] = (byte) (keyGenN++); - mlKemJ.update(prfSeed); - cbdInput = mlKemJ.digest(); - keyGenE[i] = centeredBinomialDistribution(mlKem_eta1, cbdInput); + try { + for (int i = 0; i < mlKem_k; i++) { + prfSeed[sigma.length] = (byte) (keyGenN++); + mlKemJ.update(prfSeed); + mlKemJ.digest(cbdInput, 0, cbdInputLen); + keyGenS[i] = centeredBinomialDistribution(mlKem_eta1, cbdInput); + } + for (int i = 0; i < mlKem_k; i++) { + prfSeed[sigma.length] = (byte) (keyGenN++); + mlKemJ.update(prfSeed); + mlKemJ.digest(cbdInput, 0, cbdInputLen); + keyGenE[i] = centeredBinomialDistribution(mlKem_eta1, cbdInput); + } + } catch (DigestException e) { + throw new ProviderException("Internal error", e); } Arrays.fill(sigma, (byte)0); + Arrays.fill(cbdInput, (byte)0); short[][] keyGenSHat = mlKemVectorNTT(keyGenS); mlKemVectorReduce(keyGenSHat); @@ -700,7 +708,6 @@ public final class ML_KEM { for (int i = 0; i < mlKem_k; i++) { encodePoly12(keyGenTHat[i], pkEncoded, i * ((ML_KEM_N * 12) / 8)); encodePoly12(keyGenSHat[i], skEncoded, i * ((ML_KEM_N * 12) / 8)); - Arrays.fill(keyGenEHat[i], (short) 0); Arrays.fill(keyGenSHat[i], (short) 0); } System.arraycopy(rho, 0, @@ -723,39 +730,61 @@ public final class ML_KEM { var encryptA = generateA(rho, true); short[][] encryptR = new short[mlKem_k][]; short[][] encryptE1 = new short[mlKem_k][]; + short[] encryptE2; int encryptN = 0; byte[] prfSeed = new byte[sigma.length + 1]; System.arraycopy(sigma, 0, prfSeed, 0, sigma.length); + Arrays.fill(sigma, (byte)0); - var kPkePRFeta1 = new SHAKE256(64 * mlKem_eta1); - var kPkePRFeta2 = new SHAKE256(64 * mlKem_eta2); - for (int i = 0; i < mlKem_k; i++) { - prfSeed[sigma.length] = (byte) (encryptN++); - kPkePRFeta1.update(prfSeed); - byte[] cbdInput = kPkePRFeta1.digest(); - encryptR[i] = centeredBinomialDistribution(mlKem_eta1, cbdInput); - } - for (int i = 0; i < mlKem_k; i++) { - prfSeed[sigma.length] = (byte) (encryptN++); + int cbdInput1Len = 64 * mlKem_eta1; + var kPkePRFeta1 = new SHAKE256(cbdInput1Len); + byte[] cbdInput1 = new byte[cbdInput1Len]; + int cbdInput2Len = 64 * mlKem_eta2; + var kPkePRFeta2 = new SHAKE256(cbdInput2Len); + byte[] cbdInput2 = new byte[cbdInput2Len]; + try { + for (int i = 0; i < mlKem_k; i++) { + prfSeed[sigma.length] = (byte) (encryptN++); + kPkePRFeta1.update(prfSeed); + kPkePRFeta1.digest(cbdInput1, 0, cbdInput1Len); + encryptR[i] = centeredBinomialDistribution(mlKem_eta1, cbdInput1); + } + for (int i = 0; i < mlKem_k; i++) { + prfSeed[sigma.length] = (byte) (encryptN++); + kPkePRFeta2.update(prfSeed); + kPkePRFeta2.digest(cbdInput2, 0, cbdInput2Len); + encryptE1[i] = centeredBinomialDistribution(mlKem_eta2, cbdInput2); + } + prfSeed[sigma.length] = (byte) encryptN; kPkePRFeta2.update(prfSeed); - byte[] cbdInput = kPkePRFeta2.digest(); - encryptE1[i] = centeredBinomialDistribution(mlKem_eta2, cbdInput); + kPkePRFeta2.digest(cbdInput2, 0, cbdInput2Len); + encryptE2 = centeredBinomialDistribution(mlKem_eta2, cbdInput2); + } catch (DigestException e) { + throw new ProviderException("Internal error", e); + } finally { + kPkePRFeta1.reset(); + kPkePRFeta2.reset(); + Arrays.fill(prfSeed, (byte)0); + Arrays.fill(cbdInput1, (byte)0); + Arrays.fill(cbdInput2, (byte)0); } - prfSeed[sigma.length] = (byte) encryptN; - kPkePRFeta2.reset(); - kPkePRFeta2.update(prfSeed); - byte[] cbdInput = kPkePRFeta2.digest(); - var encryptE2 = centeredBinomialDistribution(mlKem_eta2, cbdInput); var encryptRHat = mlKemVectorNTT(encryptR); var encryptUHat = mlKemMatrixVectorMuladd(encryptA, encryptRHat, zeroes); var encryptU = mlKemVectorInverseNTT(encryptUHat); encryptU = mlKemAddVec(encryptU, encryptE1); + + for (int i = 0; i < mlKem_k; i++) { + Arrays.fill(encryptE1[i], (short)0); + } + var encryptVHat = mlKemVectorScalarMult(encryptTHat, encryptRHat); var encryptV = mlKemInverseNTT(encryptVHat); encryptV = mlKemAddPoly(encryptV, encryptE2, decompressDecode(message)); var encryptC1 = encodeVector(mlKem_du, compressVector10_11(encryptU, mlKem_du)); var encryptC2 = encodePoly(mlKem_dv, compressPoly4_5(encryptV, mlKem_dv)); + Arrays.fill(encryptE2, (short)0); + Arrays.fill(encryptV, (short)0); byte[] result = new byte[encryptC1.length + encryptC2.length]; System.arraycopy(encryptC1, 0, @@ -783,9 +812,11 @@ public final class ML_KEM { Arrays.fill(decryptSHat[i], (short) 0); } decryptV = mlKemSubtractPoly(decryptV, decryptSU); + var result = encodeCompress(decryptV); Arrays.fill(decryptSU, (short) 0); + Arrays.fill(decryptV, (short) 0); - return encodeCompress(decryptV); + return result; } /* diff --git a/src/java.base/share/classes/com/sun/crypto/provider/PBES1Core.java b/src/java.base/share/classes/com/sun/crypto/provider/PBES1Core.java index e10b0b1a7cf..d614412b13b 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/PBES1Core.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/PBES1Core.java @@ -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 @@ final class PBES1Core { 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 @@ final class PBES1Core { 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 @@ final class PBES1Core { 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 @@ final class PBES1Core { 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 --git a/src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java b/src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java index 7d2ba7f9831..517d7777287 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java @@ -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 @@ final class PKCS12PBECipherCore { 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 --git a/src/java.base/share/classes/java/lang/Class.java b/src/java.base/share/classes/java/lang/Class.java index f15291827d5..b08b9fe4d2c 100644 --- a/src/java.base/share/classes/java/lang/Class.java +++ b/src/java.base/share/classes/java/lang/Class.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -323,18 +323,19 @@ public final class Class implements java.io.Serializable, } while (component.isArray()); sb.append(component.getName()); } else { - // Class modifiers are a superset of interface modifiers - int modifiers = getModifiers() & Modifier.classModifiers(); - if (modifiers != 0) { - sb.append(Modifier.toString(modifiers)); - sb.append(' '); - } + int modifiers = getModifiers(); + Reflection.appendAccessControlModifiers(sb, modifiers); + if (Modifier.isAbstract(modifiers)) + sb.append("abstract "); // Intentionally printed for interfaces + if (Modifier.isStatic(modifiers)) + sb.append("static "); + if (Modifier.isFinal(modifiers)) + sb.append("final "); - // A class cannot be strictfp and sealed/non-sealed so - // it is sufficient to check for sealed-ness after all - // modifiers are printed. addSealingInfo(modifiers, sb); + // Note: class strictfp modifier is not recoverable from a class file + if (isAnnotation()) { sb.append('@'); } diff --git a/src/java.base/share/classes/java/lang/LazyConstant.java b/src/java.base/share/classes/java/lang/LazyConstant.java index 85f9d0e82fd..77d36bb2f52 100644 --- a/src/java.base/share/classes/java/lang/LazyConstant.java +++ b/src/java.base/share/classes/java/lang/LazyConstant.java @@ -29,28 +29,35 @@ import jdk.internal.javac.PreviewFeature; import jdk.internal.lang.LazyConstantImpl; import java.io.Serializable; -import java.util.*; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; + import java.util.function.Function; import java.util.function.IntFunction; import java.util.function.Supplier; /** - * A lazy constant is a holder of contents that can be set at most once. + * A lazy constant is a holder of content that can be initialized at most once. *

* A lazy constant is created using the factory method * {@linkplain LazyConstant#of(Supplier) LazyConstant.of({@code })}. *

- * When created, the lazy constant is not initialized, meaning it has no contents. + * When created, the lazy constant is not initialized, meaning it has no content. *

* The lazy constant (of type {@code T}) can then be initialized - * (and its contents retrieved) by calling {@linkplain #get() get()}. The first time + * (and its content retrieved) by calling {@linkplain #get() get()}. The first time * {@linkplain #get() get()} is called, the underlying computing function * (provided at construction) will be invoked and the result will be used to initialize * the constant. *

- * Once a lazy constant is initialized, its contents can never change - * and will be retrieved over and over again upon subsequent {@linkplain #get() get()} - * invocations. + * Once a lazy constant is initialized, its content can never change + * and will always be returned by subsequent {@linkplain #get() get()} invocations. *

* Consider the following example where a lazy constant field "{@code logger}" holds * an object of type {@code Logger}: @@ -83,12 +90,25 @@ import java.util.function.Supplier; * may result in storage resources being prepared. * *

Exception handling

- * If the computing function returns {@code null}, a {@linkplain NullPointerException} - * is thrown. Hence, a lazy constant can never hold a {@code null} value. Clients who - * want to use a nullable constant can wrap the value into an {@linkplain Optional} holder. + * If evaluation of the computing function throws an unchecked exception (i.e., a runtime + * exception or an error), the lazy constant is not initialized but instead transitions to + * an error state whereafter a {@linkplain NoSuchElementException} is thrown with the + * unchecked exception as a cause. Subsequent {@linkplain #get() get()} calls throw + * {@linkplain NoSuchElementException} (without ever invoking the computing function + * again) with no cause and with a message that includes the name of the original + * unchecked exception's class. *

- * If the computing function recursively invokes itself via the lazy constant, an - * {@linkplain IllegalStateException} is thrown, and the lazy constant is not initialized. + * All failures are handled in this way. There are two special cases that cause unchecked + * exceptions to be thrown: + *

+ * If the computing function returns {@code null}, a {@linkplain NoSuchElementException} + * (with a {@linkplain NullPointerException} as a cause) will be thrown. Hence, a + * lazy constant can never hold a {@code null} value. Clients who want to use a nullable + * constant can wrap the value into an {@linkplain Optional} holder. + *

+ * If the computing function recursively invokes itself via the lazy constant, a + * {@linkplain NoSuchElementException} (with an {@linkplain IllegalStateException} as a + * cause) will be thrown. * *

Composing lazy constants

* A lazy constant can depend on other lazy constants, forming a dependency graph @@ -98,31 +118,25 @@ import java.util.function.Supplier; * which are held by lazy constants: * * {@snippet lang = java: - * public final class DependencyUtil { + * public static class Foo { + * // ... + * } * - * private DependencyUtil() {} - * - * public static class Foo { + * public static class Bar { + * public Bar(Foo foo) { * // ... - * } - * - * public static class Bar { - * public Bar(Foo foo) { - * // ... - * } * } + * } * - * private static final LazyConstant FOO = LazyConstant.of( Foo::new ); - * private static final LazyConstant BAR = LazyConstant.of( () -> new Bar(FOO.get()) ); + * static final LazyConstant FOO = LazyConstant.of( Foo::new ); + * static final LazyConstant BAR = LazyConstant.of( () -> new Bar(FOO.get()) ); * - * public static Foo foo() { - * return FOO.get(); - * } - * - * public static Bar bar() { - * return BAR.get(); - * } + * public static Foo foo() { + * return FOO.get(); + * } * + * public static Bar bar() { + * return BAR.get(); * } * } * Calling {@code BAR.get()} will create the {@code Bar} singleton if it is not already @@ -134,13 +148,17 @@ import java.util.function.Supplier; * competing threads are racing to initialize a lazy constant, only one updating thread * runs the computing function (which runs on the caller's thread and is hereafter denoted * the computing thread), while the other threads are blocked until the constant - * is initialized, after which the other threads observe the lazy constant is initialized - * and leave the constant unchanged and will never invoke any computation. + * is initialized (or computation fails), after which the other threads observe the lazy + * constant is initialized (or has transisioned to an error state) and leave the constant + * unchanged and will never invoke any computation. *

* The invocation of the computing function and the resulting initialization of * the constant {@linkplain java.util.concurrent##MemoryVisibility happens-before} * the initialized constant's content is read. Hence, the initialized constant's content, * including any {@code final} fields of any newly created objects, is safely published. + * As subsequent retrieval of the content might be elided, there are no other memory + * ordering or visibility guarantees provided as a consequence of calling + * {@linkplain #get()} again. *

* Thread interruption does not cancel the initialization of a lazy constant. In other * words, if the computing thread is interrupted, {@code LazyConstant::get} doesn't clear @@ -150,9 +168,9 @@ import java.util.function.Supplier; * lazy constant may block indefinitely; no timeouts or cancellations are provided. * *

Performance

- * The contents of a lazy constant can never change after the lazy constant has been + * The content of a lazy constant can never change after the lazy constant has been * initialized. Therefore, a JVM implementation may, for an initialized lazy constant, - * elide all future reads of that lazy constant's contents and instead use the contents + * elide all future reads of that lazy constant's content and instead use the content * that has been previously observed. We call this optimization constant folding. * This is only possible if there is a direct reference from a {@code static final} field * to a lazy constant or if there is a chain from a {@code static final} field -- via one @@ -160,15 +178,10 @@ import java.util.function.Supplier; * {@linkplain Record record} fields, or final instance fields in hidden classes) -- * to a lazy constant. * - *

Miscellaneous

- * Except for {@linkplain Object#equals(Object) equals(obj)} and - * {@linkplain #orElse(Object) orElse(other)} parameters, all method parameters - * must be non-null, or a {@link NullPointerException} will be thrown. - * - * @apiNote Once a lazy constant is initialized, its contents cannot ever be removed. + * @apiNote Once a lazy constant is initialized, its content can't be removed. * This can be a source of an unintended memory leak. More specifically, * a lazy constant {@linkplain java.lang.ref##reachability strongly references} - * it contents. Hence, the contents of a lazy constant will be reachable as long + * its content. Hence, the content of a lazy constant will be reachable as long * as the lazy constant itself is reachable. *

* While it's possible to store an array inside a lazy constant, doing so will @@ -185,7 +198,7 @@ import java.util.function.Supplier; * @implNote * A lazy constant is free to synchronize on itself. Hence, care must be * taken when directly or indirectly synchronizing on a lazy constant. - * A lazy constant is unmodifiable but its contents may or may not be + * A lazy constant is unmodifiable but its content may or may not be * immutable (e.g., it may hold an {@linkplain ArrayList}). * * @param type of the constant @@ -205,39 +218,24 @@ public sealed interface LazyConstant permits LazyConstantImpl { /** - * {@return the contents of this lazy constant if initialized, otherwise, - * returns {@code other}} + * {@return the initialized content of this constant, computing it if necessary} *

- * This method never triggers initialization of this lazy constant and will observe - * initialization by other threads atomically (i.e., it returns the contents - * if and only if the initialization has already completed). - * - * @param other value to return if the content is not initialized - * (can be {@code null}) - */ - T orElse(T other); - - /** - * {@return the contents of this initialized constant. If not initialized, first - * computes and initializes this constant using the computing function} + * If this constant is not initialized, first computes and initializes it + * using the computing function. *

* After this method returns successfully, the constant is guaranteed to be * initialized. *

- * If the computing function throws, the throwable is relayed to the caller and - * the lazy constant remains uninitialized; a subsequent call to get() may then - * attempt the computation again. + * If an unchecked exception is thrown when evaluating the computing function or if + * the computing function returns {@code null}, this lazy constant is not initialized + * but transitions to an error state whereafter a {@linkplain NoSuchElementException} + * is thrown as described in the {@linkplain ##exception-handling Exception handling} + * section. + * + * @throws NoSuchElementException if this lazy constant is in an error state */ T get(); - /** - * {@return {@code true} if the constant is initialized, {@code false} otherwise} - *

- * This method never triggers initialization of this lazy constant and will observe - * changes in the initialization state made by other threads atomically. - */ - boolean isInitialized(); - // Object methods /** @@ -245,7 +243,7 @@ public sealed interface LazyConstant * the provided {@code obj}, otherwise {@code false}} *

* In other words, equals compares the identity of this lazy constant and {@code obj} - * to determine equality. Hence, two distinct lazy constants with the same contents are + * to determine equality. Hence, two distinct lazy constants with the same content are * not equal. *

* This method never triggers initialization of this lazy constant. @@ -267,11 +265,11 @@ public sealed interface LazyConstant *

* This method never triggers initialization of this lazy constant and will observe * initialization by other threads atomically (i.e., it observes the - * contents if and only if the initialization has already completed). + * content if and only if the initialization has already completed). *

* If this lazy constant is initialized, an implementation-dependent string * containing the {@linkplain Object#toString()} of the - * contents will be returned; otherwise, an implementation-dependent string is + * content will be returned; otherwise, an implementation-dependent string is * returned that indicates this lazy constant is not yet initialized. */ @Override @@ -280,31 +278,41 @@ public sealed interface LazyConstant // Factory /** - * {@return a lazy constant whose contents is to be computed later via the provided - * {@code computingFunction}} + * {@return a new lazy constant whose content is to be computed later via the + * provided {@code computingFunction}} *

* The returned lazy constant strongly references the provided - * {@code computingFunction} at least until initialization completes successfully. + * {@code computingFunction} until computation completes (successfully or with + * failure). *

- * If the provided computing function is already an instance of - * {@code LazyConstant}, the method is free to return the provided computing function - * directly. + * By design, the method always returns a new lazy constant even if the provided + * computing function is already an instance of {@code LazyConstant}. Clients that + * want to elide creation under this condition can write a utility method similar + * to the one in the snippet below and create lazy constants via this method rather + * than calling the built-in factory {@linkplain #of(Supplier)} directly: * - * @implNote after initialization completes successfully, the computing function is - * no longer strongly referenced and becomes eligible for - * garbage collection. + * {@snippet lang = java: + * static LazyConstant ofFlattened(Supplier computingFunction) { + * return (computingFunction instanceof LazyConstant lc) + * ? (LazyConstant) lc // unchecked cast is safe under normal generic usage + * : LazyConstant.of(computingFunction); + * } + * } + * + * @implNote after the computing function completes (regardless of whether it + * succeeds or throws an unchecked exception), the computing function is no + * longer strongly referenced and becomes eligible for garbage collection. * * @param computingFunction in the form of a {@linkplain Supplier} to be used * to initialize the constant * @param type of the constant + * @throws NullPointerException if the provided {@code computingFunction} is + * {@code null} * */ @SuppressWarnings("unchecked") static LazyConstant of(Supplier computingFunction) { Objects.requireNonNull(computingFunction); - if (computingFunction instanceof LazyConstant lc) { - return (LazyConstant) lc; - } return LazyConstantImpl.ofLazy(computingFunction); } diff --git a/src/java.base/share/classes/java/lang/foreign/MemorySegment.java b/src/java.base/share/classes/java/lang/foreign/MemorySegment.java index 78098e39a17..70b15bb0cd7 100644 --- a/src/java.base/share/classes/java/lang/foreign/MemorySegment.java +++ b/src/java.base/share/classes/java/lang/foreign/MemorySegment.java @@ -1552,6 +1552,11 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl { *

* The {@linkplain MemorySegment#maxByteAlignment() maximum byte alignment} for * the {@code NULL} segment is of 262. + * + * @apiNote Clients should avoid using {@code ==} to compare a segment with + * {@code MemorySegment.NULL}. A segment with address {@code 0L} may be + * {@linkplain #ofAddress(long) created independently} and may therefore + * have a different identity. */ MemorySegment NULL = MemorySegment.ofAddress(0L); diff --git a/src/java.base/share/classes/java/lang/reflect/AccessFlag.java b/src/java.base/share/classes/java/lang/reflect/AccessFlag.java index 4314c8c410d..46b9ce77fd7 100644 --- a/src/java.base/share/classes/java/lang/reflect/AccessFlag.java +++ b/src/java.base/share/classes/java/lang/reflect/AccessFlag.java @@ -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 @@ -429,8 +429,6 @@ public enum AccessFlag { * * @see Class#accessFlags() * @see ClassModel#flags() - * @see Modifier#classModifiers() - * @see Modifier#interfaceModifiers() * @jvms 4.1 The {@code ClassFile} Structure */ CLASS(ACC_PUBLIC | ACC_FINAL | ACC_SUPER | @@ -450,7 +448,6 @@ public enum AccessFlag { * * @see Field#accessFlags() * @see FieldModel#flags() - * @see Modifier#fieldModifiers() * @jvms 4.5 Fields */ FIELD(ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED | @@ -466,8 +463,6 @@ public enum AccessFlag { * * @see Executable#accessFlags() * @see MethodModel#flags() - * @see Modifier#methodModifiers() - * @see Modifier#constructorModifiers() * @jvms 4.6 Methods */ METHOD(ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED | @@ -493,8 +488,6 @@ public enum AccessFlag { * * @see Class#accessFlags() * @see InnerClassInfo#flags() - * @see Modifier#classModifiers() - * @see Modifier#interfaceModifiers() * @jvms 4.7.6 The {@code InnerClasses} Attribute */ INNER_CLASS(ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED | @@ -511,7 +504,6 @@ public enum AccessFlag { * * @see Parameter#accessFlags() * @see MethodParameterInfo#flags() - * @see Modifier#parameterModifiers() * @jvms 4.7.24 The {@code MethodParameters} Attribute */ METHOD_PARAMETER(ACC_FINAL | ACC_SYNTHETIC | ACC_MANDATED, diff --git a/src/java.base/share/classes/java/lang/reflect/Constructor.java b/src/java.base/share/classes/java/lang/reflect/Constructor.java index d072971307c..b81ef99ecff 100644 --- a/src/java.base/share/classes/java/lang/reflect/Constructor.java +++ b/src/java.base/share/classes/java/lang/reflect/Constructor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2025, 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 @@ -354,12 +354,15 @@ public final class Constructor extends Executable { * @jls 8.9.2 Enum Body Declarations */ public String toString() { - return sharedToString(Modifier.constructorModifiers(), - false, - parameterTypes, + return sharedToString(parameterTypes, exceptionTypes); } + @Override + void appendModifiers(StringBuilder sb) { + Reflection.appendAccessControlModifiers(sb, getModifiers()); + } + @Override void specificToStringHeader(StringBuilder sb) { sb.append(getDeclaringClass().getTypeName()); @@ -417,7 +420,7 @@ public final class Constructor extends Executable { */ @Override public String toGenericString() { - return sharedToGenericString(Modifier.constructorModifiers(), false); + return super.toGenericString(); } @Override diff --git a/src/java.base/share/classes/java/lang/reflect/Executable.java b/src/java.base/share/classes/java/lang/reflect/Executable.java index 4f32d33048d..b20658d5dd0 100644 --- a/src/java.base/share/classes/java/lang/reflect/Executable.java +++ b/src/java.base/share/classes/java/lang/reflect/Executable.java @@ -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 @@ -93,31 +93,15 @@ public abstract sealed class Executable extends AccessibleObject getDeclaringClass()); } - void printModifiersIfNonzero(StringBuilder sb, int mask, boolean isDefault) { - int mod = getModifiers() & mask; + // Appends source modifiers of this declaration to a display string builder. + abstract void appendModifiers(StringBuilder sb); - if (mod != 0 && !isDefault) { - sb.append(Modifier.toString(mod)).append(' '); - } else { - int access_mod = mod & Modifier.ACCESS_MODIFIERS; - if (access_mod != 0) - sb.append(Modifier.toString(access_mod)).append(' '); - if (isDefault) - sb.append("default "); - mod = (mod & ~Modifier.ACCESS_MODIFIERS); - if (mod != 0) - sb.append(Modifier.toString(mod)).append(' '); - } - } - - String sharedToString(int modifierMask, - boolean isDefault, - Class[] parameterTypes, + String sharedToString(Class[] parameterTypes, Class[] exceptionTypes) { try { StringBuilder sb = new StringBuilder(); - printModifiersIfNonzero(sb, modifierMask, isDefault); + appendModifiers(sb); specificToStringHeader(sb); sb.append(Arrays.stream(parameterTypes) .map(Type::getTypeName) @@ -151,11 +135,11 @@ public abstract sealed class Executable extends AccessibleObject } } - String sharedToGenericString(int modifierMask, boolean isDefault) { + String sharedToGenericString() { try { StringBuilder sb = new StringBuilder(); - printModifiersIfNonzero(sb, modifierMask, isDefault); + appendModifiers(sb); TypeVariable[] typeparms = getTypeParameters(); if (typeparms.length > 0) { @@ -548,7 +532,9 @@ public abstract sealed class Executable extends AccessibleObject * {@return a string describing this {@code Executable}, including * any type parameters} */ - public abstract String toGenericString(); + public String toGenericString() { + return sharedToGenericString(); + } /** * {@return {@code true} if this executable was declared to take a diff --git a/src/java.base/share/classes/java/lang/reflect/Field.java b/src/java.base/share/classes/java/lang/reflect/Field.java index a4f0afa0199..d9bafaa0082 100644 --- a/src/java.base/share/classes/java/lang/reflect/Field.java +++ b/src/java.base/share/classes/java/lang/reflect/Field.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2025, 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 @@ -367,11 +367,24 @@ class Field extends AccessibleObject implements Member { * @jls 8.3.1 Field Modifiers */ public String toString() { - int mod = getModifiers() & Modifier.fieldModifiers(); - return (((mod == 0) ? "" : (Modifier.toString(mod) + " ")) + return modifierPrefix() + getType().getTypeName() + " " + getDeclaringClass().getTypeName() + "." - + getName()); + + getName(); + } + + private String modifierPrefix() { + StringBuilder sb = new StringBuilder(); + Reflection.appendAccessControlModifiers(sb, modifiers); + if (Modifier.isStatic(modifiers)) + sb.append("static "); + if (Modifier.isFinal(modifiers)) + sb.append("final "); + if (Modifier.isTransient(modifiers)) + sb.append("transient "); + if (Modifier.isVolatile(modifiers)) + sb.append("volatile "); + return sb.toString(); } @Override @@ -400,12 +413,11 @@ class Field extends AccessibleObject implements Member { * @jls 8.3.1 Field Modifiers */ public String toGenericString() { - int mod = getModifiers() & Modifier.fieldModifiers(); Type fieldType = getGenericType(); - return (((mod == 0) ? "" : (Modifier.toString(mod) + " ")) + return modifierPrefix() + fieldType.getTypeName() + " " + getDeclaringClass().getTypeName() + "." - + getName()); + + getName(); } /** diff --git a/src/java.base/share/classes/java/lang/reflect/Method.java b/src/java.base/share/classes/java/lang/reflect/Method.java index 07616206075..b48e70e1717 100644 --- a/src/java.base/share/classes/java/lang/reflect/Method.java +++ b/src/java.base/share/classes/java/lang/reflect/Method.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2025, 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 @@ -398,12 +398,30 @@ public final class Method extends Executable { * @jls 9.6.1 Annotation Interface Elements */ public String toString() { - return sharedToString(Modifier.methodModifiers(), - isDefault(), - parameterTypes, + return sharedToString(parameterTypes, exceptionTypes); } + @Override + void appendModifiers(StringBuilder sb) { + int mods = getModifiers(); + Reflection.appendAccessControlModifiers(sb, mods); + if (Modifier.isAbstract(mods)) + sb.append("abstract "); + if (isDefault()) + sb.append("default "); + if (Modifier.isStatic(mods)) + sb.append("static "); + if (Modifier.isFinal(mods)) + sb.append("final "); + if (Modifier.isSynchronized(mods)) + sb.append("synchronized "); + if (Modifier.isNative(mods)) + sb.append("native "); + if (Modifier.isStrict(mods)) + sb.append("strictfp "); + } + @Override void specificToStringHeader(StringBuilder sb) { sb.append(getReturnType().getTypeName()).append(' '); @@ -469,7 +487,7 @@ public final class Method extends Executable { */ @Override public String toGenericString() { - return sharedToGenericString(Modifier.methodModifiers(), isDefault()); + return super.toGenericString(); } @Override diff --git a/src/java.base/share/classes/java/lang/reflect/Modifier.java b/src/java.base/share/classes/java/lang/reflect/Modifier.java index 624f32b4e04..450e549d4b9 100644 --- a/src/java.base/share/classes/java/lang/reflect/Modifier.java +++ b/src/java.base/share/classes/java/lang/reflect/Modifier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2025, 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 @@ -28,30 +28,38 @@ package java.lang.reflect; import java.util.StringJoiner; /** - * The Modifier class provides {@code static} methods and - * constants to decode class and member access modifiers. The sets of - * modifiers are represented as integers with distinct bit positions - * representing different modifiers. The values for the constants - * representing the modifiers are taken from the tables in sections - * {@jvms 4.1}, {@jvms 4.4}, {@jvms 4.5}, and {@jvms 4.7} of - * The Java Virtual Machine Specification. + * Provides {@code static} methods and constants to decode {@linkplain + * AccessFlag classfile access and property flags} with corresponding + * {@linkplain java.compiler/javax.lang.model.element.Modifier Java + * language modifiers}. + *

+ * Modifier interpretation is context-sensitive: for example, the {@link + * #isSynchronized(int) isSynchronized} check is only meaningful for method + * access flags, representing the {@code synchronized} modifier on methods. + * A {@code true} return on a field access flags does not indicate that field + * has the {@code synchronized} modifier. * * @apiNote - * Not all modifiers that are syntactic Java language modifiers are - * represented in this class, only those modifiers that also - * have a corresponding JVM {@linkplain AccessFlag access flag} are - * included. In particular the {@code default} method modifier (JLS - * {@jls 9.4.3}) and the {@code sealed} and {@code non-sealed} class - * (JLS {@jls 8.1.1.2}) and interface (JLS {@jls 9.1.1.4}) modifiers - * are not represented in this class. + * The mappings from classfile access flags to Java language modifiers have + * {@linkplain java.lang.reflect##LanguageJvmModel diverged} during the + * evolution of the Java SE Platform. Many access flags and Java language + * modifiers are not represented in this class; the mappings represented in this + * class are not sufficient to reconstruct Java langugage modifiers from access + * flags, and vice versa. * + * @see AccessFlag + * @see java.compiler/javax.lang.model.element.Modifier + * @see java.lang.reflect##LanguageJvmModel + * Java programming language and JVM modeling in core reflection * @see Class#getModifiers() * @see Member#getModifiers() + * @see Parameter#getModifiers() * * @author Nakul Saraiya * @author Kenneth Russell * @since 1.1 */ +@SuppressWarnings("doclint:reference") // cross-module link public final class Modifier { /** * Do not call. @@ -224,33 +232,24 @@ public final class Modifier { * return a string of modifiers that are not valid modifiers of a * Java entity; in other words, no checking is done on the * possible validity of the combination of modifiers represented - * by the input. + * by the input. This method also omits all access flags without + * a corresponding source modifier. * - * Note that to perform such checking for a known kind of entity, - * such as a constructor or method, first AND the argument of - * {@code toString} with the appropriate mask from a method like - * {@link #constructorModifiers} or {@link #methodModifiers}. - * - * @apiNote - * To make a high-fidelity representation of the Java source - * modifiers of a class or member, source-level modifiers that do - * not have a constant in this class should be included - * and appear in an order consistent with the full recommended - * ordering for that kind of declaration as given in The - * Java Language Specification. For example, for a - * {@linkplain Method#toGenericString() method} the "{@link - * Method#isDefault() default}" modifier is ordered immediately - * before "{@code static}" (JLS {@jls 9.4}). For a {@linkplain - * Class#toGenericString() class object}, the "{@link - * Class#isSealed() sealed}" or {@code "non-sealed"} modifier is - * ordered immediately after "{@code final}" for a class (JLS - * {@jls 8.1.1}) and immediately after "{@code static}" for an - * interface (JLS {@jls 9.1.1}). + * @deprecated + * Modifier interpretation is context-sensitive; this API may report an + * incomplete or incorrect list of Java language modifiers. The mappings + * from {@code class} file access flags to Java language modifiers have + * {@linkplain java.lang.reflect##LanguageJvmModel diverged} during the + * evolution of the Java SE Platform. + *

+ * Use {@link AccessFlag} to examine access flags; {@code toGenericString} + * methods on reflective objects print Java language modifiers. * * @param mod a set of modifiers * @return a string representation of the set of modifiers * represented by {@code mod} */ + @Deprecated(since = "27") public static String toString(int mod) { StringJoiner sj = new StringJoiner(" "); @@ -439,20 +438,24 @@ public final class Modifier { private static final int PARAMETER_MODIFIERS = Modifier.FINAL; - static final int ACCESS_MODIFIERS = - Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE; - /** * Return an {@code int} value OR-ing together the source language * modifiers that can be applied to a class. * @return an {@code int} value OR-ing together the source language * modifiers that can be applied to a class. * + * @deprecated + * This method was originally created to support the now-deprecated + * {@link #toString(int) Modifier::toString(int)} method. + * Use {@link AccessFlag.Location} to inspect structure-specific + * access modifier properties. + * * @see AccessFlag.Location#CLASS * @see AccessFlag.Location#INNER_CLASS * @jls 8.1.1 Class Modifiers * @since 1.7 */ + @Deprecated(since = "27") public static int classModifiers() { return CLASS_MODIFIERS; } @@ -463,11 +466,18 @@ public final class Modifier { * @return an {@code int} value OR-ing together the source language * modifiers that can be applied to an interface. * + * @deprecated + * This method was originally created to support the now-deprecated + * {@link #toString(int) Modifier::toString(int)} method. + * Use {@link AccessFlag.Location} to inspect structure-specific + * access modifier properties. + * * @see AccessFlag.Location#CLASS * @see AccessFlag.Location#INNER_CLASS * @jls 9.1.1 Interface Modifiers * @since 1.7 */ + @Deprecated(since = "27") public static int interfaceModifiers() { return INTERFACE_MODIFIERS; } @@ -478,10 +488,17 @@ public final class Modifier { * @return an {@code int} value OR-ing together the source language * modifiers that can be applied to a constructor. * + * @deprecated + * This method was originally created to support the now-deprecated + * {@link #toString(int) Modifier::toString(int)} method. + * Use {@link AccessFlag.Location} to inspect structure-specific + * access modifier properties. + * * @see AccessFlag.Location#METHOD * @jls 8.8.3 Constructor Modifiers * @since 1.7 */ + @Deprecated(since = "27") public static int constructorModifiers() { return CONSTRUCTOR_MODIFIERS; } @@ -492,10 +509,17 @@ public final class Modifier { * @return an {@code int} value OR-ing together the source language * modifiers that can be applied to a method. * + * @deprecated + * This method was originally created to support the now-deprecated + * {@link #toString(int) Modifier::toString(int)} method. + * Use {@link AccessFlag.Location} to inspect structure-specific + * access modifier properties. + * * @see AccessFlag.Location#METHOD * @jls 8.4.3 Method Modifiers * @since 1.7 */ + @Deprecated(since = "27") public static int methodModifiers() { return METHOD_MODIFIERS; } @@ -506,10 +530,17 @@ public final class Modifier { * @return an {@code int} value OR-ing together the source language * modifiers that can be applied to a field. * + * @deprecated + * This method was originally created to support the now-deprecated + * {@link #toString(int) Modifier::toString(int)} method. + * Use {@link AccessFlag.Location} to inspect structure-specific + * access modifier properties. + * * @see AccessFlag.Location#FIELD * @jls 8.3.1 Field Modifiers * @since 1.7 */ + @Deprecated(since = "27") public static int fieldModifiers() { return FIELD_MODIFIERS; } @@ -520,10 +551,17 @@ public final class Modifier { * @return an {@code int} value OR-ing together the source language * modifiers that can be applied to a parameter. * + * @deprecated + * This method was originally created to support the now-deprecated + * {@link #toString(int) Modifier::toString(int)} method. + * Use {@link AccessFlag.Location} to inspect structure-specific + * access modifier properties. + * * @see AccessFlag.Location#METHOD_PARAMETER * @jls 8.4.1 Formal Parameters * @since 1.8 */ + @Deprecated(since = "27") public static int parameterModifiers() { return PARAMETER_MODIFIERS; } diff --git a/src/java.base/share/classes/java/lang/reflect/Parameter.java b/src/java.base/share/classes/java/lang/reflect/Parameter.java index 8ecf8060615..cc06ae02f84 100644 --- a/src/java.base/share/classes/java/lang/reflect/Parameter.java +++ b/src/java.base/share/classes/java/lang/reflect/Parameter.java @@ -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 @@ -126,10 +126,9 @@ public final class Parameter implements AnnotatedElement { final Type type = getParameterizedType(); final String typename = type.getTypeName(); - sb.append(Modifier.toString(getModifiers() & Modifier.parameterModifiers() )); - - if(0 != modifiers) - sb.append(' '); + if (Modifier.isFinal(modifiers)) { + sb.append("final "); + } if(isVarArgs()) sb.append(typename.replaceFirst("\\[\\]$", "...")); diff --git a/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java b/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java index 087d2cc23a9..1ccffaa61bb 100644 --- a/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java +++ b/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java @@ -131,13 +131,15 @@ public final class SwitchBootstraps { /** * Bootstrap method for linking an {@code invokedynamic} call site that - * implements a {@code switch} on a target of a reference type. The static - * arguments are an array of case labels which must be non-null and of type - * {@code String} or {@code Integer} or {@code Class} or {@code EnumDesc}. + * implements a {@code switch} over a target value. The static arguments + * {@code labels} are an array of case labels which must be non-null and of + * type {@code String}, {@code Integer}, {@code Class}, or {@code EnumDesc}. + * In addition, when preview features are enabled, {@code Long}, {@code Float}, + * {@code Double}, and {@code Boolean} labels are also permitted. *

* The type of the returned {@code CallSite}'s method handle will have * a return type of {@code int}. It has two parameters: the first argument - * will be an {@code Object} instance ({@code target}) and the second + * will be a value of the ({@code target}) type and the second * will be {@code int} ({@code restart}). *

* If the {@code target} is {@code null}, then the method of the call site @@ -148,11 +150,16 @@ public final class SwitchBootstraps { * the {@code restart} index matching one of the following conditions: *

    *
  • the element is of type {@code Class} that is assignable - * from the target's class; or
  • - *
  • the element is of type {@code String} or {@code Integer} and - * equals to the target.
  • - *
  • the element is of type {@code EnumDesc}, that describes a constant that is - * equals to the target.
  • + * from the target's class + *
  • the element is of type {@code String} and {@code equals} to the target
  • + *
  • the element is of type {@code Integer} and {@code ==} to the target after + * unboxing if necessary
  • + *
  • (Preview) the element is of type {@code Long} or {@code Boolean} + * and {@code ==} to the target after unboxing if necessary
  • + *
  • (Preview) the element is of type {@code Float} or {@code Double} + * and {@code equals} to the target after boxing if necessary
  • + *
  • the element is of type {@code EnumDesc}, that describes an enum constant + * that is {@code ==} to the target
  • *
*

* If no element in the {@code labels} array matches the target, then @@ -167,9 +174,8 @@ public final class SwitchBootstraps { * this is stacked automatically by the VM. * @param invocationName unused, {@code null} is permitted * @param invocationType The invocation type of the {@code CallSite} with two parameters, - * a reference type, an {@code int}, and {@code int} as a return type. - * @param labels case labels - {@code String} and {@code Integer} constants - * and {@code Class} and {@code EnumDesc} instances, in any combination + * a target type, an {@code int}, and {@code int} as a return type. + * @param labels case labels as described above * @return a {@code CallSite} returning the first matching element as described above * * @throws NullPointerException if any argument is {@code null}, unless noted otherwise @@ -179,8 +185,8 @@ public final class SwitchBootstraps { * @throws IllegalArgumentException if {@code labels} contains an element that is not of type {@code String}, * {@code Integer}, {@code Long}, {@code Float}, {@code Double}, {@code Boolean}, * {@code Class} or {@code EnumDesc} - * @throws IllegalArgumentException if {@code labels} contains an element that is not of type {@code Boolean} - * when {@code target} is a {@code Boolean.class} + * @throws IllegalArgumentException if preview features are disabled and if {@code labels} contains an element + * that is of type {@code Long}, {@code Float}, {@code Double}, or {@code Boolean} * @jvms 4.4.6 The CONSTANT_NameAndType_info Structure * @jvms 4.4.10 The CONSTANT_Dynamic_info and CONSTANT_InvokeDynamic_info Structures */ @@ -221,7 +227,6 @@ public final class SwitchBootstraps { labelClass != Long.class && labelClass != Double.class && labelClass != Boolean.class) || - ((selectorType.equals(boolean.class) || selectorType.equals(Boolean.class)) && labelClass != Boolean.class && labelClass != Class.class) || !previewEnabled) && labelClass != EnumDesc.class) { diff --git a/src/java.base/share/classes/java/math/BigDecimal.java b/src/java.base/share/classes/java/math/BigDecimal.java index 6e651b4fde2..3cfe18e84c3 100644 --- a/src/java.base/share/classes/java/math/BigDecimal.java +++ b/src/java.base/share/classes/java/math/BigDecimal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2025, 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 @@ -155,6 +155,7 @@ import jdk.internal.vm.annotation.Stable; * Multiplymultiplier.scale() + multiplicand.scale() * Dividedividend.scale() - divisor.scale() * Square rootceil(radicand.scale()/2.0) + * nth rootceil((double) radicand.scale()/n) * * * @@ -2142,149 +2143,224 @@ public class BigDecimal extends Number implements Comparable { * @since 9 */ public BigDecimal sqrt(MathContext mc) { + return rootn(2, mc); + } + + /** + * Returns an approximation to the {@code n}th root of {@code this} + * with rounding according to the context settings. + * + *

The preferred scale of the returned result is equal to + * {@code Math.ceilDiv(this.scale(), n)}. The value of the returned result is + * always within one ulp of the exact decimal value for the + * precision in question. If the rounding mode is {@link + * RoundingMode#HALF_UP HALF_UP}, {@link RoundingMode#HALF_DOWN + * HALF_DOWN}, or {@link RoundingMode#HALF_EVEN HALF_EVEN}, the + * result is within one half an ulp of the exact decimal value. + * + *

Special case: + *

    + *
  • The {@code n}th root of a number numerically equal to {@code + * ZERO} is numerically equal to {@code ZERO} with a preferred + * scale according to the general rule above. In particular, for + * {@code ZERO}, {@code ZERO.rootn(n, mc).equals(ZERO)} is true with + * any {@code MathContext} as an argument. + *
+ * + * @param n the root degree + * @param mc the context to use. + * @return the {@code n}th root of {@code this}. + * @throws ArithmeticException if {@code n == 0 || n == Integer.MIN_VALUE}. + * @throws ArithmeticException if {@code n} is even and {@code this} is negative. + * @throws ArithmeticException if {@code n} is negative and {@code this} is zero. + * @throws ArithmeticException if an exact result is requested + * ({@code mc.getPrecision() == 0}) and there is no finite decimal + * expansion of the exact result + * @throws ArithmeticException if + * {@code (mc.getRoundingMode() == RoundingMode.UNNECESSARY}) and + * the exact result cannot fit in {@code mc.getPrecision()} digits. + * @see #sqrt(MathContext) + * @see BigInteger#rootn(int) + * @since 27 + * @apiNote Note that calling {@code rootn(2, mc)} is equivalent to calling {@code sqrt(mc)}. + */ + public BigDecimal rootn(int n, MathContext mc) { + // Special cases + if (n == 0) + throw new ArithmeticException("Zero root degree"); + final int signum = signum(); - if (signum != 1) { - switch (signum) { - case -1 -> throw new ArithmeticException("Attempted square root of negative BigDecimal"); - case 0 -> { - BigDecimal result = valueOf(0L, scale/2); - assert squareRootResultAssertions(result, mc); - return result; - } - default -> throw new AssertionError("Bad value from signum"); - } + if (signum < 0 && (n & 1) == 0) + throw new ArithmeticException("Negative radicand with even root degree"); + + final int preferredScale = saturateLong(Math.ceilDiv((long) this.scale, n)); + if (signum == 0) { + if (n < 0) + throw new ArithmeticException("Zero radicand with negative root degree"); + + return zeroValueOf(preferredScale); } + /* * The main steps of the algorithm below are as follows, * first argument reduce the value to an integer - * using the following relations: + * using the following relations, assuming n > 0: * * x = y * 10 ^ exp - * sqrt(x) = sqrt(y) * 10^(exp / 2) if exp is even - * sqrt(x) = sqrt(y*10) * 10^((exp-1)/2) is exp is odd + * rootn(x, n) = rootn(y, n) * 10^(exp / n) if exp mod n == 0 + * rootn(x, n) = rootn(y*10^(exp mod n), n) * 10^((exp - (exp mod n))/n) otherwise * - * Then use BigInteger.sqrt() on the reduced value to compute + * where exp mod n == Math.floorMod(exp, n). + * + * Then use BigInteger.rootn() on the reduced value to compute * the numerical digits of the desired result. * * Finally, scale back to the desired exponent range and * perform any adjustment to get the preferred scale in the * representation. */ - - // The code below favors relative simplicity over checking - // for special cases that could run faster. - final int preferredScale = Math.ceilDiv(this.scale, 2); - + final int nAbs = Math.absExact(n); BigDecimal result; if (mc.roundingMode == RoundingMode.UNNECESSARY || mc.precision == 0) { // Exact result requested // To avoid trailing zeros in the result, strip trailing zeros. final BigDecimal stripped = this.stripTrailingZeros(); - final int strippedScale = stripped.scale; - if ((strippedScale & 1) != 0) // 10*stripped.unscaledValue() can't be an exact square - throw new ArithmeticException("Computed square root not exact."); - - // Check for even powers of 10. Numerically sqrt(10^2N) = 10^N - if (stripped.isPowerOfTen()) { - result = valueOf(1L, strippedScale >> 1); - // Adjust to requested precision and preferred - // scale as appropriate. - return result.adjustToPreferredScale(preferredScale, mc.precision); - } + // if stripped.scale is not a multiple of n, + // 10^((-stripped.scale) mod n)*stripped.unscaledValue() can't be an exact power + if (stripped.scale % n != 0) + throw new ArithmeticException("Computed root not exact."); // After stripTrailingZeros, the representation is normalized as // // unscaledValue * 10^(-scale) // // where unscaledValue is an integer with the minimum - // precision for the cohort of the numerical value and the scale is even. - BigInteger[] sqrtRem = stripped.unscaledValue().sqrtAndRemainder(); - result = new BigDecimal(sqrtRem[0], strippedScale >> 1); + // precision for the cohort of the numerical value and the scale is a multiple of n. + BigInteger[] rootRem = stripped.unscaledValue().rootnAndRemainder(nAbs); + result = new BigDecimal(rootRem[0], stripped.scale / nAbs); + // If result^nAbs != this numerically, the root isn't exact + if (rootRem[1].signum != 0) + throw new ArithmeticException("Computed root not exact."); - // If result*result != this numerically or requires too high precision, - // the square root isn't exact - if (sqrtRem[1].signum != 0 || mc.precision != 0 && result.precision() > mc.precision) - throw new ArithmeticException("Computed square root not exact."); - - // Test numerical properties at full precision before any - // scale adjustments. - assert squareRootResultAssertions(result, mc); - // Adjust to requested precision and preferred - // scale as appropriate. + if (n > 0) { + // If result requires too high precision, the root isn't exact + if (mc.precision != 0 && result.precision() > mc.precision) + throw new ArithmeticException("Computed root not exact."); + } else { + try { + result = ONE.divide(result, mc); + } catch (ArithmeticException e) { + // The exact result requires too high precision, + // including non-terminating decimal expansions + throw new ArithmeticException("Computed root not exact."); + } + } + // Test numerical properties at full precision before any scale adjustments. + assert rootnResultAssertions(result, mc, n); + // Adjust to requested precision and preferred scale as appropriate. return result.adjustToPreferredScale(preferredScale, mc.precision); } - // To allow BigInteger.sqrt() to be used to get the square - // root, it is necessary to normalize the input so that - // its integer part is sufficient to get the square root + + // Handle negative radicands + BigDecimal x = this; + if (signum < 0) { + x = x.negate(); + if (mc.roundingMode == RoundingMode.FLOOR) { + mc = new MathContext(mc.precision, RoundingMode.UP); + } else if (mc.roundingMode == RoundingMode.CEILING) { + mc = new MathContext(mc.precision, RoundingMode.DOWN); + } + } + + // To allow BigInteger.rootn() to be used to get the root, + // it is necessary to normalize the input so that + // its integer part is sufficient to get the root // with the desired precision. final boolean halfWay = isHalfWay(mc.roundingMode); - // To obtain a square root with N digits, - // the radicand must have at least 2*(N-1)+1 == 2*N-1 digits. - final long minWorkingPrec = ((mc.precision + (halfWay ? 1L : 0L)) << 1) - 1L; - // normScale is the number of digits to take from the fraction of the input - long normScale = minWorkingPrec - this.precision() + this.scale; - normScale += normScale & 1L; // the scale for normalizing must be even + final long rootDigits = mc.precision + (halfWay ? 1L : 0L); + // To obtain an n-th root with k digits, + // the radicand must have at least n*(k-1)+1 digits. + final long minWorkingPrec = nAbs * (rootDigits - 1L) + 1L; - final long workingScale = this.scale - normScale; - if (workingScale != (int) workingScale) - throw new ArithmeticException("Overflow"); + long normScale; // the number of digits to take from the fraction of the input + BigDecimal working = null, xInv = null; + BigInteger workingInt; + if (n > 0) { + normScale = minWorkingPrec - x.precision() + x.scale; + int mod = Math.floorMod(normScale, n); + if (mod != 0) // the scale for normalizing must be a multiple of n + normScale += n - mod; - BigDecimal working = new BigDecimal(this.intVal, this.intCompact, (int) workingScale, this.precision); - BigInteger workingInt = working.toBigInteger(); + working = new BigDecimal(x.intVal, x.intCompact, checkScaleNonZero(x.scale - normScale), x.precision); + workingInt = working.toBigInteger(); + } else { // Handle negative degrees + /* Computing the n-th root of x is equivalent + * to computing the (-n)-th root of 1/x. + */ + // Compute the scale for xInv, in order to ensure + // that xInv's precision is at least minWorkingPrec + final int fracZeros = x.precision() - 1 - (x.isPowerOfTen() ? 1 : 0); + normScale = minWorkingPrec + fracZeros - x.scale; + int mod = Math.floorMod(normScale, nAbs); + if (mod != 0) + normScale += nAbs - mod; - BigInteger sqrt; - long resultScale = normScale >> 1; - // Round sqrt with the specified settings + xInv = ONE.divide(x, checkScaleNonZero(normScale), RoundingMode.DOWN); + workingInt = xInv.unscaledValue(); + } + + // Compute and round the root with the specified settings + BigInteger root; + long resultScale = normScale / nAbs; + boolean increment = false; if (halfWay) { // half-way rounding - BigInteger workingSqrt = workingInt.sqrt(); + BigInteger[] rootRem = workingInt.rootnAndRemainder(nAbs); // remove the one-tenth digit - BigInteger[] quotRem10 = workingSqrt.divideAndRemainder(BigInteger.TEN); - sqrt = quotRem10[0]; + BigInteger[] quotRem10 = rootRem[0].divideAndRemainder(BigInteger.TEN); + root = quotRem10[0]; resultScale--; - boolean increment = false; int digit = quotRem10[1].intValue(); if (digit > 5) { increment = true; } else if (digit == 5) { if (mc.roundingMode == RoundingMode.HALF_UP - || mc.roundingMode == RoundingMode.HALF_EVEN && sqrt.testBit(0) + || mc.roundingMode == RoundingMode.HALF_EVEN && root.testBit(0) // Check if remainder is non-zero - || !workingInt.equals(workingSqrt.multiply(workingSqrt)) - || !working.isInteger()) { + || rootRem[1].signum != 0 + || (n > 0 ? !working.isInteger() : xInv.multiply(x).compareMagnitude(ONE) != 0)) { increment = true; } } - - if (increment) - sqrt = sqrt.add(1L); } else { switch (mc.roundingMode) { - case DOWN, FLOOR -> sqrt = workingInt.sqrt(); // No need to round + case DOWN, FLOOR -> root = workingInt.rootn(nAbs); // No need to round case UP, CEILING -> { - BigInteger[] sqrtRem = workingInt.sqrtAndRemainder(); - sqrt = sqrtRem[0]; + BigInteger[] rootRem = workingInt.rootnAndRemainder(nAbs); + root = rootRem[0]; // Check if remainder is non-zero - if (sqrtRem[1].signum != 0 || !working.isInteger()) - sqrt = sqrt.add(1L); + if (rootRem[1].signum != 0 + || (n > 0 ? !working.isInteger() : xInv.multiply(x).compareMagnitude(ONE) != 0)) + increment = true; } default -> throw new AssertionError("Unexpected value for RoundingMode: " + mc.roundingMode); } } + if (increment) { + root = root.add(1L); + } - result = new BigDecimal(sqrt, checkScale(sqrt, resultScale), mc); // mc ensures no increase of precision - // Test numerical properties at full precision before any - // scale adjustments. - assert squareRootResultAssertions(result, mc); - // Adjust to requested precision and preferred - // scale as appropriate. - if (result.scale > preferredScale) // else can't increase the result's precision to fit the preferred scale + result = new BigDecimal(root, checkScale(root, resultScale), mc); // mc ensures no increase of precision + // Test numerical properties at full precision before any scale adjustments. + assert rootnResultAssertions(result, mc, n); + // Adjust to requested precision and preferred scale as appropriate. + if (result.scale > preferredScale) // else can't increase result's precision to fit the preferred scale result = stripZerosToMatchScale(result.intVal, result.intCompact, result.scale, preferredScale); - return result; + return signum > 0 ? result : result.negate(); } /** @@ -2315,12 +2391,8 @@ public class BigDecimal extends Number implements Comparable { }; } - private BigDecimal square() { - return this.multiply(this); - } - private boolean isPowerOfTen() { - return BigInteger.ONE.equals(this.unscaledValue()); + return this.stripTrailingZeros().unscaledValue().equals(BigInteger.ONE); } /** @@ -2331,92 +2403,102 @@ public class BigDecimal extends Number implements Comparable { * *
    * - *
  • For DOWN and FLOOR, result^2 must be {@code <=} the input - * and (result+ulp)^2 must be {@code >} the input. + *
  • For DOWN and FLOOR if input > 0 and CEIL if input < 0, + * |result|^n must be {@code <=} |input| + * and (|result|+ulp)^n must be {@code >} |input|. * - *
  • Conversely, for UP and CEIL, result^2 must be {@code >=} - * the input and (result-ulp)^2 must be {@code <} the input. + *
  • Conversely, for UP and FLOOR if input < 0 and CEIL if input > 0, + * |result|^n must be {@code >=} |input| + * and (|result|-ulp)^n must be {@code <} |input|. *
*/ - private boolean squareRootResultAssertions(BigDecimal result, MathContext mc) { - if (result.signum() == 0) { - return squareRootZeroResultAssertions(result, mc); - } else { - RoundingMode rm = mc.getRoundingMode(); - BigDecimal ulp = result.ulp(); - BigDecimal neighborUp = result.add(ulp); - // Make neighbor down accurate even for powers of ten - if (result.isPowerOfTen()) { - ulp = ulp.divide(TEN); - } - BigDecimal neighborDown = result.subtract(ulp); - - // Both the starting value and result should be nonzero and positive. - assert (result.signum() == 1 && - this.signum() == 1) : - "Bad signum of this and/or its sqrt."; - - switch (rm) { - case DOWN: - case FLOOR: - assert - result.square().compareTo(this) <= 0 && - neighborUp.square().compareTo(this) > 0: - "Square of result out for bounds rounding " + rm; - return true; - - case UP: - case CEILING: - assert - result.square().compareTo(this) >= 0 && - neighborDown.square().compareTo(this) < 0: - "Square of result out for bounds rounding " + rm; - return true; - - - case HALF_DOWN: - case HALF_EVEN: - case HALF_UP: - BigDecimal err = result.square().subtract(this).abs(); - BigDecimal errUp = neighborUp.square().subtract(this); - BigDecimal errDown = this.subtract(neighborDown.square()); - // All error values should be positive so don't need to - // compare absolute values. - - int err_comp_errUp = err.compareTo(errUp); - int err_comp_errDown = err.compareTo(errDown); - - assert - errUp.signum() == 1 && - errDown.signum() == 1 : - "Errors of neighbors squared don't have correct signs"; - - // For breaking a half-way tie, the return value may - // have a larger error than one of the neighbors. For - // example, the square root of 2.25 to a precision of - // 1 digit is either 1 or 2 depending on how the exact - // value of 1.5 is rounded. If 2 is returned, it will - // have a larger rounding error than its neighbor 1. - assert - err_comp_errUp <= 0 || - err_comp_errDown <= 0 : - "Computed square root has larger error than neighbors for " + rm; - - assert - ((err_comp_errUp == 0 ) ? err_comp_errDown < 0 : true) && - ((err_comp_errDown == 0 ) ? err_comp_errUp < 0 : true) : - "Incorrect error relationships"; - // && could check for digit conditions for ties too - return true; - - default: // Definition of UNNECESSARY already verified. - return true; + private boolean rootnResultAssertions(BigDecimal result, MathContext mc, int n) { + BigDecimal rad = this.abs(), resAbs = result.abs(); + RoundingMode rm = mc.roundingMode; + if (this.signum() < 0) { + if (rm == RoundingMode.FLOOR) { + rm = RoundingMode.UP; + } else if (rm == RoundingMode.CEILING) { + rm = RoundingMode.DOWN; } } - } - private boolean squareRootZeroResultAssertions(BigDecimal result, MathContext mc) { - return this.compareTo(ZERO) == 0; + int nAbs = Math.abs(n); + BigDecimal ulp = resAbs.ulp(); + BigDecimal neighborUp = resAbs.add(ulp); + // Make neighbor down accurate even for powers of ten + if (resAbs.isPowerOfTen()) { + ulp = ulp.scaleByPowerOfTen(-1); + } + BigDecimal neighborDown = resAbs.subtract(ulp); + + switch (rm) { + case DOWN: + case FLOOR: + assert + (n > 0 ? resAbs.pow(nAbs).compareTo(rad) <= 0 && + neighborUp.pow(nAbs).compareTo(rad) > 0 + : resAbs.pow(nAbs).multiply(rad).compareTo(ONE) <= 0 && + neighborUp.pow(nAbs).multiply(rad).compareTo(ONE) > 0) + : "Power of result out for bounds rounding " + rm; + return true; + + case UP: + case CEILING: + assert + (n > 0 ? resAbs.pow(nAbs).compareTo(rad) >= 0 && + neighborDown.pow(nAbs).compareTo(rad) < 0 + : resAbs.pow(nAbs).multiply(rad).compareTo(ONE) >= 0 && + neighborDown.pow(nAbs).multiply(rad).compareTo(ONE) < 0) + : "Power of result out for bounds rounding " + rm; + return true; + + + case HALF_DOWN: + case HALF_EVEN: + case HALF_UP: + BigDecimal err, errUp, errDown; + if (n > 0) { + err = resAbs.pow(nAbs).subtract(rad).abs(); + errUp = neighborUp.pow(nAbs).subtract(rad); + errDown = rad.subtract(neighborDown.pow(nAbs)); + } else { + err = resAbs.pow(nAbs).multiply(rad).subtract(ONE).abs(); + errUp = neighborUp.pow(nAbs).multiply(rad).subtract(ONE); + errDown = ONE.subtract(neighborDown.pow(nAbs).multiply(rad)); + } + + // All error values should be positive + // so don't need to compare absolute values. + int err_comp_errUp = err.compareTo(errUp); + int err_comp_errDown = err.compareTo(errDown); + + assert + errUp.signum() == 1 && + errDown.signum() == 1 + : "Errors of neighbors powered don't have correct signs"; + + // For breaking a half-way tie, the return value may + // have a larger error than one of the neighbors. For + // example, the square root of 2.25 to a precision of + // 1 digit is either 1 or 2 depending on how the exact + // value of 1.5 is rounded. If 2 is returned, it will + // have a larger rounding error than its neighbor 1. + assert + err_comp_errUp <= 0 || + err_comp_errDown <= 0 : + "Computed root has larger error than neighbors for " + rm; + + assert + ((err_comp_errUp == 0 ) ? err_comp_errDown < 0 : true) && + ((err_comp_errDown == 0 ) ? err_comp_errUp < 0 : true) : + "Incorrect error relationships"; + // && could check for digit conditions for ties too + return true; + + default: // Definition of UNNECESSARY already verified. + return true; + } } /** diff --git a/src/java.base/share/classes/java/net/Socket.java b/src/java.base/share/classes/java/net/Socket.java index 42ca5314b78..4c91a6ffce6 100644 --- a/src/java.base/share/classes/java/net/Socket.java +++ b/src/java.base/share/classes/java/net/Socket.java @@ -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 @@ -1632,16 +1632,15 @@ public class Socket implements java.io.Closeable { } /** - * Places the input stream for this socket at "end of stream". - * Any data sent to the input stream side of the socket is acknowledged - * and then silently discarded. + * Shutdown the connection for reading without closing the socket. *

- * If you read from a socket input stream after invoking this method on the - * socket, the stream's {@code available} method will return 0, and its - * {@code read} methods will return {@code -1} (end of stream). + * If you read from a {@linkplain Socket#getInputStream() socket input stream} + * after invoking this method, the stream's {@code available} method will + * return {@code 0}, and its {@code read} methods will return {@code -1} (end of stream). * * @throws IOException if an I/O error occurs when shutting down this socket, the - * socket is not connected or the socket is closed. + * socket is not connected, the socket is already shutdown for reading, + * or the socket is closed. * * @since 1.3 * @see java.net.Socket#shutdownOutput() @@ -1662,16 +1661,14 @@ public class Socket implements java.io.Closeable { } /** - * Disables the output stream for this socket. - * For a TCP socket, any previously written data will be sent - * followed by TCP's normal connection termination sequence. + * Shutdown the connection for writing without closing the socket. + *

+ * If you write to a {@linkplain Socket#getOutputStream() socket output stream} + * after invoking this method, the stream will throw an {@code IOException}. * - * If you write to a socket output stream after invoking - * shutdownOutput() on the socket, the stream will throw - * an IOException. - * - * @throws IOException if an I/O error occurs when shutting down this socket, the socket - * is not connected or the socket is closed. + * @throws IOException if an I/O error occurs when shutting down this socket, the + * socket is not connected, the socket is already shutdown for writing, + * or the socket is closed. * * @since 1.3 * @see java.net.Socket#shutdownInput() @@ -1710,10 +1707,9 @@ public class Socket implements java.io.Closeable { /** * Returns the connection state of the socket. *

- * Note: Closing a socket doesn't clear its connection state, which means + * {@linkplain #close() Closing} a socket doesn't clear its connection state, which means * this method will return {@code true} for a closed socket - * (see {@link #isClosed()}) if it was successfully connected prior - * to being closed. + * if it was successfully connected prior to being closed. * * @return true if the socket was successfully connected to a server * @since 1.4 @@ -1725,10 +1721,9 @@ public class Socket implements java.io.Closeable { /** * Returns the binding state of the socket. *

- * Note: Closing a socket doesn't clear its binding state, which means + * {@linkplain #close() Closing} a socket doesn't clear its binding state, which means * this method will return {@code true} for a closed socket - * (see {@link #isClosed()}) if it was successfully bound prior - * to being closed. + * if it was successfully bound prior to being closed. * * @return true if the socket was successfully bound to an address * @since 1.4 @@ -1750,22 +1745,22 @@ public class Socket implements java.io.Closeable { } /** - * Returns whether the read-half of the socket connection is closed. + * Returns {@code true} if the socket was shutdown for reading. * - * @return true if the input of the socket has been shutdown + * @return true only if a prior call to {@link #shutdownInput()} completed successfully, + * false otherwise * @since 1.4 - * @see #shutdownInput */ public boolean isInputShutdown() { return isInputShutdown(state); } /** - * Returns whether the write-half of the socket connection is closed. + * Returns {@code true} if the socket was shutdown for writing. * - * @return true if the output of the socket has been shutdown + * @return true only if a prior call to {@link #shutdownOutput()} completed successfully, + * false otherwise * @since 1.4 - * @see #shutdownOutput */ public boolean isOutputShutdown() { return isOutputShutdown(state); diff --git a/src/java.base/share/classes/java/net/URL.java b/src/java.base/share/classes/java/net/URL.java index 1e86f41fd3f..2f2c80423ce 100644 --- a/src/java.base/share/classes/java/net/URL.java +++ b/src/java.base/share/classes/java/net/URL.java @@ -53,16 +53,12 @@ import static jdk.internal.util.Exceptions.formatMsg; * Wide Web. A resource can be something as simple as a file or a * directory, or it can be a reference to a more complicated object, * such as a query to a database or to a search engine. More - * information on the types of URLs and their formats can be found at: - * - * Types of URL *

* In general, a URL can be broken into several parts. Consider the * following example: - *

- *     http://www.example.com/docs/resource1.html
- * 
+ * {@snippet lang="text" : + * http://www.example.com/docs/resource1.html + * } *

* The URL above indicates that the protocol to use is * {@code http} (HyperText Transfer Protocol) and that the @@ -80,9 +76,9 @@ import static jdk.internal.util.Exceptions.formatMsg; * the protocol is used instead. For example, the default port for * {@code http} is {@code 80}. An alternative port could be * specified as: - *

- *     http://www.example.com:1080/docs/resource1.html
- * 
+ * {@snippet lang="text" : + * http://www.example.com:1080/docs/resource1.html + * } *

* The syntax of {@code URL} is defined by RFC 2396: Uniform @@ -95,9 +91,9 @@ import static jdk.internal.util.Exceptions.formatMsg; * A URL may have appended to it a "fragment", also known * as a "ref" or a "reference". The fragment is indicated by the sharp * sign character "#" followed by more characters. For example, - *

- *     http://www.example.com/index.html#chapter1
- * 
+ * {@snippet lang="text" : + * http://www.example.com/index.html#chapter1 + * } *

* This fragment is not technically part of the URL. Rather, it * indicates that after the specified resource is retrieved, the @@ -109,17 +105,17 @@ import static jdk.internal.util.Exceptions.formatMsg; * which contains only enough information to reach the resource * relative to another URL. Relative URLs are frequently used within * HTML pages. For example, if the contents of the URL: - *

- *     http://www.example.com/index.html
- * 
+ * {@snippet lang="text" : + * http://www.example.com/index.html + * } * contained within it the relative URL: - *
- *     FAQ.html
- * 
+ * {@snippet lang="text" : + * FAQ.html + * } * it would be a shorthand for: - *
- *     http://www.example.com/FAQ.html
- * 
+ * {@snippet lang="text" : + * http://www.example.com/FAQ.html + * } *

* The relative URL need not specify all the components of a URL. If * the protocol, host name, or port number is missing, the value is @@ -147,13 +143,13 @@ import static jdk.internal.util.Exceptions.formatMsg; * syntax specification. *

* The URL class does not itself encode or decode any URL components - * according to the escaping mechanism defined in RFC2396. It is the + * according to the escaping mechanism defined in RFC 2396. It is the * responsibility of the caller to encode any fields, which need to be * escaped prior to calling URL, and also to decode any escaped fields, * that are returned from URL. Furthermore, because URL has no knowledge * of URL escaping, it does not recognise equivalence between the encoded - * or decoded form of the same URL. For example, the two URLs:
- *

    http://foo.com/hello world/ and http://foo.com/hello%20world
+ * or decoded form of the same URL. For example, the two URLs: + * {@code http://foo.com/hello%20world} and {@code http://foo.com/hello world/} * would be considered not equal to each other. *

* Note, the {@link java.net.URI} class does perform escaping of its @@ -164,7 +160,7 @@ import static jdk.internal.util.Exceptions.formatMsg; *

* The {@link URLEncoder} and {@link URLDecoder} classes can also be * used, but only for HTML form encoding, which is not the same - * as the encoding scheme defined in RFC2396. + * as the encoding scheme defined in RFC 2396. * * @apiNote * @@ -190,7 +186,7 @@ import static jdk.internal.util.Exceptions.formatMsg; * be abused to construct misleading URLs or URIs. Applications * that deal with URLs or URIs should take into account * the recommendations advised in RFC3986, + * href="https://tools.ietf.org/html/rfc3986#section-7">RFC 3986, * Section 7, Security Considerations. *

* All {@code URL} constructors may throw {@link MalformedURLException}. @@ -572,10 +568,10 @@ public final class URL implements java.io.Serializable { * * The new URL is created from the given context URL and the spec * argument as described in - * RFC2396 "Uniform Resource Identifiers : Generic Syntax" : - *

-     *          <scheme>://<authority><path>?<query>#<fragment>
-     * 
+ * RFC 2396 "Uniform Resource Identifiers : Generic Syntax" : + * {@snippet lang="text" : + * ://?# + * } * The reference is parsed into the scheme, authority, path, query and * fragment parts. If the path component is empty and the scheme, * authority, and query components are undefined, then the new URL is a @@ -598,11 +594,11 @@ public final class URL implements java.io.Serializable { * path is treated as absolute and the spec path replaces the context path. *

* Otherwise, the path is treated as a relative path and is appended to the - * context path, as described in RFC2396. Also, in this case, + * context path, as described in RFC 2396. Also, in this case, * the path is canonicalized through the removal of directory * changes made by occurrences of ".." and ".". *

- * For a more detailed description of URL parsing, refer to RFC2396. + * For a more detailed description of URL parsing, refer to RFC 2396. * * @implSpec Parsing the URL includes calling the {@link * URLStreamHandler#parseURL(URL, String, int, int) parseURL} method on the @@ -1027,7 +1023,7 @@ public final class URL implements java.io.Serializable { /** * Gets the host name of this {@code URL}, if applicable. - * The format of the host conforms to RFC 2732, i.e. for a + * The format of the host conforms to RFC 2732, i.e. for a * literal IPv6 address, this method will return the IPv6 address * enclosed in square brackets ({@code '['} and {@code ']'}). * @@ -1157,12 +1153,12 @@ public final class URL implements java.io.Serializable { /** * Returns a {@link java.net.URI} equivalent to this URL. * This method functions in the same way as {@code new URI (this.toString())}. - *

Note, any URL instance that complies with RFC 2396 can be converted + *

Note, any URL instance that complies with RFC 2396 can be converted * to a URI. However, some URLs that are not strictly in compliance * can not be converted to a URI. * * @throws URISyntaxException if this URL is not formatted strictly according to - * RFC2396 and cannot be converted to a URI. + * RFC 2396 and cannot be converted to a URI. * * @return a URI instance equivalent to this URL. * @since 1.5 @@ -1251,9 +1247,9 @@ public final class URL implements java.io.Serializable { * Opens a connection to this {@code URL} and returns an * {@code InputStream} for reading from that connection. This * method is a shorthand for: - *

-     *     openConnection().getInputStream()
-     * 
+ * {@snippet lang="java" : + * openConnection().getInputStream() + * } * * @return an input stream for reading from the URL connection. * @throws IOException if an I/O exception occurs. @@ -1266,9 +1262,9 @@ public final class URL implements java.io.Serializable { /** * Gets the contents of this URL. This method is a shorthand for: - *
-     *     openConnection().getContent()
-     * 
+ * {@snippet lang="java" : + * openConnection().getContent() + * } * * @return the contents of this URL. * @throws IOException if an I/O exception occurs. @@ -1280,9 +1276,9 @@ public final class URL implements java.io.Serializable { /** * Gets the contents of this URL. This method is a shorthand for: - *
-     *     openConnection().getContent(classes)
-     * 
+ * {@snippet lang="java" : + * openConnection().getContent(classes) + * } * * @param classes an array of Java types * @return the content object of this URL that is the first match of diff --git a/src/java.base/share/classes/java/text/AttributedString.java b/src/java.base/share/classes/java/text/AttributedString.java index 0333efde81b..52e5b5dba3c 100644 --- a/src/java.base/share/classes/java/text/AttributedString.java +++ b/src/java.base/share/classes/java/text/AttributedString.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, 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 @@ -46,7 +46,6 @@ import java.text.AttributedCharacterIterator.Attribute; * @see Annotation * @since 1.2 */ - public class AttributedString { // field holding the text String text; @@ -54,12 +53,11 @@ public class AttributedString { // Fields holding run attribute information. // Run attributes are organized by run. // Arrays are always of equal lengths (the current capacity). - // Since there are no vectors of int, we have to use arrays. + // Since there are not yet Lists of unboxed int, we use arrays. private static final int INITIAL_CAPACITY = 10; - int runCount; // actual number of runs, <= current capacity - int[] runStarts; // start index for each run - Vector[] runAttributes; // vector of attribute keys for each run - Vector[] runAttributeValues; // parallel vector of attribute values for each run + int runCount; // actual number of runs, <= current capacity + int[] runStarts; // start index for each run + Map[] runAttributes; // attributes for each run /** * Constructs an AttributedString instance with the given @@ -152,16 +150,8 @@ public class AttributedString { int attributeCount = attributes.size(); if (attributeCount > 0) { - createRunAttributeDataVectors(); - Vector newRunAttributes = new Vector<>(attributeCount); - Vector newRunAttributeValues = new Vector<>(attributeCount); - runAttributes[0] = newRunAttributes; - runAttributeValues[0] = newRunAttributeValues; - - for (Map.Entry entry : attributes.entrySet()) { - newRunAttributes.addElement(entry.getKey()); - newRunAttributeValues.addElement(entry.getValue()); - } + createRunAttributeDataArrays(); + runAttributes[0] = new HashMap<>(attributes); } } @@ -250,12 +240,13 @@ public class AttributedString { // Select attribute keys to be taken care of HashSet keys = new HashSet<>(); + Set textKeys = text.getAllAttributeKeys(); if (attributes == null) { - keys.addAll(text.getAllAttributeKeys()); + keys.addAll(textKeys); } else { for (int i = 0; i < attributes.length; i++) keys.add(attributes[i]); - keys.retainAll(text.getAllAttributeKeys()); + keys.retainAll(textKeys); } if (keys.isEmpty()) return; @@ -376,9 +367,9 @@ public class AttributedString { throw new IllegalArgumentException("Can't add attribute to 0-length text"); } - // make sure we have run attribute data vectors + // make sure we have run attribute data arrays if (runCount == 0) { - createRunAttributeDataVectors(); + createRunAttributeDataArrays(); } // break up runs if necessary @@ -393,9 +384,9 @@ public class AttributedString { private synchronized void addAttributeImpl(Attribute attribute, Object value, int beginIndex, int endIndex) { - // make sure we have run attribute data vectors + // make sure we have run attribute data arrays if (runCount == 0) { - createRunAttributeDataVectors(); + createRunAttributeDataArrays(); } // break up runs if necessary @@ -405,19 +396,14 @@ public class AttributedString { addAttributeRunData(attribute, value, beginRunIndex, endRunIndex); } - private final void createRunAttributeDataVectors() { + private final void createRunAttributeDataArrays() { // use temporary variables so things remain consistent in case of an exception int[] newRunStarts = new int[INITIAL_CAPACITY]; - @SuppressWarnings("unchecked") - Vector[] newRunAttributes = (Vector[]) new Vector[INITIAL_CAPACITY]; - - @SuppressWarnings("unchecked") - Vector[] newRunAttributeValues = (Vector[]) new Vector[INITIAL_CAPACITY]; + Map[] newRunAttributes = (Map[]) new Map[INITIAL_CAPACITY]; runStarts = newRunStarts; runAttributes = newRunAttributes; - runAttributeValues = newRunAttributeValues; runCount = 1; // assume initial run starting at index 0 } @@ -463,29 +449,21 @@ public class AttributedString { // use temporary variables so things remain consistent in case of an exception int[] newRunStarts = Arrays.copyOf(runStarts, newCapacity); - Vector[] newRunAttributes = + Map[] newRunAttributes = Arrays.copyOf(runAttributes, newCapacity); - Vector[] newRunAttributeValues = - Arrays.copyOf(runAttributeValues, newCapacity); runStarts = newRunStarts; runAttributes = newRunAttributes; - runAttributeValues = newRunAttributeValues; } // make copies of the attribute information of the old run that the new one used to be part of // use temporary variables so things remain consistent in case of an exception - Vector newRunAttributes = null; - Vector newRunAttributeValues = null; + Map newRunAttributes = null; if (copyAttrs) { - Vector oldRunAttributes = runAttributes[runIndex - 1]; - Vector oldRunAttributeValues = runAttributeValues[runIndex - 1]; + Map oldRunAttributes = runAttributes[runIndex - 1]; if (oldRunAttributes != null) { - newRunAttributes = new Vector<>(oldRunAttributes); - } - if (oldRunAttributeValues != null) { - newRunAttributeValues = new Vector<>(oldRunAttributeValues); + newRunAttributes = new HashMap<>(oldRunAttributes); } } @@ -494,11 +472,9 @@ public class AttributedString { for (int i = runCount - 1; i > runIndex; i--) { runStarts[i] = runStarts[i - 1]; runAttributes[i] = runAttributes[i - 1]; - runAttributeValues[i] = runAttributeValues[i - 1]; } runStarts[runIndex] = offset; runAttributes[runIndex] = newRunAttributes; - runAttributeValues[runIndex] = newRunAttributeValues; return runIndex; } @@ -508,32 +484,13 @@ public class AttributedString { int beginRunIndex, int endRunIndex) { for (int i = beginRunIndex; i < endRunIndex; i++) { - int keyValueIndex = -1; // index of key and value in our vectors; assume we don't have an entry yet - if (runAttributes[i] == null) { - Vector newRunAttributes = new Vector<>(); - Vector newRunAttributeValues = new Vector<>(); + Map attributes = runAttributes[i]; + if (attributes == null) { + Map newRunAttributes = new HashMap<>(); runAttributes[i] = newRunAttributes; - runAttributeValues[i] = newRunAttributeValues; - } else { - // check whether we have an entry already - keyValueIndex = runAttributes[i].indexOf(attribute); - } - - if (keyValueIndex == -1) { - // create new entry - int oldSize = runAttributes[i].size(); - runAttributes[i].addElement(attribute); - try { - runAttributeValues[i].addElement(value); - } - catch (Exception e) { - runAttributes[i].setSize(oldSize); - runAttributeValues[i].setSize(oldSize); - } - } else { - // update existing entry - runAttributeValues[i].set(keyValueIndex, value); + attributes = newRunAttributes; } + attributes.put(attribute, value); } } @@ -596,18 +553,11 @@ public class AttributedString { } private synchronized Object getAttribute(Attribute attribute, int runIndex) { - Vector currentRunAttributes = runAttributes[runIndex]; - Vector currentRunAttributeValues = runAttributeValues[runIndex]; + Map currentRunAttributes = runAttributes[runIndex]; if (currentRunAttributes == null) { return null; } - int attributeIndex = currentRunAttributes.indexOf(attribute); - if (attributeIndex != -1) { - return currentRunAttributeValues.elementAt(attributeIndex); - } - else { - return null; - } + return currentRunAttributes.get(attribute); } // gets an attribute value, but returns an annotation only if it's range does not extend outside the range beginIndex..endIndex @@ -680,22 +630,11 @@ public class AttributedString { */ private void setAttributes(Map attrs, int offset) { if (runCount == 0) { - createRunAttributeDataVectors(); + createRunAttributeDataArrays(); } - int index = ensureRunBreak(offset, false); - int size; - - if (attrs != null && (size = attrs.size()) > 0) { - Vector runAttrs = new Vector<>(size); - Vector runValues = new Vector<>(size); - - for (Map.Entry entry : attrs.entrySet()) { - runAttrs.add(entry.getKey()); - runValues.add(entry.getValue()); - } - runAttributes[index] = runAttrs; - runAttributeValues[index] = runValues; + if (attrs != null && !attrs.isEmpty()) { + runAttributes[index] = new HashMap<>(attrs); } } @@ -945,18 +884,13 @@ public class AttributedString { // ??? should try to create this only once, then update if necessary, // and give callers read-only view Set keys = new HashSet<>(); - int i = 0; - while (i < runCount) { + for (int i = 0; i < runCount; i++) { if (runStarts[i] < endIndex && (i == runCount - 1 || runStarts[i + 1] > beginIndex)) { - Vector currentRunAttributes = runAttributes[i]; + Map currentRunAttributes = runAttributes[i]; if (currentRunAttributes != null) { - int j = currentRunAttributes.size(); - while (j-- > 0) { - keys.add(currentRunAttributes.get(j)); - } + keys.addAll(currentRunAttributes.keySet()); } } - i++; } return keys; } @@ -1040,10 +974,10 @@ public class AttributedString { public Set> entrySet() { HashSet> set = new HashSet<>(); synchronized (AttributedString.this) { - int size = runAttributes[runIndex].size(); - for (int i = 0; i < size; i++) { - Attribute key = runAttributes[runIndex].get(i); - Object value = runAttributeValues[runIndex].get(i); + Map attributes = runAttributes[runIndex]; + for (Map.Entry entry : attributes.entrySet()) { + Attribute key = entry.getKey(); + Object value = entry.getValue(); if (value instanceof Annotation) { value = AttributedString.this.getAttributeCheckRange(key, runIndex, beginIndex, endIndex); @@ -1051,9 +985,7 @@ public class AttributedString { continue; } } - - Map.Entry entry = new AttributeEntry(key, value); - set.add(entry); + set.add(new AttributeEntry(key, value)); } } return set; diff --git a/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java b/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java index 4594dc6f1dc..9e3621a6b54 100644 --- a/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java +++ b/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java @@ -125,7 +125,6 @@ import java.util.regex.Pattern; import jdk.internal.util.DateTimeHelper; import jdk.internal.util.DecimalDigits; -import sun.text.spi.JavaTimeDateTimePatternProvider; import sun.util.locale.provider.CalendarDataUtility; import sun.util.locale.provider.LocaleProviderAdapter; import sun.util.locale.provider.LocaleResources; @@ -223,10 +222,10 @@ public final class DateTimeFormatterBuilder { if (dateStyle == null && timeStyle == null) { throw new IllegalArgumentException("Either dateStyle or timeStyle must be non-null"); } - LocaleProviderAdapter adapter = LocaleProviderAdapter.getAdapter(JavaTimeDateTimePatternProvider.class, locale); - JavaTimeDateTimePatternProvider provider = adapter.getJavaTimeDateTimePatternProvider(); - return provider.getJavaTimeDateTimePattern(convertStyle(timeStyle), - convertStyle(dateStyle), chrono.getCalendarType(), + LocaleProviderAdapter adapter = LocaleProviderAdapter.getAdapter(DateTimeFormatterPatternProvider.class, locale); + DateTimeFormatterPatternProvider provider = adapter.getDateTimeFormatterPatternProvider(); + return provider.getDateTimeFormatterPattern(dateStyle, timeStyle, + chrono.getCalendarType(), CalendarDataUtility.findRegionOverride(locale)); } @@ -259,9 +258,9 @@ public final class DateTimeFormatterBuilder { Objects.requireNonNull(chrono, "chrono"); Objects.requireNonNull(locale, "locale"); Locale override = CalendarDataUtility.findRegionOverride(locale); - LocaleProviderAdapter adapter = LocaleProviderAdapter.getAdapter(JavaTimeDateTimePatternProvider.class, override); - JavaTimeDateTimePatternProvider provider = adapter.getJavaTimeDateTimePatternProvider(); - return provider.getJavaTimeDateTimePattern(requestedTemplate, + LocaleProviderAdapter adapter = LocaleProviderAdapter.getAdapter(DateTimeFormatterPatternProvider.class, override); + DateTimeFormatterPatternProvider provider = adapter.getDateTimeFormatterPatternProvider(); + return provider.getDateTimeFormatterPattern(requestedTemplate, chrono.getCalendarType(), override); } diff --git a/src/java.base/share/classes/java/time/format/DateTimeFormatterPatternProvider.java b/src/java.base/share/classes/java/time/format/DateTimeFormatterPatternProvider.java new file mode 100644 index 00000000000..36aa52e6e67 --- /dev/null +++ b/src/java.base/share/classes/java/time/format/DateTimeFormatterPatternProvider.java @@ -0,0 +1,106 @@ +/* + * 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 + * 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 java.time.format; + +import java.time.DateTimeException; +import java.time.chrono.Chronology; +import java.util.Locale; +import java.util.spi.LocaleServiceProvider; + +/** + * Service Provider Interface for retrieving localized patterns used by + * {@code DateTimeFormatter} and {@code DateTimeFormatterBuilder} classes. + * The methods in this class provide localized format pattern strings for use + * with methods such as {@link DateTimeFormatter#ofLocalizedDateTime(FormatStyle) + * ofLocalizedDateTime(FormatStyle)} + * and {@link DateTimeFormatterBuilder#appendLocalized(FormatStyle, FormatStyle) + * appendLocalized(FormatStyle, FormatStyle)}. + * For details on using the Locale Sensitive SPI, see + * {@link LocaleServiceProvider}. + * + * @since 27 + */ + +public abstract class DateTimeFormatterPatternProvider extends LocaleServiceProvider { + + /** + * Sole constructor. (For invocation by subclass constructors, typically + * implicit.) + */ + protected DateTimeFormatterPatternProvider() {} + + /** + * {@return the localized pattern string for the date style, + * time style, calendar type, and locale} Either {@code dateStyle} or + * {@code timeStyle} may be {@code null}. In such cases, the returned + * pattern represents only the time or only the date, respectively. If + * both are {@code null}, an {@code IllegalArgumentException} is thrown. + * + * @param dateStyle {@code FormatStyle} representing date style. {@code null} + * for time-only pattern + * @param timeStyle {@code FormatStyle} representing time style. {@code null} + * for date-only pattern + * @param locale {@code Locale} used to obtain the localized pattern. + * Non-null. + * @param calType Non-null {@code String} representing a CLDR/LDML + * calendar type, such as "japanese", "iso8601". + * @throws IllegalArgumentException if both {@code dateStyle} and + * {@code timeStyle} are {@code null}. + * @throws DateTimeException if no formatting pattern is available for the + * specified arguments. + * @throws NullPointerException if {@code calType} or {@code locale} is + * {@code null}. + * @see Chronology#getCalendarType() + */ + public abstract String getDateTimeFormatterPattern(FormatStyle dateStyle, + FormatStyle timeStyle, String calType, Locale locale); + + /** + * {@return the localized pattern string for the requested template, + * calendar type, and locale} The {@code requestedTemplate} must match + * the regular expression described in + * {@link DateTimeFormatterBuilder#appendLocalized(String)}; otherwise, + * an {@code IllegalArgumentException} is thrown. + * + * @param requestedTemplate requested template, Non-null. + * @param calType Non-null {@code String} representing a CLDR/LDML + * calendar type, such as "japanese", "iso8601". + * @param locale the {@code Locale} used to obtain the localized pattern. + * Non-null. + * @throws IllegalArgumentException if {@code requestedTemplate} does not match + * the regular expression syntax described in + * {@link DateTimeFormatterBuilder#appendLocalized(String) + * appendLocalized(String)}. + * @throws DateTimeException if no formatting pattern is available for the + * specified arguments. + * @throws NullPointerException if {@code requestedTemplate}, {@code calType}, + * or {@code locale} is {@code null}. + * @see DateTimeFormatterBuilder#appendLocalized(String) + * @see Chronology#getCalendarType() + */ + public abstract String getDateTimeFormatterPattern(String requestedTemplate, + String calType, Locale locale); +} diff --git a/src/java.base/share/classes/java/util/Collections.java b/src/java.base/share/classes/java/util/Collections.java index 316458d6f90..839858dc245 100644 --- a/src/java.base/share/classes/java/util/Collections.java +++ b/src/java.base/share/classes/java/util/Collections.java @@ -1642,7 +1642,7 @@ public final class Collections { /** * @serial include */ - private static class UnmodifiableMap implements Map, Serializable { + static class UnmodifiableMap implements Map, Serializable { @java.io.Serial private static final long serialVersionUID = -1034234728574286014L; diff --git a/src/java.base/share/classes/java/util/HashMap.java b/src/java.base/share/classes/java/util/HashMap.java index 3320b394e6c..0cb751079e4 100644 --- a/src/java.base/share/classes/java/util/HashMap.java +++ b/src/java.base/share/classes/java/util/HashMap.java @@ -493,6 +493,21 @@ public class HashMap extends AbstractMap putMapEntries(m, false); } + // Fast path for HashMap-to-HashMap copying. Eliminates megamorphic + // call sites described in JDK-8368292 by walking the source table. + // Also reuses pre-computed hash codes, avoiding redundant + // hashCode() calls. + private void putHashMapEntries(HashMap src, boolean evict) { + Node[] tab; + if (src.size > 0 && (tab = src.table) != null) { + for (Node e : tab) { + for (; e != null; e = e.next) { + putVal(e.hash, e.key, e.value, false, evict); + } + } + } + } + /** * Implements Map.putAll and Map constructor. * @@ -517,6 +532,16 @@ public class HashMap extends AbstractMap resize(); } + // Fast path when source is a HashMap, or an UnmodifiableMap + // wrapping a HashMap. See JDK-8368292. + Map hm; + if ((hm = m).getClass() == HashMap.class + || m instanceof Collections.UnmodifiableMap umap + && (hm = umap.m).getClass() == HashMap.class) { + putHashMapEntries((HashMap) hm, evict); + return; + } + for (Map.Entry e : m.entrySet()) { K key = e.getKey(); V value = e.getValue(); diff --git a/src/java.base/share/classes/java/util/LazyCollections.java b/src/java.base/share/classes/java/util/LazyCollections.java index 0bbdad87ac4..e15721db2ce 100644 --- a/src/java.base/share/classes/java/util/LazyCollections.java +++ b/src/java.base/share/classes/java/util/LazyCollections.java @@ -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 @@ -25,20 +25,21 @@ package java.util; +import jdk.internal.lang.LazyConstantImpl; import jdk.internal.misc.Unsafe; import jdk.internal.util.ImmutableBitSetPredicate; import jdk.internal.vm.annotation.AOTSafeClassInitializer; import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.Stable; -import java.lang.LazyConstant; import java.lang.reflect.Array; import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.IntFunction; import java.util.function.IntPredicate; -import java.util.function.Supplier; +import java.util.function.Predicate; /** * Container class for lazy collections implementations. Not part of the public API. @@ -54,6 +55,7 @@ final class LazyCollections { // Unsafe allows LazyCollection classes to be used early in the boot sequence private static final Unsafe UNSAFE = Unsafe.getUnsafe(); + @jdk.internal.vm.annotation.TrustFinalFields @jdk.internal.ValueBased static final class LazyList extends ImmutableCollections.AbstractImmutableList { @@ -62,18 +64,17 @@ final class LazyCollections { private final E[] elements; // Keeping track of `size` separately reduces bytecode size compared to // using `elements.length`. - @Stable private final int size; - @Stable - final FunctionHolder> functionHolder; - @Stable + private final FunctionHolder> functionHolder; private final Mutexes mutexes; + private final Throwables throwables; private LazyList(int size, IntFunction computingFunction) { this.elements = newGenericArray(size); this.size = size; this.functionHolder = new FunctionHolder<>(computingFunction, size); this.mutexes = new Mutexes(size); + this.throwables = new Throwables(size); super(); } @@ -89,7 +90,7 @@ final class LazyCollections { } private E getSlowPath(int i) { - return orElseComputeSlowPath(elements, i, mutexes, i, functionHolder); + return orElseComputeSlowPath(elements, i, mutexes, throwables, i, functionHolder); } @Override @@ -109,6 +110,7 @@ final class LazyCollections { @Override public int indexOf(Object o) { + Objects.requireNonNull(o); for (int i = 0; i < size; i++) { if (Objects.equals(o, get(i))) { return i; @@ -119,6 +121,7 @@ final class LazyCollections { @Override public int lastIndexOf(Object o) { + Objects.requireNonNull(o); for (int i = size - 1; i >= 0; i--) { if (Objects.equals(o, get(i))) { return i; @@ -143,16 +146,14 @@ final class LazyCollections { } - static final class LazyEnumMap, V> + @jdk.internal.vm.annotation.TrustFinalFields + private static final class LazyEnumMap, V> extends AbstractLazyMap { - @Stable private final Class enumType; - @Stable // We are using a wrapper class here to be able to use a min value of zero that // is also stable. private final Integer min; - @Stable private final IntPredicate member; public LazyEnumMap(Set set, @@ -182,29 +183,26 @@ final class LazyCollections { if (member.test(ordinal)) { @SuppressWarnings("unchecked") final K k = (K) key; - return orElseCompute(k, indexForAsInt(k)); + return orElseCompute(k, indexFor(k)); } } return defaultValue; } + @ForceInline @Override - Integer indexFor(K key) { - return indexForAsInt(key); - } - - private int indexForAsInt(K key) { + int indexFor(K key) { return key.ordinal() - min; } } - static final class LazyMap + @jdk.internal.vm.annotation.TrustFinalFields + private static final class LazyMap extends AbstractLazyMap { // Use an unmodifiable map with known entries that are @Stable. Lookups through this map can be folded because - // it is created using Map.ofEntrie. This allows us to avoid creating a separate hashing function. - @Stable + // it is created using Map.ofEntries. This allows us to avoid creating a separate hashing function. private final Map indexMapper; public LazyMap(Set keys, Function computingFunction) { @@ -232,29 +230,34 @@ final class LazyCollections { @Override public boolean containsKey(Object o) { return indexMapper.containsKey(o); } + @ForceInline @Override - Integer indexFor(K key) { + // This method will throw an NPE if the key does not exist. So, callers need to + // make sure the key exist before invoking this method. + int indexFor(K key) { return indexMapper.get(key); } } - static sealed abstract class AbstractLazyMap + @jdk.internal.vm.annotation.TrustFinalFields + private static abstract sealed class AbstractLazyMap extends ImmutableCollections.AbstractImmutableMap { - // This field shadows AbstractMap.keySet which is not @Stable. - @Stable - Set keySet; + private final Mutexes mutexes; + private final Throwables throwables; + private final int size; + private final FunctionHolder> functionHolder; + private final Set> entrySet; // This field shadows AbstractMap.values which is of another type @Stable - final V[] values; + private final V[] values; + // This field shadows AbstractMap.keySet which is not trusted + private final Set keySet; + + // We are using a `long` here to get stable access even in the case + // that the 32-bit hash code is zero. @Stable - Mutexes mutexes; - @Stable - private final int size; - @Stable - final FunctionHolder> functionHolder; - @Stable - private final Set> entrySet; + private long hash; private AbstractLazyMap(Set keySet, int size, @@ -264,14 +267,15 @@ final class LazyCollections { this.functionHolder = new FunctionHolder<>(computingFunction, size); this.values = newGenericArray(backingSize); this.mutexes = new Mutexes(backingSize); - super(); + this.throwables = new Throwables(backingSize); this.keySet = keySet; + super(); this.entrySet = LazyMapEntrySet.of(this); } // Abstract methods @Override public abstract boolean containsKey(Object o); - abstract Integer indexFor(K key); + abstract int indexFor(K key); // Public methods @Override public final int size() { return size; } @@ -279,6 +283,45 @@ final class LazyCollections { @Override public final Set> entrySet() { return entrySet; } @Override public Set keySet() { return keySet; } + @Override + public final boolean containsValue(Object value) { + Objects.requireNonNull(value); + for (K key : keySet) { + if (value.equals(orElseCompute(key, indexFor(key)))) { + return true; + } + } + return false; + } + + @Override + public final int hashCode() { + // Racy computation + long h = hash; + if (h == 0) { + // Set a bit in the upper 32-bit region of the `long` to + // cater for the case the lower 32-bit hash is zero. + hash = h = expandToLong(hashCode0()); + } + return reduceToInt(h); + } + + private int hashCode0() { + int hash = 0; + for (K key : keySet) { + hash += key.hashCode() ^ orElseCompute(key, indexFor(key)).hashCode(); + } + return hash; + } + + @Override + public final void forEach(BiConsumer action) { + Objects.requireNonNull(action); + for (K key : keySet) { + action.accept(key, orElseCompute(key, indexFor(key))); + } + } + @ForceInline @Override public final V get(Object key) { @@ -293,15 +336,15 @@ final class LazyCollections { if (v != null) { return v; } - return orElseComputeSlowPath(values, index, mutexes, key, functionHolder); + return orElseComputeSlowPath(values, index, mutexes, throwables, key, functionHolder); } + @jdk.internal.vm.annotation.TrustFinalFields @jdk.internal.ValueBased - static final class LazyMapEntrySet extends ImmutableCollections.AbstractImmutableSet> { + private static final class LazyMapEntrySet extends ImmutableCollections.AbstractImmutableSet> { // Use a separate field for the outer class in order to facilitate - // a @Stable annotation. - @Stable + // a trusted field. private final AbstractLazyMap map; private LazyMapEntrySet(AbstractLazyMap map) { @@ -318,14 +361,13 @@ final class LazyCollections { return new LazyMapEntrySet<>(outer); } + @jdk.internal.vm.annotation.TrustFinalFields @jdk.internal.ValueBased static final class LazyMapIterator implements Iterator> { // Use a separate field for the outer class in order to facilitate - // a @Stable annotation. - @Stable + // a trusted field. private final AbstractLazyMap map; - @Stable private final Iterator keyIterator; private LazyMapIterator(AbstractLazyMap map) { @@ -334,21 +376,22 @@ final class LazyCollections { super(); } - @Override public boolean hasNext() { return keyIterator.hasNext(); } + @Override public boolean hasNext() { return keyIterator.hasNext(); } @Override public Entry next() { final K k = keyIterator.next(); - return new LazyEntry<>(k, map, map.functionHolder); + return new LazyEntry<>(k, map); } @Override public void forEachRemaining(Consumer> action) { + Objects.requireNonNull(action); final Consumer innerAction = new Consumer<>() { @Override public void accept(K key) { - action.accept(new LazyEntry<>(key, map, map.functionHolder)); + action.accept(new LazyEntry<>(key, map)); } }; keyIterator.forEachRemaining(innerAction); @@ -362,13 +405,12 @@ final class LazyCollections { } } - private record LazyEntry(K getKey, // trick - AbstractLazyMap map, - FunctionHolder> functionHolder) implements Entry { + private record LazyEntry(@Override K getKey, // trick + AbstractLazyMap map) implements Entry { @Override public V setValue(V value) { throw ImmutableCollections.uoe(); } @Override public V getValue() { return map.orElseCompute(getKey, map.indexFor(getKey)); } - @Override public int hashCode() { return hash(getKey()) ^ hash(getValue()); } + @Override public int hashCode() { return Objects.hashCode(getKey()) ^ Objects.hashCode(getValue()); } @Override public String toString() { return getKey() + "=" + getValue(); } @Override @@ -379,9 +421,6 @@ final class LazyCollections { && Objects.equals(getValue(), e.getValue()); } - private int hash(Object obj) { - return (obj == null) ? 0 : obj.hashCode(); - } } @Override @@ -389,12 +428,12 @@ final class LazyCollections { return LazyMapValues.of(this); } + @jdk.internal.vm.annotation.TrustFinalFields @jdk.internal.ValueBased static final class LazyMapValues extends ImmutableCollections.AbstractImmutableCollection { // Use a separate field for the outer class in order to facilitate - // a @Stable annotation. - @Stable + // a trusted field. private final AbstractLazyMap map; private LazyMapValues(AbstractLazyMap map) { @@ -416,7 +455,133 @@ final class LazyCollections { } - static final class Mutexes { + @jdk.internal.vm.annotation.TrustFinalFields + private static final class LazySet + extends ImmutableCollections.AbstractImmutableSet + implements Set { + + private final Map map; + + // -1 is used as a sentinel value for zero so we can get + // stable access for all `size` values. `size` is always non-negative. + @Stable + private int size; + // We are using a `long` here to get stable access even in the case + // that the 32-bit hash code is zero. + @Stable + private long hash; + + public LazySet(Set elementCandidates, + Predicate computingFunction) { + this.map = Map.ofLazy(elementCandidates, computingFunction::test); + super(); + } + + @Override + public boolean contains(Object o) { + return map.getOrDefault(o, Boolean.FALSE).booleanValue(); + } + + @Override + public int hashCode() { + // Racy computation + long h = hash; + if (h == 0) { + // Set a bit in the upper 32-bit region of the `long` to + // cater for the case the lower 32-bit hash is zero. + hash = h = expandToLong(hashCode0()); + } + return reduceToInt(h); + } + + private int hashCode0() { + int hash = 0; + for (var e: map.entrySet()) { + if (e.getValue()) { + hash += e.getKey().hashCode(); + } + } + return hash; + } + + @Override + public Iterator iterator() { + return new LazySetIterator<>(map.entrySet().iterator()); + } + + @jdk.internal.vm.annotation.TrustFinalFields + static final class LazySetIterator implements Iterator { + + private final Iterator> iterator; + + E current; + + public LazySetIterator(Iterator> iterator) { + this.iterator = iterator; + super(); + } + + @Override + public boolean hasNext() { + if (current != null) { + return true; + } + while (iterator.hasNext()) { + Map.Entry e = iterator.next(); + if (e.getValue()) { + current = e.getKey(); + return true; + } + } + return false; + } + + @Override + public E next() { + E e = current; + if (e != null) { + return consumeCurrent(e); + } + if (!hasNext()) { + throw new NoSuchElementException(); + } + return consumeCurrent(current); + } + + private E consumeCurrent(E e) { + current = null; + return e; + } + + } + + @Override + public int size() { + // Racy computation + int s = size; + if (s == 0) { + s = size0(); + if (s == 0) { + s = -1; + } + size = s; + } + return s == -1 ? 0 : s; + } + + private int size0() { + int size = 0; + for (var e: map.entrySet()) { + if (e.getValue()) { + size++; + } + } + return size; + } + + } + + private static final class Mutexes { private static final Object TOMB_STONE = new Object(); @@ -431,9 +596,15 @@ final class LazyCollections { this.counter = new AtomicInteger(length); } - @ForceInline private Object acquireMutex(long offset) { - assert mutexes != null; + // Snapshot + var mutexes = this.mutexes; + if (mutexes == null) { + // We have already computed all the elements and if we end up here + // there was at least one unchecked exception thrown by the + // computing function. + return null; + } // Check if there already is a mutex (Object or TOMB_STONE) final Object mutex = UNSAFE.getReferenceVolatile(mutexes, offset); if (mutex != null) { @@ -447,7 +618,7 @@ final class LazyCollections { private void releaseMutex(long offset) { // Replace the old mutex with a tomb stone since now the old mutex can be collected. - UNSAFE.putReference(mutexes, offset, TOMB_STONE); + UNSAFE.putReferenceVolatile(mutexes, offset, TOMB_STONE); if (counter != null && counter.decrementAndGet() == 0) { mutexes = null; counter = null; @@ -456,6 +627,33 @@ final class LazyCollections { } + /** Holds the throwable class names produced by the computing function. + *

+ * Class names are used instead of Class objects to avoid pinning class loaders after + * a failed computation. + *

+ * This class is not thread safe across indices. However, it will always be accessed + * under the same monitor for a given index. + */ + private static final class Throwables { + + @Stable + final String[] throwables; + + Throwables(int size) { + this.throwables = new String[size]; + super(); + } + + Optional get(int index) { + return Optional.ofNullable(throwables[index]); + } + + void set(int index, Throwable throwable) { + throwables[index] = throwable.getClass().getName().intern(); + } + } + @ForceInline private static long offsetFor(long index) { return Unsafe.ARRAY_OBJECT_BASE_OFFSET + Unsafe.ARRAY_OBJECT_INDEX_SCALE * index; @@ -466,75 +664,81 @@ final class LazyCollections { return (E[]) new Object[length]; } - public static List ofLazyList(int size, - IntFunction computingFunction) { - return new LazyList<>(size, computingFunction); - } - - public static Map ofLazyMap(Set keys, - Function computingFunction) { - return new LazyMap<>(keys, computingFunction); - } @SuppressWarnings("unchecked") - public static , V> - Map ofLazyMapWithEnumKeys(Set keys, - Function computingFunction) { - // The input set is not empty - final Class enumType = ((E) keys.iterator().next()).getDeclaringClass(); - final BitSet bitSet = new BitSet(enumType.getEnumConstants().length); - int min = Integer.MAX_VALUE; - int max = Integer.MIN_VALUE; - for (K t : keys) { - final int ordinal = ((E) t).ordinal(); - min = Math.min(min, ordinal); - max = Math.max(max, ordinal); - bitSet.set(ordinal); - } - final int backingSize = max - min + 1; - final IntPredicate member = ImmutableBitSetPredicate.of(bitSet); - return (Map) new LazyEnumMap<>((Set) keys, enumType, min, backingSize, member, (Function) computingFunction); - } - - @SuppressWarnings("unchecked") - static T orElseComputeSlowPath(final T[] array, + private static T orElseComputeSlowPath(final T[] array, final int index, final Mutexes mutexes, + final Throwables throwables, final Object input, final FunctionHolder functionHolder) { final long offset = offsetFor(index); final Object mutex = mutexes.acquireMutex(offset); - preventReentry(mutex); + if (mutex == null) { + throwIfPreviousException(index, throwables, input); + // There must be an exception + throw cannotReachHere(functionHolder, input); + } + preventReentry(mutex, input); synchronized (mutex) { final T t = array[index]; // Plain semantics suffice here if (t == null) { - final T newValue = switch (functionHolder.function()) { - case IntFunction iFun -> (T) iFun.apply((int) input); - case Function fun -> ((Function) fun).apply(input); - default -> throw new InternalError("cannot reach here"); - }; - Objects.requireNonNull(newValue); - // Reduce the counter and if it reaches zero, clear the reference - // to the underlying holder. - functionHolder.countDown(); + throwIfPreviousException(index, throwables, input); + try { + final T newValue = switch (functionHolder.function()) { + case IntFunction iFun -> (T) iFun.apply((int) input); + case Function fun -> ((Function) fun).apply(input); + default -> throw cannotReachHere(functionHolder, input); + }; + Objects.requireNonNull(newValue); - // The mutex is not reentrant so we know newValue should be returned - set(array, index, mutex, newValue); - // We do not need the mutex anymore - mutexes.releaseMutex(offset); - return newValue; + // The mutex is not reentrant so we know newValue should be returned + set(array, index, mutex, newValue); + return newValue; + } catch (Throwable x) { + throwables.set(index, x); + // Wrap the initial throwable without pinning its class loader. + throw noSuchElementException(x.getClass().getName(), input, x); + } finally { + // Reduce the counter and if it reaches zero, clear the reference + // to the underlying holder. + functionHolder.countDown(); + + // We do not need the mutex anymore + mutexes.releaseMutex(offset); + } } return t; } } - static void preventReentry(Object mutex) { - if (Thread.holdsLock(mutex)) { - throw new IllegalStateException("Recursive initialization of a lazy collection is illegal"); + private static void throwIfPreviousException(int index, Throwables throwables, Object input) { + final var throwable = throwables.get(index); + if (throwable.isPresent()) { + throw noSuchElementException(throwable.get(), input, null); } } - static void set(T[] array, int index, Object mutex, T newValue) { + private static NoSuchElementException noSuchElementException(String throwableName, + Object input, + Throwable cause) { + final String isolatedToString = LazyConstantImpl.isolateToString(input); + var message = "Unable to access the lazy collection because " + throwableName + + " was thrown at initial computation for input '" + isolatedToString + "'"; + return new NoSuchElementException(message, cause); + } + + private static InternalError cannotReachHere(FunctionHolder functionHolder, Object input) { + return new InternalError("cannot reach here: " + functionHolder.function() + " for " + LazyConstantImpl.isolateToString(input)); + } + + private static void preventReentry(Object mutex, Object input) { + if (Thread.holdsLock(mutex)) { + throw new IllegalStateException("Recursive initialization of a lazy collection is illegal: " + LazyConstantImpl.isolateToString(input)); + } + } + + private static void set(T[] array, int index, Object mutex, T newValue) { assert Thread.holdsLock(mutex) : index + "didn't hold " + mutex; // We know we hold the monitor here so plain semantic is enough // This is an extra safety net to emulate a CAS op. @@ -551,7 +755,7 @@ final class LazyCollections { * @param the underlying function type */ @AOTSafeClassInitializer - static final class FunctionHolder { + private static final class FunctionHolder { private static final long COUNTER_OFFSET = UNSAFE.objectFieldOffset(FunctionHolder.class, "counter"); @@ -581,4 +785,50 @@ final class LazyCollections { } } + // Methods for supporting stable `int` values using a `long` field. + + private static long expandToLong(int value) { + return (value + (1L << 33)); + } + + private static int reduceToInt(long value) { + return (int) value; + } + + // Factories + + static List ofLazyList(int size, + IntFunction computingFunction) { + return new LazyList<>(size, computingFunction); + } + + static Map ofLazyMap(Set keys, + Function computingFunction) { + return new LazyMap<>(keys, computingFunction); + } + + static Set ofLazySet(Set elementCandidates, + Predicate computingFunction) { + return new LazySet<>(elementCandidates, computingFunction); + } + + @SuppressWarnings("unchecked") + static , V> Map ofLazyMapWithEnumKeys(Set keys, + Function computingFunction) { + // The input set is not empty + final Class enumType = ((E) keys.iterator().next()).getDeclaringClass(); + final BitSet bitSet = new BitSet(enumType.getEnumConstants().length); + int min = Integer.MAX_VALUE; + int max = Integer.MIN_VALUE; + for (K t : keys) { + final int ordinal = ((E) t).ordinal(); + min = Math.min(min, ordinal); + max = Math.max(max, ordinal); + bitSet.set(ordinal); + } + final int backingSize = max - min + 1; + final IntPredicate member = ImmutableBitSetPredicate.of(bitSet); + return (Map) new LazyEnumMap<>((Set) keys, enumType, min, backingSize, member, (Function) computingFunction); + } + } diff --git a/src/java.base/share/classes/java/util/List.java b/src/java.base/share/classes/java/util/List.java index 5f9a90e1748..a906215f16b 100644 --- a/src/java.base/share/classes/java/util/List.java +++ b/src/java.base/share/classes/java/util/List.java @@ -1200,23 +1200,36 @@ public interface List extends SequencedCollection { * {@return a new lazily computed list of the provided {@code size}} *

* The returned list is an {@linkplain Collection##unmodifiable unmodifiable} list - * with the provided {@code size}. The list's elements are lazily computed via the - * provided {@code computingFunction} when they are first accessed + * for which the elements are lazily computed via the provided + * {@code computingFunction} when they are first accessed * (e.g., via {@linkplain List#get(int) List::get}). *

- * The provided computing function is guaranteed to be successfully + * The provided computing function is guaranteed to be * invoked at most once per list index, even in a multi-threaded environment. * Competing threads accessing an element already under computation will block until * an element is computed or the computing function completes abnormally. *

- * If invoking the provided computing function throws an exception, it is rethrown - * to the initial caller and no value for the element is recorded. + * If evaluation of the provided computing function throws an unchecked exception (for + * an index), the lazy element is not initialized but instead transitions to an error + * state whereafter a {@linkplain NoSuchElementException} is thrown with the unchecked + * exception as a cause. Subsequent {@linkplain List#get(int) List::get} calls for the + * same index throw {@linkplain NoSuchElementException} (without ever invoking the + * computing function again) with no cause and with a message that includes the name + * of the original unchecked exception's class. *

- * If the provided computing function returns {@code null}, - * a {@linkplain NullPointerException} will be thrown. Hence, just like other - * unmodifiable lists created via the {@code List::of} factories, a lazy list - * cannot contain {@code null} elements. Clients that want to use nullable elements - * can wrap elements into an {@linkplain Optional} holder. + * All failures are handled in this way. There are two special cases that cause + * unchecked exceptions to be thrown: + *

+ * If the computing function returns {@code null}, + * a {@linkplain NoSuchElementException} (with a {@linkplain NullPointerException} as + * a cause) will be thrown. Hence, just like other unmodifiable lists created via the + * {@code List::of} factories, a lazy list can never contain {@code null} + * elements. Clients that want to use nullable elements can wrap elements into an + * {@linkplain Optional} holder. + *

+ * If the computing function recursively invokes itself (for the same index) via the + * returned lazy list, a {@linkplain NoSuchElementException} + * (with an {@linkplain IllegalStateException} as a cause) will be thrown. *

* The elements of any {@link List#subList(int, int) subList()} or * {@link List#reversed()} views of the returned list are also lazily computed. @@ -1224,31 +1237,78 @@ public interface List extends SequencedCollection { * The returned list and its {@link List#subList(int, int) subList()} or * {@link List#reversed()} views implement the {@link RandomAccess} interface. *

- * If the provided computing function recursively calls itself via the returned - * lazy list for the same index, an {@linkplain IllegalStateException} - * will be thrown. - *

* The returned list's {@linkplain Object Object methods}; * {@linkplain Object#equals(Object) equals()}, * {@linkplain Object#hashCode() hashCode()}, and * {@linkplain Object#toString() toString()} methods may trigger initialization of - * one or more lazy elements. + * one or more lazy elements. If initialization fails for at least one element, + * the {@linkplain Object Object methods} may throw {@linkplain NoSuchElementException}. *

* The returned lazy list strongly references its computing * function used to compute elements at least as long as there are uninitialized * elements. *

* The returned List is not {@linkplain Serializable}. + *

+ * Here is an example involving an application that maintains three separate + * {@code OrderController} components. Depending on a thread's id, one of the + * three {@code OrderController} components will be selected. By using a lazy list, + * we ensure that at most three {@code OrderController} instances are created. Once + * created, the component retrieval is eligible for constant folding by the JVM: + * {@snippet lang = java: + * class Application { * - * @implNote after all elements have been initialized successfully, the computing - * function is no longer strongly referenced and becomes eligible for - * garbage collection. + * private static final int POOL_SIZE = 3; + * + * static final List ORDERS + * = List.ofLazy(POOL_SIZE, _ -> new OrderController()); + * + * public static OrderController orders() { + * long index = Thread.currentThread().threadId() % POOL_SIZE; + * return ORDERS.get((int)index); + * } + * + * // Eligible for constant folding + * OrderController orders = orders(); + * } + * } + *

+ * The returned {@code List} can be thought of as a list backed by a + * {@code List>} field and where the {@linkplain List#get(int)} + * operation is equivalent to: + * {@snippet lang = java: + * class LazyList extends AbstractList { + * + * private final List> backingList; + * + * public LazyList(int size, IntFunction computingFunction) { + * this.backingList = IntStream.range(0, size) + * .mapToObj(i -> LazyConstant.of(() -> computingFunction.apply(i))) + * .toList(); + * } + * + * @Override + * public E get(int index) { + * return backingList.get(index).get(); + * } + * } + *} + * Except, performance and storage efficiency might be better. + *

+ * Elements in the returned list are eligible for certain performance optimizations + * such as constant folding as described in + * {@linkplain LazyConstant##performance LazyConstant}. + * + * @implNote after all elements have been initialized successfully or transitioned to + * an error state, the computing function is no longer strongly referenced + * and becomes eligible for garbage collection. * * @param size the size of the returned lazy list * @param computingFunction to invoke whenever an element is first accessed * (may not return {@code null}) * @param the type of elements in the returned list * @throws IllegalArgumentException if the provided {@code size} is negative. + * @throws NullPointerException if the provided {@code computingFunction} is {@code null} * * @see LazyConstant * @since 26 diff --git a/src/java.base/share/classes/java/util/Locale.java b/src/java.base/share/classes/java/util/Locale.java index 6b071cd15b2..2bab271a489 100644 --- a/src/java.base/share/classes/java/util/Locale.java +++ b/src/java.base/share/classes/java/util/Locale.java @@ -3493,7 +3493,8 @@ public final class Locale implements Cloneable, Serializable { * sorted in descending order based on priority or weight, or an empty * list if nothing matches. The list is modifiable. * @throws NullPointerException if {@code priorityList} or {@code locales} - * is {@code null} + * are {@code null}. {@code NullPointerException} may be thrown if any + * elements within either {@code Collection} are {@code null}. * @throws IllegalArgumentException if one or more extended language ranges * are included in the given list when * {@link FilteringMode#REJECT_EXTENDED_RANGES} is specified @@ -3503,6 +3504,8 @@ public final class Locale implements Cloneable, Serializable { public static List filter(List priorityList, Collection locales, FilteringMode mode) { + Objects.requireNonNull(priorityList); + Objects.requireNonNull(locales); return LocaleMatcher.filter(priorityList, locales, mode); } @@ -3522,12 +3525,15 @@ public final class Locale implements Cloneable, Serializable { * sorted in descending order based on priority or weight, or an empty * list if nothing matches. The list is modifiable. * @throws NullPointerException if {@code priorityList} or {@code locales} - * is {@code null} + * are {@code null}. {@code NullPointerException} may be thrown if any + * elements within either {@code Collection} are {@code null}. * * @since 1.8 */ public static List filter(List priorityList, Collection locales) { + Objects.requireNonNull(priorityList); + Objects.requireNonNull(locales); return filter(priorityList, locales, FilteringMode.AUTOSELECT_FILTERING); } @@ -3553,8 +3559,9 @@ public final class Locale implements Cloneable, Serializable { * @return a list of matching language tags sorted in descending order * based on priority or weight, or an empty list if nothing matches. * The list is modifiable. - * @throws NullPointerException if {@code priorityList} or {@code tags} is - * {@code null} + * @throws NullPointerException if {@code priorityList} or {@code tags} + * are {@code null}. {@code NullPointerException} may be thrown if any + * elements within either {@code Collection} are {@code null}. * @throws IllegalArgumentException if one or more extended language ranges * are included in the given list when * {@link FilteringMode#REJECT_EXTENDED_RANGES} is specified @@ -3564,6 +3571,8 @@ public final class Locale implements Cloneable, Serializable { public static List filterTags(List priorityList, Collection tags, FilteringMode mode) { + Objects.requireNonNull(priorityList); + Objects.requireNonNull(tags); return LocaleMatcher.filterTags(priorityList, tags, mode); } @@ -3590,13 +3599,15 @@ public final class Locale implements Cloneable, Serializable { * @return a list of matching language tags sorted in descending order * based on priority or weight, or an empty list if nothing matches. * The list is modifiable. - * @throws NullPointerException if {@code priorityList} or {@code tags} is - * {@code null} - * + * @throws NullPointerException if {@code priorityList} or {@code tags} + * are {@code null}. {@code NullPointerException} may be thrown if any + * elements within either {@code Collection} are {@code null}. * @since 1.8 */ public static List filterTags(List priorityList, Collection tags) { + Objects.requireNonNull(priorityList); + Objects.requireNonNull(tags); return filterTags(priorityList, tags, FilteringMode.AUTOSELECT_FILTERING); } @@ -3609,13 +3620,15 @@ public final class Locale implements Cloneable, Serializable { * @param locales {@code Locale} instances used for matching * @return the best matching {@code Locale} instance chosen based on * priority or weight, or {@code null} if nothing matches. - * @throws NullPointerException if {@code priorityList} or {@code locales} is - * {@code null} - * + * @throws NullPointerException if {@code priorityList} or {@code locales} + * are {@code null}. {@code NullPointerException} may be thrown if any + * elements within either {@code Collection} are {@code null}. * @since 1.8 */ public static Locale lookup(List priorityList, Collection locales) { + Objects.requireNonNull(priorityList); + Objects.requireNonNull(locales); return LocaleMatcher.lookup(priorityList, locales); } @@ -3631,13 +3644,15 @@ public final class Locale implements Cloneable, Serializable { * @param tags language tags used for matching * @return the best matching language tag chosen based on priority or * weight, or {@code null} if nothing matches. - * @throws NullPointerException if {@code priorityList} or {@code tags} is - * {@code null} - * + * @throws NullPointerException if {@code priorityList} or {@code tags} + * are {@code null}. {@code NullPointerException} may be thrown if any + * elements within either {@code Collection} are {@code null}. * @since 1.8 */ public static String lookupTag(List priorityList, Collection tags) { + Objects.requireNonNull(priorityList); + Objects.requireNonNull(tags); return LocaleMatcher.lookupTag(priorityList, tags); } diff --git a/src/java.base/share/classes/java/util/Map.java b/src/java.base/share/classes/java/util/Map.java index fa16fb89050..f5fb190f7d8 100644 --- a/src/java.base/share/classes/java/util/Map.java +++ b/src/java.base/share/classes/java/util/Map.java @@ -1759,50 +1759,122 @@ public interface Map { * provided {@code computingFunction} when they are first accessed * (e.g., via {@linkplain Map#get(Object) Map::get}). *

- * The provided computing function is guaranteed to be successfully invoked + * The provided computing function is guaranteed to be invoked * at most once per key, even in a multi-threaded environment. Competing - * threads accessing a value already under computation will block until an element + * threads accessing a value already under computation will block until a value * is computed or the computing function completes abnormally. *

- * If invoking the provided computing function throws an exception, it - * is rethrown to the initial caller and no value associated with the provided key - * is recorded. + * If evaluation of the provided computing function throws an unchecked exception (for + * a key), the lazy value is not initialized but instead transitions to an error + * state whereafter a {@linkplain NoSuchElementException} is thrown with the unchecked + * exception as a cause. Subsequent {@linkplain Map#get(Object) Map::get} calls for + * the same key throw {@linkplain NoSuchElementException} (without ever invoking the + * computing function again) with no cause and with a message that includes the name + * of the original unchecked exception's class. *

- * If the provided computing function returns {@code null}, - * a {@linkplain NullPointerException} will be thrown. Hence, just like other - * unmodifiable maps created via the {@code Map::of} factories, a lazy map - * cannot contain {@code null} values. Clients that want to use nullable values can - * wrap values into an {@linkplain Optional} holder. + * All failures are handled in this way. There are two special cases that cause + * unchecked exceptions to be thrown: + *

+ * If the computing function returns {@code null}, + * a {@linkplain NoSuchElementException} (with a {@linkplain NullPointerException} as + * a cause) will be thrown. Hence, just like other unmodifiable maps created via the + * {@code Map::of} factories, a lazy map can never contain {@code null} values. + * Clients that want to use nullable values can wrap elements into an + * {@linkplain Optional} holder. + *

+ * If the computing function recursively invokes itself (for the same key) via the + * returned lazy map, a {@linkplain NoSuchElementException} + * (with an {@linkplain IllegalStateException} as a cause) will be thrown. *

* The values of any {@link Map#values()} or {@link Map#entrySet()} views of * the returned map are also lazily computed. *

- * If the provided computing function recursively calls itself via - * the returned lazy map for the same key, an {@linkplain IllegalStateException} - * will be thrown. - *

* The returned map's {@linkplain Object Object methods}; * {@linkplain Object#equals(Object) equals()}, * {@linkplain Object#hashCode() hashCode()}, and * {@linkplain Object#toString() toString()} methods may trigger initialization of - * one or more lazy elements. + * one or more lazy values. If initialization fails for at least one value, + * the {@linkplain Object Object methods} may throw {@linkplain NoSuchElementException}. *

* The returned lazy map strongly references its underlying * computing function used to compute values at least as long as there are * uncomputed values. *

* The returned Map is not {@linkplain Serializable}. + *

+ * If the provided {@code Set} of {@code keys} is subsequently modified, the returned + * {@code Map} will not reflect such modifications. + *

+ * The {@code Set} of {@code keys} must use {@linkplain Set#equals(Object) equals()} + * as its equivalence relation, or its comparison method must be consistent with + * equals, otherwise the behavior is unspecified. + *

+ * Here is an example involving an application that caches the values returned by some + * {@code expensiveOperation(int param)} for a given set of input parameters. By + * using a lazy map, we ensure that the {@code expensiveOperation(int param)} is + * called at most once per distinct input parameter. Once created, the retrieval of + * values is eligible for constant folding by the JVM: + * {@snippet lang = java: + * class Application { * - * @implNote after all values have been initialized successfully, the computing - * function is no longer strongly referenced and becomes eligible for - * garbage collection. + * private static final Map CACHE + * = Map.ofLazy(Set.of(0, 1, 3, 42, 97), param -> expensiveOperation(param)); + * + * public static Optional cachedExpensiveOperation(int param) { + * return Optional.ofNullable(CACHE.get(param)); + * } + * + * private static double expensiveOperation(int param) { + * // Calculate the value ... + * } + * + * // Eligible for constant folding + * double val = cachedExpensiveOperation(42).orElseThrow(); + * + * } + * } + *

+ * The returned {@code Map} can be thought of as a map backed by a + * {@code Map>} field and where the {@linkplain Map#get(Object)} + * operation is equivalent to: + * {@snippet lang = java: + * class LazyMap extends AbstractMap { + * + * private final Map> backingMap; + * + * public LazyMap(Set keys, Function computingFunction) { + * this.backingMap = keys.stream() + * .collect(Collectors.toUnmodifiableMap( + * Function.identity(), + * k -> LazyConstant.of(() -> computingFunction.apply(k)))); + * } + * + * @Override + * public V get(Object key) { + * var lazyConstant = backingMap.get(key); + * return lazyConstant == null + * ? null + * : lazyConstant.get(); + * } + * } + *} + * Except, performance and storage efficiency might be better. + *

+ * Values in the returned map are eligible for certain performance optimizations + * such as constant folding as described in + * {@linkplain LazyConstant##performance LazyConstant}. + * + * @implNote after all values have been initialized successfully or transitioned to + * an error state, the computing function is no longer strongly referenced + * and becomes eligible for garbage collection. * * @param keys the (non-null) keys in the returned computed map * @param computingFunction to invoke whenever an associated value is first accessed * @param the type of keys maintained by the returned map * @param the type of mapped values in the returned map - * @throws NullPointerException if the provided set of {@code keys} is {@code null} - * or if the set of {@code keys} contains a {@code null} element. + * @throws NullPointerException if the provided set of {@code keys} is {@code null}, + * if the set of {@code keys} contains a {@code null} element, or + * if the provided {@code computingFunction} is {@code null} * * @see LazyConstant * @since 26 diff --git a/src/java.base/share/classes/java/util/Set.java b/src/java.base/share/classes/java/util/Set.java index 5ce3bf04c7c..0c66d4ef53c 100644 --- a/src/java.base/share/classes/java/util/Set.java +++ b/src/java.base/share/classes/java/util/Set.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2023, 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 @@ -25,6 +25,11 @@ package java.util; +import jdk.internal.javac.PreviewFeature; + +import java.io.Serializable; +import java.util.function.Predicate; + /** * A collection that contains no duplicate elements. More formally, sets * contain no pair of elements {@code e1} and {@code e2} such that @@ -77,7 +82,7 @@ package java.util; * Set to behave inconsistently or its contents to appear to change. *

  • They disallow {@code null} elements. Attempts to create them with * {@code null} elements result in {@code NullPointerException}. - *
  • They are serializable if all elements are serializable. + *
  • Unless otherwise specified, they are serializable if all elements are serializable. *
  • They reject duplicate elements at creation time. Duplicate elements * passed to a static factory method result in {@code IllegalArgumentException}. *
  • The iteration order of set elements is unspecified and is subject to change. @@ -734,4 +739,158 @@ public interface Set extends Collection { return (Set)Set.of(new HashSet<>(coll).toArray()); } } + + /** + * {@return a new lazily computed set whose logical membership for each distinct + * element candidate in the set of {@code elementCandidates} is + * computed via the provided {@code computingFunction} on demand} + *

    + * In the following, the term membership status is used to indicate whether + * an element belongs to the returned set or not. That is, if the membership status + * for element {@code E} is {@code true}, then {@code E} is a member of the + * returned set. Conversely, if the membership status for element {@code E} is + * {@code false}, then {@code E} is not a member of the returned set. + *

    + * The returned set is an {@linkplain Collection##unmodifiable unmodifiable} set. The + * elements in the returned set are derived from the element candidates given at + * construction in combination with evaluating each element's membership status. The + * set's element membership statuses are lazily computed via the provided + * {@code computingFunction} when first accessed (e.g., via + * {@linkplain Set#contains(Object) Set::contains}). Once the membership status has + * been successfully computed for an element candidate, the associated membership + * status is initialized (i.e., either as a logical member or as + * a logical non-member). + *

    + * The provided computing function is guaranteed to be invoked at most once per + * element candidate, even in a multi-threaded environment. Competing threads + * accessing an element candidate already under membership status computation will + * block until the membership status of the element candidate is computed or the + * computing function completes abnormally. + *

    + * If evaluation of the provided computing function throws an unchecked exception (for + * an element candidate), the lazy membership status is not initialized but instead + * transitions to an error state whereafter a {@linkplain NoSuchElementException} is + * thrown with the unchecked exception as a cause. Subsequent + * {@linkplain Set#contains(Object) Set::contains} calls for the same membership + * candidate throw {@linkplain NoSuchElementException} (without ever invoking the + * computing function again) with no cause and with a message that includes the name + * of the original unchecked exception's class. + *

    + * All failures are handled in this way. There is a special case that causes + * unchecked exceptions to be thrown: + *

    + * If the computing function recursively invokes itself (for the same membership + * candidate) via the returned lazy set, a {@linkplain NoSuchElementException} + * (with an {@linkplain IllegalStateException} as a cause) will be thrown. + *

    + * The returned set's {@linkplain Object Object methods}; + * {@linkplain Object#equals(Object) equals()}, + * {@linkplain Object#hashCode() hashCode()}, and + * {@linkplain Object#toString() toString()} methods may trigger initialization of + * one or more lazy elements. If initialization fails for at least one element, + * the {@linkplain Object Object methods} may throw {@linkplain NoSuchElementException}. + *

    + * The returned lazy set strongly references its underlying + * computing function used to compute membership status at least as long as there are + * uncomputed element candidates. + *

    + * The returned Set is not {@linkplain Serializable}. + *

    + * If the provided {@code Set} of {@code elementCandidates} is subsequently modified, + * the returned {@code Set} will not reflect such modifications. + *

    + * The {@code Set} of {@code elementCandidates} must use + * {@linkplain Set#equals(Object) equals()} as its equivalence relation, or its + * comparison method must be consistent with {@code equals()}, otherwise the behavior + * is unspecified. + *

    + * Here is an example involving an application that manages various configurable + * options -- commonly referred to as "switches" -- that control its behavior. The + * state of these switches can be determined through the command line, a configuration + * file, or even a database connection. By using a lazy set, we ensure that the states + * of these switches are evaluated only once. Once computed, the results are eligible + * for constant folding by the JVM: + * {@snippet lang = java: + * class Application { + * + * enum Option {VERBOSE, DRY_RUN, STRICT} + * + * // Lazily initialized Set of Options + * static final Set

    + * The returned {@code Set} can be thought of as a set backed by a + * {@code Map>} field and where the {@linkplain Set#contains(Object)} + * operation is equivalent to: + * {@snippet lang = java: + * class LazySet extends AbstractCollection implements Set { + * + * private final Map> backingMap; + * + * public LazySet(Set elementCandidates, Predicate computingFunction) { + * this.backingMap = elementCandidates.stream() + * .collect(Collectors.toUnmodifiableMap( + * Function.identity(), + * k -> LazyConstant.of(() -> computingFunction.test(k)))); + * } + * + * @Override + * public boolean contains(Object o) { + * var lazyConstant = backingMap.get(o); + * return lazyConstant == null + * ? false + * : lazyConstant.get(); + * } + * } + *} + * Except, performance and storage efficiency might be better. + *

    + * Elements in the returned set are eligible for certain performance optimizations + * such as constant folding as described in + * {@linkplain LazyConstant##performance LazyConstant}. + * + * @implNote after all element membership statuses have been initialized + * successfully or transitioned to an error state, the computing function + * is no longer strongly referenced and becomes eligible for garbage + * collection. + * + * @param elementCandidates the (non-null) element candidates to be evaluated + * @param computingFunction to invoke whenever the membership status of an element + * candidate is first computed + * @param the type of elements maintained by the returned set + * @throws NullPointerException if the provided set of {@code elementCandidates} is + * {@code null}, if the set of {@code elementCandidates} + * contains a {@code null} element, or if the provided + * {@code computingFunction} is {@code null} + * + * @see LazyConstant + * @since 27 + */ + @PreviewFeature(feature = PreviewFeature.Feature.LAZY_CONSTANTS) + static Set ofLazy(Set elementCandidates, + Predicate computingFunction) { + Objects.requireNonNull(elementCandidates); + Objects.requireNonNull(computingFunction); + return LazyCollections.ofLazySet(elementCandidates, computingFunction); + } + } diff --git a/src/java.base/share/classes/java/util/concurrent/Joiners.java b/src/java.base/share/classes/java/util/concurrent/Joiners.java index 5d2a0f23ad7..8cd5f24dd37 100644 --- a/src/java.base/share/classes/java/util/concurrent/Joiners.java +++ b/src/java.base/share/classes/java/util/concurrent/Joiners.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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 @@ -33,6 +33,8 @@ import java.util.NoSuchElementException; import java.util.Objects; import java.util.concurrent.StructuredTaskScope.Joiner; import java.util.concurrent.StructuredTaskScope.Subtask; +import java.util.concurrent.StructuredTaskScope.CancelledByTimeoutException; +import java.util.function.Function; import java.util.function.Predicate; import jdk.internal.invoke.MhUtil; @@ -66,15 +68,21 @@ class Joiners { * A joiner that returns a list of all results when all subtasks complete * successfully. Cancels the scope if any subtask fails. */ - static final class AllSuccessful implements Joiner> { + static final class AllSuccessful implements Joiner, R_X> { private static final VarHandle FIRST_EXCEPTION = MhUtil.findVarHandle(MethodHandles.lookup(), "firstException", Throwable.class); + private final Function esf; + // list of forked subtasks, created lazily, only accessed by owner thread private List> subtasks; private volatile Throwable firstException; + AllSuccessful(Function esf) { + this.esf = Objects.requireNonNull(esf); + } + @Override public boolean onFork(Subtask subtask) { ensureUnavailable(subtask); @@ -94,11 +102,11 @@ class Joiners { } @Override - public List result() throws Throwable { + public List result() throws R_X { Throwable ex = firstException; try { if (ex != null) { - throw ex; + throw esf.apply(ex); } return (subtasks != null) ? subtasks.stream().map(Subtask::get).toList() @@ -107,22 +115,37 @@ class Joiners { subtasks = null; // allow subtasks to be GC'ed } } + + @Override + public List timeout() throws R_X { + try { + throw esf.apply(new CancelledByTimeoutException()); + } finally { + subtasks = null; // allow subtasks to be GC'ed + } + } } /** * A joiner that returns the result of the first subtask to complete successfully. * Cancels the scope if any subtasks succeeds. */ - static final class AnySuccessful implements Joiner { + static final class AnySuccessful implements Joiner { private static final VarHandle SUBTASK = MhUtil.findVarHandle(MethodHandles.lookup(), "subtask", Subtask.class); + private final Function esf; + // UNAVAILABLE < FAILED < SUCCESS private static final Comparator SUBTASK_STATE_COMPARATOR = Comparator.comparingInt(AnySuccessful::stateToInt); private volatile Subtask subtask; + AnySuccessful(Function esf) { + this.esf = Objects.requireNonNull(esf); + } + /** * Maps a Subtask.State to an int that can be compared. */ @@ -148,28 +171,39 @@ class Joiners { } @Override - public T result() throws Throwable { + public T result() throws R_X { Subtask subtask = this.subtask; if (subtask == null) { - throw new NoSuchElementException("No subtasks completed"); + throw esf.apply(new NoSuchElementException("No subtasks completed")); } return switch (subtask.state()) { case SUCCESS -> subtask.get(); - case FAILED -> throw subtask.exception(); + case FAILED -> throw esf.apply(subtask.exception()); default -> throw new InternalError(); }; } + + @Override + public T timeout() throws R_X { + throw esf.apply(new CancelledByTimeoutException()); + } } /** * A joiner that that waits for all successful subtasks. Cancels the scope if any * subtask fails. */ - static final class AwaitSuccessful implements Joiner { + static final class AwaitSuccessful implements Joiner { private static final VarHandle FIRST_EXCEPTION = MhUtil.findVarHandle(MethodHandles.lookup(), "firstException", Throwable.class); + + private final Function esf; private volatile Throwable firstException; + AwaitSuccessful(Function esf) { + this.esf = Objects.requireNonNull(esf); + } + @Override public boolean onComplete(Subtask subtask) { Subtask.State state = ensureCompleted(subtask); @@ -179,26 +213,31 @@ class Joiners { } @Override - public Void result() throws Throwable { + public Void result() throws R_X { Throwable ex = firstException; if (ex != null) { - throw ex; + throw esf.apply(ex); } else { return null; } } + + @Override + public Void timeout() throws R_X { + throw esf.apply(new CancelledByTimeoutException()); + } } /** * A joiner that returns a list of all subtasks. */ - static final class AllSubtasks implements Joiner>> { - private final Predicate> isDone; + static final class AllSubtasks implements Joiner>, RuntimeException> { + private final Predicate> isDone; // list of forked subtasks, created lazily, only accessed by owner thread private List> subtasks; - AllSubtasks(Predicate> isDone) { + AllSubtasks(Predicate> isDone) { this.isDone = Objects.requireNonNull(isDone); } @@ -218,11 +257,6 @@ class Joiners { return isDone.test(subtask); } - @Override - public void onTimeout() { - // do nothing, this joiner does not throw TimeoutException - } - @Override public List> result() { if (subtasks != null) { @@ -233,5 +267,10 @@ class Joiners { return List.of(); } } + + @Override + public List> timeout() { + return result(); + } } } diff --git a/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java b/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java index 66ba2c29bb3..39ad6074b31 100644 --- a/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java +++ b/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java @@ -26,6 +26,7 @@ package java.util.concurrent; import java.time.Duration; import java.util.List; +import java.util.function.Function; import java.util.function.Predicate; import java.util.function.Supplier; import java.util.function.UnaryOperator; @@ -36,166 +37,142 @@ import jdk.internal.javac.PreviewFeature; * where execution of a task (a unit of work) splits into several concurrent * subtasks, and where the subtasks must complete before the task continues. A {@code * StructuredTaskScope} can be used to ensure that the lifetime of a concurrent operation - * is confined by a syntax block, similar to that of a sequential operation in + * is confined by a syntactic block, similar to that of a sequential operation in * structured programming. * - *

    {@code StructuredTaskScope} defines the static method {@link #open() open} to open - * a new {@code StructuredTaskScope} and the {@link #close() close} method to close it. - * The API is designed to be used with the {@code try}-with-resources statement where - * the {@code StructuredTaskScope} is opened as a resource and then closed automatically. - * The code inside the block uses the {@link #fork(Callable) fork} method to fork subtasks. - * After forking, it uses the {@link #join() join} method to wait for all subtasks to - * finish (or some other outcome) as a single operation. Forking a subtask starts a new - * {@link Thread} to run the subtask. The thread executing the task does not continue - * beyond the {@code close} method until all threads started to execute subtasks have finished. - * To ensure correct usage, the {@code fork}, {@code join} and {@code close} methods may - * only be invoked by the owner thread (the thread that opened the {@code - * StructuredTaskScope}), the {@code fork} method may not be called after {@code join}, - * the {@code join} method must be invoked to get the outcome after forking subtasks, and - * the {@code close} method throws an exception after closing if the owner did not invoke - * the {@code join} method after forking subtasks. + *

    {@code StructuredTaskScope} defines the static {@link #open()} method to create + * and open a new {@code StructuredTaskScope}. It defines the {@link #close() close()} + * method to close it. The API is designed to be used with the {@code try}-with-resources + * statement where a {@code StructuredTaskScope} is opened as a resource and then closed + * automatically. The code inside the {@code try} block uses the {@link #fork(Callable)} + * method to fork subtasks. Each call to the {@code fork(Callable)} method starts + * a new {@link Thread} (typically a {@linkplain Thread##virtual-threads virtual thread}) + * to execute a subtask as a {@linkplain Callable value-returning method}. The subtask + * executes concurrently with the code inside the {@code try} block, and concurrently with + * other subtasks forked in the scope. After forking all subtasks, the code inside the + * block uses the {@link #join() join()} method to wait for all subtasks to finish (or + * some other outcome) as a single operation. The code after the {@code join()} method + * processes the outcome. Execution does not continue beyond the {@code try} block (or + * {@code close} method) until all threads started in the scope to execute subtasks have + * finished. * - *

    As a first example, consider a task that splits into two subtasks to concurrently - * fetch resources from two URL locations "left" and "right". Both subtasks may complete - * successfully, one subtask may succeed and the other may fail, or both subtasks may - * fail. The task in this example is interested in the successful result from both - * subtasks. It waits in the {@link #join() join} method for both subtasks to complete - * successfully or for either subtask to fail. + *

    To ensure correct usage, the {@link #fork(Callable)}, {@link #join()} and {@link + * #close()} methods may only be invoked by the owner thread (the thread that + * opened the {@code StructuredTaskScope}), the {@code fork(Callable)} method may not be + * called after {@code join()}, the {@code join()} method must be invoked to get the outcome + * after forking subtasks, and the {@code close()} method throws an exception after closing + * if the owner did not invoke the {@code join()} method after forking subtasks. + * + *

    As a first example, consider a "main" task that splits into two subtasks to + * concurrently fetch values from two remote services. The main task aggregates the results + * of both subtasks. The example invokes {@link #fork(Callable)} to fork the two subtasks. + * Each call to {@code fork(Callable)} returns a {@link Subtask Subtask} as a handle to + * the forked subtask. Both subtasks may complete successfully, one subtask may succeed + * and the other may fail, or both subtasks may fail. + * + *

    The main task in the example is interested in the successful result from both + * subtasks. It waits in the {@link #join()} method for both subtasks to complete + * successfully or for either subtask to fail. If both subtasks complete successfully then + * the {@code join()} method completes normally and the task uses the {@link Subtask#get() + * Subtask.get()} method to get the result of each subtask. If one of the subtasks fails + * then the other subtask is cancelled, and the {@code join()} method throws {@link + * ExecutionException} with the exception from the failed subtask as the {@linkplain + * Throwable#getCause() cause}. * {@snippet lang=java : - * // @link substring="open" target="#open()" : + * // @link substring="open()" target="#open()" : * try (var scope = StructuredTaskScope.open()) { * * // @link substring="fork" target="#fork(Callable)" : - * Subtask subtask1 = scope.fork(() -> query(left)); - * Subtask subtask2 = scope.fork(() -> query(right)); + * Subtask subtask1 = scope.fork(() -> fetchFromRemoteService1()); + * Subtask subtask2 = scope.fork(() -> fetchFromRemoteService2()); * - * // throws if either subtask fails - * scope.join(); // @link substring="join" target="#join()" + * // throws ExecutionException if either subtask fails + * scope.join(); // @link substring="join()" target="#join()" * * // both subtasks completed successfully - * // @link substring="get" target="Subtask#get()" : - * return new MyResult(subtask1.get(), subtask2.get()); + * // @link substring="get()" target="Subtask#get()" : + * var result = new MyResult(subtask1.get(), subtask2.get()); * * // @link substring="close" target="#close()" : * } // close * } * - *

    If both subtasks complete successfully then the {@code join} method completes - * normally and the task uses the {@link Subtask#get() Subtask.get()} method to get - * the result of each subtask. If one of the subtasks fails then the other subtask is - * cancelled (this will {@linkplain Thread#interrupt() interrupt} the thread executing the - * other subtask) and the {@code join} method throws {@link FailedException} with the - * exception from the failed subtask as the {@linkplain Throwable#getCause() cause}. + *

    The {@link #close() close()} method always waits for threads executing subtasks to + * finish, even if the {@code join()} method throws, so that execution cannot continue + * beyond the {@code close()} method until the interrupted threads finish. * *

    To allow for cancellation, subtasks must be coded so that they finish as soon as * possible when interrupted. Subtasks that do not respond to interrupt, e.g. block on - * methods that are not interruptible, may delay the closing of a scope indefinitely. The - * {@link #close() close} method always waits for threads executing subtasks to finish, - * even if the scope is cancelled, so execution cannot continue beyond the {@code close} - * method until the interrupted threads finish. + * methods that are not interruptible, may delay the {@link #close() close()} method + * indefinitely. * *

    In the example, the subtasks produce results of different types ({@code String} and * {@code Integer}). In other cases the subtasks may all produce results of the same type. - * If the example had used {@code StructuredTaskScope.open()} then it could - * only be used to fork subtasks that return a {@code String} result. + * If the example had used {@code StructuredTaskScope.open()} to open the scope + * then it could only be used to fork subtasks that return a {@code String} result. * *

    Joiners

    * - *

    In the example above, the task fails if any subtask fails. If all subtasks - * succeed then the {@code join} method completes normally. Other policy and outcome is - * supported by creating a {@code StructuredTaskScope} with a {@link Joiner} that - * implements the desired policy. A {@code Joiner} handles subtask completion and produces - * the outcome for the {@link #join() join} method. In the example above, {@code join} - * returns {@code null}. Depending on the {@code Joiner}, {@code join} may return a - * result, a list of elements, or some other object. The {@code Joiner} interface defines - * factory methods to create {@code Joiner}s for some common cases. + *

    The {@link #join()} method in the example above completes normally, and returns + * {@code null}, if all subtasks succeed. It throws {@code ExecutionException} if any subtask + * fails. Other policies and outcomes are possible by creating a {@code StructuredTaskScope} + * with a {@link Joiner Joiner} that implements the desired policy and outcome. A {@code + * Joiner} handles subtasks as they are forked and when they complete, and produces the + * outcome for the {@code join()} method. Instead of {@code null}, a {@code Joiner} may + * cause {@code join()} to return the result of a specific subtask, a collection of results, + * or an object constructed from the results of some or all subtasks. When the outcome + * is an exception, a {@code Joiner} may cause {@code join()} to throw an exception + * other than {@code ExecutionException}. * - *

    A {@code Joiner} may cancel the scope (sometimes called - * "short-circuiting") when some condition is reached that does not require the result of - * subtasks that are still executing. Cancelling the scope prevents new threads from being - * started to execute further subtasks, {@linkplain Thread#interrupt() interrupts} the - * threads executing subtasks that have not completed, and causes the {@code join} method - * to wakeup with the outcome (result or exception). In the above example, the outcome is - * that {@code join} completes with a result of {@code null} when all subtasks succeed. - * The scope is cancelled if any of the subtasks fail and {@code join} throws {@code - * FailedException} with the exception from the failed subtask as the cause. Other {@code - * Joiner} implementations may cancel the scope for other reasons. + *

    A {@code Joiner} may cancel the scope (sometimes + * called "short-circuiting") when some condition is reached, e.g. a subtask fails, that + * does not require the outcome of other subtasks that are still executing. Cancelling the + * scope prevents new threads from being started in the scope, cancels subtasks in the + * scope that have not completed execution, and causes the {@code join()} method to wake up + * with the outcome (result or exception). In the above example, the outcome is that {@code + * join()} completes normally when all subtasks succeed. The scope is cancelled if any + * subtask fails and {@code join()} throws {@code ExecutionException} with the exception + * from the failed subtask as the {@linkplain Throwable#getCause() cause}. Other {@code + * Joiner} implementations may cancel the scope for other reasons, and may cause {@code + * join()} to throw a different exception when the outcome is an exception. * - *

    Now consider another example that splits into two subtasks. In this example, - * each subtask produces a {@code String} result and the task is only interested in - * the result from the first subtask to complete successfully. The example uses {@link - * Joiner#anySuccessfulOrThrow() Joiner.anySuccessfulOrThrow()} to create a {@code Joiner} - * that makes available the result of the first subtask to complete successfully. The type - * parameter in the example is "{@code String}" so that only subtasks that return a - * {@code String} can be forked. + *

    The {@link Joiner Joiner} interface defines static factory methods to create a + * {@code Joiner} for a number of common cases. The interface can be implemented when a + * more advanced or custom policy is required. A {@code Joiner} that returns a + * non-{@code null} result may remove the need for bookkeeping and the need to keep + * a reference to {@code Subtask} objects returned by the {@link #fork(Callable)} method. + + *

    Now consider another example where a main task splits into two subtasks. In this + * example, each subtask produces a {@code String} result and the main task is only + * interested in the result from the first subtask to complete successfully. The example + * uses {@link Joiner#anySuccessfulOrThrow() Joiner.anySuccessfulOrThrow()} to create a + * {@code Joiner} that produces the result of any subtask that completes successfully. * {@snippet lang=java : - * // @link substring="open" target="#open(Joiner)" : + * // @link substring="anySuccessfulOrThrow()" target="Joiner#anySuccessfulOrThrow()" : * try (var scope = StructuredTaskScope.open(Joiner.anySuccessfulOrThrow())) { * + * // @link substring="fork" target="#fork(Callable)" : * scope.fork(callable1); * scope.fork(callable2); * - * // throws if both subtasks fail - * String firstResult = scope.join(); + * // throws ExecutionException if both subtasks fail + * String firstResult = scope.join(); // @link substring="join" target="#join()" * - * } + * // @link substring="close" target="#close()" : + * } // close * } * *

    In the example, the task forks the two subtasks, then waits in the {@code - * join} method for either subtask to complete successfully or for both subtasks to fail. + * join()} method for either subtask to complete successfully or for both subtasks to fail. * If one of the subtasks completes successfully then the {@code Joiner} causes the other * subtask to be cancelled (this will interrupt the thread executing the subtask), and - * the {@code join} method returns the result from the successful subtask. Cancelling the + * the {@code join()} method returns the result from the successful subtask. Cancelling the * other subtask avoids the task waiting for a result that it doesn't care about. If - * both subtasks fail then the {@code join} method throws {@code FailedException} with the - * exception from one of the subtasks as the {@linkplain Throwable#getCause() cause}. - * - *

    Whether code uses the {@code Subtask} returned from {@code fork} will depend on - * the {@code Joiner} and usage. Some {@code Joiner} implementations are suited to subtasks - * that return results of the same type and where the {@code join} method returns a result - * for the task to use. Code that forks subtasks that return results of different - * types, and uses a {@code Joiner} such as {@link Joiner#awaitAllSuccessfulOrThrow() - * awaitAllSuccessfulOrThrow} that does not return a result, will use {@link Subtask#get() - * Subtask.get()} after joining. - * - *

    Exception handling

    - * - *

    A {@code StructuredTaskScope} is opened with a {@link Joiner Joiner} that - * handles subtask completion and produces the outcome for the {@link #join() join} method. - * In some cases, the outcome will be a result, in other cases it will be an exception. - * If the outcome is an exception then the {@code join} method throws {@link - * FailedException} with the exception as the {@linkplain Throwable#getCause() - * cause}. For many {@code Joiner} implementations, the exception will be an exception - * thrown by a subtask that failed. In the case of {@link Joiner#allSuccessfulOrThrow() - * allSuccessfulOrThrow} and {@link Joiner#awaitAllSuccessfulOrThrow() awaitAllSuccessfulOrThrow} - * for example, the exception is from the first subtask to fail. - * - *

    Many of the details for how exceptions are handled will depend on usage. In some - * cases it may be useful to add a {@code catch} block to the {@code try}-with-resources - * statement to catch {@code FailedException}. The exception handling may use {@code - * instanceof} with pattern matching to handle specific causes. - * {@snippet lang=java : - * try (var scope = StructuredTaskScope.open()) { - * - * .. - * - * } catch (StructuredTaskScope.FailedException e) { - * - * Throwable cause = e.getCause(); - * switch (cause) { - * case IOException ioe -> .. - * default -> .. - * } - * - * } - * } - * In other cases it may not be useful to catch {@code FailedException} but instead leave - * it to propagate to the configured {@linkplain Thread.UncaughtExceptionHandler uncaught - * exception handler} for logging purposes. - * - *

    For cases where a specific exception triggers the use of a default result then it - * may be more appropriate to handle this in the subtask itself rather than the subtask - * failing and the scope owner handling the exception. + * both subtasks fail then the {@code join()} method throws {@link ExecutionException} with + * the exception from one of the subtasks as the {@linkplain Throwable#getCause() cause}. + * {@link Joiner#anySuccessfulOrThrow(Function) Joiner.anySuccessfulOrThrow(Function)} can + * be used with a function that produces an exception other than {@code ExecutionException} + * to throw when all subtasks fail. * *

    Configuration

    * @@ -209,37 +186,40 @@ import jdk.internal.javac.PreviewFeature; * configuration has a {@code ThreadFactory} that creates unnamed {@linkplain * Thread##virtual-threads virtual threads}, does not name the scope, and has no timeout. * - *

    The 2-arg {@link #open(Joiner, UnaryOperator) open} method can be used to create a - * {@code StructuredTaskScope} that uses a different {@code ThreadFactory}, is named for - * monitoring and management purposes, or has a timeout that cancels the scope if the - * timeout expires before or while waiting for subtasks to complete. The {@code open} - * method is called with an {@linkplain UnaryOperator operator} that is applied to the - * default configuration and returns a {@link Configuration Configuration} for the - * {@code StructuredTaskScope} under construction. + *

    The {@link #open(UnaryOperator)} and {@link #open(Joiner, UnaryOperator)} methods + * can be used to create a {@code StructuredTaskScope} that uses a different {@code + * ThreadFactory}, is named for monitoring and management purposes, or has a timeout that + * cancels the scope if the timeout expires before or while waiting for subtasks to + * complete. The {@code open} methods are called with an {@linkplain UnaryOperator operator} + * that is applied to the default configuration and returns a {@link Configuration + * Configuration} for the {@code StructuredTaskScope} under construction. * *

    The following example opens a new {@code StructuredTaskScope} with a {@code - * ThreadFactory} that creates virtual threads {@linkplain Thread#setName(String) named} + * ThreadFactory} that creates virtual threads {@linkplain Thread#getName() named} * "duke-0", "duke-1" ... * {@snippet lang = java: * // @link substring="name" target="Thread.Builder#name(String, long)" : * ThreadFactory factory = Thread.ofVirtual().name("duke-", 0).factory(); * * // @link substring="withThreadFactory" target="Configuration#withThreadFactory(ThreadFactory)" : - * try (var scope = StructuredTaskScope.open(joiner, cf -> cf.withThreadFactory(factory))) { + * try (var scope = StructuredTaskScope.open(cf -> cf.withThreadFactory(factory))) { * - * scope.fork( .. ); // runs in a virtual thread with name "duke-0" - * scope.fork( .. ); // runs in a virtual thread with name "duke-1" + * var subtask1 = scope.fork( .. ); // runs in a virtual thread with name "duke-0" + * var subtask2 = scope.fork( .. ); // runs in a virtual thread with name "duke-1" * * scope.join(); * + * var result = new MyResult(subtask1.get(), subtask2.get()); + * * } *} * *

    A second example sets a timeout, represented by a {@link Duration}. The timeout - * starts when the new scope is opened. If the timeout expires before the {@code join} - * method has completed then the scope is {@linkplain ##Cancellation cancelled} (this - * interrupts the threads executing the two subtasks), and the {@code join} method - * throws {@link TimeoutException TimeoutException}. + * starts when the new scope is opened. If the timeout expires before or while waiting in + * the {@link #join()} method then the scope is {@linkplain ##Cancellation cancelled} + * (this interrupts the threads executing the subtasks that have not completed), and the + * {@code join()} method throws {@link ExecutionException} with a {@link + * CancelledByTimeoutException CancelledByTimeoutException} as the cause. * {@snippet lang=java : * Duration timeout = Duration.ofSeconds(10); * @@ -248,14 +228,56 @@ import jdk.internal.javac.PreviewFeature; * // @link substring="withTimeout" target="Configuration#withTimeout(Duration)" : * cf -> cf.withTimeout(timeout))) { * - * scope.fork(callable1); + * scope.fork(callable1); // subtask takes a really long time * scope.fork(callable2); * + * // throws ExecutionException with CancelledByTimeoutException as cause * List results = scope.join(); * - * } + * } * } * + *

    Exception handling

    + * + *

    The outcome of the {@link #join()} method is a result or exception. When the outcome + * is an exception then its {@linkplain Throwable#getCause() cause} will typically be + * the exception from a failed subtask or {@link CancelledByTimeoutException + * CancelledByTimeoutException} if a timeout was configured. + * + *

    In some cases it may be useful to add a {@code catch} block to the + * {@code try}-with-resources statement to handle the exception. The following example + * uses the {@link #open(UnaryOperator)} method to open a scope with a timeout configured. + * The {@code join()} method in this example throws {@link ExecutionException} if any + * subtask fails or the timeout expires. The exception cause is the exception from a failed + * subtask or {@code CancelledByTimeoutException}. The example uses the {@code switch} + * statement to select based on the cause. + * {@snippet lang=java : + * try (var scope = StructuredTaskScope.open(cf -> cf.withTimeout(timeout))) { + * + * .. + * + * } catch (ExecutionException e) { + * switch (e.getCause()) { + * case CancelledByTimeoutException -> + * case IOException ioe -> .. + * default -> .. + * } + * } + * } + * + *

    In other cases it may not be useful to catch the exception but instead leave it to + * propagate to the configured {@linkplain Thread.UncaughtExceptionHandler uncaught + * exception handler} for logging purposes. + * + *

    For cases where a specific exception triggers the use of a default result then it + * may be more appropriate to handle this in the subtask itself rather than the subtask + * failing and the scope owner handling the exception. + * + *

    The {@link #join()} method throws {@link InterruptedException} when interrupted + * before or while waiting in the {@code join()} method. + * The {@link Thread##thread-interruption Thread Interruption} section of the {@code Thread} + * specification provides guidance on handling this exception. + * *

    Inheritance of scoped value bindings

    * * {@link ScopedValue} supports the execution of a method with a {@code ScopedValue} bound @@ -266,21 +288,21 @@ import jdk.internal.javac.PreviewFeature; *

    When used in conjunction with a {@code StructuredTaskScope}, a {@code ScopedValue} * can also safely and efficiently share a value to methods executed by subtasks forked * in the scope. When a {@code ScopedValue} object is bound to a value in the thread - * executing the task then that binding is inherited by the threads created to - * execute the subtasks. The thread executing the task does not continue beyond the - * {@link #close() close} method until all threads executing the subtasks have finished. + * executing a "main" task then that binding is inherited by the threads created to + * execute subtasks. The thread executing the main task does not continue beyond the + * {@link #close() close()} method until all threads executing the subtasks have finished. * This ensures that the {@code ScopedValue} is not reverted to being {@linkplain * ScopedValue#isBound() unbound} (or its previous value) while subtasks are executing. * In addition to providing a safe and efficient means to inherit a value into subtasks, - * the inheritance allows sequential code using {@code ScopedValue} be refactored to use - * structured concurrency. + * the inheritance allows sequential code using {@code ScopedValue} to be refactored to + * use structured concurrency. * *

    To ensure correctness, opening a new {@code StructuredTaskScope} captures the * current thread's scoped value bindings. These are the scoped values bindings that are * inherited by the threads created to execute subtasks in the scope. Forking a * subtask checks that the bindings in effect at the time that the subtask is forked * match the bindings when the {@code StructuredTaskScope} was created. This check ensures - * that a subtask does not inherit a binding that is reverted in the task before the + * that a subtask does not inherit a binding that is reverted in the main task before the * subtask has completed. * *

    A {@code ScopedValue} that is shared across threads requires that the value be an @@ -289,7 +311,7 @@ import jdk.internal.javac.PreviewFeature; *

    The following example demonstrates the inheritance of scoped value bindings. The * scoped value USERNAME is bound to the value "duke" for the bounded period of a lambda * expression by the thread executing it. The code in the block opens a {@code - * StructuredTaskScope} and forks two subtasks, it then waits in the {@code join} method + * StructuredTaskScope} and forks two subtasks, it then waits in the {@code join()} method * and aggregates the results from both subtasks. If code executed by the threads * running subtask1 and subtask2 uses {@link ScopedValue#get()}, to get the value of * USERNAME, then value "duke" will be returned. @@ -315,16 +337,16 @@ import jdk.internal.javac.PreviewFeature; *

    A scoped value inherited into a subtask may be {@linkplain ScopedValue##rebind * rebound} to a new value in the subtask for the bounded execution of some method executed * in the subtask. When the method completes, the value of the {@code ScopedValue} reverts - * to its previous value, the value inherited from the thread executing the task. + * to its previous value, the value inherited from the thread executing the main task. * *

    A subtask may execute code that itself opens a new {@code StructuredTaskScope}. - * A task executing in thread T1 opens a {@code StructuredTaskScope} and forks a + * A main task executing in thread T1 opens a {@code StructuredTaskScope} and forks a * subtask that runs in thread T2. The scoped value bindings captured when T1 opens the * scope are inherited into T2. The subtask (in thread T2) executes code that opens a - * new {@code StructuredTaskScope} and forks a subtask that runs in thread T3. The scoped - * value bindings captured when T2 opens the scope are inherited into T3. These - * include (or may be the same) as the bindings that were inherited from T1. In effect, - * scoped values are inherited into a tree of subtasks, not just one level of subtask. + * new {@code StructuredTaskScope} and forks a (sub-)subtask that runs in thread T3. The + * scoped value bindings captured when T2 opens the scope are inherited into T3. These + * include the bindings that were inherited from T1. In effect, scoped values are + * inherited into a tree of subtasks, not just one level of subtask. * *

    Memory consistency effects

    * @@ -335,29 +357,29 @@ import jdk.internal.javac.PreviewFeature; * subtask outcome with {@link Subtask#get() Subtask.get()} or {@link Subtask#exception() * Subtask.exception()}. If a subtask's outcome contributes to the result or exception * from {@link #join()}, then any actions taken by the thread executing that subtask - * happen-before the owner thread returns from {@code join} with a result or - * {@link FailedException FailedException}. + * happen-before the owner thread returns from {@code join()} with the outcome. * *

    General exceptions

    * *

    Unless otherwise specified, passing a {@code null} argument to a method in this * class will cause a {@link NullPointerException} to be thrown. * - * @param the result type of subtasks executed in the scope - * @param the result type of the scope - * + * @param the result type of subtasks {@linkplain #fork(Callable) forked} in the scope + * @param the type of the result returned by the {@link #join() join()} method + * @param the type of the exception thrown by the {@link #join() join()} method * @jls 17.4.5 Happens-before Order * @since 21 */ @PreviewFeature(feature = PreviewFeature.Feature.STRUCTURED_CONCURRENCY) -public sealed interface StructuredTaskScope +public sealed interface StructuredTaskScope extends AutoCloseable permits StructuredTaskScopeImpl { /** - * Represents a subtask forked with {@link #fork(Callable)} or {@link #fork(Runnable)}. + * Represents a subtask forked in a {@link StructuredTaskScope} with {@link + * #fork(Callable) fork(Callable)} or {@link #fork(Runnable) fork(Runnable)}. * - *

    Code that forks subtasks can use the {@link #get() get()} method after {@linkplain + *

    The scope owner can use the {@link #get() get()} method after {@linkplain * #join() joining} to obtain the result of a subtask that completed successfully. It * can use the {@link #exception()} method to obtain the exception thrown by a subtask * that failed. @@ -368,7 +390,7 @@ public sealed interface StructuredTaskScope @PreviewFeature(feature = PreviewFeature.Feature.STRUCTURED_CONCURRENCY) sealed interface Subtask extends Supplier permits StructuredTaskScopeImpl.SubtaskImpl { /** - * Represents the state of a subtask. + * Represents the state of a {@link Subtask Subtask}. * @see Subtask#state() * @since 21 */ @@ -376,20 +398,24 @@ public sealed interface StructuredTaskScope enum State { /** * The subtask result or exception is not available. This state indicates that - * the subtask was forked but has not completed, it completed after the scope - * was cancelled, or it was forked after the scoped was cancelled (in which - * case a thread was not created to execute the subtask). + * the subtask was forked but has not completed, the subtask was forked after + * the scope was {@linkplain StructuredTaskScope##Cancellation cancelled}, or + * the subtask completed after the scope was cancelled. */ UNAVAILABLE, /** - * The subtask completed successfully. The {@link Subtask#get() Subtask.get()} - * method can be used to get the result. This is a terminal state. + * The subtask completed successfully. If the scope is {@linkplain + * StructuredTaskScope##Cancellation cancelled}, the subtask completed + * successfully before the scope was cancelled. The {@link Subtask#get() + * Subtask.get()} method can be used to get the result. This is a terminal + * state. */ SUCCESS, /** - * The subtask failed with an exception. The {@link Subtask#exception() - * Subtask.exception()} method can be used to get the exception. This is a - * terminal state. + * The subtask failed with an exception. If the scope is {@linkplain + * StructuredTaskScope##Cancellation cancelled}, the subtask failed before + * the scope was cancelled. The {@link Subtask#exception() Subtask.exception()} + * method can be used to get the exception. This is a terminal state. */ FAILED, } @@ -400,16 +426,18 @@ public sealed interface StructuredTaskScope State state(); /** - * Returns the result of this subtask if it completed successfully. If the subtask - * was forked with {@link #fork(Callable) fork(Callable)} then the result from the - * {@link Callable#call() call} method is returned. If the subtask was forked with - * {@link #fork(Runnable) fork(Runnable)} then {@code null} is returned. + * Returns the result of this subtask if it completed successfully. If the scope + * is {@linkplain StructuredTaskScope##Cancellation cancelled}, the subtask + * completed successfully before the scope was cancelled. If the subtask was + * forked with {@link #fork(Callable) fork(Callable)} then the result from the + * {@link Callable#call() call()} method is returned. If the subtask was forked + * with {@link #fork(Runnable) fork(Runnable)} then {@code null} is returned. * *

    Code executing in the scope owner thread can use this method to get the * result of a successful subtask after it has {@linkplain #join() joined}. * *

    Code executing in the {@code Joiner} {@link Joiner#onComplete(Subtask) - * onComplete} method should test that the {@linkplain #state() subtask state} is + * onComplete(Subtask)} method should test that the {@linkplain #state() state} is * {@link State#SUCCESS SUCCESS} before using this method to get the result. * *

    This method may be invoked by any thread after the scope owner has joined. @@ -418,7 +446,7 @@ public sealed interface StructuredTaskScope * * @return the possibly-null result * @throws IllegalStateException if the subtask has not completed or did not - * complete successfully, or this method if invoked outside the context of the + * complete successfully, or this method is invoked outside the context of the * {@code onComplete(Subtask)} method before the owner thread has joined * @see State#SUCCESS */ @@ -426,16 +454,18 @@ public sealed interface StructuredTaskScope /** * {@return the exception or error thrown by this subtask if it failed} - * If the subtask was forked with {@link #fork(Callable) fork(Callable)} then the - * exception or error thrown by the {@link Callable#call() call} method is returned. - * If the subtask was forked with {@link #fork(Runnable) fork(Runnable)} then the - * exception or error thrown by the {@link Runnable#run() run} method is returned. + * If the scope is {@linkplain StructuredTaskScope##Cancellation cancelled}, the + * subtask failed before the scope was cancelled. If the subtask was forked with + * {@link #fork(Callable) fork(Callable)} then the exception or error thrown by + * the {@link Callable#call() call()} method is returned. If the subtask was + * forked with {@link #fork(Runnable) fork(Runnable)} then the exception or error + * thrown by the {@link Runnable#run() run()} method is returned. * *

    Code executing in the scope owner thread can use this method to get the * exception thrown by a failed subtask after it has {@linkplain #join() joined}. * *

    Code executing in a {@code Joiner} {@link Joiner#onComplete(Subtask) - * onComplete} method should test that the {@linkplain #state() subtask state} is + * onComplete(Subtask)} method should test that the {@linkplain #state() state} is * {@link State#FAILED FAILED} before using this method to get the exception. * *

    This method may be invoked by any thread after the scope owner has joined. @@ -443,7 +473,7 @@ public sealed interface StructuredTaskScope * owner has joined is when called from the {@code onComplete(Subtask)} method. * * @throws IllegalStateException if the subtask has not completed or completed - * with a result, or this method if invoked outside the context of the {@code + * with a result, or this method is invoked outside the context of the {@code * onComplete(Subtask)} method before the owner thread has joined * @see State#FAILED */ @@ -451,83 +481,99 @@ public sealed interface StructuredTaskScope } /** - * An object used with a {@link StructuredTaskScope} to handle subtask completion and - * produce the result for the scope owner waiting in the {@link #join() join} method - * for subtasks to complete. + * An object used with a {@link StructuredTaskScope} to produce the outcome for the + * scope's {@link #join() join()} method. * - *

    Joiner defines static methods to create {@code Joiner} objects for common cases: + *

    A {@code StructuredTaskScope} is opened with a {@code Joiner} that handles + * {@linkplain Subtask subtasks} as they are {@linkplain #fork(Callable) forked} in + * the scope and again when they complete execution. The {@code Joiner} handles + * subtasks that complete successfully with a result of type {@code T}, or fail with + * any exception or error. The {@code Joiner} implements a policy that may + * {@linkplain StructuredTaskScope##Cancellation cancel} the scope when some condition + * is reached (for example, a subtask fails). When all subtasks complete execution, or + * the scope is cancelled, the {@code Joiner} produces the outcome for the {@link + * #join() join()} method. The outcome is a result of type {@code R} or an exception + * of type {@code R_X}. + * + *

    {@code Joiner} defines static methods to create {@code Joiner} objects for + * common cases: *

      - *
    • {@link #allSuccessfulOrThrow() allSuccessfulOrThrow()} creates a {@code Joiner} - * that yields a list of all results for {@code join} to return when all subtasks - * complete successfully. It cancels the scope and causes {@code join} to throw if - * any subtask fails. - *
    • {@link #anySuccessfulOrThrow() anySuccessfulOrThrow()} creates a {@code Joiner} - * that yields the result of the first subtask to succeed for {@code join} to return. - * It causes {@code join} to throw if all subtasks fail. - *
    • {@link #awaitAllSuccessfulOrThrow() awaitAllSuccessfulOrThrow()} creates a - * {@code Joiner} that waits for all successful subtasks. It cancels the scope and - * causes {@code join} to throw if any subtask fails. - *
    • {@link #awaitAll() awaitAll()} creates a {@code Joiner} that waits for all - * subtasks to complete. It does not cancel the scope or cause {@code join} to throw. + *
    • {@link #allSuccessfulOrThrow()} and {@link #allSuccessfulOrThrow(Function)} + * create a {@code Joiner} that produces a list of all results for {@code join()} to + * return when all subtasks complete successfully. The {@code Joiner} cancels the + * scope and causes {@code join()} to throw {@link ExecutionException}, or an + * exception returned by an exception supplying function, if any subtask fails. + *
    • {@link #anySuccessfulOrThrow()} and {@link #anySuccessfulOrThrow(Function)} + * create a {@code Joiner} that produces the result of any successful subtask for + * {@code join()} to return. The {@code Joiner} causes {@code join()} to throw + * {@code ExecutionException}, or an exception returned by an exception supplying + * function, if all subtasks fail. + *
    • {@link #awaitAllSuccessfulOrThrow()} and {@link #awaitAllSuccessfulOrThrow(Function)} + * create a {@code Joiner} that waits for all subtasks to complete successfully. + * The {@code Joiner} does not produce a non-{@code null} result for {@code join()} + * to return. The {@code Joiner} cancels the scope and causes {@code join()} to throw + * {@code ExecutionException}, or an exception returned by an exception supplying + * function, if any subtask fails. *
    * *

    In addition to the methods to create {@code Joiner} objects for common cases, - * the {@link #allUntil(Predicate) allUntil(Predicate)} method is defined to create a - * {@code Joiner} that yields a list of all subtasks. It is created with a {@link - * Predicate Predicate} that determines if the scope should continue or be cancelled. - * This {@code Joiner} can be built upon to create custom policies that cancel the - * scope based on some condition. + * the {@link #allUntil(Predicate) allUntil(Predicate)} method can be used to create a + * {@code Joiner} that implements a cancellation policy. The {@code Joiner} + * is created with a {@linkplain Predicate predicate} that is evaluated on completed + * subtasks. The {@code Joiner} {@linkplain StructuredTaskScope##Cancellation cancels} + * the scope if the predicate evaluates to {@code true}. When using this {@code Joiner}, + * the outcome of the {@code join()} method is the list of all subtasks forked in the + * scope. * *

    More advanced policies can be developed by implementing the {@code Joiner} * interface. The {@link #onFork(Subtask)} method is invoked when subtasks are forked. * The {@link #onComplete(Subtask)} method is invoked when subtasks complete with a - * result or exception. These methods return a {@code boolean} to indicate if the scope - * should be cancelled. These methods can be used to collect subtasks, results, or - * exceptions, and control when to cancel the scope. The {@link #result()} method - * must be implemented to produce the result (or exception) for the {@code join} - * method. - * - *

    If a {@code StructuredTaskScope} is opened with a {@linkplain - * Configuration#withTimeout(Duration) timeout}, and the timeout expires before or - * while waiting in {@link StructuredTaskScope#join() join()}, then the scope is - * {@linkplain StructuredTaskScope##Cancellation cancelled}, and the {@code Joiners}'s - * {@link #onTimeout()} method is invoked to notify the {@code Joiner} and optionally - * throw {@link TimeoutException TimeoutException}. If the {@code onTimeout()} method - * does not throw then the {@code join()} method will invoke the {@link #result()} - * method to produce a result. This result may be based on the outcome of subtasks - * that completed before the timeout expired. + * result or exception. These methods return a {@code boolean} to indicate whether the + * scope should be cancelled. These methods can be used to collect subtasks, results, + * or exceptions, and control when to cancel the scope. The {@link #result()} method + * must be implemented to produce the outcome (result or exception) for the {@code + * join()} method. The {@link #timeout()} method must be implemented to produce the + * outcome for the {@linkplain Configuration#withTimeout(Duration) timeout} case. * *

    Unless otherwise specified, passing a {@code null} argument to a method * in this class will cause a {@link NullPointerException} to be thrown. * * @implSpec Implementations of this interface must be thread-safe. The {@link - * #onComplete(Subtask)} method may be invoked concurrently, as multiple subtasks can - * complete at the same time. Additionally, the {@code onComplete} method may be - * called concurrently with the scope owner thread invoking the {@link #onFork(Subtask)} - * or {@link #onTimeout()} methods. + * #onComplete(Subtask)} method may be invoked concurrently as multiple subtasks can + * complete at the same time. Additionally, the {@code onComplete(Subtask)} method may + * be called concurrently with the scope owner thread invoking the {@link + * #onFork(Subtask)}, {@link #result()}, or {@link #timeout()} methods. * - * @apiNote It is very important that a new {@code Joiner} object is created for each - * {@code StructuredTaskScope}. {@code Joiner} objects should never be shared with - * different scopes or re-used after a scope is closed. + *

    A {@code Joiner} should clearly document how it handles {@linkplain + * Configuration#withTimeout(Duration) timeouts}. In many cases, a timeout will cause + * the {@code join()} method to throw an exception with {@link + * CancelledByTimeoutException CancelledByTimeoutException} as the cause. Some + * {@code Joiner} implementation may be capable of returning a result for the + * timeout case. * *

    Designing a {@code Joiner} should take into account the code at the use-site - * where the results from the {@link StructuredTaskScope#join() join} method are + * where the results from the {@link StructuredTaskScope#join() join()} method are * processed. It should be clear what the {@code Joiner} does vs. the application * code at the use-site. In general, the {@code Joiner} implementation is not the * place for "business logic". A {@code Joiner} should be designed to be as general * purpose as possible. * - * @param the result type of subtasks executed in the scope - * @param the result type of the scope + * @apiNote It is very important that a new {@code Joiner} object is created for each + * {@code StructuredTaskScope}. {@code Joiner} objects should never be shared with + * different scopes or re-used after a scope is closed. + * + * @param the result type of subtasks {@linkplain #fork(Callable) forked} in the scope + * @param the type of the result returned by the {@link #join() join()} method + * @param the type of the exception thrown by the {@link #join() join()} method * @since 25 * @see #open(Joiner) */ @PreviewFeature(feature = PreviewFeature.Feature.STRUCTURED_CONCURRENCY) - interface Joiner { + interface Joiner { /** * Invoked by {@link #fork(Callable) fork(Callable)} and {@link #fork(Runnable) * fork(Runnable)} when forking a subtask. The method is invoked before a thread - * is created to run the subtask. + * is created to execute the subtask. * * @implSpec The default implementation throws {@code NullPointerException} if the * subtask is {@code null}. It throws {@code IllegalArgumentException} if the @@ -548,9 +594,10 @@ public sealed interface StructuredTaskScope } /** - * Invoked by the thread started to execute a subtask after the subtask completes - * successfully or fails with an exception. This method is not invoked if a - * subtask completes after the scope is cancelled. + * Invoked by the thread that executed a subtask after the subtask completes + * successfully or fails with an exception. This method is not invoked by subtasks + * that complete after the scope is {@linkplain StructuredTaskScope##Cancellation + * cancelled}. * * @implSpec The default implementation throws {@code NullPointerException} if the * subtask is {@code null}. It throws {@code IllegalArgumentException} if the @@ -571,227 +618,411 @@ public sealed interface StructuredTaskScope } /** - * Invoked by the {@link #join() join()} method if the scope was opened with a - * timeout, and the timeout expires before or while waiting in the {@code join} - * method. + * Invoked by the {@link #join() join()} method to produce the outcome (result or + * exception) after waiting for all subtasks to complete or the scope is {@linkplain + * StructuredTaskScope##Cancellation cancelled}. This method is not invoked if the + * scope was opened with a timeout and the timeout expires before or while waiting. * - * @implSpec The default implementation throws {@link TimeoutException TimeoutException}. + *

    This method will be called at most once, by the {@code join()} method, to + * produce the outcome. The behavior of this method when invoked directly is undefined. * - * @apiNote This method is intended for {@code Joiner} implementations that do not - * throw {@link TimeoutException TimeoutException}, or require a notification when - * the timeout expires before or while waiting in {@code join}. - * - *

    This method is invoked by the {@code join} method. It should not be - * invoked directly. - * - * @throws TimeoutException for {@code join} to throw - * @since 26 - */ - default void onTimeout() { - throw new TimeoutException(); - } - - /** - * Invoked by the {@link #join() join()} method to produce the result (or exception) - * after waiting for all subtasks to complete or the scope cancelled. The result - * from this method is returned by the {@code join} method. If this method throws, - * then {@code join} throws {@link FailedException} with the exception thrown by - * this method as the cause. - * - *

    In normal usage, this method will be called at most once by the {@code join} - * method to produce the result (or exception). The behavior of this method when - * invoked directly is undefined. - * - * @apiNote This method is invoked by the {@code join} method. It should not be + * @apiNote This method is invoked by the {@code join()} method. It should not be * invoked directly. * * @return the result - * @throws Throwable the exception + * @throws R_X if the outcome is an exception */ - R result() throws Throwable; + R result() throws R_X; /** - * {@return a new Joiner object that yields a list of all results when all - * subtasks complete successfully} - * The {@code Joiner} {@linkplain StructuredTaskScope##Cancellation cancels} - * the scope and causes {@code join} to throw if any subtask fails. + * Invoked by the {@link #join() join()} method to produce the outcome (result or + * exception) when the scope was opened with a timeout and the timeout expires before + * or while waiting in the {@code join()} method. * - *

    If all subtasks complete successfully then the joiner's {@link - * Joiner#result()} method returns a list of all results, in the order that the - * subtasks were forked, for the {@link StructuredTaskScope#join() join()} to return. - * If the scope was opened with a {@linkplain Configuration#withTimeout(Duration) - * timeout}, and the timeout expires before or while waiting for all subtasks to - * complete, then the {@code join} method throws {@code TimeoutException}. + *

    If the outcome is an exception, this method throws the exception with a + * {@link CancelledByTimeoutException CancelledByTimeoutException} as the + * {@link Throwable#getCause() cause}. + * + *

    This method will be called at most once, by the {@code join()} method, to + * produce the outcome. The behavior of this method when invoked directly is undefined. + * + * @apiNote This method is invoked by the {@code join()} method. It should not be + * invoked directly. + * + * @return the result + * @throws R_X with a cause of {@code CancelledByTimeoutException}, if the outcome + * is an exception + * @since 27 + */ + R timeout() throws R_X; + + /** + * {@return a new Joiner that produces a list of all results when all subtasks + * complete successfully} + * The {@code Joiner} {@linkplain StructuredTaskScope##Cancellation cancels} the + * scope and causes the {@link #join() join()} method to throw if any subtask fails. + * + *

    The {@link #join() join()} method of a {@link StructuredTaskScope} opened + * with this Joiner returns the list of the results, in the order that the subtasks + * were {@linkplain #fork(Callable) forked}, when all subtasks complete successfully. + * An empty list is returned if no subtasks were forked. If any subtask fails then + * the {@code Joiner} causes the {@code join()} method to throw the exception + * returned by the given exception supplying function when {@linkplain + * Function#apply(Object) applied} to the exception from the first subtask to fail. + * The function should return an exception with the exception from the failed + * subtask (the function argument) as the {@linkplain Throwable#getCause() cause}. + * If the function returns {@code null} then it causes the {@code join()} method + * to throw {@code NullPointerException}. + * + *

    Timeout Handling: The {@code Joiner} cannot produce a result when + * the scope is cancelled by a timeout. If the scope was opened with a {@linkplain + * Configuration#withTimeout(Duration) timeout}, and the timeout expires before or + * while waiting for all subtasks to complete successfully, then the {@code Joiner} + * causes the {@code join()} method to throw the exception returned by the + * exception supplying function when applied to a {@link CancelledByTimeoutException + * CancelledByTimeoutException}. * * @apiNote Joiners returned by this method are suited to cases where all subtasks - * return a result of the same type. Joiners returned by {@link - * #awaitAllSuccessfulOrThrow()} are suited to cases where the subtasks return - * results of different types. + * return a result of the same type. It removes the need for bookkeeping + * and the need to keep a reference to the {@link Subtask Subtask} objects returned + * by the {@link #fork(Callable) fork(Callable)} method. Joiners returned by {@link + * #awaitAllSuccessfulOrThrow(Function)} and {@link #awaitAllSuccessfulOrThrow()} + * are suited to cases where the subtasks return results of different types and + * where it is necessary to keep a reference to the {@code Subtask} objects. * + *

    The following example is a method that opens a {@code StructuredTaskScope} + * with a Joiner created with {@code allSuccessfulOrThrow(Function)}. The method + * is invoked with a collection of {@linkplain Callable callables}. It {@linkplain + * #fork(Callable) forks} a subtask to execute each callable, waits in {@link + * #join() join()} for all subtasks to complete successfully, and then returns a + * list of the results. It throws the runtime exception {@link CompletionException} + * if any subtask fails, with the exception from the first subtask to fail as the + * cause. + * {@snippet lang=java : + * List invokeAll(Collection> tasks) throws InterruptedException { + * try (var scope = StructuredTaskScope.open( + * Joiner.allSuccessfulOrThrow(CompletionException::new))) { + * tasks.forEach(scope::fork); + * List results = scope.join(); + * return results; + * } + * } + * } + * + * @param esf the exception supplying function * @param the result type of subtasks + * @param the type of the exception thrown by the {@link #join() join()} method + * @since 27 + * @see #allSuccessfulOrThrow() */ - static Joiner> allSuccessfulOrThrow() { - return new Joiners.AllSuccessful<>(); + static Joiner, R_X> + allSuccessfulOrThrow(Function esf) { + return new Joiners.AllSuccessful<>(esf); } /** - * {@return a new Joiner object that yields the result of any subtask that - * completed successfully} - * The {@code Joiner} causes {@code join} to throw if all subtasks fail. + * {@return a new Joiner that produces a list of all results when all subtasks + * complete successfully} + * The {@code Joiner} {@linkplain StructuredTaskScope##Cancellation cancels} the + * scope and causes the {@link #join() join()} method to throw {@link + * ExecutionException} if any subtask fails. * - *

    The joiner's {@link Joiner#result()} method returns the result of a subtask, - * that completed successfully, for the {@link StructuredTaskScope#join() join()} - * to return. If all subtasks fail then the {@code result} method throws the - * exception from one of the failed subtasks. The {@code result} method throws - * {@code NoSuchElementException} if no subtasks were forked. If the scope was - * opened with a {@linkplain Configuration#withTimeout(Duration) timeout}, and - * the timeout expires before or while waiting for any subtask to complete - * successfully, then the {@code join} method throws {@code TimeoutException}. + *

    The {@link #join() join()} method of a {@link StructuredTaskScope} opened + * with this Joiner returns the list of the results, in the order that the subtasks + * were {@linkplain #fork(Callable) forked}, when all subtasks complete successfully. + * An empty list is returned if no subtasks were forked. If any subtask fails then + * the Joiner causes the {@code join()} method to throw {@code ExecutionException} + * with the exception from the first subtask to fail as the {@linkplain + * Throwable#getCause() cause}. + * + *

    Timeout Handling: The {@code Joiner} cannot produce a result when + * the scope is cancelled by a timeout. If the scope was opened with a {@linkplain + * Configuration#withTimeout(Duration) timeout}, and the timeout expires before or + * while waiting for all subtasks to complete successfully, then the {@code Joiner} + * causes the {@code join()} method to throw {@code ExecutionException} with + * a {@link CancelledByTimeoutException CancelledByTimeoutException} as the cause. + * + * @implSpec A Joiner returned by this method is equivalent to invoking {@link + * #allSuccessfulOrThrow(Function) allSuccessfulOrThrow(ExecutionException::new)}. + * + * @param the result type of subtasks + */ + static Joiner, ExecutionException> allSuccessfulOrThrow() { + return allSuccessfulOrThrow(ExecutionException::new); + } + + /** + * {@return a new Joiner that produces the result of any successful subtask} + * The {@code Joiner} {@linkplain StructuredTaskScope##Cancellation cancels} the + * scope when a subtask completes successfully. It causes the {@link #join() join()} + * method to throw if all subtasks fail. + * + *

    The {@link #join() join()} method of a {@link StructuredTaskScope} opened + * with this Joiner returns the result of a successful subtask. If a subtask + * completes successfully then the scope is cancelled and the {@code join()} + * method returns its result. If all subtasks fail then the Joiner causes the + * {@code join()} method to throw the exception returned by the given exception + * supplying function when {@linkplain Function#apply(Object) applied} to the + * exception from one of the failed subtasks. The function should return an + * exception with the exception from the failed subtask (the function argument) as + * the {@linkplain Throwable#getCause() cause}. If the function returns {@code null} + * then it causes the {@code join()} method to throw {@code NullPointerException}. + * If no subtasks were forked then the Joiner causes the {@code join()} method to + * throw the exception returned by the function when applied to an instance of + * {@link java.util.NoSuchElementException}. + * + *

    Timeout Handling: The {@code Joiner} cannot produce a result when + * the scope is cancelled by a timeout. If the scope was opened with a {@linkplain + * Configuration#withTimeout(Duration) timeout}, and the timeout expires before or + * while waiting for a subtask to complete successfully, then the {@code Joiner} + * causes the {@code join()} method to throw the exception returned by the + * exception supplying function when applied to a {@link CancelledByTimeoutException + * CancelledByTimeoutException}. + * + * @apiNote The following example is a method that opens a {@code StructuredTaskScope} + * with a Joiner created with {@code anySuccessfulOrThrow(Function)}. The method + * is invoked with a collection of {@linkplain Callable callables}. It {@linkplain + * #fork(Callable) forks} a subtask to execute each callable, waits in {@link + * #join() join()} for any subtask to complete successfully, returning its result. + * It throws the runtime exception {@link CompletionException} if all subtasks fail, + * with the exception from a failed subtask as the cause. + * {@snippet lang=java : + * T invokeAny(Collection> tasks) throws InterruptedException { + * try (var scope = StructuredTaskScope.open( + * Joiner.anySuccessfulOrThrow(CompletionException::new))) { + * tasks.forEach(scope::fork); + * T result = scope.join(); + * return result; + * } + * } + * } + * + * @param esf the exception supplying function + * @param the result type of subtasks + * @param the type of the exception thrown by the {@link #join() join()} method + * @since 27 + * @see #anySuccessfulOrThrow() + */ + static Joiner anySuccessfulOrThrow(Function esf) { + return new Joiners.AnySuccessful<>(esf); + } + + /** + * {@return a new Joiner that produces the result of any successful subtask} + * The {@code Joiner} {@linkplain StructuredTaskScope##Cancellation cancels} the + * scope when a subtask completes successfully. It causes the {@link #join() join()} + * method to throw {@link ExecutionException} if all subtasks fail. + * + *

    The {@link #join() join()} method of a {@link StructuredTaskScope} opened + * with this Joiner returns the result of a successful subtask. If a subtask + * completes successfully then the scope is cancelled and the {@code join()} method + * returns its result. If all subtasks fail then the Joiner causes the {@code + * join()} method to throw {@code ExecutionException} with the exception from one + * of the failed subtasks as the {@linkplain Throwable#getCause() cause}. If no + * subtasks were forked then the {@code Joiner} causes the {@code join()} method + * to throw {@code ExecutionException} with {@link java.util.NoSuchElementException} + * as the cause. + * + *

    Timeout Handling: The {@code Joiner} cannot produce a result when + * the scope is cancelled by a timeout. If the scope was opened with a {@linkplain + * Configuration#withTimeout(Duration) timeout}, and the timeout expires before or + * while waiting for a subtask to complete successfully, then the {@code Joiner} + * causes the {@code join()} method to throw {@code ExecutionException} with a + * {@link CancelledByTimeoutException CancelledByTimeoutException} as the cause. + * + * @implSpec A Joiner returned by this method is equivalent to invoking {@link + * #anySuccessfulOrThrow(Function) anySuccessfulOrThrow(ExecutionException::new)}. * * @param the result type of subtasks * @since 26 */ - static Joiner anySuccessfulOrThrow() { - return new Joiners.AnySuccessful<>(); + static Joiner anySuccessfulOrThrow() { + return anySuccessfulOrThrow(ExecutionException::new); } /** - * {@return a new Joiner object that waits for subtasks to complete successfully} - * The {@code Joiner} {@linkplain StructuredTaskScope##Cancellation cancels} - * the scope and causes {@code join} to throw if any subtask fails. + * {@return a new Joiner that causes the {@link #join() join()} method to wait + * for all subtasks to complete successfully} + * The {@code Joiner} {@linkplain StructuredTaskScope##Cancellation cancels} the + * scope and causes the {@link #join() join()} method to throw if any subtask fails. * - *

    The joiner's {@link Joiner#result() result} method returns {@code null} - * if all subtasks complete successfully, or throws the exception from the first - * subtask to fail. If the scope was opened with a {@linkplain + *

    The {@link #join() join()} method of a {@link StructuredTaskScope} opened + * with this Joiner returns {@code null} when all subtasks complete successfully. + * If any subtask fails then the Joiner causes the {@code join()} method to throw + * the exception returned by the given exception supplying function when {@linkplain + * Function#apply(Object) applied} to the exception from the first subtask to fail. + * The function should return an exception with the exception from the failed + * subtask (the function argument) as the {@linkplain Throwable#getCause() cause}. + * If the function returns {@code null} then it causes the {@code join()} method + * to throw {@code NullPointerException}. + * + *

    Timeout Handling: The {@code Joiner} cannot produce a result when + * the scope is cancelled by a timeout. If the scope was opened with a {@linkplain * Configuration#withTimeout(Duration) timeout}, and the timeout expires before or - * while waiting for all subtasks to complete, then the {@code join} method throws - * {@code TimeoutException}. + * while waiting for all subtasks to complete successfully, then the {@code Joiner} + * causes the {@code join()} method to throw the exception returned by the + * exception supplying function when applied to a {@link CancelledByTimeoutException + * CancelledByTimeoutException}. * * @apiNote Joiners returned by this method are suited to cases where subtasks - * return results of different types. Joiners returned by {@link #allSuccessfulOrThrow()} - * are suited to cases where the subtasks return a result of the same type. + * return results of different types and where it is necessary to keep a reference + * to each {@link Subtask Subtask}. Joiners returned by {@link + * #allSuccessfulOrThrow(Function)} and {@link #allSuccessfulOrThrow()} are suited + * to cases where the subtasks return a result of the same type. * - * @param the result type of subtasks - */ - static Joiner awaitAllSuccessfulOrThrow() { - return new Joiners.AwaitSuccessful<>(); - } - - /** - * {@return a new Joiner object that waits for all subtasks to complete} - * The {@code Joiner} does not cancel the scope if a subtask fails. - * - *

    The joiner's {@link Joiner#result() result} method returns {@code null}. - * If the scope was opened with a {@linkplain Configuration#withTimeout(Duration) - * timeout}, and the timeout expires before or while waiting for all subtasks to - * complete, then the {@code join} method throws {@code TimeoutException}. - * - * @apiNote This Joiner is useful for cases where subtasks make use of - * side-effects rather than return results or fail with exceptions. - * The {@link #fork(Runnable) fork(Runnable)} method can be used to fork subtasks - * that do not return a result. - * - *

    This Joiner can also be used for fan-in scenarios where subtasks - * are forked to handle incoming connections and the number of subtasks is unbounded. - * In this example, the thread executing the {@code acceptLoop} method will only - * stop when interrupted or the listener socket is closed asynchronously. + *

    The following example opens a {@code StructuredTaskScope} with a Joiner + * created with {@code awaitAllSuccessfulOrThrow()}. It {@linkplain + * #fork(Callable) forks} two subtasks, then waits in {@link #join() join()} for + * both subtasks to complete successfully or either subtask to fail. If both + * subtasks complete successfully then it invokes {@link Subtask#get() Subtask.get()} + * on both subtasks to get their results. It throws the runtime exception {@link + * CompletionException} if any subtask fails, with the exception from a failed + * subtask as the cause. * {@snippet lang=java : - * void acceptLoop(ServerSocket listener) throws IOException, InterruptedException { - * try (var scope = StructuredTaskScope.open(Joiner.awaitAll())) { - * while (true) { - * Socket socket = listener.accept(); - * scope.fork(() -> handle(socket)); - * } - * } + * try (var scope = StructuredTaskScope.open( + * Joiner.awaitAllSuccessfulOrThrow(CompletionException::new))) { + * Subtask subtask1 = scope.fork(callable1); + * Subtask subtask2 = scope.fork(callable2); + * + * // throws CompletionException if either subtask fails + * scope.join(); + * + * // both subtasks completed successfully + * var result = new MyResult(subtask1.get(), subtask2.get()); * } * } - * + * @param esf the exception supplying function * @param the result type of subtasks + * @param the type of the exception thrown by the {@link #join() join()} method + * @since 27 */ - static Joiner awaitAll() { - // ensure that new Joiner object is returned - return new Joiner() { - @Override - public Void result() { - return null; - } - }; + static Joiner + awaitAllSuccessfulOrThrow(Function esf) { + return new Joiners.AwaitSuccessful<>(esf); } /** - * {@return a new Joiner object that yields a list of all subtasks when all - * subtasks complete or a predicate returns {@code true} to cancel the scope} + * {@return a new Joiner that causes the {@link #join() join()} method to wait + * for all subtasks to complete successfully} + * The {@code Joiner} {@linkplain StructuredTaskScope##Cancellation cancels} the + * scope and causes the {@link #join() join()} method to throw {@link + * ExecutionException} if any subtask fails. * - *

    The joiner's {@link #onComplete(Subtask)} method invokes the predicate's - * {@link Predicate#test(Object) test} method with the subtask that completed - * successfully or failed with an exception. If the {@code test} method - * returns {@code true} then {@linkplain StructuredTaskScope##Cancellation - * the scope is cancelled}. The {@code test} method must be thread safe as it - * may be invoked concurrently from several threads. If the {@code test} method - * completes with an exception or error, then the thread that executed the subtask + *

    The {@link #join() join()} method of a {@link StructuredTaskScope} opened + * with this Joiner returns {@code null} when all subtasks complete successfully. + * If any subtask fails then the Joiner causes the {@code join()} method to throw + * {@code ExecutionException} with the exception from the first subtask to fail + * as the {@linkplain Throwable#getCause() cause}. + * + *

    Timeout Handling: The {@code Joiner} cannot produce a result when + * the scope is cancelled by a timeout. If the scope was opened with a {@linkplain + * Configuration#withTimeout(Duration) timeout}, and the timeout expires before or + * while waiting for all subtasks to complete successfully, then the {@code Joiner} + * causes the {@code join()} method to throw {@code ExecutionException} with a + * {@link CancelledByTimeoutException CancelledByTimeoutException} as the cause. + * + * @implSpec A Joiner returned by this method is equivalent to invoking {@link + * #awaitAllSuccessfulOrThrow(Function) awaitAllSuccessfulOrThrow(ExecutionException::new)}. + * + * @param the result type of subtasks + * @see #open() + * @see #open(UnaryOperator) + */ + static Joiner awaitAllSuccessfulOrThrow() { + return awaitAllSuccessfulOrThrow(ExecutionException::new); + } + + /** + * {@return a new Joiner that produces a list of all subtasks when all subtasks + * complete or {@linkplain Predicate#test(Object) evaluating} a predicate on a + * completed subtask causes the scope to be {@linkplain + * StructuredTaskScope##Cancellation cancelled}} + * The {@code Joiner} does not cause the {@link #join() join()} method to throw + * if subtasks fail or a configured {@linkplain Configuration#withTimeout(Duration) + * timeout} expires. This method can be used to create a {@code Joiner} that + * implements a cancellation policy. + * + *

    The {@link #join() join()} method of a {@link StructuredTaskScope} opened + * with this Joiner returns a list of all subtasks, in the order that they were + * {@linkplain #fork(Callable) forked}, when all subtasks complete or the scope is + * cancelled. The returned list may contain subtasks that completed (in the {@link + * Subtask.State#SUCCESS SUCCESS} or {@link Subtask.State#FAILED FAILED} state), + * or subtasks in the {@link Subtask.State#UNAVAILABLE UNAVAILABLE} state if + * they were forked or completed after the scope was cancelled. The scope is + * cancelled if the given predicate {@linkplain Predicate#test(Object) evaluates} + * to {@code true}, or a configured timeout expires before or while waiting in the + * {@code join()} method. + * + *

    The given {@code Predicate}'s {@link Predicate#test(Object) test(Object)} + * method is invoked on a completed subtask by the thread that executed the subtask. + * The method is invoked after the subtask completes (successfully or with an + * exception) before the thread terminates. The scope is cancelled if the {@code + * test} method returns {@code true}. The {@code test} method must be thread safe. + * It may be invoked concurrently from several threads as multiple subtasks can + * complete at the same time. If the method throws an exception or error, the thread * invokes the {@linkplain Thread.UncaughtExceptionHandler uncaught exception handler} * with the exception or error before the thread terminates. * - *

    The joiner's {@link #result()} method returns the list of all subtasks, - * in fork order. The list may contain subtasks that have completed - * (in {@link Subtask.State#SUCCESS SUCCESS} or {@link Subtask.State#FAILED FAILED} - * state) or subtasks in the {@link Subtask.State#UNAVAILABLE UNAVAILABLE} state - * if the scope was cancelled before all subtasks were forked or completed. + *

    Timeout Handling: If used with a scope that has a {@linkplain + * Configuration#withTimeout(Duration) timeout} set, and the timeout expires before + * all subtasks complete then the {@code join()} method returns the list of + * all subtasks. It does not throw an exception. Subtasks that did not complete + * before the timeout expires will be in the {@code UNAVAILABLE} state. * - *

    The joiner's {@link #onTimeout()} method does nothing. If configured with - * a {@linkplain Configuration#withTimeout(Duration) timeout}, and the timeout - * expires before or while waiting in {@link StructuredTaskScope#join() join}, - * then the {@link #result()} method returns the list of all subtasks. - * Subtasks that did not complete before the timeout expired will be in the - * {@link Subtask.State#UNAVAILABLE UNAVAILABLE} state. - * - *

    The following example uses this method to create a {@code Joiner} that + * @apiNote The following example uses {@code allUntil} to create a Joiner that * {@linkplain StructuredTaskScope##Cancellation cancels} the scope when two or * more subtasks fail. * {@snippet lang=java : - * class CancelAfterTwoFailures implements Predicate> { + * class CancelAfterTwoFailures implements Predicate> { * private final AtomicInteger failedCount = new AtomicInteger(); * @Override - * public boolean test(Subtask subtask) { + * public boolean test(Subtask subtask) { * return subtask.state() == Subtask.State.FAILED * && failedCount.incrementAndGet() >= 2; * } * } * - * var joiner = Joiner.allUntil(new CancelAfterTwoFailures()); + * var joiner = Joiner.allUntil(new CancelAfterTwoFailures()); * } * - *

    The following example uses {@code allUntil} to wait for all subtasks to - * complete without any cancellation. This is similar to {@link #awaitAll()} - * except that it yields a list of the completed subtasks. + *

    The following example uses {@code allUntil} to create a Joiner that + * cancels the scope when any subtask completes successfully. The subtasks are + * grouped according to their {@linkplain Subtask.State state} to produce a map + * with up to three key-value mappings. The map key is the subtask state, the + * value is the list of subtasks in that state. * {@snippet lang=java : - * List> invokeAll(Collection> tasks) throws InterruptedException { - * try (var scope = StructuredTaskScope.open(Joiner.allUntil(_ -> false))) { + * Predicate> isSuccessful = s -> s.state() == Subtask.State.SUCCESS; + * + * try (var scope = StructuredTaskScope.open(Joiner.allUntil(isSuccessful))) { + * tasks.forEach(scope::fork); + * + * Map>> subtasksByState = scope.join() + * .stream() + * // @link substring="Collectors.groupingBy" target="java.util.stream.Collectors#groupingBy" : + * .collect(Collectors.groupingBy(Subtask::state)); + * } + * } + * + *

    The following example is a method that uses {@code allUntil} to create a + * Joiner that does not cancel the scope. The method waits for all subtasks to + * complete or a timeout to expire. It returns a list of all subtasks, in the + * same order as the collection of callables, even if the timeout expires before + * or while waiting in {@code join()}. + * {@snippet lang=java : + * List> invokeAll(Collection> tasks, Duration timeout) throws InterruptedException { + * // @link substring="withTimeout" target="Configuration#withTimeout(Duration)" : + * try (var scope = StructuredTaskScope.open(Joiner.allUntil(_ -> false), cf -> cf.withTimeout(timeout))) { * tasks.forEach(scope::fork); * return scope.join(); * } * } * } * - *

    The following example uses {@code allUntil} to get the results of all - * subtasks that complete successfully within a timeout period. - * {@snippet lang=java : - * List invokeAll(Collection> tasks, Duration timeout) throws InterruptedException { - * try (var scope = StructuredTaskScope.open(Joiner.allUntil(_ -> false), cf -> cf.withTimeout(timeout))) { - * tasks.forEach(scope::fork); - * return scope.join() - * .stream() - * .filter(s -> s.state() == Subtask.State.SUCCESS) - * .map(Subtask::get) - * .toList(); - * } - * } - * } - * * @param isDone the predicate to evaluate completed subtasks * @param the result type of subtasks */ - static Joiner>> allUntil(Predicate> isDone) { + static Joiner>, RuntimeException> + allUntil(Predicate> isDone) { return new Joiners.AllSubtasks<>(isDone); } } @@ -803,8 +1034,9 @@ public sealed interface StructuredTaskScope * ThreadFactory} to create threads, an optional name for the scope, and an optional * timeout. The name is intended for monitoring and management purposes. * - *

    Creating a {@code StructuredTaskScope} with its 2-arg {@link #open(Joiner, UnaryOperator) - * open} method allows a different configuration to be used. The operator specified + *

    Creating a {@code StructuredTaskScope} with the {@link #open(UnaryOperator) + * open(UnaryOperator)} or {@link #open(Joiner, UnaryOperator) open(Joiner, UnaryOperator)} + * method allows a different configuration to be used. The operator specified * to the {@code open} method is applied to the default configuration and returns the * configuration for the {@code StructuredTaskScope} under construction. The operator * can use the {@code with-} prefixed methods defined here to specify the components @@ -824,9 +1056,9 @@ public sealed interface StructuredTaskScope * @param threadFactory the thread factory * * @apiNote The thread factory will typically create {@linkplain Thread##virtual-threads - * virtual threads}, maybe with names for monitoring purposes, an {@linkplain - * Thread.UncaughtExceptionHandler uncaught exception handler}, or other properties - * configured. + * virtual threads}, maybe with {@linkplain Thread#getName() thread names} for + * monitoring purposes, an {@linkplain Thread.UncaughtExceptionHandler uncaught + * exception handler}, or other properties configured. * * @see #fork(Callable) */ @@ -850,182 +1082,253 @@ public sealed interface StructuredTaskScope * compute the timeout for this method. * * @see #join() - * @see Joiner#onTimeout() + * @see CancelledByTimeoutException */ Configuration withTimeout(Duration timeout); } /** - * Exception thrown by {@link #join()} when the outcome is an exception rather than a - * result. + * The exception {@linkplain Throwable#getCause() cause} when {@link #join() join()} + * throws because the scope was {@linkplain StructuredTaskScope##Cancellation cancelled} + * by a timeout. * - * @since 25 - */ - @PreviewFeature(feature = PreviewFeature.Feature.STRUCTURED_CONCURRENCY) - final class FailedException extends RuntimeException { - @java.io.Serial - static final long serialVersionUID = -1533055100078459923L; - - /** - * Constructs a {@code FailedException} with the specified cause. - * - * @param cause the cause, can be {@code null} - */ - FailedException(Throwable cause) { - super(cause); - } - } - - /** - * Exception thrown by {@link #join()} if the scope was opened with a timeout, - * the timeout expired before or while waiting in {@code join}, and the {@link - * Joiner#onTimeout() Joiner.onTimeout} method throws this exception. - * - * @since 25 + * @since 27 * @see Configuration#withTimeout(Duration) - * @see Joiner#onTimeout() */ @PreviewFeature(feature = PreviewFeature.Feature.STRUCTURED_CONCURRENCY) - final class TimeoutException extends RuntimeException { + final class CancelledByTimeoutException extends RuntimeException { @java.io.Serial static final long serialVersionUID = 705788143955048766L; /** - * Constructs a {@code TimeoutException} with no detail message. + * Constructs a {@code CancelledByTimeoutException} with no detail message. */ - TimeoutException() { } + public CancelledByTimeoutException() { } + } /** - * Opens a new {@code StructuredTaskScope} to use the given {@code Joiner} object and - * with configuration that is the result of applying the given operator to the - * {@linkplain ##DefaultConfiguration default configuration}. + * Opens a new {@code StructuredTaskScope} that uses the given {@code Joiner} object + * and the {@code Configuration} that is the result of applying the given operator to + * the {@linkplain ##DefaultConfiguration default configuration}. * - *

    The {@code configOperator} is called with the default configuration and returns - * the configuration for the new scope. The operator may, for example, set the - * {@linkplain Configuration#withThreadFactory(ThreadFactory) ThreadFactory} or set a - * {@linkplain Configuration#withTimeout(Duration) timeout}. If the operator completes - * with an exception or error then it is propagated by this method. If the operator - * returns {@code null} then {@code NullPointerException} is thrown. + *

    The {@code Joiner} specified to this method implements the desired policy and + * produces the outcome (result or exception) for the {@link #join()} method when all + * subtasks forked in the scope complete execution or the scope is {@linkplain + * ##Cancellation cancelled}. * - *

    If a {@code ThreadFactory} is set then its {@link ThreadFactory#newThread(Runnable) - * newThread} method will be called to create threads when {@linkplain #fork(Callable) - * forking} subtasks in this scope. If a {@code ThreadFactory} is not set then - * forking subtasks will create an unnamed virtual thread for each subtask. - * - *

    If a {@linkplain Configuration#withTimeout(Duration) timeout} is set then it - * starts when the scope is opened. If the timeout expires before or while waiting in - * {@link #join()} then the scope is {@linkplain ##Cancellation cancelled} - * and the {@code Joiner}'s {@link Joiner#onTimeout() onTimeout()} method is invoked - * to optionally throw {@link TimeoutException TimeoutException}. + *

    This method invokes the operator's {@link UnaryOperator#apply(Object) apply} + * method with the default configuration to produce the configuration for the new + * scope: + *

      + *
    • If the {@code apply} method returns a {@code Configuration} with a {@link + * ThreadFactory}, set using {@link Configuration#withThreadFactory(ThreadFactory) + * withThreadFactory(ThreadFactory)}, its {@link ThreadFactory#newThread(Runnable) + * newThread(Runnable)} method will be invoked to create threads when {@linkplain + * #fork(Callable) forking} subtasks in the scope. If a {@code ThreadFactory} is not set + * then forking subtasks will create an unnamed virtual thread for each subtask.
    • + *
    • If the {@code apply} method returns a {@code Configuration} with a timeout, set + * using {@link Configuration#withTimeout(Duration) withTimeout(Duration)}, the timeout + * will start when the scope is opened. If the timeout expires before or while waiting in + * {@link #join()} then the scope will be {@linkplain ##Cancellation cancelled}. It is + * {@link Joiner Joiner} specific as to whether the {@code join()} method returns a + * result or throws an exception when a timeout occurs. If the outcome is an exception + * then it will be thrown with a {@link CancelledByTimeoutException + * CancelledByTimeoutException} as the {@linkplain Throwable#getCause() cause}.
    • + *
    • If the {@code apply} method returns a {@code Configuration} with a name, set + * using {@linkplain Configuration#withName(String) withName(String)}, the name will + * be used for monitoring and management purposes.
    • + *
    • If the {@code apply} method throws an exception or error then it is propagated + * by this method.
    • + *
    • If the {@code apply} method returns {@code null} then {@code NullPointerException} + * is thrown.
    • + *
    * *

    The new scope is owned by the current thread. Only code executing in this * thread can {@linkplain #fork(Callable) fork}, {@linkplain #join() join}, or * {@linkplain #close close} the scope. * *

    Construction captures the current thread's {@linkplain ScopedValue scoped - * value} bindings for inheritance by threads started in the scope. + * value} bindings for inheritance by threads forked in the scope. * - * @param joiner the joiner + * @param joiner the Joiner * @param configOperator the operator to produce the configuration * @return a new scope - * @param the result type of subtasks executed in the scope - * @param the result type of the scope + * @param the result type of subtasks {@linkplain #fork(Callable) forked} in the scope + * @param the type of the result returned by the {@link #join() join()} method + * @param the type of the exception thrown by the {@link #join() join()} method * @since 26 */ - static StructuredTaskScope open(Joiner joiner, - UnaryOperator configOperator) { + static StructuredTaskScope + open(Joiner joiner, UnaryOperator configOperator) { return StructuredTaskScopeImpl.open(joiner, configOperator); } /** - * Opens a new {@code StructuredTaskScope}to use the given {@code Joiner} object. The - * scope is created with the {@linkplain ##DefaultConfiguration default configuration}. - * The default configuration has a {@code ThreadFactory} that creates unnamed - * {@linkplain Thread##irtual-threads virtual threads}, does not name the scope, and - * has no timeout. - * - * @implSpec - * This factory method is equivalent to invoking the 2-arg open method with the given - * joiner and the {@linkplain UnaryOperator#identity() identity operator}. - * - * @param joiner the joiner - * @return a new scope - * @param the result type of subtasks executed in the scope - * @param the result type of the scope - * @since 25 - */ - static StructuredTaskScope open(Joiner joiner) { - return open(joiner, UnaryOperator.identity()); - } - - /** - * Opens a new {@code StructuredTaskScope} that can be used to fork subtasks that return - * results of any type. The scope's {@link #join()} method waits for all subtasks to - * succeed or any subtask to fail. - * - *

    The {@code join} method returns {@code null} if all subtasks complete successfully. - * It throws {@link FailedException} if any subtask fails, with the exception from - * the first subtask to fail as the cause. + * Opens a new {@code StructuredTaskScope} that uses the given {@code Joiner} object. + * The {@code Joiner} implements the desired policy and produces the outcome (result + * or exception) for the {@link #join()} method when all subtasks forked in the scope + * complete execution or the scope is {@linkplain ##Cancellation cancelled}. * *

    The scope is created with the {@linkplain ##DefaultConfiguration default * configuration}. The default configuration has a {@code ThreadFactory} that creates * unnamed {@linkplain Thread##virtual-threads virtual threads}, does not name the * scope, and has no timeout. * - * @implSpec - * This factory method is equivalent to invoking the 2-arg open method with a joiner - * created with {@link Joiner#awaitAllSuccessfulOrThrow() awaitAllSuccessfulOrThrow()} + *

    The new scope is owned by the current thread. Only code executing in this + * thread can {@linkplain #fork(Callable) fork}, {@linkplain #join() join}, or + * {@linkplain #close close} the scope. + * + *

    Construction captures the current thread's {@linkplain ScopedValue scoped + * value} bindings for inheritance by threads forked in the scope. + * + * @implSpec This factory method is equivalent to invoking the + * {@linkplain #open(Joiner, UnaryOperator) 2-arg open} method with the given Joiner * and the {@linkplain UnaryOperator#identity() identity operator}. * + * @param joiner the Joiner + * @return a new scope + * @param the result type of subtasks {@linkplain #fork(Callable) forked} in the scope + * @param the type of the result returned by the {@link #join() join()} method + * @param the type of the exception thrown by the {@link #join() join()} method + * @since 25 + */ + static StructuredTaskScope + open(Joiner joiner) { + return open(joiner, UnaryOperator.identity()); + } + + /** + * Opens a new {@code StructuredTaskScope} that uses the {@code Configuration} that is + * the result of applying the given operator to the {@linkplain ##DefaultConfiguration + * default configuration}. This method invokes the operator's {@link + * UnaryOperator#apply(Object) apply} method to produce the configuration for the new + * scope, as specified by the {@linkplain #open(Joiner, UnaryOperator) 2-arg open} + * method. + * + *

    The {@link #join()} method of the new scope waits for all subtasks to succeed + * or any subtask to fail. The {@code join() method} returns {@code null} if all + * subtasks complete successfully. It throws {@link ExecutionException} if any subtask + * fails, with the exception from the first subtask to fail as the {@linkplain + * Throwable#getCause() cause}. If a {@linkplain Configuration#withTimeout(Duration) + * timeout} is configured, and the timeout expires before or while waiting in the + * {@code join()} method, it throws {@code ExecutionException} with a {@link + * CancelledByTimeoutException CancelledByTimeoutException} as the cause. + * + *

    The new scope is owned by the current thread. Only code executing in this + * thread can {@linkplain #fork(Callable) fork}, {@linkplain #join() join}, or + * {@linkplain #close close} the scope. + * + *

    Construction captures the current thread's {@linkplain ScopedValue scoped + * value} bindings for inheritance by threads forked in the scope. + * + * @implSpec This factory method is equivalent to invoking the {@linkplain + * #open(Joiner, UnaryOperator) 2-arg open} method with a Joiner created with {@link + * Joiner#awaitAllSuccessfulOrThrow() awaitAllSuccessfulOrThrow()} and the given + * configuration operator. + * + * @param configOperator the operator to produce the configuration + * @return a new scope + * @param the result type of subtasks forked in the scope + * @since 27 + */ + static StructuredTaskScope + open(UnaryOperator configOperator) { + return open(Joiner.awaitAllSuccessfulOrThrow(), configOperator); + } + + /** + * Opens a new {@code StructuredTaskScope} where {@link #join()} waits for all subtasks + * to succeed or any subtask to fail. The {@code join()} method returns {@code null} + * if all subtasks complete successfully. It throws {@link ExecutionException} if any + * subtask fails, with the exception from the first subtask to fail as the {@linkplain + * Throwable#getCause() cause}. + * + *

    The scope is created with the {@linkplain ##DefaultConfiguration default + * configuration}. The default configuration has a {@code ThreadFactory} that creates + * unnamed {@linkplain Thread##virtual-threads virtual threads}, does not name the + * scope, and has no timeout. + * + *

    The new scope is owned by the current thread. Only code executing in this + * thread can {@linkplain #fork(Callable) fork}, {@linkplain #join() join}, or + * {@linkplain #close close} the scope. + * + *

    Construction captures the current thread's {@linkplain ScopedValue scoped + * value} bindings for inheritance by threads forked in the scope. + * + * @implSpec This factory method is equivalent to invoking the + * {@linkplain #open(Joiner, UnaryOperator) 2-arg open} method with a Joiner created + * with {@link Joiner#awaitAllSuccessfulOrThrow() awaitAllSuccessfulOrThrow()} and + * the {@linkplain UnaryOperator#identity() identity operator}. + * * @param the result type of subtasks * @return a new scope * @since 25 */ - static StructuredTaskScope open() { + static StructuredTaskScope open() { return open(Joiner.awaitAllSuccessfulOrThrow(), UnaryOperator.identity()); } /** - * Fork a subtask by starting a new thread in this scope to execute a value-returning + * Forks a subtask by starting a new thread in this scope to execute a value-returning * method. The new thread executes the subtask concurrently with the current thread. * The parameter to this method is a {@link Callable}, the new thread executes its - * {@link Callable#call() call()} method. + * {@link Callable#call() call()} method. The thread inherits the current thread's + * {@linkplain ScopedValue scoped value bindings} that must match the bindings + * captured when the scope was opened. * - *

    This method first creates a {@link Subtask Subtask} object to represent the - * forked subtask. It invokes the joiner's {@link Joiner#onFork(Subtask) onFork} - * method with the subtask in the {@link Subtask.State#UNAVAILABLE UNAVAILABLE} state. - * If the {@code onFork} completes with an exception or error then it is propagated by - * the {@code fork} method without creating a thread. If the scope is already - * {@linkplain ##Cancellation cancelled}, or {@code onFork} returns {@code true} to - * cancel the scope, then this method returns the {@code Subtask}, in the - * {@link Subtask.State#UNAVAILABLE UNAVAILABLE} state, without creating a thread to - * execute the subtask. + *

    If the scope was opened with a function to produce the {@link Configuration + * Configuration} for the scope, and a {@link ThreadFactory} is {@linkplain + * Configuration#withThreadFactory(ThreadFactory) set}, then its {@link + * ThreadFactory#newThread(Runnable) newThread(Runnable)} method is invoked to create + * the thread that will execute the subtask. {@link RejectedExecutionException} is + * thrown if the {@code newThread(Runnable)} method returns {@code null}. + * If a {@code ThreadFactory} is not set, the {@code fork(Callable)} method creates an + * unnamed {@linkplain Thread##virtual-threads virtual thread} to execute the subtask. * - *

    If the scope is not cancelled, and the {@code onFork} method returns {@code false}, - * then a thread is created with the {@link ThreadFactory} configured when the scope - * was opened, and the thread is started. Forking a subtask inherits the current thread's - * {@linkplain ScopedValue scoped value} bindings. The bindings must match the bindings - * captured when the scope was opened. If the subtask completes (successfully or with - * an exception) before the scope is cancelled, then the thread invokes the joiner's - * {@link Joiner#onComplete(Subtask) onComplete} method with the subtask in the - * {@link Subtask.State#SUCCESS SUCCESS} or {@link Subtask.State#FAILED FAILED} state. - * If the {@code onComplete} method completes with an exception or error, then the - * {@linkplain Thread.UncaughtExceptionHandler uncaught exception handler} is invoked - * with the exception or error before the thread terminates. + *

    This method returns a {@link Subtask Subtask} object as a handle to the + * forked subtask. If the scope is {@linkplain ##Cancellation cancelled}, the + * {@code Subtask} is returned in the {@link Subtask.State#UNAVAILABLE UNAVAILABLE} + * state without creating a thread. In some usages, {@code Subtask} object will be used + * by the "main" task (the scope owner) to get the subtask's outcome (result or + * exception) after it has invoked {@link #join() join()} to wait for all subtasks to + * complete. In other usages, the scope is created with a {@link Joiner Joiner} that + * produces the outcome for the main task to process after joining. A {@code Joiner} + * that produces a result reduces the need for bookkeeping and the need for the + * main task to retain references to {@code Subtask} objects for correlation purposes. * - *

    This method returns the {@link Subtask Subtask} object. In some usages, this - * object may be used to get its result. In other cases it may be used for correlation - * or be discarded. To ensure correct usage, the {@link Subtask#get() Subtask.get()} - * method may only be called by the scope owner to get the result after it has - * waited for subtasks to complete with the {@link #join() join} method and the subtask - * completed successfully. Similarly, the {@link Subtask#exception() Subtask.exception()} - * method may only be called by the scope owner after it has joined and the subtask - * failed. If the scope was cancelled before the subtask was forked, or before it - * completes, then neither method can be used to obtain the outcome. + *

    To ensure correct usage, the {@link Subtask#get() Subtask.get()} method may + * only be called by the scope owner to get the result of a successful subtask after + * it has waited for subtasks to complete with the {@link #join() join()} method. + * Similarly, the {@link Subtask#exception() Subtask.exception()} method may only be + * called by the scope owner to get the exception (or error) of a failed subtask after + * it has joined. * *

    This method may only be invoked by the scope owner. * + *

    Joiner Implementers: + * + *

    If the scope was opened with a {@link Joiner Joiner}, its {@link + * Joiner#onFork(Subtask) onFork(Subtask)} method is invoked with the newly created + * {@code Subtask} object before the thread is created. It is invoked with the subtask + * in the {@code UNAVAILABLE} state. If the method throws an exception or error then + * it is propagated by the {@code fork(Callable)} method without creating a thread to + * execute the subtask. If the scope is not already cancelled, and the {@code onFork} + * method return {@code false}, then a thread is created and {@linkplain Thread#start() + * scheduled} to start execution of the subtask. If the scope is cancelled, or the + * {@code onFork} method returns {@code true} to cancel the scope, {@code fork(Callable)} + * returns the subtask in the {@code UNAVAILABLE} state. + * + *

    If the subtask executes and completes (successfully or with an exception) before + * the scope is cancelled, then the thread invokes the Joiner's {@link + * Joiner#onComplete(Subtask) onComplete(Subtask)} method with the subtask in the + * {@link Subtask.State#SUCCESS SUCCESS} or {@link Subtask.State#FAILED FAILED} state. + * If the {@code onComplete(Subtask}) method returns {@code true} then the scope is + * cancelled, if not already cancelled. If the {@code onComplete(Subtask)} method + * completes with an exception or error, then the thread executes the {@linkplain + * Thread.UncaughtExceptionHandler uncaught exception handler} before the thread + * terminates. + * * @param task the value-returning task for the thread to execute * @param the result type * @return the subtask @@ -1035,17 +1338,18 @@ public sealed interface StructuredTaskScope * @throws StructureViolationException if the current scoped value bindings are not * the same as when the scope was created * @throws RejectedExecutionException if the thread factory rejected creating a - * thread to run the subtask + * thread to execute the subtask + * @see Thread##inheritance Inheritance When Creating Threads */ Subtask fork(Callable task); /** - * Fork a subtask by starting a new thread in this scope to execute a method that + * Forks a subtask by starting a new thread in this scope to execute a method that * does not return a result. * *

    This method works exactly the same as {@link #fork(Callable)} except that the * parameter to this method is a {@link Runnable}, the new thread executes its - * {@link Runnable#run() run} method, and {@link Subtask#get() Subtask.get()} returns + * {@link Runnable#run() run()} method, and {@link Subtask#get() Subtask.get()} returns * {@code null} if the subtask completes successfully. * * @param task the task for the thread to execute @@ -1057,48 +1361,59 @@ public sealed interface StructuredTaskScope * @throws StructureViolationException if the current scoped value bindings are not * the same as when the scope was created * @throws RejectedExecutionException if the thread factory rejected creating a - * thread to run the subtask + * thread to execute the subtask * @since 25 */ Subtask fork(Runnable task); /** - * Returns the result, or throws, after waiting for all subtasks to complete or - * the scope to be {@linkplain ##Cancellation cancelled}. + * Returns a result, or throws, after waiting for all subtasks to complete or the + * scope to be {@linkplain ##Cancellation cancelled}. * - *

    This method waits for all subtasks started in this scope to complete or the - * scope to be cancelled. Once finished waiting, the {@code Joiner}'s {@link - * Joiner#result() result()} method is invoked to get the result or throw an exception. - * If the {@code result()} method throws then {@code join()} throws - * {@code FailedException} with the exception from the {@code Joiner} as the cause. + *

    If the scope was opened with the {@link #open()} or {@link #open(UnaryOperator)} + * method, then {@code join()} waits for all subtasks to succeed or any subtask to fail. + * It returns {@code null} if all subtasks complete successfully. It throws {@link + * ExecutionException} if any subtask fails, with exception from the first subtask to + * fail as the {@linkplain Throwable#getCause() cause}. If a {@linkplain + * Configuration#withTimeout(Duration) timeout} is configured and the timeout expires + * before or while waiting, it throws {@code ExecutionException} with a {@link + * CancelledByTimeoutException CancelledByTimeoutException} as the cause. * - *

    If a {@linkplain Configuration#withTimeout(Duration) timeout} is configured, - * and the timeout expires before or while waiting, then the scope is cancelled and - * the {@code Joiner}'s {@link Joiner#onTimeout() onTimeout()} method is invoked - * before calling the {@code Joiner}'s {@code result()} method. If the {@code onTimeout()} - * method throws {@link TimeoutException TimeoutException} (or throws any exception - * or error), then it is propagated by this method. If the {@code onTimeout()} method - * does not throw then the {@code Joiner}'s {@code result()} method is invoked to - * get the result or throw. + *

    If the scope was opened with a {@link Joiner Joiner}, it is invoked after + * waiting or cancellation to produce the outcome (result or exception). This includes + * the timeout case where a timeout is configured and it expires before or + * while waiting in the {@code join()} method. * *

    This method may only be invoked by the scope owner. It may only be invoked once * to get the result, exception or timeout outcome, unless the previous invocation * resulted in an {@code InterruptedException} being thrown. * + *

    Joiner Implementers: + * + *

    When all subtasks complete, or the scope cancelled, this method invokes the + * {@code Joiner}'s {@link Joiner#result() result()} or {@link Joiner#timeout() timeout()} + * method to produce the outcome (result or exception) for the {@code join()} method. + * The {@code result()} method is invoked for the "no timeout" case. The {@code timeout()} + * method is invoked for the timeout case. If the outcome for the timeout case is an + * exception then it is thrown with a {@code CancelledByTimeoutException} as the cause. + * + * @apiNote When the outcome is an exception, the {@linkplain Throwable#getStackTrace() + * stack trace} will be the stack trace of the call to the {@code join()} method. + * Its {@linkplain Throwable#getCause() cause} will typically be the exception + * thrown by a failed subtask with the stack trace of the failed subtask. + * * @return the result * @throws WrongThreadException if the current thread is not the scope owner * @throws IllegalStateException if already joined or this scope is closed - * @throws FailedException if the outcome is an exception, thrown with the - * exception from {@link Joiner#result() Joiner.result()} as the cause - * @throws TimeoutException if a timeout is set, the timeout expires before or while - * waiting, and {@link Joiner#onTimeout() Joiner.onTimeout()} throws this exception - * @throws InterruptedException if the current thread is interrupted before or - * while waiting. The current thread's interrupted status is cleared when this - * exception is thrown. + * @throws R_X when the outcome is an exception + * @throws InterruptedException if the current thread is {@linkplain Thread#interrupt() + * interrupted} while waiting or this method is invoked with the current thread's + * {@linkplain Thread#isInterrupted() interrupted status} set. The current thread's + * interrupted status is cleared when this exception is thrown. * @since 25 * @see Thread##thread-interruption Thread Interruption */ - R join() throws InterruptedException; + R join() throws R_X, InterruptedException; /** * {@return {@code true} if this scope is {@linkplain ##Cancellation cancelled} or in @@ -1110,9 +1425,10 @@ public sealed interface StructuredTaskScope * method may return {@code true} before all threads have been interrupted or before * all threads have finished. * - * @apiNote A task with a lengthy "forking phase" (the code that executes before - * it invokes {@link #join() join}) may use this method to avoid doing work in cases - * where scope is cancelled by the completion of a previously forked subtask or timeout. + * @apiNote A task with a lengthy "forking phase" (the code in the {@code try} block + * that forks subtasks before the {@link #join()} method is invoked) may use this + * method to avoid doing work in cases where the scope is cancelled by the completion + * of a previously forked subtask or a timeout. * * @since 25 */ @@ -1121,29 +1437,27 @@ public sealed interface StructuredTaskScope /** * Closes this scope. * - *

    This method first {@linkplain ##Cancellation cancels} the scope, if not - * already cancelled. This interrupts the threads executing unfinished subtasks. This - * method then waits for all threads to finish. If interrupted while waiting then it - * will continue to wait until the threads finish, before completing with the - * {@linkplain Thread#isInterrupted() interrupted status} set. + *

    This method first {@linkplain ##Cancellation cancels} the scope, if not already + * cancelled. This {@linkplain Thread#interrupt() interrupts} the threads executing + * unfinished subtasks. This method then waits for all threads to finish. If interrupted + * while waiting then it will continue to wait until the threads finish, before + * completing with the {@linkplain Thread#isInterrupted() interrupted status} set. * *

    This method may only be invoked by the scope owner. If the scope * is already closed then the scope owner invoking this method has no effect. * *

    A {@code StructuredTaskScope} is intended to be used in a structured - * manner. If this method is called to close a scope before nested task - * scopes are closed then it closes the underlying construct of each nested scope - * (in the reverse order that they were created in), closes this scope, and then - * throws {@link StructureViolationException}. - * Similarly, if this method is called to close a scope while executing with - * {@linkplain ScopedValue scoped value} bindings, and the scope was created - * before the scoped values were bound, then {@code StructureViolationException} is - * thrown after closing the scope. - * If a thread terminates without first closing scopes that it owns then - * termination will cause the underlying construct of each of its open tasks scopes to - * be closed. Closing is performed in the reverse order that the scopes were - * created in. Thread termination may therefore be delayed when the scope owner - * has to wait for threads forked in these scopes to finish. + * manner. If this method is called to close a scope before nested scopes are + * closed then it closes the underlying construct of each nested scope (in the reverse + * order that they were created in), closes this scope, and then throws {@link + * StructureViolationException}. Similarly, if this method is called to close a scope + * while executing with {@linkplain ScopedValue scoped value} bindings, and the scope + * was created before the scoped values were bound, then {@code StructureViolationException} + * is thrown after closing the scope. If a thread terminates without first closing + * scopes that it owns then termination will cause the underlying construct of each + * of its open scopes to be closed. Closing is performed in the reverse order that the + * scopes were created in. Thread termination may therefore be delayed when the scope + * owner has to wait for threads forked in these scopes to finish. * * @throws IllegalStateException thrown after closing the scope if the scope * owner did not attempt to join after forking diff --git a/src/java.base/share/classes/java/util/concurrent/StructuredTaskScopeImpl.java b/src/java.base/share/classes/java/util/concurrent/StructuredTaskScopeImpl.java index 1051f9244f3..fbd58fc2a21 100644 --- a/src/java.base/share/classes/java/util/concurrent/StructuredTaskScopeImpl.java +++ b/src/java.base/share/classes/java/util/concurrent/StructuredTaskScopeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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,11 +36,12 @@ import jdk.internal.vm.annotation.Stable; /** * StructuredTaskScope implementation. */ -final class StructuredTaskScopeImpl implements StructuredTaskScope { +final class StructuredTaskScopeImpl + implements StructuredTaskScope { private static final VarHandle CANCELLED = MhUtil.findVarHandle(MethodHandles.lookup(), "cancelled", boolean.class); - private final Joiner joiner; + private final Joiner joiner; private final ThreadFactory threadFactory; private final ThreadFlock flock; @@ -61,7 +62,7 @@ final class StructuredTaskScopeImpl implements StructuredTaskScope { private volatile boolean timeoutExpired; @SuppressWarnings("this-escape") - private StructuredTaskScopeImpl(Joiner joiner, + private StructuredTaskScopeImpl(Joiner joiner, ThreadFactory threadFactory, String name) { this.joiner = joiner; @@ -74,12 +75,12 @@ final class StructuredTaskScopeImpl implements StructuredTaskScope { * and with configuration that is the result of applying the given function to the * default configuration. */ - static StructuredTaskScope open(Joiner joiner, - UnaryOperator configOperator) { + static StructuredTaskScope + open(Joiner joiner, UnaryOperator configOperator) { Objects.requireNonNull(joiner); var config = (ConfigImpl) configOperator.apply(ConfigImpl.defaultConfig()); - var scope = new StructuredTaskScopeImpl(joiner, config.threadFactory(), config.name()); + var scope = new StructuredTaskScopeImpl(joiner, config.threadFactory(), config.name()); // schedule timeout Duration timeout = config.timeout(); @@ -173,7 +174,7 @@ final class StructuredTaskScopeImpl implements StructuredTaskScope { private void onComplete(SubtaskImpl subtask) { assert subtask.state() != Subtask.State.UNAVAILABLE; @SuppressWarnings("unchecked") - var j = (Joiner) joiner; + var j = (Joiner) joiner; if (j.onComplete(subtask)) { cancel(); } @@ -192,7 +193,7 @@ final class StructuredTaskScopeImpl implements StructuredTaskScope { // notify joiner, even if cancelled @SuppressWarnings("unchecked") - var j = (Joiner) joiner; + var j = (Joiner) joiner; if (j.onFork(subtask)) { cancel(); } @@ -228,7 +229,7 @@ final class StructuredTaskScopeImpl implements StructuredTaskScope { } @Override - public R join() throws InterruptedException { + public R join() throws R_X, InterruptedException { ensureOwner(); if (state >= ST_JOIN_COMPLETED) { throw new IllegalStateException("Already joined or scope is closed"); @@ -245,19 +246,13 @@ final class StructuredTaskScopeImpl implements StructuredTaskScope { // all subtasks completed or scope cancelled state = ST_JOIN_COMPLETED; - // invoke joiner onTimeout if timeout expired + // invoke joiner result() or timeout() method if (timeoutExpired) { - cancel(); // ensure cancelled before calling onTimeout - joiner.onTimeout(); + cancel(); // ensure cancelled before calling joiner + return joiner.timeout(); } else { cancelTimeout(); - } - - // invoke joiner to get result - try { return joiner.result(); - } catch (Throwable e) { - throw new FailedException(e); } } @@ -310,12 +305,12 @@ final class StructuredTaskScopeImpl implements StructuredTaskScope { } } - private final StructuredTaskScopeImpl scope; + private final StructuredTaskScopeImpl scope; private final Callable task; private volatile Object result; @Stable private Thread thread; - SubtaskImpl(StructuredTaskScopeImpl scope, Callable task) { + SubtaskImpl(StructuredTaskScopeImpl scope, Callable task) { this.scope = scope; this.task = task; } diff --git a/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java b/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java index abb9f3aca38..e357665ed3c 100644 --- a/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java +++ b/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java @@ -184,8 +184,8 @@ import java.util.Locale; * CLDR version * * - * JDK 26 - * CLDR 48 + * JDK 27 + * CLDR 48.2 * JDK 25 * CLDR 47 * JDK 21 @@ -208,6 +208,8 @@ import java.util.Locale; * CLDR version * * + * JDK 26 + * CLDR 48 * JDK 24 * CLDR 46 * JDK 23 diff --git a/src/java.base/share/classes/javax/crypto/spec/DESKeySpec.java b/src/java.base/share/classes/javax/crypto/spec/DESKeySpec.java index 078cb9bbefd..a2afd88c3ba 100644 --- a/src/java.base/share/classes/javax/crypto/spec/DESKeySpec.java +++ b/src/java.base/share/classes/javax/crypto/spec/DESKeySpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, 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 @@ -123,7 +123,7 @@ public class DESKeySpec implements java.security.spec.KeySpec { * of the buffer are copied to protect against subsequent modification. * * @exception NullPointerException if the given key material is - * null + * null. * @exception InvalidKeyException if the given key material is shorter * than 8 bytes. */ @@ -146,14 +146,22 @@ public class DESKeySpec implements java.security.spec.KeySpec { * material starts. * * @exception NullPointerException if the given key material is - * null + * null. * @exception InvalidKeyException if the given key material, starting at * offset inclusive, is shorter than 8 bytes. + * @exception ArrayIndexOutOfBoundsException if offset is + * negative. */ public DESKeySpec(byte[] key, int offset) throws InvalidKeyException { + if (key == null) { + throw new NullPointerException("null key"); + } if (key.length - offset < DES_KEY_LEN) { throw new InvalidKeyException("Wrong key size"); } + if (offset < 0) { + throw new ArrayIndexOutOfBoundsException("offset is negative"); + } this.key = new byte[DES_KEY_LEN]; System.arraycopy(key, offset, this.key, 0, DES_KEY_LEN); } @@ -182,6 +190,8 @@ public class DESKeySpec implements java.security.spec.KeySpec { * @exception InvalidKeyException if the given key material is * null, or starting at offset inclusive, is * shorter than 8 bytes. + * @exception ArrayIndexOutOfBoundsException if offset is + * negative. */ public static boolean isParityAdjusted(byte[] key, int offset) throws InvalidKeyException { @@ -191,7 +201,9 @@ public class DESKeySpec implements java.security.spec.KeySpec { if (key.length - offset < DES_KEY_LEN) { throw new InvalidKeyException("Wrong key size"); } - + if (offset < 0) { + throw new ArrayIndexOutOfBoundsException("offset is negative"); + } for (int i = 0; i < DES_KEY_LEN; i++) { int k = Integer.bitCount(key[offset++] & 0xff); if ((k & 1) == 0) { @@ -215,6 +227,8 @@ public class DESKeySpec implements java.security.spec.KeySpec { * @exception InvalidKeyException if the given key material is * null, or starting at offset inclusive, is * shorter than 8 bytes. + * @exception ArrayIndexOutOfBoundsException if offset is + * negative. */ public static boolean isWeak(byte[] key, int offset) throws InvalidKeyException { @@ -224,6 +238,9 @@ public class DESKeySpec implements java.security.spec.KeySpec { if (key.length - offset < DES_KEY_LEN) { throw new InvalidKeyException("Wrong key size"); } + if (offset < 0) { + throw new ArrayIndexOutOfBoundsException("offset is negative"); + } for (int i = 0; i < WEAK_KEYS.length; i++) { boolean found = true; for (int j = 0; j < DES_KEY_LEN; j++) { diff --git a/src/java.base/share/classes/javax/crypto/spec/DESedeKeySpec.java b/src/java.base/share/classes/javax/crypto/spec/DESedeKeySpec.java index 7fd5576c487..fb5a19b4a9b 100644 --- a/src/java.base/share/classes/javax/crypto/spec/DESedeKeySpec.java +++ b/src/java.base/share/classes/javax/crypto/spec/DESedeKeySpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, 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 @@ -78,14 +78,22 @@ public class DESedeKeySpec implements java.security.spec.KeySpec { * * @exception NullPointerException if key is null. * @exception InvalidKeyException if the given key material, starting at - * offset inclusive, is shorter than 24 bytes + * offset inclusive, is shorter than 24 bytes. + * @exception ArrayIndexOutOfBoundsException if offset is + * negative. */ public DESedeKeySpec(byte[] key, int offset) throws InvalidKeyException { - if (key.length - offset < 24) { + if (key == null) { + throw new NullPointerException("null key"); + } + if (key.length - offset < DES_EDE_KEY_LEN) { throw new InvalidKeyException("Wrong key size"); } + if (offset < 0) { + throw new ArrayIndexOutOfBoundsException("offset is negative"); + } this.key = new byte[24]; - System.arraycopy(key, offset, this.key, 0, 24); + System.arraycopy(key, offset, this.key, 0, DES_EDE_KEY_LEN); } /** @@ -107,15 +115,23 @@ public class DESedeKeySpec implements java.security.spec.KeySpec { * @return true if the given DES-EDE key is parity-adjusted, false * otherwise * - * @exception NullPointerException if key is null. - * @exception InvalidKeyException if the given key material, starting at - * offset inclusive, is shorter than 24 bytes + * @exception InvalidKeyException if the given key material is + * null, or starting at offset inclusive, is + * shorter than 8 bytes. + * @exception ArrayIndexOutOfBoundsException if offset is + * negative. */ public static boolean isParityAdjusted(byte[] key, int offset) throws InvalidKeyException { - if (key.length - offset < 24) { - throw new InvalidKeyException("Wrong key size"); - } + if (key == null) { + throw new InvalidKeyException("null key"); + } + if (key.length - offset < DES_EDE_KEY_LEN) { + throw new InvalidKeyException("Wrong key size"); + } + if (offset < 0) { + throw new ArrayIndexOutOfBoundsException("offset is negative"); + } return DESKeySpec.isParityAdjusted(key, offset) && DESKeySpec.isParityAdjusted(key, offset + 8) && DESKeySpec.isParityAdjusted(key, offset + 16); diff --git a/src/java.base/share/classes/jdk/internal/foreign/HeapMemorySegmentImpl.java b/src/java.base/share/classes/jdk/internal/foreign/HeapMemorySegmentImpl.java index 06f82b13691..f1b53f78651 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/HeapMemorySegmentImpl.java +++ b/src/java.base/share/classes/jdk/internal/foreign/HeapMemorySegmentImpl.java @@ -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 @@ -26,6 +26,7 @@ package jdk.internal.foreign; +import jdk.internal.ValueBased; import jdk.internal.access.JavaNioAccess; import jdk.internal.access.SharedSecrets; import jdk.internal.vm.annotation.ForceInline; @@ -98,6 +99,7 @@ abstract sealed class HeapMemorySegmentImpl extends AbstractMemorySegmentImpl { // factories + @ValueBased public static final class OfByte extends HeapMemorySegmentImpl { OfByte(long offset, Object base, long length, boolean readOnly, MemorySessionImpl session) { @@ -125,6 +127,7 @@ abstract sealed class HeapMemorySegmentImpl extends AbstractMemorySegmentImpl { } } + @ValueBased public static final class OfChar extends HeapMemorySegmentImpl { OfChar(long offset, Object base, long length, boolean readOnly, MemorySessionImpl session) { @@ -152,6 +155,7 @@ abstract sealed class HeapMemorySegmentImpl extends AbstractMemorySegmentImpl { } } + @ValueBased public static final class OfShort extends HeapMemorySegmentImpl { OfShort(long offset, Object base, long length, boolean readOnly, MemorySessionImpl session) { @@ -179,6 +183,7 @@ abstract sealed class HeapMemorySegmentImpl extends AbstractMemorySegmentImpl { } } + @ValueBased public static final class OfInt extends HeapMemorySegmentImpl { OfInt(long offset, Object base, long length, boolean readOnly, MemorySessionImpl session) { @@ -206,6 +211,7 @@ abstract sealed class HeapMemorySegmentImpl extends AbstractMemorySegmentImpl { } } + @ValueBased public static final class OfLong extends HeapMemorySegmentImpl { OfLong(long offset, Object base, long length, boolean readOnly, MemorySessionImpl session) { @@ -233,6 +239,7 @@ abstract sealed class HeapMemorySegmentImpl extends AbstractMemorySegmentImpl { } } + @ValueBased public static final class OfFloat extends HeapMemorySegmentImpl { OfFloat(long offset, Object base, long length, boolean readOnly, MemorySessionImpl session) { @@ -260,6 +267,7 @@ abstract sealed class HeapMemorySegmentImpl extends AbstractMemorySegmentImpl { } } + @ValueBased public static final class OfDouble extends HeapMemorySegmentImpl { OfDouble(long offset, Object base, long length, boolean readOnly, MemorySessionImpl session) { diff --git a/src/java.base/share/classes/jdk/internal/foreign/MappedMemorySegmentImpl.java b/src/java.base/share/classes/jdk/internal/foreign/MappedMemorySegmentImpl.java index efa6cf39882..21a110629ce 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/MappedMemorySegmentImpl.java +++ b/src/java.base/share/classes/jdk/internal/foreign/MappedMemorySegmentImpl.java @@ -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 @@ -25,6 +25,7 @@ package jdk.internal.foreign; +import jdk.internal.ValueBased; import jdk.internal.access.foreign.UnmapperProxy; import jdk.internal.misc.ScopedMemoryAccess; @@ -36,6 +37,7 @@ import java.nio.ByteBuffer; * memory mapped segment, such as the file descriptor associated with the mapping. This information is crucial * in order to correctly reconstruct a byte buffer object from the segment (see {@link #makeByteBuffer()}). */ +@ValueBased public final class MappedMemorySegmentImpl extends NativeMemorySegmentImpl { private final UnmapperProxy unmapper; diff --git a/src/java.base/share/classes/jdk/internal/foreign/SegmentFactories.java b/src/java.base/share/classes/jdk/internal/foreign/SegmentFactories.java index 728ee235547..a94800711cf 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/SegmentFactories.java +++ b/src/java.base/share/classes/jdk/internal/foreign/SegmentFactories.java @@ -190,15 +190,16 @@ public class SegmentFactories { 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; @@ -226,12 +227,13 @@ public class SegmentFactories { 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 --git a/src/java.base/share/classes/jdk/internal/foreign/abi/ppc64/CallArranger.java b/src/java.base/share/classes/jdk/internal/foreign/abi/ppc64/CallArranger.java index 0fd90ef6f73..c9994ec2930 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/abi/ppc64/CallArranger.java +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/ppc64/CallArranger.java @@ -245,7 +245,12 @@ public abstract class CallArranger { // Regular struct, no HFA. VMStorage[] structAlloc(MemoryLayout layout) { // Allocate enough gp slots (regs and stack) such that the struct fits in them. - int numChunks = (int) Utils.alignUp(layout.byteSize(), MAX_COPY_SIZE) / MAX_COPY_SIZE; + final int numChunks; + try { + numChunks = Math.toIntExact(Utils.alignUp(layout.byteSize(), MAX_COPY_SIZE) / MAX_COPY_SIZE); + } catch (ArithmeticException ae) { + throw new IllegalArgumentException("Layout too large: " + layout, ae); + } VMStorage[] result = new VMStorage[numChunks]; for (int i = 0; i < numChunks; i++) { result[i] = nextStorage(StorageType.INTEGER, false); diff --git a/src/java.base/share/classes/jdk/internal/foreign/layout/PaddingLayoutImpl.java b/src/java.base/share/classes/jdk/internal/foreign/layout/PaddingLayoutImpl.java index 63973e1cf3e..e74eac1a5ce 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/layout/PaddingLayoutImpl.java +++ b/src/java.base/share/classes/jdk/internal/foreign/layout/PaddingLayoutImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, 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 @@ -25,10 +25,13 @@ */ package jdk.internal.foreign.layout; +import jdk.internal.ValueBased; + import java.lang.foreign.PaddingLayout; import java.util.Objects; import java.util.Optional; +@ValueBased public final class PaddingLayoutImpl extends AbstractLayout implements PaddingLayout { private PaddingLayoutImpl(long byteSize) { diff --git a/src/java.base/share/classes/jdk/internal/foreign/layout/SequenceLayoutImpl.java b/src/java.base/share/classes/jdk/internal/foreign/layout/SequenceLayoutImpl.java index 16cffdad253..1dc9ba91847 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/layout/SequenceLayoutImpl.java +++ b/src/java.base/share/classes/jdk/internal/foreign/layout/SequenceLayoutImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, 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 @@ -25,6 +25,7 @@ */ package jdk.internal.foreign.layout; +import jdk.internal.ValueBased; import jdk.internal.foreign.Utils; import java.lang.foreign.MemoryLayout; @@ -32,6 +33,7 @@ import java.lang.foreign.SequenceLayout; import java.util.Objects; import java.util.Optional; +@ValueBased public final class SequenceLayoutImpl extends AbstractLayout implements SequenceLayout { private final long elemCount; diff --git a/src/java.base/share/classes/jdk/internal/foreign/layout/StructLayoutImpl.java b/src/java.base/share/classes/jdk/internal/foreign/layout/StructLayoutImpl.java index 9da6594e00f..27c74afa48d 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/layout/StructLayoutImpl.java +++ b/src/java.base/share/classes/jdk/internal/foreign/layout/StructLayoutImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, 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 @@ -25,11 +25,14 @@ */ package jdk.internal.foreign.layout; +import jdk.internal.ValueBased; + import java.lang.foreign.MemoryLayout; import java.lang.foreign.StructLayout; import java.util.List; import java.util.Optional; +@ValueBased public final class StructLayoutImpl extends AbstractGroupLayout implements StructLayout { private StructLayoutImpl(List elements, long byteSize, long byteAlignment, long minByteAlignment, Optional name) { diff --git a/src/java.base/share/classes/jdk/internal/foreign/layout/UnionLayoutImpl.java b/src/java.base/share/classes/jdk/internal/foreign/layout/UnionLayoutImpl.java index 544ca838b18..3a95e215c32 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/layout/UnionLayoutImpl.java +++ b/src/java.base/share/classes/jdk/internal/foreign/layout/UnionLayoutImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, 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 @@ -25,11 +25,14 @@ */ package jdk.internal.foreign.layout; +import jdk.internal.ValueBased; + import java.lang.foreign.MemoryLayout; import java.lang.foreign.UnionLayout; import java.util.List; import java.util.Optional; +@ValueBased public final class UnionLayoutImpl extends AbstractGroupLayout implements UnionLayout { private UnionLayoutImpl(List elements, long byteSize, long byteAlignment, long minByteAlignment, Optional name) { diff --git a/src/java.base/share/classes/jdk/internal/foreign/layout/ValueLayouts.java b/src/java.base/share/classes/jdk/internal/foreign/layout/ValueLayouts.java index 685b95691ba..d1dd9e51301 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/layout/ValueLayouts.java +++ b/src/java.base/share/classes/jdk/internal/foreign/layout/ValueLayouts.java @@ -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 @@ -25,6 +25,7 @@ */ package jdk.internal.foreign.layout; +import jdk.internal.ValueBased; import jdk.internal.foreign.LayoutPath; import jdk.internal.foreign.Utils; import jdk.internal.misc.Unsafe; @@ -55,6 +56,7 @@ import java.util.Optional; * * @implSpec This class and its subclasses are immutable, thread-safe and value-based. */ +@ValueBased public final class ValueLayouts { // Suppresses default constructor, ensuring non-instantiability. @@ -168,6 +170,7 @@ public final class ValueLayouts { } } + @ValueBased public static final class OfBooleanImpl extends AbstractValueLayout implements ValueLayout.OfBoolean { private OfBooleanImpl(ByteOrder order, long byteAlignment, Optional name) { @@ -184,6 +187,7 @@ public final class ValueLayouts { } } + @ValueBased public static final class OfByteImpl extends AbstractValueLayout implements ValueLayout.OfByte { private OfByteImpl(ByteOrder order, long byteAlignment, Optional name) { @@ -200,6 +204,7 @@ public final class ValueLayouts { } } + @ValueBased public static final class OfCharImpl extends AbstractValueLayout implements ValueLayout.OfChar { private OfCharImpl(ByteOrder order, long byteAlignment, Optional name) { @@ -216,6 +221,7 @@ public final class ValueLayouts { } } + @ValueBased public static final class OfShortImpl extends AbstractValueLayout implements ValueLayout.OfShort { private OfShortImpl(ByteOrder order, long byteAlignment, Optional name) { @@ -232,6 +238,7 @@ public final class ValueLayouts { } } + @ValueBased public static final class OfIntImpl extends AbstractValueLayout implements ValueLayout.OfInt { private OfIntImpl(ByteOrder order, long byteAlignment, Optional name) { @@ -248,6 +255,7 @@ public final class ValueLayouts { } } + @ValueBased public static final class OfFloatImpl extends AbstractValueLayout implements ValueLayout.OfFloat { private OfFloatImpl(ByteOrder order, long byteAlignment, Optional name) { @@ -264,6 +272,7 @@ public final class ValueLayouts { } } + @ValueBased public static final class OfLongImpl extends AbstractValueLayout implements ValueLayout.OfLong { private OfLongImpl(ByteOrder order, long byteAlignment, Optional name) { @@ -280,6 +289,7 @@ public final class ValueLayouts { } } + @ValueBased public static final class OfDoubleImpl extends AbstractValueLayout implements ValueLayout.OfDouble { private OfDoubleImpl(ByteOrder order, long byteAlignment, Optional name) { @@ -297,6 +307,7 @@ public final class ValueLayouts { } + @ValueBased public static final class OfAddressImpl extends AbstractValueLayout implements AddressLayout { private final MemoryLayout targetLayout; diff --git a/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java b/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java index a698440c15d..82c55d6f017 100644 --- a/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java +++ b/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java @@ -64,9 +64,9 @@ public @interface PreviewFeature { * Values should be annotated with the feature's {@code JEP}. */ public enum Feature { - @JEP(number=525, title="Structured Concurrency", status="Sixth Preview") + @JEP(number=533, title="Structured Concurrency", status="Seventh Preview") STRUCTURED_CONCURRENCY, - @JEP(number = 526, title = "Lazy Constants", status = "Second Preview") + @JEP(number = 531, title = "Lazy Constants", status = "Third Preview") LAZY_CONSTANTS, @JEP(number=524, title="PEM Encodings of Cryptographic Objects", status="Second Preview") diff --git a/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java b/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java index 1c565a52c0f..20d3b8837fe 100644 --- a/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java +++ b/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java @@ -37,8 +37,11 @@ import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.security.AccessController; import java.security.PrivilegedAction; +import java.util.NoSuchElementException; import java.util.Objects; import java.util.stream.IntStream; +import java.util.stream.Stream; + import jdk.internal.jimage.decompressor.Decompressor; /** @@ -316,6 +319,56 @@ public class BasicImageReader implements AutoCloseable { .toArray(String[]::new); } + /** + * Returns the "raw" API for accessing underlying jimage resource entries. + * + *

    This is only meaningful for use by code dealing directly with jimage + * files, and cannot be used to reliably lookup resources used at runtime. + * + *

    The returned {@code ResourceEntries} remains valid until the image + * reader from which it was obtained is closed. + */ + // Package visible for use by ImageReader. + ResourceEntries getResourceEntries() { + return new ResourceEntries() { + @Override + public Stream getEntryNames(String module) { + if (module.isEmpty() || module.equals("modules") || module.equals("packages")) { + throw new IllegalArgumentException("Invalid module name: " + module); + } + return IntStream.range(0, offsets.capacity()) + .map(offsets::get) + .filter(offset -> offset != 0) + // Reusing a location instance or getting the module + // offset directly would save a lot of allocations here. + .mapToObj(offset -> ImageLocation.readFrom(BasicImageReader.this, offset)) + // Reverse lookup of module offset would be faster here. + .filter(loc -> module.equals(loc.getModule())) + .map(ImageLocation::getFullName); + } + + private ImageLocation getResourceLocation(String name) { + if (!name.startsWith("/modules/") && !name.startsWith("/packages/")) { + ImageLocation location = BasicImageReader.this.findLocation(name); + if (location != null) { + return location; + } + } + throw new NoSuchElementException("No such resource entry: " + name); + } + + @Override + public long getSize(String name) { + return getResourceLocation(name).getUncompressedSize(); + } + + @Override + public byte[] getBytes(String name) { + return BasicImageReader.this.getResource(getResourceLocation(name)); + } + }; + } + ImageLocation getLocation(int offset) { return ImageLocation.readFrom(this, offset); } diff --git a/src/java.base/share/classes/jdk/internal/jimage/ImageHeader.java b/src/java.base/share/classes/jdk/internal/jimage/ImageHeader.java index f63665119e2..c128aa9736a 100644 --- a/src/java.base/share/classes/jdk/internal/jimage/ImageHeader.java +++ b/src/java.base/share/classes/jdk/internal/jimage/ImageHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, 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 @@ -30,6 +30,23 @@ import java.nio.IntBuffer; import java.util.Objects; /** + * Defines the header and version information for jimage files. + * + *

    Version number changes must be synced in a single change across all code + * which reads/writes jimage files, and code which tries to open a jimage file + * with an unexpected version should fail. + * + *

    Known jimage file code which needs updating on version change: + *

      + *
    • src/java.base/share/native/libjimage/imageFile.hpp + *
    + * + *

    Version history: + *

      + *
    • {@code 1.0}: Original version. + *
    • {@code 1.1}: Support preview mode with new flags. + *
    + * * @implNote This class needs to maintain JDK 8 source compatibility. * * It is used internally in the JDK to implement jimage/jrtfs access, @@ -39,7 +56,7 @@ import java.util.Objects; public final class ImageHeader { public static final int MAGIC = 0xCAFEDADA; public static final int MAJOR_VERSION = 1; - public static final int MINOR_VERSION = 0; + public static final int MINOR_VERSION = 1; private static final int HEADER_SLOTS = 7; private final int magic; diff --git a/src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java b/src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java index f31c7291927..0822b17f0bb 100644 --- a/src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java +++ b/src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2021, 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 @@ -26,7 +26,9 @@ package jdk.internal.jimage; import java.nio.ByteBuffer; +import java.util.List; import java.util.Objects; +import java.util.function.Predicate; /** * @implNote This class needs to maintain JDK 8 source compatibility. @@ -36,15 +38,172 @@ import java.util.Objects; * to the jimage file provided by the shipped JDK by tools running on JDK 8. */ public class ImageLocation { + // Also defined in src/java.base/share/native/libjimage/imageFile.hpp + + /** End of attribute stream marker. */ public static final int ATTRIBUTE_END = 0; + /** String table offset of module name. */ public static final int ATTRIBUTE_MODULE = 1; + /** String table offset of resource path parent. */ public static final int ATTRIBUTE_PARENT = 2; + /** String table offset of resource path base. */ public static final int ATTRIBUTE_BASE = 3; + /** String table offset of resource path extension. */ public static final int ATTRIBUTE_EXTENSION = 4; + /** Container byte offset of resource. */ public static final int ATTRIBUTE_OFFSET = 5; + /** In-image byte size of the compressed resource. */ public static final int ATTRIBUTE_COMPRESSED = 6; + /** In-memory byte size of the uncompressed resource. */ public static final int ATTRIBUTE_UNCOMPRESSED = 7; - public static final int ATTRIBUTE_COUNT = 8; + /** Flags relating to preview mode resources. */ + public static final int ATTRIBUTE_PREVIEW_FLAGS = 8; + /** Number of attribute kinds. */ + public static final int ATTRIBUTE_COUNT = 9; + + // Flag masks for the ATTRIBUTE_PREVIEW_FLAGS attribute. Defined so + // that zero is the overwhelmingly common case for normal resources. + + /** + * Indicates that a non-preview location is associated with preview + * resources. + * + *

    This can apply to both resources and directories in the + * {@code /modules/xxx/...} namespace, as well as {@code /packages/xxx} + * directories. + * + *

    For {@code /packages/xxx} directories, it indicates that the package + * has preview resources in one of the modules in which it exists. + */ + private static final int FLAGS_HAS_PREVIEW_VERSION = 0x1; + + /** + * Set on all locations in the {@code /modules/xxx/META-INF/preview/...} + * namespace. + * + *

    This flag is mutually exclusive with {@link #FLAGS_HAS_PREVIEW_VERSION}. + */ + private static final int FLAGS_IS_PREVIEW_VERSION = 0x2; + + /** + * Indicates that a location only exists due to preview resources. + * + *

    This can apply to both resources and directories in the + * {@code /modules/xxx/...} namespace, as well as {@code /packages/xxx} + * directories. + * + *

    For {@code /packages/xxx} directories it indicates that, for every + * module in which the package exists, it is preview only. + * + *

    This flag is mutually exclusive with {@link #FLAGS_HAS_PREVIEW_VERSION} + * and need not imply that {@link #FLAGS_IS_PREVIEW_VERSION} is set (i.e. + * for {@code /packages/xxx} directories). + */ + private static final int FLAGS_IS_PREVIEW_ONLY = 0x4; + + // Also used in ImageReader. + static final String MODULES_PREFIX = "/modules"; + static final String PACKAGES_PREFIX = "/packages"; + static final String PREVIEW_INFIX = "/META-INF/preview"; + + /** + * Helper function to calculate preview flags (ATTRIBUTE_PREVIEW_FLAGS). + * + *

    Since preview flags are calculated separately for resource nodes and + * directory nodes (in two quite different places) it's useful to have a + * common helper. + * + *

    Based on the entry name, the flags are: + *

      + *
    • {@code "[/modules]//"} normal resource or directory:
      + * Zero, or {@code FLAGS_HAS_PREVIEW_VERSION} if a preview entry exists. + *
    • {@code "[/modules]//META-INF/preview/"} preview + * resource or directory:
      + * {@code FLAGS_IS_PREVIEW_VERSION}, and additionally {@code + * FLAGS_IS_PREVIEW_ONLY} if no normal version of the resource or + * directory exists. + *
    • In all other cases, returned flags are zero (note that {@code + * "/packages/xxx"} entries may have flags, but these are calculated + * elsewhere). + *
    + * + * @param name the jimage name of the resource or directory. + * @param hasEntry a predicate for jimage names returning whether an entry + * is present. + * @return flags for the ATTRIBUTE_PREVIEW_FLAGS attribute. + */ + public static int getPreviewFlags(String name, Predicate hasEntry) { + if (name.startsWith(PACKAGES_PREFIX + "/")) { + throw new IllegalArgumentException( + "Package sub-directory flags handled separately: " + name); + } + // Find suffix for either '/modules/xxx/suffix' or '/xxx/suffix' paths. + int idx = name.startsWith(MODULES_PREFIX + "/") ? MODULES_PREFIX.length() + 1 : 1; + int suffixStart = name.indexOf('/', idx); + if (suffixStart == -1) { + // No flags for '[/modules]/xxx' paths (esp. '/modules', '/packages'). + // '/packages/xxx' entries have flags, but not calculated here. + return 0; + } + // Prefix is either '/modules/xxx' or '/xxx', and suffix starts with '/'. + String prefix = name.substring(0, suffixStart); + String suffix = name.substring(suffixStart); + if (suffix.startsWith(PREVIEW_INFIX + "/")) { + // Preview resources/directories. + String nonPreviewName = prefix + suffix.substring(PREVIEW_INFIX.length()); + return FLAGS_IS_PREVIEW_VERSION + | (hasEntry.test(nonPreviewName) ? 0 : FLAGS_IS_PREVIEW_ONLY); + } else if (!suffix.startsWith("/META-INF/")) { + // Non-preview resources/directories. + String previewName = prefix + PREVIEW_INFIX + suffix; + return hasEntry.test(previewName) ? FLAGS_HAS_PREVIEW_VERSION : 0; + } else { + // Suffix is '/META-INF/xxx' and no preview version is even possible. + return 0; + } + } + + /** + * Helper function to calculate package flags for {@code "/packages/xxx"} + * directory entries. + * + *

    Based on the module links, the flags are: + *

      + *
    • {@code FLAGS_HAS_PREVIEW_VERSION} if any referenced + * package has a preview version. + *
    • {@code FLAGS_IS_PREVIEW_ONLY} if all referenced packages + * are preview only. + *
    + * + * @return package flags for {@code "/packages/xxx"} directory entries. + */ + public static int getPackageFlags(List moduleLinks) { + boolean hasPreviewVersion = + moduleLinks.stream().anyMatch(ModuleLink::hasPreviewVersion); + boolean isPreviewOnly = + moduleLinks.stream().allMatch(ModuleLink::isPreviewOnly); + return (hasPreviewVersion ? ImageLocation.FLAGS_HAS_PREVIEW_VERSION : 0) + | (isPreviewOnly ? ImageLocation.FLAGS_IS_PREVIEW_ONLY : 0); + } + + /** + * Tests a non-preview image location's flags to see if it has preview + * content associated with it. + */ + public static boolean hasPreviewVersion(int flags) { + return (flags & FLAGS_HAS_PREVIEW_VERSION) != 0; + } + + /** + * Tests an image location's flags to see if it only exists in preview mode. + */ + public static boolean isPreviewOnly(int flags) { + return (flags & FLAGS_IS_PREVIEW_ONLY) != 0; + } + + public enum LocationType { + RESOURCE, MODULES_ROOT, MODULES_DIR, PACKAGES_ROOT, PACKAGES_DIR; + } protected final long[] attributes; @@ -285,6 +444,10 @@ public class ImageLocation { return (int)getAttribute(ATTRIBUTE_EXTENSION); } + public int getFlags() { + return (int) getAttribute(ATTRIBUTE_PREVIEW_FLAGS); + } + public String getFullName() { return getFullName(false); } @@ -294,7 +457,7 @@ public class ImageLocation { if (getModuleOffset() != 0) { if (modulesPrefix) { - builder.append("/modules"); + builder.append(MODULES_PREFIX); } builder.append('/'); @@ -317,36 +480,6 @@ public class ImageLocation { return builder.toString(); } - String buildName(boolean includeModule, boolean includeParent, - boolean includeName) { - StringBuilder builder = new StringBuilder(); - - if (includeModule && getModuleOffset() != 0) { - builder.append("/modules/"); - builder.append(getModule()); - } - - if (includeParent && getParentOffset() != 0) { - builder.append('/'); - builder.append(getParent()); - } - - if (includeName) { - if (includeModule || includeParent) { - builder.append('/'); - } - - builder.append(getBase()); - - if (getExtensionOffset() != 0) { - builder.append('.'); - builder.append(getExtension()); - } - } - - return builder.toString(); - } - public long getContentOffset() { return getAttribute(ATTRIBUTE_OFFSET); } @@ -359,6 +492,42 @@ public class ImageLocation { return getAttribute(ATTRIBUTE_UNCOMPRESSED); } + // Fast (zero allocation) type determination for locations. + public LocationType getType() { + switch (getModuleOffset()) { + case ImageStrings.MODULES_STRING_OFFSET: + // Locations in /modules/... namespace are directory entries. + return LocationType.MODULES_DIR; + case ImageStrings.PACKAGES_STRING_OFFSET: + // Locations in /packages/... namespace are always 2-level + // "/packages/xxx" directories. + return LocationType.PACKAGES_DIR; + case ImageStrings.EMPTY_STRING_OFFSET: + // Only 2 choices, either the "/modules" or "/packages" root. + assert isRootDir() : "Invalid root directory: " + getFullName(); + return getBase().charAt(1) == 'p' + ? LocationType.PACKAGES_ROOT + : LocationType.MODULES_ROOT; + default: + // Anything else is // and references a resource. + return LocationType.RESOURCE; + } + } + + private boolean isRootDir() { + if (getModuleOffset() == 0 && getParentOffset() == 0) { + String name = getFullName(); + return name.equals(MODULES_PREFIX) || name.equals(PACKAGES_PREFIX); + } + return false; + } + + @Override + public String toString() { + // Cannot use String.format() (too early in startup for locale code). + return "ImageLocation[name='" + getFullName() + "', type=" + getType() + ", flags=" + getFlags() + "]"; + } + static ImageLocation readFrom(BasicImageReader reader, int offset) { Objects.requireNonNull(reader); long[] attributes = reader.getAttributes(offset); diff --git a/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java b/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java index 4c358820166..2cf28b835ce 100644 --- a/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java +++ b/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java @@ -24,6 +24,8 @@ */ package jdk.internal.jimage; +import jdk.internal.jimage.ImageLocation.LocationType; + import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; @@ -34,16 +36,26 @@ import java.nio.file.attribute.BasicFileAttributes; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.TreeMap; import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Stream; +import static jdk.internal.jimage.ImageLocation.LocationType.MODULES_DIR; +import static jdk.internal.jimage.ImageLocation.LocationType.MODULES_ROOT; +import static jdk.internal.jimage.ImageLocation.LocationType.PACKAGES_DIR; +import static jdk.internal.jimage.ImageLocation.LocationType.RESOURCE; +import static jdk.internal.jimage.ImageLocation.MODULES_PREFIX; +import static jdk.internal.jimage.ImageLocation.PACKAGES_PREFIX; +import static jdk.internal.jimage.ImageLocation.PREVIEW_INFIX; + /** * A view over the entries of a jimage file with a unified namespace suitable * for file system use. The jimage entries (resources, module and package @@ -77,6 +89,10 @@ import java.util.stream.Stream; * to the jimage file provided by the shipped JDK by tools running on JDK 8. */ public final class ImageReader implements AutoCloseable { + + // For resource paths, there's no leading '/'. + private static final String PREVIEW_RESOURCE_PREFIX = PREVIEW_INFIX.substring(1); + private final SharedImageReader reader; private volatile boolean closed; @@ -86,22 +102,27 @@ public final class ImageReader implements AutoCloseable { } /** - * Opens an image reader for a jimage file at the specified path, using the - * given byte order. + * Opens an image reader for a jimage file at the specified path. + * + * @param imagePath file system path of the jimage file. + * @param mode whether to return preview resources. */ - public static ImageReader open(Path imagePath, ByteOrder byteOrder) throws IOException { - Objects.requireNonNull(imagePath); - Objects.requireNonNull(byteOrder); - - return SharedImageReader.open(imagePath, byteOrder); + public static ImageReader open(Path imagePath, PreviewMode mode) throws IOException { + return open(imagePath, ByteOrder.nativeOrder(), mode); } /** - * Opens an image reader for a jimage file at the specified path, using the - * platform native byte order. + * Opens an image reader for a jimage file at the specified path. + * + * @param imagePath file system path of the jimage file. + * @param byteOrder the byte-order to be used when reading the jimage file. + * @param mode controls whether preview resources are visible. */ - public static ImageReader open(Path imagePath) throws IOException { - return open(imagePath, ByteOrder.nativeOrder()); + public static ImageReader open(Path imagePath, ByteOrder byteOrder, PreviewMode mode) + throws IOException { + Objects.requireNonNull(imagePath); + Objects.requireNonNull(byteOrder); + return SharedImageReader.open(imagePath, byteOrder, mode.isPreviewModeEnabled()); } @Override @@ -200,15 +221,45 @@ public final class ImageReader implements AutoCloseable { return reader.getResourceBuffer(node.getLocation()); } + // Package protected for use only by SystemImageReader. + ResourceEntries getResourceEntries() { + return reader.getResourceEntries(); + } + private static final class SharedImageReader extends BasicImageReader { - private static final Map OPEN_FILES = new HashMap<>(); - private static final String MODULES_ROOT = "/modules"; - private static final String PACKAGES_ROOT = "/packages"; // There are >30,000 nodes in a complete jimage tree, and even relatively // common tasks (e.g. starting up javac) load somewhere in the region of // 1000 classes. Thus, an initial capacity of 2000 is a reasonable guess. private static final int INITIAL_NODE_CACHE_CAPACITY = 2000; + static final class ReaderKey { + private final Path imagePath; + private final boolean isPreviewEnabled; + + public ReaderKey(Path imagePath, boolean isPreviewEnabled) { + this.imagePath = imagePath; + this.isPreviewEnabled = isPreviewEnabled; + } + + @Override + public boolean equals(Object obj) { + // No pattern variables here (Java 8 compatible source). + if (obj instanceof ReaderKey) { + ReaderKey other = (ReaderKey) obj; + return this.imagePath.equals(other.imagePath) + && this.isPreviewEnabled == other.isPreviewEnabled; + } + return false; + } + + @Override + public int hashCode() { + return imagePath.hashCode() ^ Boolean.hashCode(isPreviewEnabled); + } + } + + private static final Map OPEN_FILES = new HashMap<>(); + // List of openers for this shared image. private final Set openers = new HashSet<>(); @@ -219,55 +270,140 @@ public final class ImageReader implements AutoCloseable { // Cache of all user visible nodes, guarded by synchronizing 'this' instance. private final Map nodes; - // Used to classify ImageLocation instances without string comparison. - private final int modulesStringOffset; - private final int packagesStringOffset; - private SharedImageReader(Path imagePath, ByteOrder byteOrder) throws IOException { + // Preview mode support. + private final boolean isPreviewEnabled; + // A relativized mapping from non-preview name to directories containing + // preview-only nodes. This is used to merge preview-only content into + // directories as they are completed. + // E.g. "/modules/xxx/foo/bar" -> Directory("/modules/xxx/META-INF/preview/foo/bar") + private final Map previewDirectoriesToMerge; + + private SharedImageReader(Path imagePath, ByteOrder byteOrder, boolean isPreviewEnabled) throws IOException { super(imagePath, byteOrder); this.imageFileAttributes = Files.readAttributes(imagePath, BasicFileAttributes.class); this.nodes = new HashMap<>(INITIAL_NODE_CACHE_CAPACITY); - // Pick stable jimage names from which to extract string offsets (we cannot - // use "/modules" or "/packages", since those have a module offset of zero). - this.modulesStringOffset = getModuleOffset("/modules/java.base"); - this.packagesStringOffset = getModuleOffset("/packages/java.lang"); + this.isPreviewEnabled = isPreviewEnabled; // Node creation is very lazy, so we can just make the top-level directories // now without the risk of triggering the building of lots of other nodes. - Directory packages = newDirectory(PACKAGES_ROOT); - nodes.put(packages.getName(), packages); - Directory modules = newDirectory(MODULES_ROOT); - nodes.put(modules.getName(), modules); + Directory packages = ensureCached(newDirectory(PACKAGES_PREFIX)); + Directory modules = ensureCached(newDirectory(MODULES_PREFIX)); Directory root = newDirectory("/"); root.setChildren(Arrays.asList(packages, modules)); - nodes.put(root.getName(), root); + ensureCached(root); + + // By scanning the /packages directory information early we can determine + // which module/package pairs have preview resources, and build the (small) + // set of preview nodes early. This also ensures that preview-only entries + // in the /packages directory are not present in non-preview mode. + this.previewDirectoriesToMerge = isPreviewEnabled ? new HashMap<>() : null; + packages.setChildren(processPackagesDirectory(isPreviewEnabled)); } /** - * Returns the offset of the string denoting the leading "module" segment in - * the given path (e.g. {@code /}). We can't just pass in the - * {@code /} string here because that has a module offset of zero. + * Process {@code "/packages/xxx"} entries to build the child nodes for the + * root {@code "/packages"} node. Preview-only entries will be skipped if + * {@code previewMode == false}. + * + *

    If {@code previewMode == true}, this method also populates the {@link + * #previewDirectoriesToMerge} map with any preview-only nodes, to be merged + * into directories as they are completed. It also caches preview resources + * and preview-only directories for direct lookup. */ - private int getModuleOffset(String path) { - ImageLocation location = findLocation(path); - assert location != null : "Cannot find expected jimage location: " + path; - int offset = location.getModuleOffset(); - assert offset != 0 : "Invalid module offset for jimage location: " + path; - return offset; + private ArrayList processPackagesDirectory(boolean previewMode) { + ImageLocation pkgRoot = findLocation(PACKAGES_PREFIX); + assert pkgRoot != null : "Invalid jimage file"; + IntBuffer offsets = getOffsetBuffer(pkgRoot); + ArrayList pkgDirs = new ArrayList<>(offsets.capacity()); + // Package path to module map, sorted in reverse order so that + // longer child paths get processed first. + Map> previewPackagesToModules = + new TreeMap<>(Comparator.reverseOrder()); + for (int i = 0; i < offsets.capacity(); i++) { + ImageLocation pkgDir = getLocation(offsets.get(i)); + int flags = pkgDir.getFlags(); + // A package subdirectory is "preview only" if all the modules + // it references have that package marked as preview only. + // Skipping these entries avoids empty package subdirectories. + if (previewMode || !ImageLocation.isPreviewOnly(flags)) { + pkgDirs.add(ensureCached(newDirectory(pkgDir.getFullName()))); + } + if (previewMode && ImageLocation.hasPreviewVersion(flags)) { + // Only do this in preview mode for the small set of packages with + // preview versions (the number of preview entries should be small). + List moduleNames = new ArrayList<>(); + ModuleLink.readNameOffsets(getOffsetBuffer(pkgDir), /*normal*/ false, /*preview*/ true) + .forEachRemaining(n -> moduleNames.add(getString(n))); + previewPackagesToModules.put(pkgDir.getBase().replace('.', '/'), moduleNames); + } + } + // Reverse sorted map means child directories are processed first. + previewPackagesToModules.forEach((pkgPath, modules) -> + modules.forEach(modName -> processPreviewDir(MODULES_PREFIX + "/" + modName, pkgPath))); + // We might have skipped some preview-only package entries. + pkgDirs.trimToSize(); + return pkgDirs; } - private static ImageReader open(Path imagePath, ByteOrder byteOrder) throws IOException { + void processPreviewDir(String namePrefix, String pkgPath) { + String previewDirName = namePrefix + PREVIEW_INFIX + "/" + pkgPath; + ImageLocation previewLoc = findLocation(previewDirName); + assert previewLoc != null : "Missing preview directory location: " + previewDirName; + String nonPreviewDirName = namePrefix + "/" + pkgPath; + List previewOnlyChildren = createChildNodes(previewLoc, 0, childLoc -> { + String baseName = getBaseName(childLoc); + String nonPreviewChildName = nonPreviewDirName + "/" + baseName; + boolean isPreviewOnly = ImageLocation.isPreviewOnly(childLoc.getFlags()); + LocationType type = childLoc.getType(); + if (type == RESOURCE) { + // Preview resources are cached to override non-preview versions. + Node childNode = ensureCached(newResource(nonPreviewChildName, childLoc)); + return isPreviewOnly ? childNode : null; + } else { + // Child directories are not cached here (they are either cached + // already or have been added to previewDirectoriesToMerge). + assert type == MODULES_DIR : "Invalid location type: " + childLoc; + Node childNode = nodes.get(nonPreviewChildName); + assert isPreviewOnly == (childNode != null) : + "Inconsistent child node: " + nonPreviewChildName; + return childNode; + } + }); + Directory previewDir = newDirectory(nonPreviewDirName); + previewDir.setChildren(previewOnlyChildren); + if (ImageLocation.isPreviewOnly(previewLoc.getFlags())) { + // If we are preview-only, our children are also preview-only, so + // this directory is a complete hierarchy and should be cached. + assert !previewOnlyChildren.isEmpty() : "Invalid empty preview-only directory: " + nonPreviewDirName; + ensureCached(previewDir); + } else if (!previewOnlyChildren.isEmpty()) { + // A partial directory containing extra preview-only nodes + // to be merged when the non-preview directory is completed. + previewDirectoriesToMerge.put(nonPreviewDirName, previewDir); + } + } + + // Adds a node to the cache, ensuring that no matching entry already existed. + private T ensureCached(T node) { + Node existingNode = nodes.put(node.getName(), node); + assert existingNode == null : "Unexpected node already cached for: " + node; + return node; + } + + private static ImageReader open(Path imagePath, ByteOrder byteOrder, boolean previewMode) throws IOException { Objects.requireNonNull(imagePath); Objects.requireNonNull(byteOrder); synchronized (OPEN_FILES) { - SharedImageReader reader = OPEN_FILES.get(imagePath); + ReaderKey key = new ReaderKey(imagePath, previewMode); + SharedImageReader reader = OPEN_FILES.get(key); if (reader == null) { // Will fail with an IOException if wrong byteOrder. - reader = new SharedImageReader(imagePath, byteOrder); - OPEN_FILES.put(imagePath, reader); + reader = new SharedImageReader(imagePath, byteOrder, previewMode); + OPEN_FILES.put(key, reader); } else if (reader.getByteOrder() != byteOrder) { throw new IOException("\"" + reader.getName() + "\" is not an image file"); } @@ -291,7 +427,7 @@ public final class ImageReader implements AutoCloseable { close(); nodes.clear(); - if (!OPEN_FILES.remove(this.getImagePath(), this)) { + if (!OPEN_FILES.remove(new ReaderKey(getImagePath(), isPreviewEnabled), this)) { throw new IOException("image file not found in open list"); } } @@ -309,20 +445,14 @@ public final class ImageReader implements AutoCloseable { * "/modules" or "/packages". */ synchronized Node findNode(String name) { + // Root directories "/", "/modules" and "/packages", as well + // as all "/packages/xxx" subdirectories are already cached. Node node = nodes.get(name); if (node == null) { - // We cannot get the root paths ("/modules" or "/packages") here - // because those nodes are already in the nodes cache. - if (name.startsWith(MODULES_ROOT + "/")) { - // This may perform two lookups, one for a directory (in - // "/modules/...") and one for a non-prefixed resource - // (with "/modules" removed). - node = buildModulesNode(name); - } else if (name.startsWith(PACKAGES_ROOT + "/")) { - node = buildPackagesNode(name); - } - if (node != null) { - nodes.put(node.getName(), node); + if (name.startsWith(MODULES_PREFIX + "/")) { + node = buildAndCacheModulesNode(name); + } else if (name.startsWith(PACKAGES_PREFIX + "/")) { + node = buildAndCacheLinkNode(name); } } else if (!node.isCompleted()) { // Only directories can be incomplete. @@ -341,18 +471,27 @@ public final class ImageReader implements AutoCloseable { * the node handling code. */ Node findResourceNode(String moduleName, String resourcePath) { - // Unlike findNode(), this method makes only one lookup in the - // underlying jimage, but can only reliably return resource nodes. + // Unlike findNode(), this method can only reliably return resource nodes. if (moduleName.indexOf('/') >= 0) { throw new IllegalArgumentException("invalid module name: " + moduleName); } - String nodeName = MODULES_ROOT + "/" + moduleName + "/" + resourcePath; + if (resourcePath.startsWith(PREVIEW_RESOURCE_PREFIX)) { + return null; + } + String nodeName = MODULES_PREFIX + "/" + moduleName + "/" + resourcePath; // Synchronize as tightly as possible to reduce locking contention. synchronized (this) { Node node = nodes.get(nodeName); if (node == null) { - ImageLocation loc = findLocation(moduleName, resourcePath); - if (loc != null && isResource(loc)) { + ImageLocation loc = null; + if (isPreviewEnabled) { + // We must test preview location first (if in preview mode). + loc = findLocation(moduleName, PREVIEW_RESOURCE_PREFIX + resourcePath); + } + if (loc == null) { + loc = findLocation(moduleName, resourcePath); + } + if (loc != null && loc.getType() == RESOURCE) { node = newResource(nodeName, loc); nodes.put(node.getName(), node); } @@ -368,18 +507,36 @@ public final class ImageReader implements AutoCloseable { * *

    This method is expected to be called frequently for resources * which do not exist in the given module (e.g. as part of classpath - * search). As such, it skips checking the nodes cache and only checks - * for an entry in the jimage file, as this is faster if the resource - * is not present. This also means it doesn't need synchronization. + * search). As such, it skips checking the nodes cache if possible, and + * only checks for an entry in the jimage file, as this is faster if the + * resource is not present. This also means it doesn't need + * synchronization most of the time. */ boolean containsResource(String moduleName, String resourcePath) { if (moduleName.indexOf('/') >= 0) { throw new IllegalArgumentException("invalid module name: " + moduleName); } - // If the given module name is 'modules', then 'isResource()' - // returns false to prevent false positives. - ImageLocation loc = findLocation(moduleName, resourcePath); - return loc != null && isResource(loc); + if (resourcePath.startsWith(PREVIEW_RESOURCE_PREFIX)) { + return false; + } + // In preview mode, preview-only resources are eagerly added to the + // cache, so we must check that first. + ImageLocation loc = null; + if (isPreviewEnabled) { + String nodeName = MODULES_PREFIX + "/" + moduleName + "/" + resourcePath; + // Synchronize as tightly as possible to reduce locking contention. + synchronized (this) { + Node node = nodes.get(nodeName); + if (node != null) { + return node.isResource(); + } + } + loc = findLocation(moduleName, PREVIEW_RESOURCE_PREFIX + resourcePath); + } + if (loc == null) { + loc = findLocation(moduleName, resourcePath); + } + return loc != null && loc.getType() == RESOURCE; } /** @@ -388,55 +545,82 @@ public final class ImageReader implements AutoCloseable { *

    Called by {@link #findNode(String)} if a {@code /modules/...} node * is not present in the cache. */ - private Node buildModulesNode(String name) { - assert name.startsWith(MODULES_ROOT + "/") : "Invalid module node name: " + name; + private Node buildAndCacheModulesNode(String name) { + assert name.startsWith(MODULES_PREFIX + "/") : "Invalid module node name: " + name; + if (isPreviewName(name)) { + return null; + } // Returns null for non-directory resources, since the jimage name does not // start with "/modules" (e.g. "/java.base/java/lang/Object.class"). ImageLocation loc = findLocation(name); if (loc != null) { assert name.equals(loc.getFullName()) : "Mismatched location for directory: " + name; - assert isModulesSubdirectory(loc) : "Invalid modules directory: " + name; - return completeModuleDirectory(newDirectory(name), loc); + assert loc.getType() == MODULES_DIR : "Invalid modules directory: " + name; + return ensureCached(completeModuleDirectory(newDirectory(name), loc)); } // Now try the non-prefixed resource name, but be careful to avoid false // positives for names like "/modules/modules/xxx" which could return a // location of a directory entry. - loc = findLocation(name.substring(MODULES_ROOT.length())); - return loc != null && isResource(loc) ? newResource(name, loc) : null; + loc = findLocation(name.substring(MODULES_PREFIX.length())); + return loc != null && loc.getType() == RESOURCE + ? ensureCached(newResource(name, loc)) + : null; } /** - * Builds a node in the "/packages/..." namespace. - * - *

    Called by {@link #findNode(String)} if a {@code /packages/...} node - * is not present in the cache. + * Returns whether a directory name in the "/modules/" directory could be referencing + * the "META-INF" directory". */ - private Node buildPackagesNode(String name) { - // There are only locations for the root "/packages" or "/packages/xxx" - // directories, but not the symbolic links below them (the links can be - // entirely derived from the name information in the parent directory). - // However, unlike resources this means that we do not have a constant - // time lookup for link nodes when creating them. - int packageStart = PACKAGES_ROOT.length() + 1; + private boolean isMetaInf(Directory dir) { + String name = dir.getName(); + int pathStart = name.indexOf('/', MODULES_PREFIX.length() + 1); + return name.length() == pathStart + "/META-INF".length() + && name.endsWith("/META-INF"); + } + + /** + * Returns whether a node name in the "/modules/" directory could be referencing + * a preview resource or directory under "META-INF/preview". + */ + private boolean isPreviewName(String name) { + int pathStart = name.indexOf('/', MODULES_PREFIX.length() + 1); + int previewEnd = pathStart + PREVIEW_INFIX.length(); + return pathStart > 0 + && name.regionMatches(pathStart, PREVIEW_INFIX, 0, PREVIEW_INFIX.length()) + && (name.length() == previewEnd || name.charAt(previewEnd) == '/'); + } + + private String getBaseName(ImageLocation loc) { + // Matches logic in ImageLocation#getFullName() regarding extensions. + String trailingParts = loc.getBase() + + ((loc.getExtensionOffset() != 0) ? "." + loc.getExtension() : ""); + return trailingParts.substring(trailingParts.lastIndexOf('/') + 1); + } + + /** + * Builds a link node of the form "/packages/xxx/yyy". + * + *

    Called by {@link #findNode(String)} if a {@code /packages/...} + * node is not present in the cache (the name is not trusted). + */ + private Node buildAndCacheLinkNode(String name) { + // There are only locations for "/packages" or "/packages/xxx" + // directories, but not the symbolic links below them (links are + // derived from the name information in the parent directory). + int packageStart = PACKAGES_PREFIX.length() + 1; int packageEnd = name.indexOf('/', packageStart); - if (packageEnd == -1) { - ImageLocation loc = findLocation(name); - return loc != null ? completePackageDirectory(newDirectory(name), loc) : null; - } else { - // We cannot assume that the parent directory exists for a link node, since - // the given name is untrusted and could reference a non-existent link. - // However, if the parent directory is present, we can conclude that the - // given name was not a valid link (or else it would already be cached). + // We already built the 2-level "/packages/xxx" directories, + // so if this is a 2-level name, it cannot reference a node. + if (packageEnd >= 0) { String dirName = name.substring(0, packageEnd); - if (!nodes.containsKey(dirName)) { - ImageLocation loc = findLocation(dirName); - // If the parent location doesn't exist, the link node cannot exist. - if (loc != null) { - nodes.put(dirName, completePackageDirectory(newDirectory(dirName), loc)); - // When the parent is created its child nodes are created and cached, - // but this can still return null if given name wasn't a valid link. - return nodes.get(name); + // If no parent exists here, the name cannot be valid. + Directory parent = (Directory) nodes.get(dirName); + if (parent != null) { + if (!parent.isCompleted()) { + // This caches all child links of the parent directory. + completePackageSubdirectory(parent, findLocation(dirName)); } + return nodes.get(name); } } return null; @@ -448,127 +632,125 @@ public final class ImageReader implements AutoCloseable { // Since the node exists, we can assert that its name starts with // either "/modules" or "/packages", making differentiation easy. // It also means that the name is valid, so it must yield a location. - assert name.startsWith(MODULES_ROOT) || name.startsWith(PACKAGES_ROOT); + assert name.startsWith(MODULES_PREFIX) || name.startsWith(PACKAGES_PREFIX); ImageLocation loc = findLocation(name); assert loc != null && name.equals(loc.getFullName()) : "Invalid location for name: " + name; - // We cannot use 'isXxxSubdirectory()' methods here since we could - // be given a top-level directory (for which that test doesn't work). - // The string MUST start "/modules" or "/packages" here. - if (name.charAt(1) == 'm') { + LocationType type = loc.getType(); + if (type == MODULES_DIR || type == MODULES_ROOT) { completeModuleDirectory(dir, loc); } else { - completePackageDirectory(dir, loc); + assert type == PACKAGES_DIR : "Invalid location type: " + loc; + completePackageSubdirectory(dir, loc); } assert dir.isCompleted() : "Directory must be complete by now: " + dir; } - /** - * Completes a modules directory by setting the list of child nodes. - * - *

    The given directory can be the top level {@code /modules} directory, - * so it is NOT safe to use {@code isModulesSubdirectory(loc)} here. - */ + /** Completes a modules directory by setting the list of child nodes. */ private Directory completeModuleDirectory(Directory dir, ImageLocation loc) { assert dir.getName().equals(loc.getFullName()) : "Mismatched location for directory: " + dir; - List children = createChildNodes(loc, childLoc -> { - if (isModulesSubdirectory(childLoc)) { - return nodes.computeIfAbsent(childLoc.getFullName(), this::newDirectory); + List previewOnlyNodes = getPreviewNodesToMerge(dir); + // We hide preview names from direct lookup, but must also prevent + // the preview directory from appearing in any META-INF directories. + boolean parentIsMetaInfDir = isMetaInf(dir); + List children = createChildNodes(loc, previewOnlyNodes.size(), childLoc -> { + LocationType type = childLoc.getType(); + if (type == MODULES_DIR) { + String name = childLoc.getFullName(); + return parentIsMetaInfDir && name.endsWith("/preview") + ? null + : nodes.computeIfAbsent(name, this::newDirectory); } else { + assert type == RESOURCE : "Invalid location type: " + loc; // Add "/modules" prefix to image location paths to get node names. String resourceName = childLoc.getFullName(true); return nodes.computeIfAbsent(resourceName, n -> newResource(n, childLoc)); } }); + children.addAll(previewOnlyNodes); dir.setChildren(children); return dir; } - /** - * Completes a package directory by setting the list of child nodes. - * - *

    The given directory can be the top level {@code /packages} directory, - * so it is NOT safe to use {@code isPackagesSubdirectory(loc)} here. - */ - private Directory completePackageDirectory(Directory dir, ImageLocation loc) { + /** Completes a package directory by setting the list of child nodes. */ + private void completePackageSubdirectory(Directory dir, ImageLocation loc) { assert dir.getName().equals(loc.getFullName()) : "Mismatched location for directory: " + dir; - // The only directories in the "/packages" namespace are "/packages" or - // "/packages/". However, unlike "/modules" directories, the - // location offsets mean different things. - List children; - if (dir.getName().equals(PACKAGES_ROOT)) { - // Top-level directory just contains a list of subdirectories. - children = createChildNodes(loc, c -> nodes.computeIfAbsent(c.getFullName(), this::newDirectory)); - } else { - // A package directory's content is array of offset PAIRS in the - // Strings table, but we only need the 2nd value of each pair. - IntBuffer intBuffer = getOffsetBuffer(loc); - int offsetCount = intBuffer.capacity(); - assert (offsetCount & 0x1) == 0 : "Offset count must be even: " + offsetCount; - children = new ArrayList<>(offsetCount / 2); - // Iterate the 2nd offset in each pair (odd indices). - for (int i = 1; i < offsetCount; i += 2) { - String moduleName = getString(intBuffer.get(i)); - children.add(nodes.computeIfAbsent( - dir.getName() + "/" + moduleName, - n -> newLinkNode(n, MODULES_ROOT + "/" + moduleName))); + assert !dir.isCompleted() : "Directory already completed: " + dir; + assert loc.getType() == PACKAGES_DIR : "Invalid location type: " + loc.getType(); + + // In non-preview mode we might skip a very small number of preview-only + // entries, but it's not worth "right-sizing" the array for that. + IntBuffer offsets = getOffsetBuffer(loc); + List children = new ArrayList<>(offsets.capacity() / 2); + ModuleLink.readNameOffsets(offsets, /*normal*/ true, isPreviewEnabled) + .forEachRemaining(n -> { + String modName = getString(n); + Node link = newLinkNode(dir.getName() + "/" + modName, MODULES_PREFIX + "/" + modName); + children.add(ensureCached(link)); + }); + // If the parent directory exists, there must be at least one child node. + assert !children.isEmpty() : "Invalid empty package directory: " + dir; + dir.setChildren(children); + } + + /** + * Returns the list of child preview nodes to be merged into the given directory. + * + *

    Because this is only called once per-directory (since the result is cached + * indefinitely) we can remove any entries we find from the cache. If ever the + * node cache allowed entries to expire, this would have to be changed so that + * directories could be completed more than once. + */ + List getPreviewNodesToMerge(Directory dir) { + if (previewDirectoriesToMerge != null) { + Directory mergeDir = previewDirectoriesToMerge.remove(dir.getName()); + if (mergeDir != null) { + return mergeDir.children; } } - // This only happens once and "completes" the directory. - dir.setChildren(children); - return dir; + return Collections.emptyList(); } /** - * Creates the list of child nodes for a {@code Directory} based on a given + * Creates the list of child nodes for a modules {@code Directory} from + * its parent location. * - *

    Note: This cannot be used for package subdirectories as they have - * child offsets stored differently to other directories. + *

    The {@code getChildFn} may return existing cached nodes rather + * than creating them, and if newly created nodes are to be cached, + * it is the job of {@code getChildFn}, or the caller of this method, + * to do that. + * + * @param loc a location relating to a "/modules" directory. + * @param extraNodesCount a known number of preview-only child nodes + * which will be merged onto the end of the returned list later. + * @param getChildFn a function to return a node for each child location + * (or null to skip putting anything in the list). + * @return the list of the non-null child nodes, returned by + * {@code getChildFn}, in the order of the locations entries. */ - private List createChildNodes(ImageLocation loc, Function newChildFn) { + private List createChildNodes(ImageLocation loc, int extraNodesCount, Function getChildFn) { + LocationType type = loc.getType(); + assert type == MODULES_DIR || type == MODULES_ROOT : "Invalid location type: " + loc; IntBuffer offsets = getOffsetBuffer(loc); int childCount = offsets.capacity(); - List children = new ArrayList<>(childCount); + List children = new ArrayList<>(childCount + extraNodesCount); for (int i = 0; i < childCount; i++) { - children.add(newChildFn.apply(getLocation(offsets.get(i)))); + Node childNode = getChildFn.apply(getLocation(offsets.get(i))); + if (childNode != null) { + children.add(childNode); + } } return children; } /** Helper to extract the integer offset buffer from a directory location. */ private IntBuffer getOffsetBuffer(ImageLocation dir) { - assert !isResource(dir) : "Not a directory: " + dir.getFullName(); + assert dir.getType() != RESOURCE : "Not a directory: " + dir.getFullName(); byte[] offsets = getResource(dir); ByteBuffer buffer = ByteBuffer.wrap(offsets); buffer.order(getByteOrder()); return buffer.asIntBuffer(); } - /** - * Efficiently determines if an image location is a resource. - * - *

    A resource must have a valid module associated with it, so its - * module offset must be non-zero, and not equal to the offsets for - * "/modules/..." or "/packages/..." entries. - */ - private boolean isResource(ImageLocation loc) { - int moduleOffset = loc.getModuleOffset(); - return moduleOffset != 0 - && moduleOffset != modulesStringOffset - && moduleOffset != packagesStringOffset; - } - - /** - * Determines if an image location is a directory in the {@code /modules} - * namespace (if so, the location name is the node name). - * - *

    In jimage, every {@code ImageLocation} under {@code /modules/} is a - * directory and has the same value for {@code getModule()}, and {@code - * getModuleOffset()}. - */ - private boolean isModulesSubdirectory(ImageLocation loc) { - return loc.getModuleOffset() == modulesStringOffset; - } - /** * Creates an "incomplete" directory node with no child nodes set. * Directories need to be "completed" before they are returned by @@ -584,7 +766,6 @@ public final class ImageReader implements AutoCloseable { * In image files, resource locations are NOT prefixed by {@code /modules}. */ private Resource newResource(String name, ImageLocation loc) { - assert name.equals(loc.getFullName(true)) : "Mismatched location for resource: " + name; return new Resource(name, loc, imageFileAttributes); } @@ -816,7 +997,7 @@ public final class ImageReader implements AutoCloseable { throw new IllegalStateException("Cannot get child nodes of an incomplete directory: " + getName()); } - private void setChildren(List children) { + private void setChildren(List children) { assert this.children == null : this + ": Cannot set child nodes twice!"; this.children = Collections.unmodifiableList(children); } diff --git a/src/java.base/share/classes/jdk/internal/jimage/ImageStrings.java b/src/java.base/share/classes/jdk/internal/jimage/ImageStrings.java index eea62e444de..9cd1e662d64 100644 --- a/src/java.base/share/classes/jdk/internal/jimage/ImageStrings.java +++ b/src/java.base/share/classes/jdk/internal/jimage/ImageStrings.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2021, 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 @@ -33,6 +33,23 @@ package jdk.internal.jimage; * to the jimage file provided by the shipped JDK by tools running on JDK 8. */ public interface ImageStrings { + // String offset constants are useful for efficient classification + // of location entries without string comparison. + // They are validated during initialization of ImageStringsWriter. + // + // Adding new strings (with larger offsets) is possible without changing + // the jimage version number, but any change to existing strings must be + // accompanied by a jimage version number change. + + /** Fixed offset for the empty string in the strings table. */ + int EMPTY_STRING_OFFSET = 0; + /** Fixed offset for the string "class" in the strings table. */ + int CLASS_STRING_OFFSET = 1; + /** Fixed offset for the string "modules" in the strings table. */ + int MODULES_STRING_OFFSET = 7; + /** Fixed offset for the string "packages" in the strings table. */ + int PACKAGES_STRING_OFFSET = 15; + String get(int offset); int add(final String string); diff --git a/src/java.base/share/classes/jdk/internal/jimage/ModuleLink.java b/src/java.base/share/classes/jdk/internal/jimage/ModuleLink.java new file mode 100644 index 00000000000..57224906179 --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/jimage/ModuleLink.java @@ -0,0 +1,290 @@ +/* + * 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 jdk.internal.jimage; + +import java.nio.IntBuffer; +import java.util.Comparator; +import java.util.Iterator; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.function.Function; + +/** + * Represents links to modules stored in the buffer of {@code "/packages/xxx"} + * image locations (package subdirectories). + * + *

    Package subdirectories store their data differently to all other jimage + * entries. Instead of storing a sequence of offsets to their child entries, + * they store a flattened representation of the child's data in an interleaved + * buffer. These entries also use flags which are similar to, but distinct from, + * the {@link ImageLocation} flags. + * + *

    This class encapsulates that complexity to help avoid confusion. + * + * @implNote This class needs to maintain JDK 8 source compatibility. + * + * It is used internally in the JDK to implement jimage/jrtfs access, + * but also compiled and delivered as part of the jrtfs.jar to support access + * to the jimage file provided by the shipped JDK by tools running on JDK 8. + */ +public final class ModuleLink implements Comparable { + // These flags are additive (hence "has-content" rather than "is-empty"). + + /** If set, this package exists in preview mode. */ + private static final int FLAGS_PKG_HAS_PREVIEW_VERSION = 0x1; + /** If set, this package exists in non-preview mode. */ + private static final int FLAGS_PKG_HAS_NORMAL_VERSION = 0x2; + /** If set, the associated module has resources (in normal or preview mode). */ + private static final int FLAGS_PKG_HAS_RESOURCES = 0x4; + + /** + * Links are ordered with preview versions first, which permits early + * exit when processing preview entries (it's reversed because the default + * order for a boolean is {@code false < true}). + */ + private static final Comparator PREVIEW_FIRST = + Comparator.comparing(ModuleLink::hasPreviewVersion).reversed() + .thenComparing(ModuleLink::name); + + /** + * Returns a link for non-empty packages (those with resources) in a + * given module. + * + *

    The same link can be used for multiple packages in the same module. + * + * @param moduleName the name of the module in which this package exits. + * @param isPreview whether the associated package is defined for preview mode. + */ + public static ModuleLink forPackage(String moduleName, boolean isPreview) { + return new ModuleLink(moduleName, FLAGS_PKG_HAS_RESOURCES | previewFlag(isPreview)); + } + + /** + * Returns a link for empty packages in a given module. + * + *

    The same link can be used for multiple packages in the same module. + * + * @param moduleName the name of the module in which this package exits. + * @param isPreview whether the associated package is defined for preview mode. + */ + public static ModuleLink forEmptyPackage(String moduleName, boolean isPreview) { + return new ModuleLink(moduleName, previewFlag(isPreview)); + } + + /** + * Returns the appropriate FLAGS_PKG_HAS_XXX_VERSION constant according to + * whether the associated package is defined for preview mode. + */ + private static int previewFlag(boolean isPreview) { + return isPreview ? FLAGS_PKG_HAS_PREVIEW_VERSION : FLAGS_PKG_HAS_NORMAL_VERSION; + } + + /** Merges two links for the same module (combining their flags). */ + public ModuleLink merge(ModuleLink other) { + if (!name.equals(other.name)) { + throw new IllegalArgumentException("Cannot merge " + other + " with " + this); + } + // Because flags are additive, we can just OR them here. + return new ModuleLink(name, flags | other.flags); + } + + private final String name; + private final int flags; + + private ModuleLink(String moduleName, int flags) { + this.name = Objects.requireNonNull(moduleName); + this.flags = flags; + } + + /** Returns the module name of this link. */ + public String name() { + return name; + } + + /** + * Returns whether the package associated with this link contains resources + * in its module. + * + *

    An invariant of the module system is that while a package may exist + * under many modules, it only has resources in one. + */ + public boolean hasResources() { + return (flags & FLAGS_PKG_HAS_RESOURCES) != 0; + } + + /** + * Returns whether the package associated with this module link has a + * preview version (empty or otherwise) in this link's module. + */ + public boolean hasPreviewVersion() { + return (flags & FLAGS_PKG_HAS_PREVIEW_VERSION) != 0; + } + + /** Returns whether this module link exists only in preview mode. */ + public boolean isPreviewOnly() { + return (flags & FLAGS_PKG_HAS_NORMAL_VERSION) == 0; + } + + @Override + public int compareTo(ModuleLink rhs) { + return PREVIEW_FIRST.compare(this, rhs); + } + + @Override + public String toString() { + return "ModuleLink{ module=" + name + ", flags=" + flags + " }"; + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ModuleLink)) { + return false; + } + ModuleLink other = (ModuleLink) obj; + return name.equals(other.name) && flags == other.flags; + } + + @Override + public int hashCode() { + return Objects.hash(name, flags); + } + + /** + * Reads the content buffer of a package subdirectory to return a sequence + * of module name offsets in the jimage. + * + *

    Package subdirectories store their entries using pairs of integers in + * an interleaved buffer: + *

    +     *     ...
    +     *     [ entry-N flags ]
    +     *     [ entry-N name offset ]
    +     *     [ entry-(N+1) flags ]
    +     *     [ entry-(N+1) name offset ]
    +     *     ...
    +     * 
    + * + *

    Entry flags control whether an entry name should be included by the + * returned iterator, depending on the given include-flags. + * + * @param buffer the content buffer of an {@link ImageLocation} with type + * {@link ImageLocation.LocationType#PACKAGES_DIR PACKAGES_DIR}. + * @param includeNormal whether to include name offsets for modules present + * in normal (non-preview) mode. + * @param includePreview whether to include name offsets for modules present + * in preview mode. + * @return an iterator of module name offsets. + */ + public static Iterator readNameOffsets( + IntBuffer buffer, boolean includeNormal, boolean includePreview) { + int bufferSize = buffer.capacity(); + if (bufferSize == 0 || (bufferSize & 0x1) != 0) { + throw new IllegalArgumentException("Invalid buffer size"); + } + int includeMask = (includeNormal ? FLAGS_PKG_HAS_NORMAL_VERSION : 0) + + (includePreview ? FLAGS_PKG_HAS_PREVIEW_VERSION : 0); + if (includeMask == 0) { + throw new IllegalArgumentException("Invalid flags"); + } + + return new Iterator() { + private int idx = nextIdx(0); + + int nextIdx(int idx) { + for (; idx < bufferSize; idx += 2) { + // If any of the test flags are set, include this entry. + if ((buffer.get(idx) & includeMask) != 0) { + return idx; + } else if (!includeNormal) { + // Preview entries are first in the offset buffer, so we + // can exit early (by returning the end index) if we are + // only iterating preview entries, and have run out. + break; + } + } + return bufferSize; + } + + @Override + public boolean hasNext() { + return idx < bufferSize; + } + + @Override + public Integer next() { + if (idx < bufferSize) { + int nameOffset = buffer.get(idx + 1); + idx = nextIdx(idx + 2); + return nameOffset; + } + throw new NoSuchElementException(); + } + }; + } + + /** + * Writes a list of module links to a given buffer. The given entry list is + * checked carefully to ensure the written buffer will be valid. + * + *

    Entries are written in order, taking two integer slots per entry as + * {@code [, ]}. + * + * @param links the module links to write, correctly ordered. + * @param buffer destination buffer. + * @param nameEncoder encoder for module names. + * @throws IllegalArgumentException in the link entries are invalid in any way. + */ + public static void write( + List links, IntBuffer buffer, Function nameEncoder) { + if (links.isEmpty()) { + throw new IllegalArgumentException("References list must be non-empty"); + } + int expectedCapacity = 2 * links.size(); + if (buffer.capacity() != expectedCapacity) { + throw new IllegalArgumentException( + "Invalid buffer capacity: expected " + expectedCapacity + ", got " + buffer.capacity()); + } + // This catches exact duplicates in the list. + links.stream().reduce((lhs, rhs) -> { + if (lhs.compareTo(rhs) >= 0) { + throw new IllegalArgumentException("References must be strictly ordered: " + links); + } + return rhs; + }); + // Distinct references can have the same name (but we don't allow this). + if (links.stream().map(ModuleLink::name).distinct().count() != links.size()) { + throw new IllegalArgumentException("Module links names must be unique: " + links); + } + if (links.stream().filter(ModuleLink::hasResources).count() > 1) { + throw new IllegalArgumentException("At most one module link can have resources: " + links); + } + for (ModuleLink link : links) { + buffer.put(link.flags); + buffer.put(nameEncoder.apply(link.name)); + } + } +} diff --git a/src/java.base/share/classes/jdk/internal/jimage/PreviewMode.java b/src/java.base/share/classes/jdk/internal/jimage/PreviewMode.java new file mode 100644 index 00000000000..dd273494b15 --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/jimage/PreviewMode.java @@ -0,0 +1,86 @@ +/* + * 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 jdk.internal.jimage; + +import java.lang.reflect.InvocationTargetException; + +/** + * Specifies the preview mode used to open a jimage file via {@link ImageReader}. + * + * @implNote This class needs to maintain JDK 8 source compatibility. + * + * It is used internally in the JDK to implement jimage/jrtfs access, + * but also compiled and delivered as part of the jrtfs.jar to support access + * to the jimage file provided by the shipped JDK by tools running on JDK 8. + * */ +public enum PreviewMode { + /** + * Preview mode is disabled. No preview classes or resources will be available + * in this mode. + */ + DISABLED, + /** + * Preview mode is enabled. If preview classes or resources exist in the jimage file, + * they will be made available. + */ + ENABLED, + /** + * The preview mode of the current run-time, typically determined by the + * {@code --enable-preview} flag. + */ + FOR_RUNTIME; + + /** + * Resolves whether preview mode should be enabled for an {@link ImageReader}. + */ + public boolean isPreviewModeEnabled() { + // A switch, instead of an abstract method, saves 3 subclasses. + switch (this) { + case DISABLED: + return false; + case ENABLED: + return true; + case FOR_RUNTIME: + // We want to call jdk.internal.misc.PreviewFeatures.isEnabled(), but + // is not available in older JREs, so we must look to it reflectively. + Class clazz; + try { + clazz = Class.forName("jdk.internal.misc.PreviewFeatures"); + } catch (ClassNotFoundException e) { + // It is valid and expected that the class might not exist (JDK-8). + return false; + } + try { + return (Boolean) clazz.getDeclaredMethod("isEnabled").invoke(null); + } catch (NoSuchMethodException | IllegalAccessException | + InvocationTargetException e) { + // But if the class exists, the method must exist and be callable. + throw new InternalError(e); + } + default: + throw new IllegalStateException("Invalid mode: " + this); + } + } +} diff --git a/src/java.base/share/classes/jdk/internal/jimage/ResourceEntries.java b/src/java.base/share/classes/jdk/internal/jimage/ResourceEntries.java new file mode 100644 index 00000000000..18b3675d399 --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/jimage/ResourceEntries.java @@ -0,0 +1,73 @@ +/* + * 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 jdk.internal.jimage; + +import java.util.stream.Stream; + +/** + * Accesses the underlying resource entries in a jimage file. + * + *

    This is a special-case API designed only for use by the jlink tool, + * which read the raw jimage files. It is not the correct API for accessing + * jimage resources at runtime. + * + *

    This API ignores the {@code previewMode} of the {@link ImageReader} from + * which it is obtained, and returns an unmapped view of entries (e.g. allowing + * for direct access of resources in the {@code META-INF/preview/...} namespace). + * + *

    It disallows access to resource directories (i.e. {@code "/modules/..."}) + * or packages entries (i.e. {@code "/packages/..."}). + * + *

    Use the {@link ImageReader} API to correctly account for preview mode at + * runtime. + * + * @implNote This class needs to maintain JDK 8 source compatibility. + * + * It is used internally in the JDK to implement jimage/jrtfs access, + * but also compiled and delivered as part of the jrtfs.jar to support access + * to the jimage file provided by the shipped JDK by tools running on JDK 8. + */ +public interface ResourceEntries { + /** + * Returns the jimage names for all resources in the given module, in + * random order. Entry names will always be prefixed by the given module + * name (e.g. {@code "//..."}). + */ + Stream getEntryNames(String module); + + /** + * Returns the (uncompressed) size of a resource given its jimage name. + * + * @throws java.util.NoSuchElementException if the resource does not exist. + */ + long getSize(String name); + + /** + * Returns a copy of a resource's content given its jimage name. + * + * @throws java.util.NoSuchElementException if the resource does not exist. + */ + byte[] getBytes(String name); +} diff --git a/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java b/src/java.base/share/classes/jdk/internal/jimage/SystemImageReader.java similarity index 57% rename from src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java rename to src/java.base/share/classes/jdk/internal/jimage/SystemImageReader.java index 2ecec20d6f9..87f301c8ba8 100644 --- a/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java +++ b/src/java.base/share/classes/jdk/internal/jimage/SystemImageReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, 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 @@ -29,14 +29,9 @@ import java.io.IOException; import java.io.UncheckedIOException; import java.nio.file.FileSystem; import java.nio.file.FileSystems; -import java.nio.file.Path; -import java.util.concurrent.ConcurrentHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; /** - * Factory to get ImageReader + * Static holder class for singleton {@link ImageReader} instance. * * @implNote This class needs to maintain JDK 8 source compatibility. * @@ -44,15 +39,13 @@ import java.util.function.Function; * but also compiled and delivered as part of the jrtfs.jar to support access * to the jimage file provided by the shipped JDK by tools running on JDK 8. */ -public class ImageReaderFactory { - private ImageReaderFactory() {} - - private static final String JAVA_HOME = System.getProperty("java.home"); - private static final Path BOOT_MODULES_JIMAGE; +public class SystemImageReader { + private static final ImageReader SYSTEM_IMAGE_READER; static { + String javaHome = System.getProperty("java.home"); FileSystem fs; - if (ImageReaderFactory.class.getClassLoader() == null) { + if (SystemImageReader.class.getClassLoader() == null) { try { fs = (FileSystem) Class.forName("sun.nio.fs.DefaultFileSystemProvider") .getMethod("theFileSystem") @@ -63,44 +56,32 @@ public class ImageReaderFactory { } else { fs = FileSystems.getDefault(); } - BOOT_MODULES_JIMAGE = fs.getPath(JAVA_HOME, "lib", "modules"); - } - - private static final Map readers = new ConcurrentHashMap<>(); - - /** - * Returns an {@code ImageReader} to read from the given image file - */ - public static ImageReader get(Path jimage) throws IOException { - Objects.requireNonNull(jimage); try { - return readers.computeIfAbsent(jimage, OPENER); - } catch (UncheckedIOException io) { - throw io.getCause(); + SYSTEM_IMAGE_READER = ImageReader.open(fs.getPath(javaHome, "lib", "modules"), PreviewMode.FOR_RUNTIME); + } catch (IOException e) { + throw new ExceptionInInitializerError(e); } } - private static Function OPENER = new Function() { - public ImageReader apply(Path path) { - try { - return ImageReader.open(path); - } catch (IOException io) { - throw new UncheckedIOException(io); - } - } - }; - /** - * Returns the {@code ImageReader} to read the image file in this - * run-time image. + * Returns the singleton {@code ImageReader} to read the image file in this + * run-time image. The returned instance must not be closed. * * @throws UncheckedIOException if an I/O error occurs */ - public static ImageReader getImageReader() { - try { - return get(BOOT_MODULES_JIMAGE); - } catch (IOException ioe) { - throw new UncheckedIOException(ioe); - } + public static ImageReader get() { + return SYSTEM_IMAGE_READER; } + + /** + * Returns the "raw" API for accessing underlying jimage resource entries. + * + *

    This is only meaningful for use by code dealing directly with jimage + * files, and cannot be used to reliably lookup resources used at runtime. + */ + public static ResourceEntries getResourceEntries() { + return get().getResourceEntries(); + } + + private SystemImageReader() {} } diff --git a/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java b/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java index c405801506f..4cd47413bd0 100644 --- a/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java +++ b/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystem.java @@ -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 @@ -63,6 +63,7 @@ import java.util.Objects; import java.util.Set; import java.util.regex.Pattern; import jdk.internal.jimage.ImageReader.Node; +import jdk.internal.jimage.PreviewMode; /** * jrt file system implementation built on System jimage files. @@ -85,7 +86,8 @@ class JrtFileSystem extends FileSystem { throws IOException { this.provider = provider; - this.image = SystemImage.open(); // open image file + // TODO: Obtain and pass correct preview mode flag value here. + this.image = SystemImage.open(PreviewMode.DISABLED); // open image file this.isOpen = true; this.isClosable = env != null; } diff --git a/src/java.base/share/classes/jdk/internal/jrtfs/SystemImage.java b/src/java.base/share/classes/jdk/internal/jrtfs/SystemImage.java index b38e953a5f9..560e4942a17 100644 --- a/src/java.base/share/classes/jdk/internal/jrtfs/SystemImage.java +++ b/src/java.base/share/classes/jdk/internal/jrtfs/SystemImage.java @@ -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 @@ -39,6 +39,7 @@ import java.security.PrivilegedAction; import jdk.internal.jimage.ImageReader; import jdk.internal.jimage.ImageReader.Node; +import jdk.internal.jimage.PreviewMode; /** * @implNote This class needs to maintain JDK 8 source compatibility. @@ -47,35 +48,49 @@ import jdk.internal.jimage.ImageReader.Node; * but also compiled and delivered as part of the jrtfs.jar to support access * to the jimage file provided by the shipped JDK by tools running on JDK 8. */ -@SuppressWarnings({ "removal", "suppression"} ) -abstract class SystemImage { +@SuppressWarnings({"removal", "suppression"}) +public abstract class SystemImage implements AutoCloseable { - abstract Node findNode(String path) throws IOException; - abstract byte[] getResource(Node node) throws IOException; - abstract void close() throws IOException; + public abstract Node findNode(String path) throws IOException; + public abstract byte[] getResource(Node node) throws IOException; + public abstract void close() throws IOException; - static SystemImage open() throws IOException { - if (modulesImageExists) { - // open a .jimage and build directory structure - final ImageReader image = ImageReader.open(moduleImageFile); - return new SystemImage() { - @Override - Node findNode(String path) throws IOException { - return image.findNode(path); - } - @Override - byte[] getResource(Node node) throws IOException { - return image.getResource(node); - } - @Override - void close() throws IOException { - image.close(); - } - }; + /** + * Opens the system image for the current runtime. + * + * @param mode determines whether preview mode should be enabled. + * @return a new system image based on either the jimage file or an "exploded" + * modules directory, according to the build state. + */ + public static SystemImage open(PreviewMode mode) throws IOException { + return modulesImageExists ? fromJimage(moduleImageFile, mode) : fromDirectory(explodedModulesDir, mode); + } + + /** Internal factory method for testing only, use {@link SystemImage#open(PreviewMode)}. */ + public static SystemImage fromJimage(Path path, PreviewMode mode) throws IOException { + final ImageReader image = ImageReader.open(path, mode); + return new SystemImage() { + @Override + public Node findNode(String path) throws IOException { + return image.findNode(path); + } + @Override + public byte[] getResource(Node node) throws IOException { + return image.getResource(node); + } + @Override + public void close() throws IOException { + image.close(); + } + }; + } + + /** Internal factory method for testing only, use {@link SystemImage#open(PreviewMode)}. */ + public static SystemImage fromDirectory(Path modulesDir, PreviewMode mode) throws IOException { + if (!Files.isDirectory(modulesDir)) { + throw new FileSystemNotFoundException(modulesDir.toString()); } - if (Files.notExists(explodedModulesDir)) - throw new FileSystemNotFoundException(explodedModulesDir.toString()); - return new ExplodedImage(explodedModulesDir); + return new ExplodedImage(modulesDir); } private static final String RUNTIME_HOME; diff --git a/src/java.base/share/classes/jdk/internal/lang/LazyConstantImpl.java b/src/java.base/share/classes/jdk/internal/lang/LazyConstantImpl.java index 59d0174c4c9..e5a1dd62c11 100644 --- a/src/java.base/share/classes/jdk/internal/lang/LazyConstantImpl.java +++ b/src/java.base/share/classes/jdk/internal/lang/LazyConstantImpl.java @@ -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 @@ -30,6 +30,7 @@ import jdk.internal.vm.annotation.AOTSafeClassInitializer; import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.Stable; +import java.util.NoSuchElementException; import java.util.Objects; import java.util.function.Supplier; @@ -67,12 +68,13 @@ public final class LazyConstantImpl implements LazyConstant { // The field needs to be `volatile` as a lazy constant can be // created by one thread and computed by another thread. // After the function is successfully invoked, the field is set to - // `null` to allow the function to be collected. - @Stable - private volatile Supplier computingFunction; + // `null` to allow the function to be collected. If the function fails, the field is + // set to the fully qualified name of the exception class. We are not storing the + // exception class as that would have pinned the class loader of the exception. + private volatile Object computingFunctionOrExceptionType; private LazyConstantImpl(Supplier computingFunction) { - this.computingFunction = computingFunction; + this.computingFunctionOrExceptionType = computingFunction; } @ForceInline @@ -82,34 +84,53 @@ public final class LazyConstantImpl implements LazyConstant { return (t != null) ? t : getSlowPath(); } + @SuppressWarnings("unchecked") private T getSlowPath() { preventReentry(); synchronized (this) { T t = getAcquire(); if (t == null) { - t = computingFunction.get(); - Objects.requireNonNull(t); - setRelease(t); - // Allow the underlying supplier to be collected after successful use - computingFunction = null; + switch (computingFunctionOrExceptionType) { + case Supplier computingFunction -> { + try { + @SuppressWarnings("unchecked") + final T newT = (T) computingFunction.get(); + t = newT; + Objects.requireNonNull(t); + setRelease(t); + // Allow the underlying supplier to be collected after + // a successful initialization + computingFunctionOrExceptionType = null; + } catch (Throwable ex) { + // Release the original computing function and replace it with + // an exception marker + final String exceptionType = ex.getClass().getName().intern(); + computingFunctionOrExceptionType = exceptionType; + throw unableToAccessConstant(exceptionType, ex); + } + } + case String exceptionType -> + throw unableToAccessConstant(exceptionType, null); + default -> + throw new InternalError("Cannot reach here"); + } } return t; } } + static NoSuchElementException unableToAccessConstant(String exceptionType, Throwable cause) { + return new NoSuchElementException("Unable to access the constant because " + + exceptionType + " was thrown at initial computation", cause); + } + + // For testing only @ForceInline - @Override public T orElse(T other) { final T t = getAcquire(); return (t == null) ? other : t; } - @ForceInline - @Override - public boolean isInitialized() { - return getAcquire() != null; - } - @Override public String toString() { return super.toString() + "[" + toStringSuffix() + "]"; @@ -121,16 +142,19 @@ public final class LazyConstantImpl implements LazyConstant { return "(this LazyConstant)"; } else if (t != null) { return t.toString(); + } else { + // Volatile read + final Object cf = computingFunctionOrExceptionType; + // There could be a race here + if (cf != null) { + return (cf instanceof Supplier supplier) + ? "computing function=" + isolateToString(supplier) + : "failed with=" + cf; + } + // As we know `computingFunction` is `null` or via a volatile read, we + // can now be sure that this lazy constant is initialized + return getAcquire().toString(); } - // Volatile read - final Supplier cf = computingFunction; - // There could be a race here - if (cf != null) { - return "computing function=" + computingFunction.toString(); - } - // As we know `computingFunction` is `null` via a volatile read, we - // can now be sure that this lazy constant is initialized - return getAcquire().toString(); } @@ -160,7 +184,16 @@ public final class LazyConstantImpl implements LazyConstant { private void preventReentry() { if (Thread.holdsLock(this)) { - throw new IllegalStateException("Recursive invocation of a LazyConstant's computing function: " + computingFunction); + throw new IllegalStateException("Recursive invocation of a LazyConstant's computing function: " + isolateToString(computingFunctionOrExceptionType)); + } + } + + public static String isolateToString(Object input) { + // Protect against user-controlled `input.toString` methods that might throw or recurse. + try { + return input.toString(); + } catch (Throwable t) { + return Objects.toIdentityString(input); } } diff --git a/src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java b/src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java index afebb89168c..565da646e28 100644 --- a/src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java +++ b/src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java @@ -54,7 +54,7 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; import jdk.internal.jimage.ImageReader; -import jdk.internal.jimage.ImageReaderFactory; +import jdk.internal.jimage.SystemImageReader; import jdk.internal.access.JavaNetUriAccess; import jdk.internal.access.SharedSecrets; import jdk.internal.util.StaticProperty; @@ -392,7 +392,7 @@ public final class SystemModuleFinders { * Holder class for the ImageReader. */ private static class SystemImage { - static final ImageReader READER = ImageReaderFactory.getImageReader(); + static final ImageReader READER = SystemImageReader.get(); static ImageReader reader() { return READER; } diff --git a/src/java.base/share/classes/jdk/internal/reflect/Reflection.java b/src/java.base/share/classes/jdk/internal/reflect/Reflection.java index d39fd9231da..d674c8e13c1 100644 --- a/src/java.base/share/classes/jdk/internal/reflect/Reflection.java +++ b/src/java.base/share/classes/jdk/internal/reflect/Reflection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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,6 @@ import java.util.Set; import jdk.internal.access.JavaLangAccess; import jdk.internal.access.SharedSecrets; import jdk.internal.misc.VM; -import jdk.internal.module.ModuleBootstrap; import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.IntrinsicCandidate; @@ -429,13 +428,41 @@ public class Reflection { } private static String msgSuffix(int modifiers) { - boolean packageAccess = - ((Modifier.PRIVATE | - Modifier.PROTECTED | - Modifier.PUBLIC) & modifiers) == 0; - return packageAccess ? - " with package access" : - " with modifiers \"" + Modifier.toString(modifiers) + "\""; + return " with " + accessControlStatus(modifiers) + " access"; + } + + /** + * Returns a display string for the access control modifier status. + * In particular, this prints "package-private" status. + * Reports upon an illegal modifier input. + * + * @param modifiers modifier input + * @return the display string + */ + public static String accessControlStatus(int modifiers) { + modifiers &= (Modifier.PRIVATE | Modifier.PROTECTED | Modifier.PUBLIC); + return switch (modifiers) { + case 0 -> "package-private"; + case Modifier.PUBLIC -> "public"; + case Modifier.PRIVATE -> "private"; + case Modifier.PROTECTED -> "protected"; + default -> "(illegal modifiers 0x%x)".formatted(modifiers); + }; + } + + /** + * Adds the public/protected/private access control modifiers to a display buffer. + * + * @param sb the buffer + * @param modifiers the modifiers + */ + public static void appendAccessControlModifiers(StringBuilder sb, int modifiers) { + if (Modifier.isPublic(modifiers)) + sb.append("public "); + if (Modifier.isProtected(modifiers)) + sb.append("protected "); + if (Modifier.isPrivate(modifiers)) + sb.append("private "); } /** diff --git a/src/java.base/share/classes/jdk/internal/vm/ThreadDumper.java b/src/java.base/share/classes/jdk/internal/vm/ThreadDumper.java index fa7d4bab076..63d2d300421 100644 --- a/src/java.base/share/classes/jdk/internal/vm/ThreadDumper.java +++ b/src/java.base/share/classes/jdk/internal/vm/ThreadDumper.java @@ -603,7 +603,7 @@ public class ThreadDumper { } @Override public void write(int b) { - if (max < count) { + if (count < max) { super.write(b); } } diff --git a/src/java.base/share/classes/jdk/internal/vm/ThreadSnapshot.java b/src/java.base/share/classes/jdk/internal/vm/ThreadSnapshot.java index e84027764f1..69370891688 100644 --- a/src/java.base/share/classes/jdk/internal/vm/ThreadSnapshot.java +++ b/src/java.base/share/classes/jdk/internal/vm/ThreadSnapshot.java @@ -32,7 +32,7 @@ import jdk.internal.access.SharedSecrets; /** * Represents a snapshot of information about a Thread. */ -class ThreadSnapshot { +public class ThreadSnapshot { private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess(); private static final StackTraceElement[] EMPTY_STACK = new StackTraceElement[0]; private static final ThreadLock[] EMPTY_LOCKS = new ThreadLock[0]; @@ -59,7 +59,7 @@ class ThreadSnapshot { * Take a snapshot of a Thread to get all information about the thread. * @return the snapshot or {@code null} if the thread is not alive */ - static ThreadSnapshot of(Thread thread) { + public static ThreadSnapshot of(Thread thread) { ThreadSnapshot snapshot = thread.isAlive() ? create(thread) : null; if (snapshot == null) { return null; // thread not alive diff --git a/src/java.base/share/classes/module-info.java b/src/java.base/share/classes/module-info.java index 665b3a3b98d..2bd5cce612b 100644 --- a/src/java.base/share/classes/module-info.java +++ b/src/java.base/share/classes/module-info.java @@ -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 @@ -60,6 +60,7 @@ * @uses java.text.spi.NumberFormatProvider * @uses java.time.chrono.AbstractChronology * @uses java.time.chrono.Chronology + * @uses java.time.format.DateTimeFormatterPatternProvider * @uses java.time.zone.ZoneRulesProvider * @uses java.util.spi.CalendarDataProvider * @uses java.util.spi.CalendarNameProvider @@ -380,6 +381,7 @@ module java.base { uses java.text.spi.NumberFormatProvider; uses java.time.chrono.AbstractChronology; uses java.time.chrono.Chronology; + uses java.time.format.DateTimeFormatterPatternProvider; uses java.time.zone.ZoneRulesProvider; uses java.util.spi.CalendarDataProvider; uses java.util.spi.CalendarNameProvider; @@ -395,7 +397,6 @@ module java.base { uses jdk.internal.io.JdkConsoleProvider; uses jdk.internal.logger.DefaultLoggerFinder; - uses sun.text.spi.JavaTimeDateTimePatternProvider; uses sun.util.spi.CalendarProvider; uses sun.util.locale.provider.LocaleDataMetaInfo; uses sun.util.resources.LocaleData.LocaleDataResourceBundleProvider; diff --git a/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java b/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java index ec768704f95..d9b27735bd5 100644 --- a/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java +++ b/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -143,7 +143,7 @@ public class VerifyAccess { assert (canAccess && refc == defc) || !canAccess; return canAccess; default: - throw new IllegalArgumentException("bad modifiers: "+Modifier.toString(mods)); + throw new IllegalArgumentException("bad modifiers: %04x".formatted(mods)); } } diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher.properties b/src/java.base/share/classes/sun/launcher/resources/launcher.properties index 739ef8b8a29..ddae0e1317c 100644 --- a/src/java.base/share/classes/sun/launcher/resources/launcher.properties +++ b/src/java.base/share/classes/sun/launcher/resources/launcher.properties @@ -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 @@ -197,8 +197,6 @@ java.launcher.X.usage=\n\ \ The actual size may be rounded up to a multiple of the\n\ \ system page size as required by the operating system.\n\ \ -Xverify sets the mode of the bytecode verifier\n\ -\ Note that option -Xverify:none is deprecated and\n\ -\ may be removed in a future release.\n\ \ --add-reads =(,)*\n\ \ updates to read , regardless\n\ \ of module declaration. \n\ diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties deleted file mode 100644 index 66270f21d4f..00000000000 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Translators please note do not translate the options themselves -java.launcher.opt.header = Sintaxis: {0} [opciones] [argumentos...]\n (para ejecutar una clase)\n o {0} [opciones] -jar [argumentos...]\n (para ejecutar un archivo jar)\n o {0} [opciones] -m [/] [argumentos...]\n {0} [opciones] --module [/] [argumentos...]\n (para ejecutar la clase principal en un módulo)\n\n Argumentos que siguen la clase principal, -jar , -m o --module\n / se transfieren como argumentos a una clase principal.\n\n donde las opciones incluyen:\n\n - -java.launcher.opt.vmselect =\ {0}\t para seleccionar la VM "{1}"\n -java.launcher.opt.hotspot =\ {0}\t es un sinónimo de la VM "{1}" [en desuso]\n - -# Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Una lista separada por el carácter {0}, archivos JAR\n y archivos ZIP para buscar archivos de clases.\n -p \n --module-path ...\n Una lista de directorios separada por el carácter {0}, cada directorio\n es un directorio de módulos.\n --upgrade-module-path ...\n Una lista de directorios separada por el carácter {0}, cada directorio\n es un directorio de módulos que sustituye a\n los módulos actualizables en la imagen de tiempo de ejecución\n --add-modules [,...]\n módulos de raíz que resolver, además del módulo inicial.\n también puede ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n mostrar módulos observables y salir\n -d \n --describe-module \n describir un módulo y salir\n --dry-run crear VM y cargar la clase principal pero sin ejecutar el método principal.\n La opción --dry-run puede ser útil para validar\n las opciones de línea de comandos, como la configuración del sistema de módulos.\n --validate-modules\n validar todos los módulos y salir\n La opción --validate-modules puede ser útil para encontrar\n conflictos y otros errores con módulos en la ruta de módulos.\n -D=\n definir una propiedad de sistema\n -verbose:[class|module|gc|jni]\n activar la salida en modo verbose\n -version imprimir versión de producto en el flujo de errores y salir\n --version imprimir versión de producto en el flujo de salida y salir\n -showversion imprimir versión de producto en el flujo de errores y continuar\n --show-version\n -showversion imprimir versión de producto en el flujo de salida y continuar\n --show-module-resolution\n mostrar la salida de resolución de módulo durante el inicio\n -? -h -help\n imprimir este mensaje de ayuda en el flujo de errores\n --help imprimir este mensaje de ayuda en el flujo de salida\n -X imprimir ayuda de opciones adicionales en el flujo de errores\n --help-extra imprimir ayuda de opciones adicionales en el flujo de salida\n -ea[:...|:]\n -enableassertions[:...|:]\n activar afirmaciones con una granularidad especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desactivar afirmaciones con una granularidad especificada\n -esa | -enablesystemassertions\n activar afirmaciones del sistema\n -dsa | -disablesystemassertions\n desactivar afirmaciones del sistema\n -agentlib:[=]\n cargar biblioteca de agente nativo , por ejemplo, -agentlib:jdwp\n ver también -agentlib:jdwp=help\n -agentpath:[=]\n cargar biblioteca de agente nativo por nombre completo de ruta\n -javaagent:[=]\n cargar agente de lenguaje de programación Java, ver java.lang.instrument\n -splash:\n \ - mostrar pantalla de presentación con imagen especificada\n Las imágenes a escala HiDPI están soportadas y se usan automáticamente\n si están disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n siempre debe transmitirse como el argumento para la opción -splash.\n La imagen a escala más adecuada que se haya proporcionado se escogerá\n automáticamente.\n Consulte la documentación de la API de la pantalla de presentación para obtener más información.\n @argument files\n uno o más archivos de argumentos que contienen opciones\n --disable-@files\n evitar una mayor expansión del archivo de argumentos\nPara especificar un argumento para una opción larga, puede usar --= o\n-- .\n - -# Translators please note do not translate the options themselves -java.launcher.X.usage=-Xbatch desactivar compilación de fondo\n -Xbootclasspath/a:\n agregar al final de la ruta de clase de inicialización de datos\n -Xcheck:jni realizar comprobaciones adicionales para las funciones de JNI\n -Xcomp fuerza la compilación de métodos en la primera llamada\n -Xdebug se proporciona para ofrecer compatibilidad con versiones anteriores\n -Xdiag mostrar mensajes de diagnóstico adicionales\n -Xfuture activar las comprobaciones más estrictas, anticipándose al futuro valor por defecto\n -Xint solo ejecución de modo interpretado\n -Xinternalversionn\n muestra información de la versión de JVM más detallada que la\n opción -version\n -Xloggc: registrar el estado de GC en un archivo con registros de hora\n -Xmixed ejecución de modo mixto (por defecto)\n -Xmn define el tamaño inicial y máximo (en bytes) de la pila\n para la generación más joven (incubadora)\n -Xms define el tamaño inicial de la pila de Java\n -Xmx define el tamaño máximo de la pila de Java\n -Xnoclassgc desactivar la recolección de basura de clases\n -Xrs reducir el uso de señales de sistema operativo por parte de Java/VM (consulte la documentación)\n -Xshare:auto usar datos de clase compartidos si es posible (valor por defecto)\n -Xshare:off no intentar usar datos de clase compartidos\n -Xshare:on es obligatorio el uso de datos de clase compartidos, de lo contrario se producirá un fallo.\n -XshowSettings mostrar toda la configuración y continuar\n -XshowSettings:all\n mostrar todos los valores y continuar\n -XshowSettings:locale\n mostrar todos los valores relacionados con la configuración regional y continuar\n -XshowSettings:properties\n mostrar todos los valores de propiedad y continuar\n -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n -Xss definir tamaño de la pila del thread de Java\n -Xverify define el modo del verificador de código de bytes\n --add-reads =(,)*\n actualiza para leer , independientemente\n de la declaración del módulo. \n puede ser ALL-UNNAMED para leer todos los\n módulos sin nombre.\n --add-exports /=(,)*\n actualiza para exportar en ,\n independientemente de la declaración del módulo.\n puede ser ALL-UNNAMED para exportar a todos los\n módulos sin nombre.\n --add-opens /=(,)*\n actualiza para abrir en\n , independientemente de la declaración del módulo.\n --illegal-access=\n permitir or denegar el acceso a miembros de tipos en módulos con nombre.\n por código en módulos sin nombre.\n es "denegar", "permitir", "advertir" o "depurar"\n Esta opción se eliminará en la próxima versión.\n --limit-modules [,...]\n \ - limitar el universo de módulos observables\n --patch-module =({0})*\n                      aumentar o anular un módulo con clases y recursos\n en directorios o archivos JAR\n\nEstas opciones están sujetas a cambio sin previo aviso. - -# Translators please note do not translate the options themselves -java.launcher.X.macosx.usage=\nLas siguientes opciones son específicas para Mac OS X:\n -XstartOnFirstThread\n ejecutar el método main() del primer thread (AppKit)\n -Xdock:name=\n sustituir al nombre por defecto de la aplicación que se muestra en el Dock\n -Xdock:icon=\n sustituir al icono por defecto que se muestra en el Dock\n\n - -java.launcher.cls.error1=Error: no se ha encontrado o cargado la clase principal {0}\nCausado por: {1}: {2} -java.launcher.cls.error2=Error: el método principal no es {0} en la clase {1}, defina el método principal del siguiente modo:\n public static void main(String[] args) -java.launcher.cls.error3=Error: el método principal debe devolver un valor del tipo void en la clase {0}, \ndefina el método principal del siguiente modo:\n public static void main(String[] args) -java.launcher.cls.error4=Error: no se ha encontrado el método principal en la clase {0}, defina el método principal del siguiente modo:\\n public static void main(String[] args)\\nde lo contrario, se deberá ampliar una clase de aplicación JavaFX {1} -java.launcher.cls.error5=Error: faltan los componentes de JavaFX runtime y son necesarios para ejecutar esta aplicación -java.launcher.cls.error6=Error: Se ha producido un error de enlace al cargar la clase principal {0}\n\t{1} -java.launcher.cls.error7=Error: no se ha podido inicializar la clase principal {0}\nCausado por: {1}: {2} -java.launcher.jar.error1=Error: se ha producido un error inesperado al intentar abrir el archivo {0} -java.launcher.jar.error2=no se ha encontrado el manifiesto en {0} -java.launcher.jar.error3=no hay ningún atributo de manifiesto principal en {0} -java.launcher.jar.error4=error al cargar el agente de java en {0} -java.launcher.init.error=error de inicialización -java.launcher.javafx.error1=Error: el método launchApplication de JavaFX tiene una firma que no es correcta.\\nSe debe declarar estático y devolver un valor de tipo nulo -java.launcher.module.error1=el módulo {0} no tiene ningún atributo MainClass, utilice -m / -java.launcher.module.error2=Error: no se ha encontrado o cargado la clase principal {0} en el módulo {1} -java.launcher.module.error3=Error: no se ha podido cargar la clase principal {0} del módulo {1}\n\t{2} -java.launcher.module.error4=No se ha encontrado {0} -java.launcher.module.error5=Error: no se ha podido inicializar la clase principal {0} del módulo {1}\nCausado por: {1}: {2} diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties deleted file mode 100644 index 09a4172189c..00000000000 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Translators please note do not translate the options themselves -java.launcher.opt.header = Syntaxe : {0} [options] [args...]\n (pour exécuter une classe)\n ou {0} [options] -jar [args...]\n (pour exécuter un fichier JAR)\n ou {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (pour exécuter la classe principale dans un module)\n\n Les arguments suivant la classe principale -jar , -m ou --module\n / sont transmis en tant qu''arguments à la classe principale.\n\n où options comprend les éléments suivants :\n\n - -java.launcher.opt.vmselect =\ {0}\t pour sélectionner la machine virtuelle "{1}"\n -java.launcher.opt.hotspot =\ {0}\t est un synonyme pour la machine virtuelle "{1}" [en phase d''abandon]\n - -# Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Liste, avec séparateur {0}, de répertoires, d''archives JAR\n et d'archives ZIP pour rechercher des fichiers de classe.\n -p \n --module-path ...\n Liste, avec séparateur {0}, de répertoires, chaque répertoire\n est un répertoire de modules.\n --upgrade-module-path ...\n Liste, avec séparateur {0}, de répertoires, chaque répertoire\n est un répertoire de module qui remplace les modules\n pouvant être mis à niveau dans l'image d'exécution\n --add-modules [,...]\n modules racine à résoudre en plus du module initial.\n peut également être ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n répertorier les modules observables et quitter\n -d \n --describe-module \n décrire un module et quitter\n --dry-run créer une machine virtuelle et charger la classe principale mais ne pas exécuter la méthode principale.\n L'option--dry-run peut être utile pour la validation des\n options de ligne de commande telles que la configuration du système de modules.\n --validate-modules\n valider tous les modules et quitter\n L'option --validate-modules peut être utile pour la recherche de\n conflits et d'autres erreurs avec des modules dans le chemin de modules.\n -D=\n définir une propriété système\n -verbose:[class|module|gc|jni]\n activer la sortie en mode verbose\n -version afficher la version de produit dans le flux d'erreur et quitter\n --version afficher la version de produit dans le flux de sortie et quitter\n -showversion afficher la version de produit dans le flux d'erreur et continuer\n --show-version\n afficher la version de produit dans le flux de sortie et continuer\n --show-module-resolution\n afficher la sortie de résolution de module lors du démarrage\n -? -h -help\n afficher ce message d'aide dans le flux d'erreur\n --help afficher ce message d'erreur dans le flux de sortie\n -X afficher l'aide sur des options supplémentaires dans le flux d'erreur\n --help-extra afficher l'aide sur des options supplémentaires dans le flux de sortie\n -ea[:...|:]\n -enableassertions[:...|:]\n activer des assertions avec la granularité spécifiée\n -da[:...|:]\n -disableassertions[:...|:]\n désactiver des assertions avec la granularité spécifiée\n -esa | -enablesystemassertions\n activer des assertions système\n -dsa | -disablesystemassertions\n désactiver des assertions système\n -agentlib:[=]\n charger la bibliothèque d'agent natif , par ex. -agentlib:jdwp\n voir également -agentlib:jdwp=help\n -agentpath:[=]\n charger la bibliothèque d'agent natif par nom de chemin complet\n -javaagent:[=]\n charger \ -l'agent de langage de programmation, voir java.lang.instrument\n -splash:\n afficher l'écran d'accueil avec l'image indiquée\n Les images redimensionnées HiDPI sont automatiquement prises en charge et utilisées\n si elles sont disponibles. Le nom de fichier d'une image non redimensionnée, par ex. image.ext,\n doit toujours être transmis comme argument à l'option -splash.\n L'image redimensionnée fournie la plus appropriée sera automatiquement\n sélectionnée.\n Pour plus d'informations, reportez-vous à la documentation relative à l'API SplashScreen\n fichiers @argument\n fichiers d'arguments contenant des options\n --disable-@files\n empêcher le développement supplémentaire de fichiers d'arguments\nAfin d'indiquer un argument pour une option longue, vous pouvez utiliser --= ou\n-- .\n - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\n -Xbatch désactivation de la compilation en arrière-plan\n -Xbootclasspath/a:\n ajout à la fin du chemin de classe bootstrap\n -Xcheck:jni exécution de contrôles supplémentaires pour les fonctions JNI\n -Xcomp force la compilation de méthodes au premier appel\n -Xdebug fourni pour la compatibilité amont\n -Xdiag affichage de messages de diagnostic supplémentaires\n -Xfuture activation des contrôles les plus stricts en vue d''anticiper la future valeur par défaut\n -Xint exécution en mode interprété uniquement\n -Xinternalversion\n affiche des informations de version JVM plus détaillées que\n l''option -version\n -Xloggc: journalisation du statut de l''opération de ramasse-miette dans un fichier avec horodatages\n -Xmixed exécution en mode mixte (valeur par défaut)\n -Xmn définit les tailles initiale et maximale (en octets) de la portion de mémoire\n pour la jeune génération (nursery)\n -Xms définition de la taille initiale des portions de mémoire Java\n -Xmx définition de la taille maximale des portions de mémoire Java\n -Xnoclassgc désactivation de l''opération de ramasse-miette de la classe\n -Xrs réduction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n -Xshare:auto utilisation des données de classe partagées si possible (valeur par défaut)\n -Xshare:off aucune tentative d''utilisation des données de classe partagées\n -Xshare:on utilisation des données de classe partagées obligatoire ou échec de l''opération.\n -XshowSettings affichage de tous les paramètres et poursuite de l''opération\n -XshowSettings:all\n affichage de tous les paramètres et poursuite de l''opération\n -XshowSettings:locale\n affichage de tous les paramètres d''environnement local et poursuite de l''opération\n -XshowSettings:properties\n affichage de tous les paramètres de propriété et poursuite de l''opération\n -XshowSettings:vm affichage de tous les paramètres de machine virtuelle et poursuite de l''opération\n -Xss définition de la taille de pile de thread Java\n -Xverify définit le mode du vérificateur de code exécutable\n --add-reads =(,)*\n met à jour pour lire , sans tenir compte\n de la déclaration de module. \n peut être ALL-UNNAMED pour lire tous les\n modules sans nom.\n --add-exports /=(,)*\n met à jour pour exporter vers ,\n sans tenir compte de la déclaration de module.\n peut être ALL-UNNAMED pour effectuer un export vers tous\n les modules sans nom.\n --add-opens /=(,)*\n met à jour pour ouvrir vers\n , sans tenir compte de la déclaration de module.\n --illegal-access=\n autorise ou refuse l''accès à des membres de types dans des modules nommés\n par code \ -dans des modules sans nom.\n est l''une des valeurs suivantes : "deny", "permit", "warn" ou "debug"\n Cette option sera enlevée dans une version ultérieure.\n --limit-modules [,...]\n limite l''univers des modules observables\n --patch-module =({0})*\n remplace ou augmente un module avec des classes et des ressources\n dans des fichiers JAR ou des répertoires.\n --disable-@files désactive d''autres développements de fichier d''argument\n\nCes options supplémentaires peuvent être modifiées sans préavis.\n - -# Translators please note do not translate the options themselves -java.launcher.X.macosx.usage=\nLes options suivantes sont propres à Mac OS X :\n -XstartOnFirstThread\n exécute la méthode main() sur le premier thread (AppKit)\n -Xdock:name=\n remplace le nom d'application par défaut affiché dans l'ancrage\n -Xdock:icon=\n remplace l'icône par défaut affichée dans l'ancrage\n\n - -java.launcher.cls.error1=Erreur : impossible de trouver ou de charger la classe principale {0}\nCausé par : {1}: {2} -java.launcher.cls.error2=Erreur : la méthode principale n''est pas {0} dans la classe {1}, définissez la méthode principale comme suit :\n public static void main(String[] args) -java.launcher.cls.error3=Erreur : la méthode principale doit renvoyer une valeur de type void dans la classe {0}, \ndéfinissez la méthode principale comme suit :\n public static void main(String[] args) -java.launcher.cls.error4=Erreur : la méthode principale est introuvable dans la classe {0}, définissez la méthode principale comme suit :\n public static void main(String[] args)\nou une classe d''applications JavaFX doit étendre {1} -java.launcher.cls.error5=Erreur : des composants d'exécution JavaFX obligatoires pour exécuter cette application sont manquants. -java.launcher.cls.error6=Erreur : LinkageError lors du chargement de la classe principale {0}\n\t{1} -java.launcher.cls.error7=Erreur : impossible d''initialiser la classe principale {0}\nCausé par : {1}: {2} -java.launcher.jar.error1=Erreur : une erreur inattendue est survenue lors de la tentative d''ouverture du fichier {0} -java.launcher.jar.error2=fichier manifeste introuvable dans {0} -java.launcher.jar.error3=aucun attribut manifest principal dans {0} -java.launcher.jar.error4=erreur lors du chargement de l''agent Java dans {0} -java.launcher.init.error=erreur d'initialisation -java.launcher.javafx.error1=Erreur : la signature de la méthode launchApplication JavaFX est incorrecte, la\nméthode doit être déclarée statique et renvoyer une valeur de type void -java.launcher.module.error1=le module {0} n''a pas d''attribut MainClass, utilisez -m / -java.launcher.module.error2=Erreur : impossible de trouver ou charger la classe principale {0} dans le module {1} -java.launcher.module.error3=Erreur : impossible de charger la classe principale {0} dans le module {1}\n\t{2} -java.launcher.module.error4={0} introuvable -java.launcher.module.error5=Erreur : impossible d''initialiser la classe principale {0} dans le module {1}\nCausé par : {1}: {2} diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties deleted file mode 100644 index 3f0930bb941..00000000000 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Translators please note do not translate the options themselves -java.launcher.opt.header = Uso: {0} [opzioni] [argomenti...]\n (per eseguire una classe)\n oppure {0} [opzioni] -jar [argomenti...]\n (per eseguire un file jar)\n oppure {0} [opzioni] -m [/] [argomenti...]\n {0} [opzioni] --module [/] [argomenti...]\n (per eseguire la classe principale in un modulo)\n\n Gli argomenti specificati dopo la classe principale, dopo -jar , -m o --module\n / vengono passati come argomenti alla classe principale.\n\n dove opzioni include:\n\n - -java.launcher.opt.vmselect =\ {0}\t per selezionare la VM "{1}"\n -java.launcher.opt.hotspot =\ {0}\t è un sinonimo per la VM "{1}" [non valido]\n - -# Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp \n -classpath \n -class-path \n Una lista separata da {0} di directory, archivi JAR\n e archivi ZIP in cui cercare i file di classe.\n -p \n --module-path ...\n Una lista separata da {0} di directory. Ogni directory\n è una directory di moduli.\n --upgrade-module-path ...\n Una lista separata da {0} di directory. Ogni directory\n è una directory di moduli che sostituiscono i moduli\n aggiornabili nell'immagine in fase di esecuzione\n --add-modules [,...]\n I moduli radice da risolvere in aggiunta al modulo iniziale.\n può essere anche ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n Elenca i moduli osservabili ed esce\n -d \n --describe-module \n Descrive un modulo ed esce\n --dry-run Crea la VM e carica la classe principale ma non esegue il metodo principale.\n L'opzione --dry-run può essere utile per la convalida delle\n opzioni della riga di comando, ad esempio quelle utilizzate per la configurazione del sistema di moduli.\n --validate-modules\n Convalida tutti i moduli ed esce\n L'opzione --validate-modules può essere utile per rilevare\n conflitti e altri errori con i moduli nel percorso dei moduli.\n -D=\n Imposta una proprietà di sistema\n -verbose:[class|module|gc|jni]\n abilitare output descrittivo\n -version Visualizza la versione del prodotto nel flusso di errori ed esce\n -version Visualizza la versione del prodotto nel flusso di output ed esce\n -showversion Visualizza la versione del prodotto nel flusso di errori e continua\n --show-version\n Visualizza la versione del prodotto nel flusso di output e continua\n --show-module-resolution\n Mostra l'output della risoluzione del modulo durante l'avvio\n -? -h -help\n Visualizza questo messaggio della Guida nel flusso di errori\n --help Visualizza questo messaggio della Guida nel flusso di output\n -X Visualizza la Guida relativa alle opzioni non standard nel flusso di errori\n --help-extra Visualizza la Guida relativa alle opzioni non standard nel flusso di output\n -ea[:...|:]\n -enableassertions[:...|:]\n Abilita le asserzioni con la granularità specificata\n -da[:...|:]\n -disableassertions[:...|:]\n Disabilita le asserzioni con la granularità specificata\n -esa | -enablesystemassertions\n Abilita le asserzioni di sistema\n -dsa | -disablesystemassertions\n Disabilita le asserzioni di sistema\n -agentlib:[=]\n Carica la libreria agenti nativa , ad esempio -agentlib:jdwp\n Vedere anche -agentlib:jdwp=help\n -agentpath:[=]\n Carica la libreria agenti nativa con il percorso completo\n -javaagent:[=]\n Carica l'agente del linguaggio di programmazione Java, vedere java.lang.instrument\n -splash:\n Mostra la schermata iniziale con l'immagine specificata\n Le immagini ridimensionate HiDPI sono supportate e utilizzate \ -automaticamente\n se disponibili. I nomi file delle immagini non ridimensionate, ad esempio image.ext,\n devono essere sempre passati come argomenti all'opzione -splash.\n Verrà scelta automaticamente l'immagine ridimensionata più appropriata\n fornita.\n Per ulteriori informazioni, vedere la documentazione relativa all'API SplashScreen\n @file argomenti\n Uno o più file argomenti contenenti opzioni\n --disable-@files\n Impedisce l'ulteriore espansione di file argomenti\nPer specificare un argomento per un'opzione lunga, è possibile usare --= oppure\n-- .\n - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\n -Xbatch Disabilita la compilazione in background.\n -Xbootclasspath/a:\n Aggiunge alla fine del classpath di bootstrap.\n -Xcheck:jni Esegue controlli aggiuntivi per le funzioni JNI.\n -Xcomp Forza la compilazione dei metodi al primo richiamo.\n -Xdebug Fornito per la compatibilità con le versioni precedenti.\n -Xdiag Mostra ulteriori messaggi diagnostici.\n -Xfuture Abilita i controlli più limitativi anticipando le impostazioni predefinite future.\n -Xint Esecuzione solo in modalità convertita.\n -Xinternalversion\n Visualizza informazioni più dettagliate sulla versione JVM rispetto\n all''opzione -version.\n -Xloggc: Registra lo stato GC in un file con indicatori orari.\n -Xmixed Esecuzione in modalità mista (impostazione predefinita).\n -Xmn Imposta le dimensioni iniziale e massima (in byte) dell''heap\n per la young generation (nursery).\n -Xms Imposta la dimensione heap Java iniziale.\n -Xmx Imposta la dimensione heap Java massima.\n -Xnoclassgc Disabilta la garbage collection della classe.\n -Xrs Riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione).\n -Xshare:auto Utilizza i dati di classe condivisi se possibile (impostazione predefinita).\n -Xshare:off Non tenta di utilizzare i dati di classe condivisi.\n -Xshare:on Richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n -XshowSettings Mostra tutte le impostazioni e continua.\n -XshowSettings:all\n Mostra tutte le impostazioni e continua.\n -XshowSettings:locale\n Mostra tutte le impostazioni correlate alle impostazioni nazionali e continua.\n -XshowSettings:properties\n Mostra tutte le impostazioni delle proprietà e continua.\n -XshowSettings:vm Mostra tutte le impostazioni correlate alla VM e continua.\n -Xss Imposta la dimensione dello stack di thread Java.\n -Xverify Imposta la modalità del verificatore bytecode.\n --add-reads:=(,)*\n Aggiorna per leggere , indipendentemente\n dalla dichiarazione del modulo. \n può essere ALL-UNNAMED per leggere tutti i\n moduli senza nome.\n -add-exports:/=(,)*\n Aggiorna per esportare in ,\n indipendentemente dalla dichiarazione del modulo.\n può essere ALL-UNNAMED per esportare tutti i\n moduli senza nome.\n --add-opens /=(,)*\n Aggiorna per aprire in\n , indipendentemente dalla dichiarazione del modulo.\n --illegal-access=\n Consente o nega l''accesso ai membri dei tipi nei moduli denominati\n mediante codice nei moduli senza nome.\n può essere "deny", "permit", "warn" o "debug".\n Questa opzione verrà rimossa in una release futura.\n --limit-modules [,...]\n Limita l''universo dei moduli osservabili.\n -patch-module =({0})*\n Sostituisce o migliora un modulo con classi e risorse\n in file JAR o directory.\n --disable-@files Disabilita l''ulteriore espansione \ -di file argomenti.\n\nQueste opzioni non sono opzioni standard e sono soggette a modifiche senza preavviso.\n - -# Translators please note do not translate the options themselves -java.launcher.X.macosx.usage=\nLe opzioni riportate di seguito sono specifiche del sistema operativo Mac OS X:\n -XstartOnFirstThread\n Esegue il metodo main() sul primo thread (AppKit).\n -Xdock:name=\n Sostituisce il nome applicazione predefinito visualizzato nel dock\n -Xdock:icon=\n Sostituisce l'icona predefinita visualizzata nel dock\n\n - -java.launcher.cls.error1=Errore: impossibile trovare o caricare la classe principale {0}\nCausato da: {1}: {2} -java.launcher.cls.error2=Errore: il metodo principale non è {0} nella classe {1}. Definire il metodo principale come:\n public static void main(String[] args) -java.launcher.cls.error3=Errore: il metodo principale deve restituire un valore di tipo void nella classe {0}. \nDefinire il metodo principale come:\n public static void main(String[] args) -java.launcher.cls.error4=Errore: il metodo principale non è stato trovato nella classe {0}. Definire il metodo principale come:\n public static void main(String[] args)\naltrimenti una classe applicazione JavaFX deve estendere {1} -java.launcher.cls.error5=Errore: non sono presenti i componenti runtime di JavaFX necessari per eseguire questa applicazione -java.launcher.cls.error6=Errore: LinkageError durante il caricamento della classe principale {0}\n\t{1} -java.launcher.cls.error7=Errore: impossibile inizializzare la classe principale {0}\nCausato da: {1}: {2} -java.launcher.jar.error1=Errore: si è verificato un errore imprevisto durante il tentativo di aprire il file {0} -java.launcher.jar.error2=manifest non trovato in {0} -java.launcher.jar.error3=nessun attributo manifest principale in {0} -java.launcher.jar.error4=errore durante il caricamento dell''agente java in {0} -java.launcher.init.error=errore di inizializzazione -java.launcher.javafx.error1=Errore: il metodo JavaFX launchApplication dispone di una firma errata, \nla firma deve essere dichiarata static e restituire un valore di tipo void -java.launcher.module.error1=il modulo {0} non dispone di un attributo MainClass. Utilizzare -m / -java.launcher.module.error2=Errore: impossibile trovare o caricare la classe principale {0} nel modulo {1} -java.launcher.module.error3=Errore: impossibile caricare la classe principale {0} nel modulo {1}\n\t{2} -java.launcher.module.error4={0} non trovato -java.launcher.module.error5=Errore: impossibile inizializzare la classe principale {0} nel modulo {1}\nCausato da: {1}: {2} diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties deleted file mode 100644 index f9460722f32..00000000000 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Translators please note do not translate the options themselves -java.launcher.opt.header = 사용법: {0} [옵션] <기본 클래스> [args...]\n (클래스 실행)\n 또는 {0} [옵션] -jar [args...]\n (jar 파일 실행)\n 또는 {0} [옵션] -m <모듈>[/<기본 클래스>] [args...]\n {0} [옵션] --module <모듈>[/<기본 클래스>] [args...]\n (모듈의 기본 클래스 실행)\n\n 기본 클래스, -jar , -m 또는 --module\n <모듈>/<기본 클래스> 뒤에 나오는 인수는 기본 클래스에 인수로 전달됩니다.\n\n 이 경우 옵션에는 다음이 포함됩니다.\n\n - -java.launcher.opt.vmselect =\ {0}\t "{1}" VM을 선택합니다.\n -java.launcher.opt.hotspot =\ {0}\t "{1}" VM의 동의어입니다[사용되지 않음].\n - -# Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp <디렉토리 및 zip/jar 파일의 클래스 검색 경로>\n -classpath <디렉토리 및 zip/jar 파일의 클래스 검색 경로>\n --class-path <디렉토리 및 zip/jar 파일의 클래스 검색 경로>\n 클래스 파일을 검색하기 위한 디렉토리, JAR 아카이브 및 ZIP 아카이브의 {0}(으)로\n 구분된 목록입니다.\n -p <모듈 경로>\n --module-path <모듈 경로>...\n 디렉토리의 {0}(으)로 구분된 목록입니다. 각 디렉토리는\n 모듈의 디렉토리입니다.\n --upgrade-module-path <모듈 경로>...\n 디렉토리의 {0}(으)로 구분된 목록입니다. 각 디렉토리는\n 런타임 이미지에서 업그레이드 가능한 모듈을 대체하는\n 모듈의 디렉토리입니다.\n --add-modules <모듈 이름>[,<모듈 이름>...]\n 초기 모듈 이외의 해결할 루트 모듈입니다.\n <모듈 이름>은 ALL-DEFAULT, ALL-SYSTEM일 수 있습니다.\n ALL-MODULE-PATH.\n --list-modules\n 관찰 가능한 모듈을 나열하고 종료합니다.\n -d <모듈 이름>\n --describe-module <모듈 이름>\n 모듈을 설명하고 종료합니다.\n --dry-run VM을 생성하고 기본 클래스를 로드하지만 기본 메소드를 실행하지는 않습니다.\n --dry-run 옵션은 모듈 시스템 구성과 같은\n 명령줄 옵션 검증에 유용할 수 있습니다.\n --validate-modules\n 모든 모듈을 검증하고 종료합니다.\n --validate-modules 옵션은 모듈 경로에서 모듈에 대한\n 충돌 및 기타 오류를 찾는 데 유용할 수 있습니다.\n -D<이름>=<값>\n 시스템 속성을 설정합니다.\n -verbose:[class|module|gc|jni]\n 상세 정보 출력을 사용으로 설정\n -version 오류 스트림에 제품 버전을 인쇄하고 종료합니다.\n --version 출력 스트림에 제품 버전을 인쇄하고 종료합니다.\n -showversion 오류 스트림에 제품 버전을 인쇄하고 계속합니다.\n --show-version\n 출력 스트림에 제품 버전을 인쇄하고 계속합니다.\n --show-module-resolution\n 시작 중 모듈 분석 출력을 \ -표시합니다.\n -? -h -help\n 오류 스트림에 이 도움말 메시지를 인쇄합니다.\n --help 출력 스트림에 이 도움말 메시지를 인쇄합니다.\n -X 오류 스트림에 추가 옵션에 대한 도움말을 인쇄합니다.\n --help-extra 출력 스트림에 추가 옵션에 대한 도움말을 인쇄합니다.\n -ea[:<패키지 이름>...|:<클래스 이름>]\n -enableassertions[:<패키지 이름>...|:<클래스 이름>]\n 세분성이 지정된 검증을 사용으로 설정합니다.\n -da[:<패키지 이름>...|:<클래스 이름>]\n -disableassertions[:<패키지 이름>...|:<클래스 이름>]\n 세분성이 지정된 검증을 사용 안함으로 설정합니다.\n -esa | -enablesystemassertions\n 시스템 검증을 사용으로 설정합니다.\n -dsa | -disablesystemassertions\n 시스템 검증을 사용 안함으로 설정합니다.\n -agentlib:<라이브러리 이름>[=<옵션>]\n 고유 에이전트 라이브러리 <라이브러리 이름>을 로드합니다(예: -agentlib:jdwp).\n -agentlib:jdwp=help도 참조하십시오.\n -agentpath:<경로 이름>[=<옵션>]\n 전체 경로 이름을 사용하여 고유 에이전트 라이브러리를 로드합니다.\n -javaagent:[=<옵션>]\n Java 프로그래밍 언어 에이전트를 로드합니다. java.lang.instrument를 참조하십시오.\n -splash:<이미지 경로>\n 이미지가 지정된 스플래시 화면을 표시합니다.\n HiDPI로 조정된 이미지가 자동으로 지원되고 사용 가능한 경우\n 사용됩니다. 미조정 이미지 파일 이름(예: image.ext)은\n 항상 -splash 옵션에 인수로 전달되어야 합니다.\n 가장 적절히 조정된 이미지가 자동으로\n 채택됩니다.\n 자세한 내용은 SplashScreen API 설명서를 참조하십시오.\n @인수 파일\n --disable-@files 옵션이 포함되어 있는 하나 이상의\n 인수 파일\n 추가 인수 파일 확장을 방지합니다.\nlong 옵션에 대한 인수를 지정하려면 --<이름>=<값> 또는\n--<이름> <값>을 사용할 수 있습니다.\n - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\n -Xbatch 백그라운드 컴파일을 사용 안함으로 설정합니다.\n -Xbootclasspath/a:<{0}(으)로 구분된 디렉토리 및 zip/jar 파일>\n 부트스트랩 클래스 경로 끝에 추가합니다.\n -Xcheck:jni JNI 함수에 대한 추가 검사를 수행합니다.\n -Xcomp 첫번째 호출에서 메소드 컴파일을 강제합니다.\n -Xdebug 역 호환성을 위해 제공되었습니다.\n -Xdiag 추가 진단 메시지를 표시합니다.\n -Xfuture 미래 기본값을 예측하여 가장 엄격한 검사를 사용으로 설정합니다.\n -Xint 해석된 모드만 실행합니다.\n -Xinternalversion\n -version 옵션보다 상세한 JVM 버전 정보를\n 표시합니다.\n -Xloggc: 시간기록과 함께 파일에 GC 상태를 기록합니다.\n -Xmixed 혼합 모드를 실행합니다(기본값).\n -Xmn 젊은 세대(Nursery)를 위해 힙의 초기 및 최대\n 크기(바이트)를 설정합니다.\n -Xms 초기 Java 힙 크기를 설정합니다.\n -Xmx 최대 Java 힙 크기를 설정합니다.\n -Xnoclassgc 클래스의 불필요한 정보 모음을 사용 안함으로 설정합니다.\n -Xrs Java/VM에 의한 OS 신호 사용을 줄입니다(설명서 참조).\n -Xshare:auto 가능한 경우 공유 클래스 데이터를 사용합니다(기본값).\n -Xshare:off 공유 클래스 데이터 사용을 시도하지 않습니다.\n -Xshare:on 공유 클래스 데이터를 사용해야 합니다. 그렇지 않을 경우 실패합니다.\n -XshowSettings 모든 설정을 표시한 후 계속합니다.\n -XshowSettings:all\n 모든 설정을 표시한 후 계속합니다.\n -XshowSettings:locale\n 모든 로케일 관련 설정을 표시한 후 계속합니다.\n -XshowSettings:properties\n 모든 속성 설정을 표시한 후 계속합니다.\n -XshowSettings:vm 모든 VM 관련 설정을 표시한 후 계속합니다.\n -Xss Java 스레드 스택 크기를 설정합니다.\n -Xverify 바이트코드 검증자의 모드를 설정합니다.\n --add-reads =(,)*\n 모듈 선언에 관계없이 을 \ -읽도록\n 을 업데이트합니다. \n 은 이름이 지정되지 않은 모든 모듈을 읽을 수 있는\n ALL-UNNAMED일 수 있습니다.\n --add-exports /=(,)*\n\n 모듈 선언에 관계없이 로 익스포트하도록\n 을 업데이트합니다.\n 은 이름이 지정되지 않은 모든 모듈로 익스포트할 수 있는\n ALL-UNNAMED일 수 있습니다.\n --add-opens /=(,)*\n 모듈 선언에 관계없이 로 열도록\n 을 업데이트합니다.\n --illegal-access=\n 이름이 지정되지 않은 모듈의 코드를 사용하여 이름이 지정된 모듈의 유형 멤버에 대한\n 액세스 권한을 허용 또는 거부합니다.\n 는 "deny", "permit", "warn" 또는 "debug" 중 하나입니다.\n 이 옵션은 이후 릴리스에서 제거됩니다.\n --limit-modules [,...]\n 관찰 가능한 모듈의 공용을 제한합니다.\n --patch-module =({0})*\n JAR 파일 또는 디렉토리의 클래스와 리소스로 모듈을\n 무효화하거나 인수화합니다.\n --disable-@files 추가 인수 파일 확장을 사용 안함으로 설정합니다.\n\n이러한 추가 옵션은 통지 없이 변경될 수 있습니다.\n - -# Translators please note do not translate the options themselves -java.launcher.X.macosx.usage=\n다음은 Mac OS X에 특정된 옵션입니다.\n -XstartOnFirstThread\n 첫번째 (AppKit) 스레드에 main() 메소드를 실행합니다.\n -Xdock:name=\n 고정으로 표시된 기본 애플리케이션 이름을 무효화합니다.\n -Xdock:icon=\n 고정으로 표시된 기본 아이콘을 무효화합니다.\n\n - -java.launcher.cls.error1=오류: 기본 클래스 {0}을(를) 찾거나 로드할 수 없습니다.\n원인: {1}: {2} -java.launcher.cls.error2=오류: {1} 클래스에서 기본 메소드가 {0}이(가) 아닙니다. 다음 형식으로 기본 메소드를 정의하십시오.\n public static void main(String[] args) -java.launcher.cls.error3=오류: 기본 메소드는 {0} 클래스에서 void 유형의 값을 반환해야 합니다. \n다음 형식으로 기본 메소드를 정의하십시오.\n public static void main(String[] args) -java.launcher.cls.error4=오류: {0} 클래스에서 기본 메소드를 찾을 수 없습니다. 다음 형식으로 기본 메소드를 정의하십시오.\r\n public static void main(String[] args)\r\n또는 JavaFX 애플리케이션 클래스는 {1}을(를) 확장해야 합니다. -java.launcher.cls.error5=오류: 이 애플리케이션을 실행하는 데 필요한 JavaFX 런타임 구성요소가 누락되었습니다. -java.launcher.cls.error6=오류: 기본 클래스 {0}을(를) 로드하는 중 LinkageError가 발생했습니다.\n\t{1} -java.launcher.cls.error7=오류: 기본 클래스 {0}을(를) 초기화할 수 없습니다.\n원인: {1}: {2} -java.launcher.jar.error1=오류: {0} 파일을 열려고 시도하는 중 예상치 않은 오류가 발생했습니다. -java.launcher.jar.error2={0}에서 Manifest를 찾을 수 없습니다. -java.launcher.jar.error3={0}에 기본 Manifest 속성이 없습니다. -java.launcher.jar.error4={0}에서 Java 에이전트를 로드하는 중 오류가 발생했습니다. -java.launcher.init.error=초기화 오류 -java.launcher.javafx.error1=오류: JavaFX launchApplication 메소드에 잘못된 서명이 있습니다.\\n따라서 static으로 선언하고 void 유형의 값을 반환해야 합니다. -java.launcher.module.error1={0} 모듈에 MainClass 속성이 없습니다. -m /를 사용하십시오. -java.launcher.module.error2=오류: {1} 모듈의 기본 클래스 {0}을(를) 찾거나 로드할 수 없습니다. -java.launcher.module.error3=오류: {1} 모듈의 기본 클래스 {0}을(를) 로드할 수 없습니다.\n\t{2} -java.launcher.module.error4={0}을(를) 찾을 수 없습니다. -java.launcher.module.error5=오류: {1} 모듈의 기본 클래스 {0}을(를) 초기화할 수 없습니다.\n원인: {1}: {2} diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties deleted file mode 100644 index 15f986d991e..00000000000 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Translators please note do not translate the options themselves -java.launcher.opt.header = Uso: {0} [options] [args...]\n (para executar uma classe)\n ou {0} [options] -jar [args...]\n (para executar um arquivo jar)\n ou {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (para executar a classe principal em um módulo)\n\n Os argumentos após a classe principal, -jar , -m ou --module\n / são especificados como os argumentos para a classe principal.\n\n em que as opções incluem:\n\n - -java.launcher.opt.vmselect =\ {0}\t para selecionar a VM "{1}"\n -java.launcher.opt.hotspot =\ {0}\t é um sinônimo da VM "{1}" [obsoleto]\n - -# Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Uma lista separada por {0} de diretórios, arquivos compactados JAR\n e arquivos compactados ZIP para procurar arquivos de classe.\n -p \n --module-path ...\n Uma lista separada por {0} de diretórios, cada um\n sendo um diretório de módulos.\n --upgrade-module-path ...\n Uma lista separada por {0} de diretórios, cada um\n sendo um diretório de módulos que substituem módulos\n passíveis de upgrade na imagem de runtime\n --add-modules [,...]\n módulos-raiz a serem resolvidos além do módulo inicial.\n também pode ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n lista os módulos observáveis e sai\n -d \n --describe-module \n descreve um módulo e sai\n --dry-run cria VM e carrega classe principal, mas não executa o método principal.\n A opção --dry-run pode ser útil para validar as\n opções de linha de comando como a configuração do sistema do módulo.\n --validate-modules\n valida todos os módulos e sai\n A opção --validate-modules pode ser útil para localizar\n conflitos e outros erros com módulos no caminho do módulo.\n -D=\n define uma propriedade de sistema\n -verbose:[class|module|gc|jni]\n ativar saída verbosa\n -version imprime a versão do produto no fluxo de erros e sai\n -version imprime a versão do produto no fluxo de saída e sai\n -showversion imprime a versão do produto no fluxo de erros e continua\n --show-version\n imprime a versão do produto no fluxo de saída e continua\n --show-module-resolution\n mostra a saída da resolução do módulo durante a inicialização\n -? -h -help\n imprime esta mensagem de ajuda no fluxo de erros\n --help imprime esta mensagem de ajuda no fluxo de saída\n -X imprime ajuda sobre opções extras no fluxo de erros\n --help-extra imprime ajuda sobre opções extras no fluxo de saída\n -ea[:...|:]\n -enableassertions[:...|:]\n ativa asserções com granularidade especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desativa asserções com granularidade especificada\n -esa | -enablesystemassertions\n ativa asserções de sistema\n -dsa | -disablesystemassertions\n desativa asserções de sistema\n -agentlib:[=]\n carrega biblioteca de agente nativo , por exemplo, -agentlib:jdwp\n consulte também -agentlib:jdwp=help\n -agentpath:[=]\n carrega biblioteca de agente nativo por nome do caminho completo\n -javaagent:[=]\n carrega agente de linguagem de programação Java, consulte java.lang.instrument\n -splash:\n mostra \ -a tela inicial com a imagem especificada\n Imagens HiDPI dimensionadas são suportadas automaticamente e utilizadas,\n se disponíveis. O nome do arquivo de imagem não dimensionada, por exemplo, image.ext,\n deve ser informado sempre como argumento para a opção -splash.\n A imagem dimensionada mais apropriada fornecida será selecionada\n automaticamente.\n Consulte a documentação da API de Tela Inicial para obter mais informações\n @arquivos de argumento\n Um ou mais arquivos de argumentos que contêm opções\n --disable-@files\n impede expansão adicional de arquivo de argumentos\nnPara especificar um argumento para uma opção longa, você pode usar --= ou\n-- .\n - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\n -Xbatch desativa a compilação em segundo plano\n -Xbootclasspath/a:\n anexa ao final do caminho de classe de bootstrap\n -Xcheck:jni executa verificações adicionais de funções JNI\n -Xcomp força a compilação de métodos na primeira chamada\n -Xdebug fornecido para compatibilidade reversa\n -Xdiag mostra mensagens adicionais de diagnóstico\n -Xfuture ativa verificações de nível máximo, antecipando padrão futuro\n -Xint somente execução de modo interpretado\n -Xinternalversion\n exibe informações mais detalhadas da versão da JVM do que a\n opção -version\n -Xloggc: registra o status do GC em um arquivo com timestamps\n -Xmixed execução em modo misto (padrão)\n -Xmn define o tamanho inicial e máximo (em bytes) do heap\n para a geração jovem (infantil)\n -Xms define o tamanho inicial do heap Java\n -Xmx define o tamanho máximo do heap Java\n -Xnoclassgc desativa a coleta de lixo de classe\n -Xrs reduz o uso de sinais do SO por Java/VM (consulte a documentação)\n -Xshare:auto usa dados de classe compartilhados se possível (padrão)\n -Xshare:off não tenta usar dados de classe compartilhados\n -Xshare:on exige o uso de dados de classe compartilhados; caso contrário, falhará.\n -XshowSettings mostra todas as definições e continua\n -XshowSettings:all\n mostra todas as definições e continua\n -XshowSettings:locale\n mostra todas as definições relacionadas à configuração regional e continua\n -XshowSettings:properties\n mostra todas as definições de propriedade e continua\n -XshowSettings:vm mostra todas as definições relacionadas a vm e continua\n -Xss define o tamanho da pilha de thread java\n -Xverify define o modo do verificador de código de byte\n --add-reads =(,)*\n atualiza para ler , independentemente\n da declaração de módulo. \n pode ser ALL-UNNAMED para ler todos os módulos\n sem nome.\n --add-exports /=(,)*\n atualiza para exportar para ,\n independentemente da declaração de módulo.\n pode ser ALL-UNNAMED para exportar para todos os\n módulos sem nome.\n --add-opens /=(,)*\n atualiza para abrir para\n , independentemente da declaração de módulo.\n --illegal-access=\n permite ou nega acesso aos membros dos tipos nos módulos com nome\n por código nos módulos sem nomes.\n é um entre "deny", "permit", "warn" ou "debug"\n Esta opção será removida em uma futura release.\n --limit-modules [,...]\n limita o universo de módulos observáveis\n--patch-module =({0})*\n substitui ou amplia um módulo com classes e recursos\n \ -em arquivos ou diretórios JAR.\n --disable-@files desativa uma maior expansão do arquivo de argumento\n\nEssas opções extras estão sujeitas a alteração sem aviso.\n - -# Translators please note do not translate the options themselves -java.launcher.X.macosx.usage=\nAs opções a seguir são específicas para o Mac OS X:\n -XstartOnFirstThread\n executa o método main() no primeiro thread (AppKit)\n -Xdock:name=\n substitui o nome do aplicativo padrão exibido no encaixe\n -Xdock:icon=\n substitui o ícone exibido no encaixe\n\n - -java.launcher.cls.error1=Erro: Não foi possível localizar nem carregar a classe principal {0}\nCausada por: {1}: {2} -java.launcher.cls.error2=Erro: o método main não é {0} na classe {1}; defina o método main como:\n public static void main(String[] args) -java.launcher.cls.error3=Erro: o método main deve retornar um valor do tipo void na classe {0}; \ndefina o método main como:\n public static void main(String[] args) -java.launcher.cls.error4=Erro: o método main não foi encontrado na classe {0}; defina o método main como:\n public static void main(String[] args)\nou uma classe de aplicativo JavaFX deve expandir {1} -java.launcher.cls.error5=Erro: os componentes de runtime do JavaFX não foram encontrados. Eles são obrigatórios para executar este aplicativo -java.launcher.cls.error6=Erro: ocorreu LinkageError ao carregar a classe principal {0}\n\t{1} -java.launcher.cls.error7=Erro: Não é possível inicializar a classe principal {0}\nCausado por: {1}: {2} -java.launcher.jar.error1=Erro: ocorreu um erro inesperado ao tentar abrir o arquivo {0} -java.launcher.jar.error2=manifesto não encontrado em {0} -java.launcher.jar.error3=nenhum atributo de manifesto principal em {0} -java.launcher.jar.error4=erro ao carregar o agente java em {0} -java.launcher.init.error=erro de inicialização -java.launcher.javafx.error1=Erro: O método launchApplication do JavaFX tem a assinatura errada. Ele\\ndeve ser declarado como estático e retornar um valor do tipo void -java.launcher.module.error1=o módulo {0} não tem um atributo MainClass, use -m / -java.launcher.module.error2=Erro: Não foi possível localizar nem carregar a classe principal {0} no módulo {1} -java.launcher.module.error3=Erro: Não é possível carregar a classe principal {0} no módulo {1}\n\t{2} -java.launcher.module.error4={0} não encontrado. -java.launcher.module.error5=Erro: Não é possível inicializar a classe principal {0} no módulo {1}\nCausado por: {1}: {2} diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties deleted file mode 100644 index 2b770307d2a..00000000000 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Translators please note do not translate the options themselves -java.launcher.opt.header = Syntax: {0} [options] [args...]\n (för att köra en klass)\n eller {0} [options] -jar [args...]\n (för att köra en jar-fil)\n eller {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (för att köra huvudklassen i en modul)\n\n Argument som kommer efter huvudklassen, -jar , -m eller --module\n / överförs som argument till huvudklassen.\n\n med alternativen:\n\n - -java.launcher.opt.vmselect =\ {0}\t för att välja "{1}" VM\n -java.launcher.opt.hotspot =\ {0}\t är en synonym för "{1}" VM [inaktuell]\n - -# Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n En {0}-avgränsad lista över kataloger, JAR-arkiv\n och ZIP-arkiv att söka efter klassfiler i.\n -p \n --module-path ...\n En {0}-avgränsad lista över kataloger, där varje katalog\n är en katalog över moduler.\n --upgrade-module-path ...\n En {0}-avgränsad lista över kataloger, där varje katalog\n är en katalog över moduler som ersätter uppgraderingsbara\n moduler i exekveringsavbilden\n --add-modules [,...]\n rotmoduler att lösa förutom den ursprungliga modulen.\n kan även vara ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --list-modules\n visa observerbara moduler och avsluta\n -d \n --describe-module \n beskriv en modul och avsluta\n --dry-run skapa VM och ladda huvudklassen men kör inte huvudmetoden.\n Alternativet --dry-run kan vara användbart för att validera\n kommandoradsalternativ, som modulsystemkonfigurationen.\n --validate-modules\n validera alla moduler och avsluta\n Alternativet --validate-modules kan vara användbart för att hitta\n konflikter och andra fel i modulerna på modulsökvägen.\n -D=\n ange en systemegenskap\n -verbose:[class|module|gc|jni]\n aktivera utförliga utdata\n -version skriv ut produktversion till felströmmen och avsluta\n --version skriv ut produktversion till utdataströmmen och avsluta\n -showversion skriv ut produktversion till felströmmen och fortsätt\n --show-version\n skriv ut produktversion till utdataströmmen och fortsätt\n --show-module-resolution\n visa modullösningsutdata vid start\n -? -h -help\n skriv ut det här hjälpmeddelandet till felströmmen\n --help skriv ut det här hjälpmeddelandet till utdataströmmen\n -X skriv ut hjälp för extraalternativ till felströmmen\n --help-extra skriv ut hjälp för extraalternativ till utdataströmmen\n -ea[:...|:]\n -enableassertions[:...|:]\n aktivera verifieringar med den angivna detaljgraden\n -da[:...|:]\n -disableassertions[:...|:]\n avaktivera verifieringar med den angivna detaljgraden\n -esa | -enablesystemassertions\n aktivera systemverifieringar\n -dsa | -disablesystemassertions\n avaktivera systemverifieringar\n -agentlib:[=]\n ladda det ursprungliga agentbiblioteket , t.ex. -agentlib:jdwp\n se även -agentlib:jdwp=help\n -agentpath:[=]\n ladda det ursprungliga agentbiblioteket med fullständigt sökvägsnamn\n -javaagent:[=]\n ladda Java-programmeringsspråksagenten, se java.lang.instrument\n -splash:\n visa välkomstskärmen med den angivna bilden\n HiDPI-skaländrade bilder stöds automatiskt och används om de är\n \ - tillgängliga. Filnamnet på den oskaländrade bilden, t.ex. image.ext,\n ska alltid överföras som argument till alternativet -splash.\n Den lämpligaste skaländrade bilden väljs\n automatiskt.\n Mer information finns i dokumentationen för API:t SplashScreen\n @argument filer\n en eller flera argumentfiler som innehåller alternativ\n --disable-@files\n förhindra ytterligare utökning av argumentfiler\nOm du vill ange ett argument för ett långt alternativ kan du använda --= eller\n-- .\n - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\n -Xbatch avaktivera bakgrundskompilering\n -Xbootclasspath/a:\n lägg till sist i klassökvägen för programladdning\n -Xcheck:jni utför fler kontroller för JNI-funktioner\n -Xcomp tvingar kompilering av metoder vid det första anropet\n -Xdebug tillhandahålls för bakåtkompatibilitet\n -Xdiag visa fler diagnostiska meddelanden\n -Xfuture aktivera strängaste kontroller, förväntad framtida standard\n -Xint endast exekvering i tolkat läge\n -Xinternalversion\n visar mer detaljerad information om JVM-version än\n med alternativet -version\n -Xloggc: logga GC-status till en fil med tidsstämplar\n -Xmixed exekvering i blandat läge (standard)\n -Xmn anger ursprunglig och största storlek (i byte) för högen för\n generationen med nyare objekt (högen för tilldelning av nya objekt)\n -Xms ange ursprunglig storlek för Java-heap-utrymmet\n -Xmx ange största storlek för Java-heap-utrymmet\n -Xnoclassgc avaktivera klasskräpinsamling\n -Xrs minska operativsystemssignalanvändning för Java/VM (se dokumentationen)\n -Xshare:auto använd delade klassdata om möjligt (standard)\n -Xshare:off försök inte använda delade klassdata\n -Xshare:on kräv användning av delade klassdata, utför inte i annat fall.\n -XshowSettings visa alla inställningar och fortsätt\n -XshowSettings:all\n visa alla inställningar och fortsätt\n -XshowSettings:locale\n visa alla språkkonventionsrelaterade inställningar och fortsätt\n -XshowSettings:properties\n visa alla egenskapsinställningar och fortsätt\n -XshowSettings:vm visa alla vm-relaterade inställningar och fortsätt\n -Xss ange storlek för java-trådsstacken\n -Xverify anger läge för bytekodverifieraren\n --add-reads =(,)*\n uppdaterar för att läsa , oavsett\n moduldeklarationen. \n kan vara ALL-UNNAMED för att läsa alla\n ej namngivna moduler.\n --add-exports /=(,)*\n uppdaterar för att exportera till ,\n oavsett moduldeklarationen.\n kan vara ALL-UNNAMED för att exportera till alla\n ej namngivna moduler.\n --add-opens /=(,)*\n uppdaterar för att öppna till\n , oavsett moduldeklarationen.\n --illegal-access=\n tillåt eller neka åtkomst till medlemmar av typer i namngivna\n moduler av kod i ej namngivna moduler.\n är "deny", "permit", "warn" eller "debug"\n Det här alternativet tas bort i en kommande utgåva.\n --limit-modules [,...]\n begränsar universumet med observerbara moduler\n --patch-module =({0})*\n åsidosätt eller utöka en modul med klasser och resurser\n i JAR-filer eller kataloger.\n --disable-@files avaktivera \ -ytterligare argumentfilsutökning\n\nDe här extraalternativen kan ändras utan föregående meddelande.\n - -# Translators please note do not translate the options themselves -java.launcher.X.macosx.usage=\nFöljande alternativ är Mac OS X-specifika:\n -XstartOnFirstThread\n kör main()-metoden på den första (AppKit)-tråden\n -Xdock:name=\n åsidosätt det standardapplikationsnamn som visas i dockan\n -Xdock:icon=\n åsidosätt den standardikon som visas i dockan\n\n - -java.launcher.cls.error1=Fel: kunde inte hitta eller ladda huvudklassen {0}\nOrsakades av: {1}: {2} -java.launcher.cls.error2=Fel: Huvudmetoden är inte {0} i klassen {1}, definiera huvudmetoden som:\n public static void main(String[] args) -java.launcher.cls.error3=Fel: Huvudmetoden måste returnera ett värde av typen void i klassen {0}, \ndefiniera huvudmetoden som:\n public static void main(String[] args) -java.launcher.cls.error4=Fel: Huvudmetoden finns inte i klassen {0}, definiera huvudmetoden som:\n public static void main(String[] args)\neller så måste en JavaFX-applikationsklass utöka {1} -java.launcher.cls.error5=Fel: JavaFX-exekveringskomponenter saknas, och de krävs för att kunna köra den här applikationen -java.launcher.cls.error6=Fel: LinkageError inträffade vid laddning av huvudklassen {0}\n\t{1} -java.launcher.cls.error7=Fel: Kan inte initiera huvudklassen {0}\nOrsakades av: {1}: {2} -java.launcher.jar.error1=Fel: Ett oväntat fel inträffade när filen {0} skulle öppnas -java.launcher.jar.error2=manifest finns inte i {0} -java.launcher.jar.error3=inget huvudmanifestattribut i {0} -java.launcher.jar.error4=fel vid laddning av java-agenten i {0} -java.launcher.init.error=initieringsfel -java.launcher.javafx.error1=Fel: JavaFX launchApplication-metoden har fel signatur, den \nmåste ha deklarerats som statisk och returnera ett värde av typen void -java.launcher.module.error1=modulen {0} har inget MainClass-attribut, använd -m / -java.launcher.module.error2=Fel: kunde inte hitta eller ladda huvudklassen {0} i modulen {1} -java.launcher.module.error3=Fel: Kan inte ladda huvudklassen {0} i modulen {1}\n\t{2} -java.launcher.module.error4={0} hittades inte -java.launcher.module.error5=Fel: Kan inte initiera huvudklassen {0} i modulen {1}\nOrsakades av: {1}: {2} diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties deleted file mode 100644 index bd2fc3c8064..00000000000 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Translators please note do not translate the options themselves -java.launcher.opt.header = 用法: {0} [options] [args...]\n (用於執行類別)\n 或者 {0} [options] -jar [args...]\n (用於執行 jar 檔案)\n 或者 {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (用於執行模組中的主要類別)\n\n 主要類別、-jar 、-m 或 --module /\n 之後的引數會當成引數傳送至主要類別。\n\n 其中選項包括:\n\n - -java.launcher.opt.vmselect =\ {0}\t 選取 "{1}" VM\n -java.launcher.opt.hotspot =\ {0}\t 是 "{1}" VM 的同義字 [已不再使用]\n - -# Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp <目錄和 zip/jar 檔案的類別搜尋路徑>\n -classpath <目錄和 zip/jar 檔案的類別搜尋路徑>\n --class-path <目錄和 zip/jar 檔案的類別搜尋路徑>\n 以 {0} 區隔的目錄、JAR 存檔\n 以及 ZIP 存檔清單 (將於其中搜尋類別檔案)。\n -p <模組路徑>\n --module-path <模組路徑>...\n 以 {0} 區隔的目錄清單,每個目錄\n 都是一個模組目錄。\n --upgrade-module-path <模組路徑>...\n 以 {0} 區隔的目錄清單,每個目錄\n 都是一個模組目錄,當中的模組可取代可升級\n 模組 (在程式實際執行影像中)\n --add-modules [,...]\n 除了起始模組之外,要解析的根模組。\n 也可以是 ALL-DEFAULT、ALL-SYSTEM、\n ALL-MODULE-PATH.\n --list-modules\n 列出可監測的模組並結束\n -d <模組名稱>\n --describe-module <模組名稱>\n 描述模組並結束\n --dry-run 建立 VM 並載入主要類別,但不執行主要方法。\n --dry-run 選項適合用在驗證\n 像模組系統組態的命令行選項。\n --validate-modules\n 驗證所有模組並結束\n --validate-modules 選項適合用在尋找\n 模組路徑上之模組的衝突和其他錯誤。\n -D=\n 設定系統特性\n -verbose:[class|module|gc|jni]\n 啟用詳細資訊輸出\n -version 在錯誤串流印出產品版本並結束\n --version 在輸出串流印出產品版本並結束\n -showversion 在錯誤串流印出產品版本並繼續進行作業\n --show-version\n 在輸出串流印出產品版本並繼續進行作業\n --show-module-resolution\n 在啟動時顯示模組解析輸出\n -? -h -help\n 在錯誤串流印出此說明訊息\n --help 在輸出串流印出此說明訊息\n -X 在錯誤串流印出額外選項的說明\n --help-extra 在輸出串流印出額外選項的說明\n -ea[:...|:]\n -enableassertions[:...|:]\n 啟用指定之詳細程度的宣告\n -da[:...|:]\n -disableassertions[:...|:]\n 停用指定之詳細程度的宣告\n -esa | -enablesystemassertions\n \ - 啟用系統宣告\n -dsa | -disablesystemassertions\n 停用系統宣告\n -agentlib:[=]\n 載入原生代理程式程式庫 ,例如 -agentlib:jdwp\n 另請參閱 -agentlib:jdwp=help\n -agentpath:[=]\n 依完整路徑名稱載入原生代理程式程式庫\n -javaagent:[=]\n 載入 Java 程式語言代理程式,請參閱 java.lang.instrument\n -splash:\n 顯示含指定影像的軟體資訊畫面\n 系統會自動支援並使用 HiDPI 縮放的影像\n (若有的話)。未縮放影像檔案名稱 (例如 image.ext)\n 應一律以引數的形式傳送給 -splash 選項。\n 系統將會自動選擇使用最適合的縮放影像\n 。\n 請參閱 SplashScreen API 文件瞭解詳細資訊。\n @argument files\n 一或多個包含選項的引數檔案\n --disable-@files\n 停用進一步的引數檔案擴充\n若要指定長選項的引數,可以使用 --= 或\n-- 。\n - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\n -Xbatch 停用背景編譯\n -Xbootclasspath/a:<以 {0} 區隔的目錄和 zip/jar 檔案>\n 附加至啟動安裝類別路徑的結尾\n -Xcheck:jni 執行額外的 JNI 函數檢查\n -Xcomp 強制編譯第一個呼叫的方法\n -Xdebug 針對回溯相容性提供\n -Xdiag 顯示額外的診斷訊息\n -Xfuture 啟用最嚴格的檢查,預先作為將來的預設\n -Xint 僅限解譯模式執行\n -Xinternalversion\n 顯示比 -version 選項更為詳細的\n JVM 版本資訊\n -Xloggc: 連同時戳將 GC 狀態記錄至檔案\n -Xmixed 混合模式執行 (預設)\n -Xmn 設定新生代 (養成區) 之堆集的起始大小和\n 大小上限 (位元組)\n -Xms 設定起始 Java 堆集大小\n -Xmx 設定 Java 堆集大小上限\n -Xnoclassgc 停用類別資源回收\n -Xrs 減少 Java/VM 使用的作業系統信號 (請參閱文件)\n -Xshare:auto 在可能的情況下使用共用類別資料 (預設)\n -Xshare:off 不嘗試使用共用類別資料\n -Xshare:on 需要使用共用類別資料,否則會失敗。\n -XshowSettings 顯示所有設定值並繼續進行作業\n -XshowSettings:all\n 顯示所有設定值並繼續進行作業\n -XshowSettings:locale\n 顯示所有地區設定相關設定值並繼續進行作業\n -XshowSettings:properties\n 顯示所有屬性設定值並繼續進行作業\n -XshowSettings:vm 顯示所有 VM 相關設定值並繼續進行作業\n -Xss 設定 Java 執行緒堆疊大小\n -Xverify 設定 Bytecode 驗證程式的模式\n --add-reads =(,)*\n 更新 以讀取 ,不論\n 模組宣告為何。 \n 可將 設為 ALL-UNNAMED 以讀取所有未命名的\n 模組。\n --add-exports /=(,)*\n 更新 以便將 匯出至 ,\n 不論模組宣告為何。\n 可將 設為 ALL-UNNAMED 以匯出至所有\n 未命名的模組。\n --add-opens /=(,)*\n 更新 以便將 開啟至\n \ -,不論模組宣告為何。\n --illegal-access=\n 允許或拒絕未命名模組中的程式碼對已命名模組中的\n 類型成員進行存取。\n 為 "deny"、"permit"、"warn" 或 "debug" 其中之一\n 此選項將在未來版本中移除。\n --limit-modules [,...]\n 限制可監測模組的範圍\n --patch-module =({0})*\n 覆寫或加強含有 JAR 檔案或目錄中\n 類別和資源的模組。\n --disable-@files 停用進一步的引數檔案擴充\n\n上述的額外選項若有變更不另行通知。\n - -# Translators please note do not translate the options themselves -java.launcher.X.macosx.usage=\n下列是 Mac OS X 特定選項:\n -XstartOnFirstThread\n 在第一個 (AppKit) 執行緒執行 main() 方法\n -Xdock:name=\n 覆寫結合說明畫面中顯示的預設應用程式名稱\n -Xdock:icon=\n 覆寫結合說明畫面中顯示的預設圖示\n\n - -java.launcher.cls.error1=錯誤: 找不到或無法載入主要類別 {0}\n原因: {1}: {2} -java.launcher.cls.error2=錯誤: 主要方法不是類別 {1} 中的 {0},請定義主要方法為:\n public static void main(String[] args) -java.launcher.cls.error3=錯誤: 主要方法必須傳回類別 {0} 中 void 類型的值,\n請定義主要方法為:\n public static void main(String[] args) -java.launcher.cls.error4=錯誤: 在類別 {0} 中找不到主要方法,請定義主要方法為:\n public static void main(String[] args)\n或者 JavaFX 應用程式類別必須擴充 {1} -java.launcher.cls.error5=錯誤: 遺漏執行此應用程式所需的 JavaFX 程式實際執行元件 -java.launcher.cls.error6=錯誤: 載入主要類別 {0} 時發生 LinkageError\n\t{1} -java.launcher.cls.error7=錯誤: 無法起始主要類別 {0}\n原因: {1}: {2} -java.launcher.jar.error1=錯誤: 嘗試開啟檔案 {0} 時發生未預期的錯誤 -java.launcher.jar.error2=在 {0} 中找不到資訊清單 -java.launcher.jar.error3={0} 中沒有主要資訊清單屬性 -java.launcher.jar.error4=載入 {0} 中的 Java 代理程式時發生錯誤 -java.launcher.init.error=初始化錯誤 -java.launcher.javafx.error1=錯誤: JavaFX launchApplication 方法的簽章錯誤,它\n必須宣告為靜態並傳回 void 類型的值 -java.launcher.module.error1=模組 {0} 不含 MainClass 屬性,請使用 -m / -java.launcher.module.error2=錯誤: 找不到或無法載入模組 {1} 中的主要類別 {0} -java.launcher.module.error3=錯誤: 無法載入模組 {1} 中的主要類別 {0}\n\t{2} -java.launcher.module.error4=找不到 {0} -java.launcher.module.error5=錯誤: 無法起始模組 {1} 中的主要類別 {0}\n原因: {1}: {2} diff --git a/src/java.base/share/classes/sun/net/www/http/HttpClient.java b/src/java.base/share/classes/sun/net/www/http/HttpClient.java index 82ab4c199a5..ffab60e714e 100644 --- a/src/java.base/share/classes/sun/net/www/http/HttpClient.java +++ b/src/java.base/share/classes/sun/net/www/http/HttpClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -438,8 +438,17 @@ public class HttpClient extends NetworkClient { } } + /** + * {@return {@code true}, if the connection to the server is still + * established and there is no stale data to be read; {@code false}, + * otherwise} + *

    + * A {@code true} return value indicates that the connection is reusable for + * an HTTP request. A {@code false} return value indicates that the + * connection is either lost or dirty, and it should be closed. + */ protected boolean available() { - boolean available = true; + boolean available = false; int old = -1; lock(); @@ -447,24 +456,24 @@ public class HttpClient extends NetworkClient { try { old = serverSocket.getSoTimeout(); serverSocket.setSoTimeout(1); - BufferedInputStream tmpbuf = - new BufferedInputStream(serverSocket.getInputStream()); - int r = tmpbuf.read(); + int r = serverSocket.getInputStream().read(); if (r == -1) { logFinest("HttpClient.available(): " + "read returned -1: not available"); - available = false; } } catch (SocketTimeoutException e) { logFinest("HttpClient.available(): " + "SocketTimeout: its available"); + available = true; } finally { if (old != -1) serverSocket.setSoTimeout(old); } } catch (IOException e) { - logFinest("HttpClient.available(): " + - "SocketException: not available"); + logFinest("HttpClient.available(): IOException: not available"); + // `SocketTimeoutException` might have set the return value to + // `true`, but consequently `serverSocket::setSoTimeout` might have + // failed. Hence, reset the return value, always. available = false; } finally { unlock(); diff --git a/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java b/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java index f5804cd83bd..8b63d52a989 100644 --- a/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java +++ b/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java @@ -23,7 +23,6 @@ * questions. */ - package sun.net.www.protocol.https; import java.io.IOException; @@ -36,7 +35,6 @@ import java.net.URL; import java.net.UnknownHostException; import java.net.InetSocketAddress; import java.net.Proxy; -import java.security.Principal; import java.security.cert.*; import java.util.ArrayList; import java.util.List; @@ -242,8 +240,11 @@ final class HttpsClient extends HttpClient if (ret != null && httpuc != null && httpuc.streaming() && "POST".equals(httpuc.getRequestMethod())) { - if (!ret.available()) + if (!ret.available()) { + ret.inCache = false; + ret.closeServer(); ret = null; + } } if (ret != null) { diff --git a/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java b/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java index 71080950b80..d994f2d3842 100644 --- a/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java +++ b/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java @@ -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 @@ -34,7 +34,7 @@ import java.net.URL; import jdk.internal.jimage.ImageReader; import jdk.internal.jimage.ImageReader.Node; -import jdk.internal.jimage.ImageReaderFactory; +import jdk.internal.jimage.SystemImageReader; import sun.net.www.ParseUtil; import sun.net.www.URLConnection; @@ -48,7 +48,7 @@ import sun.net.www.URLConnection; public class JavaRuntimeURLConnection extends URLConnection { // ImageReader to access resources in jimage. - private static final ImageReader READER = ImageReaderFactory.getImageReader(); + private static final ImageReader READER = SystemImageReader.get(); // The module and resource name in the URL (i.e. "jrt:/[$MODULE[/$PATH]]"). // @@ -109,9 +109,10 @@ public class JavaRuntimeURLConnection extends URLConnection { @Override public long getContentLengthLong() { + // connectResourceNode() may throw UncheckedIOException. try { return connectResourceNode().size(); - } catch (IOException ioe) { + } catch (IOException | UncheckedIOException ioe) { return -1L; } } @@ -124,6 +125,10 @@ public class JavaRuntimeURLConnection extends URLConnection { // Perform percent decoding of the resource name/path from the URL. private static String percentDecode(String path) throws MalformedURLException { + if (path.indexOf('%') == -1) { + // Nothing to decode (common case). + return path; + } // Any additional special case decoding logic should go here. try { return ParseUtil.decode(path); diff --git a/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java b/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java index 33e8406a7f6..c7240b54ebd 100644 --- a/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java +++ b/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java @@ -2503,6 +2503,7 @@ public final class PKCS12KeyStore extends KeyStoreSpi { * 30 80 02 01 03 30 80 06 09 2A 86 48 86 F7 0D 01 07 01 A0 80 24 80 04 -- * 30 82 -- -- 02 01 03 30 82 -- -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 8- * 30 -- 02 01 03 30 -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 -- 04 -- -- -- + * 30 81 -- 02 01 03 30 -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 -- 04 -- -- * 30 81 -- 02 01 03 30 81 -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 81 -- 04 * 30 82 -- -- 02 01 03 30 81 -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 81 -- * 30 83 -- -- -- 02 01 03 30 82 -- -- 06 09 2A 86 48 86 F7 0D 01 07 01 A0 @@ -2515,6 +2516,7 @@ public final class PKCS12KeyStore extends KeyStoreSpi { { 0x3080020103308006L, 0x092A864886F70D01L, 0x0701A08024800400L }, { 0x3082000002010330L, 0x82000006092A8648L, 0x86F70D010701A080L }, { 0x3000020103300006L, 0x092A864886F70D01L, 0x0701A00004000000L }, + { 0x3081000201033000L, 0x06092A864886F70DL, 0x010701A000040000L }, { 0x3081000201033081L, 0x0006092A864886F7L, 0x0D010701A0810004L }, { 0x3082000002010330L, 0x810006092A864886L, 0xF70D010701A08100L }, { 0x3083000000020103L, 0x3082000006092A86L, 0x4886F70D010701A0L }, @@ -2527,6 +2529,7 @@ public final class PKCS12KeyStore extends KeyStoreSpi { { 0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFFFF00L }, { 0xFFFF0000FFFFFFFFL, 0xFF0000FFFFFFFFFFL, 0xFFFFFFFFFFFFFFF0L }, { 0xFF00FFFFFFFF00FFL, 0xFFFFFFFFFFFFFFFFL, 0xFFFFFF00FF000000L }, + { 0xFFFF00FFFFFFFF00L, 0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFF00FF0000L }, { 0xFFFF00FFFFFFFFFFL, 0x00FFFFFFFFFFFFFFL, 0xFFFFFFFFFFFF00FFL }, { 0xFFFF0000FFFFFFFFL, 0xFF00FFFFFFFFFFFFL, 0xFFFFFFFFFFFFFF00L }, { 0xFFFF000000FFFFFFL, 0xFFFF0000FFFFFFFFL, 0xFFFFFFFFFFFFFFFFL }, diff --git a/src/java.base/share/classes/sun/security/provider/SHA3.java b/src/java.base/share/classes/sun/security/provider/SHA3.java index 0578645c1cd..5eafface0d3 100644 --- a/src/java.base/share/classes/sun/security/provider/SHA3.java +++ b/src/java.base/share/classes/sun/security/provider/SHA3.java @@ -28,6 +28,7 @@ package sun.security.provider; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.nio.ByteOrder; +import java.security.DigestException; import java.security.ProviderException; import java.util.Arrays; import java.util.Objects; @@ -481,6 +482,11 @@ public abstract class SHA3 extends DigestBase { return engineDigest(); } + public int digest(byte[] out, int offs, int len) + throws DigestException { + return engineDigest(out, offs, len); + } + public void squeeze(byte[] output, int offset, int numBytes) { implSqueeze(output, offset, numBytes); } diff --git a/src/java.base/share/classes/sun/security/provider/X509Factory.java b/src/java.base/share/classes/sun/security/provider/X509Factory.java index 4be83d629bb..154d1428414 100644 --- a/src/java.base/share/classes/sun/security/provider/X509Factory.java +++ b/src/java.base/share/classes/sun/security/provider/X509Factory.java @@ -66,6 +66,7 @@ public class X509Factory extends CertificateFactorySpi { 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 certCache = Cache.newSoftMemoryCache(750); @@ -570,7 +571,7 @@ public class X509Factory extends CertificateFactorySpi { 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 { @@ -594,12 +595,16 @@ public class X509Factory extends CertificateFactorySpi { * @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) { @@ -625,7 +630,7 @@ public class X509Factory extends CertificateFactorySpi { "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 --git a/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java b/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java index 31c0f4ecb9c..ed0fd0f5576 100644 --- a/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java +++ b/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java @@ -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 @@ import static sun.security.x509.PKIXExtensions.IssuingDistributionPoint_Id; /** * 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. - * + *

    * This class uses the URICertStore class to fetch CRLs. The URICertStore * class also implements CRL caching: see the class description for more * information. diff --git a/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java b/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java index 297727310d4..7751f6a32bf 100644 --- a/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java +++ b/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java @@ -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 @@ class RevocationChecker extends PKIXRevocationChecker { // 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 --git a/src/java.base/share/classes/sun/security/ssl/CertificateVerify.java b/src/java.base/share/classes/sun/security/ssl/CertificateVerify.java index 47fdef0136d..e53775c18cd 100644 --- a/src/java.base/share/classes/sun/security/ssl/CertificateVerify.java +++ b/src/java.base/share/classes/sun/security/ssl/CertificateVerify.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2025, 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 @@ -916,7 +916,7 @@ final class CertificateVerify { throw context.conContext.fatal(Alert.INTERNAL_ERROR, "No supported CertificateVerify signature algorithm for " + x509Possession.popPrivateKey.getAlgorithm() + - " key"); + " key"); } this.signatureScheme = schemeAndSigner.getKey(); diff --git a/src/java.base/share/classes/sun/security/ssl/SignatureScheme.java b/src/java.base/share/classes/sun/security/ssl/SignatureScheme.java index ba9a6f4fc4e..ad8dc5b8bf2 100644 --- a/src/java.base/share/classes/sun/security/ssl/SignatureScheme.java +++ b/src/java.base/share/classes/sun/security/ssl/SignatureScheme.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2025, 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 @@ -541,8 +541,10 @@ enum SignatureScheme { NamedGroupSpec.NAMED_GROUP_ECDHE)) { ECParameterSpec params = x509Possession.getECParameterSpec(); - if (params != null && - ss.namedGroup == NamedGroup.valueOf(params)) { + // RFC 8446 Section 4.2.3: TLS 1.2 signature scheme curve + // doesn't have to match the signing curve. + if (params != null && (!version.useTLS13PlusSpec() + || ss.namedGroup == NamedGroup.valueOf(params))) { Signature signer = ss.getSigner(signingKey); if (signer != null) { return new SimpleImmutableEntry<>(ss, signer); diff --git a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_es.properties b/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_es.properties deleted file mode 100644 index 27015f73454..00000000000 --- a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_es.properties +++ /dev/null @@ -1,302 +0,0 @@ -# -# 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 -# 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. -# - -NEWLINE=\n -STAR=******************************************* -STARNN=*******************************************\n\n -# keytool: Help part -.OPTION.=\u0020[OPTION]... -Options.=Opciones: -option.1.set.twice=La opción %s se ha especificado varias veces. Se ignorarán todas excepto la última. -multiple.commands.1.2=Solo se permite un comando: se ha especificado tanto %1$s como %2$s -Use.keytool.help.for.all.available.commands=Utilice "keytool -help" para todos los comandos disponibles -Key.and.Certificate.Management.Tool=Herramienta de Gestión de Certificados y Claves -Commands.=Comandos: -Use.keytool.command.name.help.for.usage.of.command.name=Utilice "keytool -command_name -help" para la sintaxis de nombre_comando.\nUtilice la opción -conf para especificar un archivo de opciones preconfigurado. -# keytool: help: commands -Generates.a.certificate.request=Genera una solicitud de certificado -Changes.an.entry.s.alias=Cambia un alias de entrada -Deletes.an.entry=Suprime una entrada -Exports.certificate=Exporta el certificado -Generates.a.key.pair=Genera un par de claves -Generates.a.secret.key=Genera un clave secreta -Generates.certificate.from.a.certificate.request=Genera un certificado a partir de una solicitud de certificado -Generates.CRL=Genera CRL -Generated.keyAlgName.secret.key=Clave secreta {0} generada -Generated.keysize.bit.keyAlgName.secret.key=Clave secreta {1} de {0} bits generada -Imports.entries.from.a.JDK.1.1.x.style.identity.database=Importa entradas desde una base de datos de identidades JDK 1.1.x-style -Imports.a.certificate.or.a.certificate.chain=Importa un certificado o una cadena de certificados -Imports.a.password=Importa una contraseña -Imports.one.or.all.entries.from.another.keystore=Importa una o todas las entradas desde otro almacén de claves -Clones.a.key.entry=Clona una entrada de clave -Changes.the.key.password.of.an.entry=Cambia la contraseña de clave de una entrada -Lists.entries.in.a.keystore=Enumera las entradas de un almacén de claves -Prints.the.content.of.a.certificate=Imprime el contenido de un certificado -Prints.the.content.of.a.certificate.request=Imprime el contenido de una solicitud de certificado -Prints.the.content.of.a.CRL.file=Imprime el contenido de un archivo CRL -Generates.a.self.signed.certificate=Genera un certificado autofirmado -Changes.the.store.password.of.a.keystore=Cambia la contraseña de almacén de un almacén de claves -# keytool: help: options -alias.name.of.the.entry.to.process=nombre de alias de la entrada que se va a procesar -destination.alias=alias de destino -destination.key.password=contraseña de clave de destino -destination.keystore.name=nombre de almacén de claves de destino -destination.keystore.password.protected=almacén de claves de destino protegido por contraseña -destination.keystore.provider.name=nombre de proveedor de almacén de claves de destino -destination.keystore.password=contraseña de almacén de claves de destino -destination.keystore.type=tipo de almacén de claves de destino -distinguished.name=nombre distintivo -X.509.extension=extensión X.509 -output.file.name=nombre de archivo de salida -input.file.name=nombre de archivo de entrada -key.algorithm.name=nombre de algoritmo de clave -key.password=contraseña de clave -key.bit.size=tamaño de bit de clave -keystore.name=nombre de almacén de claves -access.the.cacerts.keystore=acceso al almacén de claves cacerts -warning.cacerts.option=Advertencia: Utilice la opción -cacerts para acceder al almacén de claves cacerts -new.password=nueva contraseña -do.not.prompt=no solicitar -password.through.protected.mechanism=contraseña a través de mecanismo protegido -# The following 2 values should span 2 lines, the first for the -# option itself, the second for its -providerArg value. -addprovider.option=agregar proveedor de seguridad por nombre (por ejemplo, SunPKCS11)\nconfigurar elemento para -addprovider -provider.class.option=agregar proveedor de seguridad por nombre de clase totalmente cualificado\nconfigurar argumento para -providerclass - -provider.name=nombre del proveedor -provider.classpath=classpath de proveedor -output.in.RFC.style=salida en estilo RFC -signature.algorithm.name=nombre de algoritmo de firma -source.alias=alias de origen -source.key.password=contraseña de clave de origen -source.keystore.name=nombre de almacén de claves de origen -source.keystore.password.protected=almacén de claves de origen protegido por contraseña -source.keystore.provider.name=nombre de proveedor de almacén de claves de origen -source.keystore.password=contraseña de almacén de claves de origen -source.keystore.type=tipo de almacén de claves de origen -SSL.server.host.and.port=puerto y host del servidor SSL -signed.jar.file=archivo jar firmado -certificate.validity.start.date.time=fecha/hora de inicio de validez del certificado -keystore.password=contraseña de almacén de claves -keystore.type=tipo de almacén de claves -trust.certificates.from.cacerts=certificados de protección de cacerts -verbose.output=salida detallada -validity.number.of.days=número de validez de días -Serial.ID.of.cert.to.revoke=identificador de serie del certificado que se va a revocar -# keytool: Running part -keytool.error.=error de herramienta de claves:\u0020 -Illegal.option.=Opción no permitida: \u0020 -Illegal.value.=Valor no permitido:\u0020 -Unknown.password.type.=Tipo de contraseña desconocido:\u0020 -Cannot.find.environment.variable.=No se ha encontrado la variable del entorno:\u0020 -Cannot.find.file.=No se ha encontrado el archivo:\u0020 -Command.option.flag.needs.an.argument.=La opción de comando {0} necesita un argumento. -Warning.Different.store.and.key.passwords.not.supported.for.PKCS12.KeyStores.Ignoring.user.specified.command.value.=Advertencia: los almacenes de claves en formato PKCS12 no admiten contraseñas de clave y almacenamiento distintas. Se ignorará el valor especificado por el usuario, {0}. -the.keystore.or.storetype.option.cannot.be.used.with.the.cacerts.option=Las opciones -keystore o -storetype no se pueden utilizar con la opción -cacerts -.keystore.must.be.NONE.if.storetype.is.{0}=-keystore debe ser NONE si -storetype es {0} -Too.many.retries.program.terminated=Ha habido demasiados intentos, se ha cerrado el programa -.storepasswd.and.keypasswd.commands.not.supported.if.storetype.is.{0}=Los comandos -storepasswd y -keypasswd no están soportados si -storetype es {0} -.keypasswd.commands.not.supported.if.storetype.is.PKCS12=Los comandos -keypasswd no están soportados si -storetype es PKCS12 -.keypass.and.new.can.not.be.specified.if.storetype.is.{0}=-keypass y -new no se pueden especificar si -storetype es {0} -if.protected.is.specified.then.storepass.keypass.and.new.must.not.be.specified=si se especifica -protected, no deben especificarse -storepass, -keypass ni -new -if.srcprotected.is.specified.then.srcstorepass.and.srckeypass.must.not.be.specified=Si se especifica -srcprotected, no se puede especificar -srcstorepass ni -srckeypass -if.keystore.is.not.password.protected.then.storepass.keypass.and.new.must.not.be.specified=Si keystore no está protegido por contraseña, no se deben especificar -storepass, -keypass ni -new -if.source.keystore.is.not.password.protected.then.srcstorepass.and.srckeypass.must.not.be.specified=Si el almacén de claves de origen no está protegido por contraseña, no se deben especificar -srcstorepass ni -srckeypass -Illegal.startdate.value=Valor de fecha de inicio no permitido -Validity.must.be.greater.than.zero=La validez debe ser mayor que cero -provclass.not.a.provider=%s no es un proveedor -provider.name.not.found=No se ha encontrado el proveedor denominado "%s" -provider.class.not.found=No se ha encontrado el proveedor "%s" -Usage.error.no.command.provided=Error de sintaxis: no se ha proporcionado ningún comando -Source.keystore.file.exists.but.is.empty.=El archivo de almacén de claves de origen existe, pero está vacío:\u0020 -Please.specify.srckeystore=Especifique -srckeystore -Must.not.specify.both.v.and.rfc.with.list.command=No se deben especificar -v y -rfc simultáneamente con el comando 'list' -Key.password.must.be.at.least.6.characters=La contraseña de clave debe tener al menos 6 caracteres -New.password.must.be.at.least.6.characters=La nueva contraseña debe tener al menos 6 caracteres -Keystore.file.exists.but.is.empty.=El archivo de almacén de claves existe, pero está vacío:\u0020 -Keystore.file.does.not.exist.=El archivo de almacén de claves no existe:\u0020 -Must.specify.destination.alias=Se debe especificar un alias de destino -Must.specify.alias=Se debe especificar un alias -Keystore.password.must.be.at.least.6.characters=La contraseña del almacén de claves debe tener al menos 6 caracteres -Enter.the.password.to.be.stored.=Introduzca la contraseña que se va a almacenar: \u0020 -Enter.keystore.password.=Introduzca la contraseña del almacén de claves: \u0020 -Enter.source.keystore.password.=Introduzca la contraseña de almacén de claves de origen: \u0020 -Enter.destination.keystore.password.=Introduzca la contraseña de almacén de claves de destino: \u0020 -Keystore.password.is.too.short.must.be.at.least.6.characters=La contraseña del almacén de claves es demasiado corta, debe tener al menos 6 caracteres -Unknown.Entry.Type=Tipo de Entrada Desconocido -Too.many.failures.Alias.not.changed=Demasiados fallos. No se ha cambiado el alias -Entry.for.alias.alias.successfully.imported.=La entrada del alias {0} se ha importado correctamente. -Entry.for.alias.alias.not.imported.=La entrada del alias {0} no se ha importado. -Problem.importing.entry.for.alias.alias.exception.Entry.for.alias.alias.not.imported.=Problema al importar la entrada del alias {0}: {1}.\nNo se ha importado la entrada del alias {0}. -Import.command.completed.ok.entries.successfully.imported.fail.entries.failed.or.cancelled=Comando de importación completado: {0} entradas importadas correctamente, {1} entradas incorrectas o canceladas -Warning.Overwriting.existing.alias.alias.in.destination.keystore=Advertencia: se sobrescribirá el alias {0} en el almacén de claves de destino -Existing.entry.alias.alias.exists.overwrite.no.=El alias de entrada existente {0} ya existe, ¿desea sobrescribirlo? [no]: \u0020 -Too.many.failures.try.later=Demasiados fallos; inténtelo más adelante -Certification.request.stored.in.file.filename.=Solicitud de certificación almacenada en el archivo <{0}> -Submit.this.to.your.CA=Enviar a la CA -if.alias.not.specified.destalias.and.srckeypass.must.not.be.specified=si no se especifica el alias, no se debe especificar destalias ni srckeypass -The.destination.pkcs12.keystore.has.different.storepass.and.keypass.Please.retry.with.destkeypass.specified.=El almacén de claves pkcs12 de destino tiene storepass y keypass diferentes. Vuelva a intentarlo con -destkeypass especificado. -Certificate.stored.in.file.filename.=Certificado almacenado en el archivo <{0}> -Certificate.reply.was.installed.in.keystore=Se ha instalado la respuesta del certificado en el almacén de claves -Certificate.reply.was.not.installed.in.keystore=No se ha instalado la respuesta del certificado en el almacén de claves -Certificate.was.added.to.keystore=Se ha agregado el certificado al almacén de claves -Certificate.was.not.added.to.keystore=No se ha agregado el certificado al almacén de claves -.Storing.ksfname.=[Almacenando {0}] -alias.has.no.public.key.certificate.={0} no tiene clave pública (certificado) -Cannot.derive.signature.algorithm=No se puede derivar el algoritmo de firma -Alias.alias.does.not.exist=El alias <{0}> no existe -Alias.alias.has.no.certificate=El alias <{0}> no tiene certificado -Key.pair.not.generated.alias.alias.already.exists=No se ha generado el par de claves, el alias <{0}> ya existe -Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for=Generando par de claves {1} de {0} bits para certificado autofirmado ({2}) con una validez de {3} días\n\tpara: {4} -Enter.key.password.for.alias.=Introduzca la contraseña de clave para <{0}> -.RETURN.if.same.as.keystore.password.=\t(INTRO si es la misma contraseña que la del almacén de claves): \u0020 -Key.password.is.too.short.must.be.at.least.6.characters=La contraseña de clave es demasiado corta; debe tener al menos 6 caracteres -Too.many.failures.key.not.added.to.keystore=Demasiados fallos; no se ha agregado la clave al almacén de claves -Destination.alias.dest.already.exists=El alias de destino <{0}> ya existe -Password.is.too.short.must.be.at.least.6.characters=La contraseña es demasiado corta; debe tener al menos 6 caracteres -Too.many.failures.Key.entry.not.cloned=Demasiados fallos. No se ha clonado la entrada de clave -key.password.for.alias.=contraseña de clave para <{0}> -Keystore.entry.for.id.getName.already.exists=La entrada de almacén de claves para <{0}> ya existe -Creating.keystore.entry.for.id.getName.=Creando entrada de almacén de claves para <{0}> ... -No.entries.from.identity.database.added=No se han agregado entradas de la base de datos de identidades -Alias.name.alias=Nombre de Alias: {0} -Creation.date.keyStore.getCreationDate.alias.=Fecha de Creación: {0,date} -alias.keyStore.getCreationDate.alias.={0}, {1,date},\u0020 -alias.={0},\u0020 -Entry.type.type.=Tipo de Entrada: {0} -Certificate.chain.length.=Longitud de la Cadena de Certificado:\u0020 -Certificate.i.1.=Certificado[{0,number,integer}]: -Certificate.fingerprint.SHA.256.=Huella de certificado (SHA-256):\u0020 -Keystore.type.=Tipo de Almacén de Claves:\u0020 -Keystore.provider.=Proveedor de Almacén de Claves:\u0020 -Your.keystore.contains.keyStore.size.entry=Su almacén de claves contiene {0,number,integer} entrada -Your.keystore.contains.keyStore.size.entries=Su almacén de claves contiene {0,number,integer} entradas -Failed.to.parse.input=Fallo al analizar la entrada -Empty.input=Entrada vacía -Not.X.509.certificate=No es un certificado X.509 -alias.has.no.public.key={0} no tiene clave pública -alias.has.no.X.509.certificate={0} no tiene certificado X.509 -New.certificate.self.signed.=Nuevo Certificado (Autofirmado): -Reply.has.no.certificates=La respuesta no tiene certificados -Certificate.not.imported.alias.alias.already.exists=Certificado no importado, el alias <{0}> ya existe -Input.not.an.X.509.certificate=La entrada no es un certificado X.509 -Certificate.already.exists.in.keystore.under.alias.trustalias.=El certificado ya existe en el almacén de claves con el alias <{0}> -Do.you.still.want.to.add.it.no.=¿Aún desea agregarlo? [no]: \u0020 -Certificate.already.exists.in.system.wide.CA.keystore.under.alias.trustalias.=El certificado ya existe en el almacén de claves de la CA del sistema, con el alias <{0}> -Do.you.still.want.to.add.it.to.your.own.keystore.no.=¿Aún desea agregarlo a su propio almacén de claves? [no]: \u0020 -Trust.this.certificate.no.=¿Confiar en este certificado? [no]: \u0020 -YES=SÍ -New.prompt.=Nuevo {0}:\u0020 -Passwords.must.differ=Las contraseñas deben ser distintas -Re.enter.new.prompt.=Vuelva a escribir el nuevo {0}:\u0020 -Re.enter.password.=Vuelva a introducir la contraseña:\u0020 -Re.enter.new.password.=Volver a escribir la contraseña nueva:\u0020 -They.don.t.match.Try.again=No coinciden. Inténtelo de nuevo -Enter.prompt.alias.name.=Escriba el nombre de alias de {0}: \u0020 -Enter.new.alias.name.RETURN.to.cancel.import.for.this.entry.=Indique el nuevo nombre de alias\t(INTRO para cancelar la importación de esta entrada): \u0020 -Enter.alias.name.=Introduzca el nombre de alias: \u0020 -.RETURN.if.same.as.for.otherAlias.=\t(INTRO si es el mismo que para <{0}>) -What.is.your.first.and.last.name.=¿Cuáles son su nombre y su apellido? -What.is.the.name.of.your.organizational.unit.=¿Cuál es el nombre de su unidad de organización? -What.is.the.name.of.your.organization.=¿Cuál es el nombre de su organización? -What.is.the.name.of.your.City.or.Locality.=¿Cuál es el nombre de su ciudad o localidad? -What.is.the.name.of.your.State.or.Province.=¿Cuál es el nombre de su estado o provincia? -What.is.the.two.letter.country.code.for.this.unit.=¿Cuál es el código de país de dos letras de la unidad? -Is.name.correct.=¿Es correcto {0}? -no=no -yes=sí -y=s -.defaultValue.=\u0020 [{0}]: \u0020 -Alias.alias.has.no.key=El alias <{0}> no tiene clave -Alias.alias.references.an.entry.type.that.is.not.a.private.key.entry.The.keyclone.command.only.supports.cloning.of.private.key=El alias <{0}> hace referencia a un tipo de entrada que no es una clave privada. El comando -keyclone sólo permite la clonación de entradas de claves privadas - -.WARNING.WARNING.WARNING.=***************** WARNING WARNING WARNING ***************** -Signer.d.=#%d de Firmante: -Timestamp.=Registro de Hora: -Signature.=Firma: -CRLs.=CRL: -Certificate.owner.=Propietario del Certificado:\u0020 -Not.a.signed.jar.file=No es un archivo jar firmado -No.certificate.from.the.SSL.server=Ningún certificado del servidor SSL - -.The.integrity.of.the.information.stored.in.your.keystore.=* La integridad de la información almacenada en el almacén de claves *\n* NO se ha comprobado. Para comprobar dicha integridad, *\n* debe proporcionar la contraseña del almacén de claves. * -.The.integrity.of.the.information.stored.in.the.srckeystore.=* La integridad de la información almacenada en srckeystore*\n* NO se ha comprobado. Para comprobar dicha integridad, *\n* debe proporcionar la contraseña de srckeystore. * - -Certificate.reply.does.not.contain.public.key.for.alias.=La respuesta de certificado no contiene una clave pública para <{0}> -Incomplete.certificate.chain.in.reply=Cadena de certificado incompleta en la respuesta -Certificate.chain.in.reply.does.not.verify.=La cadena de certificado de la respuesta no verifica:\u0020 -Top.level.certificate.in.reply.=Certificado de nivel superior en la respuesta:\n -.is.not.trusted.=... no es de confianza.\u0020 -Install.reply.anyway.no.=¿Instalar respuesta de todos modos? [no]: \u0020 -NO=NO -Public.keys.in.reply.and.keystore.don.t.match=Las claves públicas en la respuesta y en el almacén de claves no coinciden -Certificate.reply.and.certificate.in.keystore.are.identical=La respuesta del certificado y el certificado en el almacén de claves son idénticos -Failed.to.establish.chain.from.reply=No se ha podido definir una cadena a partir de la respuesta -n=n -Wrong.answer.try.again=Respuesta incorrecta, vuelva a intentarlo -Secret.key.not.generated.alias.alias.already.exists=No se ha generado la clave secreta, el alias <{0}> ya existe -Please.provide.keysize.for.secret.key.generation=Proporcione el valor de -keysize para la generación de claves secretas - -warning.not.verified.make.sure.keystore.is.correct=ADVERTENCIA: no se ha verificado. Asegúrese de que el valor de -keystore es correcto. - -Extensions.=Extensiones:\u0020 -.Empty.value.=(Valor vacío) -Extension.Request.=Solicitud de Extensión: -Unknown.keyUsage.type.=Tipo de uso de clave desconocido:\u0020 -Unknown.extendedkeyUsage.type.=Tipo de uso de clave extendida desconocido:\u0020 -Unknown.AccessDescription.type.=Tipo de descripción de acceso desconocido:\u0020 -Unrecognized.GeneralName.type.=Tipo de nombre general no reconocido:\u0020 -This.extension.cannot.be.marked.as.critical.=Esta extensión no se puede marcar como crítica.\u0020 -Odd.number.of.hex.digits.found.=Se ha encontrado un número impar de dígitos hexadecimales:\u0020 -Unknown.extension.type.=Tipo de extensión desconocida:\u0020 -command.{0}.is.ambiguous.=El comando {0} es ambiguo: -# 8171319: keytool should print out warnings when reading or -# generating cert/cert req using weak algorithms -the.certificate.request=La solicitud de certificado -the.issuer=El emisor -the.generated.certificate=El certificado generado -the.generated.crl=La CRL generada -the.generated.certificate.request=La solicitud de certificado generada -the.certificate=El certificado -the.crl=La CRL -the.tsa.certificate=El certificado de TSA -the.input=La entrada -reply=Responder -one.in.many=%1$s #%2$d de %3$d -alias.in.cacerts=Emisor <%s> en cacerts -alias.in.keystore=Emisor <%s> -with.weak=%s (débil) -key.bit=Clave %2$s de %1$d bits -key.bit.weak=Clave %2$s de %1$d bits (débil) -unknown.size.1=clave %s de tamaño desconocido -.PATTERN.printX509Cert.with.weak=Propietario: {0}\nEmisor: {1}\nNúmero de serie: {2}\nVálido desde: {3} hasta: {4}\nHuellas digitales del certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNombre del algoritmo de firma: {7}\nAlgoritmo de clave pública de asunto: {8}\nVersión: {9} -PKCS.10.with.weak=Solicitud de certificado PKCS #10 (Versión 1.0)\nAsunto: %1$s\nFormato: %2$s\nClave pública: %3$s\nAlgoritmo de firma: %4$s\n -verified.by.s.in.s.weak=Verificado por %1$s en %2$s con %3$s -whose.sigalg.risk=%1$s utiliza el algoritmo de firma %2$s, lo que se considera un riesgo de seguridad. -whose.key.risk=%1$s utiliza %2$s, lo que se considera riesgo de seguridad. -jks.storetype.warning=El almacén de claves %1$s utiliza un formato propietario. Se recomienda migrar a PKCS12, que es un formato estándar del sector que utiliza "keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12". -migrate.keystore.warning=Se ha migrado "%1$s" a %4$s. Se ha realizado la copia de seguridad del almacén de claves %2$s como "%3$s". -backup.keystore.warning=La copia de seguridad del almacén de claves "%1$s" se ha realizado como "%3$s"... -importing.keystore.status=Importando el almacén de claves de %1$s a %2$s... diff --git a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_fr.properties b/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_fr.properties deleted file mode 100644 index c1c5f28149e..00000000000 --- a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_fr.properties +++ /dev/null @@ -1,302 +0,0 @@ -# -# 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 -# 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. -# - -NEWLINE=\n -STAR=******************************************* -STARNN=*******************************************\n\n -# keytool: Help part -.OPTION.=\u0020[OPTION]... -Options.=Options : -option.1.set.twice=L'option %s est spécifiée plusieurs fois. Toutes les occurrences seront ignorées, sauf la dernière. -multiple.commands.1.2=Une seule commande est autorisée : %1$s et %2$s ont été spécifiées. -Use.keytool.help.for.all.available.commands=Utiliser "keytool -help" pour toutes les commandes disponibles -Key.and.Certificate.Management.Tool=Outil de gestion de certificats et de clés -Commands.=Commandes : -Use.keytool.command.name.help.for.usage.of.command.name=Utilisez "keytool -command_name -help" pour la syntaxe de command_name.\nUtilisez l'option -conf pour indiquer un fichier d'options préconfigurées. -# keytool: help: commands -Generates.a.certificate.request=Génère une demande de certificat -Changes.an.entry.s.alias=Modifie l'alias d'une entrée -Deletes.an.entry=Supprime une entrée -Exports.certificate=Exporte le certificat -Generates.a.key.pair=Génère une paire de clés -Generates.a.secret.key=Génère une clé secrète -Generates.certificate.from.a.certificate.request=Génère le certificat à partir d'une demande de certificat -Generates.CRL=Génère la liste des certificats révoqués (CRL) -Generated.keyAlgName.secret.key=Clé secrète {0} générée -Generated.keysize.bit.keyAlgName.secret.key=Clé secrète {0} bits {1} générée -Imports.entries.from.a.JDK.1.1.x.style.identity.database=Importe les entrées à partir d'une base de données d'identités de type JDK 1.1.x -Imports.a.certificate.or.a.certificate.chain=Importe un certificat ou une chaîne de certificat -Imports.a.password=Importe un mot de passe -Imports.one.or.all.entries.from.another.keystore=Importe une entrée ou la totalité des entrées depuis un autre fichier de clés -Clones.a.key.entry=Clone une entrée de clé -Changes.the.key.password.of.an.entry=Modifie le mot de passe de clé d'une entrée -Lists.entries.in.a.keystore=Répertorie les entrées d'un fichier de clés -Prints.the.content.of.a.certificate=Imprime le contenu d'un certificat -Prints.the.content.of.a.certificate.request=Imprime le contenu d'une demande de certificat -Prints.the.content.of.a.CRL.file=Imprime le contenu d'un fichier de liste des certificats révoqués (CRL) -Generates.a.self.signed.certificate=Génère un certificat auto-signé -Changes.the.store.password.of.a.keystore=Modifie le mot de passe de banque d'un fichier de clés -# keytool: help: options -alias.name.of.the.entry.to.process=nom d'alias de l'entrée à traiter -destination.alias=alias de destination -destination.key.password=mot de passe de la clé de destination -destination.keystore.name=nom du fichier de clés de destination -destination.keystore.password.protected=mot de passe du fichier de clés de destination protégé -destination.keystore.provider.name=nom du fournisseur du fichier de clés de destination -destination.keystore.password=mot de passe du fichier de clés de destination -destination.keystore.type=type du fichier de clés de destination -distinguished.name=nom distinctif -X.509.extension=extension X.509 -output.file.name=nom du fichier de sortie -input.file.name=nom du fichier d'entrée -key.algorithm.name=nom de l'algorithme de clé -key.password=mot de passe de la clé -key.bit.size=taille en bits de la clé -keystore.name=nom du fichier de clés -access.the.cacerts.keystore=accéder au fichier de clés cacerts -warning.cacerts.option=Avertissement : utiliser l'option -cacerts pour accéder au fichier de clés cacerts -new.password=nouveau mot de passe -do.not.prompt=ne pas inviter -password.through.protected.mechanism=mot de passe via mécanisme protégé -# The following 2 values should span 2 lines, the first for the -# option itself, the second for its -providerArg value. -addprovider.option=ajouter un fournisseur de sécurité par nom (par ex. SunPKCS11)\nconfigurer l'argument pour -addprovider -provider.class.option=ajouter un fournisseur de sécurité par nom de classe qualifié complet\nconfigurer l'argument pour -providerclass - -provider.name=nom du fournisseur -provider.classpath=variable d'environnement CLASSPATH du fournisseur -output.in.RFC.style=sortie au style RFC -signature.algorithm.name=nom de l'algorithme de signature -source.alias=alias source -source.key.password=mot de passe de la clé source -source.keystore.name=nom du fichier de clés source -source.keystore.password.protected=mot de passe du fichier de clés source protégé -source.keystore.provider.name=nom du fournisseur du fichier de clés source -source.keystore.password=mot de passe du fichier de clés source -source.keystore.type=type du fichier de clés source -SSL.server.host.and.port=Port et hôte du serveur SSL -signed.jar.file=fichier JAR signé -certificate.validity.start.date.time=date/heure de début de validité du certificat -keystore.password=mot de passe du fichier de clés -keystore.type=type du fichier de clés -trust.certificates.from.cacerts=certificats sécurisés issus de certificats CA -verbose.output=sortie en mode verbose -validity.number.of.days=nombre de jours de validité -Serial.ID.of.cert.to.revoke=ID de série du certificat à révoquer -# keytool: Running part -keytool.error.=erreur keytool :\u0020 -Illegal.option.=Option non admise : \u0020 -Illegal.value.=Valeur non admise :\u0020 -Unknown.password.type.=Type de mot de passe inconnu :\u0020 -Cannot.find.environment.variable.=Variable d'environnement introuvable :\u0020 -Cannot.find.file.=Fichier introuvable :\u0020 -Command.option.flag.needs.an.argument.=L''option de commande {0} requiert un argument. -Warning.Different.store.and.key.passwords.not.supported.for.PKCS12.KeyStores.Ignoring.user.specified.command.value.=Avertissement : les mots de passe de clé et de banque distincts ne sont pas pris en charge pour les fichiers de clés d''accès PKCS12. La valeur {0} spécifiée par l''utilisateur est ignorée. -the.keystore.or.storetype.option.cannot.be.used.with.the.cacerts.option=Les options -keystore ou -storetype ne peuvent pas être utilisées avec l'option -cacerts -.keystore.must.be.NONE.if.storetype.is.{0}=-keystore doit être défini sur NONE si -storetype est {0} -Too.many.retries.program.terminated=Trop de tentatives, fin du programme -.storepasswd.and.keypasswd.commands.not.supported.if.storetype.is.{0}=Les commandes -storepasswd et -keypasswd ne sont pas prises en charge si -storetype est défini sur {0} -.keypasswd.commands.not.supported.if.storetype.is.PKCS12=Les commandes -keypasswd ne sont pas prises en charge si -storetype est défini sur PKCS12 -.keypass.and.new.can.not.be.specified.if.storetype.is.{0}=Les commandes -keypass et -new ne peuvent pas être spécifiées si -storetype est défini sur {0} -if.protected.is.specified.then.storepass.keypass.and.new.must.not.be.specified=si -protected est spécifié, -storepass, -keypass et -new ne doivent pas être indiqués -if.srcprotected.is.specified.then.srcstorepass.and.srckeypass.must.not.be.specified=Si -srcprotected est indiqué, les commandes -srcstorepass et -srckeypass ne doivent pas être spécifiées -if.keystore.is.not.password.protected.then.storepass.keypass.and.new.must.not.be.specified=Si le fichier de clés n'est pas protégé par un mot de passe, les commandes -storepass, -keypass et -new ne doivent pas être spécifiées -if.source.keystore.is.not.password.protected.then.srcstorepass.and.srckeypass.must.not.be.specified=Si le fichier de clés source n'est pas protégé par un mot de passe, les commandes -srcstorepass et -srckeypass ne doivent pas être spécifiées -Illegal.startdate.value=Valeur de date de début non admise -Validity.must.be.greater.than.zero=La validité doit être supérieure à zéro -provclass.not.a.provider=%s n'est pas un fournisseur -provider.name.not.found=Fournisseur nommé "%s" introuvable -provider.class.not.found=Fournisseur "%s" introuvable -Usage.error.no.command.provided=Erreur de syntaxe : aucune commande fournie -Source.keystore.file.exists.but.is.empty.=Le fichier de clés source existe mais il est vide :\u0020 -Please.specify.srckeystore=Indiquez -srckeystore -Must.not.specify.both.v.and.rfc.with.list.command=-v et -rfc ne doivent pas être spécifiés avec la commande 'list' -Key.password.must.be.at.least.6.characters=Un mot de passe de clé doit comporter au moins 6 caractères -New.password.must.be.at.least.6.characters=Le nouveau mot de passe doit comporter au moins 6 caractères -Keystore.file.exists.but.is.empty.=Fichier de clés existant mais vide :\u0020 -Keystore.file.does.not.exist.=Le fichier de clés n'existe pas :\u0020 -Must.specify.destination.alias=L'alias de destination doit être spécifié -Must.specify.alias=L'alias doit être spécifié -Keystore.password.must.be.at.least.6.characters=Un mot de passe de fichier de clés doit comporter au moins 6 caractères -Enter.the.password.to.be.stored.=Saisissez le mot de passe à stocker : \u0020 -Enter.keystore.password.=Entrez le mot de passe du fichier de clés : \u0020 -Enter.source.keystore.password.=Entrez le mot de passe du fichier de clés source : \u0020 -Enter.destination.keystore.password.=Entrez le mot de passe du fichier de clés de destination : \u0020 -Keystore.password.is.too.short.must.be.at.least.6.characters=Le mot de passe du fichier de clés est trop court : il doit comporter au moins 6 caractères -Unknown.Entry.Type=Type d'entrée inconnu -Too.many.failures.Alias.not.changed=Trop d'erreurs. Alias non modifié -Entry.for.alias.alias.successfully.imported.=L''entrée de l''alias {0} a été importée. -Entry.for.alias.alias.not.imported.=L''entrée de l''alias {0} n''a pas été importée. -Problem.importing.entry.for.alias.alias.exception.Entry.for.alias.alias.not.imported.=Problème lors de l''import de l''entrée de l''alias {0} : {1}.\nL''entrée de l''alias {0} n''a pas été importée. -Import.command.completed.ok.entries.successfully.imported.fail.entries.failed.or.cancelled=Commande d''import exécutée : {0} entrées importées, échec ou annulation de {1} entrées -Warning.Overwriting.existing.alias.alias.in.destination.keystore=Avertissement : l''alias {0} existant sera remplacé dans le fichier de clés d''accès de destination -Existing.entry.alias.alias.exists.overwrite.no.=L''alias d''entrée {0} existe déjà. Voulez-vous le remplacer ? [non] : \u0020 -Too.many.failures.try.later=Trop d'erreurs. Réessayez plus tard -Certification.request.stored.in.file.filename.=Demande de certification stockée dans le fichier <{0}> -Submit.this.to.your.CA=Soumettre à votre CA -if.alias.not.specified.destalias.and.srckeypass.must.not.be.specified=si l'alias n'est pas spécifié, destalias et srckeypass ne doivent pas être spécifiés -The.destination.pkcs12.keystore.has.different.storepass.and.keypass.Please.retry.with.destkeypass.specified.=Le fichier de clés pkcs12 de destination contient un mot de passe de fichier de clés et un mot de passe de clé différents. Réessayez en spécifiant -destkeypass. -Certificate.stored.in.file.filename.=Certificat stocké dans le fichier <{0}> -Certificate.reply.was.installed.in.keystore=Réponse de certificat installée dans le fichier de clés -Certificate.reply.was.not.installed.in.keystore=Réponse de certificat non installée dans le fichier de clés -Certificate.was.added.to.keystore=Certificat ajouté au fichier de clés -Certificate.was.not.added.to.keystore=Certificat non ajouté au fichier de clés -.Storing.ksfname.=[Stockage de {0}] -alias.has.no.public.key.certificate.={0} ne possède pas de clé publique (certificat) -Cannot.derive.signature.algorithm=Impossible de déduire l'algorithme de signature -Alias.alias.does.not.exist=L''alias <{0}> n''existe pas -Alias.alias.has.no.certificate=L''alias <{0}> ne possède pas de certificat -Key.pair.not.generated.alias.alias.already.exists=Paire de clés non générée, l''alias <{0}> existe déjà -Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for=Génération d''une paire de clés {1} de {0} bits et d''un certificat auto-signé ({2}) d''une validité de {3} jours\n\tpour : {4} -Enter.key.password.for.alias.=Entrez le mot de passe de la clé pour <{0}> -.RETURN.if.same.as.keystore.password.=\t(appuyez sur Entrée s'il s'agit du mot de passe du fichier de clés) : \u0020 -Key.password.is.too.short.must.be.at.least.6.characters=Le mot de passe de la clé est trop court : il doit comporter au moins 6 caractères -Too.many.failures.key.not.added.to.keystore=Trop d'erreurs. Clé non ajoutée au fichier de clés -Destination.alias.dest.already.exists=L''alias de la destination <{0}> existe déjà -Password.is.too.short.must.be.at.least.6.characters=Le mot de passe est trop court : il doit comporter au moins 6 caractères -Too.many.failures.Key.entry.not.cloned=Trop d'erreurs. Entrée de clé non clonée -key.password.for.alias.=mot de passe de clé pour <{0}> -Keystore.entry.for.id.getName.already.exists=L''entrée de fichier de clés d''accès pour <{0}> existe déjà -Creating.keystore.entry.for.id.getName.=Création d''une entrée de fichier de clés d''accès pour <{0}>... -No.entries.from.identity.database.added=Aucune entrée ajoutée à partir de la base de données d'identités -Alias.name.alias=Nom d''alias : {0} -Creation.date.keyStore.getCreationDate.alias.=Date de création : {0,date} -alias.keyStore.getCreationDate.alias.={0}, {1,date},\u0020 -alias.={0},\u0020 -Entry.type.type.=Type d''entrée : {0} -Certificate.chain.length.=Longueur de chaîne du certificat :\u0020 -Certificate.i.1.=Certificat[{0,number,integer}]: -Certificate.fingerprint.SHA.256.=Empreinte du certificat (SHA-256) :\u0020 -Keystore.type.=Type de fichier de clés :\u0020 -Keystore.provider.=Fournisseur de fichier de clés :\u0020 -Your.keystore.contains.keyStore.size.entry=Votre fichier de clés d''accès contient {0,number,integer} entrée -Your.keystore.contains.keyStore.size.entries=Votre fichier de clés d''accès contient {0,number,integer} entrées -Failed.to.parse.input=L'analyse de l'entrée a échoué -Empty.input=Entrée vide -Not.X.509.certificate=Pas un certificat X.509 -alias.has.no.public.key={0} ne possède pas de clé publique -alias.has.no.X.509.certificate={0} ne possède pas de certificat X.509 -New.certificate.self.signed.=Nouveau certificat (auto-signé) : -Reply.has.no.certificates=La réponse n'a pas de certificat -Certificate.not.imported.alias.alias.already.exists=Certificat non importé, l''alias <{0}> existe déjà -Input.not.an.X.509.certificate=L'entrée n'est pas un certificat X.509 -Certificate.already.exists.in.keystore.under.alias.trustalias.=Le certificat existe déjà dans le fichier de clés d''accès sous l''alias <{0}> -Do.you.still.want.to.add.it.no.=Voulez-vous toujours l'ajouter ? [non] : \u0020 -Certificate.already.exists.in.system.wide.CA.keystore.under.alias.trustalias.=Le certificat existe déjà dans le fichier de clés d''accès CA système sous l''alias <{0}> -Do.you.still.want.to.add.it.to.your.own.keystore.no.=Voulez-vous toujours l'ajouter à votre fichier de clés ? [non] : \u0020 -Trust.this.certificate.no.=Faire confiance à ce certificat ? [non] : \u0020 -YES=OUI -New.prompt.=Nouveau {0} :\u0020 -Passwords.must.differ=Les mots de passe doivent différer -Re.enter.new.prompt.=Indiquez encore le nouveau {0} :\u0020 -Re.enter.password.=Répétez le mot de passe :\u0020 -Re.enter.new.password.=Ressaisissez le nouveau mot de passe :\u0020 -They.don.t.match.Try.again=Ils sont différents. Réessayez. -Enter.prompt.alias.name.=Indiquez le nom d''alias {0} : \u0020 -Enter.new.alias.name.RETURN.to.cancel.import.for.this.entry.=Saisissez le nom du nouvel alias\t(ou appuyez sur Entrée pour annuler l'import de cette entrée) : \u0020 -Enter.alias.name.=Indiquez le nom d'alias : \u0020 -.RETURN.if.same.as.for.otherAlias.=\t(appuyez sur Entrée si le résultat est identique à <{0}>) -What.is.your.first.and.last.name.=Quels sont vos nom et prénom ? -What.is.the.name.of.your.organizational.unit.=Quel est le nom de votre unité organisationnelle ? -What.is.the.name.of.your.organization.=Quel est le nom de votre entreprise ? -What.is.the.name.of.your.City.or.Locality.=Quel est le nom de votre ville de résidence ? -What.is.the.name.of.your.State.or.Province.=Quel est le nom de votre état ou province ? -What.is.the.two.letter.country.code.for.this.unit.=Quel est le code pays à deux lettres pour cette unité ? -Is.name.correct.=Est-ce {0} ? -no=non -yes=oui -y=o -.defaultValue.=\u0020 [{0}]: \u0020 -Alias.alias.has.no.key=L''alias <{0}> n''est associé à aucune clé -Alias.alias.references.an.entry.type.that.is.not.a.private.key.entry.The.keyclone.command.only.supports.cloning.of.private.key=L''entrée à laquelle l''alias <{0}> fait référence n''est pas une entrée de type clé privée. La commande -keyclone prend uniquement en charge le clonage des clés privées - -.WARNING.WARNING.WARNING.=***************** WARNING WARNING WARNING ***************** -Signer.d.=Signataire n°%d : -Timestamp.=Horodatage : -Signature.=Signature : -CRLs.=Listes des certificats révoqués (CRL) : -Certificate.owner.=Propriétaire du certificat :\u0020 -Not.a.signed.jar.file=Fichier JAR non signé -No.certificate.from.the.SSL.server=Aucun certificat du serveur SSL - -.The.integrity.of.the.information.stored.in.your.keystore.=* L'intégrité des informations stockées dans votre fichier de clés *\n* n'a PAS été vérifiée. Pour cela, *\n* vous devez fournir le mot de passe de votre fichier de clés. * -.The.integrity.of.the.information.stored.in.the.srckeystore.=* L'intégrité des informations stockées dans le fichier de clés source *\n* n'a PAS été vérifiée. Pour cela, *\n* vous devez fournir le mot de passe de votre fichier de clés source. * - -Certificate.reply.does.not.contain.public.key.for.alias.=La réponse au certificat ne contient pas de clé publique pour <{0}> -Incomplete.certificate.chain.in.reply=Chaîne de certificat incomplète dans la réponse -Certificate.chain.in.reply.does.not.verify.=La chaîne de certificat de la réponse ne concorde pas :\u0020 -Top.level.certificate.in.reply.=Certificat de niveau supérieur dans la réponse :\n -.is.not.trusted.=... non sécurisé.\u0020 -Install.reply.anyway.no.=Installer la réponse quand même ? [non] : \u0020 -NO=NON -Public.keys.in.reply.and.keystore.don.t.match=Les clés publiques de la réponse et du fichier de clés ne concordent pas -Certificate.reply.and.certificate.in.keystore.are.identical=La réponse au certificat et le certificat du fichier de clés sont identiques -Failed.to.establish.chain.from.reply=Impossible de créer une chaîne à partir de la réponse -n=n -Wrong.answer.try.again=Réponse incorrecte, recommencez -Secret.key.not.generated.alias.alias.already.exists=Clé secrète non générée, l''alias <{0}> existe déjà -Please.provide.keysize.for.secret.key.generation=Indiquez -keysize pour la génération de la clé secrète - -warning.not.verified.make.sure.keystore.is.correct=AVERTISSEMENT : non vérifié. Assurez-vous que -keystore est correct. - -Extensions.=Extensions :\u0020 -.Empty.value.=(Valeur vide) -Extension.Request.=Demande d'extension : -Unknown.keyUsage.type.=Type keyUsage inconnu :\u0020 -Unknown.extendedkeyUsage.type.=Type extendedkeyUsage inconnu :\u0020 -Unknown.AccessDescription.type.=Type AccessDescription inconnu :\u0020 -Unrecognized.GeneralName.type.=Type GeneralName non reconnu :\u0020 -This.extension.cannot.be.marked.as.critical.=Cette extension ne peut pas être marquée comme critique.\u0020 -Odd.number.of.hex.digits.found.=Nombre impair de chiffres hexadécimaux trouvé :\u0020 -Unknown.extension.type.=Type d'extension inconnu :\u0020 -command.{0}.is.ambiguous.=commande {0} ambiguë : -# 8171319: keytool should print out warnings when reading or -# generating cert/cert req using weak algorithms -the.certificate.request=Demande de certificat -the.issuer=Emetteur -the.generated.certificate=Certificat généré -the.generated.crl=Liste des certificats révoqués générée -the.generated.certificate.request=Demande de certificat généré -the.certificate=Certificat -the.crl=Liste de certificats révoqués -the.tsa.certificate=Certificat TSA -the.input=Entrée -reply=Répondre -one.in.many=%1$s #%2$d sur %3$d -alias.in.cacerts=Emetteur <%s> dans les certificats CA -alias.in.keystore=Emetteur <%s> -with.weak=%s (faible) -key.bit=Clé %2$s %1$d bits -key.bit.weak=Clé %2$s %1$d bits (faible) -unknown.size.1=taille de clé %s inconnue -.PATTERN.printX509Cert.with.weak=Propriétaire : {0}\nEmetteur : {1}\nNuméro de série : {2}\nValide du {3} au {4}\nEmpreintes du certificat :\n\t SHA 1: {5}\n\t SHA 256: {6}\nNom de l''algorithme de signature : {7}\nAlgorithme de clé publique du sujet : {8}\nVersion : {9} -PKCS.10.with.weak=Demande de certificat PKCS #10 (version 1.0)\nSujet : %1$s\nFormat : %2$s\nClé publique : %3$s\nAlgorithme de signature : %4$s\n -verified.by.s.in.s.weak=Vérifié par %1$s dans %2$s avec un élément %3$s -whose.sigalg.risk=%1$s utilise l'algorithme de signature %2$s, qui représente un risque pour la sécurité. -whose.key.risk=%1$s utilise un élément %2$s, qui représente un risque pour la sécurité. -jks.storetype.warning=Le fichier de clés %1$s utilise un format propriétaire. Il est recommandé de migrer vers PKCS12, qui est un format standard de l'industrie en utilisant "keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12". -migrate.keystore.warning=Elément "%1$s" migré vers %4$s. Le fichier de clés %2$s est sauvegardé en tant que "%3$s". -backup.keystore.warning=Le fichier de clés d'origine "%1$s" est sauvegardé en tant que "%3$s"... -importing.keystore.status=Import du fichier de clés %1$s vers %2$s... diff --git a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_it.properties b/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_it.properties deleted file mode 100644 index d2709d5843d..00000000000 --- a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_it.properties +++ /dev/null @@ -1,302 +0,0 @@ -# -# 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 -# 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. -# - -NEWLINE=\n -STAR=******************************************* -STARNN=*******************************************\n\n -# keytool: Help part -.OPTION.=\u0020[OPTION]... -Options.=Opzioni: -option.1.set.twice=L'opzione %s è specificata più volte. Tutte le ricorrenze verranno ignorate tranne l'ultima. -multiple.commands.1.2=È consentito un solo comando: è stato specificato sia %1$s che %2$s. -Use.keytool.help.for.all.available.commands=Utilizzare "keytool -help" per visualizzare tutti i comandi disponibili -Key.and.Certificate.Management.Tool=Strumento di gestione di chiavi e certificati -Commands.=Comandi: -Use.keytool.command.name.help.for.usage.of.command.name=Utilizzare "keytool -command_name -help" per informazioni sull'uso di command_name.\nUtilizzare l'opzione -conf per specificare un file di opzioni preconfigurato. -# keytool: help: commands -Generates.a.certificate.request=Genera una richiesta di certificato -Changes.an.entry.s.alias=Modifica l'alias di una voce -Deletes.an.entry=Elimina una voce -Exports.certificate=Esporta il certificato -Generates.a.key.pair=Genera una coppia di chiavi -Generates.a.secret.key=Genera una chiave segreta -Generates.certificate.from.a.certificate.request=Genera un certificato da una richiesta di certificato -Generates.CRL=Genera CRL -Generated.keyAlgName.secret.key=Generata chiave segreta {0} -Generated.keysize.bit.keyAlgName.secret.key=Generata chiave segreta {1} a {0} bit -Imports.entries.from.a.JDK.1.1.x.style.identity.database=Importa le voci da un database delle identità di tipo JDK 1.1.x -Imports.a.certificate.or.a.certificate.chain=Importa un certificato o una catena di certificati -Imports.a.password=Importa una password -Imports.one.or.all.entries.from.another.keystore=Importa una o tutte le voci da un altro keystore -Clones.a.key.entry=Duplica una voce di chiave -Changes.the.key.password.of.an.entry=Modifica la password della chiave per una voce -Lists.entries.in.a.keystore=Elenca le voci in un keystore -Prints.the.content.of.a.certificate=Visualizza i contenuti di un certificato -Prints.the.content.of.a.certificate.request=Visualizza i contenuti di una richiesta di certificato -Prints.the.content.of.a.CRL.file=Visualizza i contenuti di un file CRL -Generates.a.self.signed.certificate=Genera certificato con firma automatica -Changes.the.store.password.of.a.keystore=Modifica la password di area di memorizzazione di un keystore -# keytool: help: options -alias.name.of.the.entry.to.process=nome alias della voce da elaborare -destination.alias=alias di destinazione -destination.key.password=password chiave di destinazione -destination.keystore.name=nome keystore di destinazione -destination.keystore.password.protected=password keystore di destinazione protetta -destination.keystore.provider.name=nome provider keystore di destinazione -destination.keystore.password=password keystore di destinazione -destination.keystore.type=tipo keystore di destinazione -distinguished.name=nome distinto -X.509.extension=estensione X.509 -output.file.name=nome file di output -input.file.name=nome file di input -key.algorithm.name=nome algoritmo chiave -key.password=password chiave -key.bit.size=dimensione bit chiave -keystore.name=nome keystore -access.the.cacerts.keystore=accedi al keystore cacerts -warning.cacerts.option=Avvertenza: utilizzare l'opzione -cacerts per accedere al keystore cacerts -new.password=nuova password -do.not.prompt=non richiedere -password.through.protected.mechanism=password mediante meccanismo protetto -# The following 2 values should span 2 lines, the first for the -# option itself, the second for its -providerArg value. -addprovider.option=aggiunge il provider di sicurezza in base al nome (ad esempio SunPKCS11)\nconfigura l'argomento per -addprovider -provider.class.option=aggiunge il provider di sicurezza in base al nome di classe completamente qualificato\nconfigura l'argomento per -providerclass - -provider.name=nome provider -provider.classpath=classpath provider -output.in.RFC.style=output in stile RFC -signature.algorithm.name=nome algoritmo firma -source.alias=alias origine -source.key.password=password chiave di origine -source.keystore.name=nome keystore di origine -source.keystore.password.protected=password keystore di origine protetta -source.keystore.provider.name=nome provider keystore di origine -source.keystore.password=password keystore di origine -source.keystore.type=tipo keystore di origine -SSL.server.host.and.port=host e porta server SSL -signed.jar.file=file jar firmato -certificate.validity.start.date.time=data/ora di inizio validità certificato -keystore.password=password keystore -keystore.type=tipo keystore -trust.certificates.from.cacerts=considera sicuri i certificati da cacerts -verbose.output=output descrittivo -validity.number.of.days=numero di giorni di validità -Serial.ID.of.cert.to.revoke=ID seriale del certificato da revocare -# keytool: Running part -keytool.error.=Errore keytool:\u0020 -Illegal.option.=Opzione non valida: \u0020 -Illegal.value.=Valore non valido:\u0020 -Unknown.password.type.=Tipo di password sconosciuto:\u0020 -Cannot.find.environment.variable.=Impossibile trovare la variabile di ambiente:\u0020 -Cannot.find.file.=Impossibile trovare il file:\u0020 -Command.option.flag.needs.an.argument.=È necessario specificare un argomento per l''opzione di comando {0}. -Warning.Different.store.and.key.passwords.not.supported.for.PKCS12.KeyStores.Ignoring.user.specified.command.value.=Avvertenza: non sono supportate password diverse di chiave e di archivio per i keystore PKCS12. Il valore {0} specificato dall''utente verrà ignorato. -the.keystore.or.storetype.option.cannot.be.used.with.the.cacerts.option=L'opzione -keystore o -storetype non può essere utilizzata con l'opzione -cacerts -.keystore.must.be.NONE.if.storetype.is.{0}=Se -storetype è impostato su {0}, -keystore deve essere impostato su NONE -Too.many.retries.program.terminated=Il numero dei tentativi consentiti è stato superato. Il programma verrà terminato. -.storepasswd.and.keypasswd.commands.not.supported.if.storetype.is.{0}=Se -storetype è impostato su {0}, i comandi -storepasswd e -keypasswd non sono supportati -.keypasswd.commands.not.supported.if.storetype.is.PKCS12=Se -storetype è impostato su PKCS12 i comandi -keypasswd non vengono supportati -.keypass.and.new.can.not.be.specified.if.storetype.is.{0}=Se -storetype è impostato su {0}, non è possibile specificare un valore per -keypass e -new -if.protected.is.specified.then.storepass.keypass.and.new.must.not.be.specified=Se è specificata l'opzione -protected, le opzioni -storepass, -keypass e -new non possono essere specificate -if.srcprotected.is.specified.then.srcstorepass.and.srckeypass.must.not.be.specified=Se viene specificato -srcprotected, -srcstorepass e -srckeypass non dovranno essere specificati -if.keystore.is.not.password.protected.then.storepass.keypass.and.new.must.not.be.specified=Se il file keystore non è protetto da password, non deve essere specificato alcun valore per -storepass, -keypass e -new -if.source.keystore.is.not.password.protected.then.srcstorepass.and.srckeypass.must.not.be.specified=Se il file keystore non è protetto da password, non deve essere specificato alcun valore per -srcstorepass e -srckeypass -Illegal.startdate.value=Valore di data di inizio non valido -Validity.must.be.greater.than.zero=La validità deve essere maggiore di zero -provclass.not.a.provider=%s non è un provider -provider.name.not.found=Provider denominato "%s" non trovato -provider.class.not.found=Provider "%s" non trovato -Usage.error.no.command.provided=Errore di utilizzo: nessun comando specificato -Source.keystore.file.exists.but.is.empty.=Il file keystore di origine esiste, ma è vuoto:\u0020 -Please.specify.srckeystore=Specificare -srckeystore -Must.not.specify.both.v.and.rfc.with.list.command=Impossibile specificare sia -v sia -rfc con il comando 'list' -Key.password.must.be.at.least.6.characters=La password della chiave deve contenere almeno 6 caratteri -New.password.must.be.at.least.6.characters=La nuova password deve contenere almeno 6 caratteri -Keystore.file.exists.but.is.empty.=Il file keystore esiste ma è vuoto:\u0020 -Keystore.file.does.not.exist.=Il file keystore non esiste:\u0020 -Must.specify.destination.alias=È necessario specificare l'alias di destinazione -Must.specify.alias=È necessario specificare l'alias -Keystore.password.must.be.at.least.6.characters=La password del keystore deve contenere almeno 6 caratteri -Enter.the.password.to.be.stored.=Immettere la password da memorizzare: \u0020 -Enter.keystore.password.=Immettere la password del keystore: \u0020 -Enter.source.keystore.password.=Immettere la password del keystore di origine: \u0020 -Enter.destination.keystore.password.=Immettere la password del keystore di destinazione: \u0020 -Keystore.password.is.too.short.must.be.at.least.6.characters=La password del keystore è troppo corta - deve contenere almeno 6 caratteri -Unknown.Entry.Type=Tipo di voce sconosciuto -Too.many.failures.Alias.not.changed=Numero eccessivo di errori. L'alias non è stato modificato. -Entry.for.alias.alias.successfully.imported.=La voce dell''alias {0} è stata importata. -Entry.for.alias.alias.not.imported.=La voce dell''alias {0} non è stata importata. -Problem.importing.entry.for.alias.alias.exception.Entry.for.alias.alias.not.imported.=Si è verificato un problema durante l''importazione della voce dell''alias {0}: {1}.\nLa voce dell''alias {0} non è stata importata. -Import.command.completed.ok.entries.successfully.imported.fail.entries.failed.or.cancelled=Comando di importazione completato: {0} voce/i importata/e, {1} voce/i non importata/e o annullata/e -Warning.Overwriting.existing.alias.alias.in.destination.keystore=Avvertenza: sovrascrittura in corso dell''alias {0} nel file keystore di destinazione -Existing.entry.alias.alias.exists.overwrite.no.=La voce dell''alias {0} esiste già. Sovrascrivere? [no]: \u0020 -Too.many.failures.try.later=Troppi errori - riprovare -Certification.request.stored.in.file.filename.=La richiesta di certificazione è memorizzata nel file <{0}> -Submit.this.to.your.CA=Sottomettere alla propria CA -if.alias.not.specified.destalias.and.srckeypass.must.not.be.specified=Se l'alias non è specificato, destalias e srckeypass non dovranno essere specificati -The.destination.pkcs12.keystore.has.different.storepass.and.keypass.Please.retry.with.destkeypass.specified.=Keystore pkcs12 di destinazione con storepass e keypass differenti. Riprovare con -destkeypass specificato. -Certificate.stored.in.file.filename.=Il certificato è memorizzato nel file <{0}> -Certificate.reply.was.installed.in.keystore=La risposta del certificato è stata installata nel keystore -Certificate.reply.was.not.installed.in.keystore=La risposta del certificato non è stata installata nel keystore -Certificate.was.added.to.keystore=Il certificato è stato aggiunto al keystore -Certificate.was.not.added.to.keystore=Il certificato non è stato aggiunto al keystore -.Storing.ksfname.=[Memorizzazione di {0}] in corso -alias.has.no.public.key.certificate.={0} non dispone di chiave pubblica (certificato) -Cannot.derive.signature.algorithm=Impossibile derivare l'algoritmo di firma -Alias.alias.does.not.exist=L''alias <{0}> non esiste -Alias.alias.has.no.certificate=L''alias <{0}> non dispone di certificato -Key.pair.not.generated.alias.alias.already.exists=Non è stata generata la coppia di chiavi, l''alias <{0}> è già esistente -Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for=Generazione in corso di una coppia di chiavi {1} da {0} bit e di un certificato autofirmato ({2}) con una validità di {3} giorni\n\tper: {4} -Enter.key.password.for.alias.=Immettere la password della chiave per <{0}> -.RETURN.if.same.as.keystore.password.=\t(INVIO se corrisponde alla password del keystore): \u0020 -Key.password.is.too.short.must.be.at.least.6.characters=La password della chiave è troppo corta - deve contenere almeno 6 caratteri -Too.many.failures.key.not.added.to.keystore=Troppi errori - la chiave non è stata aggiunta al keystore -Destination.alias.dest.already.exists=L''alias di destinazione <{0}> è già esistente -Password.is.too.short.must.be.at.least.6.characters=La password è troppo corta - deve contenere almeno 6 caratteri -Too.many.failures.Key.entry.not.cloned=Numero eccessivo di errori. Il valore della chiave non è stato copiato. -key.password.for.alias.=password della chiave per <{0}> -Keystore.entry.for.id.getName.already.exists=La voce del keystore per <{0}> esiste già -Creating.keystore.entry.for.id.getName.=Creazione della voce del keystore per <{0}> in corso... -No.entries.from.identity.database.added=Nessuna voce aggiunta dal database delle identità -Alias.name.alias=Nome alias: {0} -Creation.date.keyStore.getCreationDate.alias.=Data di creazione: {0,date} -alias.keyStore.getCreationDate.alias.={0}, {1,date},\u0020 -alias.={0},\u0020 -Entry.type.type.=Tipo di voce: {0} -Certificate.chain.length.=Lunghezza catena certificati:\u0020 -Certificate.i.1.=Certificato[{0,number,integer}]: -Certificate.fingerprint.SHA.256.=Copia di certificato (SHA-256):\u0020 -Keystore.type.=Tipo keystore:\u0020 -Keystore.provider.=Provider keystore:\u0020 -Your.keystore.contains.keyStore.size.entry=Il keystore contiene {0,number,integer} voce -Your.keystore.contains.keyStore.size.entries=Il keystore contiene {0,number,integer} voci -Failed.to.parse.input=Impossibile analizzare l'input -Empty.input=Input vuoto -Not.X.509.certificate=Il certificato non è X.509 -alias.has.no.public.key={0} non dispone di chiave pubblica -alias.has.no.X.509.certificate={0} non dispone di certificato X.509 -New.certificate.self.signed.=Nuovo certificato (autofirmato): -Reply.has.no.certificates=La risposta non dispone di certificati -Certificate.not.imported.alias.alias.already.exists=Impossibile importare il certificato, l''alias <{0}> è già esistente -Input.not.an.X.509.certificate=L'input non è un certificato X.509 -Certificate.already.exists.in.keystore.under.alias.trustalias.=Il certificato esiste già nel keystore con alias <{0}> -Do.you.still.want.to.add.it.no.=Aggiungerlo ugualmente? [no]: \u0020 -Certificate.already.exists.in.system.wide.CA.keystore.under.alias.trustalias.=Il certificato esiste già nel keystore CA con alias <{0}> -Do.you.still.want.to.add.it.to.your.own.keystore.no.=Aggiungerlo al proprio keystore? [no]: \u0020 -Trust.this.certificate.no.=Considerare sicuro questo certificato? [no]: \u0020 -YES=Sì -New.prompt.=Nuova {0}:\u0020 -Passwords.must.differ=Le password non devono coincidere -Re.enter.new.prompt.=Reimmettere un nuovo valore per {0}:\u0020 -Re.enter.password.=Reimmettere la password:\u0020 -Re.enter.new.password.=Immettere nuovamente la nuova password:\u0020 -They.don.t.match.Try.again=Non corrispondono. Riprovare. -Enter.prompt.alias.name.=Immettere nome alias {0}: \u0020 -Enter.new.alias.name.RETURN.to.cancel.import.for.this.entry.=Immettere un nuovo nome alias\t(premere INVIO per annullare l'importazione della voce): \u0020 -Enter.alias.name.=Immettere nome alias: \u0020 -.RETURN.if.same.as.for.otherAlias.=\t(INVIO se corrisponde al nome di <{0}>) -What.is.your.first.and.last.name.=Specificare nome e cognome -What.is.the.name.of.your.organizational.unit.=Specificare il nome dell'unità organizzativa -What.is.the.name.of.your.organization.=Specificare il nome dell'organizzazione -What.is.the.name.of.your.City.or.Locality.=Specificare la località -What.is.the.name.of.your.State.or.Province.=Specificare la provincia -What.is.the.two.letter.country.code.for.this.unit.=Specificare il codice a due lettere del paese in cui si trova l'unità -Is.name.correct.=Il dato {0} è corretto? -no=no -yes=sì -y=s -.defaultValue.=\u0020 [{0}]: \u0020 -Alias.alias.has.no.key=All''alias <{0}> non è associata alcuna chiave -Alias.alias.references.an.entry.type.that.is.not.a.private.key.entry.The.keyclone.command.only.supports.cloning.of.private.key=L''alias <{0}> fa riferimento a un tipo di voce che non è una voce di chiave privata. Il comando -keyclone supporta solo la copia delle voci di chiave private. - -.WARNING.WARNING.WARNING.=***************** WARNING WARNING WARNING ***************** -Signer.d.=Firmatario #%d: -Timestamp.=Indicatore orario: -Signature.=Firma: -CRLs.=CRL: -Certificate.owner.=Proprietario certificato:\u0020 -Not.a.signed.jar.file=Non è un file jar firmato -No.certificate.from.the.SSL.server=Nessun certificato dal server SSL - -.The.integrity.of.the.information.stored.in.your.keystore.=* L'integrità delle informazioni memorizzate nel keystore *\n* NON è stata verificata. Per verificarne l'integrità *\n* è necessario fornire la password del keystore. * -.The.integrity.of.the.information.stored.in.the.srckeystore.=* L'integrità delle informazioni memorizzate nel srckeystore *\n* NON è stata verificata. Per verificarne l'integrità *\n* è necessario fornire la password del srckeystore. * - -Certificate.reply.does.not.contain.public.key.for.alias.=La risposta del certificato non contiene la chiave pubblica per <{0}> -Incomplete.certificate.chain.in.reply=Catena dei certificati incompleta nella risposta -Certificate.chain.in.reply.does.not.verify.=La catena dei certificati nella risposta non verifica:\u0020 -Top.level.certificate.in.reply.=Certificato di primo livello nella risposta:\n -.is.not.trusted.=...non è considerato sicuro.\u0020 -Install.reply.anyway.no.=Installare la risposta? [no]: \u0020 -NO=NO -Public.keys.in.reply.and.keystore.don.t.match=Le chiavi pubbliche nella risposta e nel keystore non corrispondono -Certificate.reply.and.certificate.in.keystore.are.identical=La risposta del certificato e il certificato nel keystore sono identici -Failed.to.establish.chain.from.reply=Impossibile stabilire la catena dalla risposta -n=n -Wrong.answer.try.again=Risposta errata, riprovare -Secret.key.not.generated.alias.alias.already.exists=La chiave segreta non è stata generata; l''alias <{0}> esiste già -Please.provide.keysize.for.secret.key.generation=Specificare il valore -keysize per la generazione della chiave segreta - -warning.not.verified.make.sure.keystore.is.correct=AVVERTENZA: non verificato. Assicurarsi che -keystore sia corretto. - -Extensions.=Estensioni:\u0020 -.Empty.value.=(valore vuoto) -Extension.Request.=Richiesta di estensione: -Unknown.keyUsage.type.=Tipo keyUsage sconosciuto:\u0020 -Unknown.extendedkeyUsage.type.=Tipo extendedkeyUsage sconosciuto:\u0020 -Unknown.AccessDescription.type.=Tipo AccessDescription sconosciuto:\u0020 -Unrecognized.GeneralName.type.=Tipo GeneralName non riconosciuto:\u0020 -This.extension.cannot.be.marked.as.critical.=Impossibile contrassegnare questa estensione come critica.\u0020 -Odd.number.of.hex.digits.found.=È stato trovato un numero dispari di cifre esadecimali:\u0020 -Unknown.extension.type.=Tipo di estensione sconosciuto:\u0020 -command.{0}.is.ambiguous.=il comando {0} è ambiguo: -# 8171319: keytool should print out warnings when reading or -# generating cert/cert req using weak algorithms -the.certificate.request=La richiesta di certificato -the.issuer=L'emittente -the.generated.certificate=Il certificato generato -the.generated.crl=La CRL generata -the.generated.certificate.request=La richiesta di certificato generata -the.certificate=Il certificato -the.crl=La CRL -the.tsa.certificate=Il certificato TSA -the.input=L'input -reply=Rispondi -one.in.many=%1$s #%2$d di %3$d -alias.in.cacerts=Emittente <%s> in cacerts -alias.in.keystore=Emittente <%s> -with.weak=%s (debole) -key.bit=Chiave %2$s a %1$d bit -key.bit.weak=Chiave %2$s a %1$d bit (debole) -unknown.size.1=chiave %s di dimensione sconosciuta -.PATTERN.printX509Cert.with.weak=Proprietario: {0}\nEmittente: {1}\nNumero di serie: {2}\nValido da: {3} a: {4}\nImpronte digitali certificato:\n\t SHA1: {5}\n\t SHA256: {6}\nNome algoritmo firma: {7}\nAlgoritmo di chiave pubblica oggetto: {8}\nVersione: {9} -PKCS.10.with.weak=Richiesta di certificato PKCS #10 (versione 1.0)\nOggetto: %1$s\nFormato: %2$s\nChiave pubblica: %3$s\nAlgoritmo firma: %4$s\n -verified.by.s.in.s.weak=Verificato da %1$s in %2$s con un %3$s -whose.sigalg.risk=%1$s utilizza l'algoritmo firma %2$s che è considerato un rischio per la sicurezza. -whose.key.risk=%1$s utilizza un %2$s che è considerato un rischio per la sicurezza. -jks.storetype.warning=Il keystore %1$s utilizza un formato proprietario. Si consiglia di eseguire la migrazione a PKCS12, un formato standard di settore, utilizzando il comando "keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12". -migrate.keystore.warning=Migrazione di "%1$s" in %4$s eseguita. Backup del keystore %2$s eseguito con il nome "%3$s". -backup.keystore.warning=Backup del keystore originale "%1$s" eseguito con il nome "%3$s"... -importing.keystore.status=Importazione del keystore %1$s in %2$s in corso... diff --git a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_ko.properties b/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_ko.properties deleted file mode 100644 index d589382e203..00000000000 --- a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_ko.properties +++ /dev/null @@ -1,302 +0,0 @@ -# -# 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 -# 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. -# - -NEWLINE=\n -STAR=******************************************* -STARNN=*******************************************\n\n -# keytool: Help part -.OPTION.=\u0020[OPTION]... -Options.=옵션: -option.1.set.twice=%s 옵션이 여러 번 지정되었습니다. 마지막 항목을 제외한 모든 항목이 무시됩니다. -multiple.commands.1.2=명령은 하나만 허용됩니다. %1$s 및 %2$s이(가) 모두 지정되었습니다. -Use.keytool.help.for.all.available.commands=사용 가능한 모든 명령에 "keytool -help" 사용 -Key.and.Certificate.Management.Tool=키 및 인증서 관리 툴 -Commands.=명령: -Use.keytool.command.name.help.for.usage.of.command.name=command_name 사용법에 "keytool -command_name -help"를 사용합니다.\n-conf 옵션을 사용하여 사전 구성된 옵션 파일을 지정합니다. -# keytool: help: commands -Generates.a.certificate.request=인증서 요청을 생성합니다. -Changes.an.entry.s.alias=항목의 별칭을 변경합니다. -Deletes.an.entry=항목을 삭제합니다. -Exports.certificate=인증서를 익스포트합니다. -Generates.a.key.pair=키 쌍을 생성합니다. -Generates.a.secret.key=보안 키를 생성합니다. -Generates.certificate.from.a.certificate.request=인증서 요청에서 인증서를 생성합니다. -Generates.CRL=CRL을 생성합니다. -Generated.keyAlgName.secret.key={0} 보안 키를 생성합니다. -Generated.keysize.bit.keyAlgName.secret.key={0}비트 {1} 보안 키를 생성합니다. -Imports.entries.from.a.JDK.1.1.x.style.identity.database=JDK 1.1.x 스타일 ID 데이터베이스에서 항목을 임포트합니다. -Imports.a.certificate.or.a.certificate.chain=인증서 또는 인증서 체인을 임포트합니다. -Imports.a.password=비밀번호를 임포트합니다. -Imports.one.or.all.entries.from.another.keystore=다른 키 저장소에서 하나 또는 모든 항목을 임포트합니다. -Clones.a.key.entry=키 항목을 복제합니다. -Changes.the.key.password.of.an.entry=항목의 키 비밀번호를 변경합니다. -Lists.entries.in.a.keystore=키 저장소의 항목을 나열합니다. -Prints.the.content.of.a.certificate=인증서의 콘텐츠를 인쇄합니다. -Prints.the.content.of.a.certificate.request=인증서 요청의 콘텐츠를 인쇄합니다. -Prints.the.content.of.a.CRL.file=CRL 파일의 콘텐츠를 인쇄합니다. -Generates.a.self.signed.certificate=자체 서명된 인증서를 생성합니다. -Changes.the.store.password.of.a.keystore=키 저장소의 저장소 비밀번호를 변경합니다. -# keytool: help: options -alias.name.of.the.entry.to.process=처리할 항목의 별칭 이름 -destination.alias=대상 별칭 -destination.key.password=대상 키 비밀번호 -destination.keystore.name=대상 키 저장소 이름 -destination.keystore.password.protected=대상 키 저장소 비밀번호로 보호됨 -destination.keystore.provider.name=대상 키 저장소 제공자 이름 -destination.keystore.password=대상 키 저장소 비밀번호 -destination.keystore.type=대상 키 저장소 유형 -distinguished.name=식별 이름 -X.509.extension=X.509 확장 -output.file.name=출력 파일 이름 -input.file.name=입력 파일 이름 -key.algorithm.name=키 알고리즘 이름 -key.password=키 비밀번호 -key.bit.size=키 비트 크기 -keystore.name=키 저장소 이름 -access.the.cacerts.keystore=cacerts 키 저장소 액세스 -warning.cacerts.option=경고: -cacerts 옵션을 사용하여 cacerts 키 저장소에 액세스하십시오. -new.password=새 비밀번호 -do.not.prompt=확인하지 않음 -password.through.protected.mechanism=보호되는 메커니즘을 통한 비밀번호 -# The following 2 values should span 2 lines, the first for the -# option itself, the second for its -providerArg value. -addprovider.option=이름별 보안 제공자 추가(예: SunPKCS11)\n-addprovider에 대한 인수 구성 -provider.class.option=전체 클래스 이름별 보안 제공자 추가\n-providerclass에 대한 인수 구성 - -provider.name=제공자 이름 -provider.classpath=제공자 클래스 경로 -output.in.RFC.style=RFC 스타일의 출력 -signature.algorithm.name=서명 알고리즘 이름 -source.alias=소스 별칭 -source.key.password=소스 키 비밀번호 -source.keystore.name=소스 키 저장소 이름 -source.keystore.password.protected=소스 키 저장소 비밀번호로 보호됨 -source.keystore.provider.name=소스 키 저장소 제공자 이름 -source.keystore.password=소스 키 저장소 비밀번호 -source.keystore.type=소스 키 저장소 유형 -SSL.server.host.and.port=SSL 서버 호스트 및 포트 -signed.jar.file=서명된 jar 파일 -certificate.validity.start.date.time=인증서 유효 기간 시작 날짜/시간 -keystore.password=키 저장소 비밀번호 -keystore.type=키 저장소 유형 -trust.certificates.from.cacerts=cacerts의 보안 인증서 -verbose.output=상세 정보 출력 -validity.number.of.days=유효 기간 일 수 -Serial.ID.of.cert.to.revoke=철회할 인증서의 일련 ID -# keytool: Running part -keytool.error.=keytool 오류:\u0020 -Illegal.option.=잘못된 옵션: \u0020 -Illegal.value.=잘못된 값:\u0020 -Unknown.password.type.=알 수 없는 비밀번호 유형:\u0020 -Cannot.find.environment.variable.=환경 변수를 찾을 수 없음:\u0020 -Cannot.find.file.=파일을 찾을 수 없음:\u0020 -Command.option.flag.needs.an.argument.=명령 옵션 {0}에 인수가 필요합니다. -Warning.Different.store.and.key.passwords.not.supported.for.PKCS12.KeyStores.Ignoring.user.specified.command.value.=경고: 다른 저장소 및 키 비밀번호는 PKCS12 KeyStores에 대해 지원되지 않습니다. 사용자가 지정한 {0} 값을 무시하는 중입니다. -the.keystore.or.storetype.option.cannot.be.used.with.the.cacerts.option=-keystore 또는 -storetype 옵션은 -cacerts 옵션과 함께 사용할 수 없습니다. -.keystore.must.be.NONE.if.storetype.is.{0}=-storetype이 {0}인 경우 -keystore는 NONE이어야 합니다. -Too.many.retries.program.terminated=재시도 횟수가 너무 많아 프로그램이 종료되었습니다. -.storepasswd.and.keypasswd.commands.not.supported.if.storetype.is.{0}=-storetype이 {0}인 경우 -storepasswd 및 -keypasswd 명령이 지원되지 않습니다. -.keypasswd.commands.not.supported.if.storetype.is.PKCS12=-storetype이 PKCS12인 경우 -keypasswd 명령이 지원되지 않습니다. -.keypass.and.new.can.not.be.specified.if.storetype.is.{0}=-storetype이 {0}인 경우 -keypass 및 -new를 지정할 수 없습니다. -if.protected.is.specified.then.storepass.keypass.and.new.must.not.be.specified=-protected를 지정한 경우 -storepass, -keypass 및 -new를 지정하지 않아야 합니다. -if.srcprotected.is.specified.then.srcstorepass.and.srckeypass.must.not.be.specified=-srcprotected를 지정한 경우 -srcstorepass 및 -srckeypass를 지정하지 않아야 합니다. -if.keystore.is.not.password.protected.then.storepass.keypass.and.new.must.not.be.specified=키 저장소가 비밀번호로 보호되지 않는 경우 -storepass, -keypass 및 -new를 지정하지 않아야 합니다. -if.source.keystore.is.not.password.protected.then.srcstorepass.and.srckeypass.must.not.be.specified=소스 키 저장소가 비밀번호로 보호되지 않는 경우 -srcstorepass 및 -srckeypass를 지정하지 않아야 합니다. -Illegal.startdate.value=startdate 값이 잘못되었습니다. -Validity.must.be.greater.than.zero=유효 기간은 0보다 커야 합니다. -provclass.not.a.provider=%s은(는) 제공자가 아닙니다. -provider.name.not.found="%s" 이름의 제공자를 찾을 수 없습니다. -provider.class.not.found="%s" 제공자를 찾을 수 없습니다. -Usage.error.no.command.provided=사용법 오류: 명령을 입력하지 않았습니다. -Source.keystore.file.exists.but.is.empty.=소스 키 저장소 파일이 존재하지만 비어 있음:\u0020 -Please.specify.srckeystore=-srckeystore를 지정하십시오. -Must.not.specify.both.v.and.rfc.with.list.command='list' 명령에 -v와 -rfc를 함께 지정하지 않아야 합니다. -Key.password.must.be.at.least.6.characters=키 비밀번호는 6자 이상이어야 합니다. -New.password.must.be.at.least.6.characters=새 비밀번호는 6자 이상이어야 합니다. -Keystore.file.exists.but.is.empty.=키 저장소 파일이 존재하지만 비어 있음:\u0020 -Keystore.file.does.not.exist.=키 저장소 파일이 존재하지 않음:\u0020 -Must.specify.destination.alias=대상 별칭을 지정해야 합니다. -Must.specify.alias=별칭을 지정해야 합니다. -Keystore.password.must.be.at.least.6.characters=키 저장소 비밀번호는 6자 이상이어야 합니다. -Enter.the.password.to.be.stored.=저장할 비밀번호 입력: \u0020 -Enter.keystore.password.=키 저장소 비밀번호 입력: \u0020 -Enter.source.keystore.password.=소스 키 저장소 비밀번호 입력: \u0020 -Enter.destination.keystore.password.=대상 키 저장소 비밀번호 입력: \u0020 -Keystore.password.is.too.short.must.be.at.least.6.characters=키 저장소 비밀번호가 너무 짧음 - 6자 이상이어야 합니다. -Unknown.Entry.Type=알 수 없는 항목 유형 -Too.many.failures.Alias.not.changed=오류가 너무 많습니다. 별칭이 변경되지 않았습니다. -Entry.for.alias.alias.successfully.imported.={0} 별칭에 대한 항목이 성공적으로 임포트되었습니다. -Entry.for.alias.alias.not.imported.={0} 별칭에 대한 항목이 임포트되지 않았습니다. -Problem.importing.entry.for.alias.alias.exception.Entry.for.alias.alias.not.imported.={0} 별칭에 대한 항목을 임포트하는 중 문제 발생: {1}.\n{0} 별칭에 대한 항목이 임포트되지 않았습니다. -Import.command.completed.ok.entries.successfully.imported.fail.entries.failed.or.cancelled=임포트 명령 완료: 성공적으로 임포트된 항목은 {0}개, 실패하거나 취소된 항목은 {1}개입니다. -Warning.Overwriting.existing.alias.alias.in.destination.keystore=경고: 대상 키 저장소에서 기존 별칭 {0}을(를) 겹쳐 쓰는 중 -Existing.entry.alias.alias.exists.overwrite.no.=기존 항목 별칭 {0}이(가) 존재합니다. 겹쳐 쓰겠습니까? [아니오]: \u0020 -Too.many.failures.try.later=오류가 너무 많음 - 나중에 시도하십시오. -Certification.request.stored.in.file.filename.=인증 요청이 <{0}> 파일에 저장되었습니다. -Submit.this.to.your.CA=CA에게 제출하십시오. -if.alias.not.specified.destalias.and.srckeypass.must.not.be.specified=별칭을 지정하지 않은 경우 destalias 및 srckeypass를 지정하지 않아야 합니다. -The.destination.pkcs12.keystore.has.different.storepass.and.keypass.Please.retry.with.destkeypass.specified.=대상 pkcs12 키 저장소에 다른 storepass 및 keypass가 있습니다. 지정된 -destkeypass로 재시도하십시오. -Certificate.stored.in.file.filename.=인증서가 <{0}> 파일에 저장되었습니다. -Certificate.reply.was.installed.in.keystore=인증서 회신이 키 저장소에 설치되었습니다. -Certificate.reply.was.not.installed.in.keystore=인증서 회신이 키 저장소에 설치되지 않았습니다. -Certificate.was.added.to.keystore=인증서가 키 저장소에 추가되었습니다. -Certificate.was.not.added.to.keystore=인증서가 키 저장소에 추가되지 않았습니다. -.Storing.ksfname.=[{0}을(를) 저장하는 중] -alias.has.no.public.key.certificate.={0}에 공용 키(인증서)가 없습니다. -Cannot.derive.signature.algorithm=서명 알고리즘을 파생할 수 없습니다. -Alias.alias.does.not.exist=<{0}> 별칭이 존재하지 않습니다. -Alias.alias.has.no.certificate=<{0}> 별칭에 인증서가 없습니다. -Key.pair.not.generated.alias.alias.already.exists=키 쌍이 생성되지 않았으며 <{0}> 별칭이 존재합니다. -Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for=다음에 대해 유효 기간이 {3}일인 {0}비트 {1} 키 쌍 및 자체 서명된 인증서({2})를 생성하는 중\n\t: {4} -Enter.key.password.for.alias.=<{0}>에 대한 키 비밀번호를 입력하십시오. -.RETURN.if.same.as.keystore.password.=\t(키 저장소 비밀번호와 동일한 경우 Enter 키를 누름): \u0020 -Key.password.is.too.short.must.be.at.least.6.characters=키 비밀번호가 너무 짧음 - 6자 이상이어야 합니다. -Too.many.failures.key.not.added.to.keystore=오류가 너무 많음 - 키 저장소에 키가 추가되지 않았습니다. -Destination.alias.dest.already.exists=대상 별칭 <{0}>이(가) 존재합니다. -Password.is.too.short.must.be.at.least.6.characters=비밀번호가 너무 짧음 - 6자 이상이어야 합니다. -Too.many.failures.Key.entry.not.cloned=오류가 너무 많습니다. 키 항목이 복제되지 않았습니다. -key.password.for.alias.=<{0}>에 대한 키 비밀번호 -Keystore.entry.for.id.getName.already.exists=<{0}>에 대한 키 저장소 항목이 존재합니다. -Creating.keystore.entry.for.id.getName.=<{0}>에 대한 키 저장소 항목을 생성하는 중... -No.entries.from.identity.database.added=ID 데이터베이스에서 추가된 항목이 없습니다. -Alias.name.alias=별칭 이름: {0} -Creation.date.keyStore.getCreationDate.alias.=생성 날짜: {0,date} -alias.keyStore.getCreationDate.alias.={0}, {1,date},\u0020 -alias.={0},\u0020 -Entry.type.type.=항목 유형: {0} -Certificate.chain.length.=인증서 체인 길이:\u0020 -Certificate.i.1.=인증서[{0,number,integer}]: -Certificate.fingerprint.SHA.256.=인증서 지문(SHA-256):\u0020 -Keystore.type.=키 저장소 유형:\u0020 -Keystore.provider.=키 저장소 제공자:\u0020 -Your.keystore.contains.keyStore.size.entry=키 저장소에 {0,number,integer}개의 항목이 포함되어 있습니다. -Your.keystore.contains.keyStore.size.entries=키 저장소에 {0,number,integer}개의 항목이 포함되어 있습니다. -Failed.to.parse.input=입력값의 구문 분석을 실패했습니다. -Empty.input=입력값이 비어 있습니다. -Not.X.509.certificate=X.509 인증서가 아닙니다. -alias.has.no.public.key={0}에 공용 키가 없습니다. -alias.has.no.X.509.certificate={0}에 X.509 인증서가 없습니다. -New.certificate.self.signed.=새 인증서(자체 서명): -Reply.has.no.certificates=회신에 인증서가 없습니다. -Certificate.not.imported.alias.alias.already.exists=인증서가 임포트되지 않았으며 <{0}> 별칭이 존재합니다. -Input.not.an.X.509.certificate=입력이 X.509 인증서가 아닙니다. -Certificate.already.exists.in.keystore.under.alias.trustalias.=인증서가 <{0}> 별칭 아래의 키 저장소에 존재합니다. -Do.you.still.want.to.add.it.no.=추가하겠습니까? [아니오]: \u0020 -Certificate.already.exists.in.system.wide.CA.keystore.under.alias.trustalias.=인증서가 <{0}> 별칭 아래에 있는 시스템 차원의 CA 키 저장소에 존재합니다. -Do.you.still.want.to.add.it.to.your.own.keystore.no.=고유한 키 저장소에 추가하겠습니까? [아니오]: \u0020 -Trust.this.certificate.no.=이 인증서를 신뢰합니까? [아니오]: \u0020 -YES=예 -New.prompt.=새 {0}:\u0020 -Passwords.must.differ=비밀번호는 달라야 합니다. -Re.enter.new.prompt.=새 {0} 다시 입력:\u0020 -Re.enter.password.=비밀번호 다시 입력:\u0020 -Re.enter.new.password.=새 비밀번호 다시 입력:\u0020 -They.don.t.match.Try.again=일치하지 않습니다. 다시 시도하십시오. -Enter.prompt.alias.name.={0} 별칭 이름 입력: \u0020 -Enter.new.alias.name.RETURN.to.cancel.import.for.this.entry.=새 별칭 이름 입력\t(이 항목에 대한 임포트를 취소하려면 Enter 키를 누름): \u0020 -Enter.alias.name.=별칭 이름 입력: \u0020 -.RETURN.if.same.as.for.otherAlias.=\t(<{0}>과(와) 동일한 경우 Enter 키를 누름) -What.is.your.first.and.last.name.=이름과 성을 입력하십시오. -What.is.the.name.of.your.organizational.unit.=조직 단위 이름을 입력하십시오. -What.is.the.name.of.your.organization.=조직 이름을 입력하십시오. -What.is.the.name.of.your.City.or.Locality.=구/군/시 이름을 입력하십시오? -What.is.the.name.of.your.State.or.Province.=시/도 이름을 입력하십시오. -What.is.the.two.letter.country.code.for.this.unit.=이 조직의 두 자리 국가 코드를 입력하십시오. -Is.name.correct.={0}이(가) 맞습니까? -no=아니오 -yes=예 -y=y -.defaultValue.=\u0020 [{0}]: \u0020 -Alias.alias.has.no.key=<{0}> 별칭에 키가 없습니다. -Alias.alias.references.an.entry.type.that.is.not.a.private.key.entry.The.keyclone.command.only.supports.cloning.of.private.key=<{0}> 별칭은 전용 키 항목이 아닌 항목 유형을 참조합니다. -keyclone 명령은 전용 키 항목의 복제만 지원합니다. - -.WARNING.WARNING.WARNING.=***************** WARNING WARNING WARNING ***************** -Signer.d.=서명자 #%d: -Timestamp.=시간 기록: -Signature.=서명: -CRLs.=CRL: -Certificate.owner.=인증서 소유자:\u0020 -Not.a.signed.jar.file=서명된 jar 파일이 아닙니다. -No.certificate.from.the.SSL.server=SSL 서버에서 가져온 인증서가 없습니다. - -.The.integrity.of.the.information.stored.in.your.keystore.=* 키 저장소에 저장된 정보의 무결성이 *\n* 확인되지 않았습니다! 무결성을 확인하려면, *\n* 키 저장소 비밀번호를 제공해야 합니다. * -.The.integrity.of.the.information.stored.in.the.srckeystore.=* srckeystore에 저장된 정보의 무결성이 *\n* 확인되지 않았습니다! 무결성을 확인하려면, *\n* srckeystore 비밀번호를 제공해야 합니다. * - -Certificate.reply.does.not.contain.public.key.for.alias.=인증서 회신에 <{0}>에 대한 공용 키가 포함되어 있지 않습니다. -Incomplete.certificate.chain.in.reply=회신에 불완전한 인증서 체인이 있습니다. -Certificate.chain.in.reply.does.not.verify.=회신의 인증서 체인이 확인되지 않음:\u0020 -Top.level.certificate.in.reply.=회신에 최상위 레벨 인증서가 있음:\n -.is.not.trusted.=...을(를) 신뢰할 수 없습니다.\u0020 -Install.reply.anyway.no.=회신을 설치하겠습니까? [아니오]: \u0020 -NO=아니오 -Public.keys.in.reply.and.keystore.don.t.match=회신과 키 저장소의 공용 키가 일치하지 않습니다. -Certificate.reply.and.certificate.in.keystore.are.identical=회신과 키 저장소의 인증서가 동일합니다. -Failed.to.establish.chain.from.reply=회신의 체인 설정을 실패했습니다. -n=n -Wrong.answer.try.again=잘못된 응답입니다. 다시 시도하십시오. -Secret.key.not.generated.alias.alias.already.exists=보안 키가 생성되지 않았으며 <{0}> 별칭이 존재합니다. -Please.provide.keysize.for.secret.key.generation=보안 키를 생성하려면 -keysize를 제공하십시오. - -warning.not.verified.make.sure.keystore.is.correct=경고: 확인되지 않음. -keystore가 올바른지 확인하십시오. - -Extensions.=확장:\u0020 -.Empty.value.=(비어 있는 값) -Extension.Request.=확장 요청: -Unknown.keyUsage.type.=알 수 없는 keyUsage 유형:\u0020 -Unknown.extendedkeyUsage.type.=알 수 없는 extendedkeyUsage 유형:\u0020 -Unknown.AccessDescription.type.=알 수 없는 AccessDescription 유형:\u0020 -Unrecognized.GeneralName.type.=알 수 없는 GeneralName 유형:\u0020 -This.extension.cannot.be.marked.as.critical.=이 확장은 중요한 것으로 표시할 수 없습니다.\u0020 -Odd.number.of.hex.digits.found.=홀수 개의 16진수가 발견됨:\u0020 -Unknown.extension.type.=알 수 없는 확장 유형:\u0020 -command.{0}.is.ambiguous.={0} 명령이 모호함: -# 8171319: keytool should print out warnings when reading or -# generating cert/cert req using weak algorithms -the.certificate.request=인증서 요청 -the.issuer=발행자 -the.generated.certificate=생성된 인증서 -the.generated.crl=생성된 CRL -the.generated.certificate.request=생성된 인증서 요청 -the.certificate=인증서 -the.crl=CRL -the.tsa.certificate=TSA 인증서 -the.input=입력 -reply=회신 -one.in.many=%1$s #%2$d/%3$d -alias.in.cacerts=cacerts의 <%s> 발행자 -alias.in.keystore=<%s> 발행자 -with.weak=%s(약함) -key.bit=%1$d비트 %2$s 키 -key.bit.weak=%1$d비트 %2$s 키(약함) -unknown.size.1=알 수 없는 크기 %s 키 -.PATTERN.printX509Cert.with.weak=소유자: {0}\n발행자: {1}\n일련 번호: {2}\n적합한 시작 날짜: {3} 종료 날짜: {4}\n인증서 지문:\n\t SHA1: {5}\n\t SHA256: {6}\n서명 알고리즘 이름: {7}\n주체 공용 키 알고리즘: {8}\n버전: {9} -PKCS.10.with.weak=PKCS #10 인증서 요청(1.0 버전)\n제목: %1$s\n형식: %2$s\n공용 키: %3$s\n서명 알고리즘: %4$s\n -verified.by.s.in.s.weak=%3$s을(를) 포함하는 %2$s의 %1$s에 의해 확인됨 -whose.sigalg.risk=%1$s이(가) 보안 위험으로 간주되는 %2$s 서명 알고리즘을 사용합니다. -whose.key.risk=%1$s이(가) 보안 위험으로 간주되는 %2$s을(를) 사용합니다. -jks.storetype.warning=%1$s 키 저장소는 고유 형식을 사용합니다. "keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12"를 사용하는 산업 표준 형식인 PKCS12로 이전하는 것이 좋습니다. -migrate.keystore.warning="%1$s"을(를) %4$s(으)로 이전했습니다. %2$s 키 저장소가 "%3$s"(으)로 백업되었습니다. -backup.keystore.warning=원본 키 저장소 "%1$s"이(가) "%3$s"(으)로 백업되었습니다. -importing.keystore.status=키 저장소 %1$s을(를) %2$s(으)로 임포트하는 중... diff --git a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_pt_BR.properties b/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_pt_BR.properties deleted file mode 100644 index 2ae254a368f..00000000000 --- a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_pt_BR.properties +++ /dev/null @@ -1,302 +0,0 @@ -# -# 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 -# 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. -# - -NEWLINE=\n -STAR=******************************************* -STARNN=*******************************************\n\n -# keytool: Help part -.OPTION.=\u0020[OPTION]... -Options.=Opções: -option.1.set.twice=A opção %s foi especificada várias vezes. Todas, exceto a última, serão ignoradas. -multiple.commands.1.2=Somente um comando é permitido: tanto %1$s quanto %2$s foram especificados. -Use.keytool.help.for.all.available.commands=Use "keytool -help" para todos os comandos disponíveis -Key.and.Certificate.Management.Tool=Ferramenta de Gerenciamento de Chave e Certificado -Commands.=Comandos: -Use.keytool.command.name.help.for.usage.of.command.name=Utilize "keytool -command_name -help" para uso de command_name.\nUtilize a opção -conf para especificar um arquivo de opções pré-configurado. -# keytool: help: commands -Generates.a.certificate.request=Gera uma solicitação de certificado -Changes.an.entry.s.alias=Altera um alias de entrada -Deletes.an.entry=Exclui uma entrada -Exports.certificate=Exporta o certificado -Generates.a.key.pair=Gera um par de chaves -Generates.a.secret.key=Gera uma chave secreta -Generates.certificate.from.a.certificate.request=Gera um certificado de uma solicitação de certificado -Generates.CRL=Gera CRL -Generated.keyAlgName.secret.key=Chave secreta {0} gerada -Generated.keysize.bit.keyAlgName.secret.key=Chave secreta {1} de {0} bits gerada -Imports.entries.from.a.JDK.1.1.x.style.identity.database=Importa entradas de um banco de dados de identidade JDK 1.1.x-style -Imports.a.certificate.or.a.certificate.chain=Importa um certificado ou uma cadeia de certificados -Imports.a.password=Importa uma senha -Imports.one.or.all.entries.from.another.keystore=Importa uma ou todas as entradas de outra área de armazenamento de chaves -Clones.a.key.entry=Clona uma entrada de chave -Changes.the.key.password.of.an.entry=Altera a senha da chave de uma entrada -Lists.entries.in.a.keystore=Lista entradas em uma área de armazenamento de chaves -Prints.the.content.of.a.certificate=Imprime o conteúdo de um certificado -Prints.the.content.of.a.certificate.request=Imprime o conteúdo de uma solicitação de certificado -Prints.the.content.of.a.CRL.file=Imprime o conteúdo de um arquivo CRL -Generates.a.self.signed.certificate=Gera um certificado autoassinado -Changes.the.store.password.of.a.keystore=Altera a senha de armazenamento de uma área de armazenamento de chaves -# keytool: help: options -alias.name.of.the.entry.to.process=nome do alias da entrada a ser processada -destination.alias=alias de destino -destination.key.password=senha da chave de destino -destination.keystore.name=nome da área de armazenamento de chaves de destino -destination.keystore.password.protected=senha protegida da área de armazenamento de chaves de destino -destination.keystore.provider.name=nome do fornecedor da área de armazenamento de chaves de destino -destination.keystore.password=senha da área de armazenamento de chaves de destino -destination.keystore.type=tipo de área de armazenamento de chaves de destino -distinguished.name=nome distinto -X.509.extension=extensão X.509 -output.file.name=nome do arquivo de saída -input.file.name=nome do arquivo de entrada -key.algorithm.name=nome do algoritmo da chave -key.password=senha da chave -key.bit.size=tamanho do bit da chave -keystore.name=nome da área de armazenamento de chaves -access.the.cacerts.keystore=acessar a área de armazenamento de chaves cacerts -warning.cacerts.option=Advertência: use a opção -cacerts para acessar a área de armazenamento de chaves cacerts -new.password=nova senha -do.not.prompt=não perguntar -password.through.protected.mechanism=senha por meio de mecanismo protegido -# The following 2 values should span 2 lines, the first for the -# option itself, the second for its -providerArg value. -addprovider.option=adicionar provedor de segurança por nome (por exemplo, SunPKCS11)\nconfigurar argumento para -addprovider -provider.class.option=adicionar provedor de segurança por nome de classe totalmente qualificado\nconfigurar argumento para -providerclass - -provider.name=nome do fornecedor -provider.classpath=classpath do fornecedor -output.in.RFC.style=saída no estilo RFC -signature.algorithm.name=nome do algoritmo de assinatura -source.alias=alias de origem -source.key.password=senha da chave de origem -source.keystore.name=nome da área de armazenamento de chaves de origem -source.keystore.password.protected=senha protegida da área de armazenamento de chaves de origem -source.keystore.provider.name=nome do fornecedor da área de armazenamento de chaves de origem -source.keystore.password=senha da área de armazenamento de chaves de origem -source.keystore.type=tipo de área de armazenamento de chaves de origem -SSL.server.host.and.port=porta e host do servidor SSL -signed.jar.file=arquivo jar assinado -certificate.validity.start.date.time=data/hora inicial de validade do certificado -keystore.password=senha da área de armazenamento de chaves -keystore.type=tipo de área de armazenamento de chaves -trust.certificates.from.cacerts=certificados confiáveis do cacerts -verbose.output=saída detalhada -validity.number.of.days=número de dias da validade -Serial.ID.of.cert.to.revoke=ID de série do certificado a ser revogado -# keytool: Running part -keytool.error.=erro de keytool:\u0020 -Illegal.option.=Opção inválida: \u0020 -Illegal.value.=Valor inválido:\u0020 -Unknown.password.type.=Tipo de senha desconhecido:\u0020 -Cannot.find.environment.variable.=Não é possível localizar a variável do ambiente:\u0020 -Cannot.find.file.=Não é possível localizar o arquivo:\u0020 -Command.option.flag.needs.an.argument.=A opção de comando {0} precisa de um argumento. -Warning.Different.store.and.key.passwords.not.supported.for.PKCS12.KeyStores.Ignoring.user.specified.command.value.=Advertência: Senhas de chave e de armazenamento diferentes não suportadas para KeyStores PKCS12. Ignorando valor {0} especificado pelo usuário. -the.keystore.or.storetype.option.cannot.be.used.with.the.cacerts.option=A opção -keystore ou -storetype não pode ser usada com a opção -cacerts -.keystore.must.be.NONE.if.storetype.is.{0}=-keystore deve ser NONE se -storetype for {0} -Too.many.retries.program.terminated=Excesso de tentativas de repetição; programa finalizado -.storepasswd.and.keypasswd.commands.not.supported.if.storetype.is.{0}=comandos -storepasswd e -keypasswd não suportados se -storetype for {0} -.keypasswd.commands.not.supported.if.storetype.is.PKCS12=comandos -keypasswd não suportados se -storetype for PKCS12 -.keypass.and.new.can.not.be.specified.if.storetype.is.{0}=-keypass e -new não podem ser especificados se -storetype for {0} -if.protected.is.specified.then.storepass.keypass.and.new.must.not.be.specified=se -protected for especificado, então -storepass, -keypass e -new não deverão ser especificados -if.srcprotected.is.specified.then.srcstorepass.and.srckeypass.must.not.be.specified=se -srcprotected for especificado, então -srcstorepass e -srckeypass não deverão ser especificados -if.keystore.is.not.password.protected.then.storepass.keypass.and.new.must.not.be.specified=se a área de armazenamento de chaves não estiver protegida por senha, então -storepass, -keypass e -new não deverão ser especificados -if.source.keystore.is.not.password.protected.then.srcstorepass.and.srckeypass.must.not.be.specified=se a área de armazenamento de chaves de origem não estiver protegida por senha, então -srcstorepass e -srckeypass não deverão ser especificados -Illegal.startdate.value=valor da data inicial inválido -Validity.must.be.greater.than.zero=A validade deve ser maior do que zero -provclass.not.a.provider=%s não é um fornecedor -provider.name.not.found=O fornecedor chamado "%s" não foi encontrado -provider.class.not.found=Fornecedor "%s" não encontrado -Usage.error.no.command.provided=Erro de uso: nenhum comando fornecido -Source.keystore.file.exists.but.is.empty.=O arquivo da área de armazenamento de chaves de origem existe, mas está vazio:\u0020 -Please.specify.srckeystore=Especifique -srckeystore -Must.not.specify.both.v.and.rfc.with.list.command=Não devem ser especificados -v e -rfc com o comando 'list' -Key.password.must.be.at.least.6.characters=A senha da chave deve ter, no mínimo, 6 caracteres -New.password.must.be.at.least.6.characters=A nova senha deve ter, no mínimo, 6 caracteres -Keystore.file.exists.but.is.empty.=O arquivo da área de armazenamento de chaves existe, mas está vazio:\u0020 -Keystore.file.does.not.exist.=O arquivo da área de armazenamento de chaves não existe.\u0020 -Must.specify.destination.alias=Deve ser especificado um alias de destino -Must.specify.alias=Deve ser especificado um alias -Keystore.password.must.be.at.least.6.characters=A senha da área de armazenamento de chaves deve ter, no mínimo, 6 caracteres -Enter.the.password.to.be.stored.=Digite a senha a ser armazenada: \u0020 -Enter.keystore.password.=Informe a senha da área de armazenamento de chaves: \u0020 -Enter.source.keystore.password.=Informe a senha da área de armazenamento de chaves de origem: \u0020 -Enter.destination.keystore.password.=Informe a senha da área de armazenamento de chaves de destino: \u0020 -Keystore.password.is.too.short.must.be.at.least.6.characters=A senha da área de armazenamento de chaves é muito curta - ela deve ter, no mínimo, 6 caracteres -Unknown.Entry.Type=Tipo de Entrada Desconhecido -Too.many.failures.Alias.not.changed=Excesso de falhas. Alias não alterado -Entry.for.alias.alias.successfully.imported.=Entrada do alias {0} importada com êxito. -Entry.for.alias.alias.not.imported.=Entrada do alias {0} não importada. -Problem.importing.entry.for.alias.alias.exception.Entry.for.alias.alias.not.imported.=Problema ao importar a entrada do alias {0}: {1}.\nEntrada do alias {0} não importada. -Import.command.completed.ok.entries.successfully.imported.fail.entries.failed.or.cancelled=Comando de importação concluído: {0} entradas importadas com êxito, {1} entradas falharam ou foram canceladas -Warning.Overwriting.existing.alias.alias.in.destination.keystore=Advertência: Substituição do alias {0} existente na área de armazenamento de chaves de destino -Existing.entry.alias.alias.exists.overwrite.no.=Entrada já existente no alias {0}, substituir? [não]: \u0020 -Too.many.failures.try.later=Excesso de falhas - tente mais tarde -Certification.request.stored.in.file.filename.=Solicitação de certificado armazenada no arquivo <{0}> -Submit.this.to.your.CA=Submeter à CA -if.alias.not.specified.destalias.and.srckeypass.must.not.be.specified=se o alias não estiver especificado, destalias e srckeypass não deverão ser especificados -The.destination.pkcs12.keystore.has.different.storepass.and.keypass.Please.retry.with.destkeypass.specified.=O armazenamento de chaves pkcs12 de destino tem storepass e keypass diferentes. Tente novamente especificando -destkeypass. -Certificate.stored.in.file.filename.=Certificado armazenado no arquivo <{0}> -Certificate.reply.was.installed.in.keystore=A resposta do certificado foi instalada na área de armazenamento de chaves -Certificate.reply.was.not.installed.in.keystore=A resposta do certificado não foi instalada na área de armazenamento de chaves -Certificate.was.added.to.keystore=O certificado foi adicionado à área de armazenamento de chaves -Certificate.was.not.added.to.keystore=O certificado não foi adicionado à área de armazenamento de chaves -.Storing.ksfname.=[Armazenando {0}] -alias.has.no.public.key.certificate.={0} não tem chave pública (certificado) -Cannot.derive.signature.algorithm=Não é possível obter um algoritmo de assinatura -Alias.alias.does.not.exist=O alias <{0}> não existe -Alias.alias.has.no.certificate=O alias <{0}> não tem certificado -Key.pair.not.generated.alias.alias.already.exists=Par de chaves não gerado; o alias <{0}> já existe -Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for=Gerando o par de chaves {1} de {0} bit e o certificado autoassinado ({2}) com uma validade de {3} dias\n\tpara: {4} -Enter.key.password.for.alias.=Informar a senha da chave de <{0}> -.RETURN.if.same.as.keystore.password.=\t(RETURN se for igual à senha da área do armazenamento de chaves): \u0020 -Key.password.is.too.short.must.be.at.least.6.characters=A senha da chave é muito curta - deve ter, no mínimo, 6 caracteres -Too.many.failures.key.not.added.to.keystore=Excesso de falhas - chave não adicionada a área de armazenamento de chaves -Destination.alias.dest.already.exists=O alias de destino <{0}> já existe -Password.is.too.short.must.be.at.least.6.characters=A senha é muito curta - deve ter, no mínimo, 6 caracteres -Too.many.failures.Key.entry.not.cloned=Excesso de falhas. Entrada da chave não clonada -key.password.for.alias.=senha da chave de <{0}> -Keystore.entry.for.id.getName.already.exists=A entrada da área do armazenamento de chaves de <{0}> já existe -Creating.keystore.entry.for.id.getName.=Criando entrada da área do armazenamento de chaves para <{0}> ... -No.entries.from.identity.database.added=Nenhuma entrada adicionada do banco de dados de identidades -Alias.name.alias=Nome do alias: {0} -Creation.date.keyStore.getCreationDate.alias.=Data de criação: {0,date} -alias.keyStore.getCreationDate.alias.={0}, {1,date},\u0020 -alias.={0},\u0020 -Entry.type.type.=Tipo de entrada: {0} -Certificate.chain.length.=Comprimento da cadeia de certificados:\u0020 -Certificate.i.1.=Certificado[{0,number,integer}]: -Certificate.fingerprint.SHA.256.=Fingerprint (SHA-256) do certificado:\u0020 -Keystore.type.=Tipo de área de armazenamento de chaves:\u0020 -Keystore.provider.=Fornecedor da área de armazenamento de chaves:\u0020 -Your.keystore.contains.keyStore.size.entry=Sua área de armazenamento de chaves contém {0,number,integer} entrada -Your.keystore.contains.keyStore.size.entries=Sua área de armazenamento de chaves contém {0,number,integer} entradas -Failed.to.parse.input=Falha durante o parsing da entrada -Empty.input=Entrada vazia -Not.X.509.certificate=Não é um certificado X.509 -alias.has.no.public.key={0} não tem chave pública -alias.has.no.X.509.certificate={0} não tem certificado X.509 -New.certificate.self.signed.=Novo certificado (autoassinado): -Reply.has.no.certificates=A resposta não tem certificado -Certificate.not.imported.alias.alias.already.exists=Certificado não importado, o alias <{0}> já existe -Input.not.an.X.509.certificate=A entrada não é um certificado X.509 -Certificate.already.exists.in.keystore.under.alias.trustalias.=O certificado já existe no armazenamento de chaves no alias <{0}> -Do.you.still.want.to.add.it.no.=Ainda deseja adicioná-lo? [não]: \u0020 -Certificate.already.exists.in.system.wide.CA.keystore.under.alias.trustalias.=O certificado já existe na área de armazenamento de chaves da CA em todo o sistema no alias <{0}> -Do.you.still.want.to.add.it.to.your.own.keystore.no.=Ainda deseja adicioná-lo à sua área de armazenamento de chaves? [não]: \u0020 -Trust.this.certificate.no.=Confiar neste certificado? [não]: \u0020 -YES=SIM -New.prompt.=Nova {0}:\u0020 -Passwords.must.differ=As senhas devem ser diferentes -Re.enter.new.prompt.=Informe novamente a nova {0}:\u0020 -Re.enter.password.=Redigite a senha:\u0020 -Re.enter.new.password.=Informe novamente a nova senha:\u0020 -They.don.t.match.Try.again=Elas não correspondem. Tente novamente -Enter.prompt.alias.name.=Informe o nome do alias {0}: \u0020 -Enter.new.alias.name.RETURN.to.cancel.import.for.this.entry.=Informe o novo nome do alias\t(RETURN para cancelar a importação desta entrada): \u0020 -Enter.alias.name.=Informe o nome do alias: \u0020 -.RETURN.if.same.as.for.otherAlias.=\t(RETURN se for igual ao de <{0}>) -What.is.your.first.and.last.name.=Qual é o seu nome e o seu sobrenome? -What.is.the.name.of.your.organizational.unit.=Qual é o nome da sua unidade organizacional? -What.is.the.name.of.your.organization.=Qual é o nome da sua empresa? -What.is.the.name.of.your.City.or.Locality.=Qual é o nome da sua Cidade ou Localidade? -What.is.the.name.of.your.State.or.Province.=Qual é o nome do seu Estado ou Município? -What.is.the.two.letter.country.code.for.this.unit.=Quais são as duas letras do código do país desta unidade? -Is.name.correct.={0} Está correto? -no=não -yes=sim -y=s -.defaultValue.=\u0020 [{0}]: \u0020 -Alias.alias.has.no.key=O alias <{0}> não tem chave -Alias.alias.references.an.entry.type.that.is.not.a.private.key.entry.The.keyclone.command.only.supports.cloning.of.private.key=O alias <{0}> faz referência a um tipo de entrada que não é uma entrada de chave privada. O comando -keyclone oferece suporte somente à clonagem de entradas de chave privada - -.WARNING.WARNING.WARNING.=***************** WARNING WARNING WARNING ***************** -Signer.d.=Signatário #%d: -Timestamp.=Timestamp: -Signature.=Assinatura: -CRLs.=CRLs: -Certificate.owner.=Proprietário do certificado:\u0020 -Not.a.signed.jar.file=Não é um arquivo jar assinado -No.certificate.from.the.SSL.server=Não é um certificado do servidor SSL - -.The.integrity.of.the.information.stored.in.your.keystore.=* A integridade das informações armazenadas na sua área de armazenamento de chaves *\n* NÃO foi verificada! Para que seja possível verificar sua integridade, *\n* você deve fornecer a senha da área de armazenamento de chaves. * -.The.integrity.of.the.information.stored.in.the.srckeystore.=* A integridade das informações armazenadas no srckeystore *\n* NÃO foi verificada! Para que seja possível verificar sua integridade, *\n* você deve fornecer a senha do srckeystore. * - -Certificate.reply.does.not.contain.public.key.for.alias.=A resposta do certificado não contém a chave pública de <{0}> -Incomplete.certificate.chain.in.reply=Cadeia de certificados incompleta na resposta -Certificate.chain.in.reply.does.not.verify.=A cadeia de certificados da resposta não verifica:\u0020 -Top.level.certificate.in.reply.=Certificado de nível superior na resposta:\n -.is.not.trusted.=... não é confiável.\u0020 -Install.reply.anyway.no.=Instalar resposta assim mesmo? [não]: \u0020 -NO=NÃO -Public.keys.in.reply.and.keystore.don.t.match=As chaves públicas da resposta e da área de armazenamento de chaves não correspondem -Certificate.reply.and.certificate.in.keystore.are.identical=O certificado da resposta e o certificado da área de armazenamento de chaves são idênticos -Failed.to.establish.chain.from.reply=Falha ao estabelecer a cadeia a partir da resposta -n=n -Wrong.answer.try.again=Resposta errada; tente novamente -Secret.key.not.generated.alias.alias.already.exists=Chave secreta não gerada; o alias <{0}> já existe -Please.provide.keysize.for.secret.key.generation=Forneça o -keysize para a geração da chave secreta - -warning.not.verified.make.sure.keystore.is.correct=ADVERTÊNCIA: não verificado. Certifique-se que -keystore esteja correto. - -Extensions.=Extensões:\u0020 -.Empty.value.=(Valor vazio) -Extension.Request.=Solicitação de Extensão: -Unknown.keyUsage.type.=Tipo de keyUsage desconhecido:\u0020 -Unknown.extendedkeyUsage.type.=Tipo de extendedkeyUsage desconhecido:\u0020 -Unknown.AccessDescription.type.=Tipo de AccessDescription desconhecido:\u0020 -Unrecognized.GeneralName.type.=Tipo de GeneralName não reconhecido:\u0020 -This.extension.cannot.be.marked.as.critical.=Esta extensão não pode ser marcada como crítica.\u0020 -Odd.number.of.hex.digits.found.=Encontrado número ímpar de seis dígitos:\u0020 -Unknown.extension.type.=Tipo de extensão desconhecido:\u0020 -command.{0}.is.ambiguous.=o comando {0} é ambíguo: -# 8171319: keytool should print out warnings when reading or -# generating cert/cert req using weak algorithms -the.certificate.request=A solicitação do certificado -the.issuer=O emissor -the.generated.certificate=O certificado gerado -the.generated.crl=A CRL gerada -the.generated.certificate.request=A solicitação do certificado gerada -the.certificate=O certificado -the.crl=A CRL -the.tsa.certificate=O certificado TSA -the.input=A entrada -reply=Resposta -one.in.many=%1$s #%2$d de %3$d -alias.in.cacerts=Emissor <%s> no cacerts -alias.in.keystore=Emissor <%s> -with.weak=%s (fraca) -key.bit=Chave %2$s de %1$d bits -key.bit.weak=Chave %2$s de %1$d bits (fraca) -unknown.size.1=chave de tamanho desconhecido %s -.PATTERN.printX509Cert.with.weak=Proprietário: {0}\nEmissor: {1}\nNúmero de série: {2}\nVálido de: {3} até: {4}\nFingerprints do certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNome do algoritmo de assinatura: {7}\nAlgoritmo de Chave Pública do Assunto: {8}\nVersão: {9} -PKCS.10.with.weak=Solicitação do Certificado PKCS #10 (Versão 1.0)\nAssunto: %1$s\nFormato: %2$s\nChave Pública: %3$s\nAlgoritmo de assinatura: %4$s\n -verified.by.s.in.s.weak=Verificado por %1$s em %2$s com um %3$s -whose.sigalg.risk=%1$s usa o algoritmo de assinatura %2$s que é considerado um risco à segurança. -whose.key.risk=%1$s usa um %2$s que é considerado um risco à segurança. -jks.storetype.warning=O armazenamento de chaves %1$s usa um formato proprietário. É recomendada a migração para PKCS12, que é um formato de padrão industrial que usa "keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12". -migrate.keystore.warning="%1$s" foi migrado para %4$s. O backup do armazenamento de chaves %2$s é feito como "%3$s". -backup.keystore.warning=O backup do armazenamento de chaves original "%1$s" é feito como "%3$s"... -importing.keystore.status=Importando armazenamento de chaves %1$s to %2$s... diff --git a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_sv.properties b/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_sv.properties deleted file mode 100644 index 151a5ca427e..00000000000 --- a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_sv.properties +++ /dev/null @@ -1,302 +0,0 @@ -# -# 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 -# 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. -# - -NEWLINE=\n -STAR=******************************************* -STARNN=*******************************************\n\n -# keytool: Help part -.OPTION.=\u0020[OPTION]... -Options.=Alternativ: -option.1.set.twice=Du har angett alternativet %s flera gånger. Alla förutom det sista ignoreras. -multiple.commands.1.2=Endast ett kommando är tillåtet: du har angett både %1$s och %2$s. -Use.keytool.help.for.all.available.commands=Läs "Hjälp - Nyckelverktyg" för alla tillgängliga kommandon -Key.and.Certificate.Management.Tool=Hanteringsverktyg för nycklar och certifikat -Commands.=Kommandon: -Use.keytool.command.name.help.for.usage.of.command.name=Använd "keytool -command_name -help" för syntax för command_name.\nAnvänd alternativet -conf för att ange en förkonfigurerad alternativfil. -# keytool: help: commands -Generates.a.certificate.request=Genererar certifikatbegäran -Changes.an.entry.s.alias=Ändrar postalias -Deletes.an.entry=Tar bort en post -Exports.certificate=Exporterar certifikat -Generates.a.key.pair=Genererar nyckelpar -Generates.a.secret.key=Genererar hemlig nyckel -Generates.certificate.from.a.certificate.request=Genererar certifikat från certifikatbegäran -Generates.CRL=Genererar CRL -Generated.keyAlgName.secret.key=Genererade {0} hemlig nyckel -Generated.keysize.bit.keyAlgName.secret.key=Genererade {0}-bitars {1} hemlig nyckel -Imports.entries.from.a.JDK.1.1.x.style.identity.database=Importerar poster från identitetsdatabas i JDK 1.1.x-format -Imports.a.certificate.or.a.certificate.chain=Importerar ett certifikat eller en certifikatkedja -Imports.a.password=Importerar ett lösenord -Imports.one.or.all.entries.from.another.keystore=Importerar en eller alla poster från annat nyckellager -Clones.a.key.entry=Klonar en nyckelpost -Changes.the.key.password.of.an.entry=Ändrar nyckellösenordet för en post -Lists.entries.in.a.keystore=Visar lista över poster i nyckellager -Prints.the.content.of.a.certificate=Skriver ut innehållet i ett certifikat -Prints.the.content.of.a.certificate.request=Skriver ut innehållet i en certifikatbegäran -Prints.the.content.of.a.CRL.file=Skriver ut innehållet i en CRL-fil -Generates.a.self.signed.certificate=Genererar ett självsignerat certifikat -Changes.the.store.password.of.a.keystore=Ändrar lagerlösenordet för ett nyckellager -# keytool: help: options -alias.name.of.the.entry.to.process=aliasnamn för post som ska bearbetas -destination.alias=destinationsalias -destination.key.password=lösenord för destinationsnyckel -destination.keystore.name=namn på destinationsnyckellager -destination.keystore.password.protected=skyddat lösenord för destinationsnyckellager -destination.keystore.provider.name=leverantörsnamn för destinationsnyckellager -destination.keystore.password=lösenord för destinationsnyckellager -destination.keystore.type=typ av destinationsnyckellager -distinguished.name=unikt namn -X.509.extension=X.509-tillägg -output.file.name=namn på utdatafil -input.file.name=namn på indatafil -key.algorithm.name=namn på nyckelalgoritm -key.password=nyckellösenord -key.bit.size=nyckelbitstorlek -keystore.name=namn på nyckellager -access.the.cacerts.keystore=åtkomst till nyckellagret cacerts -warning.cacerts.option=Varning: använd alternativet -cacerts för att få åtkomst till nyckellagret cacerts -new.password=nytt lösenord -do.not.prompt=fråga inte -password.through.protected.mechanism=lösenord med skyddad mekanism -# The following 2 values should span 2 lines, the first for the -# option itself, the second for its -providerArg value. -addprovider.option=lägg till säkerhetsleverantör per namn (t.ex. SunPKCS11)\nkonfigurera argument för -addprovider -provider.class.option=lägg till säkerhetsleverantör per fullt kvalificerat klassnamn\nkonfigurera argument för -providerclass - -provider.name=leverantörsnamn -provider.classpath=leverantörsklassökväg -output.in.RFC.style=utdata i RFC-format -signature.algorithm.name=namn på signaturalgoritm -source.alias=källalias -source.key.password=lösenord för källnyckel -source.keystore.name=namn på källnyckellager -source.keystore.password.protected=skyddat lösenord för källnyckellager -source.keystore.provider.name=leverantörsnamn för källnyckellager -source.keystore.password=lösenord för källnyckellager -source.keystore.type=typ av källnyckellager -SSL.server.host.and.port=SSL-servervärd och -port -signed.jar.file=signerad jar-fil -certificate.validity.start.date.time=startdatum/-tid för certifikatets giltighet -keystore.password=lösenord för nyckellager -keystore.type=nyckellagertyp -trust.certificates.from.cacerts=tillförlitliga certifikat från cacerts -verbose.output=utförliga utdata -validity.number.of.days=antal dagar för giltighet -Serial.ID.of.cert.to.revoke=Serienummer på certifikat som ska återkallas -# keytool: Running part -keytool.error.=nyckelverktygsfel:\u0020 -Illegal.option.=Otillåtet alternativ: \u0020 -Illegal.value.=Otillåtet värde:\u0020 -Unknown.password.type.=Okänd lösenordstyp:\u0020 -Cannot.find.environment.variable.=Hittar inte miljövariabel:\u0020 -Cannot.find.file.=Hittar inte fil:\u0020 -Command.option.flag.needs.an.argument.=Kommandoalternativet {0} behöver ett argument. -Warning.Different.store.and.key.passwords.not.supported.for.PKCS12.KeyStores.Ignoring.user.specified.command.value.=Varning! PKCS12-nyckellager har inte stöd för olika lösenord för lagret och nyckeln. Det användarspecificerade {0}-värdet ignoreras. -the.keystore.or.storetype.option.cannot.be.used.with.the.cacerts.option=Alternativen -keystore och -storetype kan inte användas med alternativet -cacerts -.keystore.must.be.NONE.if.storetype.is.{0}=-keystore måste vara NONE om -storetype är {0} -Too.many.retries.program.terminated=För många försök. Programmet avslutas -.storepasswd.and.keypasswd.commands.not.supported.if.storetype.is.{0}=-storepasswd- och -keypasswd-kommandon stöds inte om -storetype är {0} -.keypasswd.commands.not.supported.if.storetype.is.PKCS12=-keypasswd-kommandon stöds inte om -storetype är PKCS12 -.keypass.and.new.can.not.be.specified.if.storetype.is.{0}=-keypass och -new kan inte anges om -storetype är {0} -if.protected.is.specified.then.storepass.keypass.and.new.must.not.be.specified=om -protected har angetts får inte -storepass, -keypass och -new anges -if.srcprotected.is.specified.then.srcstorepass.and.srckeypass.must.not.be.specified=om -srcprotected anges får -srcstorepass och -srckeypass inte anges -if.keystore.is.not.password.protected.then.storepass.keypass.and.new.must.not.be.specified=om nyckellagret inte är lösenordsskyddat får -storepass, -keypass och -new inte anges -if.source.keystore.is.not.password.protected.then.srcstorepass.and.srckeypass.must.not.be.specified=om källnyckellagret inte är lösenordsskyddat får -srcstorepass och -srckeypass inte anges -Illegal.startdate.value=Otillåtet värde för startdatum -Validity.must.be.greater.than.zero=Giltigheten måste vara större än noll -provclass.not.a.provider=%s är inte en leverantör -provider.name.not.found=Leverantören med namnet "%s" hittades inte -provider.class.not.found=Leverantören "%s" hittades inte -Usage.error.no.command.provided=Syntaxfel: inget kommando angivet -Source.keystore.file.exists.but.is.empty.=Nyckellagrets källfil finns, men är tom:\u0020 -Please.specify.srckeystore=Ange -srckeystore -Must.not.specify.both.v.and.rfc.with.list.command=Kan inte specificera både -v och -rfc med 'list'-kommandot -Key.password.must.be.at.least.6.characters=Nyckellösenordet måste innehålla minst 6 tecken -New.password.must.be.at.least.6.characters=Det nya lösenordet måste innehålla minst 6 tecken -Keystore.file.exists.but.is.empty.=Nyckellagerfilen finns, men är tom:\u0020 -Keystore.file.does.not.exist.=Nyckellagerfilen finns inte:\u0020 -Must.specify.destination.alias=Du måste ange destinationsalias -Must.specify.alias=Du måste ange alias -Keystore.password.must.be.at.least.6.characters=Nyckellagerlösenordet måste innehålla minst 6 tecken -Enter.the.password.to.be.stored.=Ange det lösenord som ska lagras: \u0020 -Enter.keystore.password.=Ange nyckellagerlösenord: \u0020 -Enter.source.keystore.password.=Ange lösenord för källnyckellagret: \u0020 -Enter.destination.keystore.password.=Ange nyckellagerlösenord för destination: \u0020 -Keystore.password.is.too.short.must.be.at.least.6.characters=Nyckellagerlösenordet är för kort - det måste innehålla minst 6 tecken -Unknown.Entry.Type=Okänd posttyp -Too.many.failures.Alias.not.changed=För många fel. Alias har inte ändrats -Entry.for.alias.alias.successfully.imported.=Posten för alias {0} har importerats. -Entry.for.alias.alias.not.imported.=Posten för alias {0} har inte importerats. -Problem.importing.entry.for.alias.alias.exception.Entry.for.alias.alias.not.imported.=Ett problem uppstod vid importen av posten för alias {0}: {1}.\nPosten {0} har inte importerats. -Import.command.completed.ok.entries.successfully.imported.fail.entries.failed.or.cancelled=Kommandoimporten slutförd: {0} poster har importerats, {1} poster var felaktiga eller annullerades -Warning.Overwriting.existing.alias.alias.in.destination.keystore=Varning! Det befintliga aliaset {0} i destinationsnyckellagret skrivs över -Existing.entry.alias.alias.exists.overwrite.no.=Aliaset {0} finns redan. Vill du skriva över det? [nej]: \u0020 -Too.many.failures.try.later=För många fel - försök igen senare -Certification.request.stored.in.file.filename.=Certifikatbegäran har lagrats i filen <{0}> -Submit.this.to.your.CA=Skicka detta till certifikatutfärdaren -if.alias.not.specified.destalias.and.srckeypass.must.not.be.specified=om alias inte angivits ska inte heller destalias och srckeypass anges -The.destination.pkcs12.keystore.has.different.storepass.and.keypass.Please.retry.with.destkeypass.specified.=Destinationsnyckellagret pkcs12 har olika storepass och keypass. Försök igen med -destkeypass angivet. -Certificate.stored.in.file.filename.=Certifikatet har lagrats i filen <{0}> -Certificate.reply.was.installed.in.keystore=Certifikatsvaret har installerats i nyckellagret -Certificate.reply.was.not.installed.in.keystore=Certifikatsvaret har inte installerats i nyckellagret -Certificate.was.added.to.keystore=Certifikatet har lagts till i nyckellagret -Certificate.was.not.added.to.keystore=Certifikatet har inte lagts till i nyckellagret -.Storing.ksfname.=[Lagrar {0}] -alias.has.no.public.key.certificate.={0} saknar öppen nyckel (certifikat) -Cannot.derive.signature.algorithm=Kan inte härleda signaturalgoritm -Alias.alias.does.not.exist=Aliaset <{0}> finns inte -Alias.alias.has.no.certificate=Aliaset <{0}> saknar certifikat -Key.pair.not.generated.alias.alias.already.exists=Nyckelparet genererades inte. Aliaset <{0}> finns redan -Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for=Genererar {0} bitars {1}-nyckelpar och självsignerat certifikat ({2}) med en giltighet på {3} dagar\n\tför: {4} -Enter.key.password.for.alias.=Ange nyckellösenord för <{0}> -.RETURN.if.same.as.keystore.password.=\t(RETURN om det är identiskt med nyckellagerlösenordet): \u0020 -Key.password.is.too.short.must.be.at.least.6.characters=Nyckellösenordet är för kort - det måste innehålla minst 6 tecken -Too.many.failures.key.not.added.to.keystore=För många fel - nyckeln lades inte till i nyckellagret -Destination.alias.dest.already.exists=Destinationsaliaset <{0}> finns redan -Password.is.too.short.must.be.at.least.6.characters=Lösenordet är för kort - det måste innehålla minst 6 tecken -Too.many.failures.Key.entry.not.cloned=För många fel. Nyckelposten har inte klonats -key.password.for.alias.=nyckellösenord för <{0}> -Keystore.entry.for.id.getName.already.exists=Nyckellagerpost för <{0}> finns redan -Creating.keystore.entry.for.id.getName.=Skapar nyckellagerpost för <{0}> ... -No.entries.from.identity.database.added=Inga poster från identitetsdatabasen har lagts till -Alias.name.alias=Aliasnamn: {0} -Creation.date.keyStore.getCreationDate.alias.=Skapat den: {0,date} -alias.keyStore.getCreationDate.alias.={0}, {1,date},\u0020 -alias.={0},\u0020 -Entry.type.type.=Posttyp: {0} -Certificate.chain.length.=Längd på certifikatskedja:\u0020 -Certificate.i.1.=Certifikat[{0,number,integer}]: -Certificate.fingerprint.SHA.256.=Certifikatfingeravtryck (SHA-256):\u0020 -Keystore.type.=Nyckellagertyp:\u0020 -Keystore.provider.=Nyckellagerleverantör:\u0020 -Your.keystore.contains.keyStore.size.entry=Nyckellagret innehåller {0,number,integer} post -Your.keystore.contains.keyStore.size.entries=Nyckellagret innehåller {0,number,integer} poster -Failed.to.parse.input=Kunde inte tolka indata -Empty.input=Inga indata -Not.X.509.certificate=Inte ett X.509-certifikat -alias.has.no.public.key={0} saknar öppen nyckel -alias.has.no.X.509.certificate={0} saknar X.509-certifikat -New.certificate.self.signed.=Nytt certifikat (självsignerat): -Reply.has.no.certificates=Svaret saknar certifikat -Certificate.not.imported.alias.alias.already.exists=Certifikatet importerades inte. Aliaset <{0}> finns redan -Input.not.an.X.509.certificate=Indata är inte ett X.509-certifikat -Certificate.already.exists.in.keystore.under.alias.trustalias.=Certifikatet finns redan i nyckellagerfilen under aliaset <{0}> -Do.you.still.want.to.add.it.no.=Vill du fortfarande lägga till det? [nej]: \u0020 -Certificate.already.exists.in.system.wide.CA.keystore.under.alias.trustalias.=Certifikatet finns redan i den systemomspännande CA-nyckellagerfilen under aliaset <{0}> -Do.you.still.want.to.add.it.to.your.own.keystore.no.=Vill du fortfarande lägga till det i ditt eget nyckellagret? [nej]: \u0020 -Trust.this.certificate.no.=Litar du på det här certifikatet? [nej]: \u0020 -YES=JA -New.prompt.=Nytt {0}:\u0020 -Passwords.must.differ=Lösenorden måste vara olika -Re.enter.new.prompt.=Ange nytt {0} igen:\u0020 -Re.enter.password.=Ange lösenord igen:\u0020 -Re.enter.new.password.=Ange det nya lösenordet igen:\u0020 -They.don.t.match.Try.again=De matchar inte. Försök igen -Enter.prompt.alias.name.=Ange aliasnamn för {0}: \u0020 -Enter.new.alias.name.RETURN.to.cancel.import.for.this.entry.=Ange ett nytt aliasnamn\t(skriv RETURN för att avbryta importen av denna post): \u0020 -Enter.alias.name.=Ange aliasnamn: \u0020 -.RETURN.if.same.as.for.otherAlias.=\t(RETURN om det är det samma som för <{0}>) -What.is.your.first.and.last.name.=Vad heter du i för- och efternamn? -What.is.the.name.of.your.organizational.unit.=Vad heter din avdelning inom organisationen? -What.is.the.name.of.your.organization.=Vad heter din organisation? -What.is.the.name.of.your.City.or.Locality.=Vad heter din ort eller plats? -What.is.the.name.of.your.State.or.Province.=Vad heter ditt land eller din provins? -What.is.the.two.letter.country.code.for.this.unit.=Vilken är den tvåställiga landskoden? -Is.name.correct.=Är {0} korrekt? -no=nej -yes=ja -y=j -.defaultValue.=\u0020 [{0}]: \u0020 -Alias.alias.has.no.key=Aliaset <{0}> saknar nyckel -Alias.alias.references.an.entry.type.that.is.not.a.private.key.entry.The.keyclone.command.only.supports.cloning.of.private.key=Aliaset <{0}> refererar till en posttyp som inte är någon privat nyckelpost. Kommandot -keyclone har endast stöd för kloning av privata nyckelposter - -.WARNING.WARNING.WARNING.=***************** WARNING WARNING WARNING ***************** -Signer.d.=Undertecknare %d: -Timestamp.=Tidsstämpel: -Signature.=Signatur: -CRLs.=CRL:er: -Certificate.owner.=Certifikatägare:\u0020 -Not.a.signed.jar.file=Ingen signerad jar-fil -No.certificate.from.the.SSL.server=Inget certifikat från SSL-servern - -.The.integrity.of.the.information.stored.in.your.keystore.=* Integriteten för den information som lagras i nyckellagerfilen *\n* har INTE verifierats! Om du vill verifiera dess integritet *\n* måste du ange lösenordet för nyckellagret. * -.The.integrity.of.the.information.stored.in.the.srckeystore.=* Integriteten för den information som lagras i srckeystore*\n* har INTE verifierats! Om du vill verifiera dess integritet *\n* måste du ange lösenordet för srckeystore. * - -Certificate.reply.does.not.contain.public.key.for.alias.=Certifikatsvaret innehåller inte någon öppen nyckel för <{0}> -Incomplete.certificate.chain.in.reply=Ofullständig certifikatskedja i svaret -Certificate.chain.in.reply.does.not.verify.=Certifikatskedjan i svaret går inte att verifiera:\u0020 -Top.level.certificate.in.reply.=Toppnivåcertifikatet i svaret:\n -.is.not.trusted.=... är inte betrott.\u0020 -Install.reply.anyway.no.=Vill du installera svaret ändå? [nej]: \u0020 -NO=NEJ -Public.keys.in.reply.and.keystore.don.t.match=De offentliga nycklarna i svaret och nyckellagret matchar inte varandra -Certificate.reply.and.certificate.in.keystore.are.identical=Certifikatsvaret och certifikatet i nyckellagret är identiska -Failed.to.establish.chain.from.reply=Kunde inte upprätta kedja från svaret -n=n -Wrong.answer.try.again=Fel svar. Försök på nytt. -Secret.key.not.generated.alias.alias.already.exists=Den hemliga nyckeln har inte genererats eftersom aliaset <{0}> redan finns -Please.provide.keysize.for.secret.key.generation=Ange -keysize för att skapa hemlig nyckel - -warning.not.verified.make.sure.keystore.is.correct=VARNING: ej verifierad. Se till att -nyckellager är korrekt. - -Extensions.=Tillägg:\u0020 -.Empty.value.=(Tomt värde) -Extension.Request.=Tilläggsbegäran: -Unknown.keyUsage.type.=Okänd keyUsage-typ:\u0020 -Unknown.extendedkeyUsage.type.=Okänd extendedkeyUsage-typ:\u0020 -Unknown.AccessDescription.type.=Okänd AccessDescription-typ:\u0020 -Unrecognized.GeneralName.type.=Okänd GeneralName-typ:\u0020 -This.extension.cannot.be.marked.as.critical.=Detta tillägg kan inte markeras som kritiskt.\u0020 -Odd.number.of.hex.digits.found.=Udda antal hex-siffror påträffades:\u0020 -Unknown.extension.type.=Okänd tilläggstyp:\u0020 -command.{0}.is.ambiguous.=kommandot {0} är tvetydigt: -# 8171319: keytool should print out warnings when reading or -# generating cert/cert req using weak algorithms -the.certificate.request=Certifikatbegäran -the.issuer=Utfärdaren -the.generated.certificate=Det genererade certifikatet -the.generated.crl=Den genererade listan över återkallade certifikat -the.generated.certificate.request=Den genererade certifikatbegäran -the.certificate=Certifikatet -the.crl=Listan över återkallade certifikat -the.tsa.certificate=TSA-certifikatet -the.input=Indata -reply=Svar -one.in.many=%1$s #%2$d av %3$d -alias.in.cacerts=Utfärdaren <%s> i cacerts -alias.in.keystore=Utfärdaren <%s> -with.weak=%s (svag) -key.bit=%1$d-bitars %2$s-nyckel -key.bit.weak=%1$d-bitars %2$s-nyckel (svag) -unknown.size.1=okänd storlek på nyckeln %s -.PATTERN.printX509Cert.with.weak=Ägare: {0}\nUtfärdare: {1}\nSerienummer: {2}\nGiltigt från: {3}, till: {4}\nCertifikatfingeravtryck:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgoritmnamn: {7}\nAlgoritm för öppen nyckel för ämne: {8}\nVersion: {9} -PKCS.10.with.weak=PKCS #10-certifikatbegäran (version 1.0)\nÄmne: %1$s\nFormat: %2$s\nÖppen nyckel: %3$s\nSignaturalgoritm: %4$s\n -verified.by.s.in.s.weak=Verifierades av %1$s i %2$s med en %3$s -whose.sigalg.risk=%1$s använder signaturalgoritmen %2$s, vilket anses utgöra en säkerhetsrisk. -whose.key.risk=%1$s använder en %2$s, vilket anses utgöra en säkerhetsrisk. -jks.storetype.warning=Nyckellagret %1$s använder ett proprietärt format. Du bör migrera till PKCS12, som är ett branschstandardformat, med "keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12". -migrate.keystore.warning=Migrerade "%1$s" till %4$s. Nyckellagret %2$s säkerhetskopierades som "%3$s". -backup.keystore.warning=Det ursprungliga nyckellagret, \"%1$s\", säkerhetskopieras som \"%3$s\"... -importing.keystore.status=Importerar nyckellagret %1$s till %2$s... diff --git a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_zh_TW.properties b/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_zh_TW.properties deleted file mode 100644 index 6e2c64e900f..00000000000 --- a/src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_zh_TW.properties +++ /dev/null @@ -1,302 +0,0 @@ -# -# 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 -# 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. -# - -NEWLINE=\n -STAR=******************************************* -STARNN=*******************************************\n\n -# keytool: Help part -.OPTION.=\u0020[OPTION]... -Options.=選項: -option.1.set.twice=%s 選項已指定多次。將忽略最後一個選項以外的其他所有選項。 -multiple.commands.1.2=只允許一個命令: 指定了 %1$s 和 %2$s 兩者。 -Use.keytool.help.for.all.available.commands=使用 "keytool -help" 取得所有可用的命令 -Key.and.Certificate.Management.Tool=金鑰與憑證管理工具 -Commands.=命令: -Use.keytool.command.name.help.for.usage.of.command.name=使用 "keytool -command_name -help" 取得 command_name 的用法。\n使用 -conf 選項指定預先設定的選項檔案。 -# keytool: help: commands -Generates.a.certificate.request=產生憑證要求 -Changes.an.entry.s.alias=變更項目的別名 -Deletes.an.entry=刪除項目 -Exports.certificate=匯出憑證 -Generates.a.key.pair=產生金鑰組 -Generates.a.secret.key=產生秘密金鑰 -Generates.certificate.from.a.certificate.request=從憑證要求產生憑證 -Generates.CRL=產生 CRL -Generated.keyAlgName.secret.key=已產生 {0} 秘密金鑰 -Generated.keysize.bit.keyAlgName.secret.key=已產生 {0} 位元 {1} 秘密金鑰 -Imports.entries.from.a.JDK.1.1.x.style.identity.database=從 JDK 1.1.x-style 識別資料庫匯入項目 -Imports.a.certificate.or.a.certificate.chain=匯入憑證或憑證鏈 -Imports.a.password=匯入密碼 -Imports.one.or.all.entries.from.another.keystore=從其他金鑰儲存庫匯入一個或全部項目 -Clones.a.key.entry=複製金鑰項目 -Changes.the.key.password.of.an.entry=變更項目的金鑰密碼 -Lists.entries.in.a.keystore=列示金鑰儲存庫中的項目 -Prints.the.content.of.a.certificate=列印憑證的內容 -Prints.the.content.of.a.certificate.request=列印憑證要求的內容 -Prints.the.content.of.a.CRL.file=列印 CRL 檔案的內容 -Generates.a.self.signed.certificate=產生自行簽署的憑證 -Changes.the.store.password.of.a.keystore=變更金鑰儲存庫的儲存密碼 -# keytool: help: options -alias.name.of.the.entry.to.process=要處理項目的別名名稱 -destination.alias=目的地別名 -destination.key.password=目的地金鑰密碼 -destination.keystore.name=目的地金鑰儲存庫名稱 -destination.keystore.password.protected=目的地金鑰儲存庫密碼保護 -destination.keystore.provider.name=目的地金鑰儲存庫提供者名稱 -destination.keystore.password=目的地金鑰儲存庫密碼 -destination.keystore.type=目的地金鑰儲存庫類型 -distinguished.name=辨別名稱 -X.509.extension=X.509 擴充套件 -output.file.name=輸出檔案名稱 -input.file.name=輸入檔案名稱 -key.algorithm.name=金鑰演算法名稱 -key.password=金鑰密碼 -key.bit.size=金鑰位元大小 -keystore.name=金鑰儲存庫名稱 -access.the.cacerts.keystore=存取 cacerts 金鑰儲存庫 -warning.cacerts.option=警告: 使用 -cacerts 選項存取 cacerts 金鑰儲存庫 -new.password=新密碼 -do.not.prompt=不要提示 -password.through.protected.mechanism=經由保護機制的密碼 -# The following 2 values should span 2 lines, the first for the -# option itself, the second for its -providerArg value. -addprovider.option=使用名稱新增安全提供者 (例如 SunPKCS11)\n設定 -addprovider 引數 -provider.class.option=使用完整類別名稱新增安全提供者\n設定 -providerclass 引數 - -provider.name=提供者名稱 -provider.classpath=提供者類別路徑 -output.in.RFC.style=以 RFC 樣式輸出 -signature.algorithm.name=簽章演算法名稱 -source.alias=來源別名 -source.key.password=來源金鑰密碼 -source.keystore.name=來源金鑰儲存庫名稱 -source.keystore.password.protected=來源金鑰儲存庫密碼保護 -source.keystore.provider.name=來源金鑰儲存庫提供者名稱 -source.keystore.password=來源金鑰儲存庫密碼 -source.keystore.type=來源金鑰儲存庫類型 -SSL.server.host.and.port=SSL 伺服器主機與連接埠 -signed.jar.file=簽署的 jar 檔案 -certificate.validity.start.date.time=憑證有效性開始日期/時間 -keystore.password=金鑰儲存庫密碼 -keystore.type=金鑰儲存庫類型 -trust.certificates.from.cacerts=來自 cacerts 的信任憑證 -verbose.output=詳細資訊輸出 -validity.number.of.days=有效性日數 -Serial.ID.of.cert.to.revoke=要撤銷憑證的序列 ID -# keytool: Running part -keytool.error.=金鑰工具錯誤:\u0020 -Illegal.option.=無效的選項: -Illegal.value.=無效值:\u0020 -Unknown.password.type.=不明的密碼類型:\u0020 -Cannot.find.environment.variable.=找不到環境變數:\u0020 -Cannot.find.file.=找不到檔案:\u0020 -Command.option.flag.needs.an.argument.=命令選項 {0} 需要引數。 -Warning.Different.store.and.key.passwords.not.supported.for.PKCS12.KeyStores.Ignoring.user.specified.command.value.=警告: PKCS12 金鑰儲存庫不支援不同的儲存庫和金鑰密碼。忽略使用者指定的 {0} 值。 -the.keystore.or.storetype.option.cannot.be.used.with.the.cacerts.option=-keystore 或 -storetype 選項不能與 -cacerts 選項一起使用 -.keystore.must.be.NONE.if.storetype.is.{0}=如果 -storetype 為 {0},則 -keystore 必須為 NONE -Too.many.retries.program.terminated=重試次數太多,程式已終止 -.storepasswd.and.keypasswd.commands.not.supported.if.storetype.is.{0}=如果 -storetype 為 {0},則不支援 -storepasswd 和 -keypasswd 命令 -.keypasswd.commands.not.supported.if.storetype.is.PKCS12=如果 -storetype 為 PKCS12,則不支援 -keypasswd 命令 -.keypass.and.new.can.not.be.specified.if.storetype.is.{0}=如果 -storetype 為 {0},則不能指定 -keypass 和 -new -if.protected.is.specified.then.storepass.keypass.and.new.must.not.be.specified=如果指定 -protected,則不能指定 -storepass、-keypass 和 -new -if.srcprotected.is.specified.then.srcstorepass.and.srckeypass.must.not.be.specified=如果指定 -srcprotected,則不能指定 -srcstorepass 和 -srckeypass -if.keystore.is.not.password.protected.then.storepass.keypass.and.new.must.not.be.specified=如果金鑰儲存庫不受密碼保護,則不能指定 -storepass、-keypass 和 -new -if.source.keystore.is.not.password.protected.then.srcstorepass.and.srckeypass.must.not.be.specified=如果來源金鑰儲存庫不受密碼保護,則不能指定 -srcstorepass 和 -srckeypass -Illegal.startdate.value=無效的 startdate 值 -Validity.must.be.greater.than.zero=有效性必須大於零 -provclass.not.a.provider=%s 不是一個提供者 -provider.name.not.found=找不到名稱為 "%s" 的提供者 -provider.class.not.found=找不到提供者 "%s" -Usage.error.no.command.provided=用法錯誤: 未提供命令 -Source.keystore.file.exists.but.is.empty.=來源金鑰儲存庫檔案存在,但為空:\u0020 -Please.specify.srckeystore=請指定 -srckeystore -Must.not.specify.both.v.and.rfc.with.list.command=\u0020'list' 命令不能同時指定 -v 及 -rfc -Key.password.must.be.at.least.6.characters=金鑰密碼必須至少為 6 個字元 -New.password.must.be.at.least.6.characters=新的密碼必須至少為 6 個字元 -Keystore.file.exists.but.is.empty.=金鑰儲存庫檔案存在,但為空白:\u0020 -Keystore.file.does.not.exist.=金鑰儲存庫檔案不存在:\u0020 -Must.specify.destination.alias=必須指定目的地別名 -Must.specify.alias=必須指定別名 -Keystore.password.must.be.at.least.6.characters=金鑰儲存庫密碼必須至少為 6 個字元 -Enter.the.password.to.be.stored.=輸入要儲存的密碼: \u0020 -Enter.keystore.password.=輸入金鑰儲存庫密碼: \u0020 -Enter.source.keystore.password.=請輸入來源金鑰儲存庫密碼:\u0020 -Enter.destination.keystore.password.=請輸入目的地金鑰儲存庫密碼:\u0020 -Keystore.password.is.too.short.must.be.at.least.6.characters=金鑰儲存庫密碼太短 - 必須至少為 6 個字元 -Unknown.Entry.Type=不明的項目類型 -Too.many.failures.Alias.not.changed=太多錯誤。未變更別名 -Entry.for.alias.alias.successfully.imported.=已成功匯入別名 {0} 的項目。 -Entry.for.alias.alias.not.imported.=未匯入別名 {0} 的項目。 -Problem.importing.entry.for.alias.alias.exception.Entry.for.alias.alias.not.imported.=匯入別名 {0} 的項目時出現問題: {1}。\n未匯入別名 {0} 的項目。 -Import.command.completed.ok.entries.successfully.imported.fail.entries.failed.or.cancelled=已完成匯入命令: 成功匯入 {0} 個項目,{1} 個項目失敗或已取消 -Warning.Overwriting.existing.alias.alias.in.destination.keystore=警告: 正在覆寫目的地金鑰儲存庫中的現有別名 {0} -Existing.entry.alias.alias.exists.overwrite.no.=現有項目別名 {0} 存在,是否覆寫?[否]: \u0020 -Too.many.failures.try.later=太多錯誤 - 請稍後再試 -Certification.request.stored.in.file.filename.=認證要求儲存在檔案 <{0}> -Submit.this.to.your.CA=將此送出至您的 CA -if.alias.not.specified.destalias.and.srckeypass.must.not.be.specified=如果未指定別名,則不能指定 destalias 和 srckeypass -The.destination.pkcs12.keystore.has.different.storepass.and.keypass.Please.retry.with.destkeypass.specified.=目的地 pkcs12 金鑰儲存庫的 storepass 和 keypass 不同。請重新以 -destkeypass 指定。 -Certificate.stored.in.file.filename.=憑證儲存在檔案 <{0}> -Certificate.reply.was.installed.in.keystore=憑證回覆已安裝在金鑰儲存庫中 -Certificate.reply.was.not.installed.in.keystore=憑證回覆未安裝在金鑰儲存庫中 -Certificate.was.added.to.keystore=憑證已新增至金鑰儲存庫中 -Certificate.was.not.added.to.keystore=憑證未新增至金鑰儲存庫中 -.Storing.ksfname.=[儲存 {0}] -alias.has.no.public.key.certificate.={0} 沒有公開金鑰 (憑證) -Cannot.derive.signature.algorithm=無法取得簽章演算法 -Alias.alias.does.not.exist=別名 <{0}> 不存在 -Alias.alias.has.no.certificate=別名 <{0}> 沒有憑證 -Key.pair.not.generated.alias.alias.already.exists=沒有建立金鑰組,別名 <{0}> 已經存在 -Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for=針對 {4} 產生有效期 {3} 天的 {0} 位元 {1} 金鑰組以及自我簽署憑證 ({2})\n\t -Enter.key.password.for.alias.=輸入 <{0}> 的金鑰密碼 -.RETURN.if.same.as.keystore.password.=\t(RETURN 如果和金鑰儲存庫密碼相同): \u0020 -Key.password.is.too.short.must.be.at.least.6.characters=金鑰密碼太短 - 必須至少為 6 個字元 -Too.many.failures.key.not.added.to.keystore=太多錯誤 - 金鑰未新增至金鑰儲存庫 -Destination.alias.dest.already.exists=目的地別名 <{0}> 已經存在 -Password.is.too.short.must.be.at.least.6.characters=密碼太短 - 必須至少為 6 個字元 -Too.many.failures.Key.entry.not.cloned=太多錯誤。未複製金鑰項目 -key.password.for.alias.=<{0}> 的金鑰密碼 -Keystore.entry.for.id.getName.already.exists=<{0}> 的金鑰儲存庫項目已經存在 -Creating.keystore.entry.for.id.getName.=建立 <{0}> 的金鑰儲存庫項目... -No.entries.from.identity.database.added=沒有新增來自識別資料庫的項目 -Alias.name.alias=別名名稱: {0} -Creation.date.keyStore.getCreationDate.alias.=建立日期: {0,date} -alias.keyStore.getCreationDate.alias.={0}, {1,date},\u0020 -alias.={0},\u0020 -Entry.type.type.=項目類型: {0} -Certificate.chain.length.=憑證鏈長度:\u0020 -Certificate.i.1.=憑證 [{0,number,integer}]: -Certificate.fingerprint.SHA.256.=憑證指紋 (SHA-256):\u0020 -Keystore.type.=金鑰儲存庫類型:\u0020 -Keystore.provider.=金鑰儲存庫提供者:\u0020 -Your.keystore.contains.keyStore.size.entry=您的金鑰儲存庫包含 {0,number,integer} 項目 -Your.keystore.contains.keyStore.size.entries=您的金鑰儲存庫包含 {0,number,integer} 項目 -Failed.to.parse.input=無法剖析輸入 -Empty.input=空輸入 -Not.X.509.certificate=非 X.509 憑證 -alias.has.no.public.key={0} 無公開金鑰 -alias.has.no.X.509.certificate={0} 無 X.509 憑證 -New.certificate.self.signed.=新憑證 (自我簽署):\u0020 -Reply.has.no.certificates=回覆不含憑證 -Certificate.not.imported.alias.alias.already.exists=憑證未輸入,別名 <{0}> 已經存在 -Input.not.an.X.509.certificate=輸入的不是 X.509 憑證 -Certificate.already.exists.in.keystore.under.alias.trustalias.=金鑰儲存庫中的 <{0}> 別名之下,憑證已經存在 -Do.you.still.want.to.add.it.no.=您仍然想要將之新增嗎? [否]: \u0020 -Certificate.already.exists.in.system.wide.CA.keystore.under.alias.trustalias.=整個系統 CA 金鑰儲存庫中的 <{0}> 別名之下,憑證已經存在 -Do.you.still.want.to.add.it.to.your.own.keystore.no.=您仍然想要將之新增至自己的金鑰儲存庫嗎? [否]: \u0020 -Trust.this.certificate.no.=信任這個憑證? [否]: \u0020 -YES=是 -New.prompt.=新 {0}:\u0020 -Passwords.must.differ=必須是不同的密碼 -Re.enter.new.prompt.=重新輸入新 {0}:\u0020 -Re.enter.password.=重新輸入密碼: -Re.enter.new.password.=重新輸入新密碼:\u0020 -They.don.t.match.Try.again=它們不相符。請重試 -Enter.prompt.alias.name.=輸入 {0} 別名名稱: \u0020 -Enter.new.alias.name.RETURN.to.cancel.import.for.this.entry.=請輸入新的別名名稱\t(RETURN 以取消匯入此項目): -Enter.alias.name.=輸入別名名稱: \u0020 -.RETURN.if.same.as.for.otherAlias.=\t(RETURN 如果和 <{0}> 的相同) -What.is.your.first.and.last.name.=您的名字與姓氏為何? -What.is.the.name.of.your.organizational.unit.=您的組織單位名稱為何? -What.is.the.name.of.your.organization.=您的組織名稱為何? -What.is.the.name.of.your.City.or.Locality.=您所在的城市或地區名稱為何? -What.is.the.name.of.your.State.or.Province.=您所在的州及省份名稱為何? -What.is.the.two.letter.country.code.for.this.unit.=此單位的兩個字母國別代碼為何? -Is.name.correct.={0} 正確嗎? -no=否 -yes=是 -y=y -.defaultValue.=\u0020 [{0}]: \u0020 -Alias.alias.has.no.key=別名 <{0}> 沒有金鑰 -Alias.alias.references.an.entry.type.that.is.not.a.private.key.entry.The.keyclone.command.only.supports.cloning.of.private.key=別名 <{0}> 所參照的項目不是私密金鑰類型。-keyclone 命令僅支援私密金鑰項目的複製 - -.WARNING.WARNING.WARNING.=***************** WARNING WARNING WARNING ***************** -Signer.d.=簽署者 #%d: -Timestamp.=時戳: -Signature.=簽章: -CRLs.=CRL: -Certificate.owner.=憑證擁有者:\u0020 -Not.a.signed.jar.file=不是簽署的 jar 檔案 -No.certificate.from.the.SSL.server=沒有來自 SSL 伺服器的憑證 - -.The.integrity.of.the.information.stored.in.your.keystore.=* 尚未驗證儲存於金鑰儲存庫中資訊 *\n* 的完整性!若要驗證其完整性, *\n* 您必須提供您的金鑰儲存庫密碼。 * -.The.integrity.of.the.information.stored.in.the.srckeystore.=* 尚未驗證儲存於 srckeystore 中資訊 *\n* 的完整性!若要驗證其完整性,您必須 *\n* 提供 srckeystore 密碼。 * - -Certificate.reply.does.not.contain.public.key.for.alias.=憑證回覆並未包含 <{0}> 的公開金鑰 -Incomplete.certificate.chain.in.reply=回覆時的憑證鏈不完整 -Certificate.chain.in.reply.does.not.verify.=回覆時的憑證鏈未驗證:\u0020 -Top.level.certificate.in.reply.=回覆時的最高級憑證:\n -.is.not.trusted.=... 是不被信任的。 -Install.reply.anyway.no.=還是要安裝回覆? [否]: \u0020 -NO=否 -Public.keys.in.reply.and.keystore.don.t.match=回覆時的公開金鑰與金鑰儲存庫不符 -Certificate.reply.and.certificate.in.keystore.are.identical=憑證回覆與金鑰儲存庫中的憑證是相同的 -Failed.to.establish.chain.from.reply=無法從回覆中將鏈建立起來 -n=n -Wrong.answer.try.again=錯誤的答案,請再試一次 -Secret.key.not.generated.alias.alias.already.exists=未產生秘密金鑰,別名 <{0}> 已存在 -Please.provide.keysize.for.secret.key.generation=請提供 -keysize 以產生秘密金鑰 - -warning.not.verified.make.sure.keystore.is.correct=警告: 未驗證。請確定 -keystore 正確。 - -Extensions.=擴充套件:\u0020 -.Empty.value.=(空白值) -Extension.Request.=擴充套件要求: -Unknown.keyUsage.type.=不明的 keyUsage 類型:\u0020 -Unknown.extendedkeyUsage.type.=不明的 extendedkeyUsage 類型:\u0020 -Unknown.AccessDescription.type.=不明的 AccessDescription 類型:\u0020 -Unrecognized.GeneralName.type.=無法辨識的 GeneralName 類型:\u0020 -This.extension.cannot.be.marked.as.critical.=此擴充套件無法標示為關鍵。 -Odd.number.of.hex.digits.found.=找到十六進位數字的奇數:\u0020 -Unknown.extension.type.=不明的擴充套件類型:\u0020 -command.{0}.is.ambiguous.=命令 {0} 不明確: -# 8171319: keytool should print out warnings when reading or -# generating cert/cert req using weak algorithms -the.certificate.request=憑證要求 -the.issuer=發行人 -the.generated.certificate=產生的憑證 -the.generated.crl=產生的 CRL -the.generated.certificate.request=產生的憑證要求 -the.certificate=憑證 -the.crl=CRL -the.tsa.certificate=TSA 憑證 -the.input=輸入 -reply=回覆 -one.in.many=%1$s #%2$d / %3$d -alias.in.cacerts=cacerts 中的發行人 <%s> -alias.in.keystore=發行人 <%s> -with.weak=%s (低強度) -key.bit=%1$d 位元的 %2$s 金鑰 -key.bit.weak=%1$d 位元的 %2$s 金鑰 (低強度) -unknown.size.1=%s 金鑰大小不明 -.PATTERN.printX509Cert.with.weak=擁有者: {0}\n發行人: {1}\n序號: {2}\n有效期自: {3} 到: {4}\n憑證指紋:\n\t SHA1: {5}\n\t SHA256: {6}\n簽章演算法名稱: {7}\n主體公開金鑰演算法: {8}\n版本: {9} -PKCS.10.with.weak=PKCS #10 憑證要求 (版本 1.0)\n主體: %1$s\n格式: %2$s\n公用金鑰: %3$s\n簽章演算法: %4$s\n -verified.by.s.in.s.weak=由 %2$s 中的 %1$s 以 %3$s 驗證 -whose.sigalg.risk=%1$s 使用的 %2$s 簽章演算法存在安全風險。 -whose.key.risk=%1$s 使用的 %2$s 存在安全風險。 -jks.storetype.warning=%1$s 金鑰儲存庫使用專有格式。建議您使用 "keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12" 移轉成為使用 PKCS12 (業界標準格式)。 -migrate.keystore.warning=已將 "%1$s" 移轉成為 %4$s。%2$s 金鑰儲存庫已備份為 "%3$s"。 -backup.keystore.warning=原始的金鑰儲存庫 "%1$s" 已備份為 "%3$s"... -importing.keystore.status=正在將金鑰儲存庫 %1$s 匯入 %2$s... diff --git a/src/java.base/share/classes/sun/security/util/Pem.java b/src/java.base/share/classes/sun/security/util/Pem.java index c49dcaa912f..dac3eeec8b8 100644 --- a/src/java.base/share/classes/sun/security/util/Pem.java +++ b/src/java.base/share/classes/sun/security/util/Pem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2025, 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 @@ -47,7 +47,6 @@ import java.util.regex.Pattern; * A utility class for PEM format encoding. */ public class Pem { - private static final char WS = 0x20; // Whitespace private static final byte[] CRLF = new byte[] {'\r', '\n'}; // Default algorithm from jdk.epkcs8.defaultAlgorithm in java.security @@ -238,20 +237,21 @@ public class Pem { sb = new StringBuilder(1024); // Determine the line break using the char after the last hyphen - switch (is.read()) { - case WS -> {} // skip whitespace - case '\r' -> { - c = is.read(); - if (c == '\n') { - eol = '\n'; - } else { - eol = '\r'; - sb.append((char) c); + while (eol == 0) { + switch (is.read()) { + case '\s', '\t' -> {} // skip whitespace or tab + case '\r' -> { + c = is.read(); + if (c == '\n') { + eol = '\n'; + } else { + eol = '\r'; + sb.append((char) c); + } } + case '\n' -> eol = '\n'; + default -> throw new IOException("No EOL character found"); } - case '\n' -> eol = '\n'; - default -> - throw new IOException("No EOL character found"); } // Read data until we find the first footer hyphen. @@ -260,7 +260,7 @@ public class Pem { case -1 -> throw new EOFException("Incomplete header"); case '-' -> hyphen++; - case WS, '\t', '\r', '\n' -> {} // skip whitespace and tab + case '\s', '\t', '\r', '\n' -> {} // skip whitespace and tab default -> sb.append((char) c); } } while (hyphen == 0); @@ -298,7 +298,7 @@ public class Pem { } } while (hyphen < 5); - while ((c = is.read()) != eol && c != -1 && c != WS) { + while ((c = is.read()) != eol && c != -1 && c != '\s' && c != '\t') { // skip when eol is '\n', the line separator is likely "\r\n". if (c == '\r') { continue; diff --git a/src/java.base/share/classes/sun/security/util/resources/auth_es.properties b/src/java.base/share/classes/sun/security/util/resources/auth_es.properties deleted file mode 100644 index 2a7dceede2d..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/auth_es.properties +++ /dev/null @@ -1,67 +0,0 @@ -# -# 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 -# 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. -# - -# NT principals -invalid.null.input.value=entrada nula no válida: {0} -NTDomainPrincipal.name=NTDomainPrincipal: {0} -NTNumericCredential.name=NTNumericCredential: {0} -Invalid.NTSid.value=Valor de NTSid no válido -NTSid.name=NTSid: {0} -NTSidDomainPrincipal.name=NTSidDomainPrincipal: {0} -NTSidGroupPrincipal.name=NTSidGroupPrincipal: {0} -NTSidPrimaryGroupPrincipal.name=NTSidPrimaryGroupPrincipal: {0} -NTSidUserPrincipal.name=NTSidUserPrincipal: {0} -NTUserPrincipal.name=NTUserPrincipal: {0} - -# UnixPrincipals -UnixNumericGroupPrincipal.Primary.Group.name=UnixNumericGroupPrincipal [Grupo Principal] {0} -UnixNumericGroupPrincipal.Supplementary.Group.name=UnixNumericGroupPrincipal [Grupo Adicional] {0} -UnixNumericUserPrincipal.name=UnixNumericUserPrincipal: {0} -UnixPrincipal.name=UnixPrincipal: {0} - -# com.sun.security.auth.login.ConfigFile -Unable.to.properly.expand.config=No se ha podido ampliar correctamente {0} -extra.config.No.such.file.or.directory.={0} (No existe tal archivo o directorio) -Configuration.Error.No.such.file.or.directory=Error de Configuración:\n\tNo existe tal archivo o directorio -Configuration.Error.Invalid.control.flag.flag=Error de Configuración:\n\tIndicador de control no válido, {0} -Configuration.Error.Can.not.specify.multiple.entries.for.appName=Error de Configuración:\n\tNo se pueden especificar varias entradas para {0} -Configuration.Error.expected.expect.read.end.of.file.=Error de configuración:\n\tse esperaba [{0}], se ha leído [final de archivo] -Configuration.Error.Line.line.expected.expect.found.value.=Error de configuración:\n\tLínea {0}: se esperaba [{1}], se ha encontrado [{2}] -Configuration.Error.Line.line.expected.expect.=Error de configuración:\n\tLínea {0}: se esperaba [{1}] -Configuration.Error.Line.line.system.property.value.expanded.to.empty.value=Error de configuración:\n\tLínea {0}: propiedad de sistema [{1}] ampliada a valor vacío - -# com.sun.security.auth.module.JndiLoginModule -username.=nombre de usuario:\u0020 -password.=contraseña:\u0020 - -# com.sun.security.auth.module.KeyStoreLoginModule -Please.enter.keystore.information=Introduzca la información del almacén de claves -Keystore.alias.=Alias de Almacén de Claves:\u0020 -Keystore.password.=Contraseña de Almacén de Claves:\u0020 -Private.key.password.optional.=Contraseña de Clave Privada (opcional):\u0020 - -# com.sun.security.auth.module.Krb5LoginModule -Kerberos.username.defUsername.=Nombre de usuario de Kerberos [{0}]:\u0020 -Kerberos.password.for.username.=Contraseña de Kerberos de {0}:\u0020 diff --git a/src/java.base/share/classes/sun/security/util/resources/auth_fr.properties b/src/java.base/share/classes/sun/security/util/resources/auth_fr.properties deleted file mode 100644 index 75f78083249..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/auth_fr.properties +++ /dev/null @@ -1,67 +0,0 @@ -# -# 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 -# 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. -# - -# NT principals -invalid.null.input.value=entrée NULL non valide : {0} -NTDomainPrincipal.name=NTDomainPrincipal : {0} -NTNumericCredential.name=NTNumericCredential : {0} -Invalid.NTSid.value=Valeur de NTSid non valide -NTSid.name=NTSid : {0} -NTSidDomainPrincipal.name=NTSidDomainPrincipal : {0} -NTSidGroupPrincipal.name=NTSidGroupPrincipal : {0} -NTSidPrimaryGroupPrincipal.name=NTSidPrimaryGroupPrincipal : {0} -NTSidUserPrincipal.name=NTSidUserPrincipal : {0} -NTUserPrincipal.name=NTUserPrincipal : {0} - -# UnixPrincipals -UnixNumericGroupPrincipal.Primary.Group.name=UnixNumericGroupPrincipal [groupe principal] : {0} -UnixNumericGroupPrincipal.Supplementary.Group.name=UnixNumericGroupPrincipal [groupe supplémentaire] : {0} -UnixNumericUserPrincipal.name=UnixNumericUserPrincipal : {0} -UnixPrincipal.name=UnixPrincipal : {0} - -# com.sun.security.auth.login.ConfigFile -Unable.to.properly.expand.config=Impossible de développer {0} correctement -extra.config.No.such.file.or.directory.={0} (fichier ou répertoire inexistant) -Configuration.Error.No.such.file.or.directory=Erreur de configuration :\n\tCe fichier ou répertoire n'existe pas -Configuration.Error.Invalid.control.flag.flag=Erreur de configuration :\n\tIndicateur de contrôle non valide, {0} -Configuration.Error.Can.not.specify.multiple.entries.for.appName=Erreur de configuration :\n\tImpossible de spécifier des entrées multiples pour {0} -Configuration.Error.expected.expect.read.end.of.file.=Erreur de configuration :\n\tAttendu : [{0}], lu : [fin de fichier] -Configuration.Error.Line.line.expected.expect.found.value.=Erreur de configuration :\n\tLigne {0} : attendu [{1}], trouvé [{2}] -Configuration.Error.Line.line.expected.expect.=Erreur de configuration :\n\tLigne {0} : attendu [{1}] -Configuration.Error.Line.line.system.property.value.expanded.to.empty.value=Erreur de configuration :\n\tLigne {0} : propriété système [{1}] développée en valeur vide - -# com.sun.security.auth.module.JndiLoginModule -username.=nom utilisateur :\u0020 -password.=mot de passe :\u0020 - -# com.sun.security.auth.module.KeyStoreLoginModule -Please.enter.keystore.information=Entrez les informations du fichier de clés -Keystore.alias.=Alias du fichier de clés :\u0020 -Keystore.password.=Mot de passe pour fichier de clés :\u0020 -Private.key.password.optional.=Mot de passe de la clé privée (facultatif) :\u0020 - -# com.sun.security.auth.module.Krb5LoginModule -Kerberos.username.defUsername.=Nom utilisateur Kerberos [{0}] :\u0020 -Kerberos.password.for.username.=Mot de passe Kerberos pour {0} :\u0020 diff --git a/src/java.base/share/classes/sun/security/util/resources/auth_it.properties b/src/java.base/share/classes/sun/security/util/resources/auth_it.properties deleted file mode 100644 index 49a0dc764c7..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/auth_it.properties +++ /dev/null @@ -1,67 +0,0 @@ -# -# 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 -# 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. -# - -# NT principals -invalid.null.input.value=input nullo non valido: {0} -NTDomainPrincipal.name=NTDomainPrincipal: {0} -NTNumericCredential.name=NTNumericCredential: {0} -Invalid.NTSid.value=Valore NTSid non valido -NTSid.name=NTSid: {0} -NTSidDomainPrincipal.name=NTSidDomainPrincipal: {0} -NTSidGroupPrincipal.name=NTSidGroupPrincipal: {0} -NTSidPrimaryGroupPrincipal.name=NTSidPrimaryGroupPrincipal: {0} -NTSidUserPrincipal.name=NTSidUserPrincipal: {0} -NTUserPrincipal.name=NTUserPrincipal: {0} - -# UnixPrincipals -UnixNumericGroupPrincipal.Primary.Group.name=UnixNumericGroupPrincipal [gruppo primario]: {0} -UnixNumericGroupPrincipal.Supplementary.Group.name=UnixNumericGroupPrincipal [gruppo supplementare]: {0} -UnixNumericUserPrincipal.name=UnixNumericUserPrincipal: {0} -UnixPrincipal.name=UnixPrincipal: {0} - -# com.sun.security.auth.login.ConfigFile -Unable.to.properly.expand.config=Impossibile espandere correttamente {0} -extra.config.No.such.file.or.directory.={0} (file o directory inesistente) -Configuration.Error.No.such.file.or.directory=Errore di configurazione:\n\tFile o directory inesistente -Configuration.Error.Invalid.control.flag.flag=Errore di configurazione:\n\tflag di controllo non valido, {0} -Configuration.Error.Can.not.specify.multiple.entries.for.appName=Errore di configurazione:\n\timpossibile specificare più valori per {0} -Configuration.Error.expected.expect.read.end.of.file.=Errore di configurazione:\n\tprevisto [{0}], letto [end of file] -Configuration.Error.Line.line.expected.expect.found.value.=Errore di configurazione:\n\triga {0}: previsto [{1}], trovato [{2}] -Configuration.Error.Line.line.expected.expect.=Errore di configurazione:\n\triga {0}: previsto [{1}] -Configuration.Error.Line.line.system.property.value.expanded.to.empty.value=Errore di configurazione:\n\triga {0}: proprietà di sistema [{1}] espansa a valore vuoto - -# com.sun.security.auth.module.JndiLoginModule -username.=Nome utente:\u0020 -password.=Password:\u0020 - -# com.sun.security.auth.module.KeyStoreLoginModule -Please.enter.keystore.information=Immettere le informazioni per il keystore -Keystore.alias.=Alias keystore:\u0020 -Keystore.password.=Password keystore:\u0020 -Private.key.password.optional.=Password chiave privata (opzionale):\u0020 - -# com.sun.security.auth.module.Krb5LoginModule -Kerberos.username.defUsername.=Nome utente Kerberos [{0}]:\u0020 -Kerberos.password.for.username.=Password Kerberos per {0}:\u0020 diff --git a/src/java.base/share/classes/sun/security/util/resources/auth_ko.properties b/src/java.base/share/classes/sun/security/util/resources/auth_ko.properties deleted file mode 100644 index 2321cfd51c0..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/auth_ko.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# 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 -# 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. -# - -# NT principals -invalid.null.input.value=부적합한 널 입력: {0} -NTDomainPrincipal.name=NTDomainPrincipal: {0} -NTNumericCredential.name=NTNumericCredential: {0} -Invalid.NTSid.value=NTSid 값이 부적합합니다. -NTSid.name=NTSid: {0} -NTSidDomainPrincipal.name=NTSidDomainPrincipal: {0} -NTSidGroupPrincipal.name=NTSidGroupPrincipal: {0} -NTSidPrimaryGroupPrincipal.name=NTSidPrimaryGroupPrincipal: {0} -NTSidUserPrincipal.name=NTSidUserPrincipal: {0} -NTUserPrincipal.name=NTUserPrincipal: {0} - -# UnixPrincipals -UnixNumericGroupPrincipal.Primary.Group.name=UnixNumericGroupPrincipal [기본 그룹]: {0} -UnixNumericGroupPrincipal.Supplementary.Group.name=UnixNumericGroupPrincipal [보조 그룹]: {0} -UnixNumericUserPrincipal.name=UnixNumericUserPrincipal: {0} -UnixPrincipal.name=UnixPrincipal: {0} - -# com.sun.security.auth.login.ConfigFile -Unable.to.properly.expand.config={0}을(를) 제대로 확장할 수 없습니다. -extra.config.No.such.file.or.directory.={0}(해당 파일 또는 디렉토리가 없습니다.) -Configuration.Error.No.such.file.or.directory=구성 오류:\n\t해당 파일 또는 디렉토리가 없습니다. -Configuration.Error.Invalid.control.flag.flag=구성 오류:\n\t제어 플래그가 부적합함, {0} -Configuration.Error.Can.not.specify.multiple.entries.for.appName=구성 오류:\n\t{0}에 대해 여러 항목을 지정할 수 없습니다. -Configuration.Error.expected.expect.read.end.of.file.=구성 오류:\n\t[{0}]이(가) 필요하지만 [파일의 끝]에 도달했습니다. -Configuration.Error.Line.line.expected.expect.found.value.=구성 오류:\n\t{0} 행: [{1}]이(가) 필요하지만 [{2}]이(가) 발견되었습니다. -Configuration.Error.Line.line.expected.expect.=구성 오류:\n\t{0} 행: [{1}]이(가) 필요합니다. -Configuration.Error.Line.line.system.property.value.expanded.to.empty.value=구성 오류:\n\t{0} 행: 시스템 속성 [{1}]이(가) 빈 값으로 확장되었습니다. - -# com.sun.security.auth.module.JndiLoginModule -username.=사용자 이름:\u0020 -password.=비밀번호:\u0020 - -# com.sun.security.auth.module.KeyStoreLoginModule -Please.enter.keystore.information=키 저장소 정보를 입력하십시오. -Keystore.alias.=키 저장소 별칭:\u0020 -Keystore.password.=키 저장소 비밀번호:\u0020 -Private.key.password.optional.=전용 키 비밀번호(선택사항):\u0020 -# com.sun.security.auth.module.Krb5LoginModule -Kerberos.username.defUsername.=Kerberos 사용자 이름 [{0}]:\u0020 -Kerberos.password.for.username.={0}의 Kerberos 비밀번호:\u0020 diff --git a/src/java.base/share/classes/sun/security/util/resources/auth_pt_BR.properties b/src/java.base/share/classes/sun/security/util/resources/auth_pt_BR.properties deleted file mode 100644 index 26111010625..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/auth_pt_BR.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# 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 -# 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. -# - -# NT principals -invalid.null.input.value=entrada nula inválida: {0} -NTDomainPrincipal.name=NTDomainPrincipal: {0} -NTNumericCredential.name=NTNumericCredential: {0} -Invalid.NTSid.value=Valor de NTSid inválido -NTSid.name=NTSid: {0} -NTSidDomainPrincipal.name=NTSidDomainPrincipal: {0} -NTSidGroupPrincipal.name=NTSidGroupPrincipal: {0} -NTSidPrimaryGroupPrincipal.name=NTSidPrimaryGroupPrincipal: {0} -NTSidUserPrincipal.name=NTSidUserPrincipal: {0} -NTUserPrincipal.name=NTUserPrincipal: {0} - -# UnixPrincipals -UnixNumericGroupPrincipal.Primary.Group.name=UnixNumericGroupPrincipal [Grupo Principal]: {0} -UnixNumericGroupPrincipal.Supplementary.Group.name=UnixNumericGroupPrincipal [Grupo Complementar]: {0} -UnixNumericUserPrincipal.name=UnixNumericUserPrincipal: {0} -UnixPrincipal.name=UnixPrincipal: {0} - -# com.sun.security.auth.login.ConfigFile -Unable.to.properly.expand.config=Não é possível expandir corretamente {0} -extra.config.No.such.file.or.directory.={0} (tal arquivo ou diretório não existe) -Configuration.Error.No.such.file.or.directory=Erro de Configuração:\n\tNão há tal arquivo ou diretório -Configuration.Error.Invalid.control.flag.flag=Erro de Configuração:\n\tFlag de controle inválido, {0} -Configuration.Error.Can.not.specify.multiple.entries.for.appName=Erro de Configuração:\n\tNão é possível especificar várias entradas para {0} -Configuration.Error.expected.expect.read.end.of.file.=Erro de Configuração:\n\tesperado [{0}], lido [fim do arquivo] -Configuration.Error.Line.line.expected.expect.found.value.=Erro de Configuração:\n\tLinha {0}: esperada [{1}], encontrada [{2}] -Configuration.Error.Line.line.expected.expect.=Erro de Configuração:\n\tLinha {0}: esperada [{1}] -Configuration.Error.Line.line.system.property.value.expanded.to.empty.value=Erro de Configuração:\n\tLinha {0}: propriedade do sistema [{1}] expandida para valor vazio - -# com.sun.security.auth.module.JndiLoginModule -username.=nome do usuário:\u0020 -password.=senha:\u0020 - -# com.sun.security.auth.module.KeyStoreLoginModule -Please.enter.keystore.information=Especifique as informações do armazenamento de chaves -Keystore.alias.=Alias do armazenamento de chaves:\u0020 -Keystore.password.=Senha do armazenamento de chaves:\u0020 -Private.key.password.optional.=Senha da chave privada (opcional):\u0020 -# com.sun.security.auth.module.Krb5LoginModule -Kerberos.username.defUsername.=Nome do usuário de Kerberos [{0}]:\u0020 -Kerberos.password.for.username.=Senha de Kerberos de {0}:\u0020 diff --git a/src/java.base/share/classes/sun/security/util/resources/auth_sv.properties b/src/java.base/share/classes/sun/security/util/resources/auth_sv.properties deleted file mode 100644 index 4eb167b7645..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/auth_sv.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# 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 -# 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. -# - -# NT principals -invalid.null.input.value=ogiltiga null-indata: {0} -NTDomainPrincipal.name=NTDomainPrincipal: {0} -NTNumericCredential.name=NTNumericCredential: {0} -Invalid.NTSid.value=Ogiltigt NTSid-värde -NTSid.name=NTSid: {0} -NTSidDomainPrincipal.name=NTSidDomainPrincipal: {0} -NTSidGroupPrincipal.name=NTSidGroupPrincipal: {0} -NTSidPrimaryGroupPrincipal.name=NTSidPrimaryGroupPrincipal: {0} -NTSidUserPrincipal.name=NTSidUserPrincipal: {0} -NTUserPrincipal.name=NTUserPrincipal: {0} - -# UnixPrincipals -UnixNumericGroupPrincipal.Primary.Group.name=UnixNumericGroupPrincipal [primär grupp]: {0} -UnixNumericGroupPrincipal.Supplementary.Group.name=UnixNumericGroupPrincipal [tilläggsgrupp]: {0} -UnixNumericUserPrincipal.name=UnixNumericUserPrincipal: {0} -UnixPrincipal.name=UnixPrincipal: {0} - -# com.sun.security.auth.login.ConfigFile -Unable.to.properly.expand.config=Kan inte utöka korrekt {0} -extra.config.No.such.file.or.directory.={0} (det finns ingen sådan fil eller katalog) -Configuration.Error.No.such.file.or.directory=Konfigurationsfel:\n\tFilen eller katalogen finns inte -Configuration.Error.Invalid.control.flag.flag=Konfigurationsfel:\n\tOgiltig kontrollflagga, {0} -Configuration.Error.Can.not.specify.multiple.entries.for.appName=Konfigurationsfel:\n\tKan inte ange flera poster för {0} -Configuration.Error.expected.expect.read.end.of.file.=Konfigurationsfel:\n\tförväntade [{0}], läste [filslut] -Configuration.Error.Line.line.expected.expect.found.value.=Konfigurationsfel:\n\tRad {0}: förväntade [{1}], hittade [{2}] -Configuration.Error.Line.line.expected.expect.=Konfigurationsfel:\n\tRad {0}: förväntade [{1}] -Configuration.Error.Line.line.system.property.value.expanded.to.empty.value=Konfigurationsfel:\n\tRad {0}: systemegenskapen [{1}] utökad till tomt värde - -# com.sun.security.auth.module.JndiLoginModule -username.=användarnamn:\u0020 -password.=lösenord:\u0020 - -# com.sun.security.auth.module.KeyStoreLoginModule -Please.enter.keystore.information=Ange nyckellagerinformation -Keystore.alias.=Nyckellageralias:\u0020 -Keystore.password.=Nyckellagerlösenord:\u0020 -Private.key.password.optional.=Lösenord för personlig nyckel (valfritt):\u0020 -# com.sun.security.auth.module.Krb5LoginModule -Kerberos.username.defUsername.=Kerberos-användarnamn [{0}]:\u0020 -Kerberos.password.for.username.=Kerberos-lösenord för {0}:\u0020 diff --git a/src/java.base/share/classes/sun/security/util/resources/auth_zh_TW.properties b/src/java.base/share/classes/sun/security/util/resources/auth_zh_TW.properties deleted file mode 100644 index 227e5093612..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/auth_zh_TW.properties +++ /dev/null @@ -1,66 +0,0 @@ -# -# 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 -# 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. -# - -# NT principals -invalid.null.input.value=無效空值輸入: {0} -NTDomainPrincipal.name=NTDomainPrincipal: {0} -NTNumericCredential.name=NTNumericCredential: {0} -Invalid.NTSid.value=無效 NTSid 值 -NTSid.name=NTSid: {0} -NTSidDomainPrincipal.name=NTSidDomainPrincipal: {0} -NTSidGroupPrincipal.name=NTSidGroupPrincipal: {0} -NTSidPrimaryGroupPrincipal.name=NTSidPrimaryGroupPrincipal: {0} -NTSidUserPrincipal.name=NTSidUserPrincipal: {0} -NTUserPrincipal.name=NTUserPrincipal: {0} - -# UnixPrincipals -UnixNumericGroupPrincipal.Primary.Group.name=UnixNumericGroupPrincipal [主群組]: {0} -UnixNumericGroupPrincipal.Supplementary.Group.name=UnixNumericGroupPrincipal [附加群組]: {0} -UnixNumericUserPrincipal.name=UnixNumericUserPrincipal: {0} -UnixPrincipal.name=UnixPrincipal: {0} - -# com.sun.security.auth.login.ConfigFile -Unable.to.properly.expand.config=無法適當地擴充 {0} -extra.config.No.such.file.or.directory.={0} (沒有此檔案或目錄) -Configuration.Error.No.such.file.or.directory=組態錯誤:\n\t無此檔案或目錄 -Configuration.Error.Invalid.control.flag.flag=組態錯誤:\n\t無效的控制旗標,{0} -Configuration.Error.Can.not.specify.multiple.entries.for.appName=組態錯誤: \n\t無法指定多重項目 {0} -Configuration.Error.expected.expect.read.end.of.file.=組態錯誤: \n\t預期的 [{0}], 讀取 [end of file] -Configuration.Error.Line.line.expected.expect.found.value.=組態錯誤: \n\t行 {0}: 預期的 [{1}], 發現 [{2}] -Configuration.Error.Line.line.expected.expect.=組態錯誤: \n\t行 {0}: 預期的 [{1}] -Configuration.Error.Line.line.system.property.value.expanded.to.empty.value=組態錯誤: \n\t行 {0}: 系統屬性 [{1}] 擴充至空值 - -# com.sun.security.auth.module.JndiLoginModule -username.=使用者名稱:\u0020 -password.=密碼:\u0020 - -# com.sun.security.auth.module.KeyStoreLoginModule -Please.enter.keystore.information=請輸入金鑰儲存庫資訊 -Keystore.alias.=金鑰儲存庫別名:\u0020 -Keystore.password.=金鑰儲存庫密碼:\u0020 -Private.key.password.optional.=私人金鑰密碼 (選擇性的):\u0020 -# com.sun.security.auth.module.Krb5LoginModule -Kerberos.username.defUsername.=Kerberos 使用者名稱 [{0}]:\u0020 -Kerberos.password.for.username.=Kerberos 密碼 {0}:\u0020 diff --git a/src/java.base/share/classes/sun/security/util/resources/security_es.properties b/src/java.base/share/classes/sun/security/util/resources/security_es.properties deleted file mode 100644 index ba36793202a..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/security_es.properties +++ /dev/null @@ -1,110 +0,0 @@ -# -# 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 -# 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. -# - -# javax.security.auth.PrivateCredentialPermission -invalid.null.input.s.=entradas nulas no válidas -actions.can.only.be.read.=las acciones sólo pueden 'leerse' -permission.name.name.syntax.invalid.=sintaxis de nombre de permiso [{0}] no válida:\u0020 -Credential.Class.not.followed.by.a.Principal.Class.and.Name=La clase de credencial no va seguida de una clase y nombre de principal -Principal.Class.not.followed.by.a.Principal.Name=La clase de principal no va seguida de un nombre de principal -Principal.Name.must.be.surrounded.by.quotes=El nombre de principal debe ir entre comillas -Principal.Name.missing.end.quote=Faltan las comillas finales en el nombre de principal -PrivateCredentialPermission.Principal.Class.can.not.be.a.wildcard.value.if.Principal.Name.is.not.a.wildcard.value=La clase de principal PrivateCredentialPermission no puede ser un valor comodín (*) si el nombre de principal no lo es también -CredOwner.Principal.Class.class.Principal.Name.name=CredOwner:\n\tClase de Principal = {0}\n\tNombre de Principal = {1} - -# javax.security.auth.x500 -provided.null.name=se ha proporcionado un nombre nulo -provided.null.keyword.map=mapa de palabras clave proporcionado nulo -provided.null.OID.map=mapa de OID proporcionado nulo - -# javax.security.auth.Subject -NEWLINE=\n -invalid.null.AccessControlContext.provided=se ha proporcionado un AccessControlContext nulo no válido -invalid.null.action.provided=se ha proporcionado una acción nula no válida -invalid.null.Class.provided=se ha proporcionado una clase nula no válida -Subject.=Asunto:\n -.Principal.=\tPrincipal:\u0020 -.Public.Credential.=\tCredencial Pública:\u0020 -.Private.Credentials.inaccessible.=\tCredenciales Privadas Inaccesibles\n -.Private.Credential.=\tCredencial Privada:\u0020 -.Private.Credential.inaccessible.=\tCredencial Privada Inaccesible\n -Subject.is.read.only=El asunto es de sólo lectura -attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set=intentando agregar un objeto que no es una instancia de java.security.Principal al juego principal de un asunto -attempting.to.add.an.object.which.is.not.an.instance.of.class=intentando agregar un objeto que no es una instancia de {0} - -# javax.security.auth.login.AppConfigurationEntry -LoginModuleControlFlag.=LoginModuleControlFlag:\u0020 - -# javax.security.auth.login.LoginContext -Invalid.null.input.name=Entrada nula no válida: nombre -No.LoginModules.configured.for.name=No se han configurado LoginModules para {0} -invalid.null.Subject.provided=se ha proporcionado un asunto nulo no válido -invalid.null.CallbackHandler.provided=se ha proporcionado CallbackHandler nulo no válido -null.subject.logout.called.before.login=asunto nulo - se ha llamado al cierre de sesión antes del inicio de sesión -unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor=no se ha podido instanciar LoginModule, {0}, porque no incluye un constructor sin argumentos -unable.to.instantiate.LoginModule=no se ha podido instanciar LoginModule -unable.to.instantiate.LoginModule.=no se ha podido instanciar LoginModule:\u0020 -unable.to.find.LoginModule.class.=no se ha encontrado la clase LoginModule:\u0020 -unable.to.access.LoginModule.=no se ha podido acceder a LoginModule:\u0020 -Login.Failure.all.modules.ignored=Fallo en inicio de sesión: se han ignorado todos los módulos - -# sun.security.provider.PolicyFile - -java.security.policy.error.parsing.policy.message=java.security.policy: error de análisis de {0}:\n\t{1} -java.security.policy.error.adding.Permission.perm.message=java.security.policy: error al agregar un permiso, {0}:\n\t{1} -java.security.policy.error.adding.Entry.message=java.security.policy: error al agregar una entrada:\n\t{0} -alias.name.not.provided.pe.name.=no se ha proporcionado el nombre de alias ({0}) -unable.to.perform.substitution.on.alias.suffix=no se puede realizar la sustitución en el alias, {0} -substitution.value.prefix.unsupported=valor de sustitución, {0}, no soportado -SPACE=\u0020 -LPARAM=( -RPARAM=) -type.can.t.be.null=el tipo no puede ser nulo - -# sun.security.provider.PolicyParser -keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore=keystorePasswordURL no puede especificarse sin especificar también el almacén de claves -expected.keystore.type=se esperaba un tipo de almacén de claves -expected.keystore.provider=se esperaba un proveedor de almacén de claves -multiple.Codebase.expressions=expresiones múltiples de CodeBase -multiple.SignedBy.expressions=expresiones múltiples de SignedBy -duplicate.keystore.domain.name=nombre de dominio de almacén de claves duplicado: {0} -duplicate.keystore.name=nombre de almacén de claves duplicado: {0} -SignedBy.has.empty.alias=SignedBy tiene un alias vacío -can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name=no se puede especificar Principal con una clase de comodín sin un nombre de comodín -expected.codeBase.or.SignedBy.or.Principal=se esperaba codeBase o SignedBy o Principal -expected.permission.entry=se esperaba un permiso de entrada -number.=número\u0020 -expected.expect.read.end.of.file.=se esperaba [{0}], se ha leído [final de archivo] -expected.read.end.of.file.=se esperaba [;], se ha leído [final de archivo] -line.number.msg=línea {0}: {1} -line.number.expected.expect.found.actual.=línea {0}: se esperaba [{1}], se ha encontrado [{2}] -null.principalClass.or.principalName=principalClass o principalName nulos - -# sun.security.pkcs11.SunPKCS11 -PKCS11.Token.providerName.Password.=Contraseña del Token PKCS11 [{0}]:\u0020 - -# --- DEPRECATED --- -# javax.security.auth.Policy -unable.to.instantiate.Subject.based.policy=no se ha podido instanciar una política basada en asunto diff --git a/src/java.base/share/classes/sun/security/util/resources/security_fr.properties b/src/java.base/share/classes/sun/security/util/resources/security_fr.properties deleted file mode 100644 index 49468dead53..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/security_fr.properties +++ /dev/null @@ -1,110 +0,0 @@ -# -# 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 -# 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. -# - -# javax.security.auth.PrivateCredentialPermission -invalid.null.input.s.=entrées NULL non valides -actions.can.only.be.read.=les actions sont accessibles en lecture uniquement -permission.name.name.syntax.invalid.=syntaxe de nom de droit [{0}] non valide :\u0020 -Credential.Class.not.followed.by.a.Principal.Class.and.Name=Classe Credential non suivie d'une classe et d'un nom de principal -Principal.Class.not.followed.by.a.Principal.Name=Classe de principal non suivie d'un nom de principal -Principal.Name.must.be.surrounded.by.quotes=Le nom de principal doit être indiqué entre guillemets -Principal.Name.missing.end.quote=Guillemet fermant manquant pour le nom de principal -PrivateCredentialPermission.Principal.Class.can.not.be.a.wildcard.value.if.Principal.Name.is.not.a.wildcard.value=La classe de principal PrivateCredentialPermission ne peut pas être une valeur générique (*) si le nom de principal n'est pas une valeur générique (*) -CredOwner.Principal.Class.class.Principal.Name.name=CredOwner :\n\tClasse de principal = {0}\n\tNom de principal = {1} - -# javax.security.auth.x500 -provided.null.name=nom NULL fourni -provided.null.keyword.map=mappage de mots-clés NULL fourni -provided.null.OID.map=mappage OID NULL fourni - -# javax.security.auth.Subject -NEWLINE=\n -invalid.null.AccessControlContext.provided=AccessControlContext NULL fourni non valide -invalid.null.action.provided=action NULL fournie non valide -invalid.null.Class.provided=classe NULL fournie non valide -Subject.=Objet :\n -.Principal.=\tPrincipal :\u0020 -.Public.Credential.=\tInformations d'identification publiques :\u0020 -.Private.Credentials.inaccessible.=\tInformations d'identification privées inaccessibles\n -.Private.Credential.=\tInformations d'identification privées :\u0020 -.Private.Credential.inaccessible.=\tInformations d'identification privées inaccessibles\n -Subject.is.read.only=Sujet en lecture seule -attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set=tentative d'ajout d'un objet qui n'est pas une instance de java.security.Principal dans un ensemble de principaux du sujet -attempting.to.add.an.object.which.is.not.an.instance.of.class=tentative d''ajout d''un objet qui n''est pas une instance de {0} - -# javax.security.auth.login.AppConfigurationEntry -LoginModuleControlFlag.=LoginModuleControlFlag :\u0020 - -# javax.security.auth.login.LoginContext -Invalid.null.input.name=Entrée NULL non valide : nom -No.LoginModules.configured.for.name=Aucun LoginModule configuré pour {0} -invalid.null.Subject.provided=sujet NULL fourni non valide -invalid.null.CallbackHandler.provided=CallbackHandler NULL fourni non valide -null.subject.logout.called.before.login=sujet NULL - Tentative de déconnexion avant la connexion -unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor=impossible d''instancier LoginModule {0} car il ne fournit pas de constructeur sans argument -unable.to.instantiate.LoginModule=impossible d'instancier LoginModule -unable.to.instantiate.LoginModule.=impossible d'instancier LoginModule :\u0020 -unable.to.find.LoginModule.class.=classe LoginModule introuvable :\u0020 -unable.to.access.LoginModule.=impossible d'accéder à LoginModule :\u0020 -Login.Failure.all.modules.ignored=Echec de connexion : tous les modules ont été ignorés - -# sun.security.provider.PolicyFile - -java.security.policy.error.parsing.policy.message=java.security.policy : erreur d''analyse de {0} :\n\t{1} -java.security.policy.error.adding.Permission.perm.message=java.security.policy : erreur d''ajout de droit, {0} :\n\t{1} -java.security.policy.error.adding.Entry.message=java.security.policy : erreur d''ajout d''entrée :\n\t{0} -alias.name.not.provided.pe.name.=nom d''alias non fourni ({0}) -unable.to.perform.substitution.on.alias.suffix=impossible d''effectuer une substitution pour l''alias, {0} -substitution.value.prefix.unsupported=valeur de substitution, {0}, non prise en charge -SPACE=\u0020 -LPARAM=( -RPARAM=) -type.can.t.be.null=le type ne peut être NULL - -# sun.security.provider.PolicyParser -keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore=Impossible de spécifier keystorePasswordURL sans indiquer aussi le fichier de clés -expected.keystore.type=type de fichier de clés attendu -expected.keystore.provider=fournisseur de fichier de clés attendu -multiple.Codebase.expressions=expressions Codebase multiples -multiple.SignedBy.expressions=expressions SignedBy multiples -duplicate.keystore.domain.name=nom de domaine de fichier de clés en double : {0} -duplicate.keystore.name=nom de fichier de clés en double : {0} -SignedBy.has.empty.alias=SignedBy possède un alias vide -can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name=impossible de spécifier le principal avec une classe générique sans nom générique -expected.codeBase.or.SignedBy.or.Principal=codeBase, SignedBy ou Principal attendu -expected.permission.entry=entrée de droit attendue -number.=nombre\u0020 -expected.expect.read.end.of.file.=attendu [{0}], lu [fin de fichier] -expected.read.end.of.file.=attendu [;], lu [fin de fichier] -line.number.msg=ligne {0} : {1} -line.number.expected.expect.found.actual.=ligne {0} : attendu [{1}], trouvé [{2}] -null.principalClass.or.principalName=principalClass ou principalName NULL - -# sun.security.pkcs11.SunPKCS11 -PKCS11.Token.providerName.Password.=Mot de passe PKCS11 Token [{0}] :\u0020 - -# --- DEPRECATED --- -# javax.security.auth.Policy -unable.to.instantiate.Subject.based.policy=impossible d'instancier les règles basées sur le sujet diff --git a/src/java.base/share/classes/sun/security/util/resources/security_it.properties b/src/java.base/share/classes/sun/security/util/resources/security_it.properties deleted file mode 100644 index 628d4411274..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/security_it.properties +++ /dev/null @@ -1,110 +0,0 @@ -# -# 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 -# 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. -# - -# javax.security.auth.PrivateCredentialPermission -invalid.null.input.s.=input nullo/i non valido/i -actions.can.only.be.read.=le azioni possono essere solamente 'lette' -permission.name.name.syntax.invalid.=sintassi [{0}] non valida per il nome autorizzazione:\u0020 -Credential.Class.not.followed.by.a.Principal.Class.and.Name=la classe di credenziali non è seguita da un nome e una classe di principal -Principal.Class.not.followed.by.a.Principal.Name=la classe di principal non è seguita da un nome principal -Principal.Name.must.be.surrounded.by.quotes=il nome principal deve essere compreso tra apici -Principal.Name.missing.end.quote=apice di chiusura del nome principal mancante -PrivateCredentialPermission.Principal.Class.can.not.be.a.wildcard.value.if.Principal.Name.is.not.a.wildcard.value=la classe principal PrivateCredentialPermission non può essere un valore carattere jolly (*) se il nome principal a sua volta non è un valore carattere jolly (*) -CredOwner.Principal.Class.class.Principal.Name.name=CredOwner:\n\tclasse Principal = {0}\n\tNome Principal = {1} - -# javax.security.auth.x500 -provided.null.name=il nome fornito è nullo -provided.null.keyword.map=specificata mappa parole chiave null -provided.null.OID.map=specificata mappa OID null - -# javax.security.auth.Subject -NEWLINE=\n -invalid.null.AccessControlContext.provided=fornito un valore nullo non valido per AccessControlContext -invalid.null.action.provided=fornita un'azione nulla non valida -invalid.null.Class.provided=fornita una classe nulla non valida -Subject.=Oggetto:\n -.Principal.=\tPrincipal:\u0020 -.Public.Credential.=\tCredenziale pubblica:\u0020 -.Private.Credentials.inaccessible.=\tImpossibile accedere alle credenziali private\n -.Private.Credential.=\tCredenziale privata:\u0020 -.Private.Credential.inaccessible.=\tImpossibile accedere alla credenziale privata\n -Subject.is.read.only=L'oggetto è di sola lettura -attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set=si è tentato di aggiungere un oggetto che non è un'istanza di java.security.Principal a un set principal dell'oggetto -attempting.to.add.an.object.which.is.not.an.instance.of.class=si è tentato di aggiungere un oggetto che non è un''istanza di {0} - -# javax.security.auth.login.AppConfigurationEntry -LoginModuleControlFlag.=LoginModuleControlFlag:\u0020 - -# javax.security.auth.login.LoginContext -Invalid.null.input.name=Input nullo non valido: nome -No.LoginModules.configured.for.name=Nessun LoginModules configurato per {0} -invalid.null.Subject.provided=fornito un valore nullo non valido per l'oggetto -invalid.null.CallbackHandler.provided=fornito un valore nullo non valido per CallbackHandler -null.subject.logout.called.before.login=oggetto nullo - il logout è stato richiamato prima del login -unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor=impossibile creare un''istanza di LoginModule {0} in quanto non restituisce un argomento vuoto per il costruttore -unable.to.instantiate.LoginModule=impossibile creare un'istanza di LoginModule -unable.to.instantiate.LoginModule.=impossibile creare un'istanza di LoginModule:\u0020 -unable.to.find.LoginModule.class.=impossibile trovare la classe LoginModule:\u0020 -unable.to.access.LoginModule.=impossibile accedere a LoginModule\u0020 -Login.Failure.all.modules.ignored=Errore di login: tutti i moduli sono stati ignorati - -# sun.security.provider.PolicyFile - -java.security.policy.error.parsing.policy.message=java.security.policy: errore durante l''analisi di {0}:\n\t{1} -java.security.policy.error.adding.Permission.perm.message=java.security.policy: errore durante l''aggiunta dell''autorizzazione {0}:\n\t{1} -java.security.policy.error.adding.Entry.message=java.security.policy: errore durante l''aggiunta della voce:\n\t{0} -alias.name.not.provided.pe.name.=impossibile fornire nome alias ({0}) -unable.to.perform.substitution.on.alias.suffix=impossibile eseguire una sostituzione sull''alias, {0} -substitution.value.prefix.unsupported=valore sostituzione, {0}, non supportato -SPACE=\u0020 -LPARAM=( -RPARAM=) -type.can.t.be.null=il tipo non può essere nullo - -# sun.security.provider.PolicyParser -keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore=Impossibile specificare keystorePasswordURL senza specificare anche il keystore -expected.keystore.type=tipo keystore previsto -expected.keystore.provider=provider di keystore previsto -multiple.Codebase.expressions=espressioni Codebase multiple -multiple.SignedBy.expressions=espressioni SignedBy multiple -duplicate.keystore.domain.name=nome dominio keystore duplicato: {0} -duplicate.keystore.name=nome keystore duplicato: {0} -SignedBy.has.empty.alias=SignedBy presenta un alias vuoto -can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name=impossibile specificare un principal con una classe carattere jolly senza un nome carattere jolly -expected.codeBase.or.SignedBy.or.Principal=previsto codeBase o SignedBy o principal -expected.permission.entry=prevista voce di autorizzazione -number.=numero\u0020 -expected.expect.read.end.of.file.=previsto [{0}], letto [end of file] -expected.read.end.of.file.=previsto [;], letto [end of file] -line.number.msg=riga {0}: {1} -line.number.expected.expect.found.actual.=riga {0}: previsto [{1}], trovato [{2}] -null.principalClass.or.principalName=principalClass o principalName nullo - -# sun.security.pkcs11.SunPKCS11 -PKCS11.Token.providerName.Password.=Password per token PKCS11 [{0}]:\u0020 - -# --- DEPRECATED --- -# javax.security.auth.Policy -unable.to.instantiate.Subject.based.policy=impossibile creare un'istanza dei criteri basati sull'oggetto diff --git a/src/java.base/share/classes/sun/security/util/resources/security_ko.properties b/src/java.base/share/classes/sun/security/util/resources/security_ko.properties deleted file mode 100644 index 7f275dfca47..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/security_ko.properties +++ /dev/null @@ -1,110 +0,0 @@ -# -# 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 -# 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. -# - -# javax.security.auth.PrivateCredentialPermission -invalid.null.input.s.=널 입력값이 부적합합니다. -actions.can.only.be.read.=작업은 '읽기' 전용입니다. -permission.name.name.syntax.invalid.=권한 이름 [{0}] 구문이 부적합함:\u0020 -Credential.Class.not.followed.by.a.Principal.Class.and.Name=인증서 클래스 다음에 주체 클래스와 이름이 없습니다. -Principal.Class.not.followed.by.a.Principal.Name=주체 클래스 다음에 주체 이름이 없습니다. -Principal.Name.must.be.surrounded.by.quotes=주체 이름은 따옴표로 묶어야 합니다. -Principal.Name.missing.end.quote=주체 이름에 닫는 따옴표가 누락되었습니다. -PrivateCredentialPermission.Principal.Class.can.not.be.a.wildcard.value.if.Principal.Name.is.not.a.wildcard.value=주체 이름이 와일드 카드 문자(*) 값이 아닌 경우 PrivateCredentialPermission 주체 클래스는 와일드 카드 문자(*) 값일 수 없습니다. -CredOwner.Principal.Class.class.Principal.Name.name=CredOwner:\n\t주체 클래스 = {0}\n\t주체 이름 = {1} - -# javax.security.auth.x500 -provided.null.name=널 이름을 제공했습니다. -provided.null.keyword.map=널 키워드 맵을 제공했습니다. -provided.null.OID.map=널 OID 맵을 제공했습니다. - -# javax.security.auth.Subject -NEWLINE=\n -invalid.null.AccessControlContext.provided=부적합한 널 AccessControlContext가 제공되었습니다. -invalid.null.action.provided=부적합한 널 작업이 제공되었습니다. -invalid.null.Class.provided=부적합한 널 클래스가 제공되었습니다. -Subject.=제목:\n -.Principal.=\t주체:\u0020 -.Public.Credential.=\t공용 인증서:\u0020 -.Private.Credentials.inaccessible.=\t전용 인증서에 액세스할 수 없습니다.\n -.Private.Credential.=\t전용 인증서:\u0020 -.Private.Credential.inaccessible.=\t전용 인증서에 액세스할 수 없습니다.\n -Subject.is.read.only=제목이 읽기 전용입니다. -attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set=java.security.Principal의 인스턴스가 아닌 객체를 제목의 주체 집합에 추가하려고 시도하는 중 -attempting.to.add.an.object.which.is.not.an.instance.of.class={0}의 인스턴스가 아닌 객체를 추가하려고 시도하는 중 - -# javax.security.auth.login.AppConfigurationEntry -LoginModuleControlFlag.=LoginModuleControlFlag:\u0020 - -# javax.security.auth.login.LoginContext -Invalid.null.input.name=부적합한 널 입력값: 이름 -No.LoginModules.configured.for.name={0}에 대해 구성된 LoginModules가 없습니다. -invalid.null.Subject.provided=부적합한 널 제목이 제공되었습니다. -invalid.null.CallbackHandler.provided=부적합한 널 CallbackHandler가 제공되었습니다. -null.subject.logout.called.before.login=널 제목 - 로그인 전에 로그아웃이 호출되었습니다. -unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor=인수가 없는 생성자를 제공하지 않아 LoginModule {0}을(를) 인스턴스화할 수 없습니다. -unable.to.instantiate.LoginModule=LoginModule을 인스턴스화할 수 없습니다. -unable.to.instantiate.LoginModule.=LoginModule을 인스턴스화할 수 없음:\u0020 -unable.to.find.LoginModule.class.=LoginModule 클래스를 찾을 수 없음:\u0020 -unable.to.access.LoginModule.=LoginModule에 액세스할 수 없음:\u0020 -Login.Failure.all.modules.ignored=로그인 실패: 모든 모듈이 무시되었습니다. - -# sun.security.provider.PolicyFile - -java.security.policy.error.parsing.policy.message=java.security.policy: {0}의 구문을 분석하는 중 오류 발생:\n\t{1} -java.security.policy.error.adding.Permission.perm.message=java.security.policy: {0} 권한을 추가하는 중 오류 발생:\n\t{1} -java.security.policy.error.adding.Entry.message=java.security.policy: 항목을 추가하는 중 오류 발생:\n\t{0} -alias.name.not.provided.pe.name.=별칭 이름이 제공되지 않습니다({0}). -unable.to.perform.substitution.on.alias.suffix={0} 별칭을 대체할 수 없습니다. -substitution.value.prefix.unsupported=대체 값 {0}은(는) 지원되지 않습니다. -SPACE=\u0020 -LPARAM=( -RPARAM=) -type.can.t.be.null=유형은 널일 수 없습니다. - -# sun.security.provider.PolicyParser -keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore=키 저장소를 지정하지 않고 keystorePasswordURL을 지정할 수 없습니다. -expected.keystore.type=키 저장소 유형이 필요합니다. -expected.keystore.provider=키 저장소 제공자가 필요합니다. -multiple.Codebase.expressions=Codebase 표현식이 여러 개입니다. -multiple.SignedBy.expressions=SignedBy 표현식이 여러 개입니다. -duplicate.keystore.domain.name=중복된 키 저장소 도메인 이름: {0} -duplicate.keystore.name=중복된 키 저장소 이름: {0} -SignedBy.has.empty.alias=SignedBy의 별칭이 비어 있습니다. -can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name=와일드 카드 문자 이름 없이 와일드 카드 문자 클래스를 사용하는 주체를 지정할 수 없습니다. -expected.codeBase.or.SignedBy.or.Principal=codeBase, SignedBy 또는 주체가 필요합니다. -expected.permission.entry=권한 항목이 필요합니다. -number.=숫자\u0020 -expected.expect.read.end.of.file.=[{0}]이(가) 필요하지만 [파일의 끝]까지 읽었습니다. -expected.read.end.of.file.=[;]이 필요하지만 [파일의 끝]까지 읽었습니다. -line.number.msg={0} 행: {1} -line.number.expected.expect.found.actual.={0} 행: [{1}]이(가) 필요하지만 [{2}]이(가) 발견되었습니다. -null.principalClass.or.principalName=principalClass 또는 principalName이 널입니다. - -# sun.security.pkcs11.SunPKCS11 -PKCS11.Token.providerName.Password.=PKCS11 토큰 [{0}] 비밀번호:\u0020 - -# --- DEPRECATED --- -# javax.security.auth.Policy -unable.to.instantiate.Subject.based.policy=제목 기반 정책을 인스턴스화할 수 없습니다. diff --git a/src/java.base/share/classes/sun/security/util/resources/security_pt_BR.properties b/src/java.base/share/classes/sun/security/util/resources/security_pt_BR.properties deleted file mode 100644 index eb49895c605..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/security_pt_BR.properties +++ /dev/null @@ -1,110 +0,0 @@ -# -# 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 -# 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. -# - -# javax.security.auth.PrivateCredentialPermission -invalid.null.input.s.=entrada(s) nula(s) inválida(s) -actions.can.only.be.read.=as ações só podem ser 'lidas' -permission.name.name.syntax.invalid.=sintaxe inválida do nome da permissão [{0}]:\u0020 -Credential.Class.not.followed.by.a.Principal.Class.and.Name=Classe da Credencial não seguida por um Nome e uma Classe do Principal -Principal.Class.not.followed.by.a.Principal.Name=Classe do Principal não seguida por um Nome do Principal -Principal.Name.must.be.surrounded.by.quotes=O Nome do Principal deve estar entre aspas -Principal.Name.missing.end.quote=Faltam as aspas finais no Nome do Principal -PrivateCredentialPermission.Principal.Class.can.not.be.a.wildcard.value.if.Principal.Name.is.not.a.wildcard.value=A Classe do Principal PrivateCredentialPermission não pode ser um valor curinga (*) se o Nome do Principal não for um valor curinga (*) -CredOwner.Principal.Class.class.Principal.Name.name=CredOwner:\n\tClasse do Principal = {0}\n\tNome do Principal = {1} - -# javax.security.auth.x500 -provided.null.name=nome nulo fornecido -provided.null.keyword.map=mapa de palavra-chave nulo fornecido -provided.null.OID.map=mapa OID nulo fornecido - -# javax.security.auth.Subject -NEWLINE=\n -invalid.null.AccessControlContext.provided=AccessControlContext nulo inválido fornecido -invalid.null.action.provided=ação nula inválida fornecida -invalid.null.Class.provided=Classe nula inválida fornecida -Subject.=Assunto:\n -.Principal.=\tPrincipal:\u0020 -.Public.Credential.=\tCredencial Pública:\u0020 -.Private.Credentials.inaccessible.=\tCredenciais Privadas inacessíveis\n -.Private.Credential.=\tCredencial Privada:\u0020 -.Private.Credential.inaccessible.=\tCredencial Privada inacessível\n -Subject.is.read.only=O Assunto é somente para leitura -attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set=tentativa de adicionar um objeto que não é uma instância de java.security.Principal a um conjunto de principais do Subject -attempting.to.add.an.object.which.is.not.an.instance.of.class=tentativa de adicionar um objeto que não é uma instância de {0} - -# javax.security.auth.login.AppConfigurationEntry -LoginModuleControlFlag.=LoginModuleControlFlag:\u0020 - -# javax.security.auth.login.LoginContext -Invalid.null.input.name=Entrada nula inválida: nome -No.LoginModules.configured.for.name=Nenhum LoginModule configurado para {0} -invalid.null.Subject.provided=Subject nulo inválido fornecido -invalid.null.CallbackHandler.provided=CallbackHandler nulo inválido fornecido -null.subject.logout.called.before.login=Subject nulo - log-out chamado antes do log-in -unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor=não é possível instanciar LoginModule, {0}, porque ele não fornece um construtor sem argumento -unable.to.instantiate.LoginModule=não é possível instanciar LoginModule -unable.to.instantiate.LoginModule.=não é possível instanciar LoginModule:\u0020 -unable.to.find.LoginModule.class.=não é possível localizar a classe LoginModule:\u0020 -unable.to.access.LoginModule.=não é possível acessar LoginModule:\u0020 -Login.Failure.all.modules.ignored=Falha de Log-in: todos os módulos ignorados - -# sun.security.provider.PolicyFile - -java.security.policy.error.parsing.policy.message=java.security.policy: erro durante o parsing de {0}:\n\t{1} -java.security.policy.error.adding.Permission.perm.message=java.security.policy: erro ao adicionar a permissão, {0}:\n\t{1} -java.security.policy.error.adding.Entry.message=java.security.policy: erro ao adicionar a Entrada:\n\t{0} -alias.name.not.provided.pe.name.=nome de alias não fornecido ({0}) -unable.to.perform.substitution.on.alias.suffix=não é possível realizar a substituição no alias, {0} -substitution.value.prefix.unsupported=valor da substituição, {0}, não suportado -SPACE=\u0020 -LPARAM=( -RPARAM=) -type.can.t.be.null=o tipo não pode ser nulo - -# sun.security.provider.PolicyParser -keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore=keystorePasswordURL não pode ser especificado sem que a área de armazenamento de chaves também seja especificada -expected.keystore.type=tipo de armazenamento de chaves esperado -expected.keystore.provider=fornecedor da área de armazenamento de chaves esperado -multiple.Codebase.expressions=várias expressões CodeBase -multiple.SignedBy.expressions=várias expressões SignedBy -duplicate.keystore.domain.name=nome do domínio da área de armazenamento de teclas duplicado: {0} -duplicate.keystore.name=nome da área de armazenamento de chaves duplicado: {0} -SignedBy.has.empty.alias=SignedBy tem alias vazio -can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name=não é possível especificar um principal com uma classe curinga sem um nome curinga -expected.codeBase.or.SignedBy.or.Principal=CodeBase ou SignedBy ou Principal esperado -expected.permission.entry=entrada de permissão esperada -number.=número\u0020 -expected.expect.read.end.of.file.=esperado [{0}], lido [fim do arquivo] -expected.read.end.of.file.=esperado [;], lido [fim do arquivo] -line.number.msg=linha {0}: {1} -line.number.expected.expect.found.actual.=linha {0}: esperada [{1}], encontrada [{2}] -null.principalClass.or.principalName=principalClass ou principalName nulo - -# sun.security.pkcs11.SunPKCS11 -PKCS11.Token.providerName.Password.=Senha PKCS11 de Token [{0}]:\u0020 - -# --- DEPRECATED --- -# javax.security.auth.Policy -unable.to.instantiate.Subject.based.policy=não é possível instanciar a política com base em Subject diff --git a/src/java.base/share/classes/sun/security/util/resources/security_sv.properties b/src/java.base/share/classes/sun/security/util/resources/security_sv.properties deleted file mode 100644 index b06ea96456b..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/security_sv.properties +++ /dev/null @@ -1,110 +0,0 @@ -# -# 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 -# 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. -# - -# javax.security.auth.PrivateCredentialPermission -invalid.null.input.s.=ogiltiga null-indata -actions.can.only.be.read.=åtgärder kan endast 'läsas' -permission.name.name.syntax.invalid.=syntaxen för behörighetsnamnet [{0}] är ogiltig:\u0020 -Credential.Class.not.followed.by.a.Principal.Class.and.Name=Inloggningsuppgiftsklassen följs inte av klass eller namn för identitetshavare -Principal.Class.not.followed.by.a.Principal.Name=Identitetshavareklassen följs inte av något identitetshavarenamn -Principal.Name.must.be.surrounded.by.quotes=Identitetshavarenamnet måste anges inom citattecken -Principal.Name.missing.end.quote=Identitetshavarenamnet saknar avslutande citattecken -PrivateCredentialPermission.Principal.Class.can.not.be.a.wildcard.value.if.Principal.Name.is.not.a.wildcard.value=Identitetshavareklassen PrivateCredentialPermission kan inte ha något jokertecken (*) om inte namnet på identitetshavaren anges med jokertecken (*) -CredOwner.Principal.Class.class.Principal.Name.name=CredOwner:\n\tIdentitetshavareklass = {0}\n\tIdentitetshavarenamn = {1} - -# javax.security.auth.x500 -provided.null.name=null-namn angavs -provided.null.keyword.map=nullnyckelordsmappning angavs -provided.null.OID.map=null-OID-mappning angavs - -# javax.security.auth.Subject -NEWLINE=\n -invalid.null.AccessControlContext.provided=ogiltigt null-AccessControlContext -invalid.null.action.provided=ogiltig null-funktion -invalid.null.Class.provided=ogiltig null-klass -Subject.=Innehavare:\n -.Principal.=\tIdentitetshavare:\u0020 -.Public.Credential.=\tOffentlig inloggning:\u0020 -.Private.Credentials.inaccessible.=\tPrivat inloggning är inte tillgänglig\n -.Private.Credential.=\tPrivat inloggning:\u0020 -.Private.Credential.inaccessible.=\tPrivat inloggning är inte tillgänglig\n -Subject.is.read.only=Innehavare är skrivskyddad -attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set=försök att lägga till ett objekt som inte är en instans av java.security.Principal till ett subjekts uppsättning av identitetshavare -attempting.to.add.an.object.which.is.not.an.instance.of.class=försöker lägga till ett objekt som inte är en instans av {0} - -# javax.security.auth.login.AppConfigurationEntry -LoginModuleControlFlag.=LoginModuleControlFlag:\u0020 - -# javax.security.auth.login.LoginContext -Invalid.null.input.name=Ogiltiga null-indata: namn -No.LoginModules.configured.for.name=Inga inloggningsmoduler har konfigurerats för {0} -invalid.null.Subject.provided=ogiltig null-subjekt -invalid.null.CallbackHandler.provided=ogiltig null-CallbackHandler -null.subject.logout.called.before.login=null-subjekt - utloggning anropades före inloggning -unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor=kan inte instansiera LoginModule, {0}, eftersom den inte tillhandahåller någon icke-argumentskonstruktor -unable.to.instantiate.LoginModule=kan inte instansiera LoginModule -unable.to.instantiate.LoginModule.=kan inte instansiera LoginModule:\u0020 -unable.to.find.LoginModule.class.=hittar inte LoginModule-klassen:\u0020 -unable.to.access.LoginModule.=ingen åtkomst till LoginModule:\u0020 -Login.Failure.all.modules.ignored=Inloggningsfel: alla moduler ignoreras - -# sun.security.provider.PolicyFile - -java.security.policy.error.parsing.policy.message=java.security.policy: fel vid tolkning av {0}:\n\t{1} -java.security.policy.error.adding.Permission.perm.message=java.security.policy: fel vid tillägg av behörighet, {0}:\n\t{1} -java.security.policy.error.adding.Entry.message=java.security.policy: fel vid tillägg av post:\n\t{0} -alias.name.not.provided.pe.name.=aliasnamn ej angivet ({0}) -unable.to.perform.substitution.on.alias.suffix=kan ej ersätta alias, {0} -substitution.value.prefix.unsupported=ersättningsvärde, {0}, stöds ej -SPACE=\u0020 -LPARAM=( -RPARAM=) -type.can.t.be.null=typen kan inte vara null - -# sun.security.provider.PolicyParser -keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore=kan inte ange keystorePasswordURL utan att ange nyckellager -expected.keystore.type=förväntad nyckellagertyp -expected.keystore.provider=nyckellagerleverantör förväntades -multiple.Codebase.expressions=flera CodeBase-uttryck -multiple.SignedBy.expressions=flera SignedBy-uttryck -duplicate.keystore.domain.name=domännamn för dubbelt nyckellager: {0} -duplicate.keystore.name=namn för dubbelt nyckellager: {0} -SignedBy.has.empty.alias=SignedBy har ett tomt alias -can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name=kan inte ange identitetshavare med en jokerteckenklass utan ett jokerteckennamn -expected.codeBase.or.SignedBy.or.Principal=förväntad codeBase eller SignedBy eller identitetshavare -expected.permission.entry=förväntade behörighetspost -number.=nummer -expected.expect.read.end.of.file.=förväntade [{0}], läste [filslut] -expected.read.end.of.file.=förväntade [;], läste [filslut] -line.number.msg=rad {0}: {1} -line.number.expected.expect.found.actual.=rad {0}: förväntade [{1}], hittade [{2}] -null.principalClass.or.principalName=null-principalClass eller -principalName - -# sun.security.pkcs11.SunPKCS11 -PKCS11.Token.providerName.Password.=Lösenord för PKCS11-token [{0}]:\u0020 - -# --- DEPRECATED --- -# javax.security.auth.Policy -unable.to.instantiate.Subject.based.policy=kan inte instansiera subjektbaserad policy diff --git a/src/java.base/share/classes/sun/security/util/resources/security_zh_TW.properties b/src/java.base/share/classes/sun/security/util/resources/security_zh_TW.properties deleted file mode 100644 index efcf19cc598..00000000000 --- a/src/java.base/share/classes/sun/security/util/resources/security_zh_TW.properties +++ /dev/null @@ -1,110 +0,0 @@ -# -# 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 -# 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. -# - -# javax.security.auth.PrivateCredentialPermission -invalid.null.input.s.=無效空值輸入 -actions.can.only.be.read.=動作只能被「讀取」 -permission.name.name.syntax.invalid.=權限名稱 [{0}] 是無效的語法:\u0020 -Credential.Class.not.followed.by.a.Principal.Class.and.Name=Credential 類別後面不是 Principal 類別及名稱 -Principal.Class.not.followed.by.a.Principal.Name=Principal 類別後面不是 Principal 名稱 -Principal.Name.must.be.surrounded.by.quotes=Principal 名稱必須以引號圈住 -Principal.Name.missing.end.quote=Principal 名稱缺少下引號 -PrivateCredentialPermission.Principal.Class.can.not.be.a.wildcard.value.if.Principal.Name.is.not.a.wildcard.value=如果 Principal 名稱不是一個萬用字元 (*) 值,那麼 PrivateCredentialPermission Principal 類別就不能是萬用字元 (*) 值 -CredOwner.Principal.Class.class.Principal.Name.name=CredOwner:\n\tPrincipal 類別 = {0}\n\tPrincipal 名稱 = {1} - -# javax.security.auth.x500 -provided.null.name=提供空值名稱 -provided.null.keyword.map=提供空值關鍵字對映 -provided.null.OID.map=提供空值 OID 對映 - -# javax.security.auth.Subject -NEWLINE=\n -invalid.null.AccessControlContext.provided=提供無效的空值 AccessControlContext -invalid.null.action.provided=提供無效的空值動作 -invalid.null.Class.provided=提供無效的空值類別 -Subject.=主題:\n -.Principal.=\tPrincipal:\u0020 -.Public.Credential.=\t公用證明資料:\u0020 -.Private.Credentials.inaccessible.=\t私人證明資料無法存取\n -.Private.Credential.=\t私人證明資料:\u0020 -.Private.Credential.inaccessible.=\t私人證明資料無法存取\n -Subject.is.read.only=主題為唯讀 -attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set=試圖新增一個非 java.security.Principal 執行處理的物件至主題的 Principal 群中 -attempting.to.add.an.object.which.is.not.an.instance.of.class=試圖新增一個非 {0} 執行處理的物件 - -# javax.security.auth.login.AppConfigurationEntry -LoginModuleControlFlag.=LoginModuleControlFlag:\u0020 - -# javax.security.auth.login.LoginContext -Invalid.null.input.name=無效空值輸入: 名稱 -No.LoginModules.configured.for.name=無針對 {0} 設定的 LoginModules -invalid.null.Subject.provided=提供無效空值主題 -invalid.null.CallbackHandler.provided=提供無效空值 CallbackHandler -null.subject.logout.called.before.login=空值主題 - 在登入之前即呼叫登出 -unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor=無法創設 LoginModule,{0},因為它並未提供非引數的建構子 -unable.to.instantiate.LoginModule=無法建立 LoginModule -unable.to.instantiate.LoginModule.=無法建立 LoginModule:\u0020 -unable.to.find.LoginModule.class.=找不到 LoginModule 類別:\u0020 -unable.to.access.LoginModule.=無法存取 LoginModule:\u0020 -Login.Failure.all.modules.ignored=登入失敗: 忽略所有模組 - -# sun.security.provider.PolicyFile - -java.security.policy.error.parsing.policy.message=java.security.policy: 剖析錯誤 {0}: \n\t{1} -java.security.policy.error.adding.Permission.perm.message=java.security.policy: 新增權限錯誤 {0}: \n\t{1} -java.security.policy.error.adding.Entry.message=java.security.policy: 新增項目錯誤: \n\t{0} -alias.name.not.provided.pe.name.=未提供別名名稱 ({0}) -unable.to.perform.substitution.on.alias.suffix=無法對別名執行替換,{0} -substitution.value.prefix.unsupported=不支援的替換值,{0} -SPACE=\u0020 -LPARAM=( -RPARAM=) -type.can.t.be.null=輸入不能為空值 - -# sun.security.provider.PolicyParser -keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore=指定 keystorePasswordURL 需要同時指定金鑰儲存庫 -expected.keystore.type=預期的金鑰儲存庫類型 -expected.keystore.provider=預期的金鑰儲存庫提供者 -multiple.Codebase.expressions=多重 Codebase 表示式 -multiple.SignedBy.expressions=多重 SignedBy 表示式 -duplicate.keystore.domain.name=重複的金鑰儲存庫網域名稱: {0} -duplicate.keystore.name=重複的金鑰儲存庫名稱: {0} -SignedBy.has.empty.alias=SignedBy 有空別名 -can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name=沒有萬用字元名稱,無法指定含有萬用字元類別的 Principal -expected.codeBase.or.SignedBy.or.Principal=預期的 codeBase 或 SignedBy 或 Principal -expected.permission.entry=預期的權限項目 -number.=號碼\u0020 -expected.expect.read.end.of.file.=預期的 [{0}], 讀取 [end of file] -expected.read.end.of.file.=預期的 [;], 讀取 [end of file] -line.number.msg=行 {0}: {1} -line.number.expected.expect.found.actual.=行 {0}: 預期的 [{1}],發現 [{2}] -null.principalClass.or.principalName=空值 principalClass 或 principalName - -# sun.security.pkcs11.SunPKCS11 -PKCS11.Token.providerName.Password.=PKCS11 記號 [{0}] 密碼:\u0020 - -# --- DEPRECATED --- -# javax.security.auth.Policy -unable.to.instantiate.Subject.based.policy=無法建立主題式的原則 diff --git a/src/java.base/share/classes/sun/security/x509/DNSName.java b/src/java.base/share/classes/sun/security/x509/DNSName.java index 597652022ce..ce903a3d16c 100644 --- a/src/java.base/share/classes/sun/security/x509/DNSName.java +++ b/src/java.base/share/classes/sun/security/x509/DNSName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2023, 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 @@ -52,8 +52,8 @@ import sun.security.util.*; public class DNSName implements GeneralNameInterface { private final String name; - private static final String alphaDigits = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + private static final String DNS_ALLOWED = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-"; /** * Create the DNSName object from the passed encoded Der value. @@ -73,52 +73,64 @@ public class DNSName implements GeneralNameInterface { * @throws IOException if the name is not a valid DNSName */ public DNSName(String name, boolean allowWildcard) throws IOException { - if (name == null || name.isEmpty()) + + // Check the full name. + if (name == null || name.isEmpty()) { throw new IOException("DNSName must not be null or empty"); - if (name.contains(" ")) - throw new IOException("DNSName with blank components is not permitted"); - if (name.startsWith(".") || name.endsWith(".")) + } + + if (name.contains(" ")) { + throw new IOException( + "DNSName with blank labels is not permitted"); + } + + if (name.startsWith(".") || name.endsWith(".")) { throw new IOException("DNSName may not begin or end with a ."); - /* - * Name will consist of label components separated by "." - * startIndex is the index of the first character of a component - * endIndex is the index of the last character of a component plus 1 - */ - for (int endIndex,startIndex = 0; startIndex < name.length(); startIndex = endIndex+1) { - endIndex = name.indexOf('.', startIndex); - if (endIndex < 0) { - endIndex = name.length(); - } - if (endIndex - startIndex < 1) - throw new IOException("DNSName with empty components are not permitted"); + } - if (allowWildcard) { - // RFC 1123: DNSName components must begin with a letter or digit - // or RFC 4592: the first component of a DNSName can have only a wildcard - // character * (asterisk), i.e. *.example.com. Asterisks at other components - // will not be allowed as a wildcard. - if (alphaDigits.indexOf(name.charAt(startIndex)) < 0) { - // Checking to make sure the wildcard only appears in the first component, - // and it has to be at least 3-char long with the form of *.[alphaDigit] - if ((name.length() < 3) || (name.indexOf('*') != 0) || - (name.charAt(startIndex+1) != '.') || - (alphaDigits.indexOf(name.charAt(startIndex+2)) < 0)) - throw new IOException("DNSName components must begin with a letter, digit, " - + "or the first component can have only a wildcard character *"); + // RFC 1123 Section 2.1 and RFC 2181 Section 11 + if (name.length() > 253) { + throw new IOException( + "DNSName can't be longer than 253 characters"); + } + + // Check the labels. + String[] labels = name.split("\\."); + + for (int i = 0; i < labels.length; i++) { + String label = labels[i]; + + if (label.isEmpty()) { + throw new IOException( + "DNSName with empty labels is not permitted"); + } + + // RFC 1123 Section 2.1 + if (label.length() > 63) { + throw new IOException( + "DNSName label can't be longer than 63 characters"); + } + + // RFC 1035 Section 2.3.1 + if (label.startsWith("-") || label.endsWith("-")) { + throw new IOException( + "DNSName label may not begin or end with a hyphen"); + } + + // RFC 9525 Section 6.3 + if (allowWildcard && label.equals("*") && i == 0 + && labels.length > 1) { + continue; + } + + for (char c : label.toCharArray()) { + if (DNS_ALLOWED.indexOf(c) < 0) { + throw new IOException("DNSName labels must consist of " + + "letters, digits, and hyphens"); } - } else { - // RFC 1123: DNSName components must begin with a letter or digit - if (alphaDigits.indexOf(name.charAt(startIndex)) < 0) - throw new IOException("DNSName components must begin with a letter or digit"); - } - - //nonStartIndex: index for characters in the component beyond the first one - for (int nonStartIndex=startIndex+1; nonStartIndex < endIndex; nonStartIndex++) { - char x = name.charAt(nonStartIndex); - if ((alphaDigits).indexOf(x) < 0 && x != '-') - throw new IOException("DNSName components must consist of letters, digits, and hyphens"); } } + this.name = name; } diff --git a/src/java.base/share/classes/sun/text/spi/JavaTimeDateTimePatternProvider.java b/src/java.base/share/classes/sun/text/spi/JavaTimeDateTimePatternProvider.java deleted file mode 100644 index 58235c9dff0..00000000000 --- a/src/java.base/share/classes/sun/text/spi/JavaTimeDateTimePatternProvider.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. 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.text.spi; - -import java.time.DateTimeException; -import java.util.Locale; -import java.util.spi.LocaleServiceProvider; - -/** - * Service Provider Interface for retrieving DateTime patterns from - * specified Locale provider for java.time. - */ - -public abstract class JavaTimeDateTimePatternProvider extends LocaleServiceProvider { - - protected JavaTimeDateTimePatternProvider() { - } - - /** - * Returns the formatting pattern for a timeStyle - * dateStyle, calendarType and locale. - * Concrete implementation of this method will retrieve - * a java.time specific dateTime Pattern from the selected Locale Provider. - * - * @param timeStyle an {@code int} value, representing FormatStyle constant, -1 - * for date-only pattern - * @param dateStyle an {@code int} value, representing FormatStyle constant, -1 - * for time-only pattern - * @param locale {@code locale}, non-null - * @param calType a {@code String}, non-null representing CalendarType such as "japanese", - * "iso8601" - * @return formatting pattern {@code String} - * @see java.time.format.DateTimeFormatterBuilder#convertStyle(java.time.format.FormatStyle) - * @since 9 - */ - public abstract String getJavaTimeDateTimePattern(int timeStyle, int dateStyle, String calType, Locale locale); - - /** - * Returns the formatting pattern for the requested template, calendarType, and locale. - * Concrete implementation of this method will retrieve - * a java.time specific pattern from selected Locale Provider. - * - * @param requestedTemplate the requested template, not null - * @param calType a {@code String}, non-null representing CalendarType such as "japanese", - * "iso8601" - * @param locale {@code locale}, non-null - * @throws IllegalArgumentException if {@code requestedTemplate} does not match - * the regular expression syntax described in - * {@link java.time.format.DateTimeFormatterBuilder#appendLocalized(String)}. - * @throws DateTimeException if a match for the formatting pattern for - * {@code requestedTemplate} is not available - * @return formatting pattern {@code String} - * @since 19 - */ - public String getJavaTimeDateTimePattern(String requestedTemplate, String calType, Locale locale) { - // default implementation throws exception - throw new DateTimeException("Formatting pattern is not available for the requested template: " + requestedTemplate); - } -} diff --git a/src/java.base/share/classes/sun/util/locale/LocaleMatcher.java b/src/java.base/share/classes/sun/util/locale/LocaleMatcher.java index 72844b966d0..bc5115e1ff1 100644 --- a/src/java.base/share/classes/sun/util/locale/LocaleMatcher.java +++ b/src/java.base/share/classes/sun/util/locale/LocaleMatcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021, 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 @@ -30,12 +30,17 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Locale; -import java.util.Locale.*; -import static java.util.Locale.FilteringMode.*; -import static java.util.Locale.LanguageRange.*; +import java.util.Locale.FilteringMode; +import java.util.Locale.LanguageRange; import java.util.Map; -import java.util.Set; -import java.util.TreeSet; +import java.util.Objects; + +import static java.util.Locale.FilteringMode.AUTOSELECT_FILTERING; +import static java.util.Locale.FilteringMode.EXTENDED_FILTERING; +import static java.util.Locale.FilteringMode.MAP_EXTENDED_RANGES; +import static java.util.Locale.FilteringMode.REJECT_EXTENDED_RANGES; +import static java.util.Locale.LanguageRange.MAX_WEIGHT; +import static java.util.Locale.LanguageRange.MIN_WEIGHT; /** * Implementation for BCP47 Locale matching diff --git a/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java b/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java index f739cb613af..2a2890ed14d 100644 --- a/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java +++ b/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, 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 @@ -25,6 +25,7 @@ package sun.util.locale.provider; +import java.time.format.DateTimeFormatterPatternProvider; import java.text.spi.BreakIteratorProvider; import java.text.spi.CollatorProvider; import java.text.spi.DateFormatProvider; @@ -43,7 +44,6 @@ import java.util.spi.CurrencyNameProvider; import java.util.spi.LocaleNameProvider; import java.util.spi.LocaleServiceProvider; import java.util.spi.TimeZoneNameProvider; -import sun.text.spi.JavaTimeDateTimePatternProvider; import sun.util.spi.CalendarProvider; /** @@ -142,6 +142,14 @@ public abstract class AuxLocaleProviderAdapter extends LocaleProviderAdapter { return getLocaleServiceProvider(CalendarNameProvider.class); } + /** + * Getter methods for java.time.format.* providers + */ + @Override + public DateTimeFormatterPatternProvider getDateTimeFormatterPatternProvider() { + return getLocaleServiceProvider(DateTimeFormatterPatternProvider.class); + } + /** * Getter methods for sun.util.spi.* providers */ @@ -155,11 +163,6 @@ public abstract class AuxLocaleProviderAdapter extends LocaleProviderAdapter { return null; } - @Override - public JavaTimeDateTimePatternProvider getJavaTimeDateTimePatternProvider() { - return getLocaleServiceProvider(JavaTimeDateTimePatternProvider.class); - } - private static Locale[] availableLocales = null; @Override diff --git a/src/java.base/share/classes/sun/util/locale/provider/JavaTimeDateTimePatternImpl.java b/src/java.base/share/classes/sun/util/locale/provider/DateTimeFormatterPatternProviderImpl.java similarity index 65% rename from src/java.base/share/classes/sun/util/locale/provider/JavaTimeDateTimePatternImpl.java rename to src/java.base/share/classes/sun/util/locale/provider/DateTimeFormatterPatternProviderImpl.java index c39cea799b3..43930f9df49 100644 --- a/src/java.base/share/classes/sun/util/locale/provider/JavaTimeDateTimePatternImpl.java +++ b/src/java.base/share/classes/sun/util/locale/provider/DateTimeFormatterPatternProviderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2022, 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 @@ -25,33 +25,31 @@ package sun.util.locale.provider; import java.time.DateTimeException; +import java.time.format.DateTimeFormatterPatternProvider; +import java.time.format.FormatStyle; import java.util.Locale; import java.util.Objects; import java.util.Optional; import java.util.Set; -import sun.text.spi.JavaTimeDateTimePatternProvider; /** - * Concrete implementation of the {@link sun.text.spi.JavaTimeDateTimePatternProvider - * } class for the JRE LocaleProviderAdapter. + * Concrete implementation of the {@link java.time.format.DateTimeFormatterPatternProvider + * } class * */ -public class JavaTimeDateTimePatternImpl extends JavaTimeDateTimePatternProvider implements AvailableLanguageTags { +public class DateTimeFormatterPatternProviderImpl extends DateTimeFormatterPatternProvider implements AvailableLanguageTags { private final LocaleProviderAdapter.Type type; private final Set langtags; - public JavaTimeDateTimePatternImpl(LocaleProviderAdapter.Type type, Set langtags) { + public DateTimeFormatterPatternProviderImpl(LocaleProviderAdapter.Type type, Set langtags) { this.type = type; this.langtags = langtags; } /** - * Returns an array of all locales for which this locale service provider - * can provide localized objects or names. - * - * @return An array of all locales for which this locale service provider - * can provide localized objects or names. + * {@return an array of all locales for which this locale service provider + * can provide localized objects or names} */ @Override public Locale[] getAvailableLocales() { @@ -64,13 +62,21 @@ public class JavaTimeDateTimePatternImpl extends JavaTimeDateTimePatternProvider } @Override - public String getJavaTimeDateTimePattern(int timeStyle, int dateStyle, String calType, Locale locale) { + public String getDateTimeFormatterPattern(FormatStyle dateStyle, FormatStyle timeStyle, String calType, Locale locale) { + Objects.requireNonNull(calType); + Objects.requireNonNull(locale); + if (dateStyle == null && timeStyle == null) { + throw new IllegalArgumentException("Both \"dateStyle\" and \"timeStyle\" are null."); + } LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased().getLocaleResources(locale); - return lr.getJavaTimeDateTimePattern(timeStyle, dateStyle, calType); + return lr.getDateTimeFormatterPattern(dateStyle, timeStyle, calType); } @Override - public String getJavaTimeDateTimePattern(String requestedTemplate, String calType, Locale locale) { + public String getDateTimeFormatterPattern(String requestedTemplate, String calType, Locale locale) { + Objects.requireNonNull(requestedTemplate); + Objects.requireNonNull(calType); + Objects.requireNonNull(locale); LocaleProviderAdapter lpa = LocaleProviderAdapter.getResourceBundleBased(); return ((ResourceBundleBasedAdapter)lpa).getCandidateLocales("", locale).stream() .map(lpa::getLocaleResources) @@ -78,7 +84,7 @@ public class JavaTimeDateTimePatternImpl extends JavaTimeDateTimePatternProvider .filter(Objects::nonNull) .findFirst() .or(() -> calType.equals("generic") ? Optional.empty(): - Optional.of(getJavaTimeDateTimePattern(requestedTemplate, "generic", locale))) + Optional.of(getDateTimeFormatterPattern(requestedTemplate, "generic", locale))) .orElseThrow(() -> new DateTimeException("Requested template \"" + requestedTemplate + "\" cannot be resolved in the locale \"" + locale + "\"")); } diff --git a/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java b/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java index 14d36f0e266..7b8b3b06eb3 100644 --- a/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java +++ b/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, 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 @@ -31,6 +31,7 @@ import java.text.spi.DateFormatProvider; import java.text.spi.DateFormatSymbolsProvider; import java.text.spi.DecimalFormatSymbolsProvider; import java.text.spi.NumberFormatProvider; +import java.time.format.DateTimeFormatterPatternProvider; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -46,7 +47,6 @@ import java.util.spi.CurrencyNameProvider; import java.util.spi.LocaleNameProvider; import java.util.spi.LocaleServiceProvider; import java.util.spi.TimeZoneNameProvider; -import sun.text.spi.JavaTimeDateTimePatternProvider; import sun.util.resources.LocaleData; import sun.util.spi.CalendarProvider; @@ -79,37 +79,35 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R * Getter method for Locale Service Providers */ @Override - @SuppressWarnings("unchecked") public

    P getLocaleServiceProvider(Class

    c) { - switch (c.getSimpleName()) { - case "BreakIteratorProvider": - return (P) getBreakIteratorProvider(); - case "CollatorProvider": - return (P) getCollatorProvider(); - case "DateFormatProvider": - return (P) getDateFormatProvider(); - case "DateFormatSymbolsProvider": - return (P) getDateFormatSymbolsProvider(); - case "DecimalFormatSymbolsProvider": - return (P) getDecimalFormatSymbolsProvider(); - case "NumberFormatProvider": - return (P) getNumberFormatProvider(); - case "CurrencyNameProvider": - return (P) getCurrencyNameProvider(); - case "LocaleNameProvider": - return (P) getLocaleNameProvider(); - case "TimeZoneNameProvider": - return (P) getTimeZoneNameProvider(); - case "CalendarDataProvider": - return (P) getCalendarDataProvider(); - case "CalendarNameProvider": - return (P) getCalendarNameProvider(); - case "CalendarProvider": - return (P) getCalendarProvider(); - case "JavaTimeDateTimePatternProvider": - return (P) getJavaTimeDateTimePatternProvider(); - default: - throw new InternalError("should not come down here"); + if (c == BreakIteratorProvider.class) { + return c.cast(getBreakIteratorProvider()); + } else if (c == CollatorProvider.class) { + return c.cast(getCollatorProvider()); + } else if (c == DateFormatProvider.class) { + return c.cast(getDateFormatProvider()); + } else if (c == DateFormatSymbolsProvider.class) { + return c.cast(getDateFormatSymbolsProvider()); + } else if (c == DecimalFormatSymbolsProvider.class) { + return c.cast(getDecimalFormatSymbolsProvider()); + } else if (c == NumberFormatProvider.class) { + return c.cast(getNumberFormatProvider()); + } else if (c == CurrencyNameProvider.class) { + return c.cast(getCurrencyNameProvider()); + } else if (c == LocaleNameProvider.class) { + return c.cast(getLocaleNameProvider()); + } else if (c == TimeZoneNameProvider.class) { + return c.cast(getTimeZoneNameProvider()); + } else if (c == CalendarDataProvider.class) { + return c.cast(getCalendarDataProvider()); + } else if (c == CalendarNameProvider.class) { + return c.cast(getCalendarNameProvider()); + } else if (c == CalendarProvider.class) { + return c.cast(getCalendarProvider()); + } else if (c == DateTimeFormatterPatternProvider.class) { + return c.cast(getDateTimeFormatterPatternProvider()); + } else { + throw new InternalError("Unknown LocaleServiceProvider class"); } } @@ -127,7 +125,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R protected volatile CalendarNameProvider calendarNameProvider; private volatile CalendarProvider calendarProvider; - private volatile JavaTimeDateTimePatternProvider javaTimeDateTimePatternProvider; + private volatile DateTimeFormatterPatternProvider dateTimeFormatterPatternProvider; /* * Getter methods for java.text.spi.* providers @@ -331,22 +329,22 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R } /** - * Getter methods for sun.text.spi.JavaTimeDateTimePatternProvider provider + * Getter methods for java.time.format.DateTimeFormatterPatternProvider provider */ @Override - public JavaTimeDateTimePatternProvider getJavaTimeDateTimePatternProvider() { - if (javaTimeDateTimePatternProvider == null) { - JavaTimeDateTimePatternProvider provider = new JavaTimeDateTimePatternImpl( + public DateTimeFormatterPatternProvider getDateTimeFormatterPatternProvider() { + if (dateTimeFormatterPatternProvider == null) { + DateTimeFormatterPatternProvider provider = new DateTimeFormatterPatternProviderImpl( getAdapterType(), getLanguageTagSet("FormatData")); synchronized (this) { - if (javaTimeDateTimePatternProvider == null) { - javaTimeDateTimePatternProvider = provider; + if (dateTimeFormatterPatternProvider == null) { + dateTimeFormatterPatternProvider = provider; } } } - return javaTimeDateTimePatternProvider; + return dateTimeFormatterPatternProvider; } @Override diff --git a/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java b/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java index 5e7a4c719d1..db1e5a47e6e 100644 --- a/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java +++ b/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, 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 @@ -26,6 +26,7 @@ package sun.util.locale.provider; import java.lang.reflect.InvocationTargetException; +import java.time.format.DateTimeFormatterPatternProvider; import java.text.spi.BreakIteratorProvider; import java.text.spi.CollatorProvider; import java.text.spi.DateFormatProvider; @@ -48,7 +49,6 @@ import java.util.spi.CurrencyNameProvider; import java.util.spi.LocaleNameProvider; import java.util.spi.LocaleServiceProvider; import java.util.spi.TimeZoneNameProvider; -import sun.text.spi.JavaTimeDateTimePatternProvider; import sun.util.spi.CalendarProvider; import static java.lang.System.*; @@ -423,12 +423,12 @@ public abstract class LocaleProviderAdapter { public abstract CalendarProvider getCalendarProvider(); /** - * Returns a JavaTimeDateTimePatternProvider for this LocaleProviderAdapter, - * or null if no JavaTimeDateTimePatternProvider is available. + * Returns a DateTimeFormatterPatternProvider for this LocaleProviderAdapter, + * or null if no DateTimeFormatterPatternProvider is available. * - * @return a JavaTimeDateTimePatternProvider + * @return a DateTimeFormatterPatternProvider */ - public abstract JavaTimeDateTimePatternProvider getJavaTimeDateTimePatternProvider(); + public abstract DateTimeFormatterPatternProvider getDateTimeFormatterPatternProvider(); public abstract LocaleResources getLocaleResources(Locale locale); diff --git a/src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java b/src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java index 76b383c03e1..0629eadcb7c 100644 --- a/src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java +++ b/src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java @@ -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 @@ import java.lang.ref.SoftReference; import java.text.ListFormat; import java.text.MessageFormat; import java.text.NumberFormat; +import java.time.format.FormatStyle; import java.util.Arrays; import java.util.Calendar; import java.util.HashMap; @@ -130,11 +131,12 @@ public class LocaleResources { // Input Skeleton map for "preferred" and "allowed" // Map<"preferred"/"allowed", Map<"region", "skeleton">> - private static Map> inputSkeletons; + private static final LazyConstant>> INPUT_SKELETONS = + LazyConstant.of(LocaleResources::initSkeletons); // Skeletons for "j" and "C" input skeleton symbols for this locale - private String jPattern; - private String CPattern; + private final LazyConstant jPattern = LazyConstant.of(() -> resolveInputSkeleton("preferred")); + private final LazyConstant CPattern = LazyConstant.of(this::initCPattern); LocaleResources(ResourceBundleBasedAdapter adapter, Locale locale) { this.locale = locale; @@ -462,19 +464,21 @@ public class LocaleResources { /** * Returns a date-time format pattern - * @param timeStyle style of time; one of FULL, LONG, MEDIUM, SHORT in DateFormat, - * or -1 if not required - * @param dateStyle style of time; one of FULL, LONG, MEDIUM, SHORT in DateFormat, - * or -1 if not required + * @param dateStyle style of time; one of FULL, LONG, MEDIUM, SHORT in FormatStyle, + * or null if not required + * @param timeStyle style of time; one of FULL, LONG, MEDIUM, SHORT in FormatStyle, + * or null if not required * @param calType the calendar type for the pattern * @return the pattern string */ - public String getJavaTimeDateTimePattern(int timeStyle, int dateStyle, String calType) { + public String getDateTimeFormatterPattern(FormatStyle dateStyle, FormatStyle timeStyle, String calType) { calType = CalendarDataUtility.normalizeCalendarType(calType); String pattern; - pattern = getDateTimePattern("java.time.", timeStyle, dateStyle, calType); + int ts = timeStyle != null ? timeStyle.ordinal() : -1; + int ds = dateStyle != null ? dateStyle.ordinal() : -1; + pattern = getDateTimePattern("java.time.", ts, ds, calType); if (pattern == null) { - pattern = getDateTimePattern(null, timeStyle, dateStyle, calType); + pattern = getDateTimePattern(null, ts, ds, calType); } return pattern; } @@ -604,8 +608,6 @@ public class LocaleResources { } private String getLocalizedPatternImpl(String requestedTemplate, String calType) { - initSkeletonIfNeeded(); - // input skeleton substitution var skeleton = substituteInputSkeletons(requestedTemplate); @@ -654,12 +656,14 @@ public class LocaleResources { .orElse(null); } - private void initSkeletonIfNeeded() { + private static Map> initSkeletons() { // "preferred"/"allowed" input skeleton maps - if (inputSkeletons == null) { - inputSkeletons = new HashMap<>(); - Pattern p = Pattern.compile("([^:]+):([^;]+);"); - ResourceBundle r = localeData.getDateFormatData(Locale.ROOT); + var inputSkeletons = new HashMap>(); + Pattern p = Pattern.compile("([^:]+):([^;]+);"); + + // CLDR is guaranteed to implement ResourceBundleBasedAdapter + if (LocaleProviderAdapter.forType(LocaleProviderAdapter.Type.CLDR) instanceof ResourceBundleBasedAdapter rbba) { + var r = rbba.getLocaleData().getDateFormatData(Locale.ROOT); Stream.of("preferred", "allowed").forEach(type -> { var inputRegionsKey = SKELETON_INPUT_REGIONS_KEY + "." + type; Map typeMap = new HashMap<>(); @@ -673,19 +677,17 @@ public class LocaleResources { inputSkeletons.put(type, typeMap); }); } + return inputSkeletons; + } - // j/C patterns for this locale - if (jPattern == null) { - jPattern = resolveInputSkeleton("preferred"); - CPattern = resolveInputSkeleton("allowed"); - // hack: "allowed" contains reversed order for hour/period, e.g, "hB" which should be "Bh" as a skeleton - if (CPattern.length() == 2) { - var ba = new byte[2]; - ba[0] = (byte)CPattern.charAt(1); - ba[1] = (byte)CPattern.charAt(0); - CPattern = new String(ba); - } + private String initCPattern() { + // C patterns for this locale + var cp = resolveInputSkeleton("allowed"); + // hack: "allowed" contains reversed order for hour/period, e.g, "hB" which should be "Bh" as a skeleton + if (cp.length() == 2) { + cp = "" + cp.charAt(1) + cp.charAt(0); } + return cp; } /** @@ -695,11 +697,22 @@ public class LocaleResources { * @return resolved skeletons for this locale, defaults to "h" if none found. */ private String resolveInputSkeleton(String type) { - var regionToSkeletonMap = inputSkeletons.get(type); - return regionToSkeletonMap.getOrDefault(locale.getLanguage() + "-" + locale.getCountry(), - regionToSkeletonMap.getOrDefault(locale.getCountry(), - regionToSkeletonMap.getOrDefault(locale.getLanguage() + "-001", - regionToSkeletonMap.getOrDefault("001", "h")))); + var regionToSkeletonMap = INPUT_SKELETONS.get().get(type); + + if (regionToSkeletonMap != null) { + for (var region: new String[] { + locale.getLanguage() + "-" + locale.getCountry(), + locale.getCountry(), + locale.getLanguage() + "-001", + "001"}) { + var hour = regionToSkeletonMap.get(region); + if (hour != null) { + return hour; + } + } + } + + return "h"; } /** @@ -711,8 +724,8 @@ public class LocaleResources { */ private String substituteInputSkeletons(String requestedTemplate) { var cCount = requestedTemplate.chars().filter(c -> c == 'C').count(); - return requestedTemplate.replaceAll("j", jPattern) - .replaceFirst("C+", CPattern.replaceAll("([hkHK])", "$1".repeat((int)cCount))); + return requestedTemplate.replaceAll("j", jPattern.get()) + .replaceFirst("C+", CPattern.get().replaceAll("([hkHK])", "$1".repeat((int)cCount))); } /** diff --git a/src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java b/src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java index 5efa512e432..cc9a805fe0d 100644 --- a/src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java +++ b/src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -88,10 +88,12 @@ public final class LocaleServiceProviderPool { java.text.spi.DateFormatSymbolsProvider.class, java.text.spi.DecimalFormatSymbolsProvider.class, java.text.spi.NumberFormatProvider.class, + java.time.format.DateTimeFormatterPatternProvider.class, + java.util.spi.CalendarDataProvider.class, + java.util.spi.CalendarNameProvider.class, java.util.spi.CurrencyNameProvider.class, java.util.spi.LocaleNameProvider.class, java.util.spi.TimeZoneNameProvider.class, - java.util.spi.CalendarDataProvider.class }; /** diff --git a/src/java.base/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java b/src/java.base/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java index 019e72b4d1c..9e250722468 100644 --- a/src/java.base/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java +++ b/src/java.base/share/classes/sun/util/locale/provider/SPILocaleProviderAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, 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 @@ -25,6 +25,7 @@ package sun.util.locale.provider; +import java.time.format.DateTimeFormatterPatternProvider; import java.text.BreakIterator; import java.text.Collator; import java.text.DateFormat; @@ -37,6 +38,7 @@ import java.text.spi.DateFormatProvider; import java.text.spi.DateFormatSymbolsProvider; import java.text.spi.DecimalFormatSymbolsProvider; import java.text.spi.NumberFormatProvider; +import java.time.format.FormatStyle; import java.util.Arrays; import java.util.Locale; import java.util.Map; @@ -575,4 +577,37 @@ public class SPILocaleProviderAdapter extends AuxLocaleProviderAdapter { return tznp.getGenericDisplayName(ID, style, locale); } } + + static class DateTimeFormatterPatternProviderDelegate extends DateTimeFormatterPatternProvider implements Delegate { + private final Map map = new ConcurrentHashMap<>(); + + @Override + public Map getDelegateMap() { + return map; + } + + @Override + public Locale[] getAvailableLocales() { + return getAvailableLocalesDelegate(); + } + + @Override + public boolean isSupportedLocale(Locale locale) { + return isSupportedLocaleDelegate(locale); + } + + @Override + public String getDateTimeFormatterPattern(FormatStyle dateStyle, FormatStyle timeStyle, String calType, Locale locale) { + locale = CalendarDataUtility.findRegionOverride(locale); + DateTimeFormatterPatternProvider jdtp = getImpl(locale); + return jdtp.getDateTimeFormatterPattern(dateStyle, timeStyle, calType, locale); + } + + @Override + public String getDateTimeFormatterPattern(String requestedTemplate, String calType, Locale locale) { + locale = CalendarDataUtility.findRegionOverride(locale); + DateTimeFormatterPatternProvider jdtp = getImpl(locale); + return jdtp.getDateTimeFormatterPattern(requestedTemplate, calType, locale); + } + } } diff --git a/src/java.base/share/data/cacerts/wisekeyglobalrootgbca b/src/java.base/share/data/cacerts/wisekeyglobalrootgbca new file mode 100644 index 00000000000..5c2c35d04c1 --- /dev/null +++ b/src/java.base/share/data/cacerts/wisekeyglobalrootgbca @@ -0,0 +1,29 @@ +Owner: CN=OISTE WISeKey Global Root GB CA, OU=OISTE Foundation Endorsed, O=WISeKey, C=CH +Issuer: CN=OISTE WISeKey Global Root GB CA, OU=OISTE Foundation Endorsed, O=WISeKey, C=CH +Serial number: 76b1205274f0858746b3f8231af6c2c0 +Valid from: Mon Dec 01 15:00:32 GMT 2014 until: Thu Dec 01 15:10:31 GMT 2039 +Signature algorithm name: SHA256withRSA +Subject Public Key Algorithm: 2048-bit RSA key +Version: 3 +-----BEGIN CERTIFICATE----- +MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBt +MQswCQYDVQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUg +Rm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9i +YWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAwMzJaFw0zOTEyMDExNTEwMzFaMG0x +CzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQLExlPSVNURSBG +b3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh +bCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3 +HEokKtaXscriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGx +WuR51jIjK+FTzJlFXHtPrby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX +1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNk +u7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4oQnc/nSMbsrY9gBQHTC5P +99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvgGUpuuy9r +M2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUB +BAMCAQAwDQYJKoZIhvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrgh +cViXfa43FK8+5/ea4n32cZiZBKpDdHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5 +gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0VQreUGdNZtGn//3ZwLWoo4rO +ZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEuiHZeeevJuQHHf +aPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic +Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= +-----END CERTIFICATE----- diff --git a/src/java.base/share/data/cacerts/wisekeyglobalrootgcca b/src/java.base/share/data/cacerts/wisekeyglobalrootgcca new file mode 100644 index 00000000000..e42432b95a6 --- /dev/null +++ b/src/java.base/share/data/cacerts/wisekeyglobalrootgcca @@ -0,0 +1,22 @@ +Owner: CN=OISTE WISeKey Global Root GC CA, OU=OISTE Foundation Endorsed, O=WISeKey, C=CH +Issuer: CN=OISTE WISeKey Global Root GC CA, OU=OISTE Foundation Endorsed, O=WISeKey, C=CH +Serial number: 212a560caeda0cab4045bf2ba22d3aea +Valid from: Tue May 09 09:48:34 GMT 2017 until: Fri May 09 09:58:33 GMT 2042 +Signature algorithm name: SHA384withECDSA +Subject Public Key Algorithm: 384-bit EC (secp384r1) key +Version: 3 +-----BEGIN CERTIFICATE----- +MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQsw +CQYDVQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91 +bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwg +Um9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRaFw00MjA1MDkwOTU4MzNaMG0xCzAJ +BgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQLExlPSVNURSBGb3Vu +ZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2JhbCBS +b290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4ni +eUqjFqdrVCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4W +p2OQ0jnUsYd4XxiWD1AbNTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7T +rYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0EAwMDaAAwZQIwJsdpW9zV +57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtkAjEA2zQg +Mgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 +-----END CERTIFICATE----- diff --git a/src/java.base/share/data/tzdata/VERSION b/src/java.base/share/data/tzdata/VERSION index a2974d757c8..7602b7afe4c 100644 --- a/src/java.base/share/data/tzdata/VERSION +++ b/src/java.base/share/data/tzdata/VERSION @@ -21,4 +21,4 @@ # or visit www.oracle.com if you need additional information or have any # questions. # -tzdata2026a +tzdata2026b diff --git a/src/java.base/share/data/tzdata/northamerica b/src/java.base/share/data/tzdata/northamerica index f20879e9063..88e4e853f58 100644 --- a/src/java.base/share/data/tzdata/northamerica +++ b/src/java.base/share/data/tzdata/northamerica @@ -1980,6 +1980,56 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # https://searcharchives.vancouver.ca/daylight-saving-1918-starts-again-july-7-1941-start-d-s-sept-27-end-of-d-s-1941 # We have no further details, so omit them for now. +# From Arthur David Olson (2026-03-02): +# B. C. Gov News: “Adopting permanent daylight saving time: ‘Spring forward’ +# on March 8 will be the last time change, ending twice-yearly clock changes.” +# https://news.gov.bc.ca/releases/2026AG0013-000209 +# +# From Paul Eggert (2026-03-07): +# The law says that 21 hours after the usual 2026-03-08 02:00 switch from +# PST to PDT, the next day inaugurates the new standard time Pacific Time, +# i.e., just one clock change but two name changes separated by 21 hours. +# PT, the obvious abbreviation for Pacific Time, is one letter too short +# to conform to TZDB’s (and POSIX’s) [-+[:alnum:]]{3,6} requirements. +# I asked the BC government for advice, with no response. For now, do this: +# 1. As a temporary hack, pretend that the BC law takes effect +# not on 2026-03-09 at 00:00, but on 2026-11-01 at 02:00. +# This pretense works around a limitation in CLDR v48.2 (2026-03-17), +# which would otherwise say the interval uses “Pacific Standard Time”. +# (Below, this temporary hack is marked “Temporary hack; see above.”) +# Strictly speaking this hack is incorrect since the interval uses +# standard time, but it does have the right UT offset and it +# works around the CLDR limitation. We should be able to remove +# the temporary hack after CLDR is fixed. +# 2. After the BC law takes effect, model the time as MST sans DST. +# We can change this later if another conforming non-numeric abbreviation +# for Pacific Time becomes more popular. Possibilities include: +# MST - the most compatible with existing software and practice, +# and already used in parts of BC and in Yukon +# PDT - almost as software-friendly, but confusing because it implies +# it is DST and is paired with PST, whereas PT is standard time +# PST - straightforward but even more confusing, +# and will likely break much software that assumes PST is -08 +# -07 - accurate and clear in itself, but makes BC look odd vs neighbors +# CPT, CPST - for Canadian Pacific (Standard) Time, +# by analogy with AEST in Australia +# P-T - conforming approximation to “PT” +# PT+ - like P-T but suggesting one-hour advance over PST + +# From Chris Walton (2026-03-15): +# The Regional District of East Kootenay is planning to move to year-round +# Mountain Standard Time (MST) on November 1, 2026.... +# https://www.rdek.bc.ca/news/entry/rdek_board_moves_to_transition_to_year_round_mountain_standard_time +# (2026-03-17): +# The final decision East Kootenay made a few days ago may turn out not to +# be final after all. They are going to reopen the debate next month! +# https://www.cbc.ca/news/canada/british-columbia/what-time-is-it-in-the-east-kootenay-debate-9.7132624 +# From Paul Eggert (2026-03-17): +# Mayor Steve Fairbairn of Elkford asked the question be called a second time, +# saying, “Pardon the pun, but this is not a time-sensitive issue.” +# For now, merely mention the potential change in these comments. +# If it happens it would likely affect clocks starting 2027-03-14 at 02:00. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Vanc 1918 only - Apr 14 2:00 1:00 D Rule Vanc 1918 only - Oct 27 2:00 0 S @@ -1993,7 +2043,11 @@ Rule Vanc 1962 2006 - Oct lastSun 2:00 0 S # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone America/Vancouver -8:12:28 - LMT 1884 -8:00 Vanc P%sT 1987 - -8:00 Canada P%sT + -8:00 Canada P%sT 2026 Mar 9 + # Temporary hack; see above. + -8:00 1:00 PDT 2026 Nov 1 02:00 + # End of temporary hack. + -7:00 - MST Zone America/Dawson_Creek -8:00:56 - LMT 1884 -8:00 Canada P%sT 1947 -8:00 Vanc P%sT 1972 Aug 30 2:00 diff --git a/src/java.base/share/legal/cldr.md b/src/java.base/share/legal/cldr.md index 6e609f35302..7423d3492f5 100644 --- a/src/java.base/share/legal/cldr.md +++ b/src/java.base/share/legal/cldr.md @@ -1,4 +1,4 @@ -## Unicode Common Local Data Repository (CLDR) v48 +## Unicode Common Local Data Repository (CLDR) v48.2 ### CLDR License diff --git a/src/java.base/share/man/java.md b/src/java.base/share/man/java.md index 18d64b3a4c2..54f03218c3b 100644 --- a/src/java.base/share/man/java.md +++ b/src/java.base/share/man/java.md @@ -1800,6 +1800,35 @@ performed by the Java HotSpot VM. You can suppress this by specifying the `-XX:CompileCommand=quiet` option before other `-XX:CompileCommand` options. + Compilation levels can be specified in the `compileonly`, `exclude`, `print`, + and `break` commands using a bitmask as an optional value: + + ``` + -XX:CompileCommand=exclude,java/lang/String.indexOf,1011 + -XX:CompileCommand=compileonly,java/lang/String.indexOf,100 + -XX:CompileCommand=print,java/lang/String.indexOf,100 + -XX:CompileCommand=break,java/lang/StringBuffer.append,1000 + ``` + + The bitmask is calculated by summing the desired compilation level values: + + `1` + : C1 JIT compiler without profiling. + + `10` + : C1 JIT compiler with limited profiling. + + `100` + : C1 JIT compiler with full profiling. + + `1000` + : C2 JIT compiler: no profiling, full optimization. + + If the bitmask is not specified, all levels are assumed. + + Note: Excluding specific compilation levels may disrupt normal state transitions + between the levels, as the VM will not automatically work around the excluded ones. + [`-XX:CompileCommandFile=`]{#-XX_CompileCommandFile}*filename* : Sets the file from which JIT compiler commands are read. By default, the `.hotspot_compiler` file is used to store commands performed by the JIT @@ -2350,11 +2379,11 @@ Java HotSpot VM. option is disabled by default and can be enabled only with the `-XX:+UseG1GC` option. [`-XX:G1AdaptiveIHOPNumInitialSamples=`]{#-XX_G1AdaptiveIHOPNumInitialSamples}*number* -: When `-XX:UseAdaptiveIHOP` is enabled, this option sets the number of - completed marking cycles used to gather samples until G1 adaptively - determines the optimum value of `-XX:InitiatingHeapOccupancyPercent`. Before, - G1 uses the value of `-XX:InitiatingHeapOccupancyPercent` directly for - this purpose. The default value is 3. +: When `-XX:UseAdaptiveIHOP` is enabled, this option sets the number + of completed concurrent cycles used to gather samples until G1 + adaptively determines the optimum value of `-XX:G1IHOP`. Before, + G1 uses the value of `-XX:G1IHOP` directly for this purpose. The + default value is 3. [`-XX:G1HeapRegionSize=`]{#-XX_G1HeapRegionSize}*size* : Sets the size of the regions into which the Java heap is subdivided when @@ -2416,15 +2445,14 @@ Java HotSpot VM. > `-XX:G1ReservePercent=20` [`-XX:+G1UseAdaptiveIHOP`]{#-XX__G1UseAdaptiveIHOP} -: Controls adaptive calculation of the old generation occupancy to start - background work preparing for an old generation collection. If enabled, - G1 uses `-XX:InitiatingHeapOccupancyPercent` for the first few times as - specified by the value of `-XX:G1AdaptiveIHOPNumInitialSamples`, 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 - `-XX:InitiatingHeapOccupancyPercent`. +: Controls adaptive calculation of the old generation occupancy to + start background work preparing for an old generation collection. + If enabled, G1 uses `-XX:G1IHOP` for the first few times as + specified by the value of `-XX:G1AdaptiveIHOPNumInitialSamples`, + 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 `-XX:G1IHOP`. The default is enabled. @@ -2491,7 +2519,7 @@ Java HotSpot VM. > `-XX:InitialSurvivorRatio=4` -[`-XX:InitiatingHeapOccupancyPercent=`]{#-XX_InitiatingHeapOccupancyPercent}*percent* +[`-XX:G1IHOP=`]{#-XX_G1IHOP}*percent* : 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. @@ -2504,7 +2532,7 @@ Java HotSpot VM. The following example shows how to set the initiating heap occupancy to 75%: - > `-XX:InitiatingHeapOccupancyPercent=75` + > `-XX:G1IHOP=75` [`-XX:MaxGCPauseMillis=`]{#-XX_MaxGCPauseMillis}*time* : Sets a target for the maximum GC pause time (in milliseconds). This is a @@ -2938,12 +2966,6 @@ they're used. (`-XX:+UseParallelGC` or `-XX:+UseG1GC`). Other collectors employing multiple threads always perform reference processing in parallel. -[`-XX:+AggressiveHeap`]{#-XX__AggressiveHeap} -: 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. - ## Obsolete Java Options These `java` options are still accepted but ignored, and a warning is issued @@ -2976,6 +2998,12 @@ when they're used. -XX:{+|-}UseJVMCICompiler ``` +[`-XX:+AggressiveHeap`]{#-XX__AggressiveHeap} +: Enabled Java heap optimization. This set 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 + was disabled and the heap sizes configured less aggressively. + ## Removed Java Options No documented java options have been removed in JDK @@VERSION_SPECIFICATION@@. diff --git a/src/java.base/share/native/libjimage/imageFile.cpp b/src/java.base/share/native/libjimage/imageFile.cpp index e2479ba2c9e..b5e65da59bc 100644 --- a/src/java.base/share/native/libjimage/imageFile.cpp +++ b/src/java.base/share/native/libjimage/imageFile.cpp @@ -357,8 +357,8 @@ u4 ImageFileReader::find_location_index(const char* path, u8 *size) const { ImageLocation location(data); // Make sure result is not a false positive. if (verify_location(location, path)) { - *size = (jlong)location.get_attribute(ImageLocation::ATTRIBUTE_UNCOMPRESSED); - return offset; + *size = (jlong)location.get_attribute(ImageLocation::ATTRIBUTE_UNCOMPRESSED); + return offset; } } return 0; // not found @@ -389,7 +389,7 @@ bool ImageFileReader::verify_location(ImageLocation& location, const char* path) } // Get base name string. const char* base = location.get_attribute(ImageLocation::ATTRIBUTE_BASE, strings); - // Compare with basne name. + // Compare with base name. if (!(next = ImageStrings::starts_with(next, base))) return false; // Get extension string. const char* extension = location.get_attribute(ImageLocation::ATTRIBUTE_EXTENSION, strings); diff --git a/src/java.base/share/native/libjimage/imageFile.hpp b/src/java.base/share/native/libjimage/imageFile.hpp index a4c8d159efa..ccc0e0b1ad1 100644 --- a/src/java.base/share/native/libjimage/imageFile.hpp +++ b/src/java.base/share/native/libjimage/imageFile.hpp @@ -232,18 +232,34 @@ public: // class ImageLocation { public: + // See also src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java enum { ATTRIBUTE_END, // End of attribute stream marker ATTRIBUTE_MODULE, // String table offset of module name ATTRIBUTE_PARENT, // String table offset of resource path parent ATTRIBUTE_BASE, // String table offset of resource path base - ATTRIBUTE_EXTENSION, // String table offset of resource path extension + ATTRIBUTE_EXTENSION, // String table offset of resource path extension ATTRIBUTE_OFFSET, // Container byte offset of resource - ATTRIBUTE_COMPRESSED, // In image byte size of the compressed resource - ATTRIBUTE_UNCOMPRESSED, // In memory byte size of the uncompressed resource + ATTRIBUTE_COMPRESSED, // In-image byte size of the compressed resource + ATTRIBUTE_UNCOMPRESSED, // In-memory byte size of the uncompressed resource + ATTRIBUTE_PREVIEW_FLAGS, // Flags relating to preview mode resources. ATTRIBUTE_COUNT // Number of attribute kinds }; + // Flag masks for the ATTRIBUTE_PREVIEW_FLAGS attribute. Defined so + // that zero is the overwhelmingly common case for normal resources. + // See also src/java.base/share/classes/jdk/internal/jimage/ImageLocation.java + enum { + // Set on a "normal" (non-preview) location if a preview version of + // it exists in the same module. + FLAGS_HAS_PREVIEW_VERSION = 0x1, + // Set on all preview locations in "/modules/xxx/META-INF/preview/..." + FLAGS_IS_PREVIEW_VERSION = 0x2, + // Set on a preview location if no normal (non-preview) version of + // it exists in the same module. + FLAGS_IS_PREVIEW_ONLY = 0x4 + }; + private: // Values of inflated attributes. u8 _attributes[ATTRIBUTE_COUNT]; @@ -300,6 +316,11 @@ public: inline const char* get_attribute(u4 kind, const ImageStrings& strings) const { return strings.get((u4)get_attribute(kind)); } + + // Retrieve flags from the ATTRIBUTE_PREVIEW_FLAGS attribute. + inline u4 get_preview_flags() const { + return (u4) get_attribute(ATTRIBUTE_PREVIEW_FLAGS); + } }; // Image file header, starting at offset 0. @@ -391,6 +412,7 @@ public: // leads the ImageFileReader to be actually closed and discarded. class ImageFileReader { friend class ImageFileReaderTable; +friend class PackageFlags; private: // Manage a number of image files such that an image can be shared across // multiple uses (ex. loader.) @@ -430,7 +452,7 @@ public: // Image file major version number. MAJOR_VERSION = 1, // Image file minor version number. - MINOR_VERSION = 0 + MINOR_VERSION = 1 }; // Locate an image if file already open. diff --git a/src/java.base/share/native/libjimage/jimage.cpp b/src/java.base/share/native/libjimage/jimage.cpp index 91a86f992e6..d2830bd3f5c 100644 --- a/src/java.base/share/native/libjimage/jimage.cpp +++ b/src/java.base/share/native/libjimage/jimage.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2026, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -91,45 +91,106 @@ JIMAGE_Close(JImageFile* image) { * name, a version string and the name of a class/resource, return location * information describing the resource and its size. If no resource is found, the * function returns JIMAGE_NOT_FOUND and the value of size is undefined. - * The version number should be "9.0" and is not used in locating the resource. * The resulting location does/should not have to be released. * All strings are utf-8, zero byte terminated. * * Ex. * jlong size; * JImageLocationRef location = (*JImageFindResource)(image, - * "java.base", "9.0", "java/lang/String.class", &size); + * "java.base", "java/lang/String.class", is_preview_mode, &size); */ extern "C" JNIEXPORT JImageLocationRef JIMAGE_FindResource(JImageFile* image, - const char* module_name, const char* version, const char* name, + const char* module_name, const char* name, bool is_preview_mode, jlong* size) { - // Concatenate to get full path - char fullpath[IMAGE_MAX_PATH]; - size_t moduleNameLen = strlen(module_name); - size_t nameLen = strlen(name); - size_t index; + static const char str_modules[] = "modules"; + static const char str_packages[] = "packages"; + static const char preview_infix[] = "/META-INF/preview"; - assert(moduleNameLen > 0 && "module name must be non-empty"); - assert(nameLen > 0 && "name must non-empty"); + size_t module_name_len = strlen(module_name); + size_t name_len = strlen(name); + size_t preview_infix_len = strlen(preview_infix); + assert(module_name_len > 0 && "module name must be non-empty"); + assert(name_len > 0 && "name must non-empty"); - // If the concatenated string is too long for the buffer, return not found - if (1 + moduleNameLen + 1 + nameLen + 1 > IMAGE_MAX_PATH) { + // Do not attempt to lookup anything of the form /modules/... or /packages/... + if (strncmp(module_name, str_modules, sizeof(str_modules)) == 0 + || strncmp(module_name, str_packages, sizeof(str_packages)) == 0) { + return 0L; + } + // If the preview mode version of the path string is too long for the buffer, + // return not found (even when not in preview mode). + if (1 + module_name_len + preview_infix_len + 1 + name_len + 1 > IMAGE_MAX_PATH) { return 0L; } - index = 0; - fullpath[index++] = '/'; - memcpy(&fullpath[index], module_name, moduleNameLen); - index += moduleNameLen; - fullpath[index++] = '/'; - memcpy(&fullpath[index], name, nameLen); - index += nameLen; - fullpath[index++] = '\0'; + // Concatenate to get full path + char name_buffer[IMAGE_MAX_PATH]; + char* path; + { // Write the buffer with room to prepend the preview mode infix + // at the start (saves copying the trailing name part twice). + size_t index = preview_infix_len; + name_buffer[index++] = '/'; + memcpy(&name_buffer[index], module_name, module_name_len); + index += module_name_len; + name_buffer[index++] = '/'; + memcpy(&name_buffer[index], name, name_len); + index += name_len; + name_buffer[index++] = '\0'; + // Path begins at the leading '/' (not the start of the buffer). + path = &name_buffer[preview_infix_len]; + } - JImageLocationRef loc = - (JImageLocationRef) ((ImageFileReader*) image)->find_location_index(fullpath, (u8*) size); - return loc; + // find_location_index() returns the data "offset", not an index. + const ImageFileReader* image_file = (ImageFileReader*) image; + u4 locOffset = image_file->find_location_index(path, (u8*) size); + if (locOffset != 0) { + ImageLocation loc; + loc.set_data(image_file->get_location_offset_data(locOffset)); + + u4 flags = loc.get_preview_flags(); + // No preview flags means "a normal resource, without a preview version". + // This is the overwhelmingly common case, with or without preview mode. + if (flags == 0) { + return locOffset; + } + // Regardless of preview mode, don't return resources requested directly + // via their preview path. + if ((flags & ImageLocation::FLAGS_IS_PREVIEW_VERSION) != 0) { + return 0L; + } + // Even if there is a preview version, we might not want to return it. + if (!is_preview_mode || (flags & ImageLocation::FLAGS_HAS_PREVIEW_VERSION) == 0) { + return locOffset; + } + } else if (!is_preview_mode) { + // No normal resource found, and not in preview mode. + return 0L; + } + + // We are in preview mode, and the preview version of the resource is needed. + // This is either because: + // 1. The normal resource was flagged as having a preview version (rare) + // 2. This is a preview-only resource (there was no normal resource, very rare) + // 3. The requested resource doesn't exist (this should typically not happen) + // + // Since we only expect requests for resources which exist in jimage files, we + // expect this 2nd lookup to succeed (this is contrary to the expectations for + // the JRT file system, where non-existent resource lookups are common). + + { // Rewrite the front of the name buffer to make it a preview path. + size_t index = 0; + name_buffer[index++] = '/'; + memcpy(&name_buffer[index], module_name, module_name_len); + index += module_name_len; + memcpy(&name_buffer[index], preview_infix, preview_infix_len); + index += preview_infix_len; + // Check we copied up to the expected '/' separator. + assert(name_buffer[index] == '/' && "bad string concatenation"); + // The preview path now begins at the start of the buffer. + path = &name_buffer[0]; + } + return image_file->find_location_index(path, (u8*) size); } /* diff --git a/src/java.base/share/native/libjimage/jimage.hpp b/src/java.base/share/native/libjimage/jimage.hpp index a514e737b49..c340b8b7c18 100644 --- a/src/java.base/share/native/libjimage/jimage.hpp +++ b/src/java.base/share/native/libjimage/jimage.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2026, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -98,21 +98,20 @@ typedef void (*JImageClose_t)(JImageFile* jimage); * name, a version string and the name of a class/resource, return location * information describing the resource and its size. If no resource is found, the * function returns JIMAGE_NOT_FOUND and the value of size is undefined. - * The version number should be "9.0" and is not used in locating the resource. * The resulting location does/should not have to be released. * All strings are utf-8, zero byte terminated. * * Ex. * jlong size; * JImageLocationRef location = (*JImageFindResource)(image, - * "java.base", "9.0", "java/lang/String.class", &size); + * "java.base", "java/lang/String.class", is_preview_mode, &size); */ extern "C" JNIEXPORT JImageLocationRef JIMAGE_FindResource(JImageFile* jimage, - const char* module_name, const char* version, const char* name, + const char* module_name, const char* name, bool is_preview_mode, jlong* size); typedef JImageLocationRef(*JImageFindResource_t)(JImageFile* jimage, - const char* module_name, const char* version, const char* name, + const char* module_name, const char* name, bool is_preview_mode, jlong* size); diff --git a/src/java.base/share/native/libjli/java.c b/src/java.base/share/native/libjli/java.c index 4621ab588d1..4c3b503b08a 100644 --- a/src/java.base/share/native/libjli/java.c +++ b/src/java.base/share/native/libjli/java.c @@ -1058,7 +1058,7 @@ static void SetMainModule(const char *s) { static const char format[] = "-Djdk.module.main=%s"; - char* slash = JLI_StrChr(s, '/'); + const char* slash = JLI_StrChr(s, '/'); size_t s_len, def_len; char *def; @@ -1303,21 +1303,9 @@ ParseArguments(int *pargc, char ***pargv, AddOption("-verbose:gc", NULL); } else if (JLI_StrCmp(arg, "-debug") == 0) { JLI_ReportErrorMessage(ARG_DEPRECATED, "-debug"); - } else if (JLI_StrCmp(arg, "-noclassgc") == 0) { - JLI_ReportErrorMessage(ARG_DEPRECATED, "-noclassgc"); - AddOption("-Xnoclassgc", NULL); } else if (JLI_StrCmp(arg, "-verify") == 0) { JLI_ReportErrorMessage(ARG_DEPRECATED, "-verify"); AddOption("-Xverify:all", NULL); - } else if (JLI_StrCmp(arg, "-verifyremote") == 0) { - JLI_ReportErrorMessage(ARG_DEPRECATED, "-verifyremote"); - AddOption("-Xverify:remote", NULL); - } else if (JLI_StrCmp(arg, "-noverify") == 0) { - /* - * Note that no 'deprecated' message is needed here because the VM - * issues 'deprecated' messages for -noverify and -Xverify:none. - */ - AddOption("-Xverify:none", NULL); } else if (JLI_StrCCmp(arg, "-ss") == 0 || JLI_StrCCmp(arg, "-ms") == 0 || JLI_StrCCmp(arg, "-mx") == 0) { diff --git a/src/java.base/share/native/libjli/jli_util.c b/src/java.base/share/native/libjli/jli_util.c index 3b24a784491..51c2d8b8573 100644 --- a/src/java.base/share/native/libjli/jli_util.c +++ b/src/java.base/share/native/libjli/jli_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -87,7 +87,7 @@ JLI_MemFree(void *ptr) jboolean JLI_HasSuffix(const char *s1, const char *s2) { - char *p = JLI_StrRChr(s1, '.'); + const char* p = JLI_StrRChr(s1, '.'); if (p == NULL || *p == '\0') { return JNI_FALSE; } diff --git a/src/java.base/share/native/libverify/check_code.c b/src/java.base/share/native/libverify/check_code.c index 4830fedb97b..e6aebead212 100644 --- a/src/java.base/share/native/libverify/check_code.c +++ b/src/java.base/share/native/libverify/check_code.c @@ -3831,7 +3831,7 @@ signature_to_fieldtype(context_type *context, case JVM_SIGNATURE_CLASS: { char buffer_space[256]; char *buffer = buffer_space; - char *finish = strchr(p, JVM_SIGNATURE_ENDCLASS); + const char* finish = strchr(p, JVM_SIGNATURE_ENDCLASS); int length; if (finish == NULL) { /* Signature must have ';' after the class name. diff --git a/src/java.base/share/native/libzip/zip_util.c b/src/java.base/share/native/libzip/zip_util.c index 3ad148b0be5..96d3050f527 100644 --- a/src/java.base/share/native/libzip/zip_util.c +++ b/src/java.base/share/native/libzip/zip_util.c @@ -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 @@ static jlong 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; @@ -604,7 +604,16 @@ readCEN(jzfile *zip, jint knownTotal) 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; #ifdef USE_MMAP endhdrlen = ZIP64_ENDHDR; @@ -1137,20 +1146,8 @@ ZIP_FreeEntry(jzfile *jz, jzentry *ze) } } -/* - * 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; } @@ -1162,16 +1159,12 @@ jboolean equals(char* name1, int len1, char* name2, int len2) { 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; @@ -1182,79 +1175,47 @@ ZIP_GetEntry2(jzfile *zip, char *name, jint ulen, jboolean addSlash) idx = zip->table[hsh % zip->tablelen]; - /* - * 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. - */ - while(1) { - - /* 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; - } - 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; - } - - /* Add slash and try once more */ - name[ulen++] = '/'; - name[ulen] = '\0'; - hsh = hash_append(hsh, '/'); - idx = zip->table[hsh % zip->tablelen]; - addSlash = JNI_FALSE; + /* 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; + /* + * 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, name_len)) { + 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; + } + idx = zc->next; + } Finally: ZIP_Unlock(zip); return ze; @@ -1466,9 +1427,9 @@ InflateFully(jzfile *zip, jzentry *entry, void *buf, char **msg) * 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 --git a/src/java.base/share/native/libzip/zip_util.h b/src/java.base/share/native/libzip/zip_util.h index 9825202fc7b..8cfe0b261f5 100644 --- a/src/java.base/share/native/libzip/zip_util.h +++ b/src/java.base/share/native/libzip/zip_util.h @@ -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 @@ typedef struct jzfile { /* Zip file */ */ #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 @@ ZIP_Put_In_Cache0(const char *name, ZFILE zfd, char **pmsg, jlong lastModified, 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 @@ ZIP_Read(jzfile *zip, jzentry *entry, jlong pos, void *buf, jint len); 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 --git a/src/java.base/unix/native/libjava/TimeZone_md.c b/src/java.base/unix/native/libjava/TimeZone_md.c index cd253edde60..2f163cf27f1 100644 --- a/src/java.base/unix/native/libjava/TimeZone_md.c +++ b/src/java.base/unix/native/libjava/TimeZone_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -95,7 +95,7 @@ getZoneName(char *str) { static const char *zidir = "zoneinfo/"; - char *pos = strstr((const char *)str, zidir); + char* pos = strstr(str, zidir); if (pos == NULL) { return NULL; } diff --git a/src/java.base/unix/native/libnet/NetworkInterface.c b/src/java.base/unix/native/libnet/NetworkInterface.c index f5025b9f488..5ed99f256d8 100644 --- a/src/java.base/unix/native/libnet/NetworkInterface.c +++ b/src/java.base/unix/native/libnet/NetworkInterface.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -205,7 +205,7 @@ JNIEXPORT jobject JNICALL Java_java_net_NetworkInterface_getByName0 netif *ifs, *curr; jboolean isCopy; const char* name_utf; - char *colonP; + const char* colonP; jobject obj = NULL; if (name != NULL) { diff --git a/src/java.base/unix/native/libnio/ch/Net.c b/src/java.base/unix/native/libnio/ch/Net.c index 28c1814f422..2b281f9a204 100644 --- a/src/java.base/unix/native/libnio/ch/Net.c +++ b/src/java.base/unix/native/libnio/ch/Net.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -929,13 +929,13 @@ Java_sun_nio_ch_Net_pollConnect(JNIEnv *env, jobject this, jobject fdo, jlong ti errno = 0; result = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &n); if (result < 0) { - handleSocketError(env, errno); + handleSocketErrorWithMessage(env, errno, "getsockopt failed"); return JNI_FALSE; } else if (error) { - handleSocketError(env, error); + handleSocketErrorWithMessage(env, error, "connect failed"); return JNI_FALSE; } else if ((poller.revents & POLLHUP) != 0) { - handleSocketError(env, ENOTCONN); + handleSocketErrorWithMessage(env, ENOTCONN, "peer closed connection after accepting"); return JNI_FALSE; } // connected diff --git a/src/java.base/windows/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java b/src/java.base/windows/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java index 5aa8431d859..b19516f5db7 100644 --- a/src/java.base/windows/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java +++ b/src/java.base/windows/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java @@ -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 @@ -25,6 +25,9 @@ package sun.util.locale.provider; import java.lang.ref.SoftReference; +import java.time.DateTimeException; +import java.time.format.DateTimeFormatterPatternProvider; +import java.time.format.FormatStyle; import java.text.DateFormat; import java.text.DateFormatSymbols; import java.text.DecimalFormat; @@ -52,7 +55,6 @@ import java.util.spi.CalendarDataProvider; import java.util.spi.CalendarNameProvider; import java.util.spi.CurrencyNameProvider; import java.util.spi.LocaleNameProvider; -import sun.text.spi.JavaTimeDateTimePatternProvider; import sun.util.spi.CalendarProvider; /** @@ -544,8 +546,8 @@ public class HostLocaleProviderAdapterImpl { }; } - public static JavaTimeDateTimePatternProvider getJavaTimeDateTimePatternProvider() { - return new JavaTimeDateTimePatternProvider() { + public static DateTimeFormatterPatternProvider getDateTimeFormatterPatternProvider() { + return new DateTimeFormatterPatternProvider() { @Override public Locale[] getAvailableLocales() { return getSupportedCalendarLocales(); @@ -557,12 +559,19 @@ public class HostLocaleProviderAdapterImpl { } @Override - public String getJavaTimeDateTimePattern(int timeStyle, int dateStyle, String calType, Locale locale) { + public String getDateTimeFormatterPattern(FormatStyle dateStyle, FormatStyle timeStyle, String calType, Locale locale) { AtomicReferenceArray patterns = getDateTimePatterns(locale); - String datePattern = dateStyle != - 1 ? patterns.get(dateStyle / 2) : ""; - String timePattern = timeStyle != - 1 ? patterns.get(timeStyle / 2 + 2) : ""; - String delim = dateStyle != -1 && timeStyle != - 1 ? " " : ""; - return toJavaTimeDateTimePattern(calType, datePattern + delim + timePattern); + String datePattern = dateStyle != null ? patterns.get(dateStyle.ordinal() / 2) : ""; + String timePattern = timeStyle != null ? patterns.get(timeStyle.ordinal() / 2 + 2) : ""; + String delim = dateStyle != null && timeStyle != null ? " " : ""; + return toDateTimeFormatterPattern(calType, datePattern + delim + timePattern); + } + + @Override + public String getDateTimeFormatterPattern(String requestedTemplate, String calType, Locale locale) { + throw new DateTimeException(""" + Formatting pattern is not available for the requested template: "%s", calType: "%s", locale: "%s". + """.formatted(requestedTemplate, calType, locale)); } private AtomicReferenceArray getDateTimePatterns(Locale locale) { @@ -589,7 +598,7 @@ public class HostLocaleProviderAdapterImpl { * This method will convert JRE Date/time Pattern String to JSR310 * type Date/Time Pattern */ - private String toJavaTimeDateTimePattern(String calendarType, String jrePattern) { + private String toDateTimeFormatterPattern(String calendarType, String jrePattern) { int length = jrePattern.length(); StringBuilder sb = new StringBuilder(length); boolean inQuote = false; diff --git a/src/java.base/windows/native/libnet/NTLMAuthSequence.c b/src/java.base/windows/native/libnet/NTLMAuthSequence.c index 0da2675b886..214df84ccb8 100644 --- a/src/java.base/windows/native/libnet/NTLMAuthSequence.c +++ b/src/java.base/windows/native/libnet/NTLMAuthSequence.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -231,7 +231,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequenc if (ss < 0) { SetLastError(ss); - JNU_ThrowIOExceptionWithLastError(env, "InitializeSecurityContext"); + JNU_ThrowIOExceptionWithMessageAndLastError(env, "InitializeSecurityContext"); endSequence (pCred, pCtx, env, status); return 0; } @@ -241,7 +241,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequenc if (ss < 0) { SetLastError(ss); - JNU_ThrowIOExceptionWithLastError(env, "CompleteAuthToken"); + JNU_ThrowIOExceptionWithMessageAndLastError(env, "CompleteAuthToken"); endSequence (pCred, pCtx, env, status); return 0; } diff --git a/src/java.desktop/macosx/classes/sun/java2d/metal/MTLGraphicsConfig.java b/src/java.desktop/macosx/classes/sun/java2d/metal/MTLGraphicsConfig.java index 641cb93714c..b2d4e267754 100644 --- a/src/java.desktop/macosx/classes/sun/java2d/metal/MTLGraphicsConfig.java +++ b/src/java.desktop/macosx/classes/sun/java2d/metal/MTLGraphicsConfig.java @@ -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 @@ -51,6 +51,7 @@ import java.awt.Image; import java.awt.ImageCapabilities; import java.awt.Rectangle; import java.awt.Transparency; +import java.awt.Window; import java.awt.color.ColorSpace; import java.awt.image.BufferedImage; @@ -236,7 +237,11 @@ public final class MTLGraphicsConfig extends CGraphicsConfig public Image createAcceleratedImage(Component target, int width, int height) { - ColorModel model = getColorModel(Transparency.OPAQUE); + int transparency = Transparency.OPAQUE; + if (target instanceof Window window && !window.isOpaque()) { + transparency = Transparency.TRANSLUCENT; + } + ColorModel model = getColorModel(transparency); WritableRaster wr = model.createCompatibleWritableRaster(width, height); return new OffScreenImage(target, model, wr, model.isAlphaPremultiplied()); diff --git a/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java b/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java index b3dfbc1ba3c..2cf0d23bd70 100644 --- a/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java +++ b/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java @@ -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 @@ -34,6 +34,7 @@ import java.awt.Image; import java.awt.ImageCapabilities; import java.awt.Rectangle; import java.awt.Transparency; +import java.awt.Window; import java.awt.color.ColorSpace; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; @@ -255,7 +256,11 @@ public final class CGLGraphicsConfig extends CGraphicsConfig public Image createAcceleratedImage(Component target, int width, int height) { - ColorModel model = getColorModel(Transparency.OPAQUE); + int transparency = Transparency.OPAQUE; + if (target instanceof Window window && !window.isOpaque()) { + transparency = Transparency.TRANSLUCENT; + } + ColorModel model = getColorModel(transparency); WritableRaster wr = model.createCompatibleWritableRaster(width, height); return new OffScreenImage(target, model, wr, model.isAlphaPremultiplied()); diff --git a/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java b/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java index e2f26201919..001a44ebf8a 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java @@ -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 @@ -45,7 +45,7 @@ import javax.swing.JScrollBar; import javax.swing.JScrollPane; import javax.swing.JViewport; import javax.swing.ListCellRenderer; -import javax.swing.ListSelectionModel; +import javax.swing.ListModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; @@ -53,6 +53,9 @@ import static java.awt.event.ItemEvent.DESELECTED; import static java.awt.event.ItemEvent.ITEM_STATE_CHANGED; import static java.awt.event.ItemEvent.SELECTED; +import static javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION; +import static javax.swing.ListSelectionModel.SINGLE_SELECTION; + /** * Lightweight implementation of {@link ListPeer}. Delegates most of the work to * the {@link JList}, which is placed inside {@link JScrollPane}. @@ -157,11 +160,14 @@ final class LWListPeer extends LWComponentPeer @Override public void select(final int index) { synchronized (getDelegateLock()) { - getDelegate().setSkipStateChangedEvent(true); - try { - getDelegate().getView().setSelectedIndex(index); - } finally { - getDelegate().setSkipStateChangedEvent(false); + ListModel model = getDelegate().getModel(); + if (index >= 0 && index < model.getSize()) { + getDelegate().setSkipStateChangedEvent(true); + try { + getDelegate().getView().addSelectionInterval(index, index); + } finally { + getDelegate().setSkipStateChangedEvent(false); + } } } } @@ -188,9 +194,23 @@ final class LWListPeer extends LWComponentPeer @Override public void setMultipleMode(final boolean m) { synchronized (getDelegateLock()) { - getDelegate().getView().setSelectionMode(m ? - ListSelectionModel.MULTIPLE_INTERVAL_SELECTION - : ListSelectionModel.SINGLE_SELECTION); + JList view = getDelegate().getView(); + int newMode = m ? MULTIPLE_INTERVAL_SELECTION : SINGLE_SELECTION; + if (view.getSelectionMode() == newMode) { + return; + } + int lead = view.getLeadSelectionIndex(); + boolean wasSelected = lead != -1 && view.isSelectedIndex(lead); + getDelegate().setSkipStateChangedEvent(true); + try { + view.clearSelection(); + view.setSelectionMode(newMode); + if (wasSelected) { + view.setSelectedIndex(lead); + } + } finally { + getDelegate().setSkipStateChangedEvent(false); + } } } diff --git a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CFileDialog.java b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CFileDialog.java index 3f33f748154..b73088f2dce 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CFileDialog.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CFileDialog.java @@ -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 @@ -109,7 +109,10 @@ final class CFileDialog implements FileDialogPeer { accessor.setFiles(target, files); } finally { // Java2 Dialog waits for hide to let show() return - target.dispose(); + AWTAccessor.FileDialogAccessor accessor = AWTAccessor.getFileDialogAccessor(); + if (!accessor.isBeingDisposed(target)) { + target.dispose(); + } } } } @@ -121,12 +124,15 @@ final class CFileDialog implements FileDialogPeer { this.target = target; } + private volatile long nativeCFileDialogPtr; + private volatile long nativeWindowID; + + private native void nativeDispose(); + @Override public void dispose() { LWCToolkit.targetDisposedPeer(target, this); - // Unlike other peers, we do not have a native model pointer to - // dispose of because the save and open panels are never released by - // an application. + setVisible(false); } @Override @@ -135,9 +141,13 @@ final class CFileDialog implements FileDialogPeer { // Java2 Dialog class requires peer to run code in a separate thread // and handles keeping the call modal new Thread(null, new Task(), "FileDialog", 0, false).start(); + } else { + // This call doesn't directly dispose the dialog, but if it is being + // displayed it stops the modal loop which hides it and returns control + if ((nativeCFileDialogPtr != 0L) && (nativeWindowID != 0L)) { + nativeDispose(); + } } - // We hide ourself before "show" returns - setVisible(false) - // doesn't apply } /** diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.h b/src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.h index 677c9715679..0ce37d0130d 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.h +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, 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 @@ -42,6 +42,9 @@ NSString *fDirectory; NSString *fFile; + @public + BOOL inModalLoop; + // File dialog's mode jint fMode; diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.m index 3b895be8094..ad93ae2f897 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018, 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 @@ -60,6 +60,7 @@ canChooseDirectories:(BOOL)inChooseDirectories fNavigateApps = inNavigateApps; fChooseDirectories = inChooseDirectories; fPanelResult = NSCancelButton; + inModalLoop = NO; } return self; @@ -107,6 +108,11 @@ canChooseDirectories:(BOOL)inChooseDirectories thePanel = [NSOpenPanel openPanel]; } + JNIEnv *env = [ThreadUtilities getJNIEnv]; + DECLARE_CLASS(jc_CFileDialog, "sun/lwawt/macosx/CFileDialog"); + DECLARE_FIELD(jc_windowID, jc_CFileDialog, "nativeWindowID", "J"); + (*env)->SetLongField(env, fFileDialog, jc_windowID, ptr_to_jlong(thePanel)); + if (thePanel != nil) { [thePanel setTitle:fTitle]; @@ -123,7 +129,9 @@ canChooseDirectories:(BOOL)inChooseDirectories } [thePanel setDelegate:self]; + inModalLoop = YES; fPanelResult = [thePanel runModalForDirectory:fDirectory file:fFile]; + inModalLoop = NO; [thePanel setDelegate:nil]; if ([self userClickedOK]) { @@ -137,6 +145,7 @@ canChooseDirectories:(BOOL)inChooseDirectories } } + (*env)->SetLongField(env, fFileDialog, jc_windowID, ptr_to_jlong(0L)); [self disposer]; } @@ -183,6 +192,36 @@ canChooseDirectories:(BOOL)inChooseDirectories } @end +JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CFileDialog_nativeDispose(JNIEnv *env, jobject peer) { + + DECLARE_CLASS(jc_CFileDialog, "sun/lwawt/macosx/CFileDialog"); + + DECLARE_FIELD(jc_nativePtr, jc_CFileDialog, "nativeCFileDialogPtr", "J"); + CFileDialog *dialogDelegate = (CFileDialog*)jlong_to_ptr((*env)->GetLongField(env, peer, jc_nativePtr)); + + if (dialogDelegate == nil) { + return; + } + + DECLARE_FIELD(jc_windowID, jc_CFileDialog, "nativeWindowID", "J"); + NSWindow *windowID = (NSWindow*)jlong_to_ptr((*env)->GetLongField(env, peer, jc_windowID)); + if (windowID == nil) { + return; + } + + [dialogDelegate retain]; + [ThreadUtilities performOnMainThreadWaiting:[NSThread isMainThread] block:^(){ + if (dialogDelegate->inModalLoop == YES) { + NSApplication *app = [NSApplication sharedApplication]; + NSWindow *modalWindow = [app modalWindow]; + if (modalWindow != nil && (modalWindow == windowID)) { + [app stopModalWithCode:NSModalResponseCancel]; + } + } + }]; + [dialogDelegate release]; + } + /* * Class: sun_lwawt_macosx_CFileDialog * Method: nativeRunFileDialog @@ -214,6 +253,11 @@ JNI_COCOA_ENTER(env); canChooseDirectories:chooseDirectories withEnv:env]; + DECLARE_CLASS_RETURN(jc_CFileDialog, "sun/lwawt/macosx/CFileDialog", NULL); + + DECLARE_FIELD_RETURN(jc_nativePtr, jc_CFileDialog, "nativeCFileDialogPtr", "J", NULL); + (*env)->SetLongField(env, peer, jc_nativePtr, ptr_to_jlong(dialogDelegate)); + [ThreadUtilities performOnMainThread:@selector(safeSaveOrLoad) on:dialogDelegate withObject:nil @@ -233,6 +277,7 @@ JNI_COCOA_ENTER(env); }]; } + (*env)->SetLongField(env, peer, jc_nativePtr, ptr_to_jlong(0L)); [dialogDelegate release]; JNI_COCOA_EXIT(env); return returnValue; diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaAccessibilityUtilities.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaAccessibilityUtilities.m index fcd330940cc..c35122cb331 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaAccessibilityUtilities.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaAccessibilityUtilities.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018, 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 @@ -99,9 +99,10 @@ jobject getAxContextSelection(JNIEnv *env, jobject axContext, jint index, jobjec GET_CACCESSIBILITY_CLASS_RETURN(nil); DECLARE_STATIC_METHOD_RETURN(jm_ax_getAccessibleSelection, sjc_CAccessibility, "ax_getAccessibleSelection", "(Ljavax/accessibility/AccessibleContext;ILjava/awt/Component;)Ljavax/accessibility/Accessible;", nil); - return (*env)->CallStaticObjectMethod(env, sjc_CAccessibility, jm_ax_getAccessibleSelection, + jobject o = (*env)->CallStaticObjectMethod(env, sjc_CAccessibility, jm_ax_getAccessibleSelection, axContext, index, component); CHECK_EXCEPTION(); + return o; } void setAxContextSelection(JNIEnv *env, jobject axContext, jint index, jobject component) diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m index 45e8f981f50..b9f9f0fa403 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m @@ -619,6 +619,13 @@ static jobject sAccessibilityClass = NULL; if (nsActionName != nil) { [fActions setObject:action forKey:nsActionName]; [fActionSelectors addObject:[sActionSelectors objectForKey:nsActionName]]; + } else if (count == 1) { + // If no mapping exists and it's the sole action, default + // to "press" (click). In JButtons where the language is + // not English the accessible action description we receive + // is localized, so we can't assume it's "click" + [fActions setObject:action forKey:NSAccessibilityPressAction]; + [fActionSelectors addObject:[sActionSelectors objectForKey:NSAccessibilityPressAction]]; } } [action release]; @@ -1190,13 +1197,24 @@ static jobject sAccessibilityClass = NULL; JNIEnv* env = [ThreadUtilities getJNIEnv]; GET_CACCESSIBILITY_CLASS_RETURN(FALSE); - DECLARE_STATIC_METHOD_RETURN(jm_doAccessibleAction, sjc_CAccessibility, "doAccessibleAction", - "(Ljavax/accessibility/AccessibleAction;ILjava/awt/Component;)V", FALSE); - (*env)->CallStaticVoidMethod(env, sjc_CAccessibility, jm_doAccessibleAction, - [self axContextWithEnv:(env)], index, fComponent); + DECLARE_STATIC_METHOD_RETURN(jm_getAccessibleAction, sjc_CAccessibility, "getAccessibleAction", + "(Ljavax/accessibility/Accessible;Ljava/awt/Component;)Ljavax/accessibility/AccessibleAction;", FALSE); + + jobject axAction = (*env)->CallStaticObjectMethod(env, sjc_CAccessibility, jm_getAccessibleAction, fAccessible, fComponent); CHECK_EXCEPTION(); - return TRUE; + if (axAction != NULL) { + DECLARE_STATIC_METHOD_RETURN(jm_doAccessibleAction, sjc_CAccessibility, "doAccessibleAction", + "(Ljavax/accessibility/AccessibleAction;ILjava/awt/Component;)V", FALSE); + (*env)->CallStaticVoidMethod(env, sjc_CAccessibility, jm_doAccessibleAction, + axAction, index, fComponent); + CHECK_EXCEPTION(); + + (*env)->DeleteLocalRef(env, axAction); + return TRUE; + } else { + return FALSE; + } } // NSAccessibilityActions methods diff --git a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m index 3ffa887388e..d6edd56a5ab 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m @@ -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 @@ -48,6 +48,19 @@ jint mtlPreviousOp = MTL_OP_INIT; extern void MTLGC_DestroyMTLGraphicsConfig(jlong pConfigInfo); +/** + * Triggers the display link for the current destination surface. + */ +static void MTLSD_Flush() { + if (dstOps != NULL) { + MTLSDOps *dstMTLOps = (MTLSDOps *)dstOps->privOps; + MTLLayer *layer = (MTLLayer*)dstMTLOps->layer; + if (layer != NULL) { + [layer startDisplayLink]; + } + } +} + void MTLRenderQueue_CheckPreviousOp(jint op) { if (mtlPreviousOp == op) { @@ -589,6 +602,7 @@ Java_sun_java2d_metal_MTLRenderQueue_flushBuffer [cbwrapper release]; }]; [commandbuf commit]; + MTLSD_Flush(); } mtlc = [MTLContext setSurfacesEnv:env src:pSrc dst:pDst]; dstOps = (BMTLSDOps *)jlong_to_ptr(pDst); @@ -616,6 +630,7 @@ Java_sun_java2d_metal_MTLRenderQueue_flushBuffer [cbwrapper release]; }]; [commandbuf commit]; + MTLSD_Flush(); } mtlc = newMtlc; dstOps = NULL; @@ -886,14 +901,7 @@ Java_sun_java2d_metal_MTLRenderQueue_flushBuffer [cbwrapper release]; }]; [commandbuf commit]; - BMTLSDOps *dstOps = MTLRenderQueue_GetCurrentDestination(); - if (dstOps != NULL) { - MTLSDOps *dstMTLOps = (MTLSDOps *)dstOps->privOps; - MTLLayer *layer = (MTLLayer*)dstMTLOps->layer; - if (layer != NULL) { - [layer startDisplayLink]; - } - } + MTLSD_Flush(); } RESET_PREVIOUS_OP(); } diff --git a/src/java.desktop/share/classes/com/sun/imageio/stream/StreamCloser.java b/src/java.desktop/share/classes/com/sun/imageio/stream/StreamCloser.java index 7de400ad199..29aaed7d9e3 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/stream/StreamCloser.java +++ b/src/java.desktop/share/classes/com/sun/imageio/stream/StreamCloser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -48,7 +48,6 @@ public class StreamCloser { private static WeakHashMap toCloseQueue; private static Thread streamCloser; - @SuppressWarnings("removal") public static void addToQueue(CloseAction ca) { synchronized (StreamCloser.class) { if (toCloseQueue == null) { diff --git a/src/java.desktop/share/classes/java/awt/Component.java b/src/java.desktop/share/classes/java/awt/Component.java index 7f021dcdb85..21358efa3f3 100644 --- a/src/java.desktop/share/classes/java/awt/Component.java +++ b/src/java.desktop/share/classes/java/awt/Component.java @@ -4000,7 +4000,6 @@ public abstract class Component implements ImageObserver, MenuContainer, * {@code true}. * @see #createBuffers(int, BufferCapabilities) */ - @SuppressWarnings("removal") protected FlipBufferStrategy(int numBuffers, BufferCapabilities caps) throws AWTException { @@ -8129,7 +8128,6 @@ public abstract class Component implements ImageObserver, MenuContainer, return res; } - @SuppressWarnings("removal") final Component getNextFocusCandidate() { Container rootAncestor = getTraversalRoot(); Component comp = this; diff --git a/src/java.desktop/share/classes/java/awt/Container.java b/src/java.desktop/share/classes/java/awt/Container.java index 683c24f9d13..0ba87eac12e 100644 --- a/src/java.desktop/share/classes/java/awt/Container.java +++ b/src/java.desktop/share/classes/java/awt/Container.java @@ -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 @@ -61,7 +61,6 @@ import javax.accessibility.AccessibleContext; import sun.awt.AWTAccessor; import sun.awt.AWTAccessor.MouseEventAccessor; -import sun.awt.AppContext; import sun.awt.PeerEvent; import sun.awt.SunToolkit; import sun.awt.dnd.SunDropTargetEvent; @@ -2875,13 +2874,8 @@ public class Container extends Component { */ transient Component modalComp; - transient AppContext modalAppContext; private void startLWModal() { - // Store the app context on which this component is being shown. - // Event dispatch thread of this app context will be sleeping until - // we wake it by any event from hideAndDisposeHandler(). - modalAppContext = AppContext.getAppContext(); // keep the KeyEvents from being dispatched // until the focus has been transferred @@ -2946,25 +2940,22 @@ public class Container extends Component { private void stopLWModal() { synchronized (getTreeLock()) { - if (modalAppContext != null) { - Container nativeContainer = getHeavyweightContainer(); - if(nativeContainer != null) { - if (this.modalComp != null) { - nativeContainer.modalComp = this.modalComp; - this.modalComp = null; - return; - } - else { - nativeContainer.modalComp = null; - } + Container nativeContainer = getHeavyweightContainer(); + if (nativeContainer != null) { + if (this.modalComp != null) { + nativeContainer.modalComp = this.modalComp; + this.modalComp = null; + return; + } + else { + nativeContainer.modalComp = null; } - // Wake up event dispatch thread on which the dialog was - // initially shown - SunToolkit.postEvent(modalAppContext, - new PeerEvent(this, - new WakingRunnable(), - PeerEvent.PRIORITY_EVENT)); } + // Wake up event dispatch thread on which the dialog was + // initially shown + SunToolkit.postEvent(new PeerEvent(this, + new WakingRunnable(), + PeerEvent.PRIORITY_EVENT)); EventQueue.invokeLater(new WakingRunnable()); getTreeLock().notifyAll(); } @@ -4797,34 +4788,12 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener { // translate coordinates to this native container final Point ptSrcOrigin = srcComponent.getLocationOnScreen(); - if (AppContext.getAppContext() != nativeContainer.appContext) { - final MouseEvent mouseEvent = me; - Runnable r = new Runnable() { - public void run() { - if (!nativeContainer.isShowing() ) { - return; - } - - Point ptDstOrigin = nativeContainer.getLocationOnScreen(); - mouseEvent.translatePoint(ptSrcOrigin.x - ptDstOrigin.x, - ptSrcOrigin.y - ptDstOrigin.y ); - Component targetOver = - nativeContainer.getMouseEventTarget(mouseEvent.getX(), - mouseEvent.getY(), - Container.INCLUDE_SELF); - trackMouseEnterExit(targetOver, mouseEvent); - } - }; - SunToolkit.executeOnEventHandlerThread(nativeContainer, r); + if (!nativeContainer.isShowing()) { return; - } else { - if (!nativeContainer.isShowing() ) { - return; - } - - Point ptDstOrigin = nativeContainer.getLocationOnScreen(); - me.translatePoint( ptSrcOrigin.x - ptDstOrigin.x, ptSrcOrigin.y - ptDstOrigin.y ); } + + Point ptDstOrigin = nativeContainer.getLocationOnScreen(); + me.translatePoint( ptSrcOrigin.x - ptDstOrigin.x, ptSrcOrigin.y - ptDstOrigin.y ); } //System.out.println("Track event: " + me); // feed the 'dragged-over' event directly to the enter/exit @@ -4905,8 +4874,6 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener { // avoid recursively calling LightweightDispatcher... ((Container)target).dispatchEventToSelf(retargeted); } else { - assert AppContext.getAppContext() == target.appContext; - if (nativeContainer.modalComp != null) { if (((Container)nativeContainer.modalComp).isAncestorOf(target)) { target.dispatchEvent(retargeted); diff --git a/src/java.desktop/share/classes/java/awt/FileDialog.java b/src/java.desktop/share/classes/java/awt/FileDialog.java index 2c2e1624549..55778e5954a 100644 --- a/src/java.desktop/share/classes/java/awt/FileDialog.java +++ b/src/java.desktop/share/classes/java/awt/FileDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2023, 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 @@ -43,6 +43,7 @@ import sun.awt.AWTAccessor; * its {@code show} method to display the dialog, * it blocks the rest of the application until the user has * chosen a file. + * This means that {@link Dialog#setModalityType(ModalityType)} may be ignored. * * @see Window#show * @@ -160,6 +161,9 @@ public class FileDialog extends Dialog { return fileDialog.multipleMode; } } + public boolean isBeingDisposed(FileDialog fileDialog) { + return fileDialog.isInDispose; + } }); } @@ -447,6 +451,14 @@ public class FileDialog extends Dialog { /** * Gets the selected file of this file dialog. If the user * selected {@code CANCEL}, the returned file is {@code null}. + *

    + * It is platform-specific as to what happens for {@code LOAD} mode of a + * non-existent file. For example, it may be possible for the user to + * "accept" the result of a {@code setFile} value or to edit in the name + * of some other file to load/open even if it is not present. + * Applications should therefore verify the file represented by the + * returned {@code String} exists. + * The value is usually the basename, not a full path name. * * @return the currently selected file of this file dialog window, * or {@code null} if none is selected @@ -501,13 +513,26 @@ public class FileDialog extends Dialog { * specified file. This file becomes the default file if it is set * before the file dialog window is first shown. *

    - * When the dialog is shown, the specified file is selected. The kind of - * selection depends on the file existence, the dialog type, and the native - * platform. E.g., the file could be highlighted in the file list, or a + * When the dialog is shown, the specified file may be pre-selected. + * The visible manifestation of this selection, if any, depends on factors + * such as the file existence, the dialog mode, and the native platform. + * For example, the file could be highlighted in the file list, or a * file name editbox could be populated with the file name. *

    * This method accepts either a full file path, or a file name with an * extension if used together with the {@code setDirectory} method. + * It is platform-specific how a full file path interacts with {@code setDirectory}. + * It may be that the directory is always used instead of the file path, or + * the file path overrides the directory, or even that the full file path + * is interpreted as a base file name. Therefore, it is strongly recommended to + * use {@code setDirectory} to set the folder and {@code setFile} to + * set a base file name. + *

    + * Appearance and behaviours may also differ between {@code LOAD} and {@code SAVE} modes. + *

    + * It is also platform-specific as to what happens for {@code LOAD} mode of a non-existent file. + * For example, it may be possible for the user to "accept" the {@code setFile} value or + * to edit in the name of some other file to load/open even if it is not present. *

    * Specifying "" as the file is exactly equivalent to specifying * {@code null} as the file. @@ -526,6 +551,9 @@ public class FileDialog extends Dialog { /** * Enables or disables multiple file selection for the file dialog. + *

    + * Multiple mode may be ignored in some cases, for example, commonly + * {@code SAVE} mode dialogs do not support it. * * @param enable if {@code true}, multiple file selection is enabled; * {@code false} - disabled. diff --git a/src/java.desktop/share/classes/java/awt/SentEvent.java b/src/java.desktop/share/classes/java/awt/SentEvent.java index eb85fa1453d..419f137ba2b 100644 --- a/src/java.desktop/share/classes/java/awt/SentEvent.java +++ b/src/java.desktop/share/classes/java/awt/SentEvent.java @@ -30,8 +30,7 @@ import java.io.Serial; import sun.awt.SunToolkit; /** - * A wrapping tag for a nested AWTEvent which indicates that the event was - * sent from another AppContext. The destination AppContext should handle the + * A wrapping tag for a nested AWTEvent. The EventQueue should handle the * event even if it is currently blocked waiting for a SequencedEvent or * another SentEvent to be handled. * diff --git a/src/java.desktop/share/classes/java/awt/SequencedEvent.java b/src/java.desktop/share/classes/java/awt/SequencedEvent.java index 25fe72e1787..c919374a85c 100644 --- a/src/java.desktop/share/classes/java/awt/SequencedEvent.java +++ b/src/java.desktop/share/classes/java/awt/SequencedEvent.java @@ -55,7 +55,6 @@ class SequencedEvent extends AWTEvent implements ActiveEvent { private static final LinkedList list = new LinkedList<>(); private final AWTEvent nested; - @SuppressWarnings("serial") // Not statically typed as Serializable private boolean disposed; private final LinkedList pendingEvents = new LinkedList<>(); diff --git a/src/java.desktop/share/classes/java/awt/Taskbar.java b/src/java.desktop/share/classes/java/awt/Taskbar.java index 2a46aca7116..3c81adf5a84 100644 --- a/src/java.desktop/share/classes/java/awt/Taskbar.java +++ b/src/java.desktop/share/classes/java/awt/Taskbar.java @@ -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 @@ -184,6 +184,8 @@ public class Taskbar { } } + private static volatile Taskbar taskbar; + /** * Returns the {@code Taskbar} instance of the current * taskbar context. On some platforms the Taskbar API may not be @@ -205,12 +207,8 @@ public class Taskbar { "supported on the current platform"); } - sun.awt.AppContext context = sun.awt.AppContext.getAppContext(); - Taskbar taskbar = (Taskbar)context.get(Taskbar.class); - if (taskbar == null) { taskbar = new Taskbar(); - context.put(Taskbar.class, taskbar); } return taskbar; diff --git a/src/java.desktop/share/classes/java/awt/image/DataBuffer.java b/src/java.desktop/share/classes/java/awt/image/DataBuffer.java index fe66bad15cb..2fdfeff367e 100644 --- a/src/java.desktop/share/classes/java/awt/image/DataBuffer.java +++ b/src/java.desktop/share/classes/java/awt/image/DataBuffer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, 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 @@ -130,6 +130,7 @@ public abstract class DataBuffer { * * @param dataType the data type of this {@code DataBuffer} * @param size the size of the banks + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. */ protected DataBuffer(int dataType, int size) { this(UNTRACKABLE, dataType, size); @@ -142,11 +143,13 @@ public abstract class DataBuffer { * @param initialState the initial {@link State State} state of the data * @param dataType the data type of this {@code DataBuffer} * @param size the size of the banks + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. * @since 1.7 */ DataBuffer(State initialState, int dataType, int size) { + checkSize(size); this.theTrackable = StateTrackableDelegate.createInstance(initialState); this.dataType = dataType; this.banks = 1; @@ -163,6 +166,8 @@ public abstract class DataBuffer { * @param size the size of the banks * @param numBanks the number of banks in this * {@code DataBuffer} + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. */ protected DataBuffer(int dataType, int size, int numBanks) { this(UNTRACKABLE, dataType, size, numBanks); @@ -178,11 +183,15 @@ public abstract class DataBuffer { * @param size the size of the banks * @param numBanks the number of banks in this * {@code DataBuffer} + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. * @since 1.7 */ DataBuffer(State initialState, int dataType, int size, int numBanks) { + checkSize(size); + checkNumBanks(numBanks); this.theTrackable = StateTrackableDelegate.createInstance(initialState); this.dataType = dataType; this.banks = numBanks; @@ -200,6 +209,9 @@ public abstract class DataBuffer { * @param numBanks the number of banks in this * {@code DataBuffer} * @param offset the offset for each bank + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. + * @throws IllegalArgumentException if {@code offset} is less than zero. */ protected DataBuffer(int dataType, int size, int numBanks, int offset) { this(UNTRACKABLE, dataType, size, numBanks, offset); @@ -216,11 +228,17 @@ public abstract class DataBuffer { * @param numBanks the number of banks in this * {@code DataBuffer} * @param offset the offset for each bank + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. + * @throws IllegalArgumentException if {@code offset} is less than zero. * @since 1.7 */ DataBuffer(State initialState, int dataType, int size, int numBanks, int offset) { + checkSize(size); + checkNumBanks(numBanks); + checkOffset(offset); this.theTrackable = StateTrackableDelegate.createInstance(initialState); this.dataType = dataType; this.banks = numBanks; @@ -243,6 +261,10 @@ public abstract class DataBuffer { * @param numBanks the number of banks in this * {@code DataBuffer} * @param offsets an array containing an offset for each bank. + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. + * @throws NullPointerException if {@code offsets} is {@code null}. + * @throws IllegalArgumentException if any element of {@code offsets} is less than zero. * @throws ArrayIndexOutOfBoundsException if {@code numBanks} * does not equal the length of {@code offsets} */ @@ -263,6 +285,10 @@ public abstract class DataBuffer { * @param numBanks the number of banks in this * {@code DataBuffer} * @param offsets an array containing an offset for each bank. + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. + * @throws NullPointerException if {@code offsets} is {@code null}. + * @throws IllegalArgumentException if any element of {@code offsets} is less than zero. * @throws ArrayIndexOutOfBoundsException if {@code numBanks} * does not equal the length of {@code offsets} * @since 1.7 @@ -270,10 +296,15 @@ public abstract class DataBuffer { DataBuffer(State initialState, int dataType, int size, int numBanks, int[] offsets) { + checkSize(size); + checkNumBanks(numBanks); if (numBanks != offsets.length) { throw new ArrayIndexOutOfBoundsException("Number of banks" + " does not match number of bank offsets"); } + for (int i = 0; i < offsets.length; i++) { + checkOffset(offsets[i]); + } this.theTrackable = StateTrackableDelegate.createInstance(initialState); this.dataType = dataType; this.banks = numBanks; @@ -322,6 +353,8 @@ public abstract class DataBuffer { * as an integer. * @param i the index of the requested data array element * @return the data array element at the specified index. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} + * is not a valid index. * @see #setElem(int, int) * @see #setElem(int, int, int) */ @@ -336,6 +369,8 @@ public abstract class DataBuffer { * @param i the index of the requested data array element * @return the data array element at the specified index from the * specified bank at the specified index. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElem(int, int) * @see #setElem(int, int, int) */ @@ -347,6 +382,8 @@ public abstract class DataBuffer { * @param i the specified index into the data array * @param val the data to set the element at the specified index in * the data array + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} + * is not a valid index. * @see #getElem(int) * @see #getElem(int, int) */ @@ -361,6 +398,8 @@ public abstract class DataBuffer { * @param i the specified index into the data array * @param val the data to set the element in the specified bank * at the specified index in the data array + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElem(int) * @see #getElem(int, int) */ @@ -374,6 +413,8 @@ public abstract class DataBuffer { * @param i the index of the requested data array element * @return a float value representing the data array element at the * specified index. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} + * is not a valid index. * @see #setElemFloat(int, float) * @see #setElemFloat(int, int, float) */ @@ -391,6 +432,8 @@ public abstract class DataBuffer { * @param i the index of the requested data array element * @return a float value representing the data array element from the * specified bank at the specified index. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElemFloat(int, float) * @see #setElemFloat(int, int, float) */ @@ -406,6 +449,8 @@ public abstract class DataBuffer { * @param i the specified index * @param val the value to set the element at the specified index in * the data array + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} + * is not a valid index. * @see #getElemFloat(int) * @see #getElemFloat(int, int) */ @@ -422,6 +467,8 @@ public abstract class DataBuffer { * @param i the specified index * @param val the value to set the element in the specified bank at * the specified index in the data array + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElemFloat(int) * @see #getElemFloat(int, int) */ @@ -438,6 +485,8 @@ public abstract class DataBuffer { * @param i the specified index * @return a double value representing the element at the specified * index in the data array. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} + * is not a valid index. * @see #setElemDouble(int, double) * @see #setElemDouble(int, int, double) */ @@ -454,6 +503,8 @@ public abstract class DataBuffer { * @param i the specified index * @return a double value representing the element from the specified * bank at the specified index in the data array. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElemDouble(int, double) * @see #setElemDouble(int, int, double) */ @@ -469,6 +520,8 @@ public abstract class DataBuffer { * @param i the specified index * @param val the value to set the element at the specified index * in the data array + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} + * is not a valid index. * @see #getElemDouble(int) * @see #getElemDouble(int, int) */ @@ -485,6 +538,8 @@ public abstract class DataBuffer { * @param i the specified index * @param val the value to set the element in the specified bank * at the specified index of the data array + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElemDouble(int) * @see #getElemDouble(int, int) */ @@ -540,4 +595,89 @@ public abstract class DataBuffer { } }); } + + final void checkBank(int bank) { + if (bank < 0 || bank >= banks) { + throw new ArrayIndexOutOfBoundsException("Bank index out of range : " + bank); + } + } + + final void checkIndex(int i) { + if (i < 0) { + throw new ArrayIndexOutOfBoundsException("Index cannot be negative : " + i); + } + if ((offset + i) < i) { + throw new ArrayIndexOutOfBoundsException("(offset+i) cannot be negative : " + + "(" + offset + " + " + i + ") = " + (offset + i)); + } + if (i >= size) { + throw new ArrayIndexOutOfBoundsException("Invalid index " + i + + " is too large for size : " + size); + } + } + + final void checkIndex(int bank, int i) { + checkBank(bank); + if (i < 0) { + throw new ArrayIndexOutOfBoundsException("Index cannot be negative : " + i); + } + if ((offsets[bank] + i) < i) { + throw new ArrayIndexOutOfBoundsException("(offsets[" + bank + "]+i) cannot be negative : " + + "(" + offsets[bank] + " + " + i + ") = " + (offsets[bank] + i)); + } + // Don't need to include bank offset here since all constructors validated + // the offset for each bank against the size. + if (i >= size) { + throw new ArrayIndexOutOfBoundsException("Invalid index " + i + + " is too large for size : " + size); + } + } + + // Checks used by subclass constructors. + + static void checkSize(int size) { + if (size <= 0) { + throw new IllegalArgumentException("Size must be > 0"); + } + } + + static void checkOffset(int offset) { + if (offset < 0) { + throw new IllegalArgumentException("Offset must be >= 0"); + } + } + + static void checkNumBanks(int numBanks) { + if (numBanks <= 0) { + throw new IllegalArgumentException("Must have at least one bank"); + } + } + + static void checkArraySize(int size, int arrayLen) { + if ((size <= 0) || (size > arrayLen)) { + throw new IllegalArgumentException("Bad size : " + size); + } + } + + private static boolean checkSizeAndOffset(int size, int offset, int arrayLen) { + return + (size <= 0) || + (offset < 0) || + ((offset + size) <= 0) || + ((offset + size) > arrayLen); + } + + static void checkArraySize(int size, int offset, int arrayLen) { + if (checkSizeAndOffset(size, offset, arrayLen)) { + throw new IllegalArgumentException("Bad size/offset." + + " Size = " + size + ", offset = " + offset + ", array length = " + arrayLen); + } + } + + static void checkBankSize(int bankIndex, int size, int offset, int arrayLen) { + if (checkSizeAndOffset(size, offset, arrayLen)) { + throw new IllegalArgumentException("Bad size/offset for bank " + bankIndex + "." + + " Size = " + size + ", offset = " + offset + ", array length = " + arrayLen); + } + } } diff --git a/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java b/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java index 05cf118fdaf..04868d90896 100644 --- a/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java +++ b/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, 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 @@ -35,6 +35,8 @@ package java.awt.image; +import java.util.Objects; + import static sun.java2d.StateTrackable.State.STABLE; import static sun.java2d.StateTrackable.State.UNTRACKABLE; @@ -71,12 +73,13 @@ public final class DataBufferByte extends DataBuffer * specified size. * * @param size The size of the {@code DataBuffer}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. */ public DataBufferByte(int size) { - super(STABLE, TYPE_BYTE, size); - data = new byte[size]; - bankdata = new byte[1][]; - bankdata[0] = data; + super(STABLE, TYPE_BYTE, size); + data = new byte[size]; + bankdata = new byte[1][]; + bankdata[0] = data; } /** @@ -85,6 +88,8 @@ public final class DataBufferByte extends DataBuffer * * @param size The size of the banks in the {@code DataBuffer}. * @param numBanks The number of banks in the {@code DataBuffer}. + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. */ public DataBufferByte(int size, int numBanks) { super(STABLE, TYPE_BYTE, size, numBanks); @@ -109,9 +114,14 @@ public final class DataBufferByte extends DataBuffer * * @param dataArray The byte array for the {@code DataBuffer}. * @param size The size of the {@code DataBuffer} bank. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal + * to zero, or is greater than the length of {@code dataArray}. */ public DataBufferByte(byte[] dataArray, int size) { super(UNTRACKABLE, TYPE_BYTE, size); + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, dataArray.length); data = dataArray; bankdata = new byte[1][]; bankdata[0] = data; @@ -133,9 +143,16 @@ public final class DataBufferByte extends DataBuffer * @param size The size of the {@code DataBuffer} bank. * @param offset The offset into the {@code dataArray}. {@code dataArray} * must have at least {@code offset} + {@code size} elements. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException + * if {@code size} is less than or equal to zero, + * or {@code offset} is less than zero, + * or {@code (offset + size)} is greater than the length of {@code dataArray}. */ - public DataBufferByte(byte[] dataArray, int size, int offset){ + public DataBufferByte(byte[] dataArray, int size, int offset) { super(UNTRACKABLE, TYPE_BYTE, size, 1, offset); + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, offset, dataArray.length); data = dataArray; bankdata = new byte[1][]; bankdata[0] = data; @@ -154,9 +171,19 @@ public final class DataBufferByte extends DataBuffer * * @param dataArray The byte arrays for the {@code DataBuffer}. * @param size The size of the banks in the {@code DataBuffer}. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code size}. */ public DataBufferByte(byte[][] dataArray, int size) { super(UNTRACKABLE, TYPE_BYTE, size, dataArray.length); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, 0, dataArray[b].length); + } bankdata = dataArray.clone(); data = bankdata[0]; } @@ -179,9 +206,23 @@ public final class DataBufferByte extends DataBuffer * @param dataArray The byte arrays for the {@code DataBuffer}. * @param size The size of the banks in the {@code DataBuffer}. * @param offsets The offsets into each array. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if {@code offsets} is {@code null}. + * @throws IllegalArgumentException if any element of {@code offsets} is less than zero. + * @throws ArrayIndexOutOfBoundsException if the lengths of {@code dataArray} + * and {@code offsets} differ. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code (size + offsets[bankIndex])}. */ public DataBufferByte(byte[][] dataArray, int size, int[] offsets) { super(UNTRACKABLE, TYPE_BYTE, size, dataArray.length, offsets); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, offsets[b], dataArray[b].length); + } bankdata = dataArray.clone(); data = bankdata[0]; } @@ -211,8 +252,10 @@ public final class DataBufferByte extends DataBuffer * * @param bank The bank whose data array you want to get. * @return The data array for the specified bank. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index. */ public byte[] getData(int bank) { + checkBank(bank); theTrackable.setUntrackable(); return bankdata[bank]; } @@ -237,10 +280,12 @@ public final class DataBufferByte extends DataBuffer * * @param i The data array element you want to get. * @return The requested data array element as an integer. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int i) { + checkIndex(i); return (int)(data[i+offset]) & 0xff; } @@ -252,8 +297,11 @@ public final class DataBufferByte extends DataBuffer * @return The requested data array element as an integer. * @see #setElem(int, int) * @see #setElem(int, int, int) + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. */ public int getElem(int bank, int i) { + checkIndex(bank, i); return (int)(bankdata[bank][i+offsets[bank]]) & 0xff; } @@ -263,10 +311,12 @@ public final class DataBufferByte extends DataBuffer * * @param i The data array element you want to set. * @param val The integer value to which you want to set the data array element. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int i, int val) { + checkIndex(i); data[i+offset] = (byte)val; theTrackable.markDirty(); } @@ -277,10 +327,13 @@ public final class DataBufferByte extends DataBuffer * @param bank The bank in which you want to set the data array element. * @param i The data array element you want to set. * @param val The integer value to which you want to set the specified data array element. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int bank, int i, int val) { + checkIndex(bank, i); bankdata[bank][i+offsets[bank]] = (byte)val; theTrackable.markDirty(); } diff --git a/src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java b/src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java index 132c71d55c4..f3d2fac403b 100644 --- a/src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java +++ b/src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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,10 @@ package java.awt.image; -import static sun.java2d.StateTrackable.State.*; +import java.util.Objects; + +import static sun.java2d.StateTrackable.State.STABLE; +import static sun.java2d.StateTrackable.State.UNTRACKABLE; /** * This class extends {@code DataBuffer} and stores data internally @@ -62,6 +65,7 @@ public final class DataBufferDouble extends DataBuffer { * with a specified size. * * @param size The number of elements in the {@code DataBuffer}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. */ public DataBufferDouble(int size) { super(STABLE, TYPE_DOUBLE, size); @@ -78,6 +82,8 @@ public final class DataBufferDouble extends DataBuffer { * @param size The number of elements in each bank of the * {@code DataBuffer}. * @param numBanks The number of banks in the {@code DataBuffer}. + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. */ public DataBufferDouble(int size, int numBanks) { super(STABLE, TYPE_DOUBLE, size, numBanks); @@ -103,9 +109,14 @@ public final class DataBufferDouble extends DataBuffer { * @param dataArray An array of {@code double}s to be used as the * first and only bank of this {@code DataBuffer}. * @param size The number of elements of the array to be used. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal + * to zero, or is greater than the length of {@code dataArray}. */ public DataBufferDouble(double[] dataArray, int size) { super(UNTRACKABLE, TYPE_DOUBLE, size); + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, dataArray.length); data = dataArray; bankdata = new double[1][]; bankdata[0] = data; @@ -128,9 +139,16 @@ public final class DataBufferDouble extends DataBuffer { * @param size The number of elements of the array to be used. * @param offset The offset of the first element of the array * that will be used. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException + * if {@code size} is less than or equal to zero, + * or {@code offset} is less than zero, + * or {@code (offset + size)} is greater than the length of {@code dataArray}. */ public DataBufferDouble(double[] dataArray, int size, int offset) { super(UNTRACKABLE, TYPE_DOUBLE, size, 1, offset); + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, offset, dataArray.length); data = dataArray; bankdata = new double[1][]; bankdata[0] = data; @@ -151,9 +169,19 @@ public final class DataBufferDouble extends DataBuffer { * @param dataArray An array of arrays of {@code double}s to be * used as the banks of this {@code DataBuffer}. * @param size The number of elements of each array to be used. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code size}. */ public DataBufferDouble(double[][] dataArray, int size) { super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, 0, dataArray[b].length); + } bankdata = dataArray.clone(); data = bankdata[0]; } @@ -175,9 +203,22 @@ public final class DataBufferDouble extends DataBuffer { * used as the banks of this {@code DataBuffer}. * @param size The number of elements of each array to be used. * @param offsets An array of integer offsets, one for each bank. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if {@code offsets} is {@code null}. + * @throws IllegalArgumentException if any element of {@code offsets} is less than zero. + * @throws ArrayIndexOutOfBoundsException if the lengths of {@code dataArray} and {@code offsets} differ. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code (size + offsets[bankIndex])}. */ public DataBufferDouble(double[][] dataArray, int size, int[] offsets) { super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length, offsets); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, offsets[b], dataArray[b].length); + } bankdata = dataArray.clone(); data = bankdata[0]; } @@ -207,8 +248,10 @@ public final class DataBufferDouble extends DataBuffer { * * @param bank the data array * @return the data array specified by {@code bank}. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index. */ public double[] getData(int bank) { + checkBank(bank); theTrackable.setUntrackable(); return bankdata[bank]; } @@ -234,10 +277,12 @@ public final class DataBufferDouble extends DataBuffer { * * @param i The desired data array element. * @return The data entry as an {@code int}. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int i) { + checkIndex(i); return (int)(data[i+offset]); } @@ -249,10 +294,13 @@ public final class DataBufferDouble extends DataBuffer { * @param i The desired data array element. * * @return The data entry as an {@code int}. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int bank, int i) { + checkIndex(bank, i); return (int)(bankdata[bank][i+offsets[bank]]); } @@ -262,10 +310,12 @@ public final class DataBufferDouble extends DataBuffer { * * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int i, int val) { + checkIndex(i); data[i+offset] = (double)val; theTrackable.markDirty(); } @@ -277,10 +327,13 @@ public final class DataBufferDouble extends DataBuffer { * @param bank The bank number. * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int bank, int i, int val) { + checkIndex(bank, i); bankdata[bank][i+offsets[bank]] = (double)val; theTrackable.markDirty(); } @@ -292,10 +345,12 @@ public final class DataBufferDouble extends DataBuffer { * @param i The desired data array element. * * @return The data entry as a {@code float}. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #setElemFloat(int, float) * @see #setElemFloat(int, int, float) */ public float getElemFloat(int i) { + checkIndex(i); return (float)data[i+offset]; } @@ -307,10 +362,13 @@ public final class DataBufferDouble extends DataBuffer { * @param i The desired data array element. * * @return The data entry as a {@code float}. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElemFloat(int, float) * @see #setElemFloat(int, int, float) */ public float getElemFloat(int bank, int i) { + checkIndex(bank, i); return (float)bankdata[bank][i+offsets[bank]]; } @@ -320,10 +378,12 @@ public final class DataBufferDouble extends DataBuffer { * * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #getElemFloat(int) * @see #getElemFloat(int, int) */ public void setElemFloat(int i, float val) { + checkIndex(i); data[i+offset] = (double)val; theTrackable.markDirty(); } @@ -335,10 +395,13 @@ public final class DataBufferDouble extends DataBuffer { * @param bank The bank number. * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElemFloat(int) * @see #getElemFloat(int, int) */ public void setElemFloat(int bank, int i, float val) { + checkIndex(bank, i); bankdata[bank][i+offsets[bank]] = (double)val; theTrackable.markDirty(); } @@ -350,10 +413,12 @@ public final class DataBufferDouble extends DataBuffer { * @param i The desired data array element. * * @return The data entry as a {@code double}. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #setElemDouble(int, double) * @see #setElemDouble(int, int, double) */ public double getElemDouble(int i) { + checkIndex(i); return data[i+offset]; } @@ -365,10 +430,13 @@ public final class DataBufferDouble extends DataBuffer { * @param i The desired data array element. * * @return The data entry as a {@code double}. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElemDouble(int, double) * @see #setElemDouble(int, int, double) */ public double getElemDouble(int bank, int i) { + checkIndex(bank, i); return bankdata[bank][i+offsets[bank]]; } @@ -378,10 +446,12 @@ public final class DataBufferDouble extends DataBuffer { * * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #getElemDouble(int) * @see #getElemDouble(int, int) */ public void setElemDouble(int i, double val) { + checkIndex(i); data[i+offset] = val; theTrackable.markDirty(); } @@ -393,10 +463,13 @@ public final class DataBufferDouble extends DataBuffer { * @param bank The bank number. * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElemDouble(int) * @see #getElemDouble(int, int) */ public void setElemDouble(int bank, int i, double val) { + checkIndex(bank, i); bankdata[bank][i+offsets[bank]] = val; theTrackable.markDirty(); } diff --git a/src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java b/src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java index fc92be410a0..9badce304d6 100644 --- a/src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java +++ b/src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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,10 @@ package java.awt.image; -import static sun.java2d.StateTrackable.State.*; +import java.util.Objects; + +import static sun.java2d.StateTrackable.State.STABLE; +import static sun.java2d.StateTrackable.State.UNTRACKABLE; /** * This class extends {@code DataBuffer} and stores data internally @@ -62,6 +65,7 @@ public final class DataBufferFloat extends DataBuffer { * with a specified size. * * @param size The number of elements in the DataBuffer. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. */ public DataBufferFloat(int size) { super(STABLE, TYPE_FLOAT, size); @@ -79,6 +83,8 @@ public final class DataBufferFloat extends DataBuffer { * {@code DataBuffer}. * @param numBanks The number of banks in the * {@code DataBuffer}. + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. */ public DataBufferFloat(int size, int numBanks) { super(STABLE, TYPE_FLOAT, size, numBanks); @@ -104,9 +110,14 @@ public final class DataBufferFloat extends DataBuffer { * @param dataArray An array of {@code float}s to be used as the * first and only bank of this {@code DataBuffer}. * @param size The number of elements of the array to be used. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal + * to zero, or is greater than the length of {@code dataArray}. */ public DataBufferFloat(float[] dataArray, int size) { super(UNTRACKABLE, TYPE_FLOAT, size); + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, dataArray.length); data = dataArray; bankdata = new float[1][]; bankdata[0] = data; @@ -130,9 +141,16 @@ public final class DataBufferFloat extends DataBuffer { * @param size The number of elements of the array to be used. * @param offset The offset of the first element of the array * that will be used. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException + * if {@code size} is less than or equal to zero, + * or {@code offset} is less than zero, + * or {@code (offset + size)} is greater than the length of {@code dataArray}. */ public DataBufferFloat(float[] dataArray, int size, int offset) { super(UNTRACKABLE, TYPE_FLOAT, size, 1, offset); + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, offset, dataArray.length); data = dataArray; bankdata = new float[1][]; bankdata[0] = data; @@ -153,9 +171,19 @@ public final class DataBufferFloat extends DataBuffer { * @param dataArray An array of arrays of {@code float}s to be * used as the banks of this {@code DataBuffer}. * @param size The number of elements of each array to be used. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code size}. */ public DataBufferFloat(float[][] dataArray, int size) { super(UNTRACKABLE, TYPE_FLOAT, size, dataArray.length); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, 0, dataArray[b].length); + } bankdata = dataArray.clone(); data = bankdata[0]; } @@ -177,9 +205,22 @@ public final class DataBufferFloat extends DataBuffer { * used as the banks of this {@code DataBuffer}. * @param size The number of elements of each array to be used. * @param offsets An array of integer offsets, one for each bank. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if {@code offsets} is {@code null}. + * @throws IllegalArgumentException if any element of {@code offsets} is less than zero. + * @throws ArrayIndexOutOfBoundsException if the lengths of {@code dataArray} and {@code offsets} differ. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code (size + offsets[bankIndex])}. */ public DataBufferFloat(float[][] dataArray, int size, int[] offsets) { - super(UNTRACKABLE, TYPE_FLOAT, size,dataArray.length, offsets); + super(UNTRACKABLE, TYPE_FLOAT, size, dataArray.length, offsets); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, offsets[b], dataArray[b].length); + } bankdata = dataArray.clone(); data = bankdata[0]; } @@ -209,8 +250,10 @@ public final class DataBufferFloat extends DataBuffer { * * @param bank the data array * @return the data array specified by {@code bank}. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index. */ public float[] getData(int bank) { + checkBank(bank); theTrackable.setUntrackable(); return bankdata[bank]; } @@ -237,10 +280,12 @@ public final class DataBufferFloat extends DataBuffer { * @param i The desired data array element. * * @return The data entry as an {@code int}. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int i) { + checkIndex(i); return (int)(data[i+offset]); } @@ -252,10 +297,13 @@ public final class DataBufferFloat extends DataBuffer { * @param i The desired data array element. * * @return The data entry as an {@code int}. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int bank, int i) { + checkIndex(bank, i); return (int)(bankdata[bank][i+offsets[bank]]); } @@ -265,10 +313,12 @@ public final class DataBufferFloat extends DataBuffer { * * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int i, int val) { + checkIndex(i); data[i+offset] = (float)val; theTrackable.markDirty(); } @@ -280,10 +330,13 @@ public final class DataBufferFloat extends DataBuffer { * @param bank The bank number. * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int bank, int i, int val) { + checkIndex(bank, i); bankdata[bank][i+offsets[bank]] = (float)val; theTrackable.markDirty(); } @@ -295,10 +348,12 @@ public final class DataBufferFloat extends DataBuffer { * @param i The desired data array element. * * @return The data entry as a {@code float}. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #setElemFloat(int, float) * @see #setElemFloat(int, int, float) */ public float getElemFloat(int i) { + checkIndex(i); return data[i+offset]; } @@ -310,10 +365,13 @@ public final class DataBufferFloat extends DataBuffer { * @param i The desired data array element. * * @return The data entry as a {@code float}. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElemFloat(int, float) * @see #setElemFloat(int, int, float) */ public float getElemFloat(int bank, int i) { + checkIndex(bank, i); return bankdata[bank][i+offsets[bank]]; } @@ -323,10 +381,12 @@ public final class DataBufferFloat extends DataBuffer { * * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #getElemFloat(int) * @see #getElemFloat(int, int) */ public void setElemFloat(int i, float val) { + checkIndex(i); data[i+offset] = val; theTrackable.markDirty(); } @@ -338,10 +398,13 @@ public final class DataBufferFloat extends DataBuffer { * @param bank The bank number. * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElemFloat(int) * @see #getElemFloat(int, int) */ public void setElemFloat(int bank, int i, float val) { + checkIndex(bank, i); bankdata[bank][i+offsets[bank]] = val; theTrackable.markDirty(); } @@ -353,10 +416,12 @@ public final class DataBufferFloat extends DataBuffer { * @param i The desired data array element. * * @return The data entry as a {@code double}. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #setElemDouble(int, double) * @see #setElemDouble(int, int, double) */ public double getElemDouble(int i) { + checkIndex(i); return (double)data[i+offset]; } @@ -368,10 +433,13 @@ public final class DataBufferFloat extends DataBuffer { * @param i The desired data array element. * * @return The data entry as a {@code double}. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElemDouble(int, double) * @see #setElemDouble(int, int, double) */ public double getElemDouble(int bank, int i) { + checkIndex(bank, i); return (double)bankdata[bank][i+offsets[bank]]; } @@ -381,10 +449,12 @@ public final class DataBufferFloat extends DataBuffer { * * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #getElemDouble(int) * @see #getElemDouble(int, int) */ public void setElemDouble(int i, double val) { + checkIndex(i); data[i+offset] = (float)val; theTrackable.markDirty(); } @@ -396,10 +466,13 @@ public final class DataBufferFloat extends DataBuffer { * @param bank The bank number. * @param i The desired data array element. * @param val The value to be set. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElemDouble(int) * @see #getElemDouble(int, int) */ public void setElemDouble(int bank, int i, double val) { + checkIndex(bank, i); bankdata[bank][i+offsets[bank]] = (float)val; theTrackable.markDirty(); } diff --git a/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java b/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java index 90ecf978d80..0f0710e1976 100644 --- a/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java +++ b/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, 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 @@ -35,6 +35,8 @@ package java.awt.image; +import java.util.Objects; + import static sun.java2d.StateTrackable.State.STABLE; import static sun.java2d.StateTrackable.State.UNTRACKABLE; @@ -70,6 +72,7 @@ public final class DataBufferInt extends DataBuffer * and the specified size. * * @param size The size of the {@code DataBuffer}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. */ public DataBufferInt(int size) { super(STABLE, TYPE_INT, size); @@ -84,6 +87,8 @@ public final class DataBufferInt extends DataBuffer * * @param size The size of the banks in the {@code DataBuffer}. * @param numBanks The number of banks in the {@code DataBuffer}. + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. */ public DataBufferInt(int size, int numBanks) { super(STABLE, TYPE_INT, size, numBanks); @@ -108,9 +113,14 @@ public final class DataBufferInt extends DataBuffer * * @param dataArray The integer array for the {@code DataBuffer}. * @param size The size of the {@code DataBuffer} bank. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal + * to zero, or is greater than the length of {@code dataArray}. */ public DataBufferInt(int[] dataArray, int size) { super(UNTRACKABLE, TYPE_INT, size); + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, dataArray.length); data = dataArray; bankdata = new int[1][]; bankdata[0] = data; @@ -131,9 +141,16 @@ public final class DataBufferInt extends DataBuffer * @param dataArray The integer array for the {@code DataBuffer}. * @param size The size of the {@code DataBuffer} bank. * @param offset The offset into the {@code dataArray}. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException + * if {@code size} is less than or equal to zero, + * or {@code offset} is less than zero, + * or {@code (offset + size)} is greater than the length of {@code dataArray}. */ public DataBufferInt(int[] dataArray, int size, int offset) { super(UNTRACKABLE, TYPE_INT, size, 1, offset); + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, offset, dataArray.length); data = dataArray; bankdata = new int[1][]; bankdata[0] = data; @@ -152,9 +169,19 @@ public final class DataBufferInt extends DataBuffer * * @param dataArray The integer arrays for the {@code DataBuffer}. * @param size The size of the banks in the {@code DataBuffer}. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code size}. */ public DataBufferInt(int[][] dataArray, int size) { super(UNTRACKABLE, TYPE_INT, size, dataArray.length); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, 0, dataArray[b].length); + } bankdata = dataArray.clone(); data = bankdata[0]; } @@ -177,9 +204,22 @@ public final class DataBufferInt extends DataBuffer * @param dataArray The integer arrays for the {@code DataBuffer}. * @param size The size of the banks in the {@code DataBuffer}. * @param offsets The offsets into each array. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if {@code offsets} is {@code null}. + * @throws IllegalArgumentException if any element of {@code offsets} is less than zero. + * @throws ArrayIndexOutOfBoundsException if the lengths of {@code dataArray} and {@code offsets} differ. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code (size + offsets[bankIndex])}. */ public DataBufferInt(int[][] dataArray, int size, int[] offsets) { super(UNTRACKABLE, TYPE_INT, size, dataArray.length, offsets); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, offsets[b], dataArray[b].length); + } bankdata = dataArray.clone(); data = bankdata[0]; } @@ -209,8 +249,10 @@ public final class DataBufferInt extends DataBuffer * * @param bank The bank whose data array you want to get. * @return The data array for the specified bank. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index. */ public int[] getData(int bank) { + checkBank(bank); theTrackable.setUntrackable(); return bankdata[bank]; } @@ -235,10 +277,12 @@ public final class DataBufferInt extends DataBuffer * * @param i The data array element you want to get. * @return The requested data array element as an integer. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int i) { + checkIndex(i); return data[i+offset]; } @@ -248,10 +292,13 @@ public final class DataBufferInt extends DataBuffer * @param bank The bank from which you want to get a data array element. * @param i The data array element you want to get. * @return The requested data array element as an integer. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int bank, int i) { + checkIndex(bank, i); return bankdata[bank][i+offsets[bank]]; } @@ -261,10 +308,12 @@ public final class DataBufferInt extends DataBuffer * * @param i The data array element you want to set. * @param val The integer value to which you want to set the data array element. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int i, int val) { + checkIndex(i); data[i+offset] = val; theTrackable.markDirty(); } @@ -275,10 +324,13 @@ public final class DataBufferInt extends DataBuffer * @param bank The bank in which you want to set the data array element. * @param i The data array element you want to set. * @param val The integer value to which you want to set the specified data array element. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int bank, int i, int val) { + checkIndex(bank, i); bankdata[bank][i+offsets[bank]] = val; theTrackable.markDirty(); } diff --git a/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java b/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java index 4c4ae206068..17ec833c8d5 100644 --- a/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java +++ b/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, 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 @@ -35,6 +35,8 @@ package java.awt.image; +import java.util.Objects; + import static sun.java2d.StateTrackable.State.STABLE; import static sun.java2d.StateTrackable.State.UNTRACKABLE; @@ -69,6 +71,7 @@ public final class DataBufferShort extends DataBuffer * specified size. * * @param size The size of the {@code DataBuffer}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. */ public DataBufferShort(int size) { super(STABLE, TYPE_SHORT,size); @@ -83,6 +86,8 @@ public final class DataBufferShort extends DataBuffer * * @param size The size of the banks in the {@code DataBuffer}. * @param numBanks The number of banks in the {@code DataBuffer}. + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. */ public DataBufferShort(int size, int numBanks) { super(STABLE, TYPE_SHORT,size,numBanks); @@ -107,9 +112,14 @@ public final class DataBufferShort extends DataBuffer * * @param dataArray The short array for the {@code DataBuffer}. * @param size The size of the {@code DataBuffer} bank. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal + * to zero, or is greater than the length of {@code dataArray} */ public DataBufferShort(short[] dataArray, int size) { super(UNTRACKABLE, TYPE_SHORT, size); + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, dataArray.length); data = dataArray; bankdata = new short[1][]; bankdata[0] = data; @@ -130,9 +140,16 @@ public final class DataBufferShort extends DataBuffer * @param dataArray The short array for the {@code DataBuffer}. * @param size The size of the {@code DataBuffer} bank. * @param offset The offset into the {@code dataArray}. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException + * if {@code size} is less than or equal to zero, + * or {@code offset} is less than zero, + * or {@code (offset + size)} is greater than the length of {@code dataArray}. */ public DataBufferShort(short[] dataArray, int size, int offset) { super(UNTRACKABLE, TYPE_SHORT, size, 1, offset); + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, offset, dataArray.length); data = dataArray; bankdata = new short[1][]; bankdata[0] = data; @@ -151,9 +168,19 @@ public final class DataBufferShort extends DataBuffer * * @param dataArray The short arrays for the {@code DataBuffer}. * @param size The size of the banks in the {@code DataBuffer}. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code size}. */ public DataBufferShort(short[][] dataArray, int size) { super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, 0, dataArray[b].length); + } bankdata = dataArray.clone(); data = bankdata[0]; } @@ -176,9 +203,22 @@ public final class DataBufferShort extends DataBuffer * @param dataArray The short arrays for the {@code DataBuffer}. * @param size The size of the banks in the {@code DataBuffer}. * @param offsets The offsets into each array. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if {@code offsets} is {@code null}. + * @throws IllegalArgumentException if any element of {@code offsets} is less than zero. + * @throws ArrayIndexOutOfBoundsException if the lengths of {@code dataArray} and {@code offsets} differ. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code (size + offsets[bankIndex])}. */ public DataBufferShort(short[][] dataArray, int size, int[] offsets) { super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length, offsets); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, offsets[b], dataArray[b].length); + } bankdata = dataArray.clone(); data = bankdata[0]; } @@ -208,8 +248,10 @@ public final class DataBufferShort extends DataBuffer * * @param bank The bank whose data array you want to get. * @return The data array for the specified bank. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index. */ public short[] getData(int bank) { + checkBank(bank); theTrackable.setUntrackable(); return bankdata[bank]; } @@ -234,10 +276,12 @@ public final class DataBufferShort extends DataBuffer * * @param i The data array element you want to get. * @return The requested data array element as an integer. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int i) { + checkIndex(i); return (int)(data[i+offset]); } @@ -247,10 +291,13 @@ public final class DataBufferShort extends DataBuffer * @param bank The bank from which you want to get a data array element. * @param i The data array element you want to get. * @return The requested data array element as an integer. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int bank, int i) { + checkIndex(bank, i); return (int)(bankdata[bank][i+offsets[bank]]); } @@ -260,10 +307,12 @@ public final class DataBufferShort extends DataBuffer * * @param i The data array element you want to set. * @param val The integer value to which you want to set the data array element. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int i, int val) { + checkIndex(i); data[i+offset] = (short)val; theTrackable.markDirty(); } @@ -274,10 +323,13 @@ public final class DataBufferShort extends DataBuffer * @param bank The bank in which you want to set the data array element. * @param i The data array element you want to set. * @param val The integer value to which you want to set the specified data array element. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int bank, int i, int val) { + checkIndex(bank, i); bankdata[bank][i+offsets[bank]] = (short)val; theTrackable.markDirty(); } diff --git a/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java b/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java index 54c2cc09e19..a39a3751a92 100644 --- a/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java +++ b/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, 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 @@ -35,6 +35,8 @@ package java.awt.image; +import java.util.Objects; + import static sun.java2d.StateTrackable.State.STABLE; import static sun.java2d.StateTrackable.State.UNTRACKABLE; @@ -71,6 +73,7 @@ public final class DataBufferUShort extends DataBuffer * specified size. * * @param size The size of the {@code DataBuffer}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. */ public DataBufferUShort(int size) { super(STABLE, TYPE_USHORT, size); @@ -85,7 +88,9 @@ public final class DataBufferUShort extends DataBuffer * * @param size The size of the banks in the {@code DataBuffer}. * @param numBanks The number of banks in the {@code DataBuffer}. - */ + * @throws IllegalArgumentException if {@code size} or {@code numBanks} + * is less than or equal to zero. + */ public DataBufferUShort(int size, int numBanks) { super(STABLE, TYPE_USHORT, size, numBanks); bankdata = new short[numBanks][]; @@ -109,12 +114,14 @@ public final class DataBufferUShort extends DataBuffer * * @param dataArray The unsigned-short array for the {@code DataBuffer}. * @param size The size of the {@code DataBuffer} bank. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal + * to zero, or is greater than the length of {@code dataArray}. */ public DataBufferUShort(short[] dataArray, int size) { super(UNTRACKABLE, TYPE_USHORT, size); - if (dataArray == null) { - throw new NullPointerException("dataArray is null"); - } + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, dataArray.length); data = dataArray; bankdata = new short[1][]; bankdata[0] = data; @@ -135,16 +142,16 @@ public final class DataBufferUShort extends DataBuffer * @param dataArray The unsigned-short array for the {@code DataBuffer}. * @param size The size of the {@code DataBuffer} bank. * @param offset The offset into the {@code dataArray}. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException + * if {@code size} is less than or equal to zero, + * or {@code offset} is less than zero, + * or {@code (offset + size)} is greater than the length of {@code dataArray}. */ public DataBufferUShort(short[] dataArray, int size, int offset) { super(UNTRACKABLE, TYPE_USHORT, size, 1, offset); - if (dataArray == null) { - throw new NullPointerException("dataArray is null"); - } - if ((size+offset) > dataArray.length) { - throw new IllegalArgumentException("Length of dataArray is less "+ - " than size+offset."); - } + Objects.requireNonNull(dataArray, "dataArray must not be null"); + checkArraySize(size, offset, dataArray.length); data = dataArray; bankdata = new short[1][]; bankdata[0] = data; @@ -163,18 +170,19 @@ public final class DataBufferUShort extends DataBuffer * * @param dataArray The unsigned-short arrays for the {@code DataBuffer}. * @param size The size of the banks in the {@code DataBuffer}. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code size}. */ public DataBufferUShort(short[][] dataArray, int size) { super(UNTRACKABLE, TYPE_USHORT, size, dataArray.length); - if (dataArray == null) { - throw new NullPointerException("dataArray is null"); + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, 0, dataArray[b].length); } - for (int i=0; i < dataArray.length; i++) { - if (dataArray[i] == null) { - throw new NullPointerException("dataArray["+i+"] is null"); - } - } - bankdata = dataArray.clone(); data = bankdata[0]; } @@ -197,22 +205,21 @@ public final class DataBufferUShort extends DataBuffer * @param dataArray The unsigned-short arrays for the {@code DataBuffer}. * @param size The size of the banks in the {@code DataBuffer}. * @param offsets The offsets into each array. + * @throws IllegalArgumentException if {@code size} is less than or equal to zero. + * @throws NullPointerException if {@code dataArray} is {@code null}. + * @throws NullPointerException if any bank of {@code dataArray} is {@code null}. + * @throws IllegalArgumentException if {@code dataArray} does not have at least one bank. + * @throws NullPointerException if {@code offsets} is {@code null}. + * @throws IllegalArgumentException if any element of {@code offsets} is less than zero. + * @throws ArrayIndexOutOfBoundsException if the lengths of {@code dataArray} and {@code offsets} differ. + * @throws IllegalArgumentException if the length of any bank of {@code dataArray} + * is less than {@code (size + offsets[bankIndex])}. */ public DataBufferUShort(short[][] dataArray, int size, int[] offsets) { super(UNTRACKABLE, TYPE_USHORT, size, dataArray.length, offsets); - if (dataArray == null) { - throw new NullPointerException("dataArray is null"); - } - for (int i=0; i < dataArray.length; i++) { - if (dataArray[i] == null) { - throw new NullPointerException("dataArray["+i+"] is null"); - } - if ((size+offsets[i]) > dataArray[i].length) { - throw new IllegalArgumentException("Length of dataArray["+i+ - "] is less than size+"+ - "offsets["+i+"]."); - } - + for (int b = 0; b < dataArray.length; b++) { + Objects.requireNonNull(dataArray[b], "bank must not be null"); + checkBankSize(b, size, offsets[b], dataArray[b].length); } bankdata = dataArray.clone(); data = bankdata[0]; @@ -243,8 +250,10 @@ public final class DataBufferUShort extends DataBuffer * * @param bank The bank whose data array you want to get. * @return The data array for the specified bank. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index. */ public short[] getData(int bank) { + checkBank(bank); theTrackable.setUntrackable(); return bankdata[bank]; } @@ -269,10 +278,12 @@ public final class DataBufferUShort extends DataBuffer * * @param i The data array element you want to get. * @return The requested data array element as an integer. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int i) { + checkIndex(i); return data[i+offset]&0xffff; } @@ -282,10 +293,13 @@ public final class DataBufferUShort extends DataBuffer * @param bank The bank from which you want to get a data array element. * @param i The data array element you want to get. * @return The requested data array element as an integer. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #setElem(int, int) * @see #setElem(int, int, int) */ public int getElem(int bank, int i) { + checkIndex(bank, i); return bankdata[bank][i+offsets[bank]]&0xffff; } @@ -295,10 +309,12 @@ public final class DataBufferUShort extends DataBuffer * * @param i The data array element you want to set. * @param val The integer value to which you want to set the data array element. + * @throws ArrayIndexOutOfBoundsException if {@code (i + getOffset())} is not a valid index. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int i, int val) { + checkIndex(i); data[i+offset] = (short)(val&0xffff); theTrackable.markDirty(); } @@ -309,10 +325,13 @@ public final class DataBufferUShort extends DataBuffer * @param bank The bank in which you want to set the data array element. * @param i The data array element you want to set. * @param val The integer value to which you want to set the specified data array element. + * @throws ArrayIndexOutOfBoundsException if {@code bank} is not a valid bank index, + * or {@code (i + getOffsets()[bank])} is not a valid index into the bank. * @see #getElem(int) * @see #getElem(int, int) */ public void setElem(int bank, int i, int val) { + checkIndex(bank, i); bankdata[bank][i+offsets[bank]] = (short)(val&0xffff); theTrackable.markDirty(); } diff --git a/src/java.desktop/share/classes/java/beans/ThreadGroupContext.java b/src/java.desktop/share/classes/java/beans/ThreadGroupContext.java index dc42799c9f7..fa7118bbc09 100644 --- a/src/java.desktop/share/classes/java/beans/ThreadGroupContext.java +++ b/src/java.desktop/share/classes/java/beans/ThreadGroupContext.java @@ -35,7 +35,6 @@ import java.util.WeakHashMap; /** * The {@code ThreadGroupContext} is an application-dependent * context referenced by the specific {@link ThreadGroup}. - * This is a replacement for the {@link sun.awt.AppContext}. * * @author Sergey Malenkov */ diff --git a/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java b/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java index 7eaa14133c5..2d6edaca544 100644 --- a/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java +++ b/src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -718,7 +718,6 @@ class SubRegistry { this.category = category; } - @SuppressWarnings("removal") public synchronized boolean registerServiceProvider(Object provider) { Object oprovider = map.get(provider.getClass()); boolean present = oprovider != null; diff --git a/src/java.desktop/share/classes/javax/print/attribute/AttributeSet.java b/src/java.desktop/share/classes/javax/print/attribute/AttributeSet.java index 58b23569a92..0fd2da05d60 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/AttributeSet.java +++ b/src/java.desktop/share/classes/javax/print/attribute/AttributeSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -249,6 +249,7 @@ public interface AttributeSet { * @return {@code true} if the specified object is equal to this attribute * set */ + @Override public boolean equals(Object object); /** @@ -261,5 +262,6 @@ public interface AttributeSet { * * @return the hash code value for this attribute set */ + @Override public int hashCode(); } diff --git a/src/java.desktop/share/classes/javax/print/attribute/AttributeSetUtilities.java b/src/java.desktop/share/classes/javax/print/attribute/AttributeSetUtilities.java index f762eb89925..ea4dcf54f32 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/AttributeSetUtilities.java +++ b/src/java.desktop/share/classes/javax/print/attribute/AttributeSetUtilities.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -101,54 +101,67 @@ public final class AttributeSetUtilities { attrset = attributeSet; } + @Override public Attribute get(Class key) { return attrset.get(key); } + @Override public boolean add(Attribute attribute) { throw new UnmodifiableSetException(); } + @Override public synchronized boolean remove(Class category) { throw new UnmodifiableSetException(); } + @Override public boolean remove(Attribute attribute) { throw new UnmodifiableSetException(); } + @Override public boolean containsKey(Class category) { return attrset.containsKey(category); } + @Override public boolean containsValue(Attribute attribute) { return attrset.containsValue(attribute); } + @Override public boolean addAll(AttributeSet attributes) { throw new UnmodifiableSetException(); } + @Override public int size() { return attrset.size(); } + @Override public Attribute[] toArray() { return attrset.toArray(); } + @Override public void clear() { throw new UnmodifiableSetException(); } + @Override public boolean isEmpty() { return attrset.isEmpty(); } + @Override public boolean equals(Object o) { return attrset.equals (o); } + @Override public int hashCode() { return attrset.hashCode(); } @@ -366,54 +379,67 @@ public final class AttributeSetUtilities { attrset = attributeSet; } + @Override public synchronized Attribute get(Class category) { return attrset.get(category); } + @Override public synchronized boolean add(Attribute attribute) { return attrset.add(attribute); } + @Override public synchronized boolean remove(Class category) { return attrset.remove(category); } + @Override public synchronized boolean remove(Attribute attribute) { return attrset.remove(attribute); } + @Override public synchronized boolean containsKey(Class category) { return attrset.containsKey(category); } + @Override public synchronized boolean containsValue(Attribute attribute) { return attrset.containsValue(attribute); } + @Override public synchronized boolean addAll(AttributeSet attributes) { return attrset.addAll(attributes); } + @Override public synchronized int size() { return attrset.size(); } + @Override public synchronized Attribute[] toArray() { return attrset.toArray(); } + @Override public synchronized void clear() { attrset.clear(); } + @Override public synchronized boolean isEmpty() { return attrset.isEmpty(); } + @Override public synchronized boolean equals(Object o) { return attrset.equals (o); } + @Override public synchronized int hashCode() { return attrset.hashCode(); } diff --git a/src/java.desktop/share/classes/javax/print/attribute/DateTimeSyntax.java b/src/java.desktop/share/classes/javax/print/attribute/DateTimeSyntax.java index 2f0eafb9f79..154b492de84 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/DateTimeSyntax.java +++ b/src/java.desktop/share/classes/javax/print/attribute/DateTimeSyntax.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -114,6 +114,7 @@ public abstract class DateTimeSyntax implements Serializable, Cloneable { * @return {@code true} if {@code object} is equivalent to this date-time * attribute, {@code false} otherwise */ + @Override public boolean equals(Object object) { return object instanceof DateTimeSyntax other && value.equals(other.value); @@ -123,6 +124,7 @@ public abstract class DateTimeSyntax implements Serializable, Cloneable { * Returns a hash code value for this date-time attribute. The hashcode is * that of this attribute's {@code java.util.Date} value. */ + @Override public int hashCode() { return value.hashCode(); } @@ -132,6 +134,7 @@ public abstract class DateTimeSyntax implements Serializable, Cloneable { * string value is just this attribute's {@code java.util.Date} value * converted to a string. */ + @Override public String toString() { return "" + value; } diff --git a/src/java.desktop/share/classes/javax/print/attribute/DocAttributeSet.java b/src/java.desktop/share/classes/javax/print/attribute/DocAttributeSet.java index 102786da27b..2abd6e6322a 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/DocAttributeSet.java +++ b/src/java.desktop/share/classes/javax/print/attribute/DocAttributeSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -59,6 +59,7 @@ public interface DocAttributeSet extends AttributeSet { * interface {@link DocAttribute DocAttribute} * @throws NullPointerException if the {@code attribute} is {@code null} */ + @Override public boolean add(Attribute attribute); /** @@ -88,5 +89,6 @@ public interface DocAttributeSet extends AttributeSet { * @throws NullPointerException if the specified set is {@code null} * @see #add(Attribute) */ + @Override public boolean addAll(AttributeSet attributes); } diff --git a/src/java.desktop/share/classes/javax/print/attribute/EnumSyntax.java b/src/java.desktop/share/classes/javax/print/attribute/EnumSyntax.java index fd48a600ee3..4c291999e02 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/EnumSyntax.java +++ b/src/java.desktop/share/classes/javax/print/attribute/EnumSyntax.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -145,6 +145,7 @@ public abstract class EnumSyntax implements Serializable, Cloneable { * semantics of enumeration values is the same object as this enumeration * value. */ + @Override public Object clone() { return this; } @@ -153,6 +154,7 @@ public abstract class EnumSyntax implements Serializable, Cloneable { * Returns a hash code value for this enumeration value. The hash code is * just this enumeration value's integer value. */ + @Override public int hashCode() { return value; } @@ -160,6 +162,7 @@ public abstract class EnumSyntax implements Serializable, Cloneable { /** * Returns a string value corresponding to this enumeration value. */ + @Override public String toString() { String[] theTable = getStringTable(); diff --git a/src/java.desktop/share/classes/javax/print/attribute/HashAttributeSet.java b/src/java.desktop/share/classes/javax/print/attribute/HashAttributeSet.java index 4ad4c8634aa..6800b45a349 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/HashAttributeSet.java +++ b/src/java.desktop/share/classes/javax/print/attribute/HashAttributeSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -255,6 +255,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * {@link Class Class} that implements interface * {@link Attribute Attribute} */ + @Override public Attribute get(Class category) { return attrMap.get(AttributeSetUtilities. verifyAttributeCategory(category, @@ -274,6 +275,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * @throws UnmodifiableSetException if this attribute set does not support * the {@code add()} operation */ + @Override public boolean add(Attribute attribute) { Object oldAttribute = attrMap.put(attribute.getCategory(), @@ -294,6 +296,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * @throws UnmodifiableSetException if this attribute set does not support * the {@code remove()} operation */ + @Override public boolean remove(Class category) { return category != null && @@ -314,6 +317,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * @throws UnmodifiableSetException if this attribute set does not support * the {@code remove()} operation */ + @Override public boolean remove(Attribute attribute) { return attribute != null && @@ -328,6 +332,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * @return {@code true} if this attribute set contains an attribute value * for the specified category */ + @Override public boolean containsKey(Class category) { return category != null && @@ -344,6 +349,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * @return {@code true} if this attribute set contains the given attribute * value */ + @Override public boolean containsValue(Attribute attribute) { return attribute != null && attribute.equals(attrMap.get(attribute.getCategory())); @@ -371,6 +377,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * {@code null}, or the set is {@code null} * @see #add(Attribute) */ + @Override public boolean addAll(AttributeSet attributes) { Attribute []attrs = attributes.toArray(); @@ -392,6 +399,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * * @return the number of attributes in this attribute set */ + @Override public int size() { return attrMap.size(); } @@ -402,6 +410,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * @return the attributes contained in this set as an array, zero length if * the {@code AttributeSet} is empty */ + @Override public Attribute[] toArray() { Attribute []attrs = new Attribute[size()]; attrMap.values().toArray(attrs); @@ -414,6 +423,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * @throws UnmodifiableSetException if this attribute set does not support * the {@code clear()} operation */ + @Override public void clear() { attrMap.clear(); } @@ -423,6 +433,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * * @return {@code true} if this attribute set contains no attributes */ + @Override public boolean isEmpty() { return attrMap.isEmpty(); } @@ -438,6 +449,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * @return {@code true} if the specified object is equal to this attribute * set */ + @Override public boolean equals(Object object) { if (!(object instanceof AttributeSet aset)) { return false; @@ -466,6 +478,7 @@ public class HashAttributeSet implements AttributeSet, Serializable { * * @return the hash code value for this attribute set */ + @Override public int hashCode() { int hcode = 0; Attribute[] attrs = toArray(); diff --git a/src/java.desktop/share/classes/javax/print/attribute/IntegerSyntax.java b/src/java.desktop/share/classes/javax/print/attribute/IntegerSyntax.java index f6dbee3aa5a..b6846ff7271 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/IntegerSyntax.java +++ b/src/java.desktop/share/classes/javax/print/attribute/IntegerSyntax.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -107,6 +107,7 @@ public abstract class IntegerSyntax implements Serializable, Cloneable { * @return {@code true} if {@code object} is equivalent to this integer * attribute, {@code false} otherwise */ + @Override public boolean equals(Object object) { return object instanceof IntegerSyntax other && value == other.value; @@ -116,6 +117,7 @@ public abstract class IntegerSyntax implements Serializable, Cloneable { * Returns a hash code value for this integer attribute. The hash code is * just this integer attribute's integer value. */ + @Override public int hashCode() { return value; } @@ -125,6 +127,7 @@ public abstract class IntegerSyntax implements Serializable, Cloneable { * string value is just this integer attribute's integer value converted to * a string. */ + @Override public String toString() { return "" + value; } diff --git a/src/java.desktop/share/classes/javax/print/attribute/PrintJobAttributeSet.java b/src/java.desktop/share/classes/javax/print/attribute/PrintJobAttributeSet.java index 63535fba93e..ce22602f4d5 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/PrintJobAttributeSet.java +++ b/src/java.desktop/share/classes/javax/print/attribute/PrintJobAttributeSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -59,6 +59,7 @@ public interface PrintJobAttributeSet extends AttributeSet { * interface {@link PrintJobAttribute PrintJobAttribute} * @throws NullPointerException if the {@code attribute} is {@code null} */ + @Override public boolean add(Attribute attribute); /** @@ -88,5 +89,6 @@ public interface PrintJobAttributeSet extends AttributeSet { * @throws NullPointerException if the specified set is {@code null} * @see #add(Attribute) */ + @Override public boolean addAll(AttributeSet attributes); } diff --git a/src/java.desktop/share/classes/javax/print/attribute/PrintRequestAttributeSet.java b/src/java.desktop/share/classes/javax/print/attribute/PrintRequestAttributeSet.java index 95a07655f03..958d255b296 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/PrintRequestAttributeSet.java +++ b/src/java.desktop/share/classes/javax/print/attribute/PrintRequestAttributeSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -60,6 +60,7 @@ public interface PrintRequestAttributeSet extends AttributeSet { * interface {@link PrintRequestAttribute PrintRequestAttribute} * @throws NullPointerException if the {@code attribute} is {@code null} */ + @Override public boolean add(Attribute attribute); /** @@ -90,5 +91,6 @@ public interface PrintRequestAttributeSet extends AttributeSet { * @throws NullPointerException if the specified set is {@code null} * @see #add(Attribute) */ + @Override public boolean addAll(AttributeSet attributes); } diff --git a/src/java.desktop/share/classes/javax/print/attribute/PrintServiceAttributeSet.java b/src/java.desktop/share/classes/javax/print/attribute/PrintServiceAttributeSet.java index fd2d4dc4694..a456eac07b6 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/PrintServiceAttributeSet.java +++ b/src/java.desktop/share/classes/javax/print/attribute/PrintServiceAttributeSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -60,6 +60,7 @@ public interface PrintServiceAttributeSet extends AttributeSet { * interface {@link PrintServiceAttribute PrintServiceAttribute} * @throws NullPointerException if the {@code attribute} is {@code null} */ + @Override public boolean add(Attribute attribute); /** @@ -90,5 +91,6 @@ public interface PrintServiceAttributeSet extends AttributeSet { * @throws NullPointerException if the specified set is {@code null} * @see #add(Attribute) */ + @Override public boolean addAll(AttributeSet attributes); } diff --git a/src/java.desktop/share/classes/javax/print/attribute/ResolutionSyntax.java b/src/java.desktop/share/classes/javax/print/attribute/ResolutionSyntax.java index 8ffae65a0d2..ffb1fab3619 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/ResolutionSyntax.java +++ b/src/java.desktop/share/classes/javax/print/attribute/ResolutionSyntax.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -266,6 +266,7 @@ public abstract class ResolutionSyntax implements Serializable, Cloneable { * @return {@code true} if {@code object} is equivalent to this resolution * attribute, {@code false} otherwise */ + @Override public boolean equals(Object object) { return object instanceof ResolutionSyntax other && this.crossFeedResolution == other.crossFeedResolution && @@ -275,6 +276,7 @@ public abstract class ResolutionSyntax implements Serializable, Cloneable { /** * Returns a hash code value for this resolution attribute. */ + @Override public int hashCode() { return(((crossFeedResolution & 0x0000FFFF)) | ((feedResolution & 0x0000FFFF) << 16)); @@ -286,6 +288,7 @@ public abstract class ResolutionSyntax implements Serializable, Cloneable { * cross feed direction resolution and F is the feed direction * resolution. The values are reported in the internal units of dphi. */ + @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(crossFeedResolution); diff --git a/src/java.desktop/share/classes/javax/print/attribute/SetOfIntegerSyntax.java b/src/java.desktop/share/classes/javax/print/attribute/SetOfIntegerSyntax.java index 6df67ef90ca..8088cfcd743 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/SetOfIntegerSyntax.java +++ b/src/java.desktop/share/classes/javax/print/attribute/SetOfIntegerSyntax.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -482,6 +482,7 @@ public abstract class SetOfIntegerSyntax implements Serializable, Cloneable { * @return {@code true} if {@code object} is equivalent to this * set-of-integer attribute, {@code false} otherwise */ + @Override public boolean equals(Object object) { if (object instanceof SetOfIntegerSyntax other) { int[][] myMembers = this.members; @@ -509,6 +510,7 @@ public abstract class SetOfIntegerSyntax implements Serializable, Cloneable { * code is the sum of the lower and upper bounds of the ranges in the * canonical array form, or 0 for an empty set. */ + @Override public int hashCode() { int result = 0; int n = members.length; @@ -526,6 +528,7 @@ public abstract class SetOfIntegerSyntax implements Serializable, Cloneable { * the lower bound equals the upper bound or * "i-j" otherwise. */ + @Override public String toString() { StringBuilder result = new StringBuilder(); int n = members.length; diff --git a/src/java.desktop/share/classes/javax/print/attribute/Size2DSyntax.java b/src/java.desktop/share/classes/javax/print/attribute/Size2DSyntax.java index 9ff772bc30d..056031b52f2 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/Size2DSyntax.java +++ b/src/java.desktop/share/classes/javax/print/attribute/Size2DSyntax.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -263,6 +263,7 @@ public abstract class Size2DSyntax implements Serializable, Cloneable { * @return {@code true} if {@code object} is equivalent to this * two-dimensional size attribute, {@code false} otherwise */ + @Override public boolean equals(Object object) { return object instanceof Size2DSyntax size2DSyntax && this.x == size2DSyntax.x && @@ -272,6 +273,7 @@ public abstract class Size2DSyntax implements Serializable, Cloneable { /** * Returns a hash code value for this two-dimensional size attribute. */ + @Override public int hashCode() { return (((x & 0x0000FFFF) ) | ((y & 0x0000FFFF) << 16)); @@ -283,6 +285,7 @@ public abstract class Size2DSyntax implements Serializable, Cloneable { * is the {@code X} dimension and Y is the {@code Y} dimension. The * values are reported in the internal units of micrometers. */ + @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(x); diff --git a/src/java.desktop/share/classes/javax/print/attribute/TextSyntax.java b/src/java.desktop/share/classes/javax/print/attribute/TextSyntax.java index 9a343bc8af2..2c49a11b250 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/TextSyntax.java +++ b/src/java.desktop/share/classes/javax/print/attribute/TextSyntax.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -112,6 +112,7 @@ public abstract class TextSyntax implements Serializable, Cloneable { * * @return a hashcode value for this object */ + @Override public int hashCode() { return value.hashCode() ^ locale.hashCode(); } @@ -131,6 +132,7 @@ public abstract class TextSyntax implements Serializable, Cloneable { * @return {@code true} if {@code object} is equivalent to this text * attribute, {@code false} otherwise */ + @Override public boolean equals(Object object) { return object instanceof TextSyntax other && this.value.equals(other.value) && @@ -143,6 +145,7 @@ public abstract class TextSyntax implements Serializable, Cloneable { * * @return a {@code String} identifying this object */ + @Override public String toString(){ return value; } diff --git a/src/java.desktop/share/classes/javax/print/attribute/URISyntax.java b/src/java.desktop/share/classes/javax/print/attribute/URISyntax.java index 10545df71fd..b3e604283f7 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/URISyntax.java +++ b/src/java.desktop/share/classes/javax/print/attribute/URISyntax.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -82,6 +82,7 @@ public abstract class URISyntax implements Serializable, Cloneable { * * @return a hashcode value for this object */ + @Override public int hashCode() { return uri.hashCode(); } @@ -100,6 +101,7 @@ public abstract class URISyntax implements Serializable, Cloneable { * @return {@code true} if {@code object} is equivalent to this {@code URI} * attribute, {@code false} otherwise */ + @Override public boolean equals(Object object) { return object instanceof URISyntax other && this.uri.equals(other.uri); @@ -112,6 +114,7 @@ public abstract class URISyntax implements Serializable, Cloneable { * * @return a {@code String} identifying this object */ + @Override public String toString() { return uri.toString(); } diff --git a/src/java.desktop/share/classes/javax/swing/JComponent.java b/src/java.desktop/share/classes/javax/swing/JComponent.java index 87d6a41c2b0..9a7e67913ff 100644 --- a/src/java.desktop/share/classes/javax/swing/JComponent.java +++ b/src/java.desktop/share/classes/javax/swing/JComponent.java @@ -5070,7 +5070,6 @@ public abstract class JComponent extends Container implements Serializable, this.paintingChild = paintingChild; } - @SuppressWarnings("removal") void _paintImmediately(int x, int y, int w, int h) { Graphics g; Container c; diff --git a/src/java.desktop/share/classes/javax/swing/PopupFactory.java b/src/java.desktop/share/classes/javax/swing/PopupFactory.java index 7245820c289..58a74def3b6 100644 --- a/src/java.desktop/share/classes/javax/swing/PopupFactory.java +++ b/src/java.desktop/share/classes/javax/swing/PopupFactory.java @@ -865,7 +865,6 @@ public class PopupFactory { /** * Returns the cache to use for medium weight popups. */ - @SuppressWarnings("unchecked") private static List getMediumWeightPopupCache() { synchronized (MediumWeightPopup.class) { if (cache == null) { diff --git a/src/java.desktop/share/classes/javax/swing/RepaintManager.java b/src/java.desktop/share/classes/javax/swing/RepaintManager.java index ab21e555919..9901ef04a47 100644 --- a/src/java.desktop/share/classes/javax/swing/RepaintManager.java +++ b/src/java.desktop/share/classes/javax/swing/RepaintManager.java @@ -1026,7 +1026,7 @@ public class RepaintManager // If the window is non-opaque, it's double-buffered at peer's level Window w = (c instanceof Window) ? (Window)c : SwingUtilities.getWindowAncestor(c); - if (!w.isOpaque()) { + if (w != null && !w.isOpaque()) { Toolkit tk = Toolkit.getDefaultToolkit(); if ((tk instanceof SunToolkit) && (((SunToolkit)tk).needUpdateWindow())) { return null; diff --git a/src/java.desktop/share/classes/javax/swing/ToolTipManager.java b/src/java.desktop/share/classes/javax/swing/ToolTipManager.java index 4c3d0209823..58a4b384ccf 100644 --- a/src/java.desktop/share/classes/javax/swing/ToolTipManager.java +++ b/src/java.desktop/share/classes/javax/swing/ToolTipManager.java @@ -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 @@ -818,7 +818,6 @@ public final class ToolTipManager extends MouseAdapter implements MouseMotionLis // Returns: 0 no adjust // >0 adjust by value return - @SuppressWarnings("removal") private int getPopupFitHeight(Rectangle popupRectInScreen, Component invoker){ if (invoker != null){ Container parent; diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicProgressBarUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicProgressBarUI.java index 724901b4bcd..d249bf0bc9d 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicProgressBarUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicProgressBarUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, 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 @@ -710,7 +710,8 @@ public class BasicProgressBarUI extends ProgressBarUI { * @since 1.4 */ protected void paintDeterminate(Graphics g, JComponent c) { - if (!(g instanceof Graphics2D)) { + boolean isPrinting = SwingUtilities2.isPrinting(g); + if (!(g instanceof Graphics2D) && !isPrinting) { return; } @@ -727,49 +728,94 @@ public class BasicProgressBarUI extends ProgressBarUI { // amount of progress to draw int amountFull = getAmountFull(b, barRectWidth, barRectHeight); - Graphics2D g2 = (Graphics2D)g; - g2.setColor(progressBar.getForeground()); + Graphics2D g2d = null; + if (g instanceof Graphics2D) { + g2d = (Graphics2D) g; + } + g.setColor(progressBar.getForeground()); if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) { // draw the cells - if (cellSpacing == 0 && amountFull > 0) { - // draw one big Rect because there is no space between cells - g2.setStroke(new BasicStroke((float)barRectHeight, - BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); - } else { - // draw each individual cell - g2.setStroke(new BasicStroke((float)barRectHeight, - BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, - 0.f, new float[] { cellLength, cellSpacing }, 0.f)); + if (g instanceof Graphics2D) { + if (cellSpacing == 0 && amountFull > 0) { + // draw one big Rect because there is no space between cells + g2d.setStroke(new BasicStroke((float) barRectHeight, + BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); + } else { + // draw each individual cell + g2d.setStroke(new BasicStroke((float) barRectHeight, + BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, + 0.f, new float[]{cellLength, cellSpacing}, 0.f)); + } } if (BasicGraphicsUtils.isLeftToRight(c)) { - g2.drawLine(b.left, (barRectHeight/2) + b.top, - amountFull + b.left, (barRectHeight/2) + b.top); + if (g instanceof Graphics2D) { + g.drawLine(b.left, (barRectHeight / 2) + b.top, + amountFull + b.left, (barRectHeight / 2) + b.top); + } else { + g.drawRect(b.left, b.top, barRectWidth, barRectHeight); + if (cellSpacing == 0 && amountFull > 0) { + g.fillRect(b.left, b.top, amountFull, barRectHeight); + } else { + for (int i = 0; i < barRectWidth; i += cellLength + cellSpacing) { + g.fillRect(b.left + i, b.top, + cellLength, barRectHeight); + } + } + } } else { - g2.drawLine((barRectWidth + b.left), - (barRectHeight/2) + b.top, - barRectWidth + b.left - amountFull, - (barRectHeight/2) + b.top); + if (g instanceof Graphics2D) { + g.drawLine((barRectWidth + b.left), + (barRectHeight / 2) + b.top, + barRectWidth + b.left - amountFull, + (barRectHeight / 2) + b.top); + } else { + g.drawRect(b.left, b.top, barRectWidth, barRectHeight); + if (cellSpacing == 0 && amountFull > 0) { + g.fillRect(barRectWidth + b.left, b.top, amountFull, barRectHeight); + } else { + for (int i = 0; i < barRectWidth; i += cellLength + cellSpacing) { + g.fillRect( barRectWidth + b.left + i, b.top, + cellLength, barRectHeight); + } + } + } } } else { // VERTICAL // draw the cells - if (cellSpacing == 0 && amountFull > 0) { - // draw one big Rect because there is no space between cells - g2.setStroke(new BasicStroke((float)barRectWidth, - BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); - } else { - // draw each individual cell - g2.setStroke(new BasicStroke((float)barRectWidth, - BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, - 0f, new float[] { cellLength, cellSpacing }, 0f)); + if (g instanceof Graphics2D) { + if (cellSpacing == 0 && amountFull > 0) { + // draw one big Rect because there is no space between cells + g2d.setStroke(new BasicStroke((float) barRectWidth, + BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); + } else { + // draw each individual cell + g2d.setStroke(new BasicStroke((float) barRectWidth, + BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, + 0f, new float[]{cellLength, cellSpacing}, 0f)); + } } - g2.drawLine(barRectWidth/2 + b.left, - b.top + barRectHeight, - barRectWidth/2 + b.left, - b.top + barRectHeight - amountFull); + if (g instanceof Graphics2D) { + g.drawLine(barRectWidth / 2 + b.left, + b.top + barRectHeight, + barRectWidth / 2 + b.left, + b.top + barRectHeight - amountFull); + } else { + g.drawRect(b.left, b.top, barRectWidth, barRectHeight); + if (cellSpacing == 0 && amountFull > 0) { + g.fillRect(b.left, b.top + barRectHeight - amountFull, + barRectWidth, amountFull); + } + else { + for (int i = 0; i < barRectHeight; i += cellLength + cellSpacing) { + g.fillRect(b.left, b.top + barRectHeight - i, + barRectWidth, cellLength); + } + } + } } // Deal with possible text painting @@ -838,40 +884,35 @@ public class BasicProgressBarUI extends ProgressBarUI { */ private void paintString(Graphics g, int x, int y, int width, int height, int fillStart, int amountFull, Insets b) { - if (!(g instanceof Graphics2D)) { - return; - } - - Graphics2D g2 = (Graphics2D)g; String progressString = progressBar.getString(); - g2.setFont(progressBar.getFont()); - Point renderLocation = getStringPlacement(g2, progressString, + g.setFont(progressBar.getFont()); + Point renderLocation = getStringPlacement(g, progressString, x, y, width, height); - Rectangle oldClip = g2.getClipBounds(); + Rectangle oldClip = g.getClipBounds(); if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) { - g2.setColor(getSelectionBackground()); - SwingUtilities2.drawString(progressBar, g2, progressString, - renderLocation.x, renderLocation.y); - g2.setColor(getSelectionForeground()); - g2.clipRect(fillStart, y, amountFull, height); - SwingUtilities2.drawString(progressBar, g2, progressString, + g.setColor(getSelectionBackground()); + SwingUtilities2.drawString(progressBar, g, progressString, renderLocation.x, renderLocation.y); + g.setColor(getSelectionForeground()); + g.clipRect(fillStart, y, amountFull, height); + SwingUtilities2.drawString(progressBar, g, progressString, + renderLocation.x, renderLocation.y); } else { // VERTICAL - g2.setColor(getSelectionBackground()); + g.setColor(getSelectionBackground()); AffineTransform rotate = AffineTransform.getRotateInstance(Math.PI/2); - g2.setFont(progressBar.getFont().deriveFont(rotate)); - renderLocation = getStringPlacement(g2, progressString, + g.setFont(progressBar.getFont().deriveFont(rotate)); + renderLocation = getStringPlacement(g, progressString, x, y, width, height); - SwingUtilities2.drawString(progressBar, g2, progressString, + SwingUtilities2.drawString(progressBar, g, progressString, renderLocation.x, renderLocation.y); - g2.setColor(getSelectionForeground()); - g2.clipRect(x, fillStart, width, amountFull); - SwingUtilities2.drawString(progressBar, g2, progressString, + g.setColor(getSelectionForeground()); + g.clipRect(x, fillStart, width, amountFull); + SwingUtilities2.drawString(progressBar, g, progressString, renderLocation.x, renderLocation.y); } - g2.setClip(oldClip); + g.setClip(oldClip); } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java index a300110cced..f589cd57f8e 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -344,7 +344,7 @@ public class SynthProgressBarUI extends BasicProgressBarUI if (rotateText && progressBar.getOrientation() == JProgressBar.VERTICAL){ - Graphics2D g2 = (Graphics2D)g; + // Calculate the position for the text. Point textPos; AffineTransform rotation; @@ -367,8 +367,8 @@ public class SynthProgressBarUI extends BasicProgressBarUI // Paint the text. font = font.deriveFont(rotation); - g2.setFont(font); - g2.setColor(style.getColor(context, ColorType.TEXT_FOREGROUND)); + g.setFont(font); + g.setColor(style.getColor(context, ColorType.TEXT_FOREGROUND)); style.getGraphicsUtils(context).paintText(context, g, title, textPos.x, textPos.y, -1); } else { diff --git a/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java b/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java index ed502e8da9b..f76e0405124 100644 --- a/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java +++ b/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, 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 @@ -25,6 +25,7 @@ package javax.swing.text; +import java.awt.Color; import java.awt.Graphics; import java.awt.HeadlessException; import java.awt.Point; @@ -690,7 +691,25 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou // semantics of damage we can't really get around this. damage(r); } - g.setColor(component.getCaretColor()); + if (component.isEditable()) { + g.setColor(component.getCaretColor()); + } else { + Color caretColor = component.getCaretColor(); + if (caretColor == null) { + caretColor = g.getColor(); + } + Color bg = component.getBackground(); + if (bg == null) { + g.setColor(caretColor); + } else { + int red = (caretColor.getRed() + bg.getRed()) / 2; + int green = (caretColor.getGreen() + bg.getGreen()) / 2; + int blue = (caretColor.getBlue() + bg.getBlue()) / 2; + int alpha = 127; + Color newCaretColor = new Color(red, green, blue, alpha); + g.setColor(newCaretColor); + } + } int paintWidth = getCaretWidth(r.height); r.x -= paintWidth >> 1; g.fillRect(r.x, r.y, paintWidth, r.height); diff --git a/src/java.desktop/share/classes/sun/awt/AWTAccessor.java b/src/java.desktop/share/classes/sun/awt/AWTAccessor.java index 143d7e6198c..d6eb71246f9 100644 --- a/src/java.desktop/share/classes/sun/awt/AWTAccessor.java +++ b/src/java.desktop/share/classes/sun/awt/AWTAccessor.java @@ -545,6 +545,11 @@ public final class AWTAccessor { * Returns whether the file dialog allows the multiple file selection. */ boolean isMultipleMode(FileDialog fileDialog); + + /* + * Returns whether dispose is being run + */ + boolean isBeingDisposed(FileDialog fileDialog); } /* diff --git a/src/java.desktop/share/classes/sun/awt/AWTAutoShutdown.java b/src/java.desktop/share/classes/sun/awt/AWTAutoShutdown.java index d60211ae318..d3f7b32ae8c 100644 --- a/src/java.desktop/share/classes/sun/awt/AWTAutoShutdown.java +++ b/src/java.desktop/share/classes/sun/awt/AWTAutoShutdown.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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,6 +26,7 @@ package sun.awt; import java.awt.AWTEvent; +import java.awt.Toolkit; import java.util.HashSet; import java.util.IdentityHashMap; import java.util.Map; @@ -317,7 +318,7 @@ public final class AWTAutoShutdown implements Runnable { } } if (!interrupted) { - AppContext.stopEventDispatchThreads(); + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(getShutdownEvent()); } } diff --git a/src/java.desktop/share/classes/sun/awt/AppContext.java b/src/java.desktop/share/classes/sun/awt/AppContext.java index 01b1dd09887..ee70f05c04d 100644 --- a/src/java.desktop/share/classes/sun/awt/AppContext.java +++ b/src/java.desktop/share/classes/sun/awt/AppContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -480,44 +480,6 @@ public final class AppContext { mostRecentKeyValue = null; } - static final class PostShutdownEventRunnable implements Runnable { - private final AppContext appContext; - - PostShutdownEventRunnable(AppContext ac) { - appContext = ac; - } - - public void run() { - final EventQueue eq = (EventQueue)appContext.get(EVENT_QUEUE_KEY); - if (eq != null) { - eq.postEvent(AWTAutoShutdown.getShutdownEvent()); - } - } - } - - static void stopEventDispatchThreads() { - for (AppContext appContext: getAppContexts()) { - if (appContext.isDisposed()) { - continue; - } - Runnable r = new PostShutdownEventRunnable(appContext); - // For security reasons EventQueue.postEvent should only be called - // on a thread that belongs to the corresponding thread group. - if (appContext != AppContext.getAppContext()) { - // Create a thread that belongs to the thread group associated - // with the AppContext and invokes EventQueue.postEvent. - Thread thread = new Thread(appContext.getThreadGroup(), - r, "AppContext Disposer", 0, false); - thread.setContextClassLoader(appContext.getContextClassLoader()); - thread.setPriority(Thread.NORM_PRIORITY + 1); - thread.setDaemon(true); - thread.start(); - } else { - r.run(); - } - } - } - private MostRecentKeyValue mostRecentKeyValue = null; private MostRecentKeyValue shadowMostRecentKeyValue = null; diff --git a/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java b/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java index 1d0e6df3734..65f7dbf11eb 100644 --- a/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java +++ b/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java @@ -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 abstract class AreaOp { 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 @@ public abstract class AreaOp { } }; + private void consumeSubCurves(Vector subcurves, + Vector chains, + Vector curve) { + finalizeSubCurves(subcurves, chains); + Enumeration 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 pruneEdges(Vector edges) { int numedges = edges.size(); if (numedges < 2) { @@ -218,6 +239,8 @@ public abstract class AreaOp { Vector subcurves = new Vector<>(); Vector chains = new Vector<>(); Vector links = new Vector<>(); + Vector 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 @@ public abstract class AreaOp { 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 ret = new Vector<>(); - Enumeration 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 --git a/src/java.desktop/share/classes/sun/awt/geom/Curve.java b/src/java.desktop/share/classes/sun/awt/geom/Curve.java index 83986b88777..7cdb45e5a22 100644 --- a/src/java.desktop/share/classes/sun/awt/geom/Curve.java +++ b/src/java.desktop/share/classes/sun/awt/geom/Curve.java @@ -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 @@ public abstract class Curve { 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 abstract class Curve { 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 --git a/src/java.desktop/share/classes/sun/font/HBShaper.java b/src/java.desktop/share/classes/sun/font/HBShaper.java index dea8a9e22dd..1e0b918ce54 100644 --- a/src/java.desktop/share/classes/sun/font/HBShaper.java +++ b/src/java.desktop/share/classes/sun/font/HBShaper.java @@ -174,6 +174,17 @@ public class HBShaper { MethodHandle tmp1 = LINKER.downcallHandle(malloc_symbol, mallocDescriptor); malloc_handle = tmp1; + MemorySegment free_symbol = SYM_LOOKUP.findOrThrow("free"); + long free_address = free_symbol.address(); + FunctionDescriptor setFreeFnDescriptor = FunctionDescriptor.ofVoid(JAVA_LONG); + MemorySegment set_free = SYM_LOOKUP.findOrThrow("HBSetFreeFn"); + @SuppressWarnings("restricted") + MethodHandle set_free_handle = LINKER.downcallHandle(set_free, setFreeFnDescriptor); + try { + set_free_handle.invokeExact(free_address); + } catch (Throwable t) { + } + FunctionDescriptor createFaceDescriptor = FunctionDescriptor.of(ADDRESS, ADDRESS); MemorySegment create_face_symbol = SYM_LOOKUP.findOrThrow("HBCreateFace"); diff --git a/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java b/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java index 8c6d6ab9850..565fd9608ab 100644 --- a/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java +++ b/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java @@ -1292,7 +1292,7 @@ public class SwingUtilities2 { * returns true if the Graphics is print Graphics * false otherwise */ - static boolean isPrinting(Graphics g) { + public static boolean isPrinting(Graphics g) { return (g instanceof PrinterGraphics || g instanceof PrintGraphics); } diff --git a/src/java.desktop/share/native/common/awt/medialib/mlib_ImageCreate.c b/src/java.desktop/share/native/common/awt/medialib/mlib_ImageCreate.c index 6bb9b36e494..830e86a2a51 100644 --- a/src/java.desktop/share/native/common/awt/medialib/mlib_ImageCreate.c +++ b/src/java.desktop/share/native/common/awt/medialib/mlib_ImageCreate.c @@ -116,6 +116,7 @@ * mlib_ImageSetFormat() sets new value for the image format */ +#include #include #include "mlib_image.h" #include "mlib_ImageRowTable.h" @@ -313,10 +314,12 @@ mlib_image* mlib_ImageCreate(mlib_type type, return NULL; } + data = mlib_malloc(wb * height); if (data == NULL) { return NULL; } + memset(data, 0, wb * height); image = (mlib_image *)mlib_malloc(sizeof(mlib_image)); if (image == NULL) { diff --git a/src/java.desktop/share/native/common/java2d/opengl/OGLRenderQueue.c b/src/java.desktop/share/native/common/java2d/opengl/OGLRenderQueue.c index 2bafc33f588..ddd9b1c6eb2 100644 --- a/src/java.desktop/share/native/common/java2d/opengl/OGLRenderQueue.c +++ b/src/java.desktop/share/native/common/java2d/opengl/OGLRenderQueue.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -433,6 +433,7 @@ Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer jlong pDst = NEXT_LONG(b); if (oglc != NULL) { RESET_PREVIOUS_OP(); + OGLSD_Flush(env); } oglc = OGLContext_SetSurfaces(env, pSrc, pDst); dstOps = (OGLSDOps *)jlong_to_ptr(pDst); @@ -443,6 +444,7 @@ Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer jlong pConfigInfo = NEXT_LONG(b); if (oglc != NULL) { RESET_PREVIOUS_OP(); + OGLSD_Flush(env); } oglc = OGLSD_SetScratchSurface(env, pConfigInfo); dstOps = NULL; diff --git a/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c b/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c index ae86b309465..bb93108f111 100644 --- a/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c +++ b/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c @@ -1133,12 +1133,14 @@ fprintf(stderr,"Flags : %d\n",dst->flags); { unsigned char *cP = (unsigned char *)mlib_ImageGetData(dst); - memset(cP, 0, mlib_ImageGetWidth(dst)*mlib_ImageGetHeight(dst)); + if (ddata == NULL) { // zero medialib allocated memory + memset(cP, 0, mlib_ImageGetWidth(dst) * mlib_ImageGetHeight(dst) * mlib_ImageGetChannels(dst)); + } } /* Perform the transformation */ - if ((status = (*sMlibFns[MLIB_AFFINE].fptr)(dst, src, mtx, filter, - MLIB_EDGE_SRC_EXTEND) != MLIB_SUCCESS)) + status = (*sMlibFns[MLIB_AFFINE].fptr)(dst, src, mtx, filter, MLIB_EDGE_SRC_EXTEND); + if (status != MLIB_SUCCESS) { printMedialibError(status); /* REMIND: Free the regions */ diff --git a/src/java.desktop/share/native/libfontmanager/hb-jdk-font-p.cc b/src/java.desktop/share/native/libfontmanager/hb-jdk-font-p.cc index 590c273d151..1e5db4e0adf 100644 --- a/src/java.desktop/share/native/libfontmanager/hb-jdk-font-p.cc +++ b/src/java.desktop/share/native/libfontmanager/hb-jdk-font-p.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 @@ -174,6 +174,22 @@ static void _do_nothing(void) { typedef int (*GetTableDataFn) (int tag, char **dataPtr); +typedef void (*ffm_free_t) (void *ptr); + +static ffm_free_t ffm_free_fn = NULL; + +/* We pass the address of "free" which was obtained by FFM so that it matches + * the malloc found by FFM + */ +#include +static void ffmfree(void *ptr) { + if (ffm_free_fn != NULL) { + ffm_free_fn(ptr); + } else { + free(ptr); + } +} + static hb_blob_t * reference_table(hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) { @@ -200,11 +216,15 @@ reference_table(hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) { */ return hb_blob_create((const char *)tableData, length, HB_MEMORY_MODE_WRITABLE, - tableData, free); + tableData, ffmfree); } extern "C" { +JDKEXPORT void HBSetFreeFn(void *free_fn) { + ffm_free_fn = (ffm_free_t)free_fn; +} + JDKEXPORT hb_face_t* HBCreateFace(GetTableDataFn *get_data_upcall_fn) { hb_face_t *face = hb_face_create_for_tables(reference_table, get_data_upcall_fn, NULL); diff --git a/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java b/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java index 81348327294..fbf5d27543e 100644 --- a/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java +++ b/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java @@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1233,10 +1233,12 @@ final class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClie */ @Override public void select(int index) { - // Programmatic select() should also set the focus index - setFocusIndex(index); - repaint(PAINT_FOCUS); - selectItem(index); + if (index >= 0 && index < items.size()) { + // Programmatic select() should also set the focus index + setFocusIndex(index); + repaint(PAINT_FOCUS); + selectItem(index); + } } /** diff --git a/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java b/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java index 1ec0039febd..0f6aa73f204 100644 --- a/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java +++ b/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java @@ -128,7 +128,6 @@ import javax.swing.LookAndFeel; import javax.swing.UIDefaults; import sun.awt.AWTAccessor; -import sun.awt.AppContext; import sun.awt.DisplayChangedListener; import sun.awt.LightweightFrame; import sun.awt.SunToolkit; diff --git a/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java b/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java index b79f2f9033f..a1010543572 100644 --- a/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java +++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ import java.awt.Color; import java.awt.Component; import java.awt.Container; import java.awt.Cursor; +import java.awt.EventQueue; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; @@ -425,7 +426,7 @@ class XWindow extends XBaseWindow implements X11ComponentPeer { if (focusLog.isLoggable(PlatformLogger.Level.FINER) && (e instanceof FocusEvent)) { focusLog.finer("Sending " + e); } - XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), pe); + XToolkit.postEvent(pe); } @@ -435,11 +436,11 @@ class XWindow extends XBaseWindow implements X11ComponentPeer { // NOTE: This method may be called by privileged threads. // DO NOT INVOKE CLIENT CODE ON THIS THREAD! void postEvent(AWTEvent event) { - XToolkit.postEvent(XToolkit.targetToAppContext(event.getSource()), event); + XToolkit.postEvent(event); } static void postEventStatic(AWTEvent event) { - XToolkit.postEvent(XToolkit.targetToAppContext(event.getSource()), event); + XToolkit.postEvent(event); } public void postEventToEventQueue(final AWTEvent event) { @@ -514,7 +515,7 @@ class XWindow extends XBaseWindow implements X11ComponentPeer { if (g != null) { try { g.setClip(x, y, width, height); - if (SunToolkit.isDispatchThreadForAppContext(getTarget())) { + if (EventQueue.isDispatchThread()) { paint(g); // The native and target will be painted in place. } else { paintPeer(g); diff --git a/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsProgressBarUI.java b/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsProgressBarUI.java index 5440b98cd1b..873dae49edb 100644 --- a/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsProgressBarUI.java +++ b/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsProgressBarUI.java @@ -25,6 +25,8 @@ package com.sun.java.swing.plaf.windows; +import sun.swing.SwingUtilities2; + import java.awt.AlphaComposite; import java.awt.BasicStroke; import java.awt.Dimension; @@ -134,13 +136,22 @@ public class WindowsProgressBarUI extends BasicProgressBarUI if (xp != null) { boolean vertical = (progressBar.getOrientation() == JProgressBar.VERTICAL); boolean isLeftToRight = WindowsGraphicsUtils.isLeftToRight(c); - Graphics2D g2 = (Graphics2D) g; - AffineTransform at = g2.getTransform(); - double scaleX = at.getScaleX(); - double scaleY = at.getScaleY(); + int barRectWidth, barRectHeight; + Graphics2D g2d = null; + double scaleX = 0, scaleY = 0; + if (g instanceof Graphics2D) { + g2d = (Graphics2D) g; + AffineTransform at = g2d.getTransform(); + scaleX = at.getScaleX(); + scaleY = at.getScaleY(); - int barRectWidth = (int)Math.ceil(progressBar.getWidth() * scaleX); - int barRectHeight = (int)Math.ceil(progressBar.getHeight() * scaleY); + barRectWidth = (int) Math.ceil(progressBar.getWidth() * scaleX); + barRectHeight = (int) Math.ceil(progressBar.getHeight() * scaleY); + } else { + scaleX = scaleY = 1.0; + barRectWidth = (int) Math.ceil(progressBar.getWidth() * scaleX); + barRectHeight = (int) Math.ceil(progressBar.getHeight() * scaleY); + } // amount of progress to draw int amountFull = (int)(getAmountFull(null, barRectWidth, barRectHeight) / scaleX); @@ -157,23 +168,44 @@ public class WindowsProgressBarUI extends BasicProgressBarUI return; } - g2.setStroke(new BasicStroke((float)(vertical ? barRectWidth : barRectHeight), - BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); + if (g instanceof Graphics2D) { + g2d.setStroke(new BasicStroke((float) (vertical ? barRectWidth : barRectHeight), + BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); + } if (!vertical) { if (isLeftToRight) { - g2.drawLine(0, barRectHeight / 2, + if (g instanceof Graphics2D) { + g2d.drawLine(0, barRectHeight / 2, amountFull, barRectHeight / 2); + } else { + g.drawRect(0, 0, barRectWidth, barRectHeight); + g.fillRect(0, 0, amountFull, barRectHeight); + } } else { - g2.drawLine(2 + barRectWidth, + if (g instanceof Graphics2D) { + g2d.drawLine(2 + barRectWidth, barRectHeight / 2 + 1, 2 + barRectWidth - (amountFull - 2), barRectHeight / 2 + 1); + } else { + g.drawRect(2 + barRectWidth, barRectHeight + 1, + barRectWidth, barRectHeight + 1); + g.fillRect(2 + barRectWidth, barRectHeight + 1, + amountFull, barRectHeight + 1); + } } paintString(g, 0, 0, (int)(barRectWidth / scaleX), (int)(barRectHeight / scaleY), amountFull, null); } else { - g2.drawLine(barRectWidth/2 + 1, barRectHeight + 1, - barRectWidth/2 + 1, barRectHeight + 1 - amountFull + 2); + if (g instanceof Graphics2D) { + g2d.drawLine(barRectWidth / 2 + 1, barRectHeight + 1, + barRectWidth / 2 + 1, barRectHeight + 1 - amountFull + 2); + } else { + g.drawRect(barRectWidth + 1, barRectHeight + 1, + barRectWidth + 1, barRectHeight + 1); + g.fillRect(barRectWidth + 1, barRectHeight + 1, + barRectWidth + 1, amountFull); + } paintString(g, 2, 2, barRectWidth, barRectHeight, amountFull, null); } diff --git a/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java b/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java index f028e0fbec5..9c1c7665f4b 100644 --- a/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java +++ b/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java @@ -108,7 +108,6 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, static List activeWindows = new LinkedList(); // WComponentPeer overrides @Override - @SuppressWarnings("unchecked") protected void disposeImpl() { synchronized (activeWindows) { activeWindows.remove(this); diff --git a/src/java.instrument/share/native/libinstrument/JPLISAgent.c b/src/java.instrument/share/native/libinstrument/JPLISAgent.c index c65bfb9f2f9..a48defd471d 100644 --- a/src/java.instrument/share/native/libinstrument/JPLISAgent.c +++ b/src/java.instrument/share/native/libinstrument/JPLISAgent.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, 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 @@ -780,7 +780,7 @@ getModuleObject(jvmtiEnv* jvmti, jobject moduleObject = NULL; /* find last slash in the class name */ - char* last_slash = (cname == NULL) ? NULL : strrchr(cname, '/'); + const char* last_slash = (cname == NULL) ? NULL : strrchr(cname, '/'); int len = (last_slash == NULL) ? 0 : (int)(last_slash - cname); char* pkg_name_buf = (char*)malloc(len + 1); diff --git a/src/java.instrument/unix/native/libinstrument/FileSystemSupport_md.c b/src/java.instrument/unix/native/libinstrument/FileSystemSupport_md.c index f7ea013412d..b9771e55b44 100644 --- a/src/java.instrument/unix/native/libinstrument/FileSystemSupport_md.c +++ b/src/java.instrument/unix/native/libinstrument/FileSystemSupport_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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,7 @@ #define slash '/' char* basePath(const char* path) { - char* last = strrchr(path, slash); + const char* last = strrchr(path, slash); if (last == NULL) { return (char*)path; } else { diff --git a/src/java.logging/share/classes/sun/util/logging/resources/logging_es.properties b/src/java.logging/share/classes/sun/util/logging/resources/logging_es.properties deleted file mode 100644 index 5454f09bf87..00000000000 --- a/src/java.logging/share/classes/sun/util/logging/resources/logging_es.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Localizations for Level names. For the US locale -# these are the same as the non-localized level name. - -# The following ALL CAPS words should be translated. -ALL=Todo -# The following ALL CAPS words should be translated. -SEVERE=Grave -# The following ALL CAPS words should be translated. -WARNING=Advertencia -# The following ALL CAPS words should be translated. -INFO=Información -# The following ALL CAPS words should be translated. -CONFIG= Configurar -# The following ALL CAPS words should be translated. -FINE=Detallado -# The following ALL CAPS words should be translated. -FINER=Muy Detallado -# The following ALL CAPS words should be translated. -FINEST=Más Detallado -# The following ALL CAPS words should be translated. -OFF=Desactivado diff --git a/src/java.logging/share/classes/sun/util/logging/resources/logging_fr.properties b/src/java.logging/share/classes/sun/util/logging/resources/logging_fr.properties deleted file mode 100644 index 44676b6bf9e..00000000000 --- a/src/java.logging/share/classes/sun/util/logging/resources/logging_fr.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Localizations for Level names. For the US locale -# these are the same as the non-localized level name. - -# The following ALL CAPS words should be translated. -ALL=Tout -# The following ALL CAPS words should be translated. -SEVERE=Grave -# The following ALL CAPS words should be translated. -WARNING=Avertissement -# The following ALL CAPS words should be translated. -INFO=Infos -# The following ALL CAPS words should be translated. -CONFIG= Config -# The following ALL CAPS words should be translated. -FINE=Précis -# The following ALL CAPS words should be translated. -FINER=Plus précis -# The following ALL CAPS words should be translated. -FINEST=Le plus précis -# The following ALL CAPS words should be translated. -OFF=Désactivé diff --git a/src/java.logging/share/classes/sun/util/logging/resources/logging_it.properties b/src/java.logging/share/classes/sun/util/logging/resources/logging_it.properties deleted file mode 100644 index cb2c1ee8cca..00000000000 --- a/src/java.logging/share/classes/sun/util/logging/resources/logging_it.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Localizations for Level names. For the US locale -# these are the same as the non-localized level name. - -# The following ALL CAPS words should be translated. -ALL=Tutto -# The following ALL CAPS words should be translated. -SEVERE=Grave -# The following ALL CAPS words should be translated. -WARNING=Avvertenza -# The following ALL CAPS words should be translated. -INFO=Informazioni -# The following ALL CAPS words should be translated. -CONFIG= Configurazione -# The following ALL CAPS words should be translated. -FINE=Buono -# The following ALL CAPS words should be translated. -FINER=Migliore -# The following ALL CAPS words should be translated. -FINEST=Ottimale -# The following ALL CAPS words should be translated. -OFF=Non attivo diff --git a/src/java.logging/share/classes/sun/util/logging/resources/logging_ko.properties b/src/java.logging/share/classes/sun/util/logging/resources/logging_ko.properties deleted file mode 100644 index e6afe731b51..00000000000 --- a/src/java.logging/share/classes/sun/util/logging/resources/logging_ko.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Localizations for Level names. For the US locale -# these are the same as the non-localized level name. - -# The following ALL CAPS words should be translated. -ALL=모두 -# The following ALL CAPS words should be translated. -SEVERE=심각 -# The following ALL CAPS words should be translated. -WARNING=경고 -# The following ALL CAPS words should be translated. -INFO=정보 -# The following ALL CAPS words should be translated. -CONFIG= 구성 -# The following ALL CAPS words should be translated. -FINE=미세 -# The following ALL CAPS words should be translated. -FINER=보다 미세 -# The following ALL CAPS words should be translated. -FINEST=가장 미세 -# The following ALL CAPS words should be translated. -OFF=해제 diff --git a/src/java.logging/share/classes/sun/util/logging/resources/logging_pt_BR.properties b/src/java.logging/share/classes/sun/util/logging/resources/logging_pt_BR.properties deleted file mode 100644 index 2a7db4a0d37..00000000000 --- a/src/java.logging/share/classes/sun/util/logging/resources/logging_pt_BR.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Localizations for Level names. For the US locale -# these are the same as the non-localized level name. - -# The following ALL CAPS words should be translated. -ALL=Tudo -# The following ALL CAPS words should be translated. -SEVERE=Grave -# The following ALL CAPS words should be translated. -WARNING=Advertência -# The following ALL CAPS words should be translated. -INFO=Informações -# The following ALL CAPS words should be translated. -CONFIG= Configuração -# The following ALL CAPS words should be translated. -FINE=Detalhado -# The following ALL CAPS words should be translated. -FINER=Mais Detalhado -# The following ALL CAPS words should be translated. -FINEST=O Mais Detalhado -# The following ALL CAPS words should be translated. -OFF=Desativado diff --git a/src/java.logging/share/classes/sun/util/logging/resources/logging_sv.properties b/src/java.logging/share/classes/sun/util/logging/resources/logging_sv.properties deleted file mode 100644 index 41cb20b318f..00000000000 --- a/src/java.logging/share/classes/sun/util/logging/resources/logging_sv.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Localizations for Level names. For the US locale -# these are the same as the non-localized level name. - -# The following ALL CAPS words should be translated. -ALL=Alla -# The following ALL CAPS words should be translated. -SEVERE=Allvarlig -# The following ALL CAPS words should be translated. -WARNING=Varning -# The following ALL CAPS words should be translated. -INFO=Info -# The following ALL CAPS words should be translated. -CONFIG= Konfig -# The following ALL CAPS words should be translated. -FINE=Fin -# The following ALL CAPS words should be translated. -FINER=Finare -# The following ALL CAPS words should be translated. -FINEST=Finaste -# The following ALL CAPS words should be translated. -OFF=Av diff --git a/src/java.logging/share/classes/sun/util/logging/resources/logging_zh_TW.properties b/src/java.logging/share/classes/sun/util/logging/resources/logging_zh_TW.properties deleted file mode 100644 index 3ec4812d7c6..00000000000 --- a/src/java.logging/share/classes/sun/util/logging/resources/logging_zh_TW.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Localizations for Level names. For the US locale -# these are the same as the non-localized level name. - -# The following ALL CAPS words should be translated. -ALL=所有 -# The following ALL CAPS words should be translated. -SEVERE=嚴重 -# The following ALL CAPS words should be translated. -WARNING=警告 -# The following ALL CAPS words should be translated. -INFO=資訊 -# The following ALL CAPS words should be translated. -CONFIG= 組態 -# The following ALL CAPS words should be translated. -FINE=詳細 -# The following ALL CAPS words should be translated. -FINER=較詳細 -# The following ALL CAPS words should be translated. -FINEST=最詳細 -# The following ALL CAPS words should be translated. -OFF=關閉 diff --git a/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java b/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java index fdff5d84189..77bb54fa5ba 100644 --- a/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java +++ b/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.IOException; -import java.security.Principal; import java.security.cert.X509Certificate; import java.security.cert.CertificateException; @@ -64,11 +63,6 @@ public final class StartTlsResponseImpl extends StartTlsResponse { private static final boolean debug = false; - /* - * The dNSName type in a subjectAltName extension of an X.509 certificate - */ - private static final int DNSNAME_TYPE = 2; - /* * The server's hostname. */ @@ -111,9 +105,9 @@ public final class StartTlsResponseImpl extends StartTlsResponse { private transient HostnameVerifier verifier = null; /* - * The flag to indicate that the TLS connection is closed. + * The flag to indicate that close() was invoked */ - private transient boolean isClosed = true; + private transient boolean closed; private static final long serialVersionUID = -1126624615143411328L; @@ -133,6 +127,7 @@ public final class StartTlsResponseImpl extends StartTlsResponse { * enable. * @see #negotiate */ + @Override public void setEnabledCipherSuites(String[] suites) { // The impl does accept null suites, although the spec requires // a non-null list. @@ -150,6 +145,7 @@ public final class StartTlsResponseImpl extends StartTlsResponse { * @param verifier The non-null hostname verifier callback. * @see #negotiate */ + @Override public void setHostnameVerifier(HostnameVerifier verifier) { this.verifier = verifier; } @@ -165,6 +161,7 @@ public final class StartTlsResponseImpl extends StartTlsResponse { * @see #setEnabledCipherSuites * @see #setHostnameVerifier */ + @Override public SSLSession negotiate() throws IOException { return negotiate(null); @@ -200,9 +197,10 @@ public final class StartTlsResponseImpl extends StartTlsResponse { * @see #setEnabledCipherSuites * @see #setHostnameVerifier */ + @Override public SSLSession negotiate(SSLSocketFactory factory) throws IOException { - if (isClosed && sslSocket != null) { + if (closed) { throw new IOException("TLS connection is closed."); } @@ -223,7 +221,6 @@ public final class StartTlsResponseImpl extends StartTlsResponse { SSLPeerUnverifiedException verifExcep = null; try { if (verify(hostname, sslSession)) { - isClosed = false; return sslSession; } } catch (SSLPeerUnverifiedException e) { @@ -232,18 +229,18 @@ public final class StartTlsResponseImpl extends StartTlsResponse { } if ((verifier != null) && verifier.verify(hostname, sslSession)) { - isClosed = false; return sslSession; } - // Verification failed - close(); - sslSession.invalidate(); if (verifExcep == null) { - verifExcep = new SSLPeerUnverifiedException( - "hostname of the server '" + hostname + - "' does not match the hostname in the " + - "server's certificate."); + verifExcep = new SSLPeerUnverifiedException("hostname of the server '" + + hostname + "' does not match the hostname in the server's certificate."); + } + sslSession.invalidate(); + try { + close(); + } catch (IOException ioe) { + verifExcep.addSuppressed(ioe); } throw verifExcep; } @@ -255,15 +252,13 @@ public final class StartTlsResponseImpl extends StartTlsResponse { * @throws IOException If an IO error was encountered while closing the * TLS connection */ + @Override public void close() throws IOException { - - if (isClosed) { + if (closed) { return; } - if (debug) { - System.out.println("StartTLS: replacing SSL " + - "streams with originals"); + System.out.println("StartTLS: closing"); } // Replace SSL streams with the original streams @@ -273,9 +268,13 @@ public final class StartTlsResponseImpl extends StartTlsResponse { if (debug) { System.out.println("StartTLS: closing SSL Socket"); } - sslSocket.close(); - - isClosed = true; + try { + if (sslSocket != null) { + sslSocket.close(); + } + } finally { + closed = true; + } } /** @@ -298,9 +297,8 @@ public final class StartTlsResponseImpl extends StartTlsResponse { * Returns the default SSL socket factory. * * @return The default SSL socket factory. - * @throws IOException If TLS is not supported. */ - private SSLSocketFactory getDefaultFactory() throws IOException { + private SSLSocketFactory getDefaultFactory() { if (defaultFactory != null) { return defaultFactory; @@ -370,9 +368,13 @@ public final class StartTlsResponseImpl extends StartTlsResponse { System.out.println("StartTLS: Got IO error during handshake"); e.printStackTrace(); } - - sslSocket.close(); - isClosed = true; + try { + close(); + } catch (IOException ioe) { + if (e != ioe) { + e.addSuppressed(ioe); + } + } throw e; // pass up exception } @@ -441,20 +443,4 @@ public final class StartTlsResponseImpl extends StartTlsResponse { "server's certificate.", e); } } - - /* - * Get the peer principal from the session - */ - private static Principal getPeerPrincipal(SSLSession session) - throws SSLPeerUnverifiedException { - Principal principal; - try { - principal = session.getPeerPrincipal(); - } catch (AbstractMethodError e) { - // if the JSSE provider does not support it, return null, since - // we need it only for Kerberos. - principal = null; - } - return principal; - } } diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java b/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java index c662983d0af..e7dec5a6963 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java @@ -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 @@ public class SSLFlowDelegate { 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 @@ public class SSLFlowDelegate { return enterReadScheduling(); } + @Override + public boolean closing() { + return closeNotifyReceived(); + } + public final String dbgString() { return "SSL Reader(" + tubeName + ")"; } @@ -505,7 +510,7 @@ public class SSLFlowDelegate { 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 @@ public class SSLFlowDelegate { 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 @@ public class SSLFlowDelegate { 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 @@ public class SSLFlowDelegate { 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 @@ public class SSLFlowDelegate { 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 @@ public class SSLFlowDelegate { break; default: throw new InternalError("Unexpected handshake status:" - + r.handshakeStatus()); + + handshakeStatus); } return true; } @@ -1182,34 +1190,20 @@ public class SSLFlowDelegate { 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 --git a/src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java b/src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java index b9e1def58e0..013ed31c8c1 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java @@ -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 @@ public abstract class SubscriberWrapper } void checkCompletion() { - if (downstreamCompleted || !upstreamCompleted) { + if (downstreamCompleted || (!upstreamCompleted && !completionAcknowledged)) { return; } if (!outputQ.isEmpty()) { diff --git a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_es.properties b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_es.properties deleted file mode 100644 index a5dd1c9313b..00000000000 --- a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_es.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -rmiregistry.usage=Sintaxis: {0} \n\ndonde las son:\n -J Pasar argumento al intérprete de java -rmiregistry.port.badnumber=argumento de puerto, {0}, no es un número. diff --git a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_fr.properties b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_fr.properties deleted file mode 100644 index fdb6bb4fce1..00000000000 --- a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_fr.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -rmiregistry.usage=Syntaxe : {0} \n\noù comprend :\n -J Transmettre l''argument à l''interpréteur Java -rmiregistry.port.badnumber=l''argument port, {0}, n''est pas un nombre. diff --git a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_it.properties b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_it.properties deleted file mode 100644 index e8fe2a6d859..00000000000 --- a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_it.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -rmiregistry.usage=Uso: {0} \n\ndove include:\n -J Passa l''argomento all''interprete java -rmiregistry.port.badnumber=l''argomento della porta, {0}, non è un numero. diff --git a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_ko.properties b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_ko.properties deleted file mode 100644 index c4524227f29..00000000000 --- a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_ko.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -rmiregistry.usage=사용법: {0} \n\n여기서 는 다음과 같습니다.\n -J Java 인터프리터에 인수를 전달합니다. -rmiregistry.port.badnumber=포트 인수 {0}은(는) 숫자가 아닙니다. diff --git a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_pt_BR.properties b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_pt_BR.properties deleted file mode 100644 index 4b79fdd6f5b..00000000000 --- a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_pt_BR.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -rmiregistry.usage=Uso: {0} \n\nem que inclui:\n -J Especifica o argumento para o intérprete de java -rmiregistry.port.badnumber=o argumento da porta, {0}, não é um número. diff --git a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_sv.properties b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_sv.properties deleted file mode 100644 index c531721c2f2..00000000000 --- a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_sv.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -rmiregistry.usage=Syntax: {0} \n\ndär inkluderar:\n -J Skicka argumentet till Javatolken -rmiregistry.port.badnumber=portargumentet, {0}, är inte ett tal. diff --git a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_zh_TW.properties b/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_zh_TW.properties deleted file mode 100644 index 84609b1f39a..00000000000 --- a/src/java.rmi/share/classes/sun/rmi/registry/resources/rmiregistry_zh_TW.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -rmiregistry.usage=用法: {0} \n\n其中 包括:\n -J 傳遞引數到 java 直譯器 -rmiregistry.port.badnumber=連接埠引數,{0},不是一個數字 diff --git a/src/java.security.jgss/share/classes/sun/security/krb5/KrbServiceLocator.java b/src/java.security.jgss/share/classes/sun/security/krb5/KrbServiceLocator.java index 863e09dbc4a..483f1f4ea73 100644 --- a/src/java.security.jgss/share/classes/sun/security/krb5/KrbServiceLocator.java +++ b/src/java.security.jgss/share/classes/sun/security/krb5/KrbServiceLocator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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,8 +25,6 @@ package sun.security.krb5; -import sun.security.krb5.internal.Krb5; - import java.util.Arrays; import java.util.Hashtable; import java.util.Random; @@ -36,6 +34,8 @@ import javax.naming.*; import javax.naming.directory.*; import javax.naming.spi.NamingManager; +import static sun.security.krb5.internal.Krb5.DEBUG; + /** * This class discovers the location of Kerberos services by querying DNS, * as defined in RFC 4120. @@ -115,7 +115,9 @@ class KrbServiceLocator { } } } catch (NamingException e) { - // ignore + if (DEBUG != null) { + e.printStackTrace(DEBUG.getPrintStream()); + } } return records; } @@ -187,8 +189,9 @@ class KrbServiceLocator { hostports = extractHostports(srvRecords); } } catch (NamingException e) { - // e.printStackTrace(); - // ignore + if (DEBUG != null) { + e.printStackTrace(DEBUG.getPrintStream()); + } } return hostports; } diff --git a/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java index 1f6e98e50e8..f04f28ae134 100644 --- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java +++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java @@ -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 @@ public class AesDkCrypto extends DkCrypto { 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 @@ public class AesDkCrypto extends DkCrypto { 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 --git a/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesSha2DkCrypto.java b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesSha2DkCrypto.java index cb9e42b2dee..5af0517f883 100644 --- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesSha2DkCrypto.java +++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesSha2DkCrypto.java @@ -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 @@ public class AesSha2DkCrypto extends DkCrypto { 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 @@ public class AesSha2DkCrypto extends DkCrypto { 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 --git a/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java index da327814592..260f30bd000 100644 --- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java +++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java @@ -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 @@ public abstract class DkCrypto { 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 --git a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_es.properties b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_es.properties deleted file mode 100644 index 618ad8c9a52..00000000000 --- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_es.properties +++ /dev/null @@ -1,169 +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. 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. -# - -# CacheRowSetImpl exceptions -cachedrowsetimpl.populate = Se ha proporcionado un objeto ResultSet no válido para el método de relleno -cachedrowsetimpl.invalidp = El proveedor de persistencia generado no es válido -cachedrowsetimpl.nullhash = La instancia CachedRowSetImpl no se puede crear. Se ha proporcionado una tabla hash nula al constructor -cachedrowsetimpl.invalidop = Operación no válida al insertar fila -cachedrowsetimpl.accfailed = Fallo de acceptChanges -cachedrowsetimpl.invalidcp = Posición de cursor no válida -cachedrowsetimpl.illegalop = Operación no permitida en fila no insertada -cachedrowsetimpl.clonefail = Fallo en la clonación: {0} -cachedrowsetimpl.invalidcol = Índice de columnas no válido -cachedrowsetimpl.invalcolnm = Nombre de columna no válido -cachedrowsetimpl.boolfail = Fallo de getBoolen en valor ( {0} ) de columna {1} -cachedrowsetimpl.bytefail = Fallo de getByte en valor ( {0} ) de columna {1} -cachedrowsetimpl.shortfail = Fallo de getShort en valor ( {0} ) de columna {1} -cachedrowsetimpl.intfail = Fallo de getInt en valor ( {0} ) de columna {1} -cachedrowsetimpl.longfail = Fallo de getLong en valor ( {0} ) de columna {1} -cachedrowsetimpl.floatfail = Fallo de getFloat en valor ( {0} ) de columna {1} -cachedrowsetimpl.doublefail = Fallo de getDouble en valor ( {0} ) de columna {1} -cachedrowsetimpl.dtypemismt = Discordancia entre Tipos de Datos -cachedrowsetimpl.datefail = Fallo de getDate en valor ( {0} ) de columna {1}. No es posible convertir -cachedrowsetimpl.timefail = Fallo de getTime en valor ( {0} ) de columna {1}. No es posible convertir -cachedrowsetimpl.posupdate = Actualizaciones posicionadas no soportadas -cachedrowsetimpl.unableins = No se ha podido crear la instancia: {0} -cachedrowsetimpl.beforefirst = beforeFirst: Operación de cursor no válida -cachedrowsetimpl.first = First: Operación de cursor no válida -cachedrowsetimpl.last = last : TYPE_FORWARD_ONLY -cachedrowsetimpl.absolute = absolute: Posición de cursor no válida -cachedrowsetimpl.relative = relative: Posición de cursor no válida -cachedrowsetimpl.asciistream = fallo en lectura de flujo de caracteres ascii -cachedrowsetimpl.binstream = fallo de lectura de flujo binario -cachedrowsetimpl.failedins = Fallo en inserción de fila -cachedrowsetimpl.updateins = llamada a updateRow mientras se insertaba fila -cachedrowsetimpl.movetoins = moveToInsertRow : CONCUR_READ_ONLY -cachedrowsetimpl.movetoins1 = moveToInsertRow: no hay metadatos -cachedrowsetimpl.movetoins2 = moveToInsertRow: número de columnas no válido -cachedrowsetimpl.tablename = El nombre de la tabla no puede ser nulo -cachedrowsetimpl.keycols = Columnas clave no válidas -cachedrowsetimpl.opnotsupp = La base de datos no admite esta operación -cachedrowsetimpl.matchcols = Las columnas coincidentes no concuerdan con las definidas -cachedrowsetimpl.setmatchcols = Defina las columnas coincidentes antes de obtenerlas -cachedrowsetimpl.matchcols1 = Las columnas coincidentes deben ser mayores que 0 -cachedrowsetimpl.matchcols2 = Las columnas coincidentes deben estar vacías o ser una cadena nula -cachedrowsetimpl.unsetmatch = Las columnas cuya definición se está anulando no concuerdan con las definidas -cachedrowsetimpl.unsetmatch1 = Use el nombre de columna como argumento en unsetMatchColumn -cachedrowsetimpl.unsetmatch2 = Use el identificador de columna como argumento en unsetMatchColumn -cachedrowsetimpl.numrows = El número de filas es menor que cero o menor que el tamaño recuperado -cachedrowsetimpl.startpos = La posición de inicio no puede ser negativa -cachedrowsetimpl.nextpage = Rellene los datos antes de realizar la llamada -cachedrowsetimpl.pagesize = El tamaño de página no puede ser menor que cero -cachedrowsetimpl.pagesize1 = El tamaño de página no puede ser mayor que maxRows -cachedrowsetimpl.fwdonly = ResultSet sólo se reenvía -cachedrowsetimpl.type = El tipo es: {0} -cachedrowsetimpl.opnotysupp = Operación no soportada todavía -cachedrowsetimpl.featnotsupp = Función no soportada - -# WebRowSetImpl exceptions -webrowsetimpl.nullhash = La instancia WebRowSetImpl no se puede crear. Se ha proporcionado una tabla hash nula al constructor -webrowsetimpl.invalidwr = Escritor no válido -webrowsetimpl.invalidrd = Lector no válido - -#FilteredRowSetImpl exceptions -filteredrowsetimpl.relative = relative: Operación de cursor no válida -filteredrowsetimpl.absolute = absolute: Operación de cursor no válida -filteredrowsetimpl.notallowed = El filtro no admite este valor - -#JoinRowSetImpl exceptions -joinrowsetimpl.notinstance = No es una instancia de rowset -joinrowsetimpl.matchnotset = Las columnas coincidentes no están definidas para la unión -joinrowsetimpl.numnotequal = El número de elementos de rowset y el de columnas coincidentes no es el mismo -joinrowsetimpl.notdefined = No es un tipo de unión definido -joinrowsetimpl.notsupported = Este tipo de unión no está soportado -joinrowsetimpl.initerror = Error de inicialización de JoinRowSet -joinrowsetimpl.genericerr = Error de inicialización genérico de joinrowset -joinrowsetimpl.emptyrowset = No se puede agregar un juego de filas vacío a este JoinRowSet - -#JdbcRowSetImpl exceptions -jdbcrowsetimpl.invalstate = Estado no válido -jdbcrowsetimpl.connect = JdbcRowSet (connect): JNDI no se puede conectar -jdbcrowsetimpl.paramtype = No se puede deducir el tipo de parámetro -jdbcrowsetimpl.matchcols = Las columnas coincidentes no concuerdan con las definidas -jdbcrowsetimpl.setmatchcols = Defina las columnas coincidentes antes de obtenerlas -jdbcrowsetimpl.matchcols1 = Las columnas coincidentes deben ser mayores que 0 -jdbcrowsetimpl.matchcols2 = Las columnas coincidentes no pueden estar vacías ni ser una cadena nula -jdbcrowsetimpl.unsetmatch = Las columnas cuya definición se está anulando no concuerdan con las definidas -jdbcrowsetimpl.usecolname = Use el nombre de columna como argumento en unsetMatchColumn -jdbcrowsetimpl.usecolid = Use el identificador de columna como argumento en unsetMatchColumn -jdbcrowsetimpl.resnotupd = ResultSet no se puede actualizar -jdbcrowsetimpl.opnotysupp = Operación no soportada todavía -jdbcrowsetimpl.featnotsupp = Función no soportada - -#CachedRowSetReader exceptions -crsreader.connect = (JNDI) No se ha podido conectar -crsreader.paramtype = No se ha podido deducir el tipo de parámetro -crsreader.connecterr = Error interno en RowSetReader: no hay conexión o comando -crsreader.datedetected = Fecha Detectada -crsreader.caldetected = Calendario Detectado - -#CachedRowSetWriter exceptions -crswriter.connect = No se ha podido obtener una conexión -crswriter.tname = writeData no puede determinar el nombre de tabla -crswriter.params1 = Valor de params1: {0} -crswriter.params2 = Valor de params2: {0} -crswriter.conflictsno = conflictos en la sincronización - -#InsertRow exceptions -insertrow.novalue = No se ha insertado ningún valor - -#SyncResolverImpl exceptions -syncrsimpl.indexval = El valor de índice está fuera de rango -syncrsimpl.noconflict = Esta columna no está en conflicto -syncrsimpl.syncnotpos = No se puede sincronizar -syncrsimpl.valtores = El valor que se debe resolver puede estar en la base de datos o en cachedrowset - -#WebRowSetXmlReader exception -wrsxmlreader.invalidcp = Se ha llegado al final de RowSet. Posición de cursor no válida -wrsxmlreader.readxml = readXML : {0} -wrsxmlreader.parseerr = ** Error de análisis: {0} , línea: {1} , uri: {2} - -#WebRowSetXmlWriter exceptions -wrsxmlwriter.ioex = IOException : {0} -wrsxmlwriter.sqlex = SQLException : {0} -wrsxmlwriter.failedwrite = Error al escribir el valor -wsrxmlwriter.notproper = Tipo incorrecto - -#XmlReaderContentHandler exceptions -xmlrch.errmap = Error al definir la asignación: {0} -xmlrch.errmetadata = Error al definir metadatos: {0} -xmlrch.errinsertval = Error al insertar los valores: {0} -xmlrch.errconstr = Error al construir la fila: {0} -xmlrch.errdel = Error al suprimir la fila: {0} -xmlrch.errinsert = Error al construir la fila de inserción: {0} -xmlrch.errinsdel = Error al construir la fila de inserción o supresión: {0} -xmlrch.errupdate = Error al construir la fila de actualización: {0} -xmlrch.errupdrow = Error al actualizar la fila: {0} -xmlrch.chars = caracteres: -xmlrch.badvalue = Valor incorrecto; la propiedad no puede ser nula -xmlrch.badvalue1 = Valor incorrecto; los metadatos no pueden ser nulos -xmlrch.warning = ** Advertencia: {0} , línea: {1} , uri: {2} - -#RIOptimisticProvider Exceptions -riop.locking = No se permite bloquear la clasificación - -#RIXMLProvider exceptions -rixml.unsupp = No soportado con RIXMLProvider diff --git a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_fr.properties b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_fr.properties deleted file mode 100644 index 9cae84a4019..00000000000 --- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_fr.properties +++ /dev/null @@ -1,169 +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. 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. -# - -# CacheRowSetImpl exceptions -cachedrowsetimpl.populate = L'objet ResultSet fourni en entrée de la méthode n'est pas valide -cachedrowsetimpl.invalidp = Le fournisseur de persistance généré n'est pas valide -cachedrowsetimpl.nullhash = Impossible de créer une instance de CachedRowSetImpl. Table de hachage NULL fournie au constructeur -cachedrowsetimpl.invalidop = Opération non valide lors de l'insertion de ligne -cachedrowsetimpl.accfailed = Echec de acceptChanges -cachedrowsetimpl.invalidcp = Position du curseur non valide -cachedrowsetimpl.illegalop = Opération non admise sur une ligne non insérée -cachedrowsetimpl.clonefail = Echec du clonage : {0} -cachedrowsetimpl.invalidcol = Index de colonne non valide -cachedrowsetimpl.invalcolnm = Nom de colonne non valide -cachedrowsetimpl.boolfail = Echec de getBoolen pour la valeur ({0}) de la colonne {1} -cachedrowsetimpl.bytefail = Echec de getByte pour la valeur ({0}) de la colonne {1} -cachedrowsetimpl.shortfail = Echec de getShort pour la valeur ({0}) de la colonne {1} -cachedrowsetimpl.intfail = Echec de getInt pour la valeur ({0}) de la colonne {1} -cachedrowsetimpl.longfail = Echec de getLong pour la valeur ({0}) de la colonne {1} -cachedrowsetimpl.floatfail = Echec de getFloat pour la valeur ({0}) de la colonne {1} -cachedrowsetimpl.doublefail = Echec de getDouble pour la valeur ({0}) de la colonne {1} -cachedrowsetimpl.dtypemismt = Le type de données ne correspond pas -cachedrowsetimpl.datefail = Echec de getDate pour la valeur ({0}) de la colonne {1} - Aucune conversion possible -cachedrowsetimpl.timefail = Echec de getTime pour la valeur ({0}) de la colonne {1} - Aucune conversion possible -cachedrowsetimpl.posupdate = Mises à jour choisies non prises en charge -cachedrowsetimpl.unableins = Instanciation impossible : {0} -cachedrowsetimpl.beforefirst = beforeFirst : opération de curseur non valide -cachedrowsetimpl.first = First : opération de curseur non valide -cachedrowsetimpl.last = last : TYPE_FORWARD_ONLY -cachedrowsetimpl.absolute = absolute : position de curseur non valide -cachedrowsetimpl.relative = relative : position de curseur non valide -cachedrowsetimpl.asciistream = échec de la lecture pour le flux ASCII -cachedrowsetimpl.binstream = échec de la lecture pour le flux binaire -cachedrowsetimpl.failedins = Echec de l'insertion de ligne -cachedrowsetimpl.updateins = appel de updateRow lors de l'insertion de ligne -cachedrowsetimpl.movetoins = moveToInsertRow : CONCUR_READ_ONLY -cachedrowsetimpl.movetoins1 = moveToInsertRow : aucune métadonnée -cachedrowsetimpl.movetoins2 = moveToInsertRow : nombre de colonnes non valide -cachedrowsetimpl.tablename = Le nom de la table ne peut pas être NULL -cachedrowsetimpl.keycols = Colonnes de clé non valides -cachedrowsetimpl.opnotsupp = Opération non prise en charge par la base de données -cachedrowsetimpl.matchcols = Les colonnes correspondantes ne sont pas les mêmes que les colonnes définies -cachedrowsetimpl.setmatchcols = Définir les colonnes correspondantes avant de les prendre -cachedrowsetimpl.matchcols1 = Les colonnes correspondantes doivent être supérieures à zéro -cachedrowsetimpl.matchcols2 = Les colonnes correspondantes doivent êtres vides ou ne contenir que des chaînes NULL -cachedrowsetimpl.unsetmatch = Les colonnes définies et non définies sont différentes -cachedrowsetimpl.unsetmatch1 = Utiliser le nom de colonne comme argument pour unsetMatchColumn -cachedrowsetimpl.unsetmatch2 = Utiliser l'ID de colonne comme argument pour unsetMatchColumn -cachedrowsetimpl.numrows = Le nombre de lignes est inférieur à zéro ou à la taille d'extraction -cachedrowsetimpl.startpos = La position de départ ne peut pas être négative -cachedrowsetimpl.nextpage = Entrer les données avant l'appel -cachedrowsetimpl.pagesize = La taille de la page ne peut pas être négative -cachedrowsetimpl.pagesize1 = La taille de la page ne peut pas être supérieure à maxRows -cachedrowsetimpl.fwdonly = ResultSet va en avant seulement -cachedrowsetimpl.type = Le type est : {0} -cachedrowsetimpl.opnotysupp = Opération non encore prise en charge -cachedrowsetimpl.featnotsupp = Fonctionnalité non prise en charge - -# WebRowSetImpl exceptions -webrowsetimpl.nullhash = Impossible de créer une instance de WebRowSetImpl. Table de hachage NULL fournie au constructeur -webrowsetimpl.invalidwr = Processus d'écriture non valide -webrowsetimpl.invalidrd = Processus de lecture non valide - -#FilteredRowSetImpl exceptions -filteredrowsetimpl.relative = relative : opération de curseur non valide -filteredrowsetimpl.absolute = absolute : opération de curseur non valide -filteredrowsetimpl.notallowed = Cette valeur n'est pas autorisée via le filtre - -#JoinRowSetImpl exceptions -joinrowsetimpl.notinstance = N'est pas une instance de RowSet -joinrowsetimpl.matchnotset = Les colonnes correspondantes ne sont pas définies pour la jointure -joinrowsetimpl.numnotequal = Le nombre d'éléments dans RowSet est différent du nombre de colonnes correspondantes -joinrowsetimpl.notdefined = Ce n'est pas un type de jointure défini -joinrowsetimpl.notsupported = Ce type de jointure n'est pas pris en charge -joinrowsetimpl.initerror = Erreur d'initialisation de JoinRowSet -joinrowsetimpl.genericerr = Erreur initiale générique de JoinRowSet -joinrowsetimpl.emptyrowset = Impossible d'ajouter un objet RowSet vide à ce JoinRowSet - -#JdbcRowSetImpl exceptions -jdbcrowsetimpl.invalstate = Etat non valide -jdbcrowsetimpl.connect = Impossible de connecter JNDI JdbcRowSet (connexion) -jdbcrowsetimpl.paramtype = Impossible de déduire le type de paramètre -jdbcrowsetimpl.matchcols = Les colonnes correspondantes ne sont pas les mêmes que les colonnes définies -jdbcrowsetimpl.setmatchcols = Définir les colonnes correspondantes avant de les prendre -jdbcrowsetimpl.matchcols1 = Les colonnes correspondantes doivent être supérieures à zéro -jdbcrowsetimpl.matchcols2 = Les colonnes correspondantes ne doivent pas êtres NULL ni contenir des chaînes vides -jdbcrowsetimpl.unsetmatch = Les colonnes non définies ne sont pas les mêmes que les colonnes définies -jdbcrowsetimpl.usecolname = Utiliser le nom de colonne comme argument pour unsetMatchColumn -jdbcrowsetimpl.usecolid = Utiliser l'ID de colonne comme argument pour unsetMatchColumn -jdbcrowsetimpl.resnotupd = La mise à jour de ResultSet est interdite -jdbcrowsetimpl.opnotysupp = Opération non encore prise en charge -jdbcrowsetimpl.featnotsupp = Fonctionnalité non prise en charge - -#CachedRowSetReader exceptions -crsreader.connect = Impossible de connecter (JNDI) -crsreader.paramtype = Impossible de déduire le type de paramètre -crsreader.connecterr = Erreur interne dans RowSetReader : pas de connexion ni de commande -crsreader.datedetected = Une date a été détectée -crsreader.caldetected = Un calendrier a été détecté - -#CachedRowSetWriter exceptions -crswriter.connect = Impossible d'obtenir la connexion -crswriter.tname = writeData ne peut pas déterminer le nom de la table -crswriter.params1 = Valeur de params1 : {0} -crswriter.params2 = Valeur de params2 : {0} -crswriter.conflictsno = conflits lors de la synchronisation - -#InsertRow exceptions -insertrow.novalue = Aucune valeur n'a été insérée - -#SyncResolverImpl exceptions -syncrsimpl.indexval = Valeur d'index hors plage -syncrsimpl.noconflict = Cette colonne n'est pas en conflit -syncrsimpl.syncnotpos = La synchronisation est impossible -syncrsimpl.valtores = La valeur à résoudre peut être soit dans la base de données, soit dans CachedrowSet - -#WebRowSetXmlReader exception -wrsxmlreader.invalidcp = Fin de RowSet atteinte. Position de curseur non valide -wrsxmlreader.readxml = readXML : {0} -wrsxmlreader.parseerr = ** Erreur d''analyse : {0} , ligne : {1} , URI : {2} - -#WebRowSetXmlWriter exceptions -wrsxmlwriter.ioex = Exception d''E/S : {0} -wrsxmlwriter.sqlex = Exception SQL : {0} -wrsxmlwriter.failedwrite = Echec d'écriture de la valeur -wsrxmlwriter.notproper = N'est pas un type correct - -#XmlReaderContentHandler exceptions -xmlrch.errmap = Erreur lors de la définition du mappage : {0} -xmlrch.errmetadata = Erreur lors de la définition des métadonnées : {0} -xmlrch.errinsertval = Erreur lors de l''insertion des valeurs : {0} -xmlrch.errconstr = Erreur lors de la construction de la ligne : {0} -xmlrch.errdel = Erreur lors de la suppression de la ligne : {0} -xmlrch.errinsert = Erreur lors de la construction de la ligne à insérer : {0} -xmlrch.errinsdel = Erreur lors de la construction de la ligne insdel : {0} -xmlrch.errupdate = Erreur lors de la construction de la ligne à mettre à jour : {0} -xmlrch.errupdrow = Erreur lors de la mise à jour de la ligne : {0} -xmlrch.chars = caractères : -xmlrch.badvalue = Valeur incorrecte ; cette propriété ne peut pas être NULL -xmlrch.badvalue1 = Valeur incorrecte ; ces métadonnées ne peuvent pas être NULL -xmlrch.warning = ** Avertissement : {0} , ligne : {1} , URI : {2} - -#RIOptimisticProvider Exceptions -riop.locking = Le verrouillage de la classification n'est pas pris en charge - -#RIXMLProvider exceptions -rixml.unsupp = Non pris en charge avec RIXMLProvider diff --git a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_it.properties b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_it.properties deleted file mode 100644 index 1ac19156b14..00000000000 --- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_it.properties +++ /dev/null @@ -1,169 +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. 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. -# - -# CacheRowSetImpl exceptions -cachedrowsetimpl.populate = Oggetto ResultSet non valido fornito per l'inserimento dati nel metodo -cachedrowsetimpl.invalidp = Generato provider di persistenza non valido -cachedrowsetimpl.nullhash = Impossibile creare istanza CachedRowSetImpl. Tabella hash nulla fornita al costruttore -cachedrowsetimpl.invalidop = Operazione non valida nella riga di inserimento -cachedrowsetimpl.accfailed = acceptChanges non riuscito -cachedrowsetimpl.invalidcp = Posizione cursore non valida -cachedrowsetimpl.illegalop = Operazione non valida nella riga non inserita -cachedrowsetimpl.clonefail = Copia non riuscita: {0} -cachedrowsetimpl.invalidcol = Indice di colonna non valido -cachedrowsetimpl.invalcolnm = Nome di colonna non valido -cachedrowsetimpl.boolfail = getBoolen non riuscito per il valore ( {0} ) nella colonna {1} -cachedrowsetimpl.bytefail = getByte non riuscito per il valore ( {0} ) nella colonna {1} -cachedrowsetimpl.shortfail = getShort non riuscito per il valore ( {0} ) nella colonna {1} -cachedrowsetimpl.intfail = getInt non riuscito per il valore ( {0} ) nella colonna {1} -cachedrowsetimpl.longfail = getLong non riuscito per il valore ( {0} ) nella colonna {1} -cachedrowsetimpl.floatfail = getFloat non riuscito per il valore ( {0} ) nella colonna {1} -cachedrowsetimpl.doublefail = getDouble non riuscito per il valore ( {0} ) nella colonna {1} -cachedrowsetimpl.dtypemismt = Mancata corrispondenza tipo di dati -cachedrowsetimpl.datefail = getDate non riuscito per il valore ( {0} ) nella colonna {1}. Nessuna conversione disponibile. -cachedrowsetimpl.timefail = getTime non riuscito per il valore ( {0} ) nella colonna {1}. Nessuna conversione disponibile. -cachedrowsetimpl.posupdate = Aggiornamenti posizionati non supportati -cachedrowsetimpl.unableins = Impossibile creare istanza: {0} -cachedrowsetimpl.beforefirst = beforeFirst: operazione cursore non valida -cachedrowsetimpl.first = First: operazione cursore non valida -cachedrowsetimpl.last = last: TYPE_FORWARD_ONLY -cachedrowsetimpl.absolute = absolute: posizione cursore non valida -cachedrowsetimpl.relative = relative: posizione cursore non valida -cachedrowsetimpl.asciistream = lettura non riuscita per il flusso ascii -cachedrowsetimpl.binstream = lettura non riuscita per il flusso binario -cachedrowsetimpl.failedins = operazione non riuscita nella riga di inserimento -cachedrowsetimpl.updateins = updateRow chiamato nella riga di inserimento -cachedrowsetimpl.movetoins = moveToInsertRow: CONCUR_READ_ONLY -cachedrowsetimpl.movetoins1 = moveToInsertRow: nessun metadato -cachedrowsetimpl.movetoins2 = moveToInsertRow: numero di colonne non valido -cachedrowsetimpl.tablename = Il nome di tabella non può essere nullo -cachedrowsetimpl.keycols = Colonne chiave non valide -cachedrowsetimpl.opnotsupp = Operazione non supportata dal database -cachedrowsetimpl.matchcols = Le colonne di corrispondenza non coincidono con le colonne impostate -cachedrowsetimpl.setmatchcols = Impostare le colonne di corrispondenza prima di recuperarle -cachedrowsetimpl.matchcols1 = Le colonne di corrispondenza devono essere superiori a 0 -cachedrowsetimpl.matchcols2 = Le colonne di corrispondenza devono essere una stringa vuota o nulla -cachedrowsetimpl.unsetmatch = Le colonne rimosse non coincidono con le colonne impostate -cachedrowsetimpl.unsetmatch1 = Utilizzare il nome di colonna come argomento per unsetMatchColumn -cachedrowsetimpl.unsetmatch2 = Utilizzare l'ID di colonna come argomento per unsetMatchColumn -cachedrowsetimpl.numrows = Il numero di righe è inferiore a zero o alla dimensione di recupero -cachedrowsetimpl.startpos = La posizione iniziale non può essere negativa -cachedrowsetimpl.nextpage = Inserire i dati prima di chiamare -cachedrowsetimpl.pagesize = La dimensione della pagina non può essere inferiore a zero -cachedrowsetimpl.pagesize1 = La dimensione della pagina non può essere superiore a maxRows -cachedrowsetimpl.fwdonly = ResultSet è a solo inoltro -cachedrowsetimpl.type = Il tipo è: {0} -cachedrowsetimpl.opnotysupp = Operazione attualmente non supportata -cachedrowsetimpl.featnotsupp = Funzione non supportata - -# WebRowSetImpl exceptions -webrowsetimpl.nullhash = Impossibile creare istanza WebRowSetImpl. Tabella hash nulla fornita al costruttore -webrowsetimpl.invalidwr = Processo di scrittura non valido -webrowsetimpl.invalidrd = Processo di lettura non valido - -#FilteredRowSetImpl exceptions -filteredrowsetimpl.relative = relative: operazione cursore non valida -filteredrowsetimpl.absolute = absolute: operazione cursore non valida -filteredrowsetimpl.notallowed = Questo valore non è consentito nel filtro - -#JoinRowSetImpl exceptions -joinrowsetimpl.notinstance = Non è un'istanza di rowset -joinrowsetimpl.matchnotset = Colonna di corrispondenza non impostata per l'unione -joinrowsetimpl.numnotequal = Numero di elementi in rowset diverso dalla colonna di corrispondenza -joinrowsetimpl.notdefined = Non è un tipo di unione definito -joinrowsetimpl.notsupported = Questo tipo di unione non è supportato -joinrowsetimpl.initerror = Errore di inizializzazione di JoinRowSet -joinrowsetimpl.genericerr = Errore iniziale di joinrowset generico -joinrowsetimpl.emptyrowset = Impossibile aggiungere un set di righe vuoto al JoinRowSet corrente - -#JdbcRowSetImpl exceptions -jdbcrowsetimpl.invalstate = Stato non valido -jdbcrowsetimpl.connect = JdbcRowSet (connessione): impossibile stabilire una connessione con JNDI -jdbcrowsetimpl.paramtype = Impossibile dedurre il tipo di parametro -jdbcrowsetimpl.matchcols = Le colonne di corrispondenza non coincidono con le colonne impostate -jdbcrowsetimpl.setmatchcols = Impostare le colonne di corrispondenza prima di recuperarle -jdbcrowsetimpl.matchcols1 = Le colonne di corrispondenza devono essere superiori a 0 -jdbcrowsetimpl.matchcols2 = Le colonne di corrispondenza non possono essere una stringa vuota o nulla -jdbcrowsetimpl.unsetmatch = Le colonne rimosse non coincidono con le colonne impostate -jdbcrowsetimpl.usecolname = Utilizzare il nome di colonna come argomento per unsetMatchColumn -jdbcrowsetimpl.usecolid = Utilizzare l'ID di colonna come argomento per unsetMatchColumn -jdbcrowsetimpl.resnotupd = ResultSet non è aggiornabile -jdbcrowsetimpl.opnotysupp = Operazione attualmente non supportata -jdbcrowsetimpl.featnotsupp = Funzione non supportata - -#CachedRowSetReader exceptions -crsreader.connect = (JNDI) Impossibile stabilire una connessione -crsreader.paramtype = Impossibile dedurre il tipo di parametro -crsreader.connecterr = Errore interno in RowSetReader: nessuna connessione o comando -crsreader.datedetected = È stata rilevata una data -crsreader.caldetected = È stato rilevato un calendario - -#CachedRowSetWriter exceptions -crswriter.connect = Impossibile stabilire una connessione -crswriter.tname = writeData non riesce a determinare il nome di tabella -crswriter.params1 = Valore dei parametri 1: {0} -crswriter.params2 = Valore dei parametri 2: {0} -crswriter.conflictsno = Conflitti durante la sincronizzazione - -#InsertRow exceptions -insertrow.novalue = Non è stato inserito alcun valore - -#SyncResolverImpl exceptions -syncrsimpl.indexval = Valore indice non compreso nell'intervallo -syncrsimpl.noconflict = Questa colonna non è in conflitto -syncrsimpl.syncnotpos = Impossibile eseguire la sincronizzazione -syncrsimpl.valtores = Il valore da risolvere può essere nel database o in cachedrowset - -#WebRowSetXmlReader exception -wrsxmlreader.invalidcp = Raggiunta la fine di RowSet. Posizione cursore non valida -wrsxmlreader.readxml = readXML: {0} -wrsxmlreader.parseerr = **Errore di analisi: {0}, riga: {1}, URI: {2} - -#WebRowSetXmlWriter exceptions -wrsxmlwriter.ioex = IOException: {0} -wrsxmlwriter.sqlex = SQLException: {0} -wrsxmlwriter.failedwrite = Impossibile scrivere il valore -wsrxmlwriter.notproper = Non un tipo corretto - -#XmlReaderContentHandler exceptions -xmlrch.errmap = Errore durante l''impostazione della mappa: {0} -xmlrch.errmetadata = Errore durante l''impostazione dei metadati: {0} -xmlrch.errinsertval = Errore durante l''inserimento dei valori: {0} -xmlrch.errconstr = Errore durante la costruzione della riga: {0} -xmlrch.errdel = Errore durante l''eliminazione della riga: {0} -xmlrch.errinsert = Errore durante la costruzione della riga di inserimento: {0} -xmlrch.errinsdel = Errore durante la costruzione della riga insdel: {0} -xmlrch.errupdate = Errore durante la costruzione della riga di aggiornamento: {0} -xmlrch.errupdrow = Errore durante l''aggiornamento della riga: {0} -xmlrch.chars = caratteri: -xmlrch.badvalue = valore non valido; proprietà non annullabile -xmlrch.badvalue1 = valore non valido; metadati non annullabili -xmlrch.warning = **Avvertenza: {0}, riga: {1}, URI: {2} - -#RIOptimisticProvider Exceptions -riop.locking = La classificazione di blocco non è supportata - -#RIXMLProvider exceptions -rixml.unsupp = Non supportato con RIXMLProvider diff --git a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties deleted file mode 100644 index dd030c0d838..00000000000 --- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties +++ /dev/null @@ -1,169 +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. 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. -# - -# CacheRowSetImpl exceptions -cachedrowsetimpl.populate = 부적합한 ResultSet 객체가 제공되어 메소드를 채울 수 없습니다. -cachedrowsetimpl.invalidp = 부적합한 지속성 제공자가 생성되었습니다. -cachedrowsetimpl.nullhash = CachedRowSetImpl 인스턴스를 인스턴스화할 수 없습니다. 생성자에 널 Hashtable이 제공되었습니다. -cachedrowsetimpl.invalidop = 행을 삽입하는 중 부적합한 작업이 수행되었습니다. -cachedrowsetimpl.accfailed = acceptChanges를 실패했습니다. -cachedrowsetimpl.invalidcp = 커서 위치가 부적합합니다. -cachedrowsetimpl.illegalop = 삽입된 행이 아닌 행에서 잘못된 작업이 수행되었습니다. -cachedrowsetimpl.clonefail = 복제 실패: {0} -cachedrowsetimpl.invalidcol = 열 인덱스가 부적합합니다. -cachedrowsetimpl.invalcolnm = 열 이름이 부적합합니다. -cachedrowsetimpl.boolfail = {1} 열의 값({0})에서 getBoolen을 실패했습니다. -cachedrowsetimpl.bytefail = {1} 열의 값({0})에서 getByte를 실패했습니다. -cachedrowsetimpl.shortfail = {1} 열의 값({0})에서 getShort를 실패했습니다. -cachedrowsetimpl.intfail = {1} 열의 값({0})에서 getInt를 실패했습니다. -cachedrowsetimpl.longfail = {1} 열의 값({0})에서 getLong을 실패했습니다. -cachedrowsetimpl.floatfail = {1} 열의 값({0})에서 getFloat를 실패했습니다. -cachedrowsetimpl.doublefail = {1} 열의 값({0})에서 getDouble을 실패했습니다. -cachedrowsetimpl.dtypemismt = 데이터 유형이 일치하지 않습니다. -cachedrowsetimpl.datefail = {1} 열의 값({0})에서 getDate를 실패했습니다. 변환할 수 없습니다. -cachedrowsetimpl.timefail = {1} 열의 값({0})에서 getTime을 실패했습니다. 변환할 수 없습니다. -cachedrowsetimpl.posupdate = 위치가 지정된 업데이트가 지원되지 않습니다. -cachedrowsetimpl.unableins = 인스턴스화할 수 없음: {0} -cachedrowsetimpl.beforefirst = beforeFirst: 커서 작업이 부적합합니다. -cachedrowsetimpl.first = 처음: 커서 작업이 부적합합니다. -cachedrowsetimpl.last = 마지막: TYPE_FORWARD_ONLY -cachedrowsetimpl.absolute = 절대: 커서 위치가 부적합합니다. -cachedrowsetimpl.relative = 상대: 커서 위치가 부적합합니다. -cachedrowsetimpl.asciistream = ASCII 스트림에 대한 읽기를 실패했습니다. -cachedrowsetimpl.binstream = 바이너리 스트림에서 읽기를 실패했습니다. -cachedrowsetimpl.failedins = 행 삽입을 실패했습니다. -cachedrowsetimpl.updateins = 행을 삽입하는 중 updateRow가 호출되었습니다. -cachedrowsetimpl.movetoins = moveToInsertRow: CONCUR_READ_ONLY -cachedrowsetimpl.movetoins1 = moveToInsertRow: 메타데이터가 없습니다. -cachedrowsetimpl.movetoins2 = moveToInsertRow: 열 수가 부적합합니다. -cachedrowsetimpl.tablename = 테이블 이름은 널일 수 없습니다. -cachedrowsetimpl.keycols = 키 열이 부적합합니다. -cachedrowsetimpl.opnotsupp = 데이터베이스에서 지원하지 않는 작업입니다. -cachedrowsetimpl.matchcols = 일치 열이 설정된 열과 동일하지 않습니다. -cachedrowsetimpl.setmatchcols = 일치 열을 설정한 후 가져오십시오. -cachedrowsetimpl.matchcols1 = 일치 열은 0개 이상이어야 합니다. -cachedrowsetimpl.matchcols2 = 일치 열은 비어 있거나 널 문자열이어야 합니다. -cachedrowsetimpl.unsetmatch = 설정을 해제하려는 열이 설정된 열과 다릅니다. -cachedrowsetimpl.unsetmatch1 = 열 이름을 unsetMatchColumn의 인수로 사용하십시오. -cachedrowsetimpl.unsetmatch2 = 열 ID를 unsetMatchColumn의 인수로 사용하십시오. -cachedrowsetimpl.numrows = 행 수가 0보다 작거나 인출 크기보다 작습니다. -cachedrowsetimpl.startpos = 시작 위치는 음수일 수 없습니다. -cachedrowsetimpl.nextpage = 호출하기 전에 데이터를 채우십시오. -cachedrowsetimpl.pagesize = 페이지 크기는 0보다 작을 수 없습니다. -cachedrowsetimpl.pagesize1 = 페이지 크기는 maxRows보다 클 수 없습니다. -cachedrowsetimpl.fwdonly = ResultSet는 전달 전용입니다. -cachedrowsetimpl.type = 유형: {0} -cachedrowsetimpl.opnotysupp = 작업이 아직 지원되지 않습니다. -cachedrowsetimpl.featnotsupp = 기능이 지원되지 않습니다. - -# WebRowSetImpl exceptions -webrowsetimpl.nullhash = WebRowSetImpl 인스턴스를 인스턴스화할 수 없습니다. 생성자에 널 Hashtable이 제공되었습니다. -webrowsetimpl.invalidwr = 기록 장치가 부적합합니다. -webrowsetimpl.invalidrd = 읽기 프로그램이 부적합합니다. - -#FilteredRowSetImpl exceptions -filteredrowsetimpl.relative = 상대: 커서 작업이 부적합합니다. -filteredrowsetimpl.absolute = 절대: 커서 작업이 부적합합니다. -filteredrowsetimpl.notallowed = 이 값은 필터를 통과할 수 없습니다. - -#JoinRowSetImpl exceptions -joinrowsetimpl.notinstance = Rowset의 인스턴스가 아닙니다. -joinrowsetimpl.matchnotset = 조인할 일치 열이 설정되지 않았습니다. -joinrowsetimpl.numnotequal = Rowset의 요소 수가 일치 열과 같지 않습니다. -joinrowsetimpl.notdefined = 정의된 조인 유형이 아닙니다. -joinrowsetimpl.notsupported = 이 조인 유형은 지원되지 않습니다. -joinrowsetimpl.initerror = JoinRowSet 초기화 오류 -joinrowsetimpl.genericerr = 일반 joinrowset 초기 오류 -joinrowsetimpl.emptyrowset = 빈 rowset를 이 JoinRowSet에 추가할 수 없습니다. - -#JdbcRowSetImpl exceptions -jdbcrowsetimpl.invalstate = 상태가 부적합합니다. -jdbcrowsetimpl.connect = JdbcRowSet(접속) JNDI가 접속할 수 없습니다. -jdbcrowsetimpl.paramtype = 매개변수 유형을 추론할 수 없습니다. -jdbcrowsetimpl.matchcols = 일치 열이 설정된 열과 동일하지 않습니다. -jdbcrowsetimpl.setmatchcols = 일치 열을 설정한 후 가져오십시오. -jdbcrowsetimpl.matchcols1 = 일치 열은 0개 이상이어야 합니다. -jdbcrowsetimpl.matchcols2 = 일치 열은 널 또는 빈 문자열일 수 없습니다. -jdbcrowsetimpl.unsetmatch = 설정을 해제하려는 열이 설정된 열과 다릅니다. -jdbcrowsetimpl.usecolname = 열 이름을 unsetMatchColumn의 인수로 사용하십시오. -jdbcrowsetimpl.usecolid = 열 ID를 unsetMatchColumn의 인수로 사용하십시오. -jdbcrowsetimpl.resnotupd = ResultSet를 업데이트할 수 없습니다. -jdbcrowsetimpl.opnotysupp = 작업이 아직 지원되지 않습니다. -jdbcrowsetimpl.featnotsupp = 기능이 지원되지 않습니다. - -#CachedRowSetReader exceptions -crsreader.connect = (JNDI) 접속할 수 없습니다. -crsreader.paramtype = 매개변수 유형을 추론할 수 없습니다. -crsreader.connecterr = RowSetReader에 내부 오류 발생: 접속 또는 명령이 없습니다. -crsreader.datedetected = 날짜를 감지함 -crsreader.caldetected = 달력을 감지함 - -#CachedRowSetWriter exceptions -crswriter.connect = 접속할 수 없습니다. -crswriter.tname = writeData에서 테이블 이름을 확인할 수 없습니다. -crswriter.params1 = params1의 값: {0} -crswriter.params2 = params2의 값: {0} -crswriter.conflictsno = 동기화하는 중 충돌함 - -#InsertRow exceptions -insertrow.novalue = 값이 삽입되지 않았습니다. - -#SyncResolverImpl exceptions -syncrsimpl.indexval = 인덱스 값이 범위를 벗어났습니다. -syncrsimpl.noconflict = 이 열은 충돌하지 않습니다. -syncrsimpl.syncnotpos = 동기화할 수 없습니다. -syncrsimpl.valtores = 분석할 값이 데이터베이스 또는 cachedrowset에 있을 수 있습니다. - -#WebRowSetXmlReader exception -wrsxmlreader.invalidcp = RowSet의 끝에 도달했습니다. 커서 위치가 부적합합니다. -wrsxmlreader.readxml = readXML: {0} -wrsxmlreader.parseerr = ** 구문분석 오류: {0}, 행: {1}, URI: {2} - -#WebRowSetXmlWriter exceptions -wrsxmlwriter.ioex = IOException : {0} -wrsxmlwriter.sqlex = SQLException : {0} -wrsxmlwriter.failedwrite = 값 쓰기를 실패했습니다. -wsrxmlwriter.notproper = 적절한 유형이 아닙니다. - -#XmlReaderContentHandler exceptions -xmlrch.errmap = 맵을 설정하는 중 오류 발생: {0} -xmlrch.errmetadata = 메타데이터를 설정하는 중 오류 발생: {0} -xmlrch.errinsertval = 값을 삽입하는 중 오류 발생: {0} -xmlrch.errconstr = 행을 생성하는 중 오류 발생: {0} -xmlrch.errdel = 행을 삭제하는 중 오류 발생: {0} -xmlrch.errinsert = insert 행을 생성하는 중 오류 발생: {0} -xmlrch.errinsdel = insdel 행을 생성하는 중 오류 발생: {0} -xmlrch.errupdate = update 행을 생성하는 중 오류 발생: {0} -xmlrch.errupdrow = 행을 업데이트하는 중 오류 발생: {0} -xmlrch.chars = 문자: -xmlrch.badvalue = 잘못된 값: 널일 수 없는 속성입니다. -xmlrch.badvalue1 = 잘못된 값: 널일 수 없는 메타데이터입니다. -xmlrch.warning = ** 경고: {0}, 행: {1}, URI: {2} - -#RIOptimisticProvider Exceptions -riop.locking = 분류 잠금이 지원되지 않습니다. - -#RIXMLProvider exceptions -rixml.unsupp = RIXMLProvider에서 지원되지 않습니다. diff --git a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_pt_BR.properties b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_pt_BR.properties deleted file mode 100644 index 7496749670c..00000000000 --- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_pt_BR.properties +++ /dev/null @@ -1,169 +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. 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. -# - -# CacheRowSetImpl exceptions -cachedrowsetimpl.populate = Objeto ResultSet inválido fornecido para preencher o método -cachedrowsetimpl.invalidp = Fornecedor de persistências inválido gerado -cachedrowsetimpl.nullhash = Não é possível instanciar a instância CachedRowSetImpl. Hashtable Nulo fornecido ao construtor -cachedrowsetimpl.invalidop = Operação inválida durante a inserção de linha -cachedrowsetimpl.accfailed = Falha em acceptChanges -cachedrowsetimpl.invalidcp = Posição inválida do cursor -cachedrowsetimpl.illegalop = Operação inválida em linha não inserida -cachedrowsetimpl.clonefail = Falha ao clonar: {0} -cachedrowsetimpl.invalidcol = Índice de coluna inválido -cachedrowsetimpl.invalcolnm = Nome de coluna inválido -cachedrowsetimpl.boolfail = Falha em getBoolen no valor ( {0} ) na coluna {1} -cachedrowsetimpl.bytefail = Falha em getByte no valor ( {0} ) na coluna {1} -cachedrowsetimpl.shortfail = Falha em getShort no valor ( {0} ) na coluna {1} -cachedrowsetimpl.intfail = Falha em getInt no valor ( {0} ) na coluna {1} -cachedrowsetimpl.longfail = Falha em getLong no valor ( {0} ) na coluna {1} -cachedrowsetimpl.floatfail = Falha em getFloat no valor ( {0} ) na coluna {1} -cachedrowsetimpl.doublefail = Falha em getDouble no valor ( {0} ) na coluna {1} -cachedrowsetimpl.dtypemismt = Tipo de Dados Incompatível -cachedrowsetimpl.datefail = Falha em getDate no valor ( {0} ) na coluna {1} sem conversão disponível -cachedrowsetimpl.timefail = Falha em getTime no valor ( {0} ) na coluna {1} sem conversão disponível -cachedrowsetimpl.posupdate = Atualizações posicionadas não suportadas -cachedrowsetimpl.unableins = Não é possível instanciar : {0} -cachedrowsetimpl.beforefirst = beforeFirst : Operação do cursor inválida -cachedrowsetimpl.first = First : Operação inválida do cursor -cachedrowsetimpl.last = last : TYPE_FORWARD_ONLY -cachedrowsetimpl.absolute = absolute : Posição inválida do cursor -cachedrowsetimpl.relative = relative : Posição inválida do cursor -cachedrowsetimpl.asciistream = falha na leitura do fluxo ascii -cachedrowsetimpl.binstream = falha na leitura do fluxo binário -cachedrowsetimpl.failedins = Falha ao inserir a linha -cachedrowsetimpl.updateins = updateRow chamado durante a inserção de linha -cachedrowsetimpl.movetoins = moveToInsertRow : CONCUR_READ_ONLY -cachedrowsetimpl.movetoins1 = moveToInsertRow : sem metadados -cachedrowsetimpl.movetoins2 = moveToInsertRow : número de colunas inválido -cachedrowsetimpl.tablename = O nome da tabela não pode ser nulo -cachedrowsetimpl.keycols = Colunas de chaves inválidas -cachedrowsetimpl.opnotsupp = Operação não suportada pelo Banco de Dados -cachedrowsetimpl.matchcols = As colunas correspondentes não são iguais às colunas definidas -cachedrowsetimpl.setmatchcols = Definir Colunas correspondentes antes de obtê-las -cachedrowsetimpl.matchcols1 = As colunas correspondentes devem ser maior do que 0 -cachedrowsetimpl.matchcols2 = As colunas correspondentes devem ser strings vazias ou nulas -cachedrowsetimpl.unsetmatch = As colunas não definidas não são iguais às colunas definidas -cachedrowsetimpl.unsetmatch1 = Usar o nome da coluna como argumento para unsetMatchColumn -cachedrowsetimpl.unsetmatch2 = Usar o ID da coluna como argumento para unsetMatchColumn -cachedrowsetimpl.numrows = O número de linhas é menor do que zero ou menor do que o tamanho obtido -cachedrowsetimpl.startpos = A posição de início não pode ser negativa -cachedrowsetimpl.nextpage = Preencher dados antes de chamar -cachedrowsetimpl.pagesize = O tamanho da página não pode ser menor do que zero -cachedrowsetimpl.pagesize1 = O tamanho da página não pode ser maior do que maxRows -cachedrowsetimpl.fwdonly = ResultSet é somente para frente -cachedrowsetimpl.type = O tipo é : {0} -cachedrowsetimpl.opnotysupp = Operação ainda não suportada -cachedrowsetimpl.featnotsupp = Recurso não suportado - -# WebRowSetImpl exceptions -webrowsetimpl.nullhash = Não é possível instanciar a instância WebRowSetImpl. Hashtable nulo fornecido ao construtor -webrowsetimpl.invalidwr = Gravador inválido -webrowsetimpl.invalidrd = Leitor inválido - -#FilteredRowSetImpl exceptions -filteredrowsetimpl.relative = relative : Operação inválida do cursor -filteredrowsetimpl.absolute = absolute : Operação inválida do cursor -filteredrowsetimpl.notallowed = Este valor não é permitido no filtro - -#JoinRowSetImpl exceptions -joinrowsetimpl.notinstance = Não é uma instância do conjunto de linhas -joinrowsetimpl.matchnotset = Coluna Correspondente não definida para junção -joinrowsetimpl.numnotequal = Número de elementos no conjunto de linhas diferente da coluna correspondente -joinrowsetimpl.notdefined = Não é um tipo definido de junção -joinrowsetimpl.notsupported = Este tipo de junção não é suportada -joinrowsetimpl.initerror = Erro de inicialização do JoinRowSet -joinrowsetimpl.genericerr = Erro inicial de joinrowset genérico -joinrowsetimpl.emptyrowset = O conjunto de linha vazio não pode ser adicionado a este JoinRowSet - -#JdbcRowSetImpl exceptions -jdbcrowsetimpl.invalstate = Estado inválido -jdbcrowsetimpl.connect = Não é possível conectar JdbcRowSet (connect) a JNDI -jdbcrowsetimpl.paramtype = Não é possível deduzir o tipo de parâmetro -jdbcrowsetimpl.matchcols = As Colunas Correspondentes não são iguais às colunas definidas -jdbcrowsetimpl.setmatchcols = Definir as colunas correspondentes antes de obtê-las -jdbcrowsetimpl.matchcols1 = As colunas correspondentes devem ser maior do que 0 -jdbcrowsetimpl.matchcols2 = As colunas correspondentes não podem ser strings vazias ou nulas -jdbcrowsetimpl.unsetmatch = As colunas não definidas não são iguais às colunas definidas -jdbcrowsetimpl.usecolname = Usar o nome da coluna como argumento para unsetMatchColumn -jdbcrowsetimpl.usecolid = Usar o ID da coluna como argumento para unsetMatchColumn -jdbcrowsetimpl.resnotupd = ResultSet não é atualizável -jdbcrowsetimpl.opnotysupp = Operação ainda não suportada -jdbcrowsetimpl.featnotsupp = Recurso não suportado - -#CachedRowSetReader exceptions -crsreader.connect = (JNDI) Não é possível conectar -crsreader.paramtype = Não é possível deduzir o tipo de parâmetro -crsreader.connecterr = Erro Interno no RowSetReader: sem conexão ou comando -crsreader.datedetected = Data Detectada -crsreader.caldetected = Calendário Detectado - -#CachedRowSetWriter exceptions -crswriter.connect = Não é possível obter a conexão -crswriter.tname = writeData não pode determinar o nome da tabela -crswriter.params1 = Valor de params1 : {0} -crswriter.params2 = Valor de params2 : {0} -crswriter.conflictsno = conflitos durante a sincronização - -#InsertRow exceptions -insertrow.novalue = Nenhum valor foi inserido - -#SyncResolverImpl exceptions -syncrsimpl.indexval = Valor de índice fora da faixa -syncrsimpl.noconflict = Está coluna não está em conflito -syncrsimpl.syncnotpos = A sincronização não é possível -syncrsimpl.valtores = O valor a ser decidido pode estar no banco de dados ou no conjunto de linhas armazenado no cache - -#WebRowSetXmlReader exception -wrsxmlreader.invalidcp = Fim de RowSet atingido. Posição inválida do cursor -wrsxmlreader.readxml = readXML : {0} -wrsxmlreader.parseerr = ** Erro de Parsing : {0} , linha : {1} , uri : {2} - -#WebRowSetXmlWriter exceptions -wrsxmlwriter.ioex = IOException : {0} -wrsxmlwriter.sqlex = SQLException : {0} -wrsxmlwriter.failedwrite = Falha ao gravar o valor -wsrxmlwriter.notproper = Não é um tipo adequado - -#XmlReaderContentHandler exceptions -xmlrch.errmap = Erro ao definir o Mapa : {0} -xmlrch.errmetadata = Erro ao definir metadados : {0} -xmlrch.errinsertval = Erro ao inserir valores : {0} -xmlrch.errconstr = Erro ao construir a linha : {0} -xmlrch.errdel = Erro ao excluir a linha : {0} -xmlrch.errinsert = Erro ao construir a linha de inserção : {0} -xmlrch.errinsdel = Erro ao construir a linha insdel : {0} -xmlrch.errupdate = Erro ao construir a linha de atualização : {0} -xmlrch.errupdrow = Erro ao atualizar a linha : {0} -xmlrch.chars = caracteres : -xmlrch.badvalue = Valor incorreto ; propriedade não anulável -xmlrch.badvalue1 = Valor incorreto ; metadado não anulável -xmlrch.warning = ** Advertência : {0} , linha : {1} , uri : {2} - -#RIOptimisticProvider Exceptions -riop.locking = O bloqueio de classificação não é suportado - -#RIXMLProvider exceptions -rixml.unsupp = Não suportado com RIXMLProvider diff --git a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties deleted file mode 100644 index 7e3a21ac2c2..00000000000 --- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties +++ /dev/null @@ -1,169 +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. 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. -# - -# CacheRowSetImpl exceptions -cachedrowsetimpl.populate = Ifyllningsmetoden fick ett ogiltigt ResultSet-objekt -cachedrowsetimpl.invalidp = En ogiltig beständig leverantör genererades -cachedrowsetimpl.nullhash = Kan inte instansiera CachedRowSetImpl. Null-hashtabell skickades till konstruktor -cachedrowsetimpl.invalidop = En ogiltig åtgärd utfördes på infogad rad -cachedrowsetimpl.accfailed = acceptChanges utfördes inte -cachedrowsetimpl.invalidcp = Ogiltigt markörläge -cachedrowsetimpl.illegalop = En otillåten åtgärd utfördes på en icke infogad rad -cachedrowsetimpl.clonefail = Kloningen utfördes inte: {0} -cachedrowsetimpl.invalidcol = Ogiltigt kolumnindex -cachedrowsetimpl.invalcolnm = Ogiltigt kolumnnamn -cachedrowsetimpl.boolfail = getBoolen utfördes inte för värdet ({0}) i kolumnen {1} -cachedrowsetimpl.bytefail = getByte utfördes inte för värdet ({0}) i kolumnen {1} -cachedrowsetimpl.shortfail = getShort utfördes inte för värdet ({0}) i kolumnen {1} -cachedrowsetimpl.intfail = getInt utfördes inte för värdet ({0}) i kolumnen {1} -cachedrowsetimpl.longfail = getLong utfördes inte för värdet ({0}) i kolumnen {1} -cachedrowsetimpl.floatfail = getFloat utfördes inte för värdet ({0}) i kolumnen {1} -cachedrowsetimpl.doublefail = getDouble utfördes inte för värdet ({0}) i kolumnen {1} -cachedrowsetimpl.dtypemismt = Felmatchad datatyp -cachedrowsetimpl.datefail = getDate utfördes inte för värdet ({0}) i kolumnen {1}, ingen konvertering tillgänglig -cachedrowsetimpl.timefail = getTime utfördes inte för värdet ({0}) i kolumnen {1}, ingen konvertering tillgänglig -cachedrowsetimpl.posupdate = Det finns inte stöd för positionerad uppdatering -cachedrowsetimpl.unableins = Kan inte instansiera {0} -cachedrowsetimpl.beforefirst = beforeFirst: Ogiltig marköråtgärd -cachedrowsetimpl.first = First: Ogiltig marköråtgärd -cachedrowsetimpl.last = last: TYPE_FORWARD_ONLY -cachedrowsetimpl.absolute = absolute: Markörpositionen är ogiltig -cachedrowsetimpl.relative = relative: Markörpositionen är ogiltig -cachedrowsetimpl.asciistream = kunde inte läsa ASCII-strömmen -cachedrowsetimpl.binstream = kunde inte läsa den binära strömmen -cachedrowsetimpl.failedins = Kunde inte infoga rad -cachedrowsetimpl.updateins = updateRow anropades från infogad rad -cachedrowsetimpl.movetoins = moveToInsertRow : CONCUR_READ_ONLY -cachedrowsetimpl.movetoins1 = moveToInsertRow: inga metadata -cachedrowsetimpl.movetoins2 = moveToInsertRow: ogiltigt antal kolumner -cachedrowsetimpl.tablename = Tabellnamnet kan inte vara null -cachedrowsetimpl.keycols = Ogiltiga nyckelkolumner -cachedrowsetimpl.opnotsupp = Databasen har inte stöd för denna åtgärd -cachedrowsetimpl.matchcols = Matchningskolumnerna är inte samma som de som ställts in -cachedrowsetimpl.setmatchcols = Ställ in matchningskolumnerna innan du hämtar dem -cachedrowsetimpl.matchcols1 = Matchningskolumnerna måste vara större än 0 -cachedrowsetimpl.matchcols2 = Matchningskolumnerna måste vara tomma eller en null-sträng -cachedrowsetimpl.unsetmatch = Kolumnerna som återställs är inte samma som de som ställts in -cachedrowsetimpl.unsetmatch1 = Använd kolumnnamn som argument för unsetMatchColumn -cachedrowsetimpl.unsetmatch2 = Använd kolumn-id som argument för unsetMatchColumn -cachedrowsetimpl.numrows = Antalet rader understiger noll eller är mindre än hämtningsstorleken -cachedrowsetimpl.startpos = Startpositionen får inte vara negativ -cachedrowsetimpl.nextpage = Fyll i data innan anrop -cachedrowsetimpl.pagesize = Sidstorleken får inte understiga noll -cachedrowsetimpl.pagesize1 = Sidstorleken får inte överstiga maxRows -cachedrowsetimpl.fwdonly = ResultSet kan endast gå framåt -cachedrowsetimpl.type = Typ: {0} -cachedrowsetimpl.opnotysupp = Det finns ännu inget stöd för denna åtgärd -cachedrowsetimpl.featnotsupp = Funktionen stöds inte - -# WebRowSetImpl exceptions -webrowsetimpl.nullhash = Kan inte instansiera WebRowSetImpl. Null-hashtabell skickades till konstruktor. -webrowsetimpl.invalidwr = Ogiltig skrivfunktion -webrowsetimpl.invalidrd = Ogiltig läsare - -#FilteredRowSetImpl exceptions -filteredrowsetimpl.relative = relative: Ogiltig marköråtgärd -filteredrowsetimpl.absolute = absolute: Ogiltig marköråtgärd -filteredrowsetimpl.notallowed = Detta värde kommer att filtreras bort - -#JoinRowSetImpl exceptions -joinrowsetimpl.notinstance = Detta är inte en instans av raduppsättning -joinrowsetimpl.matchnotset = Matchningskolumnen är inte inställd på koppling -joinrowsetimpl.numnotequal = Antal objekt i raduppsättning stämmer inte med matchningskolumnens -joinrowsetimpl.notdefined = Detta är inte någon definierad kopplingstyp -joinrowsetimpl.notsupported = Det finns inget stöd för denna kopplingstyp -joinrowsetimpl.initerror = Initieringsfel för JoinRowSet -joinrowsetimpl.genericerr = Allmänt initieringsfel för JoinRowSet -joinrowsetimpl.emptyrowset = Tomma raduppsättningar kan inte läggas till i denna JoinRowSet - -#JdbcRowSetImpl exceptions -jdbcrowsetimpl.invalstate = Ogiltigt tillstånd -jdbcrowsetimpl.connect = JdbcRowSet (anslut) JNDI kan inte anslutas -jdbcrowsetimpl.paramtype = Kan inte härleda parametertypen -jdbcrowsetimpl.matchcols = Matchningskolumnerna är inte samma som de som ställts in -jdbcrowsetimpl.setmatchcols = Ställ in matchningskolumnerna innan du hämtar dem -jdbcrowsetimpl.matchcols1 = Matchningskolumnerna måste vara större än 0 -jdbcrowsetimpl.matchcols2 = Matchningskolumnerna kan inte vara en null-sträng eller tomma -jdbcrowsetimpl.unsetmatch = Kolumnerna som återställs är inte samma som de som ställts in -jdbcrowsetimpl.usecolname = Använd kolumnnamn som argument för unsetMatchColumn -jdbcrowsetimpl.usecolid = Använd kolumn-id som argument för unsetMatchColumn -jdbcrowsetimpl.resnotupd = ResultSet är inte uppdateringsbart -jdbcrowsetimpl.opnotysupp = Det finns ännu inget stöd för denna åtgärd -jdbcrowsetimpl.featnotsupp = Funktionen stöds inte - -#CachedRowSetReader exceptions -crsreader.connect = (JNDI) kan inte anslutas -crsreader.paramtype = Kan inte härleda parametertypen -crsreader.connecterr = Internt fel i RowSetReader: ingen anslutning eller inget kommando -crsreader.datedetected = Ett datum har identifierats -crsreader.caldetected = En kalender har identifierats - -#CachedRowSetWriter exceptions -crswriter.connect = Kan inte upprätta anslutning -crswriter.tname = writeData kan inte fastställa tabellnamnet -crswriter.params1 = Parametervärde1: {0} -crswriter.params2 = Parametervärde2: {0} -crswriter.conflictsno = orsakar konflikt vid synkronisering - -#InsertRow exceptions -insertrow.novalue = Inget värde har infogats - -#SyncResolverImpl exceptions -syncrsimpl.indexval = Indexvärdet ligger utanför intervallet -syncrsimpl.noconflict = Kolumnen orsakar ingen konflikt -syncrsimpl.syncnotpos = Synkronisering är inte möjlig -syncrsimpl.valtores = Värdet som ska fastställas kan antingen finnas i databasen eller i cachedrowset - -#WebRowSetXmlReader exception -wrsxmlreader.invalidcp = Slutet på RowSet har nåtts. Markörpositionen är ogiltig. -wrsxmlreader.readxml = readXML: {0} -wrsxmlreader.parseerr = ** Tolkningsfel: {0}, rad: {1}, URI: {2} - -#WebRowSetXmlWriter exceptions -wrsxmlwriter.ioex = IOException: {0} -wrsxmlwriter.sqlex = SQLException: {0} -wrsxmlwriter.failedwrite = Kunde inte skriva värdet -wsrxmlwriter.notproper = Ingen riktig typ - -#XmlReaderContentHandler exceptions -xmlrch.errmap = Ett fel inträffade vid inställning av mappning: {0} -xmlrch.errmetadata = Ett fel inträffade vid inställning av metadata: {0} -xmlrch.errinsertval = Ett fel inträffade vid infogning av värden: {0} -xmlrch.errconstr = Ett fel inträffade vid konstruktion av rad: {0} -xmlrch.errdel = Ett fel inträffade vid borttagning av rad: {0} -xmlrch.errinsert = Ett fel inträffade vid konstruktion av infogad rad: {0} -xmlrch.errinsdel = Ett fel inträffade vid konstruktion av insdel-rad: {0} -xmlrch.errupdate = Ett fel inträffade vid konstruktion av uppdateringsrad: {0} -xmlrch.errupdrow = Ett fel inträffade vid uppdatering av rad: {0} -xmlrch.chars = tecken: -xmlrch.badvalue = Felaktigt värde; egenskapen får inte ha värdet null -xmlrch.badvalue1 = Felaktigt värde; metadata får inte ha värdet null -xmlrch.warning = ** Varning! {0}, rad: {1}, URI: {2} - -#RIOptimisticProvider Exceptions -riop.locking = Det finns inte stöd för denna låsningsklassificering - -#RIXMLProvider exceptions -rixml.unsupp = RIXMLProvider har inte stöd för detta diff --git a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_zh_TW.properties b/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_zh_TW.properties deleted file mode 100644 index f6c3584be2c..00000000000 --- a/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_zh_TW.properties +++ /dev/null @@ -1,169 +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. 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. -# - -# CacheRowSetImpl exceptions -cachedrowsetimpl.populate = 為植入方法提供的 ResultSet 物件無效 -cachedrowsetimpl.invalidp = 產生的持續性提供者無效 -cachedrowsetimpl.nullhash = 無法建立 CachedRowSetImpl 執行處理。為建構子提供的 Hashtable 為空值 -cachedrowsetimpl.invalidop = 插入列時的作業無效 -cachedrowsetimpl.accfailed = acceptChanges 失敗 -cachedrowsetimpl.invalidcp = 游標位置無效 -cachedrowsetimpl.illegalop = 非插入列上存在無效作業 -cachedrowsetimpl.clonefail = 複製失敗: {0} -cachedrowsetimpl.invalidcol = 欄索引無效 -cachedrowsetimpl.invalcolnm = 欄名無效 -cachedrowsetimpl.boolfail = 對欄 {1} 中的值 ( {0} ) 執行 getBoolen 失敗 -cachedrowsetimpl.bytefail = 對欄 {1} 中的值 ( {0} ) 執行 getByte 失敗 -cachedrowsetimpl.shortfail = 對欄 {1} 中的值 ( {0} ) 執行 getShort 失敗 -cachedrowsetimpl.intfail = 對欄 {1} 中的值 ( {0} ) 執行 getInt 失敗 -cachedrowsetimpl.longfail = 對欄 {1} 中的值 ( {0} ) 執行 getLong 失敗 -cachedrowsetimpl.floatfail = 對欄 {1} 中的值 ( {0} ) 執行 getFloat 失敗 -cachedrowsetimpl.doublefail = 對欄 {1} 中的值 ( {0} ) 執行 getDouble 失敗 -cachedrowsetimpl.dtypemismt = 資料類型不相符 -cachedrowsetimpl.datefail = 對欄 {1} 中的值 ( {0} ) 執行 getDate 失敗,未進行轉換 -cachedrowsetimpl.timefail = 對欄 {1} 中的值 ( {0} ) 執行 getTime 失敗,未進行轉換 -cachedrowsetimpl.posupdate = 不支援定位的更新 -cachedrowsetimpl.unableins = 無法建立: {0} -cachedrowsetimpl.beforefirst = beforeFirst: 游標作業無效 -cachedrowsetimpl.first = First: 游標作業無效 -cachedrowsetimpl.last = last : TYPE_FORWARD_ONLY -cachedrowsetimpl.absolute = absolute: 游標位置無效 -cachedrowsetimpl.relative = relative: 游標位置無效 -cachedrowsetimpl.asciistream = 讀取 ascii 串流失敗 -cachedrowsetimpl.binstream = 讀取二進位串流失敗 -cachedrowsetimpl.failedins = 插入列失敗 -cachedrowsetimpl.updateins = 插入列時呼叫 updateRow -cachedrowsetimpl.movetoins = moveToInsertRow: CONCUR_READ_ONLY -cachedrowsetimpl.movetoins1 = moveToInsertRow: 沒有描述資料 -cachedrowsetimpl.movetoins2 = moveToInsertRow: 欄數無效 -cachedrowsetimpl.tablename = 表格名稱不能為空值 -cachedrowsetimpl.keycols = 關鍵欄無效 -cachedrowsetimpl.opnotsupp = 資料庫不支援作業 -cachedrowsetimpl.matchcols = 匹配欄和設定的欄不同 -cachedrowsetimpl.setmatchcols = 在取得匹配欄之前設定它們 -cachedrowsetimpl.matchcols1 = 匹配欄應大於 0 -cachedrowsetimpl.matchcols2 = 匹配欄應為空白字串或空值字串 -cachedrowsetimpl.unsetmatch = 取消設定的欄和設定的欄不同 -cachedrowsetimpl.unsetmatch1 = 使用欄名作為 unsetMatchColumn 的引數 -cachedrowsetimpl.unsetmatch2 = 使用欄 ID 作為 unsetMatchColumn 的引數 -cachedrowsetimpl.numrows = 列數小於零或小於擷取大小 -cachedrowsetimpl.startpos = 起始位置不能為負數 -cachedrowsetimpl.nextpage = 在呼叫之前植入資料 -cachedrowsetimpl.pagesize = 頁面大小不能小於零 -cachedrowsetimpl.pagesize1 = 頁面大小不能大於 maxRows -cachedrowsetimpl.fwdonly = ResultSet 只能向前進行 -cachedrowsetimpl.type = 類型是: {0} -cachedrowsetimpl.opnotysupp = 尚不支援該作業 -cachedrowsetimpl.featnotsupp = 不支援該功能 - -# WebRowSetImpl exceptions -webrowsetimpl.nullhash = 無法建立 WebRowSetImpl 執行處理。為建構子提供的 Hashtable 為空值 -webrowsetimpl.invalidwr = 寫入器無效 -webrowsetimpl.invalidrd = 讀取器無效 - -#FilteredRowSetImpl exceptions -filteredrowsetimpl.relative = relative: 游標作業無效 -filteredrowsetimpl.absolute = absolute: 游標作業無效 -filteredrowsetimpl.notallowed = 不允許此值通過篩選 - -#JoinRowSetImpl exceptions -joinrowsetimpl.notinstance = 不是 rowset 的執行處理 -joinrowsetimpl.matchnotset = 未設定用於連結的匹配欄 -joinrowsetimpl.numnotequal = rowset 中的元素數不等於匹配欄 -joinrowsetimpl.notdefined = 這不是連結的已定義類型 -joinrowsetimpl.notsupported = 不支援此類連結 -joinrowsetimpl.initerror = JoinRowSet 初始化錯誤 -joinrowsetimpl.genericerr = 一般的 joinrowset 初始化錯誤 -joinrowsetimpl.emptyrowset = 無法將空 rowset 新增至此 JoinRowSet - -#JdbcRowSetImpl exceptions -jdbcrowsetimpl.invalstate = 狀態無效 -jdbcrowsetimpl.connect = JdbcRowSet (連線) JNDI 無法連線 -jdbcrowsetimpl.paramtype = 無法推斷參數類型 -jdbcrowsetimpl.matchcols = 匹配欄和設定的欄不同 -jdbcrowsetimpl.setmatchcols = 要先設定匹配欄,才能取得它們 -jdbcrowsetimpl.matchcols1 = 匹配欄應大於 0 -jdbcrowsetimpl.matchcols2 = 匹配欄不能為空白字串或空值字串 -jdbcrowsetimpl.unsetmatch = 取消設定的欄和設定的欄不同 -jdbcrowsetimpl.usecolname = 使用欄名作為 unsetMatchColumn 的引數 -jdbcrowsetimpl.usecolid = 使用欄 ID 作為 unsetMatchColumn 的引數 -jdbcrowsetimpl.resnotupd = ResultSet 不可更新 -jdbcrowsetimpl.opnotysupp = 尚不支援該作業 -jdbcrowsetimpl.featnotsupp = 不支援該功能 - -#CachedRowSetReader exceptions -crsreader.connect = (JNDI) 無法連線 -crsreader.paramtype = 無法推斷參數類型 -crsreader.connecterr = RowSetReader 中出現內部錯誤: 無連線或命令 -crsreader.datedetected = 偵測到日期 -crsreader.caldetected = 偵測到行事曆 - -#CachedRowSetWriter exceptions -crswriter.connect = 無法取得連線 -crswriter.tname = writeData 不能決定表格名稱 -crswriter.params1 = params1 的值: {0} -crswriter.params2 = params2 的值: {0} -crswriter.conflictsno = 同步化時發生衝突 - -#InsertRow exceptions -insertrow.novalue = 尚未插入值 - -#SyncResolverImpl exceptions -syncrsimpl.indexval = 索引值超出範圍 -syncrsimpl.noconflict = 此欄不衝突 -syncrsimpl.syncnotpos = 不可能同步化 -syncrsimpl.valtores = 要解析的值可位於資料庫或 cachedrowset 中 - -#WebRowSetXmlReader exception -wrsxmlreader.invalidcp = 已到達 RowSet 結尾。游標位置無效 -wrsxmlreader.readxml = readXML: {0} -wrsxmlreader.parseerr = ** 剖析錯誤: {0},行: {1},uri: {2} - -#WebRowSetXmlWriter exceptions -wrsxmlwriter.ioex = IOException : {0} -wrsxmlwriter.sqlex = SQLException : {0} -wrsxmlwriter.failedwrite = 寫入值失敗 -wsrxmlwriter.notproper = 不是正確類型 - -#XmlReaderContentHandler exceptions -xmlrch.errmap = 設定對映時發生錯誤: {0} -xmlrch.errmetadata = 設定描述資料時發生錯誤: {0} -xmlrch.errinsertval = 插入值時發生錯誤: {0} -xmlrch.errconstr = 建構列時發生錯誤: {0} -xmlrch.errdel = 刪除列時發生錯誤: {0} -xmlrch.errinsert = 建構插入列時發生錯誤 : {0} -xmlrch.errinsdel = 建構 insdel 列時發生錯誤: {0} -xmlrch.errupdate = 建構更新列時發生錯誤: {0} -xmlrch.errupdrow = 更新列時發生錯誤: {0} -xmlrch.chars = 字元: -xmlrch.badvalue = 錯誤的值; 屬性不能為空值 -xmlrch.badvalue1 = 錯誤的值; 描述資料不能為空值 -xmlrch.warning = ** 警告: {0},行: {1},uri: {2} - -#RIOptimisticProvider Exceptions -riop.locking = 不支援鎖定分類 - -#RIXMLProvider exceptions -rixml.unsupp = RIXMLProvider 不支援 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java deleted file mode 100644 index c721fa82a49..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java +++ /dev/null @@ -1,1425 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And - * you need to enter key , value pair as part of contents - * Array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XSLTErrorResources_es extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /* - * Static variables - */ - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX = - "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX"; - - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT = - "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT"; - - public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE"; - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE"; - public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS"; - public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD"; - public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES"; - public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB"; - public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND"; - public static final String ER_CANT_RESOLVE_NAME_AVT = "ER_CANT_RESOLVE_NAME_AVT"; - public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB"; - public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB"; - public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB = - "ER_BAD_VAL_ON_LEVEL_ATTRIB"; - public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB"; - public static final String ER_NEED_NAME_OR_MATCH_ATTRIB = - "ER_NEED_NAME_OR_MATCH_ATTRIB"; - public static final String ER_CANT_RESOLVE_NSPREFIX = - "ER_CANT_RESOLVE_NSPREFIX"; - public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE"; - public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC"; - public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR"; - public static final String ER_NULL_CHILD = "ER_NULL_CHILD"; - public static final String ER_NEED_SELECT_ATTRIB = "ER_NEED_SELECT_ATTRIB"; - public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB"; - public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB"; - public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC"; - public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON = - "ER_COULD_NOT_CREATE_XML_PROC_LIAISON"; - public static final String ER_PROCESS_NOT_SUCCESSFUL = - "ER_PROCESS_NOT_SUCCESSFUL"; - public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL"; - public static final String ER_ENCODING_NOT_SUPPORTED = - "ER_ENCODING_NOT_SUPPORTED"; - public static final String ER_COULD_NOT_CREATE_TRACELISTENER = - "ER_COULD_NOT_CREATE_TRACELISTENER"; - public static final String ER_KEY_REQUIRES_NAME_ATTRIB = - "ER_KEY_REQUIRES_NAME_ATTRIB"; - public static final String ER_KEY_REQUIRES_MATCH_ATTRIB = - "ER_KEY_REQUIRES_MATCH_ATTRIB"; - public static final String ER_KEY_REQUIRES_USE_ATTRIB = - "ER_KEY_REQUIRES_USE_ATTRIB"; - public static final String ER_REQUIRES_ELEMENTS_ATTRIB = - "ER_REQUIRES_ELEMENTS_ATTRIB"; - public static final String ER_MISSING_PREFIX_ATTRIB = - "ER_MISSING_PREFIX_ATTRIB"; - public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL"; - public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND"; - public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION"; - public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB"; - public static final String ER_STYLESHEET_INCLUDES_ITSELF = - "ER_STYLESHEET_INCLUDES_ITSELF"; - public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR"; - public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB"; - public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT = - "ER_MISSING_CONTAINER_ELEMENT_COMPONENT"; - public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT = - "ER_CAN_ONLY_OUTPUT_TO_ELEMENT"; - public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR"; - public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR"; - public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION"; - public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR = - "ER_CANNOT_SERIALIZE_XSLPROCESSOR"; - public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET"; - public static final String ER_FAILED_PROCESS_STYLESHEET = - "ER_FAILED_PROCESS_STYLESHEET"; - public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC"; - public static final String ER_COULDNT_FIND_FRAGMENT = - "ER_COULDNT_FIND_FRAGMENT"; - public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT"; - public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB = - "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB = - "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG = - "ER_NO_CLONE_OF_DOCUMENT_FRAG"; - public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM"; - public static final String ER_XMLSPACE_ILLEGAL_VALUE = - "ER_XMLSPACE_ILLEGAL_VALUE"; - public static final String ER_NO_XSLKEY_DECLARATION = - "ER_NO_XSLKEY_DECLARATION"; - public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL"; - public static final String ER_XSLFUNCTIONS_UNSUPPORTED = - "ER_XSLFUNCTIONS_UNSUPPORTED"; - public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR"; - public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET = - "ER_NOT_ALLOWED_INSIDE_STYLESHEET"; - public static final String ER_RESULTNS_NOT_SUPPORTED = - "ER_RESULTNS_NOT_SUPPORTED"; - public static final String ER_DEFAULTSPACE_NOT_SUPPORTED = - "ER_DEFAULTSPACE_NOT_SUPPORTED"; - public static final String ER_INDENTRESULT_NOT_SUPPORTED = - "ER_INDENTRESULT_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB"; - public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM"; - public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE"; - public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN"; - public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_MISPLACED_XSLOTHERWISE = - "ER_MISPLACED_XSLOTHERWISE"; - public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE = - "ER_NOT_ALLOWED_INSIDE_TEMPLATE"; - public static final String ER_UNKNOWN_EXT_NS_PREFIX = - "ER_UNKNOWN_EXT_NS_PREFIX"; - public static final String ER_IMPORTS_AS_FIRST_ELEM = - "ER_IMPORTS_AS_FIRST_ELEM"; - public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF"; - public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL"; - public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL = - "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL"; - public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION"; - public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR"; - public static final String ER_CURRENCY_SIGN_ILLEGAL= - "ER_CURRENCY_SIGN_ILLEGAL"; - public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM = - "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM"; - public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER = - "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER"; - public static final String ER_REDIRECT_COULDNT_GET_FILENAME = - "ER_REDIRECT_COULDNT_GET_FILENAME"; - public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT = - "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT"; - public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX = - "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX"; - public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI"; - public static final String ER_MISSING_ARG_FOR_OPTION = - "ER_MISSING_ARG_FOR_OPTION"; - public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION"; - public static final String ER_MALFORMED_FORMAT_STRING = - "ER_MALFORMED_FORMAT_STRING"; - public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String ER_ILLEGAL_ATTRIBUTE_VALUE = - "ER_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN"; - public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH = - "ER_NO_APPLY_IMPORT_IN_FOR_EACH"; - public static final String ER_CANT_USE_DTM_FOR_OUTPUT = - "ER_CANT_USE_DTM_FOR_OUTPUT"; - public static final String ER_CANT_USE_DTM_FOR_INPUT = - "ER_CANT_USE_DTM_FOR_INPUT"; - public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_XSLATTRSET_USED_ITSELF = - "ER_XSLATTRSET_USED_ITSELF"; - public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM"; - public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS"; - public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT = - "ER_IN_ELEMTEMPLATEELEM_READOBJECT"; - public static final String ER_DUPLICATE_NAMED_TEMPLATE = - "ER_DUPLICATE_NAMED_TEMPLATE"; - public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL"; - public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF"; - public static final String ER_ILLEGAL_DOMSOURCE_INPUT = - "ER_ILLEGAL_DOMSOURCE_INPUT"; - public static final String ER_CLASS_NOT_FOUND_FOR_OPTION = - "ER_CLASS_NOT_FOUND_FOR_OPTION"; - public static final String ER_REQUIRED_ELEM_NOT_FOUND = - "ER_REQUIRED_ELEM_NOT_FOUND"; - public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL"; - public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL"; - public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL"; - public static final String ER_SOURCE_CANNOT_BE_NULL = - "ER_SOURCE_CANNOT_BE_NULL"; - public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR"; - public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN"; - public static final String ER_CANNOT_CREATE_EXTENSN = - "ER_CANNOT_CREATE_EXTENSN"; - public static final String ER_INSTANCE_MTHD_CALL_REQUIRES = - "ER_INSTANCE_MTHD_CALL_REQUIRES"; - public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME"; - public static final String ER_ELEMENT_NAME_METHOD_STATIC = - "ER_ELEMENT_NAME_METHOD_STATIC"; - public static final String ER_EXTENSION_FUNC_UNKNOWN = - "ER_EXTENSION_FUNC_UNKNOWN"; - public static final String ER_MORE_MATCH_CONSTRUCTOR = - "ER_MORE_MATCH_CONSTRUCTOR"; - public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD"; - public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT"; - public static final String ER_INVALID_CONTEXT_PASSED = - "ER_INVALID_CONTEXT_PASSED"; - public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS"; - public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME"; - public static final String ER_NO_URL = "ER_NO_URL"; - public static final String ER_POOL_SIZE_LESSTHAN_ONE = - "ER_POOL_SIZE_LESSTHAN_ONE"; - public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER"; - public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT"; - public static final String ER_ILLEGAL_XMLSPACE_VALUE = - "ER_ILLEGAL_XMLSPACE_VALUE"; - public static final String ER_PROCESSFROMNODE_FAILED = - "ER_PROCESSFROMNODE_FAILED"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = - "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = - "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION = - "ER_UNKNOWN_ERROR_CALLING_EXTENSION"; - public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL"; - public static final String ER_ELEM_CONTENT_NOT_ALLOWED = - "ER_ELEM_CONTENT_NOT_ALLOWED"; - public static final String ER_STYLESHEET_DIRECTED_TERMINATION = - "ER_STYLESHEET_DIRECTED_TERMINATION"; - public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO"; - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = - "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES = - "ER_CANNOT_INIT_DEFAULT_TEMPLATES"; - public static final String ER_RESULT_NULL = "ER_RESULT_NULL"; - public static final String ER_RESULT_COULD_NOT_BE_SET = - "ER_RESULT_COULD_NOT_BE_SET"; - public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED"; - public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE = - "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE"; - public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE = - "ER_CANNOT_TRANSFORM_SOURCE_TYPE"; - public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER"; - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE"; - public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER"; - public static final String ER_NO_STYLESHEET_IN_MEDIA = - "ER_NO_STYLESHEET_IN_MEDIA"; - public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_PROPERTY_VALUE_BOOLEAN = - "ER_PROPERTY_VALUE_BOOLEAN"; - public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT = - "ER_COULD_NOT_FIND_EXTERN_SCRIPT"; - public static final String ER_RESOURCE_COULD_NOT_FIND = - "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED = - "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED"; - public static final String ER_FAILED_CREATING_ELEMLITRSLT = - "ER_FAILED_CREATING_ELEMLITRSLT"; - public static final String ER_VALUE_SHOULD_BE_NUMBER = - "ER_VALUE_SHOULD_BE_NUMBER"; - public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL"; - public static final String ER_FAILED_CALLING_METHOD = - "ER_FAILED_CALLING_METHOD"; - public static final String ER_FAILED_CREATING_ELEMTMPL = - "ER_FAILED_CREATING_ELEMTMPL"; - public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED"; - public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED"; - public static final String ER_BAD_VALUE = "ER_BAD_VALUE"; - public static final String ER_ATTRIB_VALUE_NOT_FOUND = - "ER_ATTRIB_VALUE_NOT_FOUND"; - public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED = - "ER_ATTRIB_VALUE_NOT_RECOGNIZED"; - public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE"; - public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG"; - public static final String ER_CANNOT_FIND_SAX1_DRIVER = - "ER_CANNOT_FIND_SAX1_DRIVER"; - public static final String ER_SAX1_DRIVER_NOT_LOADED = - "ER_SAX1_DRIVER_NOT_LOADED"; - public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED = - "ER_SAX1_DRIVER_NOT_INSTANTIATED" ; - public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER = - "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER"; - public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED = - "ER_PARSER_PROPERTY_NOT_SPECIFIED"; - public static final String ER_PARSER_ARG_CANNOT_BE_NULL = - "ER_PARSER_ARG_CANNOT_BE_NULL" ; - public static final String ER_FEATURE = "ER_FEATURE"; - public static final String ER_PROPERTY = "ER_PROPERTY" ; - public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER"; - public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ; - public static final String ER_NO_DRIVER_NAME_SPECIFIED = - "ER_NO_DRIVER_NAME_SPECIFIED"; - public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED"; - public static final String ER_POOLSIZE_LESS_THAN_ONE = - "ER_POOLSIZE_LESS_THAN_ONE"; - public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME"; - public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER"; - public static final String ER_ASSERT_NO_TEMPLATE_PARENT = - "ER_ASSERT_NO_TEMPLATE_PARENT"; - public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR = - "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR"; - public static final String ER_NOT_ALLOWED_IN_POSITION = - "ER_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION = - "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE = - "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE"; - public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX = - "ER_NAMESPACE_CONTEXT_NULL_PREFIX"; - public static final String ER_XPATH_RESOLVER_NULL_QNAME = - "ER_XPATH_RESOLVER_NULL_QNAME"; - public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY = - "ER_XPATH_RESOLVER_NEGATIVE_ARITY"; - public static final String INVALID_TCHAR = "INVALID_TCHAR"; - public static final String INVALID_QNAME = "INVALID_QNAME"; - public static final String INVALID_ENUM = "INVALID_ENUM"; - public static final String INVALID_NMTOKEN = "INVALID_NMTOKEN"; - public static final String INVALID_NCNAME = "INVALID_NCNAME"; - public static final String INVALID_BOOLEAN = "INVALID_BOOLEAN"; - public static final String INVALID_NUMBER = "INVALID_NUMBER"; - public static final String ER_ARG_LITERAL = "ER_ARG_LITERAL"; - public static final String ER_DUPLICATE_GLOBAL_VAR ="ER_DUPLICATE_GLOBAL_VAR"; - public static final String ER_DUPLICATE_VAR = "ER_DUPLICATE_VAR"; - public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH"; - public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX"; - public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET"; - public static final String ER_FUNCTION_NOT_FOUND = - "ER_FUNCTION_NOT_FOUND"; - public static final String ER_CANT_HAVE_CONTENT_AND_SELECT = - "ER_CANT_HAVE_CONTENT_AND_SELECT"; - public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE"; - public static final String ER_SET_FEATURE_NULL_NAME = - "ER_SET_FEATURE_NULL_NAME"; - public static final String ER_GET_FEATURE_NULL_NAME = - "ER_GET_FEATURE_NULL_NAME"; - public static final String ER_UNSUPPORTED_FEATURE = - "ER_UNSUPPORTED_FEATURE"; - public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING = - "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING"; - - public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE"; - public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR = - "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR"; - public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT = - "WG_EXPR_ATTRIB_CHANGED_TO_SELECT"; - public static final String WG_NO_LOCALE_IN_FORMATNUMBER = - "WG_NO_LOCALE_IN_FORMATNUMBER"; - public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_CANNOT_LOAD_REQUESTED_DOC = - "WG_CANNOT_LOAD_REQUESTED_DOC"; - public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR"; - public static final String WG_FUNCTIONS_SHOULD_USE_URL = - "WG_FUNCTIONS_SHOULD_USE_URL"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 = - "WG_ENCODING_NOT_SUPPORTED_USING_UTF8"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA = - "WG_ENCODING_NOT_SUPPORTED_USING_JAVA"; - public static final String WG_SPECIFICITY_CONFLICTS = - "WG_SPECIFICITY_CONFLICTS"; - public static final String WG_PARSING_AND_PREPARING = - "WG_PARSING_AND_PREPARING"; - public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE"; - public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP"; - public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED"; - public static final String WG_NO_DECIMALFORMAT_DECLARATION = - "WG_NO_DECIMALFORMAT_DECLARATION"; - public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS"; - public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED = - "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED"; - public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE = - "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE"; - public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE"; - public static final String WG_COULD_NOT_RESOLVE_PREFIX = - "WG_COULD_NOT_RESOLVE_PREFIX"; - public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String WG_ILLEGAL_ATTRIBUTE_NAME = - "WG_ILLEGAL_ATTRIBUTE_NAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_VALUE = - "WG_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG"; - public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_POSITION = - "WG_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String NO_MODIFICATION_ALLOWED_ERR = - "NO_MODIFICATION_ALLOWED_ERR"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_NO_CURLYBRACE, - "Error: no puede haber'{' en la expresi\u00F3n"}, - - { ER_ILLEGAL_ATTRIBUTE , - "{0} tiene un atributo no permitido: {1}"}, - - {ER_NULL_SOURCENODE_APPLYIMPORTS , - "sourceNode es nulo en xsl:apply-imports."}, - - {ER_CANNOT_ADD, - "No se puede agregar {0} a {1}"}, - - { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES, - "sourceNode es nulo en handleApplyTemplatesInstruction"}, - - { ER_NO_NAME_ATTRIB, - "{0} debe tener un atributo name."}, - - {ER_TEMPLATE_NOT_FOUND, - "No se ha encontrado la plantilla llamada: {0}"}, - - {ER_CANT_RESOLVE_NAME_AVT, - "No se ha podido resolver el AVT del nombre en xsl:call-template."}, - - {ER_REQUIRES_ATTRIB, - "{0} necesita el atributo: {1}"}, - - { ER_MUST_HAVE_TEST_ATTRIB, - "{0} debe tener un atributo ''test''."}, - - {ER_BAD_VAL_ON_LEVEL_ATTRIB, - "Valor err\u00F3neo en el atributo level: {0}"}, - - {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML, - "el nombre de instrucci\u00F3n de procesamiento no puede ser 'xml'"}, - - { ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, - "el nombre de instrucci\u00F3n de procesamiento debe ser un NCName v\u00E1lido: {0}"}, - - { ER_NEED_MATCH_ATTRIB, - "{0} debe tener un atributo match si tiene un modo."}, - - { ER_NEED_NAME_OR_MATCH_ATTRIB, - "{0} necesita un atributo name o match."}, - - {ER_CANT_RESOLVE_NSPREFIX, - "No se puede resolver el prefijo de espacio de nombres: {0}"}, - - { ER_ILLEGAL_VALUE, - "xml:space tiene un valor no permitido: {0}"}, - - { ER_NO_OWNERDOC, - "El nodo secundario no tiene un documento de propietario."}, - - { ER_ELEMTEMPLATEELEM_ERR, - "Error de ElemTemplateElement: {0}"}, - - { ER_NULL_CHILD, - "Intentando agregar un secundario nulo."}, - - { ER_NEED_SELECT_ATTRIB, - "{0} necesita un atributo select."}, - - { ER_NEED_TEST_ATTRIB , - "xsl:when debe tener un atributo 'test'."}, - - { ER_NEED_NAME_ATTRIB, - "xsl:with-param debe tener un atributo 'name'."}, - - { ER_NO_CONTEXT_OWNERDOC, - "El contexto no tiene un documento de propietario."}, - - {ER_COULD_NOT_CREATE_XML_PROC_LIAISON, - "No se ha podido crear el enlace TransformerFactory XML: {0}"}, - - {ER_PROCESS_NOT_SUCCESSFUL, - "Xalan: el proceso no se ha realizado correctamente."}, - - { ER_NOT_SUCCESSFUL, - "Xalan: no se ha realizado correctamente."}, - - { ER_ENCODING_NOT_SUPPORTED, - "Codificaci\u00F3n no soportada: {0}"}, - - {ER_COULD_NOT_CREATE_TRACELISTENER, - "No se ha podido crear TraceListener: {0}"}, - - {ER_KEY_REQUIRES_NAME_ATTRIB, - "xsl:key necesita un atributo 'name'."}, - - { ER_KEY_REQUIRES_MATCH_ATTRIB, - "xsl:key necesita un atributo 'match'."}, - - { ER_KEY_REQUIRES_USE_ATTRIB, - "xsl:key necesita un atributo 'use'."}, - - { ER_REQUIRES_ELEMENTS_ATTRIB, - "(StylesheetHandler) {0} necesita un atributo ''elements''."}, - - { ER_MISSING_PREFIX_ATTRIB, - "(StylesheetHandler) Falta el valor de ''prefix'' del atributo {0}"}, - - { ER_BAD_STYLESHEET_URL, - "La URL de hoja de estilo no es v\u00E1lida: {0}"}, - - { ER_FILE_NOT_FOUND, - "No se ha encontrado el archivo de hoja de estilo: {0}"}, - - { ER_IOEXCEPTION, - "Ten\u00EDa una excepci\u00F3n de E/S con el archivo de hoja de estilo: {0}"}, - - { ER_NO_HREF_ATTRIB, - "(StylesheetHandler) No se ha encontrado el atributo href para {0}"}, - - { ER_STYLESHEET_INCLUDES_ITSELF, - "(StylesheetHandler) {0} se incluye directa o indirectamente."}, - - { ER_PROCESSINCLUDE_ERROR, - "Error de StylesheetHandler.processInclude, {0}"}, - - { ER_MISSING_LANG_ATTRIB, - "(StylesheetHandler) Falta el atributo ''lang'' {0}"}, - - { ER_MISSING_CONTAINER_ELEMENT_COMPONENT, - "(StylesheetHandler) \u00BFElemento {0} mal colocado? Falta el elemento contenedor ''component''"}, - - { ER_CAN_ONLY_OUTPUT_TO_ELEMENT, - "La salida s\u00F3lo puede realizarse en Element, DocumentFragment, Document o PrintWriter."}, - - { ER_PROCESS_ERROR, - "Error de StylesheetRoot.process"}, - - { ER_UNIMPLNODE_ERROR, - "Error de UnImplNode: {0}"}, - - { ER_NO_SELECT_EXPRESSION, - "\u00A1Error! No se ha encontrado la expresi\u00F3n de selecci\u00F3n xpath (-select)."}, - - { ER_CANNOT_SERIALIZE_XSLPROCESSOR, - "No se puede serializar un procesador XSL."}, - - { ER_NO_INPUT_STYLESHEET, - "No se ha especificado la entrada de hoja de estilo."}, - - { ER_FAILED_PROCESS_STYLESHEET, - "Fallo al procesar la hoja de estilo."}, - - { ER_COULDNT_PARSE_DOC, - "No se ha podido analizar el documento {0}."}, - - { ER_COULDNT_FIND_FRAGMENT, - "No se ha encontrado el fragmento: {0}"}, - - { ER_NODE_NOT_ELEMENT, - "El nodo apuntado por el identificador de fragmento no era un elemento: {0}"}, - - { ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB, - "for-each debe tener un atributo name o match."}, - - { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB, - "las plantillas deben tener un atributo name o match."}, - - { ER_NO_CLONE_OF_DOCUMENT_FRAG, - "No hay ninguna clonaci\u00F3n de un fragmento de documento."}, - - { ER_CANT_CREATE_ITEM, - "No se puede crear el elemento en el \u00E1rbol de resultados: {0}"}, - - { ER_XMLSPACE_ILLEGAL_VALUE, - "xml:space en el XML de origen tiene un valor no v\u00E1lido: {0}"}, - - { ER_NO_XSLKEY_DECLARATION, - "No hay ninguna declaraci\u00F3n xsl:key para {0}."}, - - { ER_CANT_CREATE_URL, - "Error. No se puede crear la URL para: {0}"}, - - { ER_XSLFUNCTIONS_UNSUPPORTED, - "xsl:functions no est\u00E1 soportado"}, - - { ER_PROCESSOR_ERROR, - "Error de TransformerFactory de XSLT"}, - - { ER_NOT_ALLOWED_INSIDE_STYLESHEET, - "(StylesheetHandler) {0} no permitido en una hoja de estilo."}, - - { ER_RESULTNS_NOT_SUPPORTED, - "result-ns ya no est\u00E1 soportado. Utilice xsl:output en su lugar."}, - - { ER_DEFAULTSPACE_NOT_SUPPORTED, - "default-space ya no est\u00E1 soportado. Utilice xsl:strip-space o xsl:preserve-space en su lugar."}, - - { ER_INDENTRESULT_NOT_SUPPORTED, - "indent-result ya no est\u00E1 soportado. Utilice xsl:output en su lugar."}, - - { ER_ILLEGAL_ATTRIB, - "(StylesheetHandler) {0} tiene un atributo no permitido: {1}"}, - - { ER_UNKNOWN_XSL_ELEM, - "Elemento XSL desconocido: {0}"}, - - { ER_BAD_XSLSORT_USE, - "(StylesheetHandler) xsl:sort s\u00F3lo se puede utilizar con xsl:apply-templates o xsl:for-each."}, - - { ER_MISPLACED_XSLWHEN, - "(StylesheetHandler) ha colocado xsl:when incorrectamente."}, - - { ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:when sin principal de xsl:choose."}, - - { ER_MISPLACED_XSLOTHERWISE, - "(StylesheetHandler) ha colocado xsl:otherwise de forma incorrecta."}, - - { ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:otherwise sin principal de xsl:choose."}, - - { ER_NOT_ALLOWED_INSIDE_TEMPLATE, - "(StylesheetHandler) {0} no est\u00E1 permitido en una plantilla."}, - - { ER_UNKNOWN_EXT_NS_PREFIX, - "(StylesheetHandler) prefijo {1} de espacio de nombres de extensi\u00F3n {0} desconocido"}, - - { ER_IMPORTS_AS_FIRST_ELEM, - "(StylesheetHandler) Las importaciones s\u00F3lo se pueden realizar como los primeros elementos en la hoja de estilo."}, - - { ER_IMPORTING_ITSELF, - "(StylesheetHandler) {0} se est\u00E1 importando directa o indirectamente."}, - - { ER_XMLSPACE_ILLEGAL_VAL, - "(StylesheetHandler) xml:space tiene un valor no permitido: {0}"}, - - { ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL, - "processStylesheet no se ha realizado correctamente."}, - - { ER_SAX_EXCEPTION, - "Excepci\u00F3n SAX"}, - -// add this message to fix bug 21478 - { ER_FUNCTION_NOT_SUPPORTED, - "Funci\u00F3n no soportada."}, - - { ER_XSLT_ERROR, - "Error de XSLT"}, - - { ER_CURRENCY_SIGN_ILLEGAL, - "el s\u00EDmbolo de moneda no est\u00E1 permitido en la cadena de patr\u00F3n de formato"}, - - { ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM, - "La funci\u00F3n de documento no est\u00E1 soportada en DOM de la hoja de estilo."}, - - { ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER, - "No se puede resolver el prefijo del sistema de resoluci\u00F3n sin prefijo."}, - - { ER_REDIRECT_COULDNT_GET_FILENAME, - "Extensi\u00F3n de redireccionamiento: no se ha podido obtener el nombre de archivo - el atributo file o select debe devolver una cadena v\u00E1lida."}, - - { ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT, - "No se puede crear FormatterListener en la extensi\u00F3n de redireccionamiento."}, - - { ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX, - "El prefijo en exclude-result-prefixes no es v\u00E1lido: {0}"}, - - { ER_MISSING_NS_URI, - "Falta el URI del espacio de nombres para el prefijo especificado"}, - - { ER_MISSING_ARG_FOR_OPTION, - "Falta un argumento para la opci\u00F3n: {0}"}, - - { ER_INVALID_OPTION, - "Opci\u00F3n no v\u00E1lida: {0}"}, - - { ER_MALFORMED_FORMAT_STRING, - "Cadena con formato incorrecto: {0}"}, - - { ER_STYLESHEET_REQUIRES_VERSION_ATTRIB, - "xsl:stylesheet necesita un atributo 'version'."}, - - { ER_ILLEGAL_ATTRIBUTE_VALUE, - "El atributo: {0} tiene un valor no permitido: {1}"}, - - { ER_CHOOSE_REQUIRES_WHEN, - "xsl:choose necesita un xsl:when"}, - - { ER_NO_APPLY_IMPORT_IN_FOR_EACH, - "xsl:apply-imports no permitido en un xsl:for-each"}, - - { ER_CANT_USE_DTM_FOR_OUTPUT, - "No se puede utilizar un DTMLiaison para un nodo DOM de salida... transfiera com.sun.org.apache.xpath.internal.DOM2Helper en su lugar,"}, - - { ER_CANT_USE_DTM_FOR_INPUT, - "No se puede utilizar un DTMLiaison para un nodo DOM de entrada... transfiera com.sun.org.apache.xpath.internal.DOM2Helper en su lugar,"}, - - { ER_CALL_TO_EXT_FAILED, - "Fallo de la llamada al elemento de extensi\u00F3n: {0}"}, - - { ER_PREFIX_MUST_RESOLVE, - "El prefijo se debe resolver en un espacio de nombres: {0}"}, - - { ER_INVALID_UTF16_SURROGATE, - "\u00BFSe ha detectado un sustituto UTF-16 no v\u00E1lido: {0}?"}, - - { ER_XSLATTRSET_USED_ITSELF, - "xsl:attribute-set {0} se utiliza a s\u00ED mismo, lo que causar\u00E1 un bucle infinito."}, - - { ER_CANNOT_MIX_XERCESDOM, - "No se puede mezclar una entrada DOM que no es de Xerces con una salida DOM de Xerces."}, - - { ER_TOO_MANY_LISTENERS, - "addTraceListenersToStylesheet - TooManyListenersException"}, - - { ER_IN_ELEMTEMPLATEELEM_READOBJECT, - "En ElemTemplateElement.readObject: {0}"}, - - { ER_DUPLICATE_NAMED_TEMPLATE, - "Se ha encontrado m\u00E1s de una plantilla con el nombre: {0}"}, - - { ER_INVALID_KEY_CALL, - "Llamada de funci\u00F3n no v\u00E1lida: las llamadas recursive key() no est\u00E1n permitidas"}, - - { ER_REFERENCING_ITSELF, - "La variable {0} hace referencia a s\u00ED misma de forma directa o indirecta."}, - - { ER_ILLEGAL_DOMSOURCE_INPUT, - "El nodo de entrada no puede ser nulo para un DOMSource de nuevas plantillas."}, - - { ER_CLASS_NOT_FOUND_FOR_OPTION, - "No se ha encontrado el archivo de clase para la opci\u00F3n {0}"}, - - { ER_REQUIRED_ELEM_NOT_FOUND, - "No se ha encontrado el elemento necesario: {0}"}, - - { ER_INPUT_CANNOT_BE_NULL, - "InputStream no puede ser nulo"}, - - { ER_URI_CANNOT_BE_NULL, - "El URI no puede ser nulo"}, - - { ER_FILE_CANNOT_BE_NULL, - "El archivo no puede ser nulo"}, - - { ER_SOURCE_CANNOT_BE_NULL, - "InputSource no puede ser nulo"}, - - { ER_CANNOT_INIT_BSFMGR, - "No se ha podido inicializar el gestor de BSF"}, - - { ER_CANNOT_CMPL_EXTENSN, - "No se ha podido compilar la extensi\u00F3n"}, - - { ER_CANNOT_CREATE_EXTENSN, - "No se ha podido crear la extensi\u00F3n: {0} debido a: {1}"}, - - { ER_INSTANCE_MTHD_CALL_REQUIRES, - "La llamada del m\u00E9todo de instancia al m\u00E9todo {0} necesita una instancia de objeto como primer argumento"}, - - { ER_INVALID_ELEMENT_NAME, - "Se ha especificado un nombre de elemento no v\u00E1lido {0}"}, - - { ER_ELEMENT_NAME_METHOD_STATIC, - "El m\u00E9todo del nombre del elemento debe ser est\u00E1tico {0}"}, - - { ER_EXTENSION_FUNC_UNKNOWN, - "La funci\u00F3n de extensi\u00F3n {0} : {1} es desconocida"}, - - { ER_MORE_MATCH_CONSTRUCTOR, - "Hay m\u00E1s de una mejor coincidencia para el constructor de {0}"}, - - { ER_MORE_MATCH_METHOD, - "Hay m\u00E1s de una mejor coincidencia para el m\u00E9todo {0}"}, - - { ER_MORE_MATCH_ELEMENT, - "Hay m\u00E1s de una mejor coincidencia para el m\u00E9todo de elemento {0}"}, - - { ER_INVALID_CONTEXT_PASSED, - "Se ha transferido un contexto no v\u00E1lido para evaluar {0}"}, - - { ER_POOL_EXISTS, - "El pool ya existe"}, - - { ER_NO_DRIVER_NAME, - "No se ha especificado ning\u00FAn nombre de controlador"}, - - { ER_NO_URL, - "No se ha especificado ninguna URL"}, - - { ER_POOL_SIZE_LESSTHAN_ONE, - "El tama\u00F1o del pool es inferior a uno."}, - - { ER_INVALID_DRIVER, - "Se ha especificado un nombre de controlador no v\u00E1lido."}, - - { ER_NO_STYLESHEETROOT, - "No se ha encontrado la ra\u00EDz de la hoja de estilo."}, - - { ER_ILLEGAL_XMLSPACE_VALUE, - "Valor no permitido para xml:space"}, - - { ER_PROCESSFROMNODE_FAILED, - "Fallo de processFromNode"}, - - { ER_RESOURCE_COULD_NOT_LOAD, - "No se ha podido cargar el recurso [ {0} ]: {1} \n {2} \t {3}"}, - - { ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Tama\u00F1o de buffer menor o igual que 0"}, - - { ER_UNKNOWN_ERROR_CALLING_EXTENSION, - "Error desconocido al llamar a la extensi\u00F3n"}, - - { ER_NO_NAMESPACE_DECL, - "El prefijo {0} no tiene una declaraci\u00F3n de espacio de nombres correspondiente"}, - - { ER_ELEM_CONTENT_NOT_ALLOWED, - "Contenido de elemento no permitido para lang=javaclass {0}"}, - - { ER_STYLESHEET_DIRECTED_TERMINATION, - "Terminaci\u00F3n dirigida de hoja de estilo"}, - - { ER_ONE_OR_TWO, - "1 o 2"}, - - { ER_TWO_OR_THREE, - "2 o 3"}, - - { ER_COULD_NOT_LOAD_RESOURCE, - "No se ha podido cargar {0} (marcar CLASSPATH), actualmente s\u00F3lo se utilizan los valores por defecto"}, - - { ER_CANNOT_INIT_DEFAULT_TEMPLATES, - "No se pueden inicializar las plantillas por defecto"}, - - { ER_RESULT_NULL, - "El resultado no debe ser nulo"}, - - { ER_RESULT_COULD_NOT_BE_SET, - "No se ha podido definir el resultado"}, - - { ER_NO_OUTPUT_SPECIFIED, - "No se ha especificado ninguna salida"}, - - { ER_CANNOT_TRANSFORM_TO_RESULT_TYPE, - "No se puede transformar en un resultado de tipo {0}"}, - - { ER_CANNOT_TRANSFORM_SOURCE_TYPE, - "No se puede transformar en un origen de tipo {0}"}, - - { ER_NULL_CONTENT_HANDLER, - "Manejador de contenido nulo"}, - - { ER_NULL_ERROR_HANDLER, - "Manejador de errores nulo"}, - - { ER_CANNOT_CALL_PARSE, - "no se puede realizar el an\u00E1lisis si no se ha definido el manejador de contenido"}, - - { ER_NO_PARENT_FOR_FILTER, - "Ning\u00FAn principal para el filtro"}, - - { ER_NO_STYLESHEET_IN_MEDIA, - "No se ha encontrado ninguna hoja de estilo en: {0}, soporte= {1}"}, - - { ER_NO_STYLESHEET_PI, - "No se ha encontrado ning\u00FAn PI de hoja de estilo XML en: {0}"}, - - { ER_NOT_SUPPORTED, - "No soportado: {0}"}, - - { ER_PROPERTY_VALUE_BOOLEAN, - "El valor para la propiedad {0} debe ser una instancia booleana"}, - - { ER_COULD_NOT_FIND_EXTERN_SCRIPT, - "No se ha podido obtener un script externo en {0}"}, - - { ER_RESOURCE_COULD_NOT_FIND, - "No se ha encontrado el recurso [ {0} ].\n{1}"}, - - { ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, - "Propiedad de salida no reconocida: {0}"}, - - { ER_FAILED_CREATING_ELEMLITRSLT, - "Fallo al crear la instancia ElemLiteralResult"}, - - //Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE - // In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care - //in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc. - //NOTE: Not only the key name but message has also been changed. - { ER_VALUE_SHOULD_BE_NUMBER, - "El valor para {0} no debe contener un n\u00FAmero que pueda analizarse"}, - - { ER_VALUE_SHOULD_EQUAL, - "El valor para {0} debe ser igual a s\u00ED o no."}, - - { ER_FAILED_CALLING_METHOD, - "Fallo al llamar al m\u00E9todo {0}"}, - - { ER_FAILED_CREATING_ELEMTMPL, - "Fallo al crear la instancia ElemTemplateElement"}, - - { ER_CHARS_NOT_ALLOWED, - "En este momento, no se permite el uso de caracteres en el documento"}, - - { ER_ATTR_NOT_ALLOWED, - "El atributo \"{0}\" no est\u00E1 permitido en el elemento {1}."}, - - { ER_BAD_VALUE, - "{0} valor incorrecto {1} "}, - - { ER_ATTRIB_VALUE_NOT_FOUND, - "No se ha encontrado el valor del atributo {0} "}, - - { ER_ATTRIB_VALUE_NOT_RECOGNIZED, - "El valor del atributo {0} no se ha reconocido "}, - - { ER_NULL_URI_NAMESPACE, - "Se est\u00E1 intentando generar un prefijo de espacio de nombres con un URI nulo"}, - - { ER_NUMBER_TOO_BIG, - "Se est\u00E1 intentando formatear un n\u00FAmero superior al entero largo m\u00E1s grande"}, - - { ER_CANNOT_FIND_SAX1_DRIVER, - "No se ha encontrado la clase de controlador SAX1 {0}"}, - - { ER_SAX1_DRIVER_NOT_LOADED, - "Se ha encontrado la clase de controlador SAX1 {0} pero no se puede cargar"}, - - { ER_SAX1_DRIVER_NOT_INSTANTIATED, - "Se ha cargado la clase de controlador SAX1 {0} pero no se puede instanciar"}, - - { ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER, - "La clase de controlador SAX1 {0} no implanta org.xml.sax.Parser"}, - - { ER_PARSER_PROPERTY_NOT_SPECIFIED, - "No se ha especificado la propiedad del sistema org.xml.sax.parser"}, - - { ER_PARSER_ARG_CANNOT_BE_NULL, - "El argumento del analizador no debe ser nulo"}, - - { ER_FEATURE, - "Funci\u00F3n: {0}"}, - - { ER_PROPERTY, - "Propiedad: {0}"}, - - { ER_NULL_ENTITY_RESOLVER, - "Sistema de resoluci\u00F3n de entidades nulo"}, - - { ER_NULL_DTD_HANDLER, - "Manejador DTD nulo"}, - - { ER_NO_DRIVER_NAME_SPECIFIED, - "No se ha especificado ning\u00FAn nombre de controlador"}, - - { ER_NO_URL_SPECIFIED, - "No se ha especificado ninguna URL"}, - - { ER_POOLSIZE_LESS_THAN_ONE, - "El tama\u00F1o del pool es inferior a 1."}, - - { ER_INVALID_DRIVER_NAME, - "Se ha especificado un nombre de controlador no v\u00E1lido."}, - - { ER_ERRORLISTENER, - "ErrorListener"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The name -// 'ElemTemplateElement' is the name of a class, and should not be -// translated. - { ER_ASSERT_NO_TEMPLATE_PARENT, - "Error del programador. La expresi\u00F3n no tiene el principal ElemTemplateElement."}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The substitution text -// provides further information in order to diagnose the problem. The name -// 'RedundentExprEliminator' is the name of a class, and should not be -// translated. - { ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR, - "Afirmaci\u00F3n del programador en RedundentExprEliminator: {0}"}, - - { ER_NOT_ALLOWED_IN_POSITION, - "{0} no est\u00E1 permitido en esta posici\u00F3n de la hoja de estilo."}, - - { ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION, - "El texto distinto de un espacio en blanco no est\u00E1 permitido en esta posici\u00F3n de la hoja de estilo."}, - - // This code is shared with warning codes. - // SystemId Unknown - { INVALID_TCHAR, - "Valor no permitido: {1} utilizado para el atributo CHAR: {0}. Un atributo del tipo CHAR debe tener s\u00F3lo 1 car\u00E1cter."}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "QNAME" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value and {0} is the attribute name. - //The following codes are shared with the warning codes... - { INVALID_QNAME, - "Valor no permitido: {1} utilizado para el atributo QNAME: {0}"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "ENUM" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value, {0} is the attribute name, and {2} is a list of valid - // values. - { INVALID_ENUM, - "Valor no permitido: {1} utilizado para el atributo ENUM: {0}. Los valores v\u00E1lidos son: {2}."}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NMTOKEN" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NMTOKEN, - "Valor no permitido: {1} utilizado para el atributo NMTOKEN: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NCNAME" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NCNAME, - "Valor no permitido: {1} utilizado para el atributo NCNAME: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "boolean" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_BOOLEAN, - "Valor no permitido: {1} utilizado para el atributo boolean: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "number" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NUMBER, - "Valor no permitido: {1} utilizado para el atributo number: {0} "}, - - - // End of shared codes... - -// Note to translators: A "match pattern" is a special form of XPath expression -// that is used for matching patterns. The substitution text is the name of -// a function. The message indicates that when this function is referenced in -// a match pattern, its argument must be a string literal (or constant.) -// ER_ARG_LITERAL - new error message for bugzilla //5202 - { ER_ARG_LITERAL, - "El argumento para {0} en el patr\u00F3n de coincidencia no debe ser un valor literal."}, - -// Note to translators: The following message indicates that two definitions of -// a variable. A "global variable" is a variable that is accessible everywher -// in the stylesheet. -// ER_DUPLICATE_GLOBAL_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_GLOBAL_VAR, - "Duplicar declaraci\u00F3n de variable global."}, - - -// Note to translators: The following message indicates that two definitions of -// a variable were encountered. -// ER_DUPLICATE_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_VAR, - "Duplicar declaraci\u00F3n de variable."}, - - // Note to translators: "xsl:template, "name" and "match" are XSLT keywords - // which must not be translated. - // ER_TEMPLATE_NAME_MATCH - new error message for bugzilla #789 - { ER_TEMPLATE_NAME_MATCH, - "xsl:template debe tener un atributo name o match (o ambos)"}, - - // Note to translators: "exclude-result-prefixes" is an XSLT keyword which - // should not be translated. The message indicates that a namespace prefix - // encountered as part of the value of the exclude-result-prefixes attribute - // was in error. - // ER_INVALID_PREFIX - new error message for bugzilla #788 - { ER_INVALID_PREFIX, - "El prefijo en exclude-result-prefixes no es v\u00E1lido: {0}"}, - - // Note to translators: An "attribute set" is a set of attributes that can - // be added to an element in the output document as a group. The message - // indicates that there was a reference to an attribute set named {0} that - // was never defined. - // ER_NO_ATTRIB_SET - new error message for bugzilla #782 - { ER_NO_ATTRIB_SET, - "El juego de atributos con el nombre {0} no existe"}, - - // Note to translators: This message indicates that there was a reference - // to a function named {0} for which no function definition could be found. - { ER_FUNCTION_NOT_FOUND, - "La funci\u00F3n con el nombre {0} no existe"}, - - // Note to translators: This message indicates that the XSLT instruction - // that is named by the substitution text {0} must not contain other XSLT - // instructions (content) or a "select" attribute. The word "select" is - // an XSLT keyword in this case and must not be translated. - { ER_CANT_HAVE_CONTENT_AND_SELECT, - "El elemento {0} no debe tener contenido ni un atributo select."}, - - // Note to translators: This message indicates that the value argument - // of setParameter must be a valid Java Object. - { ER_INVALID_SET_PARAM_VALUE, - "El valor del par\u00E1metro {0} debe tener un objeto Java v\u00E1lido"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT, - "El atributo result-prefix de un elemento xsl:namespace-alias tiene el valor ''#default', pero no hay ninguna declaraci\u00F3n del espacio de nombres por defecto en el \u00E1mbito para el elemento"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX, - "El atributo result-prefix de un elemento xsl:namespace-alias tiene el valor ''{0}'', pero no hay ninguna declaraci\u00F3n del espacio de nombres para el prefijo ''{0}'' en el \u00E1mbito para el elemento."}, - - { ER_SET_FEATURE_NULL_NAME, - "El nombre de funci\u00F3n no puede ser nulo en TransformerFactory.setFeature (nombre de cadena, valor booleano)."}, - - { ER_GET_FEATURE_NULL_NAME, - "El nombre de funci\u00F3n no puede ser nulo en TransformerFactory.getFeature (nombre de cadena)."}, - - { ER_UNSUPPORTED_FEATURE, - "No se puede definir la funci\u00F3n ''{0}''en esta f\u00E1brica del transformador."}, - - { ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING, - "La utilizaci\u00F3n del elemento de extensi\u00F3n ''{0}'' no est\u00E1 permitida cuando la funci\u00F3n de procesamiento seguro se ha definido en true."}, - - { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE, - "No se puede obtener el prefijo para un URI de espacio de nombres nulo."}, - - { ER_NAMESPACE_CONTEXT_NULL_PREFIX, - "No se puede obtener el URI de espacio de nombres para un prefijo nulo."}, - - { ER_XPATH_RESOLVER_NULL_QNAME, - "El nombre de la funci\u00F3n no puede ser nulo."}, - - { ER_XPATH_RESOLVER_NEGATIVE_ARITY, - "El n\u00FAmero de argumentos no puede ser negativo."}, - // Warnings... - - { WG_FOUND_CURLYBRACE, - "Se han encontrado '}' pero no hay ninguna plantilla de atributos abierta."}, - - { WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR, - "Advertencia: el atributo count no coincide con un ascendiente en el destino xsl:number! = {0}"}, - - { WG_EXPR_ATTRIB_CHANGED_TO_SELECT, - "Sintaxis anterior: el nombre del atributo 'expr' se ha cambiado por el de 'select'."}, - - { WG_NO_LOCALE_IN_FORMATNUMBER, - "Xalan no maneja a\u00FAn el nombre de configuraci\u00F3n regional en la funci\u00F3n format-number."}, - - { WG_LOCALE_NOT_FOUND, - "Advertencia: no se ha encontrado la configuraci\u00F3n regional para xml:lang={0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "No se puede crear la URL desde: {0}"}, - - { WG_CANNOT_LOAD_REQUESTED_DOC, - "No se puede cargar el documento solicitado: {0}"}, - - { WG_CANNOT_FIND_COLLATOR, - "No se ha encontrado el intercalador para >>>>>> Versi\u00F3n Xalan "}, - { "version2", "<<<<<<<"}, - { "yes", "s\u00ED"}, - { "line", "N\u00BA de L\u00EDnea"}, - { "column","N\u00BA de Columna"}, - { "xsldone", "XSLProcessor: listo"}, - - - // Note to translators: The following messages provide usage information - // for the Xalan Process command line. "Process" is the name of a Java class, - // and should not be translated. - { "xslProc_option", "Opciones de la clase Process de la l\u00EDnea de comandos Xalan-J :"}, - { "xslProc_option", "Opciones de la clase Process de la l\u00EDnea de comandos Xalan-J :"}, - { "xslProc_invalid_xsltc_option", "La opci\u00F3n {0} no est\u00E1 soportada en el modo XSLTC."}, - { "xslProc_invalid_xalan_option", "La opci\u00F3n {0} s\u00F3lo puede utilizarse con -XSLTC."}, - { "xslProc_no_input", "Error: no se ha especificado ninguna hoja de estilo o XML de entrada. Ejecute este comando sin ninguna opci\u00F3n para las instrucciones de uso."}, - { "xslProc_common_options", "-Opciones Comunes-"}, - { "xslProc_xalan_options", "-Opciones para Xalan-"}, - { "xslProc_xsltc_options", "-Opciones para XSLTC-"}, - { "xslProc_return_to_continue", "(pulse para continuar)"}, - - // Note to translators: The option name and the parameter name do not need to - // be translated. Only translate the messages in parentheses. Note also that - // leading whitespace in the messages is used to indent the usage information - // for each option in the English messages. - // Do not translate the keywords: XSLTC, SAX, DOM and DTM. - { "optionXSLTC", " [-XSLTC (utilizar XSLTC para la transformaci\u00F3n)]"}, - { "optionIN", " [-IN inputXMLURL]"}, - { "optionXSL", " [-XSL XSLTransformationURL]"}, - { "optionOUT", " [-OUT outputFileName]"}, - { "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"}, - { "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"}, - { "optionPARSER", " [-PARSER nombre de clase totalmente cualificado de enlace de analizador]"}, - { "optionE", " [-E (No ampliar referencias de entidad)]"}, - { "optionV", " [-E (No ampliar referencias de entidad)]"}, - { "optionQC", " [-QC (Advertencias de Conflictos de Patr\u00F3n Silencioso)]"}, - { "optionQ", " [-Q (Modo Silencioso)]"}, - { "optionLF", " [-LF (Utilizar saltos de l\u00EDnea s\u00F3lo en la salida {el valor por defecto es CR/LF})]"}, - { "optionCR", " [-CR (Utilizar retornos de carro s\u00F3lo en la salida {el valor por defecto es CR/LF})]"}, - { "optionESCAPE", " [-ESCAPE (Caracteres para introducir escape {el valor por defecto es <>&\"'\\r\\n}]"}, - { "optionINDENT", " [-INDENT (Control del n\u00FAmero de espacios para el sangrado {el valor por defecto es 0})]"}, - { "optionTT", " [-TT (Rastrear las plantillas como si se estuviesen llamando.)]"}, - { "optionTG", " [-TG (Rastrear cada evento de generaci\u00F3n.)]"}, - { "optionTS", " [-TS (Rastrear cada evento de selecci\u00F3n.)]"}, - { "optionTTC", " [-TTC (Rastrear los secundarios de plantilla como si se estuviesen procesando.)]"}, - { "optionTCLASS", " [-TCLASS (Clase TraceListener para las extensiones de rastreo.)]"}, - { "optionVALIDATE", " [-VALIDATE (Determinar si se produce la validaci\u00F3n. La validaci\u00F3n est\u00E1 desactivada por defecto.)]"}, - { "optionEDUMP", " [-EDUMP {nombre de archivo opcional} (Realizar volcado de pila si se produce el error.)]"}, - { "optionXML", " [-XML (Utilizar el formateador XML y agregar una cabecera XML.)]"}, - { "optionTEXT", " [-TEXT (Utilizar el formateador de texto simple.)]"}, - { "optionHTML", " [-HTML (Utilizar el formateador HTML.)]"}, - { "optionPARAM", " [-PARAM expresi\u00F3n de nombre (Definir un par\u00E1metro de hoja de estilo)]"}, - { "noParsermsg1", "El proceso XSL no se ha realizado correctamente."}, - { "noParsermsg2", "** No se ha encontrado el analizador **"}, - { "noParsermsg3", "Compruebe la classpath."}, - { "noParsermsg4", "Si no tiene un analizador XML de IBM para Java, puede descargarlo de"}, - { "noParsermsg5", "AlphaWorks de IBM: http://www.alphaworks.ibm.com/formula/xml"}, - { "optionURIRESOLVER", " [-URIRESOLVER nombre de clase completo (URIResolver se puede utilizar para resolver los URI)]"}, - { "optionENTITYRESOLVER", " [-ENTITYRESOLVER nombre de clase completo (EntityResolver utilizado para resolver entidades)]"}, - { "optionCONTENTHANDLER", " [-CONTENTHANDLER nombre de clase completo (ContentHandler utilizado para serializar la salida)]"}, - { "optionLINENUMBERS", " [-L utilizar n\u00FAmeros de l\u00EDnea para el documento de origen]"}, - { "optionSECUREPROCESSING", " [-SECURE (definir la funci\u00F3n de procesamiento seguro en true.)]"}, - - // Following are the new options added in XSLTErrorResources.properties files after Jdk 1.4 (Xalan 2.2-D11) - - - { "optionMEDIA", " [-MEDIA mediaType (utilice el atributo media para buscar la hoja de estilo asociada a un documento.)]"}, - { "optionFLAVOR", " [-FLAVOR flavorName (Utilizar expl\u00EDcitamente s2s=SAX o d2d=DOM para realizar la transformaci\u00F3n.)] "}, // Added by sboag/scurcuru; experimental - { "optionDIAG", " [-DIAG (Imprimir tiempo total en milisegundos para la transformaci\u00F3n.)]"}, - { "optionINCREMENTAL", " [-INCREMENTAL (para solicitar la construcci\u00F3n DTM incremental, defina http://xml.apache.org/xalan/features/incremental en true.)]"}, - { "optionNOOPTIMIMIZE", " [-NOOPTIMIMIZE (para solicitar que no se produzca ning\u00FAn procesamiento de optimizaci\u00F3n de hoja de estilo, defina http://xml.apache.org/xalan/features/optimize en false.)]"}, - { "optionRL", " [-RL recursionlimit (afirmar l\u00EDmite num\u00E9rico en la profundidad de recursi\u00F3n de la hoja de estilo.)]"}, - { "optionXO", " [-XO [transletName] (asignar el nombre al translet generado)]"}, - { "optionXD", " [-XD destinationDirectory (especificar un directorio de destino para translet)]"}, - { "optionXJ", " [-XJ jarfile (empaqueta las clases de translet en un archivo jar llamado )]"}, - { "optionXP", " [-XP package (especifica un prefijo de nombre de paquete para todas las clases de translet generadas)]"}, - - //AddITIONAL STRINGS that need L10n - // Note to translators: The following message describes usage of a particular - // command-line option that is used to enable the "template inlining" - // optimization. The optimization involves making a copy of the code - // generated for a template in another template that refers to it. - { "optionXN", " [-XN (permite poner en l\u00EDnea la plantilla)]" }, - { "optionXX", " [-XX (activa una salida de mensaje de depuraci\u00F3n adicional)]"}, - { "optionXT" , " [-XT (utilizar translet para la transformaci\u00F3n si es posible)]"}, - { "diagTiming"," --------- La transformaci\u00F3n de {0} mediante {1} ha tardado {2} ms" }, - { "recursionTooDeep","El anidamiento de plantilla es demasiado profundo. Anidamiento = {0}, plantilla {1} {2}" }, - { "nameIs", "el nombre es" }, - { "matchPatternIs", "el patr\u00F3n de coincidencia es" } - - }; - - } - // ================= INFRASTRUCTURE ====================== - - /** String for use when a bad error code was encountered. */ - public static final String BAD_CODE = "BAD_CODE"; - - /** String for use when formatting of the error string failed. */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java deleted file mode 100644 index 60bc5675ded..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java +++ /dev/null @@ -1,1425 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And - * you need to enter key , value pair as part of contents - * Array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XSLTErrorResources_fr extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /* - * Static variables - */ - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX = - "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX"; - - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT = - "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT"; - - public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE"; - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE"; - public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS"; - public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD"; - public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES"; - public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB"; - public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND"; - public static final String ER_CANT_RESOLVE_NAME_AVT = "ER_CANT_RESOLVE_NAME_AVT"; - public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB"; - public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB"; - public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB = - "ER_BAD_VAL_ON_LEVEL_ATTRIB"; - public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB"; - public static final String ER_NEED_NAME_OR_MATCH_ATTRIB = - "ER_NEED_NAME_OR_MATCH_ATTRIB"; - public static final String ER_CANT_RESOLVE_NSPREFIX = - "ER_CANT_RESOLVE_NSPREFIX"; - public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE"; - public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC"; - public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR"; - public static final String ER_NULL_CHILD = "ER_NULL_CHILD"; - public static final String ER_NEED_SELECT_ATTRIB = "ER_NEED_SELECT_ATTRIB"; - public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB"; - public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB"; - public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC"; - public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON = - "ER_COULD_NOT_CREATE_XML_PROC_LIAISON"; - public static final String ER_PROCESS_NOT_SUCCESSFUL = - "ER_PROCESS_NOT_SUCCESSFUL"; - public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL"; - public static final String ER_ENCODING_NOT_SUPPORTED = - "ER_ENCODING_NOT_SUPPORTED"; - public static final String ER_COULD_NOT_CREATE_TRACELISTENER = - "ER_COULD_NOT_CREATE_TRACELISTENER"; - public static final String ER_KEY_REQUIRES_NAME_ATTRIB = - "ER_KEY_REQUIRES_NAME_ATTRIB"; - public static final String ER_KEY_REQUIRES_MATCH_ATTRIB = - "ER_KEY_REQUIRES_MATCH_ATTRIB"; - public static final String ER_KEY_REQUIRES_USE_ATTRIB = - "ER_KEY_REQUIRES_USE_ATTRIB"; - public static final String ER_REQUIRES_ELEMENTS_ATTRIB = - "ER_REQUIRES_ELEMENTS_ATTRIB"; - public static final String ER_MISSING_PREFIX_ATTRIB = - "ER_MISSING_PREFIX_ATTRIB"; - public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL"; - public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND"; - public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION"; - public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB"; - public static final String ER_STYLESHEET_INCLUDES_ITSELF = - "ER_STYLESHEET_INCLUDES_ITSELF"; - public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR"; - public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB"; - public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT = - "ER_MISSING_CONTAINER_ELEMENT_COMPONENT"; - public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT = - "ER_CAN_ONLY_OUTPUT_TO_ELEMENT"; - public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR"; - public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR"; - public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION"; - public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR = - "ER_CANNOT_SERIALIZE_XSLPROCESSOR"; - public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET"; - public static final String ER_FAILED_PROCESS_STYLESHEET = - "ER_FAILED_PROCESS_STYLESHEET"; - public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC"; - public static final String ER_COULDNT_FIND_FRAGMENT = - "ER_COULDNT_FIND_FRAGMENT"; - public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT"; - public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB = - "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB = - "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG = - "ER_NO_CLONE_OF_DOCUMENT_FRAG"; - public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM"; - public static final String ER_XMLSPACE_ILLEGAL_VALUE = - "ER_XMLSPACE_ILLEGAL_VALUE"; - public static final String ER_NO_XSLKEY_DECLARATION = - "ER_NO_XSLKEY_DECLARATION"; - public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL"; - public static final String ER_XSLFUNCTIONS_UNSUPPORTED = - "ER_XSLFUNCTIONS_UNSUPPORTED"; - public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR"; - public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET = - "ER_NOT_ALLOWED_INSIDE_STYLESHEET"; - public static final String ER_RESULTNS_NOT_SUPPORTED = - "ER_RESULTNS_NOT_SUPPORTED"; - public static final String ER_DEFAULTSPACE_NOT_SUPPORTED = - "ER_DEFAULTSPACE_NOT_SUPPORTED"; - public static final String ER_INDENTRESULT_NOT_SUPPORTED = - "ER_INDENTRESULT_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB"; - public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM"; - public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE"; - public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN"; - public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_MISPLACED_XSLOTHERWISE = - "ER_MISPLACED_XSLOTHERWISE"; - public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE = - "ER_NOT_ALLOWED_INSIDE_TEMPLATE"; - public static final String ER_UNKNOWN_EXT_NS_PREFIX = - "ER_UNKNOWN_EXT_NS_PREFIX"; - public static final String ER_IMPORTS_AS_FIRST_ELEM = - "ER_IMPORTS_AS_FIRST_ELEM"; - public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF"; - public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL"; - public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL = - "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL"; - public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION"; - public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR"; - public static final String ER_CURRENCY_SIGN_ILLEGAL= - "ER_CURRENCY_SIGN_ILLEGAL"; - public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM = - "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM"; - public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER = - "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER"; - public static final String ER_REDIRECT_COULDNT_GET_FILENAME = - "ER_REDIRECT_COULDNT_GET_FILENAME"; - public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT = - "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT"; - public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX = - "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX"; - public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI"; - public static final String ER_MISSING_ARG_FOR_OPTION = - "ER_MISSING_ARG_FOR_OPTION"; - public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION"; - public static final String ER_MALFORMED_FORMAT_STRING = - "ER_MALFORMED_FORMAT_STRING"; - public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String ER_ILLEGAL_ATTRIBUTE_VALUE = - "ER_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN"; - public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH = - "ER_NO_APPLY_IMPORT_IN_FOR_EACH"; - public static final String ER_CANT_USE_DTM_FOR_OUTPUT = - "ER_CANT_USE_DTM_FOR_OUTPUT"; - public static final String ER_CANT_USE_DTM_FOR_INPUT = - "ER_CANT_USE_DTM_FOR_INPUT"; - public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_XSLATTRSET_USED_ITSELF = - "ER_XSLATTRSET_USED_ITSELF"; - public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM"; - public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS"; - public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT = - "ER_IN_ELEMTEMPLATEELEM_READOBJECT"; - public static final String ER_DUPLICATE_NAMED_TEMPLATE = - "ER_DUPLICATE_NAMED_TEMPLATE"; - public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL"; - public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF"; - public static final String ER_ILLEGAL_DOMSOURCE_INPUT = - "ER_ILLEGAL_DOMSOURCE_INPUT"; - public static final String ER_CLASS_NOT_FOUND_FOR_OPTION = - "ER_CLASS_NOT_FOUND_FOR_OPTION"; - public static final String ER_REQUIRED_ELEM_NOT_FOUND = - "ER_REQUIRED_ELEM_NOT_FOUND"; - public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL"; - public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL"; - public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL"; - public static final String ER_SOURCE_CANNOT_BE_NULL = - "ER_SOURCE_CANNOT_BE_NULL"; - public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR"; - public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN"; - public static final String ER_CANNOT_CREATE_EXTENSN = - "ER_CANNOT_CREATE_EXTENSN"; - public static final String ER_INSTANCE_MTHD_CALL_REQUIRES = - "ER_INSTANCE_MTHD_CALL_REQUIRES"; - public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME"; - public static final String ER_ELEMENT_NAME_METHOD_STATIC = - "ER_ELEMENT_NAME_METHOD_STATIC"; - public static final String ER_EXTENSION_FUNC_UNKNOWN = - "ER_EXTENSION_FUNC_UNKNOWN"; - public static final String ER_MORE_MATCH_CONSTRUCTOR = - "ER_MORE_MATCH_CONSTRUCTOR"; - public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD"; - public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT"; - public static final String ER_INVALID_CONTEXT_PASSED = - "ER_INVALID_CONTEXT_PASSED"; - public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS"; - public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME"; - public static final String ER_NO_URL = "ER_NO_URL"; - public static final String ER_POOL_SIZE_LESSTHAN_ONE = - "ER_POOL_SIZE_LESSTHAN_ONE"; - public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER"; - public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT"; - public static final String ER_ILLEGAL_XMLSPACE_VALUE = - "ER_ILLEGAL_XMLSPACE_VALUE"; - public static final String ER_PROCESSFROMNODE_FAILED = - "ER_PROCESSFROMNODE_FAILED"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = - "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = - "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION = - "ER_UNKNOWN_ERROR_CALLING_EXTENSION"; - public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL"; - public static final String ER_ELEM_CONTENT_NOT_ALLOWED = - "ER_ELEM_CONTENT_NOT_ALLOWED"; - public static final String ER_STYLESHEET_DIRECTED_TERMINATION = - "ER_STYLESHEET_DIRECTED_TERMINATION"; - public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO"; - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = - "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES = - "ER_CANNOT_INIT_DEFAULT_TEMPLATES"; - public static final String ER_RESULT_NULL = "ER_RESULT_NULL"; - public static final String ER_RESULT_COULD_NOT_BE_SET = - "ER_RESULT_COULD_NOT_BE_SET"; - public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED"; - public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE = - "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE"; - public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE = - "ER_CANNOT_TRANSFORM_SOURCE_TYPE"; - public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER"; - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE"; - public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER"; - public static final String ER_NO_STYLESHEET_IN_MEDIA = - "ER_NO_STYLESHEET_IN_MEDIA"; - public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_PROPERTY_VALUE_BOOLEAN = - "ER_PROPERTY_VALUE_BOOLEAN"; - public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT = - "ER_COULD_NOT_FIND_EXTERN_SCRIPT"; - public static final String ER_RESOURCE_COULD_NOT_FIND = - "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED = - "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED"; - public static final String ER_FAILED_CREATING_ELEMLITRSLT = - "ER_FAILED_CREATING_ELEMLITRSLT"; - public static final String ER_VALUE_SHOULD_BE_NUMBER = - "ER_VALUE_SHOULD_BE_NUMBER"; - public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL"; - public static final String ER_FAILED_CALLING_METHOD = - "ER_FAILED_CALLING_METHOD"; - public static final String ER_FAILED_CREATING_ELEMTMPL = - "ER_FAILED_CREATING_ELEMTMPL"; - public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED"; - public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED"; - public static final String ER_BAD_VALUE = "ER_BAD_VALUE"; - public static final String ER_ATTRIB_VALUE_NOT_FOUND = - "ER_ATTRIB_VALUE_NOT_FOUND"; - public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED = - "ER_ATTRIB_VALUE_NOT_RECOGNIZED"; - public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE"; - public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG"; - public static final String ER_CANNOT_FIND_SAX1_DRIVER = - "ER_CANNOT_FIND_SAX1_DRIVER"; - public static final String ER_SAX1_DRIVER_NOT_LOADED = - "ER_SAX1_DRIVER_NOT_LOADED"; - public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED = - "ER_SAX1_DRIVER_NOT_INSTANTIATED" ; - public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER = - "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER"; - public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED = - "ER_PARSER_PROPERTY_NOT_SPECIFIED"; - public static final String ER_PARSER_ARG_CANNOT_BE_NULL = - "ER_PARSER_ARG_CANNOT_BE_NULL" ; - public static final String ER_FEATURE = "ER_FEATURE"; - public static final String ER_PROPERTY = "ER_PROPERTY" ; - public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER"; - public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ; - public static final String ER_NO_DRIVER_NAME_SPECIFIED = - "ER_NO_DRIVER_NAME_SPECIFIED"; - public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED"; - public static final String ER_POOLSIZE_LESS_THAN_ONE = - "ER_POOLSIZE_LESS_THAN_ONE"; - public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME"; - public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER"; - public static final String ER_ASSERT_NO_TEMPLATE_PARENT = - "ER_ASSERT_NO_TEMPLATE_PARENT"; - public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR = - "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR"; - public static final String ER_NOT_ALLOWED_IN_POSITION = - "ER_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION = - "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE = - "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE"; - public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX = - "ER_NAMESPACE_CONTEXT_NULL_PREFIX"; - public static final String ER_XPATH_RESOLVER_NULL_QNAME = - "ER_XPATH_RESOLVER_NULL_QNAME"; - public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY = - "ER_XPATH_RESOLVER_NEGATIVE_ARITY"; - public static final String INVALID_TCHAR = "INVALID_TCHAR"; - public static final String INVALID_QNAME = "INVALID_QNAME"; - public static final String INVALID_ENUM = "INVALID_ENUM"; - public static final String INVALID_NMTOKEN = "INVALID_NMTOKEN"; - public static final String INVALID_NCNAME = "INVALID_NCNAME"; - public static final String INVALID_BOOLEAN = "INVALID_BOOLEAN"; - public static final String INVALID_NUMBER = "INVALID_NUMBER"; - public static final String ER_ARG_LITERAL = "ER_ARG_LITERAL"; - public static final String ER_DUPLICATE_GLOBAL_VAR ="ER_DUPLICATE_GLOBAL_VAR"; - public static final String ER_DUPLICATE_VAR = "ER_DUPLICATE_VAR"; - public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH"; - public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX"; - public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET"; - public static final String ER_FUNCTION_NOT_FOUND = - "ER_FUNCTION_NOT_FOUND"; - public static final String ER_CANT_HAVE_CONTENT_AND_SELECT = - "ER_CANT_HAVE_CONTENT_AND_SELECT"; - public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE"; - public static final String ER_SET_FEATURE_NULL_NAME = - "ER_SET_FEATURE_NULL_NAME"; - public static final String ER_GET_FEATURE_NULL_NAME = - "ER_GET_FEATURE_NULL_NAME"; - public static final String ER_UNSUPPORTED_FEATURE = - "ER_UNSUPPORTED_FEATURE"; - public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING = - "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING"; - - public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE"; - public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR = - "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR"; - public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT = - "WG_EXPR_ATTRIB_CHANGED_TO_SELECT"; - public static final String WG_NO_LOCALE_IN_FORMATNUMBER = - "WG_NO_LOCALE_IN_FORMATNUMBER"; - public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_CANNOT_LOAD_REQUESTED_DOC = - "WG_CANNOT_LOAD_REQUESTED_DOC"; - public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR"; - public static final String WG_FUNCTIONS_SHOULD_USE_URL = - "WG_FUNCTIONS_SHOULD_USE_URL"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 = - "WG_ENCODING_NOT_SUPPORTED_USING_UTF8"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA = - "WG_ENCODING_NOT_SUPPORTED_USING_JAVA"; - public static final String WG_SPECIFICITY_CONFLICTS = - "WG_SPECIFICITY_CONFLICTS"; - public static final String WG_PARSING_AND_PREPARING = - "WG_PARSING_AND_PREPARING"; - public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE"; - public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP"; - public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED"; - public static final String WG_NO_DECIMALFORMAT_DECLARATION = - "WG_NO_DECIMALFORMAT_DECLARATION"; - public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS"; - public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED = - "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED"; - public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE = - "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE"; - public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE"; - public static final String WG_COULD_NOT_RESOLVE_PREFIX = - "WG_COULD_NOT_RESOLVE_PREFIX"; - public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String WG_ILLEGAL_ATTRIBUTE_NAME = - "WG_ILLEGAL_ATTRIBUTE_NAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_VALUE = - "WG_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG"; - public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_POSITION = - "WG_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String NO_MODIFICATION_ALLOWED_ERR = - "NO_MODIFICATION_ALLOWED_ERR"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_NO_CURLYBRACE, - "Erreur : l'expression ne peut pas contenir le caract\u00E8re '{'"}, - - { ER_ILLEGAL_ATTRIBUTE , - "{0} a un attribut non admis : {1}"}, - - {ER_NULL_SOURCENODE_APPLYIMPORTS , - "La valeur de sourceNode est NULL dans xsl:apply-imports."}, - - {ER_CANNOT_ADD, - "Impossible d''ajouter {0} \u00E0 {1}"}, - - { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES, - "La valeur de sourceNode est NULL dans handleApplyTemplatesInstruction."}, - - { ER_NO_NAME_ATTRIB, - "{0} doit avoir un attribut ''name''."}, - - {ER_TEMPLATE_NOT_FOUND, - "Mod\u00E8le nomm\u00E9 {0} introuvable"}, - - {ER_CANT_RESOLVE_NAME_AVT, - "Impossible de r\u00E9soudre le nom AVT dans xsl:call-template."}, - - {ER_REQUIRES_ATTRIB, - "{0} exige l''attribut : {1}"}, - - { ER_MUST_HAVE_TEST_ATTRIB, - "{0} doit avoir un attribut ''test''."}, - - {ER_BAD_VAL_ON_LEVEL_ATTRIB, - "Valeur incorrecte sur l''attribut de niveau : {0}"}, - - {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML, - "Le nom de processing-instruction ne peut pas \u00EAtre 'xml'"}, - - { ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, - "Le nom de processing-instruction doit \u00EAtre un NCName valide : {0}"}, - - { ER_NEED_MATCH_ATTRIB, - "{0} doit avoir un attribut de correspondance s''il a un mode."}, - - { ER_NEED_NAME_OR_MATCH_ATTRIB, - "{0} exige un nom ou un attribut de correspondance."}, - - {ER_CANT_RESOLVE_NSPREFIX, - "Impossible de r\u00E9soudre le pr\u00E9fixe de l''espace de noms : {0}"}, - - { ER_ILLEGAL_VALUE, - "xml:space a une valeur non admise : {0}"}, - - { ER_NO_OWNERDOC, - "Le noeud enfant ne poss\u00E8de pas de document propri\u00E9taire."}, - - { ER_ELEMTEMPLATEELEM_ERR, - "Erreur ElemTemplateElement : {0}"}, - - { ER_NULL_CHILD, - "Tentative d'ajout d'un enfant NULL."}, - - { ER_NEED_SELECT_ATTRIB, - "{0} exige un attribut \"select\"."}, - - { ER_NEED_TEST_ATTRIB , - "xsl:when doit avoir un attribut \"test\"."}, - - { ER_NEED_NAME_ATTRIB, - "xsl:with-param doit avoir un attribut \"name\"."}, - - { ER_NO_CONTEXT_OWNERDOC, - "le contexte ne poss\u00E8de pas de document propri\u00E9taire."}, - - {ER_COULD_NOT_CREATE_XML_PROC_LIAISON, - "Impossible de cr\u00E9er la liaison XML?? TransformerFactory : {0}"}, - - {ER_PROCESS_NOT_SUCCESSFUL, - "Xalan : le processus a \u00E9chou\u00E9."}, - - { ER_NOT_SUCCESSFUL, - "Xalan : \u00E9chec."}, - - { ER_ENCODING_NOT_SUPPORTED, - "Encodage non pris en charge : {0}"}, - - {ER_COULD_NOT_CREATE_TRACELISTENER, - "Impossible de cr\u00E9er TraceListener : {0}"}, - - {ER_KEY_REQUIRES_NAME_ATTRIB, - "xsl:key exige un attribut \"name\"."}, - - { ER_KEY_REQUIRES_MATCH_ATTRIB, - "xsl:key exige un attribut \"match\"."}, - - { ER_KEY_REQUIRES_USE_ATTRIB, - "xsl:key exige un attribut \"use\"."}, - - { ER_REQUIRES_ELEMENTS_ATTRIB, - "(StylesheetHandler) {0} exige un attribut ''elements''."}, - - { ER_MISSING_PREFIX_ATTRIB, - "(StylesheetHandler) L''attribut ''prefix'' {0} est manquant"}, - - { ER_BAD_STYLESHEET_URL, - "L''URL de feuille de style est incorrecte : {0}"}, - - { ER_FILE_NOT_FOUND, - "Fichier de feuille de style introuvable : {0}"}, - - { ER_IOEXCEPTION, - "Exception d''E/S avec le fichier de feuille de style : {0}"}, - - { ER_NO_HREF_ATTRIB, - "(StylesheetHandler) Attribut href introuvable pour {0}"}, - - { ER_STYLESHEET_INCLUDES_ITSELF, - "(StylesheetHandler) {0} s''inclut directement ou indirectement lui-m\u00EAme."}, - - { ER_PROCESSINCLUDE_ERROR, - "Erreur StylesheetHandler.processInclude, {0}"}, - - { ER_MISSING_LANG_ATTRIB, - "(StylesheetHandler) L''attribut \"lang\" {0} est manquant"}, - - { ER_MISSING_CONTAINER_ELEMENT_COMPONENT, - "(StylesheetHandler) l''\u00E9l\u00E9ment {0} est-il mal plac\u00E9? El\u00E9ment ''component'' du conteneur manquant"}, - - { ER_CAN_ONLY_OUTPUT_TO_ELEMENT, - "Sortie unique vers Element, DocumentFragment, Document ou PrintWriter."}, - - { ER_PROCESS_ERROR, - "Erreur StylesheetRoot.process"}, - - { ER_UNIMPLNODE_ERROR, - "Erreur UnImplNode : {0}"}, - - { ER_NO_SELECT_EXPRESSION, - "Erreur : expression de s\u00E9lection Xpath introuvable (-select)."}, - - { ER_CANNOT_SERIALIZE_XSLPROCESSOR, - "Impossible de s\u00E9rialiser un processeur XSL."}, - - { ER_NO_INPUT_STYLESHEET, - "L'entr\u00E9e de feuille de style n'a pas \u00E9t\u00E9 sp\u00E9cifi\u00E9e."}, - - { ER_FAILED_PROCESS_STYLESHEET, - "Echec du traitement de la feuille de style."}, - - { ER_COULDNT_PARSE_DOC, - "Impossible d''analyser le document {0}."}, - - { ER_COULDNT_FIND_FRAGMENT, - "Fragment introuvable : {0}"}, - - { ER_NODE_NOT_ELEMENT, - "Le noeud sur lequel pointe l''identificateur de fragment n''\u00E9tait pas un \u00E9l\u00E9ment : {0}"}, - - { ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB, - "l'\u00E9l\u00E9ment for-each doit avoir un attribut de nom ou de correspondance"}, - - { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB, - "les mod\u00E8les doivent avoir un attribut de nom ou de correspondance"}, - - { ER_NO_CLONE_OF_DOCUMENT_FRAG, - "Aucun clone d'un fragment de document."}, - - { ER_CANT_CREATE_ITEM, - "Impossible de cr\u00E9er l''\u00E9l\u00E9ment dans l''arborescence de r\u00E9sultats : {0}"}, - - { ER_XMLSPACE_ILLEGAL_VALUE, - "xml:space dans le fichier XML source a une valeur non admise : {0}"}, - - { ER_NO_XSLKEY_DECLARATION, - "Il n''existe aucune d\u00E9claration xsl:key pour {0}."}, - - { ER_CANT_CREATE_URL, - "Erreur : impossible de cr\u00E9er l''URL pour : {0}"}, - - { ER_XSLFUNCTIONS_UNSUPPORTED, - "xsl:functions n'est pas pris en charge"}, - - { ER_PROCESSOR_ERROR, - "Erreur TransformerFactory XSLT"}, - - { ER_NOT_ALLOWED_INSIDE_STYLESHEET, - "(StylesheetHandler) {0} non autoris\u00E9 dans une feuille de style."}, - - { ER_RESULTNS_NOT_SUPPORTED, - "\u00E9l\u00E9ment result-ns plus pris en charge. Utilisez plut\u00F4t xsl:output."}, - - { ER_DEFAULTSPACE_NOT_SUPPORTED, - "\u00E9l\u00E9ment default-space plus pris en charge. Utilisez plut\u00F4t xsl:strip-space ou xsl:preserve-space."}, - - { ER_INDENTRESULT_NOT_SUPPORTED, - "\u00E9l\u00E9ment indent-result plus pris en charge. Utilisez plut\u00F4t xsl:output."}, - - { ER_ILLEGAL_ATTRIB, - "(StylesheetHandler) {0} a un attribut non admis : {1}"}, - - { ER_UNKNOWN_XSL_ELEM, - "El\u00E9ment XSL inconnu : {0}"}, - - { ER_BAD_XSLSORT_USE, - "(StylesheetHandler) xsl:sort ne peut \u00EAtre utilis\u00E9 qu'avec xsl:apply-templates ou xsl:for-each."}, - - { ER_MISPLACED_XSLWHEN, - "(StylesheetHandler) xsl:when mal plac\u00E9."}, - - { ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:choose n'a affect\u00E9 aucun parent \u00E0 xsl:when."}, - - { ER_MISPLACED_XSLOTHERWISE, - "(StylesheetHandler) xsl:otherwise mal plac\u00E9."}, - - { ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:choose n'a affect\u00E9 aucun parent \u00E0 xsl:otherwise."}, - - { ER_NOT_ALLOWED_INSIDE_TEMPLATE, - "(StylesheetHandler) {0} n''est pas autoris\u00E9 dans un mod\u00E8le."}, - - { ER_UNKNOWN_EXT_NS_PREFIX, - "(StylesheetHandler) Pr\u00E9fixe {1} de l''espace de noms de l''extension {0} inconnu"}, - - { ER_IMPORTS_AS_FIRST_ELEM, - "(StylesheetHandler) Les imports ne peuvent s'appliquer que sur les premiers \u00E9l\u00E9ments de la feuille de style."}, - - { ER_IMPORTING_ITSELF, - "(StylesheetHandler) {0} s''importe directement ou indirectement lui-m\u00EAme."}, - - { ER_XMLSPACE_ILLEGAL_VAL, - "(StylesheetHandler) xml:space a une valeur non admise : {0}"}, - - { ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL, - "Echec de processStylesheet."}, - - { ER_SAX_EXCEPTION, - "Exception SAX"}, - -// add this message to fix bug 21478 - { ER_FUNCTION_NOT_SUPPORTED, - "Fonction non prise en charge."}, - - { ER_XSLT_ERROR, - "Erreur XSLT"}, - - { ER_CURRENCY_SIGN_ILLEGAL, - "le symbole de devise n'est pas autoris\u00E9 dans la cha\u00EEne du mod\u00E8le de format"}, - - { ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM, - "Fonction de document non prise en charge dans l'objet DOM de la feuille de style."}, - - { ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER, - "Impossible de r\u00E9soudre le pr\u00E9fixe du r\u00E9solveur non-Prefix."}, - - { ER_REDIRECT_COULDNT_GET_FILENAME, - "Extension Redirect : impossible d'obtenir le nom de fichier. L'attribut \"file\" ou \"select\" doit renvoyer une cha\u00EEne valide."}, - - { ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT, - "Impossible de cr\u00E9er FormatterListener dans l'extension Redirect."}, - - { ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX, - "Le pr\u00E9fixe de l''\u00E9l\u00E9ment exclude-result-prefixes n''est pas valide : {0}"}, - - { ER_MISSING_NS_URI, - "URI d'espace de noms manquant pour le pr\u00E9fixe sp\u00E9cifi\u00E9"}, - - { ER_MISSING_ARG_FOR_OPTION, - "Argument manquant pour l''option : {0}"}, - - { ER_INVALID_OPTION, - "Option non valide : {0}"}, - - { ER_MALFORMED_FORMAT_STRING, - "Format de cha\u00EEne incorrect : {0}"}, - - { ER_STYLESHEET_REQUIRES_VERSION_ATTRIB, - "xsl:stylesheet exige un attribut de version."}, - - { ER_ILLEGAL_ATTRIBUTE_VALUE, - "L''attribut {0} a une valeur non admise : {1}"}, - - { ER_CHOOSE_REQUIRES_WHEN, - "xsl:choose exige un \u00E9l\u00E9ment xsl:when"}, - - { ER_NO_APPLY_IMPORT_IN_FOR_EACH, - "xsl:apply-imports non autoris\u00E9 dans un \u00E9l\u00E9ment xsl:for-each"}, - - { ER_CANT_USE_DTM_FOR_OUTPUT, - "Impossible d'utiliser un \u00E9l\u00E9ment DTMLiaison pour un noeud DOM de sortie... Transmettez plut\u00F4t un \u00E9l\u00E9ment com.sun.org.apache.xpath.internal.DOM2Helper."}, - - { ER_CANT_USE_DTM_FOR_INPUT, - "Impossible d'utiliser un \u00E9l\u00E9ment DTMLiaison pour un noeud DOM d'entr\u00E9e... Transmettez plut\u00F4t un \u00E9l\u00E9ment com.sun.org.apache.xpath.internal.DOM2Helper."}, - - { ER_CALL_TO_EXT_FAILED, - "Echec de l''appel de l''\u00E9l\u00E9ment d''extension : {0}"}, - - { ER_PREFIX_MUST_RESOLVE, - "Le pr\u00E9fixe doit \u00EAtre r\u00E9solu en espace de noms : {0}"}, - - { ER_INVALID_UTF16_SURROGATE, - "Substitut UTF-16 non valide d\u00E9tect\u00E9 : {0} ?"}, - - { ER_XSLATTRSET_USED_ITSELF, - "xsl:attribute-set {0} s''est utilis\u00E9 lui-m\u00EAme, ce qui g\u00E9n\u00E8re une boucle sans fin."}, - - { ER_CANNOT_MIX_XERCESDOM, - "Impossible de combiner une entr\u00E9e non Xerces-DOM et une sortie Xerces-DOM."}, - - { ER_TOO_MANY_LISTENERS, - "addTraceListenersToStylesheet - TooManyListenersException"}, - - { ER_IN_ELEMTEMPLATEELEM_READOBJECT, - "Dans ElemTemplateElement.readObject : {0}"}, - - { ER_DUPLICATE_NAMED_TEMPLATE, - "Plusieurs mod\u00E8les nomm\u00E9s {0} ont \u00E9t\u00E9 trouv\u00E9s"}, - - { ER_INVALID_KEY_CALL, - "Appel de fonction non valide : les appels de touche r\u00E9cursive () ne sont pas autoris\u00E9s"}, - - { ER_REFERENCING_ITSELF, - "La variable {0} fait directement ou indirectement r\u00E9f\u00E9rence \u00E0 elle-m\u00EAme."}, - - { ER_ILLEGAL_DOMSOURCE_INPUT, - "Le noeud d'entr\u00E9e ne peut pas \u00EAtre NULL pour un \u00E9l\u00E9ment DOMSource de newTemplates."}, - - { ER_CLASS_NOT_FOUND_FOR_OPTION, - "Fichier de classe introuvable pour l''option {0}"}, - - { ER_REQUIRED_ELEM_NOT_FOUND, - "El\u00E9ment obligatoire introuvable : {0}"}, - - { ER_INPUT_CANNOT_BE_NULL, - "InputStream ne peut pas \u00EAtre NULL"}, - - { ER_URI_CANNOT_BE_NULL, - "L'URI ne peut pas \u00EAtre NULL"}, - - { ER_FILE_CANNOT_BE_NULL, - "Le fichier ne peut pas \u00EAtre NULL"}, - - { ER_SOURCE_CANNOT_BE_NULL, - "InputSource ne peut pas \u00EAtre NULL"}, - - { ER_CANNOT_INIT_BSFMGR, - "Impossible d'initialiser le gestionnaire BSF"}, - - { ER_CANNOT_CMPL_EXTENSN, - "Impossible de compiler l'extension"}, - - { ER_CANNOT_CREATE_EXTENSN, - "Impossible de cr\u00E9er l''extension {0}. Cause : {1}"}, - - { ER_INSTANCE_MTHD_CALL_REQUIRES, - "L''appel de la m\u00E9thode d''instance {0} exige une instance d''objet comme premier argument"}, - - { ER_INVALID_ELEMENT_NAME, - "Nom d''\u00E9l\u00E9ment sp\u00E9cifi\u00E9 {0} non valide"}, - - { ER_ELEMENT_NAME_METHOD_STATIC, - "La m\u00E9thode du nom d''\u00E9l\u00E9ment doit \u00EAtre statique {0}"}, - - { ER_EXTENSION_FUNC_UNKNOWN, - "La fonction d''extension {0} : {1} est inconnue"}, - - { ER_MORE_MATCH_CONSTRUCTOR, - "Plusieurs meilleures concordances du constructeur pour {0}"}, - - { ER_MORE_MATCH_METHOD, - "Plusieurs meilleures concordances pour la m\u00E9thode {0}"}, - - { ER_MORE_MATCH_ELEMENT, - "Plusieurs meilleures concordances pour la m\u00E9thode d''\u00E9l\u00E9ment {0}"}, - - { ER_INVALID_CONTEXT_PASSED, - "Contexte transmis pour \u00E9valuation {0} non valide"}, - - { ER_POOL_EXISTS, - "Le pool existe d\u00E9j\u00E0"}, - - { ER_NO_DRIVER_NAME, - "Aucun nom de pilote indiqu\u00E9"}, - - { ER_NO_URL, - "Aucune URL indiqu\u00E9e"}, - - { ER_POOL_SIZE_LESSTHAN_ONE, - "La taille de pool est inf\u00E9rieure \u00E0 1."}, - - { ER_INVALID_DRIVER, - "Nom de pilote indiqu\u00E9 non valide."}, - - { ER_NO_STYLESHEETROOT, - "Racine de la feuille de style introuvable."}, - - { ER_ILLEGAL_XMLSPACE_VALUE, - "Valeur non admise pour xml:space"}, - - { ER_PROCESSFROMNODE_FAILED, - "Echec de processFromNode"}, - - { ER_RESOURCE_COULD_NOT_LOAD, - "La ressource [ {0} ] n''a pas pu charger : {1} \n {2} \t {3}"}, - - { ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Taille du tampon <=0"}, - - { ER_UNKNOWN_ERROR_CALLING_EXTENSION, - "Erreur inconnue lors de l'appel de l'extension"}, - - { ER_NO_NAMESPACE_DECL, - "Le pr\u00E9fixe {0} n''a pas de d\u00E9claration d''espace de noms correspondante"}, - - { ER_ELEM_CONTENT_NOT_ALLOWED, - "Contenu d''\u00E9l\u00E9ment non autoris\u00E9 pour lang=javaclass {0}"}, - - { ER_STYLESHEET_DIRECTED_TERMINATION, - "Fin du r\u00E9acheminement de la feuille de style"}, - - { ER_ONE_OR_TWO, - "1 ou 2"}, - - { ER_TWO_OR_THREE, - "2 ou 3"}, - - { ER_COULD_NOT_LOAD_RESOURCE, - "Impossible de charger {0} (v\u00E9rifier CLASSPATH), les valeurs par d\u00E9faut sont donc employ\u00E9es"}, - - { ER_CANNOT_INIT_DEFAULT_TEMPLATES, - "Impossible d'initialiser les mod\u00E8les default"}, - - { ER_RESULT_NULL, - "Le r\u00E9sultat ne doit pas \u00EAtre NULL"}, - - { ER_RESULT_COULD_NOT_BE_SET, - "Le r\u00E9sultat n'a pas pu \u00EAtre d\u00E9fini"}, - - { ER_NO_OUTPUT_SPECIFIED, - "Aucune sortie sp\u00E9cifi\u00E9e"}, - - { ER_CANNOT_TRANSFORM_TO_RESULT_TYPE, - "Impossible de transformer le r\u00E9sultat en r\u00E9sultat de type {0}"}, - - { ER_CANNOT_TRANSFORM_SOURCE_TYPE, - "Impossible de transformer une source de type {0}"}, - - { ER_NULL_CONTENT_HANDLER, - "Gestionnaire de contenu NULL"}, - - { ER_NULL_ERROR_HANDLER, - "Gestionnaire d'erreurs NULL"}, - - { ER_CANNOT_CALL_PARSE, - "impossible d'appeler l'analyse si le gestionnaire de contenu n'est pas d\u00E9fini"}, - - { ER_NO_PARENT_FOR_FILTER, - "Aucun parent pour le filtre"}, - - { ER_NO_STYLESHEET_IN_MEDIA, - "Aucune feuille de style trouv\u00E9e dans : {0}, support = {1}"}, - - { ER_NO_STYLESHEET_PI, - "Aucune instruction de traitement (PI) xml-stylesheet trouv\u00E9e dans : {0}"}, - - { ER_NOT_SUPPORTED, - "Non pris en charge : {0}"}, - - { ER_PROPERTY_VALUE_BOOLEAN, - "La valeur de la propri\u00E9t\u00E9 {0} doit \u00EAtre une instance Boolean"}, - - { ER_COULD_NOT_FIND_EXTERN_SCRIPT, - "Impossible d''acc\u00E9der au script externe \u00E0 {0}"}, - - { ER_RESOURCE_COULD_NOT_FIND, - "La ressource [ {0} ] est introuvable.\n {1}"}, - - { ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, - "Propri\u00E9t\u00E9 de sortie non reconnue : {0}"}, - - { ER_FAILED_CREATING_ELEMLITRSLT, - "Echec de la cr\u00E9ation de l'instance ElemLiteralResult"}, - - //Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE - // In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care - //in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc. - //NOTE: Not only the key name but message has also been changed. - { ER_VALUE_SHOULD_BE_NUMBER, - "La valeur de {0} doit contenir un nombre pouvant \u00EAtre analys\u00E9"}, - - { ER_VALUE_SHOULD_EQUAL, - "La valeur de {0} doit \u00EAtre \u00E9gale \u00E0 oui ou non"}, - - { ER_FAILED_CALLING_METHOD, - "Echec de l''appel de la m\u00E9thode {0}"}, - - { ER_FAILED_CREATING_ELEMTMPL, - "Echec de la cr\u00E9ation de l'instance ElemTemplateElement"}, - - { ER_CHARS_NOT_ALLOWED, - "Les caract\u00E8res ne sont pas autoris\u00E9s \u00E0 ce point du document"}, - - { ER_ATTR_NOT_ALLOWED, - "L''attribut \"{0}\" n''est pas autoris\u00E9 sur l''\u00E9l\u00E9ment {1}."}, - - { ER_BAD_VALUE, - "Valeur incorrecte de {0} : {1} "}, - - { ER_ATTRIB_VALUE_NOT_FOUND, - "Valeur d''attribut {0} introuvable "}, - - { ER_ATTRIB_VALUE_NOT_RECOGNIZED, - "Valeur d''attribut {0} non reconnue "}, - - { ER_NULL_URI_NAMESPACE, - "Tentative de g\u00E9n\u00E9ration d'un pr\u00E9fixe d'espace de noms avec un URI NULL"}, - - { ER_NUMBER_TOO_BIG, - "Tentative de formatage d'un nombre sup\u00E9rieur \u00E0 l'entier de type Long le plus grand"}, - - { ER_CANNOT_FIND_SAX1_DRIVER, - "Classe de pilote SAX1 {0} introuvable"}, - - { ER_SAX1_DRIVER_NOT_LOADED, - "Classe de pilote SAX1 {0} trouv\u00E9e mais pas charg\u00E9e"}, - - { ER_SAX1_DRIVER_NOT_INSTANTIATED, - "Classe de pilote SAX1 {0} charg\u00E9e mais pas instanci\u00E9e"}, - - { ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER, - "La classe de pilote SAX1 {0} n''impl\u00E9mente pas org.xml.sax.Parser"}, - - { ER_PARSER_PROPERTY_NOT_SPECIFIED, - "Propri\u00E9t\u00E9 syst\u00E8me org.xml.sax.parser non indiqu\u00E9e"}, - - { ER_PARSER_ARG_CANNOT_BE_NULL, - "L'argument d'analyseur ne doit pas \u00EAtre NULL"}, - - { ER_FEATURE, - "Fonctionnalit\u00E9 : {0}"}, - - { ER_PROPERTY, - "Propri\u00E9t\u00E9 : {0}"}, - - { ER_NULL_ENTITY_RESOLVER, - "R\u00E9solveur d'entit\u00E9 NULL"}, - - { ER_NULL_DTD_HANDLER, - "Gestionnaire DTD NULL"}, - - { ER_NO_DRIVER_NAME_SPECIFIED, - "Aucun nom de pilote indiqu\u00E9."}, - - { ER_NO_URL_SPECIFIED, - "Aucune URL indiqu\u00E9e."}, - - { ER_POOLSIZE_LESS_THAN_ONE, - "La taille de pool est inf\u00E9rieure \u00E0 1."}, - - { ER_INVALID_DRIVER_NAME, - "Nom de pilote indiqu\u00E9 non valide."}, - - { ER_ERRORLISTENER, - "ErrorListener"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The name -// 'ElemTemplateElement' is the name of a class, and should not be -// translated. - { ER_ASSERT_NO_TEMPLATE_PARENT, - "Erreur du programmeur. L'expression n'a pas de parent ElemTemplateElement."}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The substitution text -// provides further information in order to diagnose the problem. The name -// 'RedundentExprEliminator' is the name of a class, and should not be -// translated. - { ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR, - "Assertion du programmeur dans RedundentExprEliminator : {0}"}, - - { ER_NOT_ALLOWED_IN_POSITION, - "{0} n''est pas autoris\u00E9 \u00E0 cet emplacement de la feuille de style."}, - - { ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION, - "Le texte imprimable n'est pas autoris\u00E9 \u00E0 cet emplacement de la feuille de style."}, - - // This code is shared with warning codes. - // SystemId Unknown - { INVALID_TCHAR, - "Valeur non admise {1} utilis\u00E9e pour l''attribut CHAR : {0}. Un attribut de type CHAR ne doit \u00EAtre compos\u00E9 que d''un caract\u00E8re."}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "QNAME" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value and {0} is the attribute name. - //The following codes are shared with the warning codes... - { INVALID_QNAME, - "Valeur non admise {1} utilis\u00E9e pour l''attribut QNAME : {0}"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "ENUM" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value, {0} is the attribute name, and {2} is a list of valid - // values. - { INVALID_ENUM, - "Valeur non admise {1} utilis\u00E9e pour l''attribut ENUM : {0}. Les valeurs valides sont les suivantes : {2}."}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NMTOKEN" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NMTOKEN, - "Valeur non admise {1} utilis\u00E9e pour l''attribut NMTOKEN : {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NCNAME" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NCNAME, - "Valeur non admise {1} utilis\u00E9e pour l''attribut NCNAME : {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "boolean" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_BOOLEAN, - "Valeur non admise {1} utilis\u00E9e pour l''attribut \"boolean\" : {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "number" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NUMBER, - "Valeur non admise {1} utilis\u00E9e pour l''attribut \"number\" : {0} "}, - - - // End of shared codes... - -// Note to translators: A "match pattern" is a special form of XPath expression -// that is used for matching patterns. The substitution text is the name of -// a function. The message indicates that when this function is referenced in -// a match pattern, its argument must be a string literal (or constant.) -// ER_ARG_LITERAL - new error message for bugzilla //5202 - { ER_ARG_LITERAL, - "L''argument pour {0} dans le mod\u00E8le de recherche doit \u00EAtre un litt\u00E9ral."}, - -// Note to translators: The following message indicates that two definitions of -// a variable. A "global variable" is a variable that is accessible everywher -// in the stylesheet. -// ER_DUPLICATE_GLOBAL_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_GLOBAL_VAR, - "D\u00E9claration de variable globale en double."}, - - -// Note to translators: The following message indicates that two definitions of -// a variable were encountered. -// ER_DUPLICATE_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_VAR, - "D\u00E9claration de variable en double."}, - - // Note to translators: "xsl:template, "name" and "match" are XSLT keywords - // which must not be translated. - // ER_TEMPLATE_NAME_MATCH - new error message for bugzilla #789 - { ER_TEMPLATE_NAME_MATCH, - "xsl:template doit avoir un attribut \"name\" ou \"match\" (ou les deux)"}, - - // Note to translators: "exclude-result-prefixes" is an XSLT keyword which - // should not be translated. The message indicates that a namespace prefix - // encountered as part of the value of the exclude-result-prefixes attribute - // was in error. - // ER_INVALID_PREFIX - new error message for bugzilla #788 - { ER_INVALID_PREFIX, - "Le pr\u00E9fixe de l''\u00E9l\u00E9ment exclude-result-prefixes n''est pas valide : {0}"}, - - // Note to translators: An "attribute set" is a set of attributes that can - // be added to an element in the output document as a group. The message - // indicates that there was a reference to an attribute set named {0} that - // was never defined. - // ER_NO_ATTRIB_SET - new error message for bugzilla #782 - { ER_NO_ATTRIB_SET, - "L''ensemble d''attributs nomm\u00E9 {0} n''existe pas"}, - - // Note to translators: This message indicates that there was a reference - // to a function named {0} for which no function definition could be found. - { ER_FUNCTION_NOT_FOUND, - "La fonction nomm\u00E9e {0} n''existe pas"}, - - // Note to translators: This message indicates that the XSLT instruction - // that is named by the substitution text {0} must not contain other XSLT - // instructions (content) or a "select" attribute. The word "select" is - // an XSLT keyword in this case and must not be translated. - { ER_CANT_HAVE_CONTENT_AND_SELECT, - "L''\u00E9l\u00E9ment {0} ne doit pas avoir \u00E0 la fois un attribut \"select\" et un attribut de contenu."}, - - // Note to translators: This message indicates that the value argument - // of setParameter must be a valid Java Object. - { ER_INVALID_SET_PARAM_VALUE, - "La valeur du param\u00E8tre {0} doit \u00EAtre un objet Java valide"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT, - "L'attribut result-prefix d'un \u00E9l\u00E9ment xsl:namespace-alias a la valeur \"#default\", mais il n'existe aucune d\u00E9claration de l'espace de noms par d\u00E9faut dans la port\u00E9e pour l'\u00E9l\u00E9ment"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX, - "L''attribut result-prefix d''un \u00E9l\u00E9ment xsl:namespace-alias a la valeur ''{0}'', mais il n''existe aucune d\u00E9claration d''espace de noms pour le pr\u00E9fixe ''{0}'' dans la port\u00E9e pour l''\u00E9l\u00E9ment."}, - - { ER_SET_FEATURE_NULL_NAME, - "Le nom de la fonctionnalit\u00E9 ne peut pas \u00EAtre NULL dans TransformerFactory.setFeature (cha\u00EEne pour le nom, valeur bool\u00E9enne)."}, - - { ER_GET_FEATURE_NULL_NAME, - "Le nom de la fonctionnalit\u00E9 ne peut pas \u00EAtre NULL dans TransformerFactory.getFeature (cha\u00EEne pour le nom)."}, - - { ER_UNSUPPORTED_FEATURE, - "Impossible de d\u00E9finir la fonctionnalit\u00E9 ''{0}'' sur cette propri\u00E9t\u00E9 TransformerFactory."}, - - { ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING, - "L''utilisation de l''\u00E9l\u00E9ment d''extension ''{0}'' n''est pas autoris\u00E9e lorsque la fonctionnalit\u00E9 de traitement s\u00E9curis\u00E9 est d\u00E9finie sur True."}, - - { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE, - "Impossible d'obtenir le pr\u00E9fixe pour un URI d'espace de noms NULL."}, - - { ER_NAMESPACE_CONTEXT_NULL_PREFIX, - "Impossible d'obtenir l'URI d'espace de noms pour le pr\u00E9fixe NULL."}, - - { ER_XPATH_RESOLVER_NULL_QNAME, - "Le nom de fonction ne peut pas \u00EAtre NULL."}, - - { ER_XPATH_RESOLVER_NEGATIVE_ARITY, - "L'arit\u00E9 ne peut pas \u00EAtre n\u00E9gative."}, - // Warnings... - - { WG_FOUND_CURLYBRACE, - "'}' trouv\u00E9 mais aucun mod\u00E8le d'attribut ouvert."}, - - { WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR, - "Avertissement : l''attribut \"count\" ne correspond pas \u00E0 un anc\u00EAtre dans xsl:number ! Cible = {0}"}, - - { WG_EXPR_ATTRIB_CHANGED_TO_SELECT, - "Ancienne syntaxe : le nom de l'attribut \"expr\" a \u00E9t\u00E9 modifi\u00E9 en \"select\"."}, - - { WG_NO_LOCALE_IN_FORMATNUMBER, - "Xalan ne g\u00E8re pas encore le nom de l'environnement local dans la fonction format-number."}, - - { WG_LOCALE_NOT_FOUND, - "Avertissement : environnement local introuvable pour xml:lang={0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "Impossible de cr\u00E9er une URL \u00E0 partir de : {0}"}, - - { WG_CANNOT_LOAD_REQUESTED_DOC, - "Impossible de charger le document demand\u00E9 : {0}"}, - - { WG_CANNOT_FIND_COLLATOR, - "Collator introuvable pour >>>>>> Version Xalan "}, - { "version2", "<<<<<<<"}, - { "yes", "oui"}, - { "line", "Ligne n\u00B0"}, - { "column","Colonne n\u00B0"}, - { "xsldone", "XSLProcessor : termin\u00E9"}, - - - // Note to translators: The following messages provide usage information - // for the Xalan Process command line. "Process" is the name of a Java class, - // and should not be translated. - { "xslProc_option", "Options de classe \"Process\" de ligne de commande Xalan-J :"}, - { "xslProc_option", "Options de classe \"Process\" de ligne de commande Xalan-J :"}, - { "xslProc_invalid_xsltc_option", "L''option {0} n''est pas prise en charge dans le mode XSLTC."}, - { "xslProc_invalid_xalan_option", "L''option {0} ne peut \u00EAtre utilis\u00E9e qu''avec -XSLTC."}, - { "xslProc_no_input", "Erreur : aucune feuille de style ou aucun fichier XML d'entr\u00E9e n'est sp\u00E9cifi\u00E9. Ex\u00E9cutez cette commande sans option concernant les instructions d'utilisation."}, - { "xslProc_common_options", "-Options communes-"}, - { "xslProc_xalan_options", "-Options pour Xalan-"}, - { "xslProc_xsltc_options", "-Options pour XSLTC-"}, - { "xslProc_return_to_continue", "(appuyez sur la touche pour continuer)"}, - - // Note to translators: The option name and the parameter name do not need to - // be translated. Only translate the messages in parentheses. Note also that - // leading whitespace in the messages is used to indent the usage information - // for each option in the English messages. - // Do not translate the keywords: XSLTC, SAX, DOM and DTM. - { "optionXSLTC", " [-XSLTC (utiliser XSLTC pour la transformation)]"}, - { "optionIN", " [-IN inputXMLURL]"}, - { "optionXSL", " [-XSL XSLTransformationURL]"}, - { "optionOUT", " [-OUT outputFileName]"}, - { "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"}, - { "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"}, - { "optionPARSER", " [Nom de classe qualifi\u00E9 complet -PARSER de liaison d'analyseur]"}, - { "optionE", " [-E (Ne pas d\u00E9velopper les r\u00E9f\u00E9rences d'entit\u00E9)]"}, - { "optionV", " [-E (Ne pas d\u00E9velopper les r\u00E9f\u00E9rences d'entit\u00E9)]"}, - { "optionQC", " [-QC (Avertissements de conflits de mod\u00E8les en mode silencieux)]"}, - { "optionQ", " [-Q (Mode silencieux)]"}, - { "optionLF", " [-LF (Utiliser les retours \u00E0 la ligne uniquement en sortie {valeur par d\u00E9faut : CR/LF})]"}, - { "optionCR", " [-CR (Utiliser les retours chariot uniquement en sortie {valeur par d\u00E9faut : CR/LF})]"}, - { "optionESCAPE", " [-ESCAPE (Avec caract\u00E8res d'espacement {valeur par d\u00E9faut : <>&\"'\\r\\n}]"}, - { "optionINDENT", " [-INDENT (Contr\u00F4ler le nombre d'espaces \u00E0 mettre en retrait {valeur par d\u00E9faut : 0})]"}, - { "optionTT", " [-TT (G\u00E9n\u00E9rer une trace des mod\u00E8les pendant qu'ils sont appel\u00E9s.)]"}, - { "optionTG", " [-TG (G\u00E9n\u00E9rer une trace de chaque \u00E9v\u00E9nement de g\u00E9n\u00E9ration.)]"}, - { "optionTS", " [-TS (G\u00E9n\u00E9rer une trace de chaque \u00E9v\u00E9nement de s\u00E9lection.)]"}, - { "optionTTC", " [-TTC (G\u00E9n\u00E9rer une trace des enfants de mod\u00E8le pendant qu'ils sont trait\u00E9s.)]"}, - { "optionTCLASS", " [-TCLASS (Classe TraceListener pour les extensions de trace.)]"}, - { "optionVALIDATE", " [-VALIDATE (D\u00E9finir si la validation est effectu\u00E9e. Par d\u00E9faut, la validation est d\u00E9sactiv\u00E9e.)]"}, - { "optionEDUMP", " [-EDUMP {nom de fichier facultatif} (Effectuer le vidage de la pile sur l'erreur.)]"}, - { "optionXML", " [-XML (Utiliser le programme de formatage XML et ajouter un en-t\u00EAte XML.)]"}, - { "optionTEXT", " [-TEXT (Utiliser le formatage de texte simple.)]"}, - { "optionHTML", " [-HTML (Utiliser le formatage HTML.)]"}, - { "optionPARAM", " [-PARAM Expression de nom (D\u00E9finir un param\u00E8tre de feuille de style)]"}, - { "noParsermsg1", "Echec du processus XSL."}, - { "noParsermsg2", "** Analyseur introuvable **"}, - { "noParsermsg3", "V\u00E9rifiez votre variable d'environnement CLASSPATH."}, - { "noParsermsg4", "Si vous ne disposez pas de l'analyseur XML pour Java d'IBM, vous pouvez le t\u00E9l\u00E9charger sur le site"}, - { "noParsermsg5", "AlphaWorks d'IBM : http://www.alphaworks.ibm.com/formula/xml"}, - { "optionURIRESOLVER", " [-URIRESOLVER Nom de classe complet (URIResolver \u00E0 utiliser pour r\u00E9soudre les URI)]"}, - { "optionENTITYRESOLVER", " [-ENTITYRESOLVER Nom de classe complet (EntityResolver \u00E0 utiliser pour r\u00E9soudre les entit\u00E9s)]"}, - { "optionCONTENTHANDLER", " [-CONTENTHANDLER Nom de classe complet (ContentHandler \u00E0 utiliser pour s\u00E9rialiser la sortie)]"}, - { "optionLINENUMBERS", " [-L Utiliser les num\u00E9ros de ligne pour le document source]"}, - { "optionSECUREPROCESSING", " [-SECURE (D\u00E9finir la fonctionnalit\u00E9 de traitement s\u00E9curis\u00E9 sur True)]"}, - - // Following are the new options added in XSLTErrorResources.properties files after Jdk 1.4 (Xalan 2.2-D11) - - - { "optionMEDIA", " [-MEDIA mediaType (Utiliser l'attribut de support pour trouver la feuille de style associ\u00E9e \u00E0 un document)]"}, - { "optionFLAVOR", " [-FLAVOR flavorName (Utiliser explicitement s2s=SAX ou d2d=DOM pour effectuer la transformation)] "}, // Added by sboag/scurcuru; experimental - { "optionDIAG", " [-DIAG (Afficher la dur\u00E9e totale de la transformation, en millisecondes)]"}, - { "optionINCREMENTAL", " [-INCREMENTAL (Demander la construction DTM incr\u00E9mentielle en d\u00E9finissant http://xml.apache.org/xalan/features/incremental true)]"}, - { "optionNOOPTIMIMIZE", " [-NOOPTIMIMIZE (Ne demander aucune optimisation de la feuille de style en d\u00E9finissant http://xml.apache.org/xalan/features/optimize false)]"}, - { "optionRL", " [-RL recursionlimit (Assertion d'une limite num\u00E9rique sur la profondeur de r\u00E9cursivit\u00E9 de la feuille de style)]"}, - { "optionXO", " [-XO [transletName] (Affecter le nom au translet g\u00E9n\u00E9r\u00E9)]"}, - { "optionXD", " [-XD destinationDirectory (Indiquer un r\u00E9pertoire de destination pour le translet)]"}, - { "optionXJ", " [-XJ jarfile (Packager les classes de translet dans un fichier JAR nomm\u00E9 )]"}, - { "optionXP", " [-XP package (Indique un pr\u00E9fixe de nom de package pour toutes les classes de translet g\u00E9n\u00E9r\u00E9es)]"}, - - //AddITIONAL STRINGS that need L10n - // Note to translators: The following message describes usage of a particular - // command-line option that is used to enable the "template inlining" - // optimization. The optimization involves making a copy of the code - // generated for a template in another template that refers to it. - { "optionXN", " [-XN (Activer automatiquement l'image \"inline\" du mod\u00E8le)]" }, - { "optionXX", " [-XX (Activer la sortie de messages de d\u00E9bogage suppl\u00E9mentaires)]"}, - { "optionXT" , " [-XT (Utiliser le translet pour la transformation si possible)]"}, - { "diagTiming"," --------- La transformation de {0} via {1} a pris {2} ms" }, - { "recursionTooDeep","Imbrication de mod\u00E8le trop profonde. Imbrication = {0}, mod\u00E8le {1} {2}" }, - { "nameIs", "le nom est" }, - { "matchPatternIs", "le mod\u00E8le de recherche est" } - - }; - - } - // ================= INFRASTRUCTURE ====================== - - /** String for use when a bad error code was encountered. */ - public static final String BAD_CODE = "BAD_CODE"; - - /** String for use when formatting of the error string failed. */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java deleted file mode 100644 index 4a3b688e73d..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java +++ /dev/null @@ -1,1425 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And - * you need to enter key , value pair as part of contents - * Array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XSLTErrorResources_it extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /* - * Static variables - */ - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX = - "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX"; - - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT = - "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT"; - - public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE"; - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE"; - public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS"; - public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD"; - public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES"; - public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB"; - public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND"; - public static final String ER_CANT_RESOLVE_NAME_AVT = "ER_CANT_RESOLVE_NAME_AVT"; - public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB"; - public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB"; - public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB = - "ER_BAD_VAL_ON_LEVEL_ATTRIB"; - public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB"; - public static final String ER_NEED_NAME_OR_MATCH_ATTRIB = - "ER_NEED_NAME_OR_MATCH_ATTRIB"; - public static final String ER_CANT_RESOLVE_NSPREFIX = - "ER_CANT_RESOLVE_NSPREFIX"; - public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE"; - public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC"; - public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR"; - public static final String ER_NULL_CHILD = "ER_NULL_CHILD"; - public static final String ER_NEED_SELECT_ATTRIB = "ER_NEED_SELECT_ATTRIB"; - public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB"; - public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB"; - public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC"; - public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON = - "ER_COULD_NOT_CREATE_XML_PROC_LIAISON"; - public static final String ER_PROCESS_NOT_SUCCESSFUL = - "ER_PROCESS_NOT_SUCCESSFUL"; - public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL"; - public static final String ER_ENCODING_NOT_SUPPORTED = - "ER_ENCODING_NOT_SUPPORTED"; - public static final String ER_COULD_NOT_CREATE_TRACELISTENER = - "ER_COULD_NOT_CREATE_TRACELISTENER"; - public static final String ER_KEY_REQUIRES_NAME_ATTRIB = - "ER_KEY_REQUIRES_NAME_ATTRIB"; - public static final String ER_KEY_REQUIRES_MATCH_ATTRIB = - "ER_KEY_REQUIRES_MATCH_ATTRIB"; - public static final String ER_KEY_REQUIRES_USE_ATTRIB = - "ER_KEY_REQUIRES_USE_ATTRIB"; - public static final String ER_REQUIRES_ELEMENTS_ATTRIB = - "ER_REQUIRES_ELEMENTS_ATTRIB"; - public static final String ER_MISSING_PREFIX_ATTRIB = - "ER_MISSING_PREFIX_ATTRIB"; - public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL"; - public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND"; - public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION"; - public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB"; - public static final String ER_STYLESHEET_INCLUDES_ITSELF = - "ER_STYLESHEET_INCLUDES_ITSELF"; - public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR"; - public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB"; - public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT = - "ER_MISSING_CONTAINER_ELEMENT_COMPONENT"; - public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT = - "ER_CAN_ONLY_OUTPUT_TO_ELEMENT"; - public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR"; - public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR"; - public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION"; - public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR = - "ER_CANNOT_SERIALIZE_XSLPROCESSOR"; - public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET"; - public static final String ER_FAILED_PROCESS_STYLESHEET = - "ER_FAILED_PROCESS_STYLESHEET"; - public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC"; - public static final String ER_COULDNT_FIND_FRAGMENT = - "ER_COULDNT_FIND_FRAGMENT"; - public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT"; - public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB = - "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB = - "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG = - "ER_NO_CLONE_OF_DOCUMENT_FRAG"; - public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM"; - public static final String ER_XMLSPACE_ILLEGAL_VALUE = - "ER_XMLSPACE_ILLEGAL_VALUE"; - public static final String ER_NO_XSLKEY_DECLARATION = - "ER_NO_XSLKEY_DECLARATION"; - public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL"; - public static final String ER_XSLFUNCTIONS_UNSUPPORTED = - "ER_XSLFUNCTIONS_UNSUPPORTED"; - public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR"; - public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET = - "ER_NOT_ALLOWED_INSIDE_STYLESHEET"; - public static final String ER_RESULTNS_NOT_SUPPORTED = - "ER_RESULTNS_NOT_SUPPORTED"; - public static final String ER_DEFAULTSPACE_NOT_SUPPORTED = - "ER_DEFAULTSPACE_NOT_SUPPORTED"; - public static final String ER_INDENTRESULT_NOT_SUPPORTED = - "ER_INDENTRESULT_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB"; - public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM"; - public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE"; - public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN"; - public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_MISPLACED_XSLOTHERWISE = - "ER_MISPLACED_XSLOTHERWISE"; - public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE = - "ER_NOT_ALLOWED_INSIDE_TEMPLATE"; - public static final String ER_UNKNOWN_EXT_NS_PREFIX = - "ER_UNKNOWN_EXT_NS_PREFIX"; - public static final String ER_IMPORTS_AS_FIRST_ELEM = - "ER_IMPORTS_AS_FIRST_ELEM"; - public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF"; - public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL"; - public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL = - "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL"; - public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION"; - public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR"; - public static final String ER_CURRENCY_SIGN_ILLEGAL= - "ER_CURRENCY_SIGN_ILLEGAL"; - public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM = - "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM"; - public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER = - "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER"; - public static final String ER_REDIRECT_COULDNT_GET_FILENAME = - "ER_REDIRECT_COULDNT_GET_FILENAME"; - public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT = - "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT"; - public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX = - "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX"; - public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI"; - public static final String ER_MISSING_ARG_FOR_OPTION = - "ER_MISSING_ARG_FOR_OPTION"; - public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION"; - public static final String ER_MALFORMED_FORMAT_STRING = - "ER_MALFORMED_FORMAT_STRING"; - public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String ER_ILLEGAL_ATTRIBUTE_VALUE = - "ER_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN"; - public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH = - "ER_NO_APPLY_IMPORT_IN_FOR_EACH"; - public static final String ER_CANT_USE_DTM_FOR_OUTPUT = - "ER_CANT_USE_DTM_FOR_OUTPUT"; - public static final String ER_CANT_USE_DTM_FOR_INPUT = - "ER_CANT_USE_DTM_FOR_INPUT"; - public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_XSLATTRSET_USED_ITSELF = - "ER_XSLATTRSET_USED_ITSELF"; - public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM"; - public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS"; - public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT = - "ER_IN_ELEMTEMPLATEELEM_READOBJECT"; - public static final String ER_DUPLICATE_NAMED_TEMPLATE = - "ER_DUPLICATE_NAMED_TEMPLATE"; - public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL"; - public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF"; - public static final String ER_ILLEGAL_DOMSOURCE_INPUT = - "ER_ILLEGAL_DOMSOURCE_INPUT"; - public static final String ER_CLASS_NOT_FOUND_FOR_OPTION = - "ER_CLASS_NOT_FOUND_FOR_OPTION"; - public static final String ER_REQUIRED_ELEM_NOT_FOUND = - "ER_REQUIRED_ELEM_NOT_FOUND"; - public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL"; - public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL"; - public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL"; - public static final String ER_SOURCE_CANNOT_BE_NULL = - "ER_SOURCE_CANNOT_BE_NULL"; - public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR"; - public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN"; - public static final String ER_CANNOT_CREATE_EXTENSN = - "ER_CANNOT_CREATE_EXTENSN"; - public static final String ER_INSTANCE_MTHD_CALL_REQUIRES = - "ER_INSTANCE_MTHD_CALL_REQUIRES"; - public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME"; - public static final String ER_ELEMENT_NAME_METHOD_STATIC = - "ER_ELEMENT_NAME_METHOD_STATIC"; - public static final String ER_EXTENSION_FUNC_UNKNOWN = - "ER_EXTENSION_FUNC_UNKNOWN"; - public static final String ER_MORE_MATCH_CONSTRUCTOR = - "ER_MORE_MATCH_CONSTRUCTOR"; - public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD"; - public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT"; - public static final String ER_INVALID_CONTEXT_PASSED = - "ER_INVALID_CONTEXT_PASSED"; - public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS"; - public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME"; - public static final String ER_NO_URL = "ER_NO_URL"; - public static final String ER_POOL_SIZE_LESSTHAN_ONE = - "ER_POOL_SIZE_LESSTHAN_ONE"; - public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER"; - public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT"; - public static final String ER_ILLEGAL_XMLSPACE_VALUE = - "ER_ILLEGAL_XMLSPACE_VALUE"; - public static final String ER_PROCESSFROMNODE_FAILED = - "ER_PROCESSFROMNODE_FAILED"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = - "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = - "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION = - "ER_UNKNOWN_ERROR_CALLING_EXTENSION"; - public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL"; - public static final String ER_ELEM_CONTENT_NOT_ALLOWED = - "ER_ELEM_CONTENT_NOT_ALLOWED"; - public static final String ER_STYLESHEET_DIRECTED_TERMINATION = - "ER_STYLESHEET_DIRECTED_TERMINATION"; - public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO"; - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = - "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES = - "ER_CANNOT_INIT_DEFAULT_TEMPLATES"; - public static final String ER_RESULT_NULL = "ER_RESULT_NULL"; - public static final String ER_RESULT_COULD_NOT_BE_SET = - "ER_RESULT_COULD_NOT_BE_SET"; - public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED"; - public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE = - "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE"; - public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE = - "ER_CANNOT_TRANSFORM_SOURCE_TYPE"; - public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER"; - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE"; - public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER"; - public static final String ER_NO_STYLESHEET_IN_MEDIA = - "ER_NO_STYLESHEET_IN_MEDIA"; - public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_PROPERTY_VALUE_BOOLEAN = - "ER_PROPERTY_VALUE_BOOLEAN"; - public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT = - "ER_COULD_NOT_FIND_EXTERN_SCRIPT"; - public static final String ER_RESOURCE_COULD_NOT_FIND = - "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED = - "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED"; - public static final String ER_FAILED_CREATING_ELEMLITRSLT = - "ER_FAILED_CREATING_ELEMLITRSLT"; - public static final String ER_VALUE_SHOULD_BE_NUMBER = - "ER_VALUE_SHOULD_BE_NUMBER"; - public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL"; - public static final String ER_FAILED_CALLING_METHOD = - "ER_FAILED_CALLING_METHOD"; - public static final String ER_FAILED_CREATING_ELEMTMPL = - "ER_FAILED_CREATING_ELEMTMPL"; - public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED"; - public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED"; - public static final String ER_BAD_VALUE = "ER_BAD_VALUE"; - public static final String ER_ATTRIB_VALUE_NOT_FOUND = - "ER_ATTRIB_VALUE_NOT_FOUND"; - public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED = - "ER_ATTRIB_VALUE_NOT_RECOGNIZED"; - public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE"; - public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG"; - public static final String ER_CANNOT_FIND_SAX1_DRIVER = - "ER_CANNOT_FIND_SAX1_DRIVER"; - public static final String ER_SAX1_DRIVER_NOT_LOADED = - "ER_SAX1_DRIVER_NOT_LOADED"; - public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED = - "ER_SAX1_DRIVER_NOT_INSTANTIATED" ; - public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER = - "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER"; - public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED = - "ER_PARSER_PROPERTY_NOT_SPECIFIED"; - public static final String ER_PARSER_ARG_CANNOT_BE_NULL = - "ER_PARSER_ARG_CANNOT_BE_NULL" ; - public static final String ER_FEATURE = "ER_FEATURE"; - public static final String ER_PROPERTY = "ER_PROPERTY" ; - public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER"; - public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ; - public static final String ER_NO_DRIVER_NAME_SPECIFIED = - "ER_NO_DRIVER_NAME_SPECIFIED"; - public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED"; - public static final String ER_POOLSIZE_LESS_THAN_ONE = - "ER_POOLSIZE_LESS_THAN_ONE"; - public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME"; - public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER"; - public static final String ER_ASSERT_NO_TEMPLATE_PARENT = - "ER_ASSERT_NO_TEMPLATE_PARENT"; - public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR = - "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR"; - public static final String ER_NOT_ALLOWED_IN_POSITION = - "ER_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION = - "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE = - "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE"; - public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX = - "ER_NAMESPACE_CONTEXT_NULL_PREFIX"; - public static final String ER_XPATH_RESOLVER_NULL_QNAME = - "ER_XPATH_RESOLVER_NULL_QNAME"; - public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY = - "ER_XPATH_RESOLVER_NEGATIVE_ARITY"; - public static final String INVALID_TCHAR = "INVALID_TCHAR"; - public static final String INVALID_QNAME = "INVALID_QNAME"; - public static final String INVALID_ENUM = "INVALID_ENUM"; - public static final String INVALID_NMTOKEN = "INVALID_NMTOKEN"; - public static final String INVALID_NCNAME = "INVALID_NCNAME"; - public static final String INVALID_BOOLEAN = "INVALID_BOOLEAN"; - public static final String INVALID_NUMBER = "INVALID_NUMBER"; - public static final String ER_ARG_LITERAL = "ER_ARG_LITERAL"; - public static final String ER_DUPLICATE_GLOBAL_VAR ="ER_DUPLICATE_GLOBAL_VAR"; - public static final String ER_DUPLICATE_VAR = "ER_DUPLICATE_VAR"; - public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH"; - public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX"; - public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET"; - public static final String ER_FUNCTION_NOT_FOUND = - "ER_FUNCTION_NOT_FOUND"; - public static final String ER_CANT_HAVE_CONTENT_AND_SELECT = - "ER_CANT_HAVE_CONTENT_AND_SELECT"; - public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE"; - public static final String ER_SET_FEATURE_NULL_NAME = - "ER_SET_FEATURE_NULL_NAME"; - public static final String ER_GET_FEATURE_NULL_NAME = - "ER_GET_FEATURE_NULL_NAME"; - public static final String ER_UNSUPPORTED_FEATURE = - "ER_UNSUPPORTED_FEATURE"; - public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING = - "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING"; - - public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE"; - public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR = - "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR"; - public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT = - "WG_EXPR_ATTRIB_CHANGED_TO_SELECT"; - public static final String WG_NO_LOCALE_IN_FORMATNUMBER = - "WG_NO_LOCALE_IN_FORMATNUMBER"; - public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_CANNOT_LOAD_REQUESTED_DOC = - "WG_CANNOT_LOAD_REQUESTED_DOC"; - public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR"; - public static final String WG_FUNCTIONS_SHOULD_USE_URL = - "WG_FUNCTIONS_SHOULD_USE_URL"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 = - "WG_ENCODING_NOT_SUPPORTED_USING_UTF8"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA = - "WG_ENCODING_NOT_SUPPORTED_USING_JAVA"; - public static final String WG_SPECIFICITY_CONFLICTS = - "WG_SPECIFICITY_CONFLICTS"; - public static final String WG_PARSING_AND_PREPARING = - "WG_PARSING_AND_PREPARING"; - public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE"; - public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP"; - public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED"; - public static final String WG_NO_DECIMALFORMAT_DECLARATION = - "WG_NO_DECIMALFORMAT_DECLARATION"; - public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS"; - public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED = - "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED"; - public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE = - "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE"; - public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE"; - public static final String WG_COULD_NOT_RESOLVE_PREFIX = - "WG_COULD_NOT_RESOLVE_PREFIX"; - public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String WG_ILLEGAL_ATTRIBUTE_NAME = - "WG_ILLEGAL_ATTRIBUTE_NAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_VALUE = - "WG_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG"; - public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_POSITION = - "WG_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String NO_MODIFICATION_ALLOWED_ERR = - "NO_MODIFICATION_ALLOWED_ERR"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_NO_CURLYBRACE, - "Errore: '{' non pu\u00F2 esistere nell'espressione"}, - - { ER_ILLEGAL_ATTRIBUTE , - "{0} ha un attributo non valido: {1}"}, - - {ER_NULL_SOURCENODE_APPLYIMPORTS , - "sourceNode nullo in xsl:apply-imports."}, - - {ER_CANNOT_ADD, - "Impossibile aggiungere {0} a {1}"}, - - { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES, - "sourceNode nullo in handleApplyTemplatesInstruction."}, - - { ER_NO_NAME_ATTRIB, - "{0} deve avere un attributo name."}, - - {ER_TEMPLATE_NOT_FOUND, - "Impossibile trovare il modello denominato {0}"}, - - {ER_CANT_RESOLVE_NAME_AVT, - "Impossibile risolvere l'AVT del nome in xsl:call-template."}, - - {ER_REQUIRES_ATTRIB, - "{0} richiede l''attributo: {1}"}, - - { ER_MUST_HAVE_TEST_ATTRIB, - "{0} deve avere un attributo \"test\"."}, - - {ER_BAD_VAL_ON_LEVEL_ATTRIB, - "Valore non valido per l''attributo level: {0}"}, - - {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML, - "il nome processing-instruction non pu\u00F2 essere 'xml'"}, - - { ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, - "il nome processing-instruction deve essere un NCName valido: {0}"}, - - { ER_NEED_MATCH_ATTRIB, - "{0} deve avere un attributo match se dispone di una modalit\u00E0."}, - - { ER_NEED_NAME_OR_MATCH_ATTRIB, - "{0} richiede un nome o un attributo match."}, - - {ER_CANT_RESOLVE_NSPREFIX, - "Impossibile risolvere il prefisso spazio di nomi {0}"}, - - { ER_ILLEGAL_VALUE, - "xml:space ha un valore non valido {0}"}, - - { ER_NO_OWNERDOC, - "Il nodo figlio non dispone di un documento proprietario."}, - - { ER_ELEMTEMPLATEELEM_ERR, - "Errore di ElemTemplateElement: {0}"}, - - { ER_NULL_CHILD, - "Tentativo di aggiungere un elemento figlio nullo."}, - - { ER_NEED_SELECT_ATTRIB, - "{0} richiede un attributo select."}, - - { ER_NEED_TEST_ATTRIB , - "xsl:when deve avere un attributo 'test'."}, - - { ER_NEED_NAME_ATTRIB, - "xsl:with-param deve avere un attributo 'name'."}, - - { ER_NO_CONTEXT_OWNERDOC, - "il contesto non dispone di un documento proprietario."}, - - {ER_COULD_NOT_CREATE_XML_PROC_LIAISON, - "Impossibile creare la relazione TransformerFactory XML {0}"}, - - {ER_PROCESS_NOT_SUCCESSFUL, - "Xalan: processo non riuscito."}, - - { ER_NOT_SUCCESSFUL, - "Xalan: operazione non riuscita."}, - - { ER_ENCODING_NOT_SUPPORTED, - "Codifica non supportata: {0}"}, - - {ER_COULD_NOT_CREATE_TRACELISTENER, - "Impossibile creare TraceListener {0}"}, - - {ER_KEY_REQUIRES_NAME_ATTRIB, - "xsl:key richiede un attributo 'name'."}, - - { ER_KEY_REQUIRES_MATCH_ATTRIB, - "xsl:key richiede un attributo 'match'."}, - - { ER_KEY_REQUIRES_USE_ATTRIB, - "xsl:key richiede un attributo 'use'."}, - - { ER_REQUIRES_ELEMENTS_ATTRIB, - "(StylesheetHandler) {0} richiede un attributo ''elements''."}, - - { ER_MISSING_PREFIX_ATTRIB, - "(StylesheetHandler) {0} attributo ''prefix'' mancante"}, - - { ER_BAD_STYLESHEET_URL, - "URL del foglio di stile non valido: {0}"}, - - { ER_FILE_NOT_FOUND, - "File del foglio di stile non trovato: {0}"}, - - { ER_IOEXCEPTION, - "Eccezione IO con il file foglio di stile: {0}"}, - - { ER_NO_HREF_ATTRIB, - "(StylesheetHandler) Impossibile trovare l''attributo href per {0}"}, - - { ER_STYLESHEET_INCLUDES_ITSELF, - "(StylesheetHandler) {0} include s\u00E9 stesso direttamente o indirettamente."}, - - { ER_PROCESSINCLUDE_ERROR, - "Errore di StylesheetHandler.processInclude: {0}"}, - - { ER_MISSING_LANG_ATTRIB, - "(StylesheetHandler) {0} attributo ''lang'' mancante"}, - - { ER_MISSING_CONTAINER_ELEMENT_COMPONENT, - "(StylesheetHandler) posizione errata dell''elemento {0}. Elemento ''component'' del contenitore mancante."}, - - { ER_CAN_ONLY_OUTPUT_TO_ELEMENT, - "L'output pu\u00F2 essere eseguito solo su Element, DocumentFragment, Document o PrintWriter."}, - - { ER_PROCESS_ERROR, - "Errore di StylesheetRoot.process"}, - - { ER_UNIMPLNODE_ERROR, - "Errore di UnImplNode: {0}"}, - - { ER_NO_SELECT_EXPRESSION, - "Errore. L'espressione di selezione dell'xpath (-select) non \u00E8 stata trovata."}, - - { ER_CANNOT_SERIALIZE_XSLPROCESSOR, - "Impossibile serializzare un XSLProcessor."}, - - { ER_NO_INPUT_STYLESHEET, - "Input del foglio di stile non specificato."}, - - { ER_FAILED_PROCESS_STYLESHEET, - "Elaborazione del foglio di stile non riuscita."}, - - { ER_COULDNT_PARSE_DOC, - "Impossibile analizzare il documento {0}"}, - - { ER_COULDNT_FIND_FRAGMENT, - "Impossibile trovare il frammento {0}"}, - - { ER_NODE_NOT_ELEMENT, - "Il nodo a cui punta l''identificativo di frammento non \u00E8 un elemento: {0}"}, - - { ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB, - "for-each deve avere un attributo match o name"}, - - { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB, - "templates deve avere un attributo match o name"}, - - { ER_NO_CLONE_OF_DOCUMENT_FRAG, - "Nessun duplicato di un frammento di documento."}, - - { ER_CANT_CREATE_ITEM, - "Impossibile creare una voce nella struttura dei risultati: {0}"}, - - { ER_XMLSPACE_ILLEGAL_VALUE, - "xml:space nell''XML di origine ha un valore non valido {0}"}, - - { ER_NO_XSLKEY_DECLARATION, - "Nessuna dichiarazione xsl:key per {0}."}, - - { ER_CANT_CREATE_URL, - "Errore. Impossibile creare l''URL per {0}"}, - - { ER_XSLFUNCTIONS_UNSUPPORTED, - "xsl:functions non supportato"}, - - { ER_PROCESSOR_ERROR, - "Errore di TransformerFactory XSLT"}, - - { ER_NOT_ALLOWED_INSIDE_STYLESHEET, - "(StylesheetHandler) {0} non consentito in un foglio di stile."}, - - { ER_RESULTNS_NOT_SUPPORTED, - "result-ns non pi\u00F9 supportato. Utilizzare xsl:output."}, - - { ER_DEFAULTSPACE_NOT_SUPPORTED, - "default-space non pi\u00F9 supportato. Utilizzare xsl:strip-space o xsl:preserve-space."}, - - { ER_INDENTRESULT_NOT_SUPPORTED, - "indent-result non pi\u00F9 supportato. Utilizzare xsl:output."}, - - { ER_ILLEGAL_ATTRIB, - "(StylesheetHandler) {0} ha un attributo non valido: {1}"}, - - { ER_UNKNOWN_XSL_ELEM, - "Elemento XSL sconosciuto: {0}"}, - - { ER_BAD_XSLSORT_USE, - "(StylesheetHandler) xsl:sort pu\u00F2 essere utilizzato solo con xsl:apply-templates o xsl:for-each."}, - - { ER_MISPLACED_XSLWHEN, - "(StylesheetHandler) posizione errata di xsl:when."}, - - { ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:when non associato da xsl:choose."}, - - { ER_MISPLACED_XSLOTHERWISE, - "(StylesheetHandler) posizione errata di xsl:otherwise."}, - - { ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:otherwise non associato da xsl:choose."}, - - { ER_NOT_ALLOWED_INSIDE_TEMPLATE, - "(StylesheetHandler) {0} non consentito in un modello."}, - - { ER_UNKNOWN_EXT_NS_PREFIX, - "(StylesheetHandler) {0} prefisso spazio di nomi estensione {1} sconosciuto"}, - - { ER_IMPORTS_AS_FIRST_ELEM, - "(StylesheetHandler) Le importazioni possono essere eseguite solo come primi elementi nel foglio di stile."}, - - { ER_IMPORTING_ITSELF, - "(StylesheetHandler) {0} importa s\u00E9 stesso direttamente o indirettamente."}, - - { ER_XMLSPACE_ILLEGAL_VAL, - "(StylesheetHandler) xml:space ha un valore non valido {0}"}, - - { ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL, - "processStylesheet non riuscito."}, - - { ER_SAX_EXCEPTION, - "Eccezione SAX"}, - -// add this message to fix bug 21478 - { ER_FUNCTION_NOT_SUPPORTED, - "Funzione non supportata."}, - - { ER_XSLT_ERROR, - "Errore XSLT"}, - - { ER_CURRENCY_SIGN_ILLEGAL, - "il simbolo della valuta non \u00E8 consentito in una stringa di pattern di formato"}, - - { ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM, - "Funzione del documento non supportata nel DOM del foglio di stile."}, - - { ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER, - "Impossibile risolvere il prefisso di un resolver senza prefissi."}, - - { ER_REDIRECT_COULDNT_GET_FILENAME, - "Estensione di reindirizzamento: impossibile trovare il nome file. L'attributo file o select deve restituire una stringa valida."}, - - { ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT, - "Impossibile creare FormatterListener nell'estensione di reindirizzamento."}, - - { ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX, - "Il prefisso in exclude-result-prefixes non \u00E8 valido: {0}"}, - - { ER_MISSING_NS_URI, - "URI dello spazio di nomi mancante per il prefisso specificato"}, - - { ER_MISSING_ARG_FOR_OPTION, - "Argomento mancante per l''opzione: {0}"}, - - { ER_INVALID_OPTION, - "Opzione non valida: {0}"}, - - { ER_MALFORMED_FORMAT_STRING, - "Stringa con formato errato: {0}"}, - - { ER_STYLESHEET_REQUIRES_VERSION_ATTRIB, - "xsl:stylesheet richiede un attributo 'version'."}, - - { ER_ILLEGAL_ATTRIBUTE_VALUE, - "L''attributo {0} ha un valore non valido {1}"}, - - { ER_CHOOSE_REQUIRES_WHEN, - "xsl:choose richiede xsl:when"}, - - { ER_NO_APPLY_IMPORT_IN_FOR_EACH, - "xsl:apply-imports non consentito in xsl:for-each"}, - - { ER_CANT_USE_DTM_FOR_OUTPUT, - "Impossibile utilizzare DTMLiaison per un nodo DOM di output... Passare com.sun.org.apache.xpath.internal.DOM2Helper."}, - - { ER_CANT_USE_DTM_FOR_INPUT, - "Impossibile utilizzare DTMLiaison per un nodo DOM di input... Passare com.sun.org.apache.xpath.internal.DOM2Helper."}, - - { ER_CALL_TO_EXT_FAILED, - "Chiamata all''elemento di estensione non riuscita: {0}"}, - - { ER_PREFIX_MUST_RESOLVE, - "Il prefisso deve essere risolto in uno spazio di nomi: {0}"}, - - { ER_INVALID_UTF16_SURROGATE, - "Rilevato surrogato UTF-16 non valido: {0}?"}, - - { ER_XSLATTRSET_USED_ITSELF, - "xsl:attribute-set {0} utilizza s\u00E9 stesso, il che pu\u00F2 causare un loop infinito."}, - - { ER_CANNOT_MIX_XERCESDOM, - "Impossibile unire input non Xerces-DOM con output Xerces-DOM."}, - - { ER_TOO_MANY_LISTENERS, - "addTraceListenersToStylesheet - TooManyListenersException"}, - - { ER_IN_ELEMTEMPLATEELEM_READOBJECT, - "In ElemTemplateElement.readObject: {0}"}, - - { ER_DUPLICATE_NAMED_TEMPLATE, - "Sono stati trovati pi\u00F9 modelli denominati {0}"}, - - { ER_INVALID_KEY_CALL, - "Chiamata di funzione non valida: non sono consentite chiamate recursive key()"}, - - { ER_REFERENCING_ITSELF, - "La variabile {0} fa riferimento a s\u00E9 stessa direttamente o indirettamente."}, - - { ER_ILLEGAL_DOMSOURCE_INPUT, - "Il nodo di input non pu\u00F2 essere nullo per un DOMSource per newTemplates."}, - - { ER_CLASS_NOT_FOUND_FOR_OPTION, - "File di classe non trovato per l''opzione {0}"}, - - { ER_REQUIRED_ELEM_NOT_FOUND, - "Elemento richiesto non trovato: {0}"}, - - { ER_INPUT_CANNOT_BE_NULL, - "InputStream non pu\u00F2 essere nullo"}, - - { ER_URI_CANNOT_BE_NULL, - "L'URI non pu\u00F2 essere nullo"}, - - { ER_FILE_CANNOT_BE_NULL, - "Il file non pu\u00F2 essere nullo"}, - - { ER_SOURCE_CANNOT_BE_NULL, - "InputSource non pu\u00F2 essere nullo"}, - - { ER_CANNOT_INIT_BSFMGR, - "Impossibile inizializzare BSF Manager"}, - - { ER_CANNOT_CMPL_EXTENSN, - "Impossibile compilare l'estensione"}, - - { ER_CANNOT_CREATE_EXTENSN, - "Impossibile creare l''estensione {0}. Motivo: {1}"}, - - { ER_INSTANCE_MTHD_CALL_REQUIRES, - "La chiamata del metodo di istanza {0} richiede un''istanza di oggetto come primo argomento"}, - - { ER_INVALID_ELEMENT_NAME, - "Specificato nome elemento {0} non valido"}, - - { ER_ELEMENT_NAME_METHOD_STATIC, - "Il metodo di nome elemento deve essere statico {0}"}, - - { ER_EXTENSION_FUNC_UNKNOWN, - "Funzione di estensione {0} : {1} sconosciuta"}, - - { ER_MORE_MATCH_CONSTRUCTOR, - "Esistono pi\u00F9 corrispondenze migliori per il costruttore di {0}"}, - - { ER_MORE_MATCH_METHOD, - "Esistono pi\u00F9 corrispondenze migliori per il metodo {0}"}, - - { ER_MORE_MATCH_ELEMENT, - "Esistono pi\u00F9 corrispondenze migliori per il metodo di elemento {0}"}, - - { ER_INVALID_CONTEXT_PASSED, - "Passato contesto non valido per valutare {0}"}, - - { ER_POOL_EXISTS, - "Il pool esiste gi\u00E0"}, - - { ER_NO_DRIVER_NAME, - "Nessun nome driver specificato"}, - - { ER_NO_URL, - "Nessun URL specificato"}, - - { ER_POOL_SIZE_LESSTHAN_ONE, - "La dimensione del pool \u00E8 minore di uno."}, - - { ER_INVALID_DRIVER, - "Specificato nome driver non valido."}, - - { ER_NO_STYLESHEETROOT, - "Radice del foglio di stile non trovata."}, - - { ER_ILLEGAL_XMLSPACE_VALUE, - "Valore non valido per xml:space"}, - - { ER_PROCESSFROMNODE_FAILED, - "processFromNode non riuscito"}, - - { ER_RESOURCE_COULD_NOT_LOAD, - "Impossibile caricare la risorsa [ {0} ]: {1} \n {2} \t {3}"}, - - { ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Dimensione buffer <=0"}, - - { ER_UNKNOWN_ERROR_CALLING_EXTENSION, - "Errore sconosciuto durante la chiamata dell'estensione"}, - - { ER_NO_NAMESPACE_DECL, - "Il prefisso {0} non ha una dichiarazione di spazio di nomi corrispondente"}, - - { ER_ELEM_CONTENT_NOT_ALLOWED, - "Contenuto di elemento non consentito per lang=javaclass {0}"}, - - { ER_STYLESHEET_DIRECTED_TERMINATION, - "Il foglio di stile ha causato l'interruzione"}, - - { ER_ONE_OR_TWO, - "1 o 2"}, - - { ER_TWO_OR_THREE, - "2 o 3"}, - - { ER_COULD_NOT_LOAD_RESOURCE, - "Impossibile caricare {0} (verificare CLASSPATH); verranno utilizzati i valori predefiniti"}, - - { ER_CANNOT_INIT_DEFAULT_TEMPLATES, - "Impossibile inizializzare i modelli predefiniti"}, - - { ER_RESULT_NULL, - "Il risultato non deve essere nullo"}, - - { ER_RESULT_COULD_NOT_BE_SET, - "Impossibile impostare il risultato"}, - - { ER_NO_OUTPUT_SPECIFIED, - "Nessun output specificato"}, - - { ER_CANNOT_TRANSFORM_TO_RESULT_TYPE, - "Impossibile eseguire la trasformazione in un risultato di tipo {0}"}, - - { ER_CANNOT_TRANSFORM_SOURCE_TYPE, - "Impossibile eseguire la trasformazione in un''origine di tipo {0}"}, - - { ER_NULL_CONTENT_HANDLER, - "Handler dei contenuti nullo"}, - - { ER_NULL_ERROR_HANDLER, - "Handler degli errori nullo"}, - - { ER_CANNOT_CALL_PARSE, - "impossibile richiamare parse se non \u00E8 stato impostato ContentHandler"}, - - { ER_NO_PARENT_FOR_FILTER, - "Nessun elemento padre per il filtro"}, - - { ER_NO_STYLESHEET_IN_MEDIA, - "Nessun foglio di stile trovato in {0}, media= {1}."}, - - { ER_NO_STYLESHEET_PI, - "Nessun PI xml-stylesheet trovato in {0}"}, - - { ER_NOT_SUPPORTED, - "Non supportato: {0}"}, - - { ER_PROPERTY_VALUE_BOOLEAN, - "Il valore della propriet\u00E0 {0} deve essere un''istanza booleana"}, - - { ER_COULD_NOT_FIND_EXTERN_SCRIPT, - "Impossibile recuperare lo script esterno in {0}"}, - - { ER_RESOURCE_COULD_NOT_FIND, - "Risorsa [ {0} ] non trovata.\n {1}"}, - - { ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, - "Propriet\u00E0 di output non riconosciuta: {0}"}, - - { ER_FAILED_CREATING_ELEMLITRSLT, - "Creazione dell'istanza ElemLiteralResult non riuscita"}, - - //Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE - // In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care - //in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc. - //NOTE: Not only the key name but message has also been changed. - { ER_VALUE_SHOULD_BE_NUMBER, - "Il valore per {0} deve contenere un numero analizzabile"}, - - { ER_VALUE_SHOULD_EQUAL, - "Il valore per {0} deve corrispondere a yes o no"}, - - { ER_FAILED_CALLING_METHOD, - "Richiamo del metodo {0} non riuscito"}, - - { ER_FAILED_CREATING_ELEMTMPL, - "Creazione dell'istanza ElemTemplateElement non riuscita"}, - - { ER_CHARS_NOT_ALLOWED, - "Non sono consentiti caratteri in questo punto del documento"}, - - { ER_ATTR_NOT_ALLOWED, - "L''attributo \"{0}\" non \u00E8 consentito nell''elemento {1}."}, - - { ER_BAD_VALUE, - "{0} valore non valido {1} "}, - - { ER_ATTRIB_VALUE_NOT_FOUND, - "{0} valore di attributo non trovato "}, - - { ER_ATTRIB_VALUE_NOT_RECOGNIZED, - "{0} valore di attributo non riconosciuto "}, - - { ER_NULL_URI_NAMESPACE, - "Tentativo di generare un prefisso spazio di nomi con URI nullo"}, - - { ER_NUMBER_TOO_BIG, - "Tentativo di formattare un numero superiore a quello del numero intero di tipo Long pi\u00F9 grande"}, - - { ER_CANNOT_FIND_SAX1_DRIVER, - "Impossibile trovare la classe di driver SAX1 {0}"}, - - { ER_SAX1_DRIVER_NOT_LOADED, - "La classe di driver SAX1 {0} \u00E8 stata trovata, ma non pu\u00F2 essere caricata."}, - - { ER_SAX1_DRIVER_NOT_INSTANTIATED, - "La classe di driver SAX1 {0} \u00E8 stata caricata, ma non \u00E8 possibile creare un''istanza."}, - - { ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER, - "La classe di driver SAX1 {0} non implementa org.xml.sax.Parser"}, - - { ER_PARSER_PROPERTY_NOT_SPECIFIED, - "Propriet\u00E0 di sistema org.xml.sax.parser non specificata"}, - - { ER_PARSER_ARG_CANNOT_BE_NULL, - "L'argomento del parser non deve essere nullo"}, - - { ER_FEATURE, - "Funzione: {0}"}, - - { ER_PROPERTY, - "Propriet\u00E0: {0}"}, - - { ER_NULL_ENTITY_RESOLVER, - "Resolver di entit\u00E0 nullo"}, - - { ER_NULL_DTD_HANDLER, - "Handler DTD nullo"}, - - { ER_NO_DRIVER_NAME_SPECIFIED, - "Nessun nome driver specificato."}, - - { ER_NO_URL_SPECIFIED, - "Nessun URL specificato."}, - - { ER_POOLSIZE_LESS_THAN_ONE, - "La dimensione del pool \u00E8 minore di uno."}, - - { ER_INVALID_DRIVER_NAME, - "Specificato nome driver non valido."}, - - { ER_ERRORLISTENER, - "ErrorListener"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The name -// 'ElemTemplateElement' is the name of a class, and should not be -// translated. - { ER_ASSERT_NO_TEMPLATE_PARENT, - "Errore del programmatore. L'espressione non ha un elemento padre ElemTemplateElement."}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The substitution text -// provides further information in order to diagnose the problem. The name -// 'RedundentExprEliminator' is the name of a class, and should not be -// translated. - { ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR, - "Asserzione del programmatore in RedundentExprEliminator: {0}"}, - - { ER_NOT_ALLOWED_IN_POSITION, - "{0} non consentito in questa posizione nel figlio di stile."}, - - { ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION, - "Testo senza spazi non consentito in questa posizione nel figlio di stile."}, - - // This code is shared with warning codes. - // SystemId Unknown - { INVALID_TCHAR, - "Valore non valido {1} utilizzato per l''attributo CHAR {0}. Un attributo di tipo CHAR deve avere un solo carattere."}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "QNAME" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value and {0} is the attribute name. - //The following codes are shared with the warning codes... - { INVALID_QNAME, - "Valore non valido {1} utilizzato per l''attributo QNAME {0}"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "ENUM" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value, {0} is the attribute name, and {2} is a list of valid - // values. - { INVALID_ENUM, - "Valore non valido {1} utilizzato per l''attributo ENUM {0}. Valori validi: {2}."}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NMTOKEN" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NMTOKEN, - "Valore non valido {1} utilizzato per l''attributo NMTOKEN {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NCNAME" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NCNAME, - "Valore non valido {1} utilizzato per l''attributo NCNAME {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "boolean" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_BOOLEAN, - "Valore non valido {1} utilizzato per l''attributo booleano {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "number" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NUMBER, - "Valore non valido {1} utilizzato per l''attributo numerico {0} "}, - - - // End of shared codes... - -// Note to translators: A "match pattern" is a special form of XPath expression -// that is used for matching patterns. The substitution text is the name of -// a function. The message indicates that when this function is referenced in -// a match pattern, its argument must be a string literal (or constant.) -// ER_ARG_LITERAL - new error message for bugzilla //5202 - { ER_ARG_LITERAL, - "L''argomento per {0} nel pattern di corrispondenza deve essere un valore."}, - -// Note to translators: The following message indicates that two definitions of -// a variable. A "global variable" is a variable that is accessible everywher -// in the stylesheet. -// ER_DUPLICATE_GLOBAL_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_GLOBAL_VAR, - "Dichiarazione di variabili globali duplicate."}, - - -// Note to translators: The following message indicates that two definitions of -// a variable were encountered. -// ER_DUPLICATE_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_VAR, - "Dichiarazione di variabili duplicate."}, - - // Note to translators: "xsl:template, "name" and "match" are XSLT keywords - // which must not be translated. - // ER_TEMPLATE_NAME_MATCH - new error message for bugzilla #789 - { ER_TEMPLATE_NAME_MATCH, - "xsl:template deve avere un attributo name o match o entrambi"}, - - // Note to translators: "exclude-result-prefixes" is an XSLT keyword which - // should not be translated. The message indicates that a namespace prefix - // encountered as part of the value of the exclude-result-prefixes attribute - // was in error. - // ER_INVALID_PREFIX - new error message for bugzilla #788 - { ER_INVALID_PREFIX, - "Il prefisso in exclude-result-prefixes non \u00E8 valido: {0}"}, - - // Note to translators: An "attribute set" is a set of attributes that can - // be added to an element in the output document as a group. The message - // indicates that there was a reference to an attribute set named {0} that - // was never defined. - // ER_NO_ATTRIB_SET - new error message for bugzilla #782 - { ER_NO_ATTRIB_SET, - "il set di attributi denominato {0} non esiste"}, - - // Note to translators: This message indicates that there was a reference - // to a function named {0} for which no function definition could be found. - { ER_FUNCTION_NOT_FOUND, - "La funzione denominata {0} non esiste"}, - - // Note to translators: This message indicates that the XSLT instruction - // that is named by the substitution text {0} must not contain other XSLT - // instructions (content) or a "select" attribute. The word "select" is - // an XSLT keyword in this case and must not be translated. - { ER_CANT_HAVE_CONTENT_AND_SELECT, - "L''elemento {0} non deve avere entrambi gli attributi content e select."}, - - // Note to translators: This message indicates that the value argument - // of setParameter must be a valid Java Object. - { ER_INVALID_SET_PARAM_VALUE, - "Il valore del parametro {0} deve essere un oggetto Java valido"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT, - "L'attributo result-prefix di un elemento xsl:namespace-alias ha il valore '#default', ma non esiste alcuna dichiarazione dello spazio di nomi predefinito nell'ambito per l'elemento."}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX, - "L''attributo result-prefix di un elemento xsl:namespace-alias ha il valore ''{0}'', ma non esiste alcuna dichiarazione dello spazio di nomi per il prefisso ''{0}'' nell''ambito per l''elemento."}, - - { ER_SET_FEATURE_NULL_NAME, - "Il nome funzione non pu\u00F2 essere nullo in TransformerFactory.setFeature (nome stringa, valore booleano)."}, - - { ER_GET_FEATURE_NULL_NAME, - "Il nome funzione non pu\u00F2 essere nullo in TransformerFactory.getFeature (nome stringa)."}, - - { ER_UNSUPPORTED_FEATURE, - "Impossibile impostare la funzione ''{0}'' in questo TransformerFactory."}, - - { ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING, - "Non \u00E8 consentito utilizzare l''elemento di estensione ''{0}'' se la funzione di elaborazione sicura \u00E8 impostata su true."}, - - { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE, - "Impossibile recuperare il prefisso per un URI di spazio di nomi nullo."}, - - { ER_NAMESPACE_CONTEXT_NULL_PREFIX, - "Impossibile recuperare l'URI di spazio di nomi per un prefisso nullo."}, - - { ER_XPATH_RESOLVER_NULL_QNAME, - "Il nome funzione non pu\u00F2 essere nullo."}, - - { ER_XPATH_RESOLVER_NEGATIVE_ARITY, - "L'arity non pu\u00F2 essere negativa."}, - // Warnings... - - { WG_FOUND_CURLYBRACE, - "Trovato '}', ma non esistono modelli di attributo aperti."}, - - { WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR, - "Avvertenza: l''attributo count non corrisponde a un predecessore in xsl:number. Destinazione = {0}"}, - - { WG_EXPR_ATTRIB_CHANGED_TO_SELECT, - "Sintassi obsoleta: il nome dell'attributo 'expr' \u00E8 stato cambiato in 'select'."}, - - { WG_NO_LOCALE_IN_FORMATNUMBER, - "Xalan non gestisce ancora il nome di impostazioni nazionali nella funzione format-number."}, - - { WG_LOCALE_NOT_FOUND, - "Avvertenza: impossibile trovare le impostazioni nazionali per xml:lang={0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "Impossibile creare un URL da {0}"}, - - { WG_CANNOT_LOAD_REQUESTED_DOC, - "Impossibile caricare il documento richiesto: {0}"}, - - { WG_CANNOT_FIND_COLLATOR, - "Impossibile trovare Collator per >>>>>> Versione Xalan "}, - { "version2", "<<<<<<<"}, - { "yes", "s\u00EC"}, - { "line", "N. riga"}, - { "column","N. colonna"}, - { "xsldone", "XSLProcessor: operazione completata"}, - - - // Note to translators: The following messages provide usage information - // for the Xalan Process command line. "Process" is the name of a Java class, - // and should not be translated. - { "xslProc_option", "Opzioni classe di processo per riga di comando Xalan-J:"}, - { "xslProc_option", "Opzioni classe di processo per riga di comando Xalan-J:"}, - { "xslProc_invalid_xsltc_option", "Opzione {0} non supportata in modalit\u00E0 XSLTC."}, - { "xslProc_invalid_xalan_option", "L''opzione {0} pu\u00F2 essere utilizzata solo con -XSLTC."}, - { "xslProc_no_input", "Errore: non \u00E8 stato specificato alcun foglio di stile o XML di input. Eseguire questo comando senza opzioni per visualizzare le istruzioni sull'uso."}, - { "xslProc_common_options", "-Opzioni comuni-"}, - { "xslProc_xalan_options", "-Opzioni per Xalan-"}, - { "xslProc_xsltc_options", "-Opzioni per XSLTC-"}, - { "xslProc_return_to_continue", "(premere per continuare)"}, - - // Note to translators: The option name and the parameter name do not need to - // be translated. Only translate the messages in parentheses. Note also that - // leading whitespace in the messages is used to indent the usage information - // for each option in the English messages. - // Do not translate the keywords: XSLTC, SAX, DOM and DTM. - { "optionXSLTC", " [-XSLTC (usa XSLTC per la trasformazione)]"}, - { "optionIN", " [-IN inputXMLURL]"}, - { "optionXSL", " [-XSL XSLTransformationURL]"}, - { "optionOUT", " [-OUT outputFileName]"}, - { "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"}, - { "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"}, - { "optionPARSER", " [-PARSER nome classe completamente qualificato per la relazione del parser]"}, - { "optionE", " [-E (non espande i riferimenti alle entit\u00E0)]"}, - { "optionV", " [-E (non espande i riferimenti alle entit\u00E0)]"}, - { "optionQC", " [-QC (avvertenze silenziose per i conflitti di pattern)]"}, - { "optionQ", " [-Q (modalit\u00E0 silenziosa)]"}, - { "optionLF", " [-LF (usa avanzamenti riga solo nell'output {il valore predefinito \u00E8 CR/LF})]"}, - { "optionCR", " [-CR (usa ritorni a capo solo nell'output {il valore predefinito \u00E8 CR/LF})]"}, - { "optionESCAPE", " [-ESCAPE (caratteri da sottoporre a escape {il valore predefinito \u00E8 <>&\"'\\r\\n}]"}, - { "optionINDENT", " [-INDENT (determina il numero di spazi da indentare {il valore predefinito \u00E8 0})]"}, - { "optionTT", " [-TT (tiene traccia dei modelli mentre vengono richiamati.)]"}, - { "optionTG", " [-TG (tiene traccia di ogni evento di generazione.)]"}, - { "optionTS", " [-TS (tiene traccia di ogni evento di selezione.)]"}, - { "optionTTC", " [-TTC (tiene traccia degli elementi secondari di modello mentre vengono elaborati.)]"}, - { "optionTCLASS", " [-TCLASS (classe TraceListener per tenere traccia delle estensioni.)]"}, - { "optionVALIDATE", " [-VALIDATE (imposta se viene eseguita la convalida che, per impostazione predefinita, \u00E8 disattivata.)]"}, - { "optionEDUMP", " [-EDUMP {nome file facoltativo} (esegue stackdump in caso di errore.)]"}, - { "optionXML", " [-XML (usa il formatter XML e aggiunge l'intestazione XML.)]"}, - { "optionTEXT", " [-TEXT (usa il formatter di testo semplice.)]"}, - { "optionHTML", " [-HTML (usa il formatter HTML.)]"}, - { "optionPARAM", " [-PARAM espressione nome (imposta un parametro di foglio di stile)]"}, - { "noParsermsg1", "Processo XSL non riuscito."}, - { "noParsermsg2", "** Impossibile trovare il parser **"}, - { "noParsermsg3", "Controllare il classpath."}, - { "noParsermsg4", "Se non \u00E8 disponibile un parser XML di IBM per Java, \u00E8 possibile scaricarlo da"}, - { "noParsermsg5", "AlphaWorks di IBM: http://www.alphaworks.ibm.com/formula/xml"}, - { "optionURIRESOLVER", " [-URIRESOLVER nome classe completo (URIResolver da utilizzare per risolvere gli URI)]"}, - { "optionENTITYRESOLVER", " [-ENTITYRESOLVER nome classe completo (EntityResolver da utilizzare per risolvere le entit\u00E0)]"}, - { "optionCONTENTHANDLER", " [-CONTENTHANDLER nome classe completo (ContentHandler da utilizzare per serializzare l'output)]"}, - { "optionLINENUMBERS", " [-L utilizza i numeri di riga per il documento di origine]"}, - { "optionSECUREPROCESSING", " [-SECURE (imposta la funzione di elaborazione sicura su true.)]"}, - - // Following are the new options added in XSLTErrorResources.properties files after Jdk 1.4 (Xalan 2.2-D11) - - - { "optionMEDIA", " [-MEDIA mediaType (utilizza l'attributo media per trovare il foglio di stile associato a un documento.)]"}, - { "optionFLAVOR", " [-FLAVOR flavorName (utilizza esplicitamente s2s=SAX o d2d=DOM per eseguire la trasformazione.)] "}, // Added by sboag/scurcuru; experimental - { "optionDIAG", " [-DIAG (visualizza i millisecondi totali richiesti per la trasformazione.)]"}, - { "optionINCREMENTAL", " [-INCREMENTAL (richiede la creazione incrementale di DTM impostando http://xml.apache.org/xalan/features/incremental su true.)]"}, - { "optionNOOPTIMIMIZE", " [-NOOPTIMIMIZE (richiede che non venga elaborata l'ottimizzazione dei fogli di stile impostando http://xml.apache.org/xalan/features/optimize su false.)]"}, - { "optionRL", " [-RL recursionlimit (stabilisce un limite numerico sulla profondit\u00E0 ricorsiva dei fogli di stile.)]"}, - { "optionXO", " [-XO [transletName] (assegna un nome al translet creato)]"}, - { "optionXD", " [-XD destinationDirectory (specifica una directory di destinazione per il translet)]"}, - { "optionXJ", " [-XJ jarfile (crea un package di classi di translet in un file jar denominato )]"}, - { "optionXP", " [-XP package (specifica un prefisso nome package per tutte le classi di translet generate)]"}, - - //AddITIONAL STRINGS that need L10n - // Note to translators: The following message describes usage of a particular - // command-line option that is used to enable the "template inlining" - // optimization. The optimization involves making a copy of the code - // generated for a template in another template that refers to it. - { "optionXN", " [-XN (abilita l'inserimento in linea dei modelli)]" }, - { "optionXX", " [-XX (attiva l'output di altri messaggi di debug)]"}, - { "optionXT" , " [-XT (utilizza il translet per eseguire la trasformazione, se possibile.)]"}, - { "diagTiming"," --------- La trasformazione di {0} mediante {1} ha richiesto {2} ms" }, - { "recursionTooDeep","Nidificazione dei modelli troppo profonda. Nidificazione = {0}, modello {1} {2}." }, - { "nameIs", "il nome \u00E8" }, - { "matchPatternIs", "il pattern di corrispondenza \u00E8" } - - }; - - } - // ================= INFRASTRUCTURE ====================== - - /** String for use when a bad error code was encountered. */ - public static final String BAD_CODE = "BAD_CODE"; - - /** String for use when formatting of the error string failed. */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java deleted file mode 100644 index 14ef27e087f..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java +++ /dev/null @@ -1,1425 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And - * you need to enter key , value pair as part of contents - * Array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XSLTErrorResources_ko extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /* - * Static variables - */ - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX = - "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX"; - - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT = - "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT"; - - public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE"; - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE"; - public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS"; - public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD"; - public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES"; - public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB"; - public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND"; - public static final String ER_CANT_RESOLVE_NAME_AVT = "ER_CANT_RESOLVE_NAME_AVT"; - public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB"; - public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB"; - public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB = - "ER_BAD_VAL_ON_LEVEL_ATTRIB"; - public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB"; - public static final String ER_NEED_NAME_OR_MATCH_ATTRIB = - "ER_NEED_NAME_OR_MATCH_ATTRIB"; - public static final String ER_CANT_RESOLVE_NSPREFIX = - "ER_CANT_RESOLVE_NSPREFIX"; - public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE"; - public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC"; - public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR"; - public static final String ER_NULL_CHILD = "ER_NULL_CHILD"; - public static final String ER_NEED_SELECT_ATTRIB = "ER_NEED_SELECT_ATTRIB"; - public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB"; - public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB"; - public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC"; - public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON = - "ER_COULD_NOT_CREATE_XML_PROC_LIAISON"; - public static final String ER_PROCESS_NOT_SUCCESSFUL = - "ER_PROCESS_NOT_SUCCESSFUL"; - public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL"; - public static final String ER_ENCODING_NOT_SUPPORTED = - "ER_ENCODING_NOT_SUPPORTED"; - public static final String ER_COULD_NOT_CREATE_TRACELISTENER = - "ER_COULD_NOT_CREATE_TRACELISTENER"; - public static final String ER_KEY_REQUIRES_NAME_ATTRIB = - "ER_KEY_REQUIRES_NAME_ATTRIB"; - public static final String ER_KEY_REQUIRES_MATCH_ATTRIB = - "ER_KEY_REQUIRES_MATCH_ATTRIB"; - public static final String ER_KEY_REQUIRES_USE_ATTRIB = - "ER_KEY_REQUIRES_USE_ATTRIB"; - public static final String ER_REQUIRES_ELEMENTS_ATTRIB = - "ER_REQUIRES_ELEMENTS_ATTRIB"; - public static final String ER_MISSING_PREFIX_ATTRIB = - "ER_MISSING_PREFIX_ATTRIB"; - public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL"; - public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND"; - public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION"; - public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB"; - public static final String ER_STYLESHEET_INCLUDES_ITSELF = - "ER_STYLESHEET_INCLUDES_ITSELF"; - public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR"; - public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB"; - public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT = - "ER_MISSING_CONTAINER_ELEMENT_COMPONENT"; - public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT = - "ER_CAN_ONLY_OUTPUT_TO_ELEMENT"; - public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR"; - public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR"; - public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION"; - public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR = - "ER_CANNOT_SERIALIZE_XSLPROCESSOR"; - public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET"; - public static final String ER_FAILED_PROCESS_STYLESHEET = - "ER_FAILED_PROCESS_STYLESHEET"; - public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC"; - public static final String ER_COULDNT_FIND_FRAGMENT = - "ER_COULDNT_FIND_FRAGMENT"; - public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT"; - public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB = - "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB = - "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG = - "ER_NO_CLONE_OF_DOCUMENT_FRAG"; - public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM"; - public static final String ER_XMLSPACE_ILLEGAL_VALUE = - "ER_XMLSPACE_ILLEGAL_VALUE"; - public static final String ER_NO_XSLKEY_DECLARATION = - "ER_NO_XSLKEY_DECLARATION"; - public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL"; - public static final String ER_XSLFUNCTIONS_UNSUPPORTED = - "ER_XSLFUNCTIONS_UNSUPPORTED"; - public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR"; - public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET = - "ER_NOT_ALLOWED_INSIDE_STYLESHEET"; - public static final String ER_RESULTNS_NOT_SUPPORTED = - "ER_RESULTNS_NOT_SUPPORTED"; - public static final String ER_DEFAULTSPACE_NOT_SUPPORTED = - "ER_DEFAULTSPACE_NOT_SUPPORTED"; - public static final String ER_INDENTRESULT_NOT_SUPPORTED = - "ER_INDENTRESULT_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB"; - public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM"; - public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE"; - public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN"; - public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_MISPLACED_XSLOTHERWISE = - "ER_MISPLACED_XSLOTHERWISE"; - public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE = - "ER_NOT_ALLOWED_INSIDE_TEMPLATE"; - public static final String ER_UNKNOWN_EXT_NS_PREFIX = - "ER_UNKNOWN_EXT_NS_PREFIX"; - public static final String ER_IMPORTS_AS_FIRST_ELEM = - "ER_IMPORTS_AS_FIRST_ELEM"; - public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF"; - public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL"; - public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL = - "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL"; - public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION"; - public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR"; - public static final String ER_CURRENCY_SIGN_ILLEGAL= - "ER_CURRENCY_SIGN_ILLEGAL"; - public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM = - "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM"; - public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER = - "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER"; - public static final String ER_REDIRECT_COULDNT_GET_FILENAME = - "ER_REDIRECT_COULDNT_GET_FILENAME"; - public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT = - "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT"; - public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX = - "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX"; - public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI"; - public static final String ER_MISSING_ARG_FOR_OPTION = - "ER_MISSING_ARG_FOR_OPTION"; - public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION"; - public static final String ER_MALFORMED_FORMAT_STRING = - "ER_MALFORMED_FORMAT_STRING"; - public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String ER_ILLEGAL_ATTRIBUTE_VALUE = - "ER_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN"; - public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH = - "ER_NO_APPLY_IMPORT_IN_FOR_EACH"; - public static final String ER_CANT_USE_DTM_FOR_OUTPUT = - "ER_CANT_USE_DTM_FOR_OUTPUT"; - public static final String ER_CANT_USE_DTM_FOR_INPUT = - "ER_CANT_USE_DTM_FOR_INPUT"; - public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_XSLATTRSET_USED_ITSELF = - "ER_XSLATTRSET_USED_ITSELF"; - public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM"; - public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS"; - public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT = - "ER_IN_ELEMTEMPLATEELEM_READOBJECT"; - public static final String ER_DUPLICATE_NAMED_TEMPLATE = - "ER_DUPLICATE_NAMED_TEMPLATE"; - public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL"; - public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF"; - public static final String ER_ILLEGAL_DOMSOURCE_INPUT = - "ER_ILLEGAL_DOMSOURCE_INPUT"; - public static final String ER_CLASS_NOT_FOUND_FOR_OPTION = - "ER_CLASS_NOT_FOUND_FOR_OPTION"; - public static final String ER_REQUIRED_ELEM_NOT_FOUND = - "ER_REQUIRED_ELEM_NOT_FOUND"; - public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL"; - public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL"; - public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL"; - public static final String ER_SOURCE_CANNOT_BE_NULL = - "ER_SOURCE_CANNOT_BE_NULL"; - public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR"; - public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN"; - public static final String ER_CANNOT_CREATE_EXTENSN = - "ER_CANNOT_CREATE_EXTENSN"; - public static final String ER_INSTANCE_MTHD_CALL_REQUIRES = - "ER_INSTANCE_MTHD_CALL_REQUIRES"; - public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME"; - public static final String ER_ELEMENT_NAME_METHOD_STATIC = - "ER_ELEMENT_NAME_METHOD_STATIC"; - public static final String ER_EXTENSION_FUNC_UNKNOWN = - "ER_EXTENSION_FUNC_UNKNOWN"; - public static final String ER_MORE_MATCH_CONSTRUCTOR = - "ER_MORE_MATCH_CONSTRUCTOR"; - public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD"; - public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT"; - public static final String ER_INVALID_CONTEXT_PASSED = - "ER_INVALID_CONTEXT_PASSED"; - public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS"; - public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME"; - public static final String ER_NO_URL = "ER_NO_URL"; - public static final String ER_POOL_SIZE_LESSTHAN_ONE = - "ER_POOL_SIZE_LESSTHAN_ONE"; - public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER"; - public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT"; - public static final String ER_ILLEGAL_XMLSPACE_VALUE = - "ER_ILLEGAL_XMLSPACE_VALUE"; - public static final String ER_PROCESSFROMNODE_FAILED = - "ER_PROCESSFROMNODE_FAILED"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = - "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = - "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION = - "ER_UNKNOWN_ERROR_CALLING_EXTENSION"; - public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL"; - public static final String ER_ELEM_CONTENT_NOT_ALLOWED = - "ER_ELEM_CONTENT_NOT_ALLOWED"; - public static final String ER_STYLESHEET_DIRECTED_TERMINATION = - "ER_STYLESHEET_DIRECTED_TERMINATION"; - public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO"; - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = - "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES = - "ER_CANNOT_INIT_DEFAULT_TEMPLATES"; - public static final String ER_RESULT_NULL = "ER_RESULT_NULL"; - public static final String ER_RESULT_COULD_NOT_BE_SET = - "ER_RESULT_COULD_NOT_BE_SET"; - public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED"; - public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE = - "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE"; - public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE = - "ER_CANNOT_TRANSFORM_SOURCE_TYPE"; - public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER"; - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE"; - public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER"; - public static final String ER_NO_STYLESHEET_IN_MEDIA = - "ER_NO_STYLESHEET_IN_MEDIA"; - public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_PROPERTY_VALUE_BOOLEAN = - "ER_PROPERTY_VALUE_BOOLEAN"; - public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT = - "ER_COULD_NOT_FIND_EXTERN_SCRIPT"; - public static final String ER_RESOURCE_COULD_NOT_FIND = - "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED = - "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED"; - public static final String ER_FAILED_CREATING_ELEMLITRSLT = - "ER_FAILED_CREATING_ELEMLITRSLT"; - public static final String ER_VALUE_SHOULD_BE_NUMBER = - "ER_VALUE_SHOULD_BE_NUMBER"; - public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL"; - public static final String ER_FAILED_CALLING_METHOD = - "ER_FAILED_CALLING_METHOD"; - public static final String ER_FAILED_CREATING_ELEMTMPL = - "ER_FAILED_CREATING_ELEMTMPL"; - public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED"; - public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED"; - public static final String ER_BAD_VALUE = "ER_BAD_VALUE"; - public static final String ER_ATTRIB_VALUE_NOT_FOUND = - "ER_ATTRIB_VALUE_NOT_FOUND"; - public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED = - "ER_ATTRIB_VALUE_NOT_RECOGNIZED"; - public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE"; - public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG"; - public static final String ER_CANNOT_FIND_SAX1_DRIVER = - "ER_CANNOT_FIND_SAX1_DRIVER"; - public static final String ER_SAX1_DRIVER_NOT_LOADED = - "ER_SAX1_DRIVER_NOT_LOADED"; - public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED = - "ER_SAX1_DRIVER_NOT_INSTANTIATED" ; - public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER = - "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER"; - public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED = - "ER_PARSER_PROPERTY_NOT_SPECIFIED"; - public static final String ER_PARSER_ARG_CANNOT_BE_NULL = - "ER_PARSER_ARG_CANNOT_BE_NULL" ; - public static final String ER_FEATURE = "ER_FEATURE"; - public static final String ER_PROPERTY = "ER_PROPERTY" ; - public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER"; - public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ; - public static final String ER_NO_DRIVER_NAME_SPECIFIED = - "ER_NO_DRIVER_NAME_SPECIFIED"; - public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED"; - public static final String ER_POOLSIZE_LESS_THAN_ONE = - "ER_POOLSIZE_LESS_THAN_ONE"; - public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME"; - public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER"; - public static final String ER_ASSERT_NO_TEMPLATE_PARENT = - "ER_ASSERT_NO_TEMPLATE_PARENT"; - public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR = - "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR"; - public static final String ER_NOT_ALLOWED_IN_POSITION = - "ER_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION = - "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE = - "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE"; - public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX = - "ER_NAMESPACE_CONTEXT_NULL_PREFIX"; - public static final String ER_XPATH_RESOLVER_NULL_QNAME = - "ER_XPATH_RESOLVER_NULL_QNAME"; - public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY = - "ER_XPATH_RESOLVER_NEGATIVE_ARITY"; - public static final String INVALID_TCHAR = "INVALID_TCHAR"; - public static final String INVALID_QNAME = "INVALID_QNAME"; - public static final String INVALID_ENUM = "INVALID_ENUM"; - public static final String INVALID_NMTOKEN = "INVALID_NMTOKEN"; - public static final String INVALID_NCNAME = "INVALID_NCNAME"; - public static final String INVALID_BOOLEAN = "INVALID_BOOLEAN"; - public static final String INVALID_NUMBER = "INVALID_NUMBER"; - public static final String ER_ARG_LITERAL = "ER_ARG_LITERAL"; - public static final String ER_DUPLICATE_GLOBAL_VAR ="ER_DUPLICATE_GLOBAL_VAR"; - public static final String ER_DUPLICATE_VAR = "ER_DUPLICATE_VAR"; - public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH"; - public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX"; - public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET"; - public static final String ER_FUNCTION_NOT_FOUND = - "ER_FUNCTION_NOT_FOUND"; - public static final String ER_CANT_HAVE_CONTENT_AND_SELECT = - "ER_CANT_HAVE_CONTENT_AND_SELECT"; - public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE"; - public static final String ER_SET_FEATURE_NULL_NAME = - "ER_SET_FEATURE_NULL_NAME"; - public static final String ER_GET_FEATURE_NULL_NAME = - "ER_GET_FEATURE_NULL_NAME"; - public static final String ER_UNSUPPORTED_FEATURE = - "ER_UNSUPPORTED_FEATURE"; - public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING = - "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING"; - - public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE"; - public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR = - "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR"; - public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT = - "WG_EXPR_ATTRIB_CHANGED_TO_SELECT"; - public static final String WG_NO_LOCALE_IN_FORMATNUMBER = - "WG_NO_LOCALE_IN_FORMATNUMBER"; - public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_CANNOT_LOAD_REQUESTED_DOC = - "WG_CANNOT_LOAD_REQUESTED_DOC"; - public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR"; - public static final String WG_FUNCTIONS_SHOULD_USE_URL = - "WG_FUNCTIONS_SHOULD_USE_URL"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 = - "WG_ENCODING_NOT_SUPPORTED_USING_UTF8"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA = - "WG_ENCODING_NOT_SUPPORTED_USING_JAVA"; - public static final String WG_SPECIFICITY_CONFLICTS = - "WG_SPECIFICITY_CONFLICTS"; - public static final String WG_PARSING_AND_PREPARING = - "WG_PARSING_AND_PREPARING"; - public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE"; - public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP"; - public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED"; - public static final String WG_NO_DECIMALFORMAT_DECLARATION = - "WG_NO_DECIMALFORMAT_DECLARATION"; - public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS"; - public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED = - "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED"; - public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE = - "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE"; - public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE"; - public static final String WG_COULD_NOT_RESOLVE_PREFIX = - "WG_COULD_NOT_RESOLVE_PREFIX"; - public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String WG_ILLEGAL_ATTRIBUTE_NAME = - "WG_ILLEGAL_ATTRIBUTE_NAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_VALUE = - "WG_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG"; - public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_POSITION = - "WG_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String NO_MODIFICATION_ALLOWED_ERR = - "NO_MODIFICATION_ALLOWED_ERR"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_NO_CURLYBRACE, - "\uC624\uB958: \uD45C\uD604\uC2DD\uC5D0\uB294 '{'\uAC00 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_ILLEGAL_ATTRIBUTE , - "{0}\uC5D0 \uC798\uBABB\uB41C \uC18D\uC131\uC774 \uC788\uC74C: {1}"}, - - {ER_NULL_SOURCENODE_APPLYIMPORTS , - "xsl:apply-imports\uC758 sourceNode\uAC00 \uB110\uC785\uB2C8\uB2E4!"}, - - {ER_CANNOT_ADD, - "{1}\uC5D0 {0}\uC744(\uB97C) \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES, - "handleApplyTemplatesInstruction\uC758 sourceNode\uAC00 \uB110\uC785\uB2C8\uB2E4!"}, - - { ER_NO_NAME_ATTRIB, - "{0}\uC5D0\uB294 name \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - {ER_TEMPLATE_NOT_FOUND, - "\uBA85\uBA85\uB41C \uD15C\uD50C\uB9AC\uD2B8\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}"}, - - {ER_CANT_RESOLVE_NAME_AVT, - "xsl:call-template\uC5D0\uC11C \uC774\uB984 AVT\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - {ER_REQUIRES_ATTRIB, - "{0}\uC5D0 \uC18D\uC131\uC774 \uD544\uC694\uD568: {1}"}, - - { ER_MUST_HAVE_TEST_ATTRIB, - "{0}\uC5D0\uB294 ''test'' \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - {ER_BAD_VAL_ON_LEVEL_ATTRIB, - "level \uC18D\uC131\uC5D0 \uC798\uBABB\uB41C \uAC12\uC774 \uC788\uC74C: {0}"}, - - {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML, - "processing-instruction \uC774\uB984\uC740 'xml'\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, - "processing-instruction \uC774\uB984\uC740 \uC801\uD569\uD55C NCName\uC774\uC5B4\uC57C \uD568: {0}"}, - - { ER_NEED_MATCH_ATTRIB, - "{0}\uC5D0 \uBAA8\uB4DC\uAC00 \uC788\uC744 \uACBD\uC6B0 match \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_NEED_NAME_OR_MATCH_ATTRIB, - "{0}\uC5D0\uB294 name \uB610\uB294 match \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."}, - - {ER_CANT_RESOLVE_NSPREFIX, - "\uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_ILLEGAL_VALUE, - "xml:space\uC5D0 \uC798\uBABB\uB41C \uAC12\uC774 \uC788\uC74C: {0}"}, - - { ER_NO_OWNERDOC, - "\uD558\uC704 \uB178\uB4DC\uC5D0 \uC18C\uC720\uC790 \uBB38\uC11C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_ELEMTEMPLATEELEM_ERR, - "ElemTemplateElement \uC624\uB958: {0}"}, - - { ER_NULL_CHILD, - "\uB110 \uD558\uC704\uB97C \uCD94\uAC00\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911\uC785\uB2C8\uB2E4!"}, - - { ER_NEED_SELECT_ATTRIB, - "{0}\uC5D0\uB294 select \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."}, - - { ER_NEED_TEST_ATTRIB , - "xsl:when\uC5D0\uB294 'test' \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_NEED_NAME_ATTRIB, - "xsl:with-param\uC5D0\uB294 'name' \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_NO_CONTEXT_OWNERDOC, - "\uCEE8\uD14D\uC2A4\uD2B8\uC5D0 \uC18C\uC720\uC790 \uBB38\uC11C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - {ER_COULD_NOT_CREATE_XML_PROC_LIAISON, - "XML TransformerFactory \uC5F0\uACB0\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0}"}, - - {ER_PROCESS_NOT_SUCCESSFUL, - "Xalan: \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_NOT_SUCCESSFUL, - "Xalan: \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_ENCODING_NOT_SUPPORTED, - "\uC778\uCF54\uB529\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C: {0}"}, - - {ER_COULD_NOT_CREATE_TRACELISTENER, - "TraceListener\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0}"}, - - {ER_KEY_REQUIRES_NAME_ATTRIB, - "xsl:key\uC5D0\uB294 'name' \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4!"}, - - { ER_KEY_REQUIRES_MATCH_ATTRIB, - "xsl:key\uC5D0\uB294 'match' \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4!"}, - - { ER_KEY_REQUIRES_USE_ATTRIB, - "xsl:key\uC5D0\uB294 'use' \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4!"}, - - { ER_REQUIRES_ELEMENTS_ATTRIB, - "(StylesheetHandler) {0}\uC5D0\uB294 ''elements'' \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4!"}, - - { ER_MISSING_PREFIX_ATTRIB, - "(StylesheetHandler) {0} \uC18D\uC131 ''prefix''\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - { ER_BAD_STYLESHEET_URL, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 URL\uC774 \uC798\uBABB\uB428: {0}"}, - - { ER_FILE_NOT_FOUND, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_IOEXCEPTION, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uD30C\uC77C\uC5D0 IO \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {0}"}, - - { ER_NO_HREF_ATTRIB, - "(StylesheetHandler) {0}\uC5D0 \uB300\uD55C href \uC18D\uC131\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_STYLESHEET_INCLUDES_ITSELF, - "(StylesheetHandler) {0}\uC5D0 \uC9C1\uC811 \uB610\uB294 \uAC04\uC811\uC801\uC73C\uB85C \uC790\uC2E0\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4!"}, - - { ER_PROCESSINCLUDE_ERROR, - "StylesheetHandler.processInclude \uC624\uB958, {0}"}, - - { ER_MISSING_LANG_ATTRIB, - "(StylesheetHandler) {0} \uC18D\uC131 ''lang''\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - { ER_MISSING_CONTAINER_ELEMENT_COMPONENT, - "(StylesheetHandler) {0} \uC694\uC18C\uC758 \uC704\uCE58\uAC00 \uC798\uBABB\uB41C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. \uCEE8\uD14C\uC774\uB108 \uC694\uC18C ''component''\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - { ER_CAN_ONLY_OUTPUT_TO_ELEMENT, - "Element, DocumentFragment, Document \uB610\uB294 PrintWriter\uC5D0\uB9CC \uCD9C\uB825\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_PROCESS_ERROR, - "StylesheetRoot.process \uC624\uB958"}, - - { ER_UNIMPLNODE_ERROR, - "UnImplNode \uC624\uB958: {0}"}, - - { ER_NO_SELECT_EXPRESSION, - "\uC624\uB958: xpath select \uD45C\uD604\uC2DD(-select)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_CANNOT_SERIALIZE_XSLPROCESSOR, - "XSLProcessor\uB97C \uC9C1\uB82C\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_NO_INPUT_STYLESHEET, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uC785\uB825\uAC12\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4!"}, - - { ER_FAILED_PROCESS_STYLESHEET, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uCC98\uB9AC\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4!"}, - - { ER_COULDNT_PARSE_DOC, - "{0} \uBB38\uC11C\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_COULDNT_FIND_FRAGMENT, - "\uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_NODE_NOT_ELEMENT, - "\uBD80\uBD84 \uC2DD\uBCC4\uC790\uAC00 \uAC00\uB9AC\uD0A8 \uB178\uB4DC\uB294 \uC694\uC18C\uAC00 \uC544\uB2D8: {0}"}, - - { ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB, - "for-each\uC5D0\uB294 match \uB610\uB294 name \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB, - "templates\uC5D0\uB294 match \uB610\uB294 name \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_NO_CLONE_OF_DOCUMENT_FRAG, - "\uBB38\uC11C \uBD80\uBD84\uC758 \uBCF5\uC81C\uBCF8\uC774 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_CANT_CREATE_ITEM, - "\uACB0\uACFC \uD2B8\uB9AC\uC5D0 \uD56D\uBAA9\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_XMLSPACE_ILLEGAL_VALUE, - "\uC18C\uC2A4 XML\uC758 xml:space\uC5D0 \uC798\uBABB\uB41C \uAC12\uC774 \uC788\uC74C: {0}"}, - - { ER_NO_XSLKEY_DECLARATION, - "{0}\uC5D0 \uB300\uD55C xsl:key \uC120\uC5B8\uC774 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_CANT_CREATE_URL, - "\uC624\uB958: {0}\uC5D0 \uB300\uD55C URL\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_XSLFUNCTIONS_UNSUPPORTED, - "xsl:functions\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_PROCESSOR_ERROR, - "XSLT TransformerFactory \uC624\uB958"}, - - { ER_NOT_ALLOWED_INSIDE_STYLESHEET, - "(StylesheetHandler) \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC5D0\uC11C\uB294 {0}\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - { ER_RESULTNS_NOT_SUPPORTED, - "result-ns\uB294 \uB354 \uC774\uC0C1 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4! \uB300\uC2E0 xsl:output\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."}, - - { ER_DEFAULTSPACE_NOT_SUPPORTED, - "default-space\uB294 \uB354 \uC774\uC0C1 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4! \uB300\uC2E0 xsl:strip-space \uB610\uB294 xsl:preserve-space\uB97C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."}, - - { ER_INDENTRESULT_NOT_SUPPORTED, - "indent-result\uB294 \uB354 \uC774\uC0C1 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4! \uB300\uC2E0 xsl:output\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."}, - - { ER_ILLEGAL_ATTRIB, - "(StylesheetHandler) {0}\uC5D0 \uC798\uBABB\uB41C \uC18D\uC131\uC774 \uC788\uC74C: {1}"}, - - { ER_UNKNOWN_XSL_ELEM, - "\uC54C \uC218 \uC5C6\uB294 XSL \uC694\uC18C: {0}"}, - - { ER_BAD_XSLSORT_USE, - "(StylesheetHandler) xsl:sort\uB294 xsl:apply-templates \uB610\uB294 xsl:for-each\uC640 \uD568\uAED8\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_MISPLACED_XSLWHEN, - "(StylesheetHandler) xsl:when\uC758 \uC704\uCE58\uAC00 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4!"}, - - { ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:when\uC774 xsl:choose\uC5D0 \uC758\uD574 \uC0C1\uC704\uB85C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4!"}, - - { ER_MISPLACED_XSLOTHERWISE, - "(StylesheetHandler) xsl:otherwise\uC758 \uC704\uCE58\uAC00 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4!"}, - - { ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:otherwise\uAC00 xsl:choose\uC5D0 \uC758\uD574 \uC0C1\uC704\uB85C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4!"}, - - { ER_NOT_ALLOWED_INSIDE_TEMPLATE, - "(StylesheetHandler) \uD15C\uD50C\uB9AC\uD2B8\uC5D0\uC11C\uB294 {0}\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - { ER_UNKNOWN_EXT_NS_PREFIX, - "(StylesheetHandler) {0} \uD655\uC7A5 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4 {1}\uC744(\uB97C) \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_IMPORTS_AS_FIRST_ELEM, - "(StylesheetHandler) \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC758 \uCCAB\uBC88\uC9F8 \uC694\uC18C\uB85C\uB9CC \uC784\uD3EC\uD2B8\uB97C \uC218\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4!"}, - - { ER_IMPORTING_ITSELF, - "(StylesheetHandler) {0}\uC774(\uAC00) \uC9C1\uC811 \uB610\uB294 \uAC04\uC811\uC801\uC73C\uB85C \uC790\uC2E0\uC744 \uC784\uD3EC\uD2B8\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4!"}, - - { ER_XMLSPACE_ILLEGAL_VAL, - "(StylesheetHandler) xml:space\uC5D0 \uC798\uBABB\uB41C \uAC12\uC774 \uC788\uC74C: {0}"}, - - { ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL, - "processStylesheet\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4!"}, - - { ER_SAX_EXCEPTION, - "SAX \uC608\uC678\uC0AC\uD56D"}, - -// add this message to fix bug 21478 - { ER_FUNCTION_NOT_SUPPORTED, - "\uD568\uC218\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - { ER_XSLT_ERROR, - "XSLT \uC624\uB958"}, - - { ER_CURRENCY_SIGN_ILLEGAL, - "\uD615\uC2DD \uD328\uD134 \uBB38\uC790\uC5F4\uC5D0\uC11C\uB294 \uD1B5\uD654 \uAE30\uD638\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM, - "Document \uD568\uC218\uB294 \uC2A4\uD0C0\uC77C\uC2DC\uD2B8 DOM\uC5D0\uC11C \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - { ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER, - "\uBE44\uC811\uB450\uC5B4 \uBD84\uC11D\uAE30\uC758 \uC811\uB450\uC5B4\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_REDIRECT_COULDNT_GET_FILENAME, - "\uC7AC\uC9C0\uC815 \uD655\uC7A5: \uD30C\uC77C \uC774\uB984\uC744 \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. file \uB610\uB294 select \uC18D\uC131\uC740 \uC801\uD569\uD55C \uBB38\uC790\uC5F4\uC744 \uBC18\uD658\uD574\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT, - "\uC7AC\uC9C0\uC815 \uD655\uC7A5\uC5D0 FormatterListener\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX, - "exclude-result-prefixes\uC758 \uC811\uB450\uC5B4\uAC00 \uBD80\uC801\uD569\uD568: {0}"}, - - { ER_MISSING_NS_URI, - "\uC9C0\uC815\uB41C \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - { ER_MISSING_ARG_FOR_OPTION, - "\uC635\uC158\uC5D0 \uB300\uD55C \uC778\uC218\uAC00 \uB204\uB77D\uB428: {0}"}, - - { ER_INVALID_OPTION, - "\uBD80\uC801\uD569\uD55C \uC635\uC158: {0}"}, - - { ER_MALFORMED_FORMAT_STRING, - "\uC798\uBABB\uB41C \uD615\uC2DD \uBB38\uC790\uC5F4: {0}"}, - - { ER_STYLESHEET_REQUIRES_VERSION_ATTRIB, - "xsl:stylesheet\uC5D0\uB294 'version' \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4!"}, - - { ER_ILLEGAL_ATTRIBUTE_VALUE, - "{0} \uC18D\uC131\uC5D0 \uC798\uBABB\uB41C \uAC12\uC774 \uC788\uC74C: {1}"}, - - { ER_CHOOSE_REQUIRES_WHEN, - "xsl:choose\uC5D0\uB294 xsl:when\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."}, - - { ER_NO_APPLY_IMPORT_IN_FOR_EACH, - "xsl:for-each\uC5D0\uC11C\uB294 xsl:apply-imports\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_CANT_USE_DTM_FOR_OUTPUT, - "\uCD9C\uB825 DOM \uB178\uB4DC\uC5D0 DTMLiaison\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 com.sun.org.apache.xpath.internal.DOM2Helper\uB97C \uC804\uB2EC\uD558\uC2ED\uC2DC\uC624!"}, - - { ER_CANT_USE_DTM_FOR_INPUT, - "\uC785\uB825 DOM \uB178\uB4DC\uC5D0 DTMLiaison\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 com.sun.org.apache.xpath.internal.DOM2Helper\uB97C \uC804\uB2EC\uD558\uC2ED\uC2DC\uC624!"}, - - { ER_CALL_TO_EXT_FAILED, - "\uD655\uC7A5 \uC694\uC18C\uC5D0 \uB300\uD55C \uD638\uCD9C \uC2E4\uD328: {0}"}, - - { ER_PREFIX_MUST_RESOLVE, - "\uC811\uB450\uC5B4\uB294 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB85C \uBD84\uC11D\uB418\uC5B4\uC57C \uD568: {0}"}, - - { ER_INVALID_UTF16_SURROGATE, - "\uBD80\uC801\uD569\uD55C UTF-16 \uB300\uB9AC \uC694\uC18C\uAC00 \uAC10\uC9C0\uB428: {0}"}, - - { ER_XSLATTRSET_USED_ITSELF, - "xsl:attribute-set {0}\uC774(\uAC00) \uC790\uC2E0\uC744 \uC0AC\uC6A9\uD588\uC2B5\uB2C8\uB2E4. \uC774 \uACBD\uC6B0 \uBB34\uD55C \uB8E8\uD504\uAC00 \uBC1C\uC0DD\uD569\uB2C8\uB2E4."}, - - { ER_CANNOT_MIX_XERCESDOM, - "\uBE44Xerces-DOM \uC785\uB825\uACFC Xerces-DOM \uCD9C\uB825\uC744 \uD568\uAED8 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_TOO_MANY_LISTENERS, - "addTraceListenersToStylesheet - TooManyListenersException"}, - - { ER_IN_ELEMTEMPLATEELEM_READOBJECT, - "ElemTemplateElement.readObject\uC5D0 \uC624\uB958 \uBC1C\uC0DD: {0}"}, - - { ER_DUPLICATE_NAMED_TEMPLATE, - "\uBA85\uBA85\uB41C \uD15C\uD50C\uB9AC\uD2B8\uB97C \uB450 \uAC1C \uC774\uC0C1 \uCC3E\uC74C: {0}"}, - - { ER_INVALID_KEY_CALL, - "\uBD80\uC801\uD569\uD55C \uD568\uC218 \uD638\uCD9C: recursive key() \uD638\uCD9C\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_REFERENCING_ITSELF, - "{0} \uBCC0\uC218\uAC00 \uC9C1\uC811 \uB610\uB294 \uAC04\uC811\uC801\uC73C\uB85C \uC790\uC2E0\uC744 \uCC38\uC870\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4!"}, - - { ER_ILLEGAL_DOMSOURCE_INPUT, - "newTemplates\uC758 DOMSource\uC5D0 \uB300\uD55C \uC785\uB825 \uB178\uB4DC\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_CLASS_NOT_FOUND_FOR_OPTION, - "{0} \uC635\uC158\uC5D0 \uB300\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_REQUIRED_ELEM_NOT_FOUND, - "\uD544\uC218 \uC694\uC18C\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_INPUT_CANNOT_BE_NULL, - "InputStream\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_URI_CANNOT_BE_NULL, - "URI\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_FILE_CANNOT_BE_NULL, - "\uD30C\uC77C\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_SOURCE_CANNOT_BE_NULL, - "InputSource\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_CANNOT_INIT_BSFMGR, - "BSF \uAD00\uB9AC\uC790\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_CANNOT_CMPL_EXTENSN, - "\uD655\uC7A5\uC744 \uCEF4\uD30C\uC77C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_CANNOT_CREATE_EXTENSN, - "{0} \uD655\uC7A5\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uB294 \uC6D0\uC778: {1}"}, - - { ER_INSTANCE_MTHD_CALL_REQUIRES, - "{0} \uBA54\uC18C\uB4DC\uC5D0 \uB300\uD55C \uC778\uC2A4\uD134\uC2A4 \uBA54\uC18C\uB4DC\uC5D0\uB294 \uAC1D\uCCB4 \uC778\uC2A4\uD134\uC2A4\uAC00 \uCCAB\uBC88\uC9F8 \uC778\uC218\uB85C \uD544\uC694\uD569\uB2C8\uB2E4."}, - - { ER_INVALID_ELEMENT_NAME, - "\uBD80\uC801\uD569\uD55C \uC694\uC18C \uC774\uB984\uC774 \uC9C0\uC815\uB428: {0}"}, - - { ER_ELEMENT_NAME_METHOD_STATIC, - "\uC694\uC18C \uC774\uB984 \uBA54\uC18C\uB4DC\uB294 \uC815\uC801 {0}\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_EXTENSION_FUNC_UNKNOWN, - "\uD655\uC7A5 \uD568\uC218 {0}: {1}\uC744(\uB97C) \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_MORE_MATCH_CONSTRUCTOR, - "{0}\uC5D0 \uB300\uD55C \uC0DD\uC131\uC790\uC640 \uAC00\uC7A5 \uC798 \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_MORE_MATCH_METHOD, - "{0} \uBA54\uC18C\uB4DC\uC640 \uAC00\uC7A5 \uC798 \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_MORE_MATCH_ELEMENT, - "\uC694\uC18C \uBA54\uC18C\uB4DC {0}\uACFC(\uC640) \uAC00\uC7A5 \uC798 \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_INVALID_CONTEXT_PASSED, - "{0} \uD3C9\uAC00\uB97C \uC704\uD574 \uBD80\uC801\uD569\uD55C \uCEE8\uD14D\uC2A4\uD2B8\uAC00 \uC804\uB2EC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - { ER_POOL_EXISTS, - "\uD480\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4."}, - - { ER_NO_DRIVER_NAME, - "\uC9C0\uC815\uB41C \uB4DC\uB77C\uC774\uBC84 \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NO_URL, - "\uC9C0\uC815\uB41C URL\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_POOL_SIZE_LESSTHAN_ONE, - "\uD480 \uD06C\uAE30\uAC00 1\uBCF4\uB2E4 \uC791\uC2B5\uB2C8\uB2E4!"}, - - { ER_INVALID_DRIVER, - "\uBD80\uC801\uD569\uD55C \uB4DC\uB77C\uC774\uBC84 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4!"}, - - { ER_NO_STYLESHEETROOT, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uB8E8\uD2B8\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_ILLEGAL_XMLSPACE_VALUE, - "xml:space\uC5D0 \uB300\uD55C \uAC12\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - { ER_PROCESSFROMNODE_FAILED, - "processFromNode\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_RESOURCE_COULD_NOT_LOAD, - "[{0}] \uB9AC\uC18C\uC2A4\uAC00 \uB2E4\uC74C\uC744 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC74C: {1} \n {2} \t {3}"}, - - { ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\uBC84\uD37C \uD06C\uAE30 <=0"}, - - { ER_UNKNOWN_ERROR_CALLING_EXTENSION, - "\uD655\uC7A5\uC744 \uD638\uCD9C\uD558\uB294 \uC911 \uC54C \uC218 \uC5C6\uB294 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_NO_NAMESPACE_DECL, - "{0} \uC811\uB450\uC5B4\uC5D0 \uD574\uB2F9\uD558\uB294 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC120\uC5B8\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_ELEM_CONTENT_NOT_ALLOWED, - "lang=javaclass {0}\uC5D0 \uB300\uD574\uC11C\uB294 \uC694\uC18C \uCF58\uD150\uCE20\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_STYLESHEET_DIRECTED_TERMINATION, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uAC00 \uC885\uB8CC\uB97C \uC9C0\uC815\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_ONE_OR_TWO, - "1 \uB610\uB294 2"}, - - { ER_TWO_OR_THREE, - "2 \uB610\uB294 3"}, - - { ER_COULD_NOT_LOAD_RESOURCE, - "{0}\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. CLASSPATH\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \uD604\uC7AC \uAE30\uBCF8\uAC12\uB9CC \uC0AC\uC6A9\uD558\uB294 \uC911\uC785\uB2C8\uB2E4."}, - - { ER_CANNOT_INIT_DEFAULT_TEMPLATES, - "\uAE30\uBCF8 \uD15C\uD50C\uB9AC\uD2B8\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_RESULT_NULL, - "\uACB0\uACFC\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_RESULT_COULD_NOT_BE_SET, - "\uACB0\uACFC\uB97C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NO_OUTPUT_SPECIFIED, - "\uC9C0\uC815\uB41C \uCD9C\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_CANNOT_TRANSFORM_TO_RESULT_TYPE, - "{0} \uC720\uD615\uC758 \uACB0\uACFC\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_CANNOT_TRANSFORM_SOURCE_TYPE, - "{0} \uC720\uD615\uC758 \uC18C\uC2A4\uB97C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NULL_CONTENT_HANDLER, - "\uB110 \uCF58\uD150\uCE20 \uCC98\uB9AC\uAE30"}, - - { ER_NULL_ERROR_HANDLER, - "\uB110 \uC624\uB958 \uCC98\uB9AC\uAE30"}, - - { ER_CANNOT_CALL_PARSE, - "ContentHandler\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC740 \uACBD\uC6B0 parse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NO_PARENT_FOR_FILTER, - "\uD544\uD130\uC5D0 \uB300\uD55C \uC0C1\uC704\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NO_STYLESHEET_IN_MEDIA, - "{0}\uC5D0\uC11C \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9E4\uCCB4 = {1}"}, - - { ER_NO_STYLESHEET_PI, - "{0}\uC5D0\uC11C xml-stylesheet PI\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NOT_SUPPORTED, - "\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C: {0}"}, - - { ER_PROPERTY_VALUE_BOOLEAN, - "{0} \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC740 \uBD80\uC6B8 \uC778\uC2A4\uD134\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_COULD_NOT_FIND_EXTERN_SCRIPT, - "{0}\uC5D0 \uC788\uB294 \uC678\uBD80 \uC2A4\uD06C\uB9BD\uD2B8\uB85C \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_RESOURCE_COULD_NOT_FIND, - "[{0}] \uB9AC\uC18C\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n {1}"}, - - { ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, - "\uCD9C\uB825 \uC18D\uC131\uC744 \uC778\uC2DD\uD560 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_FAILED_CREATING_ELEMLITRSLT, - "ElemLiteralResult \uC778\uC2A4\uD134\uC2A4 \uC0DD\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - - //Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE - // In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care - //in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc. - //NOTE: Not only the key name but message has also been changed. - { ER_VALUE_SHOULD_BE_NUMBER, - "{0}\uC5D0 \uB300\uD55C \uAC12\uC5D0\uB294 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC788\uB294 \uC22B\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_VALUE_SHOULD_EQUAL, - "{0}\uC5D0 \uB300\uD55C \uAC12\uC740 yes \uB610\uB294 no\uC5EC\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_FAILED_CALLING_METHOD, - "{0} \uBA54\uC18C\uB4DC \uD638\uCD9C\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_FAILED_CREATING_ELEMTMPL, - "ElemTemplateElement \uC778\uC2A4\uD134\uC2A4 \uC0DD\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_CHARS_NOT_ALLOWED, - "\uBB38\uC11C\uC758 \uC774 \uC9C0\uC810\uC5D0\uC11C\uB294 \uBB38\uC790\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_ATTR_NOT_ALLOWED, - "{1} \uC694\uC18C\uC5D0\uC11C\uB294 \"{0}\" \uC18D\uC131\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - { ER_BAD_VALUE, - "{0}: \uC798\uBABB\uB41C \uAC12 {1} "}, - - { ER_ATTRIB_VALUE_NOT_FOUND, - "{0} \uC18D\uC131\uAC12\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "}, - - { ER_ATTRIB_VALUE_NOT_RECOGNIZED, - "{0} \uC18D\uC131\uAC12\uC744 \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "}, - - { ER_NULL_URI_NAMESPACE, - "\uB110 URI\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4\uB97C \uC0DD\uC131\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911"}, - - { ER_NUMBER_TOO_BIG, - "\uAC00\uC7A5 \uD070 Long \uC815\uC218\uBCF4\uB2E4 \uD070 \uC22B\uC790\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911"}, - - { ER_CANNOT_FIND_SAX1_DRIVER, - "SAX1 \uB4DC\uB77C\uC774\uBC84 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_SAX1_DRIVER_NOT_LOADED, - "SAX1 \uB4DC\uB77C\uC774\uBC84 \uD074\uB798\uC2A4 {0}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC9C0\uB9CC \uD574\uB2F9 \uD074\uB798\uC2A4\uB97C \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_SAX1_DRIVER_NOT_INSTANTIATED, - "SAX1 \uB4DC\uB77C\uC774\uBC84 \uD074\uB798\uC2A4 {0}\uC774(\uAC00) \uB85C\uB4DC\uB418\uC5C8\uC9C0\uB9CC \uD574\uB2F9 \uD074\uB798\uC2A4\uB97C \uC778\uC2A4\uD134\uC2A4\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER, - "SAX1 \uB4DC\uB77C\uC774\uBC84 \uD074\uB798\uC2A4 {0}\uC774(\uAC00) org.xml.sax.Parser\uB97C \uAD6C\uD604\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - { ER_PARSER_PROPERTY_NOT_SPECIFIED, - "\uC2DC\uC2A4\uD15C \uC18D\uC131 org.xml.sax.parser\uAC00 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - { ER_PARSER_ARG_CANNOT_BE_NULL, - "\uAD6C\uBB38 \uBD84\uC11D\uAE30 \uC778\uC218\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_FEATURE, - "\uAE30\uB2A5: {0}"}, - - { ER_PROPERTY, - "\uC18D\uC131: {0}"}, - - { ER_NULL_ENTITY_RESOLVER, - "\uB110 \uC5D4\uD2F0\uD2F0 \uBD84\uC11D\uAE30"}, - - { ER_NULL_DTD_HANDLER, - "\uB110 DTD \uCC98\uB9AC\uAE30"}, - - { ER_NO_DRIVER_NAME_SPECIFIED, - "\uC9C0\uC815\uB41C \uB4DC\uB77C\uC774\uBC84 \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_NO_URL_SPECIFIED, - "\uC9C0\uC815\uB41C URL\uC774 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_POOLSIZE_LESS_THAN_ONE, - "\uD480 \uD06C\uAE30\uAC00 1 \uBBF8\uB9CC\uC785\uB2C8\uB2E4!"}, - - { ER_INVALID_DRIVER_NAME, - "\uBD80\uC801\uD569\uD55C \uB4DC\uB77C\uC774\uBC84 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4!"}, - - { ER_ERRORLISTENER, - "ErrorListener"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The name -// 'ElemTemplateElement' is the name of a class, and should not be -// translated. - { ER_ASSERT_NO_TEMPLATE_PARENT, - "\uD504\uB85C\uADF8\uB798\uBA38 \uC624\uB958\uC785\uB2C8\uB2E4! \uD45C\uD604\uC2DD\uC5D0 ElemTemplateElement \uC0C1\uC704\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The substitution text -// provides further information in order to diagnose the problem. The name -// 'RedundentExprEliminator' is the name of a class, and should not be -// translated. - { ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR, - "RedundentExprEliminator\uC5D0 \uD504\uB85C\uADF8\uB798\uBA38 \uAC80\uC99D\uC774 \uC788\uC74C: {0}"}, - - { ER_NOT_ALLOWED_IN_POSITION, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC758 \uC774 \uC704\uCE58\uC5D0\uB294 {0}\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - { ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC758 \uC774 \uC704\uCE58\uC5D0\uB294 \uACF5\uBC31\uC774 \uC544\uB2CC \uD14D\uC2A4\uD2B8\uB294 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - // This code is shared with warning codes. - // SystemId Unknown - { INVALID_TCHAR, - "\uC798\uBABB\uB41C \uAC12: {1}\uC774(\uAC00) CHAR \uC18D\uC131\uC5D0 \uC0AC\uC6A9\uB428: {0}. CHAR \uC720\uD615\uC758 \uC18D\uC131\uC740 1\uC790\uC5EC\uC57C \uD569\uB2C8\uB2E4!"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "QNAME" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value and {0} is the attribute name. - //The following codes are shared with the warning codes... - { INVALID_QNAME, - "\uC798\uBABB\uB41C \uAC12: {1}\uC774(\uAC00) QNAME \uC18D\uC131\uC5D0 \uC0AC\uC6A9\uB428: {0}"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "ENUM" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value, {0} is the attribute name, and {2} is a list of valid - // values. - { INVALID_ENUM, - "\uC798\uBABB\uB41C \uAC12: {1}\uC774(\uAC00) ENUM \uC18D\uC131\uC5D0 \uC0AC\uC6A9\uB428: {0}. \uC801\uD569\uD55C \uAC12: {2}."}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NMTOKEN" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NMTOKEN, - "\uC798\uBABB\uB41C \uAC12: {1}\uC774(\uAC00) NMTOKEN \uC18D\uC131\uC5D0 \uC0AC\uC6A9\uB428: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NCNAME" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NCNAME, - "\uC798\uBABB\uB41C \uAC12: {1}\uC774(\uAC00) NCNAME \uC18D\uC131\uC5D0 \uC0AC\uC6A9\uB428: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "boolean" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_BOOLEAN, - "\uC798\uBABB\uB41C \uAC12: {1}\uC774(\uAC00) boolean \uC18D\uC131\uC5D0 \uC0AC\uC6A9\uB428: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "number" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NUMBER, - "\uC798\uBABB\uB41C \uAC12: {1}\uC774(\uAC00) number \uC18D\uC131\uC5D0 \uC0AC\uC6A9\uB428: {0} "}, - - - // End of shared codes... - -// Note to translators: A "match pattern" is a special form of XPath expression -// that is used for matching patterns. The substitution text is the name of -// a function. The message indicates that when this function is referenced in -// a match pattern, its argument must be a string literal (or constant.) -// ER_ARG_LITERAL - new error message for bugzilla //5202 - { ER_ARG_LITERAL, - "\uC77C\uCE58 \uD328\uD134\uC758 {0}\uC5D0 \uB300\uD55C \uC778\uC218\uB294 \uB9AC\uD130\uB7F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - -// Note to translators: The following message indicates that two definitions of -// a variable. A "global variable" is a variable that is accessible everywher -// in the stylesheet. -// ER_DUPLICATE_GLOBAL_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_GLOBAL_VAR, - "\uC804\uC5ED \uBCC0\uC218 \uC120\uC5B8\uC774 \uC911\uBCF5\uB429\uB2C8\uB2E4."}, - - -// Note to translators: The following message indicates that two definitions of -// a variable were encountered. -// ER_DUPLICATE_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_VAR, - "\uBCC0\uC218 \uC120\uC5B8\uC774 \uC911\uBCF5\uB429\uB2C8\uB2E4."}, - - // Note to translators: "xsl:template, "name" and "match" are XSLT keywords - // which must not be translated. - // ER_TEMPLATE_NAME_MATCH - new error message for bugzilla #789 - { ER_TEMPLATE_NAME_MATCH, - "xsl:template\uC5D0\uB294 name \uB610\uB294 match \uC18D\uC131 \uC911 \uD558\uB098\uAC00 \uC788\uAC70\uB098 \uBAA8\uB450 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - // Note to translators: "exclude-result-prefixes" is an XSLT keyword which - // should not be translated. The message indicates that a namespace prefix - // encountered as part of the value of the exclude-result-prefixes attribute - // was in error. - // ER_INVALID_PREFIX - new error message for bugzilla #788 - { ER_INVALID_PREFIX, - "exclude-result-prefixes\uC758 \uC811\uB450\uC5B4\uAC00 \uBD80\uC801\uD569\uD568: {0}"}, - - // Note to translators: An "attribute set" is a set of attributes that can - // be added to an element in the output document as a group. The message - // indicates that there was a reference to an attribute set named {0} that - // was never defined. - // ER_NO_ATTRIB_SET - new error message for bugzilla #782 - { ER_NO_ATTRIB_SET, - "\uC774\uB984\uC774 {0}\uC778 attribute-set\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - // Note to translators: This message indicates that there was a reference - // to a function named {0} for which no function definition could be found. - { ER_FUNCTION_NOT_FOUND, - "\uC774\uB984\uC774 {0}\uC778 \uD568\uC218\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - // Note to translators: This message indicates that the XSLT instruction - // that is named by the substitution text {0} must not contain other XSLT - // instructions (content) or a "select" attribute. The word "select" is - // an XSLT keyword in this case and must not be translated. - { ER_CANT_HAVE_CONTENT_AND_SELECT, - "{0} \uC694\uC18C\uC5D0\uB294 content \uC18D\uC131\uACFC select \uC18D\uC131\uC774 \uD568\uAED8 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4."}, - - // Note to translators: This message indicates that the value argument - // of setParameter must be a valid Java Object. - { ER_INVALID_SET_PARAM_VALUE, - "{0} \uB9E4\uAC1C\uBCC0\uC218\uC758 \uAC12\uC740 \uC801\uD569\uD55C Java \uAC1D\uCCB4\uC5EC\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT, - "xsl:namespace-alias \uC694\uC18C\uC758 result-prefix \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC740 '#default'\uC774\uC9C0\uB9CC \uC694\uC18C\uC5D0 \uB300\uD55C \uBC94\uC704\uC5D0\uC11C \uAE30\uBCF8 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX, - "xsl:namespace-alias \uC694\uC18C\uC758 result-prefix \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC740 ''{0}''\uC774\uC9C0\uB9CC \uC694\uC18C\uC5D0 \uB300\uD55C \uBC94\uC704\uC5D0\uC11C ''{0}'' \uC811\uB450\uC5B4\uC758 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - { ER_SET_FEATURE_NULL_NAME, - "\uAE30\uB2A5 \uC774\uB984\uC740 TransformerFactory.setFeature(\uBB38\uC790\uC5F4 \uC774\uB984, \uBD80\uC6B8 \uAC12)\uC5D0\uC11C \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_GET_FEATURE_NULL_NAME, - "\uAE30\uB2A5 \uC774\uB984\uC740 TransformerFactory.getFeature(\uBB38\uC790\uC5F4 \uC774\uB984)\uC5D0\uC11C \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_UNSUPPORTED_FEATURE, - "\uC774 TransformerFactory\uC5D0\uC11C ''{0}'' \uAE30\uB2A5\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING, - "\uBCF4\uC548 \uCC98\uB9AC \uAE30\uB2A5\uC774 true\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 \uD655\uC7A5 \uC694\uC18C ''{0}''\uC744(\uB97C) \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE, - "\uB110 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI\uC5D0 \uB300\uD55C \uC811\uB450\uC5B4\uB97C \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NAMESPACE_CONTEXT_NULL_PREFIX, - "\uB110 \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI\uB97C \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_XPATH_RESOLVER_NULL_QNAME, - "\uD568\uC218 \uC774\uB984\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_XPATH_RESOLVER_NEGATIVE_ARITY, - "\uC778\uC790 \uC218\uB294 \uC74C\uC218\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - // Warnings... - - { WG_FOUND_CURLYBRACE, - "'}'\uB97C \uCC3E\uC558\uC9C0\uB9CC \uC5F4\uB824 \uC788\uB294 \uC18D\uC131 \uD15C\uD50C\uB9AC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR, - "\uACBD\uACE0: count \uC18D\uC131\uC774 xsl:number\uC758 \uC870\uC0C1\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4! \uB300\uC0C1 = {0}"}, - - { WG_EXPR_ATTRIB_CHANGED_TO_SELECT, - "\uC774\uC804 \uAD6C\uBB38: 'expr' \uC18D\uC131\uC758 \uC774\uB984\uC774 'select'\uB85C \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - { WG_NO_LOCALE_IN_FORMATNUMBER, - "Xalan\uC774 format-number \uD568\uC218\uC5D0\uC11C \uB85C\uCF00\uC77C \uC774\uB984\uC744 \uC544\uC9C1 \uCC98\uB9AC\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - { WG_LOCALE_NOT_FOUND, - "\uACBD\uACE0: xml:lang={0}\uC5D0 \uB300\uD55C \uB85C\uCF00\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { WG_CANNOT_MAKE_URL_FROM, - "{0}\uC5D0\uC11C URL\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { WG_CANNOT_LOAD_REQUESTED_DOC, - "\uC694\uCCAD\uB41C \uBB38\uC11C\uB97C \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC74C: {0}"}, - - { WG_CANNOT_FIND_COLLATOR, - ">>>>>> Xalan \uBC84\uC804 "}, - { "version2", "<<<<<<<"}, - { "yes", "\uC608"}, - { "line", "\uD589 \uBC88\uD638"}, - { "column","\uC5F4 \uBC88\uD638"}, - { "xsldone", "XSLProcessor: \uC644\uB8CC"}, - - - // Note to translators: The following messages provide usage information - // for the Xalan Process command line. "Process" is the name of a Java class, - // and should not be translated. - { "xslProc_option", "Xalan-J \uBA85\uB839\uD589 Process \uD074\uB798\uC2A4 \uC635\uC158:"}, - { "xslProc_option", "Xalan-J \uBA85\uB839\uD589 Process \uD074\uB798\uC2A4 \uC635\uC158:"}, - { "xslProc_invalid_xsltc_option", "XSLTC \uBAA8\uB4DC\uC5D0\uC11C\uB294 {0} \uC635\uC158\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - { "xslProc_invalid_xalan_option", "{0} \uC635\uC158\uC740 -XSLTC\uC5D0\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, - { "xslProc_no_input", "\uC624\uB958: \uC9C0\uC815\uB41C \uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uB610\uB294 \uC785\uB825 xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0AC\uC6A9\uBC95 \uC9C0\uCE68\uC5D0 \uB300\uD55C \uC635\uC158 \uC5C6\uC774 \uC774 \uBA85\uB839\uC744 \uC2E4\uD589\uD558\uC2ED\uC2DC\uC624."}, - { "xslProc_common_options", "-\uC77C\uBC18 \uC635\uC158-"}, - { "xslProc_xalan_options", "-Xalan \uC635\uC158-"}, - { "xslProc_xsltc_options", "-XSLTC \uC635\uC158-"}, - { "xslProc_return_to_continue", "(\uACC4\uC18D\uD558\uB824\uBA74 \uD0A4\uB97C \uB204\uB974\uC2ED\uC2DC\uC624.)"}, - - // Note to translators: The option name and the parameter name do not need to - // be translated. Only translate the messages in parentheses. Note also that - // leading whitespace in the messages is used to indent the usage information - // for each option in the English messages. - // Do not translate the keywords: XSLTC, SAX, DOM and DTM. - { "optionXSLTC", " [-XSLTC(\uBCC0\uD658\uC5D0 XSLTC \uC0AC\uC6A9)]"}, - { "optionIN", " [-IN inputXMLURL]"}, - { "optionXSL", " [-XSL XSLTransformationURL]"}, - { "optionOUT", " [-OUT outputFileName]"}, - { "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"}, - { "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"}, - { "optionPARSER", " [-PARSER \uAD6C\uBB38 \uBD84\uC11D\uAE30 \uC5F0\uACB0\uC758 \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984]"}, - { "optionE", " [-E(\uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uD655\uC7A5 \uC548\uD568)]"}, - { "optionV", " [-E(\uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uD655\uC7A5 \uC548\uD568)]"}, - { "optionQC", " [-QC(\uC790\uB3D9 \uD328\uD134 \uCDA9\uB3CC \uACBD\uACE0)]"}, - { "optionQ", " [-Q(\uC790\uB3D9 \uBAA8\uB4DC)]"}, - { "optionLF", " [-LF(\uCD9C\uB825\uC5D0\uB9CC \uC904 \uBC14\uAFC8 \uC0AC\uC6A9 {\uAE30\uBCF8\uAC12: CR/LF})]"}, - { "optionCR", " [-CR(\uCD9C\uB825\uC5D0\uB9CC \uCE90\uB9AC\uC9C0 \uB9AC\uD134 \uC0AC\uC6A9 {\uAE30\uBCF8\uAC12: CR/LF})]"}, - { "optionESCAPE", " [-ESCAPE(\uC774\uC2A4\uCF00\uC774\uD504 \uBB38\uC790 {\uAE30\uBCF8\uAC12: <>&\"'\\r\\n}]"}, - { "optionINDENT", " [-INDENT(\uB4E4\uC5EC \uC4F8 \uACF5\uBC31 \uC218 \uC81C\uC5B4 {\uAE30\uBCF8\uAC12: 0})]"}, - { "optionTT", " [-TT(\uD15C\uD50C\uB9AC\uD2B8 \uD638\uCD9C \uC2DC \uCD94\uC801)]"}, - { "optionTG", " [-TG(\uAC01 \uC0DD\uC131 \uC774\uBCA4\uD2B8 \uCD94\uC801)]"}, - { "optionTS", " [-TS(\uAC01 \uC120\uD0DD \uC774\uBCA4\uD2B8 \uCD94\uC801)]"}, - { "optionTTC", " [-TTC(\uD15C\uD50C\uB9AC\uD2B8 \uD558\uC704 \uD56D\uBAA9 \uCC98\uB9AC \uC2DC \uCD94\uC801)]"}, - { "optionTCLASS", " [-TCLASS(\uCD94\uC801 \uD655\uC7A5\uC5D0 \uB300\uD55C TraceListener \uD074\uB798\uC2A4)]"}, - { "optionVALIDATE", " [-VALIDATE(\uAC80\uC99D \uC5EC\uBD80 \uC124\uC815. \uAE30\uBCF8\uC801\uC73C\uB85C \uAC80\uC99D\uC740 \uD574\uC81C\uB418\uC5B4 \uC788\uC74C)]"}, - { "optionEDUMP", " [-EDUMP {\uC120\uD0DD\uC801 \uD30C\uC77C \uC774\uB984}(\uC624\uB958 \uBC1C\uC0DD \uC2DC \uC2A4\uD0DD \uB364\uD504)]"}, - { "optionXML", " [-XML(XML \uD3EC\uB9F7\uD130 \uC0AC\uC6A9 \uBC0F XML \uD5E4\uB354 \uCD94\uAC00)]"}, - { "optionTEXT", " [-TEXT(\uAC04\uB2E8\uD55C \uD14D\uC2A4\uD2B8 \uD3EC\uB9F7\uD130 \uC0AC\uC6A9)]"}, - { "optionHTML", " [-HTML(HTML \uD3EC\uB9F7\uD130 \uC0AC\uC6A9)]"}, - { "optionPARAM", " [-PARAM \uC774\uB984 \uD45C\uD604\uC2DD(\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uB9E4\uAC1C\uBCC0\uC218 \uC124\uC815)]"}, - { "noParsermsg1", "XSL \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - { "noParsermsg2", "** \uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"}, - { "noParsermsg3", "\uD074\uB798\uC2A4 \uACBD\uB85C\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624."}, - { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, - { "noParsermsg5", "IBM AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, - { "optionURIRESOLVER", " [-URIRESOLVER \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984(URI \uBD84\uC11D\uC5D0 \uC0AC\uC6A9\uD560 URIResolver)]"}, - { "optionENTITYRESOLVER", " [-ENTITYRESOLVER \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984(\uC5D4\uD2F0\uD2F0 \uBD84\uC11D\uC5D0 \uC0AC\uC6A9\uD560 EntityResolver)]"}, - { "optionCONTENTHANDLER", " [-CONTENTHANDLER \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984(\uCD9C\uB825 \uC9C1\uB82C\uD654\uC5D0 \uC0AC\uC6A9\uD560 ContentHandler)]"}, - { "optionLINENUMBERS", " [-L(\uC18C\uC2A4 \uBB38\uC11C\uC5D0 \uD589 \uBC88\uD638 \uC0AC\uC6A9)]"}, - { "optionSECUREPROCESSING", " [-SECURE(\uBCF4\uC548 \uCC98\uB9AC \uAE30\uB2A5\uC744 true\uB85C \uC124\uC815)]"}, - - // Following are the new options added in XSLTErrorResources.properties files after Jdk 1.4 (Xalan 2.2-D11) - - - { "optionMEDIA", " [-MEDIA mediaType(media \uC18D\uC131\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBB38\uC11C\uC640 \uC5F0\uAD00\uB41C \uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uCC3E\uAE30)]"}, - { "optionFLAVOR", " [-FLAVOR flavorName(\uBCC0\uD658\uC5D0 \uBA85\uC2DC\uC801\uC73C\uB85C s2s=SAX \uB610\uB294 d2d=DOM \uC0AC\uC6A9)] "}, // Added by sboag/scurcuru; experimental - { "optionDIAG", " [-DIAG(\uBCC0\uD658\uC5D0 \uAC78\uB9B0 \uCD1D \uC2DC\uAC04(\uBC00\uB9AC\uCD08) \uC778\uC1C4)]"}, - { "optionINCREMENTAL", " [-INCREMENTAL(http://xml.apache.org/xalan/features/incremental\uC744 true\uB85C \uC124\uC815\uD558\uC5EC \uC99D\uBD84\uC801 DTM \uC0DD\uC131 \uC694\uCCAD)]"}, - { "optionNOOPTIMIMIZE", " [-NOOPTIMIMIZE(http://xml.apache.org/xalan/features/optimize\uB97C false\uB85C \uC124\uC815\uD558\uC5EC \uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uCD5C\uC801\uD654 \uCC98\uB9AC \uC548\uD568 \uC694\uCCAD)]"}, - { "optionRL", " [-RL recursionlimit(\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uC21C\uD658 \uAE4A\uC774\uC5D0 \uB300\uD55C \uC22B\uC790 \uC81C\uD55C \uAC80\uC99D)]"}, - { "optionXO", " [-XO [transletName](\uC0DD\uC131\uB41C translet\uC5D0 \uC774\uB984 \uC9C0\uC815)]"}, - { "optionXD", " [-XD destinationDirectory(translet\uC5D0 \uB300\uD55C \uB300\uC0C1 \uB514\uB809\uD1A0\uB9AC \uC9C0\uC815)]"}, - { "optionXJ", " [-XJ jarfile(translet \uD074\uB798\uC2A4\uB97C \uC774\uB984\uC758 jar \uD30C\uC77C\uB85C \uD328\uD0A4\uC9C0\uD654)]"}, - { "optionXP", " [-XP package(\uC0DD\uC131\uB41C \uBAA8\uB4E0 translet \uD074\uB798\uC2A4\uC5D0 \uB300\uD55C \uD328\uD0A4\uC9C0 \uC774\uB984 \uC811\uB450\uC5B4 \uC9C0\uC815)]"}, - - //AddITIONAL STRINGS that need L10n - // Note to translators: The following message describes usage of a particular - // command-line option that is used to enable the "template inlining" - // optimization. The optimization involves making a copy of the code - // generated for a template in another template that refers to it. - { "optionXN", " [-XN(\uD15C\uD50C\uB9AC\uD2B8 \uC778\uB77C\uC778\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815)]" }, - { "optionXX", " [-XX(\uCD94\uAC00 \uB514\uBC84\uAE45 \uBA54\uC2DC\uC9C0 \uCD9C\uB825 \uC124\uC815)]"}, - { "optionXT" , " [-XT(\uAC00\uB2A5\uD55C \uACBD\uC6B0 \uBCC0\uD658\uC5D0 translet \uC0AC\uC6A9)]"}, - { "diagTiming"," --------- {1}\uC744(\uB97C) \uD1B5\uD55C {0} \uBCC0\uD658\uC5D0 {2}\uBC00\uB9AC\uCD08\uAC00 \uAC78\uB838\uC2B5\uB2C8\uB2E4." }, - { "recursionTooDeep","\uD15C\uD50C\uB9AC\uD2B8\uAC00 \uB108\uBB34 \uAE4A\uAC8C \uC911\uCCA9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC911\uCCA9 = {0}, \uD15C\uD50C\uB9AC\uD2B8: {1} {2}" }, - { "nameIs", "\uC774\uB984:" }, - { "matchPatternIs", "\uC77C\uCE58 \uD328\uD134:" } - - }; - - } - // ================= INFRASTRUCTURE ====================== - - /** String for use when a bad error code was encountered. */ - public static final String BAD_CODE = "BAD_CODE"; - - /** String for use when formatting of the error string failed. */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java deleted file mode 100644 index bc9c351090c..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java +++ /dev/null @@ -1,1425 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And - * you need to enter key , value pair as part of contents - * Array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XSLTErrorResources_pt_BR extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /* - * Static variables - */ - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX = - "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX"; - - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT = - "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT"; - - public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE"; - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE"; - public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS"; - public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD"; - public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES"; - public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB"; - public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND"; - public static final String ER_CANT_RESOLVE_NAME_AVT = "ER_CANT_RESOLVE_NAME_AVT"; - public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB"; - public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB"; - public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB = - "ER_BAD_VAL_ON_LEVEL_ATTRIB"; - public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB"; - public static final String ER_NEED_NAME_OR_MATCH_ATTRIB = - "ER_NEED_NAME_OR_MATCH_ATTRIB"; - public static final String ER_CANT_RESOLVE_NSPREFIX = - "ER_CANT_RESOLVE_NSPREFIX"; - public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE"; - public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC"; - public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR"; - public static final String ER_NULL_CHILD = "ER_NULL_CHILD"; - public static final String ER_NEED_SELECT_ATTRIB = "ER_NEED_SELECT_ATTRIB"; - public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB"; - public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB"; - public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC"; - public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON = - "ER_COULD_NOT_CREATE_XML_PROC_LIAISON"; - public static final String ER_PROCESS_NOT_SUCCESSFUL = - "ER_PROCESS_NOT_SUCCESSFUL"; - public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL"; - public static final String ER_ENCODING_NOT_SUPPORTED = - "ER_ENCODING_NOT_SUPPORTED"; - public static final String ER_COULD_NOT_CREATE_TRACELISTENER = - "ER_COULD_NOT_CREATE_TRACELISTENER"; - public static final String ER_KEY_REQUIRES_NAME_ATTRIB = - "ER_KEY_REQUIRES_NAME_ATTRIB"; - public static final String ER_KEY_REQUIRES_MATCH_ATTRIB = - "ER_KEY_REQUIRES_MATCH_ATTRIB"; - public static final String ER_KEY_REQUIRES_USE_ATTRIB = - "ER_KEY_REQUIRES_USE_ATTRIB"; - public static final String ER_REQUIRES_ELEMENTS_ATTRIB = - "ER_REQUIRES_ELEMENTS_ATTRIB"; - public static final String ER_MISSING_PREFIX_ATTRIB = - "ER_MISSING_PREFIX_ATTRIB"; - public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL"; - public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND"; - public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION"; - public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB"; - public static final String ER_STYLESHEET_INCLUDES_ITSELF = - "ER_STYLESHEET_INCLUDES_ITSELF"; - public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR"; - public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB"; - public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT = - "ER_MISSING_CONTAINER_ELEMENT_COMPONENT"; - public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT = - "ER_CAN_ONLY_OUTPUT_TO_ELEMENT"; - public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR"; - public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR"; - public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION"; - public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR = - "ER_CANNOT_SERIALIZE_XSLPROCESSOR"; - public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET"; - public static final String ER_FAILED_PROCESS_STYLESHEET = - "ER_FAILED_PROCESS_STYLESHEET"; - public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC"; - public static final String ER_COULDNT_FIND_FRAGMENT = - "ER_COULDNT_FIND_FRAGMENT"; - public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT"; - public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB = - "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB = - "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG = - "ER_NO_CLONE_OF_DOCUMENT_FRAG"; - public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM"; - public static final String ER_XMLSPACE_ILLEGAL_VALUE = - "ER_XMLSPACE_ILLEGAL_VALUE"; - public static final String ER_NO_XSLKEY_DECLARATION = - "ER_NO_XSLKEY_DECLARATION"; - public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL"; - public static final String ER_XSLFUNCTIONS_UNSUPPORTED = - "ER_XSLFUNCTIONS_UNSUPPORTED"; - public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR"; - public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET = - "ER_NOT_ALLOWED_INSIDE_STYLESHEET"; - public static final String ER_RESULTNS_NOT_SUPPORTED = - "ER_RESULTNS_NOT_SUPPORTED"; - public static final String ER_DEFAULTSPACE_NOT_SUPPORTED = - "ER_DEFAULTSPACE_NOT_SUPPORTED"; - public static final String ER_INDENTRESULT_NOT_SUPPORTED = - "ER_INDENTRESULT_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB"; - public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM"; - public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE"; - public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN"; - public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_MISPLACED_XSLOTHERWISE = - "ER_MISPLACED_XSLOTHERWISE"; - public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE = - "ER_NOT_ALLOWED_INSIDE_TEMPLATE"; - public static final String ER_UNKNOWN_EXT_NS_PREFIX = - "ER_UNKNOWN_EXT_NS_PREFIX"; - public static final String ER_IMPORTS_AS_FIRST_ELEM = - "ER_IMPORTS_AS_FIRST_ELEM"; - public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF"; - public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL"; - public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL = - "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL"; - public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION"; - public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR"; - public static final String ER_CURRENCY_SIGN_ILLEGAL= - "ER_CURRENCY_SIGN_ILLEGAL"; - public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM = - "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM"; - public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER = - "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER"; - public static final String ER_REDIRECT_COULDNT_GET_FILENAME = - "ER_REDIRECT_COULDNT_GET_FILENAME"; - public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT = - "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT"; - public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX = - "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX"; - public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI"; - public static final String ER_MISSING_ARG_FOR_OPTION = - "ER_MISSING_ARG_FOR_OPTION"; - public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION"; - public static final String ER_MALFORMED_FORMAT_STRING = - "ER_MALFORMED_FORMAT_STRING"; - public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String ER_ILLEGAL_ATTRIBUTE_VALUE = - "ER_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN"; - public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH = - "ER_NO_APPLY_IMPORT_IN_FOR_EACH"; - public static final String ER_CANT_USE_DTM_FOR_OUTPUT = - "ER_CANT_USE_DTM_FOR_OUTPUT"; - public static final String ER_CANT_USE_DTM_FOR_INPUT = - "ER_CANT_USE_DTM_FOR_INPUT"; - public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_XSLATTRSET_USED_ITSELF = - "ER_XSLATTRSET_USED_ITSELF"; - public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM"; - public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS"; - public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT = - "ER_IN_ELEMTEMPLATEELEM_READOBJECT"; - public static final String ER_DUPLICATE_NAMED_TEMPLATE = - "ER_DUPLICATE_NAMED_TEMPLATE"; - public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL"; - public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF"; - public static final String ER_ILLEGAL_DOMSOURCE_INPUT = - "ER_ILLEGAL_DOMSOURCE_INPUT"; - public static final String ER_CLASS_NOT_FOUND_FOR_OPTION = - "ER_CLASS_NOT_FOUND_FOR_OPTION"; - public static final String ER_REQUIRED_ELEM_NOT_FOUND = - "ER_REQUIRED_ELEM_NOT_FOUND"; - public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL"; - public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL"; - public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL"; - public static final String ER_SOURCE_CANNOT_BE_NULL = - "ER_SOURCE_CANNOT_BE_NULL"; - public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR"; - public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN"; - public static final String ER_CANNOT_CREATE_EXTENSN = - "ER_CANNOT_CREATE_EXTENSN"; - public static final String ER_INSTANCE_MTHD_CALL_REQUIRES = - "ER_INSTANCE_MTHD_CALL_REQUIRES"; - public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME"; - public static final String ER_ELEMENT_NAME_METHOD_STATIC = - "ER_ELEMENT_NAME_METHOD_STATIC"; - public static final String ER_EXTENSION_FUNC_UNKNOWN = - "ER_EXTENSION_FUNC_UNKNOWN"; - public static final String ER_MORE_MATCH_CONSTRUCTOR = - "ER_MORE_MATCH_CONSTRUCTOR"; - public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD"; - public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT"; - public static final String ER_INVALID_CONTEXT_PASSED = - "ER_INVALID_CONTEXT_PASSED"; - public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS"; - public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME"; - public static final String ER_NO_URL = "ER_NO_URL"; - public static final String ER_POOL_SIZE_LESSTHAN_ONE = - "ER_POOL_SIZE_LESSTHAN_ONE"; - public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER"; - public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT"; - public static final String ER_ILLEGAL_XMLSPACE_VALUE = - "ER_ILLEGAL_XMLSPACE_VALUE"; - public static final String ER_PROCESSFROMNODE_FAILED = - "ER_PROCESSFROMNODE_FAILED"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = - "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = - "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION = - "ER_UNKNOWN_ERROR_CALLING_EXTENSION"; - public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL"; - public static final String ER_ELEM_CONTENT_NOT_ALLOWED = - "ER_ELEM_CONTENT_NOT_ALLOWED"; - public static final String ER_STYLESHEET_DIRECTED_TERMINATION = - "ER_STYLESHEET_DIRECTED_TERMINATION"; - public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO"; - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = - "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES = - "ER_CANNOT_INIT_DEFAULT_TEMPLATES"; - public static final String ER_RESULT_NULL = "ER_RESULT_NULL"; - public static final String ER_RESULT_COULD_NOT_BE_SET = - "ER_RESULT_COULD_NOT_BE_SET"; - public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED"; - public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE = - "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE"; - public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE = - "ER_CANNOT_TRANSFORM_SOURCE_TYPE"; - public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER"; - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE"; - public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER"; - public static final String ER_NO_STYLESHEET_IN_MEDIA = - "ER_NO_STYLESHEET_IN_MEDIA"; - public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_PROPERTY_VALUE_BOOLEAN = - "ER_PROPERTY_VALUE_BOOLEAN"; - public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT = - "ER_COULD_NOT_FIND_EXTERN_SCRIPT"; - public static final String ER_RESOURCE_COULD_NOT_FIND = - "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED = - "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED"; - public static final String ER_FAILED_CREATING_ELEMLITRSLT = - "ER_FAILED_CREATING_ELEMLITRSLT"; - public static final String ER_VALUE_SHOULD_BE_NUMBER = - "ER_VALUE_SHOULD_BE_NUMBER"; - public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL"; - public static final String ER_FAILED_CALLING_METHOD = - "ER_FAILED_CALLING_METHOD"; - public static final String ER_FAILED_CREATING_ELEMTMPL = - "ER_FAILED_CREATING_ELEMTMPL"; - public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED"; - public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED"; - public static final String ER_BAD_VALUE = "ER_BAD_VALUE"; - public static final String ER_ATTRIB_VALUE_NOT_FOUND = - "ER_ATTRIB_VALUE_NOT_FOUND"; - public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED = - "ER_ATTRIB_VALUE_NOT_RECOGNIZED"; - public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE"; - public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG"; - public static final String ER_CANNOT_FIND_SAX1_DRIVER = - "ER_CANNOT_FIND_SAX1_DRIVER"; - public static final String ER_SAX1_DRIVER_NOT_LOADED = - "ER_SAX1_DRIVER_NOT_LOADED"; - public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED = - "ER_SAX1_DRIVER_NOT_INSTANTIATED" ; - public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER = - "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER"; - public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED = - "ER_PARSER_PROPERTY_NOT_SPECIFIED"; - public static final String ER_PARSER_ARG_CANNOT_BE_NULL = - "ER_PARSER_ARG_CANNOT_BE_NULL" ; - public static final String ER_FEATURE = "ER_FEATURE"; - public static final String ER_PROPERTY = "ER_PROPERTY" ; - public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER"; - public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ; - public static final String ER_NO_DRIVER_NAME_SPECIFIED = - "ER_NO_DRIVER_NAME_SPECIFIED"; - public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED"; - public static final String ER_POOLSIZE_LESS_THAN_ONE = - "ER_POOLSIZE_LESS_THAN_ONE"; - public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME"; - public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER"; - public static final String ER_ASSERT_NO_TEMPLATE_PARENT = - "ER_ASSERT_NO_TEMPLATE_PARENT"; - public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR = - "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR"; - public static final String ER_NOT_ALLOWED_IN_POSITION = - "ER_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION = - "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE = - "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE"; - public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX = - "ER_NAMESPACE_CONTEXT_NULL_PREFIX"; - public static final String ER_XPATH_RESOLVER_NULL_QNAME = - "ER_XPATH_RESOLVER_NULL_QNAME"; - public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY = - "ER_XPATH_RESOLVER_NEGATIVE_ARITY"; - public static final String INVALID_TCHAR = "INVALID_TCHAR"; - public static final String INVALID_QNAME = "INVALID_QNAME"; - public static final String INVALID_ENUM = "INVALID_ENUM"; - public static final String INVALID_NMTOKEN = "INVALID_NMTOKEN"; - public static final String INVALID_NCNAME = "INVALID_NCNAME"; - public static final String INVALID_BOOLEAN = "INVALID_BOOLEAN"; - public static final String INVALID_NUMBER = "INVALID_NUMBER"; - public static final String ER_ARG_LITERAL = "ER_ARG_LITERAL"; - public static final String ER_DUPLICATE_GLOBAL_VAR ="ER_DUPLICATE_GLOBAL_VAR"; - public static final String ER_DUPLICATE_VAR = "ER_DUPLICATE_VAR"; - public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH"; - public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX"; - public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET"; - public static final String ER_FUNCTION_NOT_FOUND = - "ER_FUNCTION_NOT_FOUND"; - public static final String ER_CANT_HAVE_CONTENT_AND_SELECT = - "ER_CANT_HAVE_CONTENT_AND_SELECT"; - public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE"; - public static final String ER_SET_FEATURE_NULL_NAME = - "ER_SET_FEATURE_NULL_NAME"; - public static final String ER_GET_FEATURE_NULL_NAME = - "ER_GET_FEATURE_NULL_NAME"; - public static final String ER_UNSUPPORTED_FEATURE = - "ER_UNSUPPORTED_FEATURE"; - public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING = - "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING"; - - public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE"; - public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR = - "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR"; - public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT = - "WG_EXPR_ATTRIB_CHANGED_TO_SELECT"; - public static final String WG_NO_LOCALE_IN_FORMATNUMBER = - "WG_NO_LOCALE_IN_FORMATNUMBER"; - public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_CANNOT_LOAD_REQUESTED_DOC = - "WG_CANNOT_LOAD_REQUESTED_DOC"; - public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR"; - public static final String WG_FUNCTIONS_SHOULD_USE_URL = - "WG_FUNCTIONS_SHOULD_USE_URL"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 = - "WG_ENCODING_NOT_SUPPORTED_USING_UTF8"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA = - "WG_ENCODING_NOT_SUPPORTED_USING_JAVA"; - public static final String WG_SPECIFICITY_CONFLICTS = - "WG_SPECIFICITY_CONFLICTS"; - public static final String WG_PARSING_AND_PREPARING = - "WG_PARSING_AND_PREPARING"; - public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE"; - public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP"; - public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED"; - public static final String WG_NO_DECIMALFORMAT_DECLARATION = - "WG_NO_DECIMALFORMAT_DECLARATION"; - public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS"; - public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED = - "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED"; - public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE = - "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE"; - public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE"; - public static final String WG_COULD_NOT_RESOLVE_PREFIX = - "WG_COULD_NOT_RESOLVE_PREFIX"; - public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String WG_ILLEGAL_ATTRIBUTE_NAME = - "WG_ILLEGAL_ATTRIBUTE_NAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_VALUE = - "WG_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG"; - public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_POSITION = - "WG_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String NO_MODIFICATION_ALLOWED_ERR = - "NO_MODIFICATION_ALLOWED_ERR"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_NO_CURLYBRACE, - "Erro: N\u00E3o \u00E9 poss\u00EDvel utilizar ''{'' na express\u00E3o"}, - - { ER_ILLEGAL_ATTRIBUTE , - "{0} tem um atributo inv\u00E1lido: {1}"}, - - {ER_NULL_SOURCENODE_APPLYIMPORTS , - "sourceNode \u00E9 nulo em xsl:apply-imports!"}, - - {ER_CANNOT_ADD, - "N\u00E3o \u00E9 poss\u00EDvel adicionar {0} a {1}"}, - - { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES, - "sourceNode \u00E9 nulo em handleApplyTemplatesInstruction!"}, - - { ER_NO_NAME_ATTRIB, - "{0} deve ter um atributo de nome."}, - - {ER_TEMPLATE_NOT_FOUND, - "N\u00E3o foi poss\u00EDvel localizar o modelo com o nome: {0}"}, - - {ER_CANT_RESOLVE_NAME_AVT, - "N\u00E3o foi poss\u00EDvel resolver o nome AVT em xsl:call-template."}, - - {ER_REQUIRES_ATTRIB, - "{0} requer o atributo: {1}"}, - - { ER_MUST_HAVE_TEST_ATTRIB, - "{0} deve ter um atributo ''test''."}, - - {ER_BAD_VAL_ON_LEVEL_ATTRIB, - "Valor inv\u00E1lido no atributo de n\u00EDvel: {0}"}, - - {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML, - "o nome da instru\u00E7\u00E3o de processamento n\u00E3o pode ser 'xml'"}, - - { ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, - "o nome da instru\u00E7\u00E3o de processamento deve ser um NCName v\u00E1lido: {0}"}, - - { ER_NEED_MATCH_ATTRIB, - "{0} deve ter um atributo de correspond\u00EAncia se tiver um modo."}, - - { ER_NEED_NAME_OR_MATCH_ATTRIB, - "{0} requer um atributo de nome ou de correspond\u00EAncia."}, - - {ER_CANT_RESOLVE_NSPREFIX, - "N\u00E3o \u00E9 poss\u00EDvel resolver o prefixo do namespace: {0}"}, - - { ER_ILLEGAL_VALUE, - "xml:space tem um valor inv\u00E1lido: {0}"}, - - { ER_NO_OWNERDOC, - "O n\u00F3 filho n\u00E3o tem um documento de propriet\u00E1rio!"}, - - { ER_ELEMTEMPLATEELEM_ERR, - "Erro de ElemTemplateElement: {0}"}, - - { ER_NULL_CHILD, - "Tentativa de adicionar um filho nulo!"}, - - { ER_NEED_SELECT_ATTRIB, - "{0} requer um atributo de sele\u00E7\u00E3o."}, - - { ER_NEED_TEST_ATTRIB , - "xsl:when deve ter um atributo 'test'."}, - - { ER_NEED_NAME_ATTRIB, - "xsl:with-param deve ter um atributo 'name'."}, - - { ER_NO_CONTEXT_OWNERDOC, - "o contexto n\u00E3o tem um documento de propriet\u00E1rio!"}, - - {ER_COULD_NOT_CREATE_XML_PROC_LIAISON, - "N\u00E3o foi poss\u00EDvel criar a Liga\u00E7\u00E3o TransformerFactory XML: {0}"}, - - {ER_PROCESS_NOT_SUCCESSFUL, - "Xalan: O processo n\u00E3o foi bem-sucedido."}, - - { ER_NOT_SUCCESSFUL, - "Xalan: N\u00E3o foi bem-sucedido."}, - - { ER_ENCODING_NOT_SUPPORTED, - "Codifica\u00E7\u00E3o n\u00E3o suportada: {0}"}, - - {ER_COULD_NOT_CREATE_TRACELISTENER, - "N\u00E3o foi poss\u00EDvel criar TraceListener: {0}"}, - - {ER_KEY_REQUIRES_NAME_ATTRIB, - "xsl:key requer um atributo 'name'!"}, - - { ER_KEY_REQUIRES_MATCH_ATTRIB, - "xsl:key requer um atributo 'match'!"}, - - { ER_KEY_REQUIRES_USE_ATTRIB, - "xsl:key requer um atributo 'use'!"}, - - { ER_REQUIRES_ELEMENTS_ATTRIB, - "(StylesheetHandler) {0} requer um atributo ''elements''!"}, - - { ER_MISSING_PREFIX_ATTRIB, - "(StylesheetHandler) o atributo ''prefix'' de {0} n\u00E3o foi encontrado"}, - - { ER_BAD_STYLESHEET_URL, - "O URL da Folha de Estilos est\u00E1 incorreto: {0}"}, - - { ER_FILE_NOT_FOUND, - "O arquivo da folha de estilos n\u00E3o foi encontrado: {0}"}, - - { ER_IOEXCEPTION, - "Exce\u00E7\u00E3o de E/S com o arquivo de folha de estilos: {0}"}, - - { ER_NO_HREF_ATTRIB, - "(StylesheetHandler) N\u00E3o foi poss\u00EDvel encontrar o atributo href para {0}"}, - - { ER_STYLESHEET_INCLUDES_ITSELF, - "(StylesheetHandler) A folha de estilos {0} est\u00E1 incluindo a si mesma direta ou indiretamente!"}, - - { ER_PROCESSINCLUDE_ERROR, - "Erro de StylesheetHandler.processInclude: {0}"}, - - { ER_MISSING_LANG_ATTRIB, - "(StylesheetHandler) O atributo ''lang'' de {0} n\u00E3o foi encontrado"}, - - { ER_MISSING_CONTAINER_ELEMENT_COMPONENT, - "(StylesheetHandler) elemento {0} incorretamente posicionado?? Elemento ''component'' do container n\u00E3o encontrado"}, - - { ER_CAN_ONLY_OUTPUT_TO_ELEMENT, - "Sa\u00EDda permitida somente para Element, DocumentFragment, Document ou PrintWriter."}, - - { ER_PROCESS_ERROR, - "Erro de StylesheetRoot.process"}, - - { ER_UNIMPLNODE_ERROR, - "Erro de UnImplNode: {0}"}, - - { ER_NO_SELECT_EXPRESSION, - "Erro! N\u00E3o foi poss\u00EDvel localizar a express\u00E3o de sele\u00E7\u00E3o xpath (-select)."}, - - { ER_CANNOT_SERIALIZE_XSLPROCESSOR, - "N\u00E3o \u00E9 poss\u00EDvel serializar um XSLProcessor!"}, - - { ER_NO_INPUT_STYLESHEET, - "A entrada da folha de estilos n\u00E3o foi especificada!"}, - - { ER_FAILED_PROCESS_STYLESHEET, - "Falha ao processar a folha de estilos!"}, - - { ER_COULDNT_PARSE_DOC, - "N\u00E3o foi poss\u00EDvel fazer parsing do documento {0}!"}, - - { ER_COULDNT_FIND_FRAGMENT, - "N\u00E3o foi poss\u00EDvel localizar o fragmento: {0}"}, - - { ER_NODE_NOT_ELEMENT, - "O n\u00F3 indicado pelo identificador de fragmento n\u00E3o era um elemento: {0}"}, - - { ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB, - "for-each deve ter um atributo de correspond\u00EAncia ou de nome"}, - - { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB, - "os modelos devem ter um atributo de correspond\u00EAncia ou de nome"}, - - { ER_NO_CLONE_OF_DOCUMENT_FRAG, - "N\u00E3o h\u00E1 clone de um fragmento de documento!"}, - - { ER_CANT_CREATE_ITEM, - "N\u00E3o \u00E9 poss\u00EDvel criar um item em uma \u00E1rvore de resultados: {0}"}, - - { ER_XMLSPACE_ILLEGAL_VALUE, - "xml:space no XML de origem tem um valor inv\u00E1lido: {0}"}, - - { ER_NO_XSLKEY_DECLARATION, - "N\u00E3o h\u00E1 uma declara\u00E7\u00E3o de xsl:key para {0}!"}, - - { ER_CANT_CREATE_URL, - "Erro! N\u00E3o \u00E9 poss\u00EDvel criar o url para: {0}"}, - - { ER_XSLFUNCTIONS_UNSUPPORTED, - "xsl:functions n\u00E3o \u00E9 suportado"}, - - { ER_PROCESSOR_ERROR, - "Erro de TransformerFactory XSLT"}, - - { ER_NOT_ALLOWED_INSIDE_STYLESHEET, - "(StylesheetHandler) {0} n\u00E3o \u00E9 permitido em uma folha de estilos!"}, - - { ER_RESULTNS_NOT_SUPPORTED, - "result-ns n\u00E3o \u00E9 mais suportado! Em vez disso, use xsl:output."}, - - { ER_DEFAULTSPACE_NOT_SUPPORTED, - "padr\u00E3o-space n\u00E3o \u00E9 mais suportado! Em vez disso, use xsl:strip-space ou xsl:preserve-space."}, - - { ER_INDENTRESULT_NOT_SUPPORTED, - "indent-result n\u00E3o \u00E9 mais suportado! Em vez disso, use xsl:output."}, - - { ER_ILLEGAL_ATTRIB, - "(StylesheetHandler) {0} tem um atributo inv\u00E1lido: {1}"}, - - { ER_UNKNOWN_XSL_ELEM, - "Elemento XSL desconhecido: {0}"}, - - { ER_BAD_XSLSORT_USE, - "(StylesheetHandler) xsl:sort s\u00F3 pode ser usado com xsl:apply-templates ou xsl:for-each."}, - - { ER_MISPLACED_XSLWHEN, - "(StylesheetHandler) xsl:when posicionado incorretamente!"}, - - { ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:when n\u00E3o relacionado a xsl:choose!"}, - - { ER_MISPLACED_XSLOTHERWISE, - "(StylesheetHandler) xsl:otherwise posicionado incorretamente!"}, - - { ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:otherwise n\u00E3o relacionado a xsl:choose!"}, - - { ER_NOT_ALLOWED_INSIDE_TEMPLATE, - "(StylesheetHandler) {0} n\u00E3o \u00E9 permitido em um modelo!"}, - - { ER_UNKNOWN_EXT_NS_PREFIX, - "(StylesheetHandler) prefixo {1} de namespace da extens\u00E3o de {0} desconhecido"}, - - { ER_IMPORTS_AS_FIRST_ELEM, - "(StylesheetHandler) As importa\u00E7\u00F5es s\u00F3 podem ocorrer como os primeiros elementos na folha de estilos!"}, - - { ER_IMPORTING_ITSELF, - "(StylesheetHandler) A folha de estilos {0} est\u00E1 importando a si mesmo(a) direta ou indiretamente!"}, - - { ER_XMLSPACE_ILLEGAL_VAL, - "(StylesheetHandler) xml:space tem um valor inv\u00E1lido: {0}"}, - - { ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL, - "processStylesheet malsucedido!"}, - - { ER_SAX_EXCEPTION, - "Exce\u00E7\u00E3o de SAX"}, - -// add this message to fix bug 21478 - { ER_FUNCTION_NOT_SUPPORTED, - "Fun\u00E7\u00E3o n\u00E3o suportada!"}, - - { ER_XSLT_ERROR, - "Erro de XSLT"}, - - { ER_CURRENCY_SIGN_ILLEGAL, - "sinal de moeda n\u00E3o permitido na string de padr\u00E3o de formato"}, - - { ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM, - "Fun\u00E7\u00E3o do documento n\u00E3o suportada no DOM da Folha de estilos!"}, - - { ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER, - "N\u00E3o \u00E9 poss\u00EDvel resolver o prefixo de um resolvedor sem Prefixo!"}, - - { ER_REDIRECT_COULDNT_GET_FILENAME, - "Redirecionar extens\u00E3o: N\u00E3o foi poss\u00EDvel obter o nome do arquivo - o arquivo ou o atributo de sele\u00E7\u00E3o deve retornar uma string v\u00E1lida."}, - - { ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT, - "N\u00E3o \u00E9 poss\u00EDvel criar FormatterListener na extens\u00E3o de Redirecionamento!"}, - - { ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX, - "O prefixo em exclude-result-prefixes n\u00E3o \u00E9 v\u00E1lido: {0}"}, - - { ER_MISSING_NS_URI, - "URI do namespace n\u00E3o encontrado para o prefixo especificado"}, - - { ER_MISSING_ARG_FOR_OPTION, - "Argumento n\u00E3o encontrado para a op\u00E7\u00E3o: {0}"}, - - { ER_INVALID_OPTION, - "Op\u00E7\u00E3o inv\u00E1lida: {0}"}, - - { ER_MALFORMED_FORMAT_STRING, - "String de formato incorreta: {0}"}, - - { ER_STYLESHEET_REQUIRES_VERSION_ATTRIB, - "xsl:stylesheet requer um atributo 'version'!"}, - - { ER_ILLEGAL_ATTRIBUTE_VALUE, - "Atributo: {0} tem um valor inv\u00E1lido: {1}"}, - - { ER_CHOOSE_REQUIRES_WHEN, - "xsl:choose requer um xsl:when"}, - - { ER_NO_APPLY_IMPORT_IN_FOR_EACH, - "xsl:apply-imports n\u00E3o permitido em um xsl:for-each"}, - - { ER_CANT_USE_DTM_FOR_OUTPUT, - "N\u00E3o \u00E9 poss\u00EDvel usar um DTMLiaison para um n\u00F3 DOM de sa\u00EDda... em vez disso, especifique um com.sun.org.apache.xpath.internal.DOM2Helper!"}, - - { ER_CANT_USE_DTM_FOR_INPUT, - "N\u00E3o \u00E9 poss\u00EDvel usar um DTMLiaison para um n\u00F3 DOM de entrada... em vez disso, especifique um com.sun.org.apache.xpath.internal.DOM2Helper!"}, - - { ER_CALL_TO_EXT_FAILED, - "Falha ao chamar o elemento da extens\u00E3o: {0}"}, - - { ER_PREFIX_MUST_RESOLVE, - "O prefixo deve ser resolvido para um namespace: {0}"}, - - { ER_INVALID_UTF16_SURROGATE, - "Foi detectado um substituto de UTF-16 inv\u00E1lido: {0} ?"}, - - { ER_XSLATTRSET_USED_ITSELF, - "xsl:attribute-set {0} usou ele mesmo, o que causar\u00E1 um loop infinito."}, - - { ER_CANNOT_MIX_XERCESDOM, - "N\u00E3o \u00E9 poss\u00EDvel misturar entrada n\u00E3o Xerces-DOM com sa\u00EDda Xerces-DOM!"}, - - { ER_TOO_MANY_LISTENERS, - "addTraceListenersToStylesheet - TooManyListenersException"}, - - { ER_IN_ELEMTEMPLATEELEM_READOBJECT, - "No ElemTemplateElement.readObject: {0}"}, - - { ER_DUPLICATE_NAMED_TEMPLATE, - "Foi encontrado mais de um modelo com o nome: {0}"}, - - { ER_INVALID_KEY_CALL, - "Chamada de fun\u00E7\u00E3o inv\u00E1lida: chamadas recursivas de key() n\u00E3o s\u00E3o permitidas"}, - - { ER_REFERENCING_ITSELF, - "A vari\u00E1vel {0} est\u00E1 importando ela mesma de forma direta ou indireta!"}, - - { ER_ILLEGAL_DOMSOURCE_INPUT, - "O n\u00F3 de entrada n\u00E3o pode ser nulo para um DOMSource para newTemplates!"}, - - { ER_CLASS_NOT_FOUND_FOR_OPTION, - "O arquivo de classe n\u00E3o foi encontrado para a op\u00E7\u00E3o {0}"}, - - { ER_REQUIRED_ELEM_NOT_FOUND, - "Elemento Obrigat\u00F3rio n\u00E3o encontrado: {0}"}, - - { ER_INPUT_CANNOT_BE_NULL, - "InputStream n\u00E3o pode ser nulo"}, - - { ER_URI_CANNOT_BE_NULL, - "O URI n\u00E3o pode ser nulo"}, - - { ER_FILE_CANNOT_BE_NULL, - "O arquivo n\u00E3o pode ser nulo"}, - - { ER_SOURCE_CANNOT_BE_NULL, - "InputSource n\u00E3o pode ser nulo"}, - - { ER_CANNOT_INIT_BSFMGR, - "N\u00E3o foi poss\u00EDvel inicializar o Gerenciador de BSF"}, - - { ER_CANNOT_CMPL_EXTENSN, - "N\u00E3o foi poss\u00EDvel compilar a extens\u00E3o"}, - - { ER_CANNOT_CREATE_EXTENSN, - "N\u00E3o foi poss\u00EDvel criar a extens\u00E3o: {0} em decorr\u00EAncia de: {1}"}, - - { ER_INSTANCE_MTHD_CALL_REQUIRES, - "A chamada do m\u00E9todo da inst\u00E2ncia para o m\u00E9todo {0} exige uma inst\u00E2ncia do Objeto como primeiro argumento"}, - - { ER_INVALID_ELEMENT_NAME, - "Nome de elemento inv\u00E1lido especificado {0}"}, - - { ER_ELEMENT_NAME_METHOD_STATIC, - "O m\u00E9todo do nome do elemento deve ser est\u00E1tico {0}"}, - - { ER_EXTENSION_FUNC_UNKNOWN, - "Fun\u00E7\u00E3o da extens\u00E3o {0} : {1} desconhecido"}, - - { ER_MORE_MATCH_CONSTRUCTOR, - "H\u00E1 mais de uma melhor correspond\u00EAncia para o construtor em rela\u00E7\u00E3o a {0}"}, - - { ER_MORE_MATCH_METHOD, - "H\u00E1 mais de uma melhor correspond\u00EAncia para o m\u00E9todo {0}"}, - - { ER_MORE_MATCH_ELEMENT, - "H\u00E1 mais de uma melhor correspond\u00EAncia para o m\u00E9todo do elemento {0}"}, - - { ER_INVALID_CONTEXT_PASSED, - "Contexto inv\u00E1lido especificado para avaliar {0}"}, - - { ER_POOL_EXISTS, - "O pool j\u00E1 existe"}, - - { ER_NO_DRIVER_NAME, - "Nenhum Nome do driver especificado"}, - - { ER_NO_URL, - "Nenhum URL especificado"}, - - { ER_POOL_SIZE_LESSTHAN_ONE, - "O tamanho do pool \u00E9 menor que um!"}, - - { ER_INVALID_DRIVER, - "Nome do driver inv\u00E1lido especificado!"}, - - { ER_NO_STYLESHEETROOT, - "A raiz da folha de estilos n\u00E3o foi encontrada!"}, - - { ER_ILLEGAL_XMLSPACE_VALUE, - "Valor inv\u00E1lido para xml:space"}, - - { ER_PROCESSFROMNODE_FAILED, - "Falha em processFromNode"}, - - { ER_RESOURCE_COULD_NOT_LOAD, - "O recurso [ {0} ] n\u00E3o foi carregado: {1} \n {2} \t {3}"}, - - { ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Tamanho do buffer <=0"}, - - { ER_UNKNOWN_ERROR_CALLING_EXTENSION, - "Erro desconhecido ao chamar a extens\u00E3o"}, - - { ER_NO_NAMESPACE_DECL, - "O prefixo {0} n\u00E3o tem uma declara\u00E7\u00E3o de namespace correspondente"}, - - { ER_ELEM_CONTENT_NOT_ALLOWED, - "Conte\u00FAdo do elemento n\u00E3o permitido para lang=javaclass {0}"}, - - { ER_STYLESHEET_DIRECTED_TERMINATION, - "T\u00E9rmino direcionado da folha de estilos"}, - - { ER_ONE_OR_TWO, - "1 ou 2"}, - - { ER_TWO_OR_THREE, - "2 ou 3"}, - - { ER_COULD_NOT_LOAD_RESOURCE, - "N\u00E3o foi poss\u00EDvel carregar {0} (verificar CLASSPATH); usando agora apenas os padr\u00F5es"}, - - { ER_CANNOT_INIT_DEFAULT_TEMPLATES, - "N\u00E3o \u00E9 poss\u00EDvel inicializar os modelos padr\u00E3o"}, - - { ER_RESULT_NULL, - "O resultado n\u00E3o deve ser nulo"}, - - { ER_RESULT_COULD_NOT_BE_SET, - "N\u00E3o foi poss\u00EDvel definir o resultado"}, - - { ER_NO_OUTPUT_SPECIFIED, - "Nenhuma sa\u00EDda especificada"}, - - { ER_CANNOT_TRANSFORM_TO_RESULT_TYPE, - "N\u00E3o \u00E9 poss\u00EDvel transformar um Resultado do tipo {0}"}, - - { ER_CANNOT_TRANSFORM_SOURCE_TYPE, - "N\u00E3o \u00E9 poss\u00EDvel transformar uma Origem do tipo {0}"}, - - { ER_NULL_CONTENT_HANDLER, - "Handler de conte\u00FAdo nulo"}, - - { ER_NULL_ERROR_HANDLER, - "Handler de erro nulo"}, - - { ER_CANNOT_CALL_PARSE, - "o parsing n\u00E3o poder\u00E1 ser chamado se o ContentHandler n\u00E3o tiver sido definido"}, - - { ER_NO_PARENT_FOR_FILTER, - "Nenhum pai para o filtro"}, - - { ER_NO_STYLESHEET_IN_MEDIA, - "Nenhuma folha de estilos encontrada em: {0}, m\u00EDdia= {1}"}, - - { ER_NO_STYLESHEET_PI, - "Nenhum PI de xml-stylesheet encontrado em: {0}"}, - - { ER_NOT_SUPPORTED, - "N\u00E3o suportado: {0}"}, - - { ER_PROPERTY_VALUE_BOOLEAN, - "O valor da propriedade {0} deve ser uma inst\u00E2ncia Booliana"}, - - { ER_COULD_NOT_FIND_EXTERN_SCRIPT, - "N\u00E3o foi poss\u00EDvel obter um script externo em {0}"}, - - { ER_RESOURCE_COULD_NOT_FIND, - "N\u00E3o foi poss\u00EDvel encontrar o recurso [ {0} ].\n {1}"}, - - { ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, - "Propriedade de sa\u00EDda n\u00E3o reconhecida: {0}"}, - - { ER_FAILED_CREATING_ELEMLITRSLT, - "Falha ao criar a inst\u00E2ncia ElemLiteralResult"}, - - //Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE - // In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care - //in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc. - //NOTE: Not only the key name but message has also been changed. - { ER_VALUE_SHOULD_BE_NUMBER, - "O valor para {0} deve conter um n\u00FAmero pass\u00EDvel de parsing"}, - - { ER_VALUE_SHOULD_EQUAL, - "O valor para {0} deve ser igual a sim ou n\u00E3o"}, - - { ER_FAILED_CALLING_METHOD, - "Falha ao chamar o m\u00E9todo {0}"}, - - { ER_FAILED_CREATING_ELEMTMPL, - "Falha ao criar a inst\u00E2ncia ElemTemplateElement"}, - - { ER_CHARS_NOT_ALLOWED, - "Os caracteres n\u00E3o s\u00E3o permitidos neste ponto do documento"}, - - { ER_ATTR_NOT_ALLOWED, - "O atributo \"{0}\" n\u00E3o \u00E9 permitido no elemento {1}!"}, - - { ER_BAD_VALUE, - "{0} valor incorreto {1} "}, - - { ER_ATTRIB_VALUE_NOT_FOUND, - "valor do atributo {0} n\u00E3o encontrado "}, - - { ER_ATTRIB_VALUE_NOT_RECOGNIZED, - "Valor do atributo {0} n\u00E3o reconhecido "}, - - { ER_NULL_URI_NAMESPACE, - "Tentativa de gerar um prefixo do namespace com um URI nulo"}, - - { ER_NUMBER_TOO_BIG, - "Tentativa de formatar um n\u00FAmero maior que o n\u00FAmero inteiro Longo maior"}, - - { ER_CANNOT_FIND_SAX1_DRIVER, - "N\u00E3o \u00E9 poss\u00EDvel localizar a classe do driver SAX1 {0}"}, - - { ER_SAX1_DRIVER_NOT_LOADED, - "A classe do driver SAX1 {0} foi encontrada, mas n\u00E3o pode ser carregada"}, - - { ER_SAX1_DRIVER_NOT_INSTANTIATED, - "A classe do driver SAX1 {0} foi carregada, mas n\u00E3o pode ser instanciada"}, - - { ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER, - "A classe do driver SAX1 {0} n\u00E3o implementa org.xml.sax.Parser"}, - - { ER_PARSER_PROPERTY_NOT_SPECIFIED, - "A propriedade do sistema org.xml.sax.parser n\u00E3o foi especificada"}, - - { ER_PARSER_ARG_CANNOT_BE_NULL, - "O argumento de parser n\u00E3o pode ser nulo"}, - - { ER_FEATURE, - "Recurso: {0}"}, - - { ER_PROPERTY, - "Propriedade: {0}"}, - - { ER_NULL_ENTITY_RESOLVER, - "Resolvedor da entidade nulo"}, - - { ER_NULL_DTD_HANDLER, - "Handler de DTD nulo"}, - - { ER_NO_DRIVER_NAME_SPECIFIED, - "Nenhum Nome do Driver Especificado!"}, - - { ER_NO_URL_SPECIFIED, - "Nenhum URL Especificado!"}, - - { ER_POOLSIZE_LESS_THAN_ONE, - "O tamanho do pool \u00E9 menor que 1!"}, - - { ER_INVALID_DRIVER_NAME, - "Nome do Driver Especificado Inv\u00E1lido!"}, - - { ER_ERRORLISTENER, - "ErrorListener"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The name -// 'ElemTemplateElement' is the name of a class, and should not be -// translated. - { ER_ASSERT_NO_TEMPLATE_PARENT, - "Erro do programador! A express\u00E3o n\u00E3o tem ElemTemplateElement pai!"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The substitution text -// provides further information in order to diagnose the problem. The name -// 'RedundentExprEliminator' is the name of a class, and should not be -// translated. - { ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR, - "Asser\u00E7\u00E3o do Programador no RedundentExprEliminator: {0}"}, - - { ER_NOT_ALLOWED_IN_POSITION, - "{0} n\u00E3o \u00E9 permitido(a) nesta posi\u00E7\u00E3o na folha de estilos!"}, - - { ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION, - "Texto sem espa\u00E7o em branco n\u00E3o permitido nesta posi\u00E7\u00E3o na folha de estilos!"}, - - // This code is shared with warning codes. - // SystemId Unknown - { INVALID_TCHAR, - "Valor inv\u00E1lido: {1} usado para o atributo CHAR: {0}. Um atributo do tipo CHAR deve ter somente 1 caractere!"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "QNAME" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value and {0} is the attribute name. - //The following codes are shared with the warning codes... - { INVALID_QNAME, - "Valor inv\u00E1lido: {1} usado para o atributo QNAME: {0}"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "ENUM" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value, {0} is the attribute name, and {2} is a list of valid - // values. - { INVALID_ENUM, - "Valor inv\u00E1lido: {1} usado para o atributo ENUM: {0}. Os valores v\u00E1lidos s\u00E3o: {2}."}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NMTOKEN" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NMTOKEN, - "Valor inv\u00E1lido: {1} usado para o atributo NMTOKEN: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NCNAME" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NCNAME, - "Valor inv\u00E1lido: {1} usado para o atributo NCNAME: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "boolean" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_BOOLEAN, - "Valor inv\u00E1lido: {1} usado para o atributo boolean: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "number" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NUMBER, - "Valor inv\u00E1lido: {1} usado para o atributo do n\u00FAmero: {0} "}, - - - // End of shared codes... - -// Note to translators: A "match pattern" is a special form of XPath expression -// that is used for matching patterns. The substitution text is the name of -// a function. The message indicates that when this function is referenced in -// a match pattern, its argument must be a string literal (or constant.) -// ER_ARG_LITERAL - new error message for bugzilla //5202 - { ER_ARG_LITERAL, - "O argumento para {0} no padr\u00E3o de correspond\u00EAncia deve ser um literal."}, - -// Note to translators: The following message indicates that two definitions of -// a variable. A "global variable" is a variable that is accessible everywher -// in the stylesheet. -// ER_DUPLICATE_GLOBAL_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_GLOBAL_VAR, - "Declara\u00E7\u00E3o de vari\u00E1vel global duplicada."}, - - -// Note to translators: The following message indicates that two definitions of -// a variable were encountered. -// ER_DUPLICATE_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_VAR, - "Declara\u00E7\u00E3o de vari\u00E1vel duplicada."}, - - // Note to translators: "xsl:template, "name" and "match" are XSLT keywords - // which must not be translated. - // ER_TEMPLATE_NAME_MATCH - new error message for bugzilla #789 - { ER_TEMPLATE_NAME_MATCH, - "xsl:template deve ter um atributo name ou match (ou ambos)"}, - - // Note to translators: "exclude-result-prefixes" is an XSLT keyword which - // should not be translated. The message indicates that a namespace prefix - // encountered as part of the value of the exclude-result-prefixes attribute - // was in error. - // ER_INVALID_PREFIX - new error message for bugzilla #788 - { ER_INVALID_PREFIX, - "O prefixo em exclude-result-prefixes n\u00E3o \u00E9 v\u00E1lido: {0}"}, - - // Note to translators: An "attribute set" is a set of attributes that can - // be added to an element in the output document as a group. The message - // indicates that there was a reference to an attribute set named {0} that - // was never defined. - // ER_NO_ATTRIB_SET - new error message for bugzilla #782 - { ER_NO_ATTRIB_SET, - "o conjunto de atributos com o nome {0} n\u00E3o existe"}, - - // Note to translators: This message indicates that there was a reference - // to a function named {0} for which no function definition could be found. - { ER_FUNCTION_NOT_FOUND, - "A fun\u00E7\u00E3o com o nome {0} n\u00E3o existe"}, - - // Note to translators: This message indicates that the XSLT instruction - // that is named by the substitution text {0} must not contain other XSLT - // instructions (content) or a "select" attribute. The word "select" is - // an XSLT keyword in this case and must not be translated. - { ER_CANT_HAVE_CONTENT_AND_SELECT, - "O elemento {0} n\u00E3o deve ter um conte\u00FAdo e um atributo select."}, - - // Note to translators: This message indicates that the value argument - // of setParameter must be a valid Java Object. - { ER_INVALID_SET_PARAM_VALUE, - "O valor do par\u00E2metro {0} deve ser um Objeto Java v\u00E1lido"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT, - "O atributo result-prefix de um elemento xsl:namespace-alias tem o valor '#padr\u00E3o', mas n\u00E3o h\u00E1 declara\u00E7\u00E3o do namespace padr\u00E3o no escopo do elemento"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX, - "O atributo result-prefix de um elemento xsl:namespace-alias tem o valor ''{0}'', mas n\u00E3o h\u00E1 declara\u00E7\u00E3o de namespace para o prefixo ''{0}'' no escopo do elemento."}, - - { ER_SET_FEATURE_NULL_NAME, - "O nome do recurso n\u00E3o pode ser nulo em TransformerFactory.setFeature(Nome da string, valor booliano)."}, - - { ER_GET_FEATURE_NULL_NAME, - "O nome do recurso n\u00E3o pode ser nulo em TransformerFactory.getFeature(Nome da string)."}, - - { ER_UNSUPPORTED_FEATURE, - "N\u00E3o \u00E9 poss\u00EDvel definir o recurso ''{0}'' nesta TransformerFactory."}, - - { ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING, - "O uso do elemento da extens\u00E3o ''{0}'' n\u00E3o ser\u00E1 permitido quando o recurso de processamento seguro for definido como verdadeiro."}, - - { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE, - "N\u00E3o \u00E9 poss\u00EDvel obter o prefixo de um uri de namespace nulo."}, - - { ER_NAMESPACE_CONTEXT_NULL_PREFIX, - "N\u00E3o \u00E9 poss\u00EDvel obter o uri do namespace do prefixo nulo."}, - - { ER_XPATH_RESOLVER_NULL_QNAME, - "O nome da fun\u00E7\u00E3o n\u00E3o pode ser nulo."}, - - { ER_XPATH_RESOLVER_NEGATIVE_ARITY, - "A aridade n\u00E3o pode ser negativa."}, - // Warnings... - - { WG_FOUND_CURLYBRACE, - "Encontrou '}', mas nenhum modelo do atributo estava aberto!"}, - - { WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR, - "Advert\u00EAncia: o atributo de contagem n\u00E3o corresponde a um ancestral no xsl:number! Alvo = {0}"}, - - { WG_EXPR_ATTRIB_CHANGED_TO_SELECT, - "Sintaxe antiga: O nome do atributo 'expr' foi alterado para 'select'."}, - - { WG_NO_LOCALE_IN_FORMATNUMBER, - "O Xalan ainda n\u00E3o trata o nome das configura\u00E7\u00F5es regionais na fun\u00E7\u00E3o format-number."}, - - { WG_LOCALE_NOT_FOUND, - "Advert\u00EAncia: N\u00E3o foi poss\u00EDvel encontrar o nome das configura\u00E7\u00F5es regionais de xml:lang={0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "N\u00E3o \u00E9 poss\u00EDvel criar o URL de: {0}"}, - - { WG_CANNOT_LOAD_REQUESTED_DOC, - "N\u00E3o \u00E9 poss\u00EDvel carregar o doc solicitado: {0}"}, - - { WG_CANNOT_FIND_COLLATOR, - "N\u00E3o foi poss\u00EDvel localizar o Agrupador para >>>>>> Vers\u00E3o do Xalan "}, - { "version2", "<<<<<<<"}, - { "yes", "sim"}, - { "line", "N\u00B0 da Linha"}, - { "column","N\u00B0 da Coluna"}, - { "xsldone", "XSLProcessor: conclu\u00EDdo"}, - - - // Note to translators: The following messages provide usage information - // for the Xalan Process command line. "Process" is the name of a Java class, - // and should not be translated. - { "xslProc_option", "Op\u00E7\u00F5es da classe Process da linha de comandos do Xalan-J:"}, - { "xslProc_option", "Op\u00E7\u00F5es da classe Process da linha de comandos do Xalan-J:"}, - { "xslProc_invalid_xsltc_option", "A op\u00E7\u00E3o {0} n\u00E3o \u00E9 suportada no modo XSLTC."}, - { "xslProc_invalid_xalan_option", "A op\u00E7\u00E3o {0} s\u00F3 pode ser usada com -XSLTC."}, - { "xslProc_no_input", "Erro: N\u00E3o foi especificada uma folha de estilos ou um xml de entrada . Execute este comando sem nenhuma op\u00E7\u00E3o para instru\u00E7\u00F5es de uso."}, - { "xslProc_common_options", "-Op\u00E7\u00F5es Comuns-"}, - { "xslProc_xalan_options", "-Op\u00E7\u00F5es para Xalan-"}, - { "xslProc_xsltc_options", "-Op\u00E7\u00F5es para XSLTC-"}, - { "xslProc_return_to_continue", "(pressione para continuar)"}, - - // Note to translators: The option name and the parameter name do not need to - // be translated. Only translate the messages in parentheses. Note also that - // leading whitespace in the messages is used to indent the usage information - // for each option in the English messages. - // Do not translate the keywords: XSLTC, SAX, DOM and DTM. - { "optionXSLTC", " [-XSLTC (use XSLTC para transforma\u00E7\u00E3o)]"}, - { "optionIN", " [-IN inputXMLURL]"}, - { "optionXSL", " [-XSL XSLTransformationURL]"}, - { "optionOUT", " [-OUT outputFileName]"}, - { "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"}, - { "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"}, - { "optionPARSER", " [-PARSER nome da classe totalmente qualificado de liaison de parser]"}, - { "optionE", " [-E (N\u00E3o expandir refer\u00EAncias da entidade)]"}, - { "optionV", " [-E (N\u00E3o expandir refer\u00EAncias da entidade)]"}, - { "optionQC", " [-QC (Advert\u00EAncias de Conflitos do Padr\u00E3o Silencioso)]"}, - { "optionQ", " [-Q (Modo Silencioso)]"}, - { "optionLF", " [-LF (Usar alimenta\u00E7\u00F5es de linha somente na sa\u00EDda {o padr\u00E3o \u00E9 CR/LF})]"}, - { "optionCR", " [-CR (Use retornos de carro somente na sa\u00EDda {o padr\u00E3o \u00E9 CR/LF})]"}, - { "optionESCAPE", " [-ESCAPE (Quais caracteres devem ser identificados como escape {o padr\u00E3o \u00E9 <>&\"'\\r\\n}]"}, - { "optionINDENT", " [-INDENT (Controla quantos espa\u00E7os devem ser recuados {o padr\u00E3o \u00E9 0})]"}, - { "optionTT", " [-TT (Rastreia os modelos \u00E0 medida que s\u00E3o chamados.)]"}, - { "optionTG", " [-TG (Rastreia cada evento de gera\u00E7\u00E3o.)]"}, - { "optionTS", " [-TS (Rastreia cada evento de sele\u00E7\u00E3o.)]"}, - { "optionTTC", " [-TTC (Rastreia os filhos do modelo \u00E0 medida que s\u00E3o processados.)]"}, - { "optionTCLASS", " [-TCLASS (Classe TraceListener para extens\u00F5es de rastreamento.)]"}, - { "optionVALIDATE", " [-VALIDATE (Define se ocorre valida\u00E7\u00E3o. Por padr\u00E3o, a valida\u00E7\u00E3o fica desativada.)]"}, - { "optionEDUMP", " [-EDUMP {nome do arquivo opcional} (Execute um dump de pilha em caso de erro.)]"}, - { "optionXML", " [-XML (Use o formatador XML e adicione o cabe\u00E7alho XML.)]"}, - { "optionTEXT", " [-TEXT (Use o formatador de Texto simples.)]"}, - { "optionHTML", " [-HTML (Use o formatador HTML.)]"}, - { "optionPARAM", " [-PARAM express\u00E3o do nome (Defina um par\u00E2metro da folha de estilos)]"}, - { "noParsermsg1", "Processo XSL malsucedido."}, - { "noParsermsg2", "** N\u00E3o foi poss\u00EDvel localizar o parser **"}, - { "noParsermsg3", "Verifique seu classpath."}, - { "noParsermsg4", "Se voc\u00EA n\u00E3o tiver um Parser XML da IBM para Java, poder\u00E1 fazer download dele em"}, - { "noParsermsg5", "AlphaWorks da IBM: http://www.alphaworks.ibm.com/formula/xml"}, - { "optionURIRESOLVER", " [-URIRESOLVER nome completo da classe (URIResolver a ser usado para resolver URIs)]"}, - { "optionENTITYRESOLVER", " [-ENTITYRESOLVER nome completo da classe (EntityResolver a ser usado para resolver entidades)]"}, - { "optionCONTENTHANDLER", " [-CONTENTHANDLER nome completo da classe (ContentHandler a ser usado para serializar a sa\u00EDda)]"}, - { "optionLINENUMBERS", " [-L usa os n\u00FAmeros de linha dos documentos de origem]"}, - { "optionSECUREPROCESSING", " [-SECURE (define o recurso de processamento seguro como verdadeiro.)]"}, - - // Following are the new options added in XSLTErrorResources.properties files after Jdk 1.4 (Xalan 2.2-D11) - - - { "optionMEDIA", " [-MEDIA mediaType (use o atributo de m\u00EDdia para localizar a folha de estilos associada a um documento.)]"}, - { "optionFLAVOR", " [-FLAVOR flavorName (Use explicitamente s2s=SAX ou d2d=DOM para fazer a transforma\u00E7\u00E3o.)] "}, // Added by sboag/scurcuru; experimental - { "optionDIAG", " [-DIAG (Imprimir transforma\u00E7\u00E3o geral de milissegundos detectada.)]"}, - { "optionINCREMENTAL", " [-INCREMENTAL (solicitar a constru\u00E7\u00E3o de DTM incremental, definindo http://xml.apache.org/xalan/features/incremental como verdadeiro.)]"}, - { "optionNOOPTIMIMIZE", " [-NOOPTIMIMIZE (solicite o n\u00E3o processamento de otimiza\u00E7\u00E3o da folha de estilos definindo http://xml.apache.org/xalan/features/optimize como falso.)]"}, - { "optionRL", " [-RL recursionlimit (limite num\u00E9rico de asser\u00E7\u00E3o na profundidade de recurs\u00E3o da folha de estilos.)]"}, - { "optionXO", " [-XO [transletName] (atribui o nome ao translet gerado)]"}, - { "optionXD", " [-XD destinationDirectory (especificar um diret\u00F3rio de destino para translet)]"}, - { "optionXJ", " [-XJ jarfile (empacotar classes do translet em um arquivo jar com o nome )]"}, - { "optionXP", " [-XP pacote (especifica um prefixo de nome do pacote para todas as classes translet geradas)]"}, - - //AddITIONAL STRINGS that need L10n - // Note to translators: The following message describes usage of a particular - // command-line option that is used to enable the "template inlining" - // optimization. The optimization involves making a copy of the code - // generated for a template in another template that refers to it. - { "optionXN", " [-XN (ativa a inser\u00E7\u00E3o do modelo)]" }, - { "optionXX", " [-XX (ativa a sa\u00EDda da mensagem de depura\u00E7\u00E3o adicional)]"}, - { "optionXT" , " [-XT (usar o translet para transformar, se poss\u00EDvel)]"}, - { "diagTiming"," --------- A transforma\u00E7\u00E3o de {0} por meio de {1} levou {2} ms" }, - { "recursionTooDeep","Aninhamento do modelo muito profundo. aninhamento = {0}, modelo {1} {2}" }, - { "nameIs", "o nome \u00E9" }, - { "matchPatternIs", "o padr\u00E3o de correspond\u00EAncia \u00E9" } - - }; - - } - // ================= INFRASTRUCTURE ====================== - - /** String for use when a bad error code was encountered. */ - public static final String BAD_CODE = "BAD_CODE"; - - /** String for use when formatting of the error string failed. */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java deleted file mode 100644 index 556de2d22bc..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java +++ /dev/null @@ -1,1425 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And - * you need to enter key , value pair as part of contents - * Array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XSLTErrorResources_sv extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /* - * Static variables - */ - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX = - "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX"; - - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT = - "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT"; - - public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE"; - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE"; - public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS"; - public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD"; - public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES"; - public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB"; - public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND"; - public static final String ER_CANT_RESOLVE_NAME_AVT = "ER_CANT_RESOLVE_NAME_AVT"; - public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB"; - public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB"; - public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB = - "ER_BAD_VAL_ON_LEVEL_ATTRIB"; - public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB"; - public static final String ER_NEED_NAME_OR_MATCH_ATTRIB = - "ER_NEED_NAME_OR_MATCH_ATTRIB"; - public static final String ER_CANT_RESOLVE_NSPREFIX = - "ER_CANT_RESOLVE_NSPREFIX"; - public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE"; - public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC"; - public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR"; - public static final String ER_NULL_CHILD = "ER_NULL_CHILD"; - public static final String ER_NEED_SELECT_ATTRIB = "ER_NEED_SELECT_ATTRIB"; - public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB"; - public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB"; - public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC"; - public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON = - "ER_COULD_NOT_CREATE_XML_PROC_LIAISON"; - public static final String ER_PROCESS_NOT_SUCCESSFUL = - "ER_PROCESS_NOT_SUCCESSFUL"; - public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL"; - public static final String ER_ENCODING_NOT_SUPPORTED = - "ER_ENCODING_NOT_SUPPORTED"; - public static final String ER_COULD_NOT_CREATE_TRACELISTENER = - "ER_COULD_NOT_CREATE_TRACELISTENER"; - public static final String ER_KEY_REQUIRES_NAME_ATTRIB = - "ER_KEY_REQUIRES_NAME_ATTRIB"; - public static final String ER_KEY_REQUIRES_MATCH_ATTRIB = - "ER_KEY_REQUIRES_MATCH_ATTRIB"; - public static final String ER_KEY_REQUIRES_USE_ATTRIB = - "ER_KEY_REQUIRES_USE_ATTRIB"; - public static final String ER_REQUIRES_ELEMENTS_ATTRIB = - "ER_REQUIRES_ELEMENTS_ATTRIB"; - public static final String ER_MISSING_PREFIX_ATTRIB = - "ER_MISSING_PREFIX_ATTRIB"; - public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL"; - public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND"; - public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION"; - public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB"; - public static final String ER_STYLESHEET_INCLUDES_ITSELF = - "ER_STYLESHEET_INCLUDES_ITSELF"; - public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR"; - public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB"; - public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT = - "ER_MISSING_CONTAINER_ELEMENT_COMPONENT"; - public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT = - "ER_CAN_ONLY_OUTPUT_TO_ELEMENT"; - public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR"; - public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR"; - public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION"; - public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR = - "ER_CANNOT_SERIALIZE_XSLPROCESSOR"; - public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET"; - public static final String ER_FAILED_PROCESS_STYLESHEET = - "ER_FAILED_PROCESS_STYLESHEET"; - public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC"; - public static final String ER_COULDNT_FIND_FRAGMENT = - "ER_COULDNT_FIND_FRAGMENT"; - public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT"; - public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB = - "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB = - "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG = - "ER_NO_CLONE_OF_DOCUMENT_FRAG"; - public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM"; - public static final String ER_XMLSPACE_ILLEGAL_VALUE = - "ER_XMLSPACE_ILLEGAL_VALUE"; - public static final String ER_NO_XSLKEY_DECLARATION = - "ER_NO_XSLKEY_DECLARATION"; - public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL"; - public static final String ER_XSLFUNCTIONS_UNSUPPORTED = - "ER_XSLFUNCTIONS_UNSUPPORTED"; - public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR"; - public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET = - "ER_NOT_ALLOWED_INSIDE_STYLESHEET"; - public static final String ER_RESULTNS_NOT_SUPPORTED = - "ER_RESULTNS_NOT_SUPPORTED"; - public static final String ER_DEFAULTSPACE_NOT_SUPPORTED = - "ER_DEFAULTSPACE_NOT_SUPPORTED"; - public static final String ER_INDENTRESULT_NOT_SUPPORTED = - "ER_INDENTRESULT_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB"; - public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM"; - public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE"; - public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN"; - public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_MISPLACED_XSLOTHERWISE = - "ER_MISPLACED_XSLOTHERWISE"; - public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE = - "ER_NOT_ALLOWED_INSIDE_TEMPLATE"; - public static final String ER_UNKNOWN_EXT_NS_PREFIX = - "ER_UNKNOWN_EXT_NS_PREFIX"; - public static final String ER_IMPORTS_AS_FIRST_ELEM = - "ER_IMPORTS_AS_FIRST_ELEM"; - public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF"; - public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL"; - public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL = - "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL"; - public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION"; - public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR"; - public static final String ER_CURRENCY_SIGN_ILLEGAL= - "ER_CURRENCY_SIGN_ILLEGAL"; - public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM = - "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM"; - public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER = - "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER"; - public static final String ER_REDIRECT_COULDNT_GET_FILENAME = - "ER_REDIRECT_COULDNT_GET_FILENAME"; - public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT = - "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT"; - public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX = - "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX"; - public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI"; - public static final String ER_MISSING_ARG_FOR_OPTION = - "ER_MISSING_ARG_FOR_OPTION"; - public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION"; - public static final String ER_MALFORMED_FORMAT_STRING = - "ER_MALFORMED_FORMAT_STRING"; - public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String ER_ILLEGAL_ATTRIBUTE_VALUE = - "ER_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN"; - public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH = - "ER_NO_APPLY_IMPORT_IN_FOR_EACH"; - public static final String ER_CANT_USE_DTM_FOR_OUTPUT = - "ER_CANT_USE_DTM_FOR_OUTPUT"; - public static final String ER_CANT_USE_DTM_FOR_INPUT = - "ER_CANT_USE_DTM_FOR_INPUT"; - public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_XSLATTRSET_USED_ITSELF = - "ER_XSLATTRSET_USED_ITSELF"; - public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM"; - public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS"; - public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT = - "ER_IN_ELEMTEMPLATEELEM_READOBJECT"; - public static final String ER_DUPLICATE_NAMED_TEMPLATE = - "ER_DUPLICATE_NAMED_TEMPLATE"; - public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL"; - public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF"; - public static final String ER_ILLEGAL_DOMSOURCE_INPUT = - "ER_ILLEGAL_DOMSOURCE_INPUT"; - public static final String ER_CLASS_NOT_FOUND_FOR_OPTION = - "ER_CLASS_NOT_FOUND_FOR_OPTION"; - public static final String ER_REQUIRED_ELEM_NOT_FOUND = - "ER_REQUIRED_ELEM_NOT_FOUND"; - public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL"; - public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL"; - public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL"; - public static final String ER_SOURCE_CANNOT_BE_NULL = - "ER_SOURCE_CANNOT_BE_NULL"; - public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR"; - public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN"; - public static final String ER_CANNOT_CREATE_EXTENSN = - "ER_CANNOT_CREATE_EXTENSN"; - public static final String ER_INSTANCE_MTHD_CALL_REQUIRES = - "ER_INSTANCE_MTHD_CALL_REQUIRES"; - public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME"; - public static final String ER_ELEMENT_NAME_METHOD_STATIC = - "ER_ELEMENT_NAME_METHOD_STATIC"; - public static final String ER_EXTENSION_FUNC_UNKNOWN = - "ER_EXTENSION_FUNC_UNKNOWN"; - public static final String ER_MORE_MATCH_CONSTRUCTOR = - "ER_MORE_MATCH_CONSTRUCTOR"; - public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD"; - public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT"; - public static final String ER_INVALID_CONTEXT_PASSED = - "ER_INVALID_CONTEXT_PASSED"; - public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS"; - public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME"; - public static final String ER_NO_URL = "ER_NO_URL"; - public static final String ER_POOL_SIZE_LESSTHAN_ONE = - "ER_POOL_SIZE_LESSTHAN_ONE"; - public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER"; - public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT"; - public static final String ER_ILLEGAL_XMLSPACE_VALUE = - "ER_ILLEGAL_XMLSPACE_VALUE"; - public static final String ER_PROCESSFROMNODE_FAILED = - "ER_PROCESSFROMNODE_FAILED"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = - "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = - "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION = - "ER_UNKNOWN_ERROR_CALLING_EXTENSION"; - public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL"; - public static final String ER_ELEM_CONTENT_NOT_ALLOWED = - "ER_ELEM_CONTENT_NOT_ALLOWED"; - public static final String ER_STYLESHEET_DIRECTED_TERMINATION = - "ER_STYLESHEET_DIRECTED_TERMINATION"; - public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO"; - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = - "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES = - "ER_CANNOT_INIT_DEFAULT_TEMPLATES"; - public static final String ER_RESULT_NULL = "ER_RESULT_NULL"; - public static final String ER_RESULT_COULD_NOT_BE_SET = - "ER_RESULT_COULD_NOT_BE_SET"; - public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED"; - public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE = - "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE"; - public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE = - "ER_CANNOT_TRANSFORM_SOURCE_TYPE"; - public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER"; - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE"; - public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER"; - public static final String ER_NO_STYLESHEET_IN_MEDIA = - "ER_NO_STYLESHEET_IN_MEDIA"; - public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_PROPERTY_VALUE_BOOLEAN = - "ER_PROPERTY_VALUE_BOOLEAN"; - public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT = - "ER_COULD_NOT_FIND_EXTERN_SCRIPT"; - public static final String ER_RESOURCE_COULD_NOT_FIND = - "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED = - "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED"; - public static final String ER_FAILED_CREATING_ELEMLITRSLT = - "ER_FAILED_CREATING_ELEMLITRSLT"; - public static final String ER_VALUE_SHOULD_BE_NUMBER = - "ER_VALUE_SHOULD_BE_NUMBER"; - public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL"; - public static final String ER_FAILED_CALLING_METHOD = - "ER_FAILED_CALLING_METHOD"; - public static final String ER_FAILED_CREATING_ELEMTMPL = - "ER_FAILED_CREATING_ELEMTMPL"; - public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED"; - public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED"; - public static final String ER_BAD_VALUE = "ER_BAD_VALUE"; - public static final String ER_ATTRIB_VALUE_NOT_FOUND = - "ER_ATTRIB_VALUE_NOT_FOUND"; - public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED = - "ER_ATTRIB_VALUE_NOT_RECOGNIZED"; - public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE"; - public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG"; - public static final String ER_CANNOT_FIND_SAX1_DRIVER = - "ER_CANNOT_FIND_SAX1_DRIVER"; - public static final String ER_SAX1_DRIVER_NOT_LOADED = - "ER_SAX1_DRIVER_NOT_LOADED"; - public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED = - "ER_SAX1_DRIVER_NOT_INSTANTIATED" ; - public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER = - "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER"; - public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED = - "ER_PARSER_PROPERTY_NOT_SPECIFIED"; - public static final String ER_PARSER_ARG_CANNOT_BE_NULL = - "ER_PARSER_ARG_CANNOT_BE_NULL" ; - public static final String ER_FEATURE = "ER_FEATURE"; - public static final String ER_PROPERTY = "ER_PROPERTY" ; - public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER"; - public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ; - public static final String ER_NO_DRIVER_NAME_SPECIFIED = - "ER_NO_DRIVER_NAME_SPECIFIED"; - public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED"; - public static final String ER_POOLSIZE_LESS_THAN_ONE = - "ER_POOLSIZE_LESS_THAN_ONE"; - public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME"; - public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER"; - public static final String ER_ASSERT_NO_TEMPLATE_PARENT = - "ER_ASSERT_NO_TEMPLATE_PARENT"; - public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR = - "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR"; - public static final String ER_NOT_ALLOWED_IN_POSITION = - "ER_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION = - "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE = - "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE"; - public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX = - "ER_NAMESPACE_CONTEXT_NULL_PREFIX"; - public static final String ER_XPATH_RESOLVER_NULL_QNAME = - "ER_XPATH_RESOLVER_NULL_QNAME"; - public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY = - "ER_XPATH_RESOLVER_NEGATIVE_ARITY"; - public static final String INVALID_TCHAR = "INVALID_TCHAR"; - public static final String INVALID_QNAME = "INVALID_QNAME"; - public static final String INVALID_ENUM = "INVALID_ENUM"; - public static final String INVALID_NMTOKEN = "INVALID_NMTOKEN"; - public static final String INVALID_NCNAME = "INVALID_NCNAME"; - public static final String INVALID_BOOLEAN = "INVALID_BOOLEAN"; - public static final String INVALID_NUMBER = "INVALID_NUMBER"; - public static final String ER_ARG_LITERAL = "ER_ARG_LITERAL"; - public static final String ER_DUPLICATE_GLOBAL_VAR ="ER_DUPLICATE_GLOBAL_VAR"; - public static final String ER_DUPLICATE_VAR = "ER_DUPLICATE_VAR"; - public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH"; - public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX"; - public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET"; - public static final String ER_FUNCTION_NOT_FOUND = - "ER_FUNCTION_NOT_FOUND"; - public static final String ER_CANT_HAVE_CONTENT_AND_SELECT = - "ER_CANT_HAVE_CONTENT_AND_SELECT"; - public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE"; - public static final String ER_SET_FEATURE_NULL_NAME = - "ER_SET_FEATURE_NULL_NAME"; - public static final String ER_GET_FEATURE_NULL_NAME = - "ER_GET_FEATURE_NULL_NAME"; - public static final String ER_UNSUPPORTED_FEATURE = - "ER_UNSUPPORTED_FEATURE"; - public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING = - "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING"; - - public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE"; - public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR = - "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR"; - public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT = - "WG_EXPR_ATTRIB_CHANGED_TO_SELECT"; - public static final String WG_NO_LOCALE_IN_FORMATNUMBER = - "WG_NO_LOCALE_IN_FORMATNUMBER"; - public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_CANNOT_LOAD_REQUESTED_DOC = - "WG_CANNOT_LOAD_REQUESTED_DOC"; - public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR"; - public static final String WG_FUNCTIONS_SHOULD_USE_URL = - "WG_FUNCTIONS_SHOULD_USE_URL"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 = - "WG_ENCODING_NOT_SUPPORTED_USING_UTF8"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA = - "WG_ENCODING_NOT_SUPPORTED_USING_JAVA"; - public static final String WG_SPECIFICITY_CONFLICTS = - "WG_SPECIFICITY_CONFLICTS"; - public static final String WG_PARSING_AND_PREPARING = - "WG_PARSING_AND_PREPARING"; - public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE"; - public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP"; - public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED"; - public static final String WG_NO_DECIMALFORMAT_DECLARATION = - "WG_NO_DECIMALFORMAT_DECLARATION"; - public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS"; - public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED = - "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED"; - public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE = - "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE"; - public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE"; - public static final String WG_COULD_NOT_RESOLVE_PREFIX = - "WG_COULD_NOT_RESOLVE_PREFIX"; - public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String WG_ILLEGAL_ATTRIBUTE_NAME = - "WG_ILLEGAL_ATTRIBUTE_NAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_VALUE = - "WG_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG"; - public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_POSITION = - "WG_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String NO_MODIFICATION_ALLOWED_ERR = - "NO_MODIFICATION_ALLOWED_ERR"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_NO_CURLYBRACE, - "Fel: Uttryck f\u00E5r inte inneh\u00E5lla '{'"}, - - { ER_ILLEGAL_ATTRIBUTE , - "{0} har ett otill\u00E5tet attribut: {1}"}, - - {ER_NULL_SOURCENODE_APPLYIMPORTS , - "sourceNode \u00E4r null i xsl:apply-imports!"}, - - {ER_CANNOT_ADD, - "Kan inte addera {0} till {1}"}, - - { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES, - "sourceNode \u00E4r null i handleApplyTemplatesInstruction!"}, - - { ER_NO_NAME_ATTRIB, - "{0} m\u00E5ste ha ett namnattribut."}, - - {ER_TEMPLATE_NOT_FOUND, - "Hittade inte mallen med namnet: {0}"}, - - {ER_CANT_RESOLVE_NAME_AVT, - "Kunde inte matcha namn-AVT i xsl:call-template."}, - - {ER_REQUIRES_ATTRIB, - "{0} kr\u00E4ver attribut: {1}"}, - - { ER_MUST_HAVE_TEST_ATTRIB, - "{0} m\u00E5ste ha ett ''test''-attribut."}, - - {ER_BAD_VAL_ON_LEVEL_ATTRIB, - "Felaktigt v\u00E4rde i niv\u00E5attribut: {0}"}, - - {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML, - "Namn p\u00E5 bearbetningsinstruktion kan inte vara 'xml'"}, - - { ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, - "Namn p\u00E5 bearbetningsinstruktion m\u00E5ste vara ett giltigt NCName: {0}"}, - - { ER_NEED_MATCH_ATTRIB, - "{0} m\u00E5ste ha ett matchningsattribut n\u00E4r det anger ett l\u00E4ge."}, - - { ER_NEED_NAME_OR_MATCH_ATTRIB, - "{0} kr\u00E4ver antingen ett namn eller ett matchningsattribut."}, - - {ER_CANT_RESOLVE_NSPREFIX, - "Kan inte matcha prefix f\u00F6r namnrymd: {0}"}, - - { ER_ILLEGAL_VALUE, - "xml:space har ett otill\u00E5tet v\u00E4rde: {0}"}, - - { ER_NO_OWNERDOC, - "Underordnad nod har inget \u00E4gardokument!"}, - - { ER_ELEMTEMPLATEELEM_ERR, - "ElemTemplateElement-fel: {0}"}, - - { ER_NULL_CHILD, - "F\u00F6rs\u00F6ker l\u00E4gga till en null-underordnad!"}, - - { ER_NEED_SELECT_ATTRIB, - "{0} kr\u00E4ver ett select-attribut."}, - - { ER_NEED_TEST_ATTRIB , - "xsl:when m\u00E5ste ha ett 'test'-attribut."}, - - { ER_NEED_NAME_ATTRIB, - "xsl:with-parametern m\u00E5ste ha ett 'namn'-attribut."}, - - { ER_NO_CONTEXT_OWNERDOC, - "context har inget \u00E4gardokument!"}, - - {ER_COULD_NOT_CREATE_XML_PROC_LIAISON, - "Kunde inte skapa XML TransformerFactory Liaison: {0}"}, - - {ER_PROCESS_NOT_SUCCESSFUL, - "Xalan: Processen utf\u00F6rdes inte."}, - - { ER_NOT_SUCCESSFUL, - "Xalan: utf\u00F6rdes inte."}, - - { ER_ENCODING_NOT_SUPPORTED, - "Kodningen st\u00F6ds inte: {0}"}, - - {ER_COULD_NOT_CREATE_TRACELISTENER, - "Kunde inte TraceListener: {0}"}, - - {ER_KEY_REQUIRES_NAME_ATTRIB, - "xsl:key kr\u00E4ver ett 'namn'-attribut!"}, - - { ER_KEY_REQUIRES_MATCH_ATTRIB, - "xsl:key kr\u00E4ver ett 'matchning'-attribut!"}, - - { ER_KEY_REQUIRES_USE_ATTRIB, - "xsl:key kr\u00E4ver ett 'anv\u00E4nd'-attribut!"}, - - { ER_REQUIRES_ELEMENTS_ATTRIB, - "(StylesheetHandler) {0} kr\u00E4ver ett ''element''-attribut!"}, - - { ER_MISSING_PREFIX_ATTRIB, - "(StylesheetHandler) ''prefix'' f\u00F6r {0}-attribut saknas"}, - - { ER_BAD_STYLESHEET_URL, - "Formatmall-URL \u00E4r felaktig: {0}"}, - - { ER_FILE_NOT_FOUND, - "Formatmallfil kunde inte hittas: {0}"}, - - { ER_IOEXCEPTION, - "Fick IO-undantag med formatmallfil: {0}"}, - - { ER_NO_HREF_ATTRIB, - "(StylesheetHandler) Hittade inte href-attribut f\u00F6r {0}"}, - - { ER_STYLESHEET_INCLUDES_ITSELF, - "(StylesheetHandler) {0} inkluderar, direkt eller indirekt, sig sj\u00E4lv!"}, - - { ER_PROCESSINCLUDE_ERROR, - "StylesheetHandler.processInclude-fel, {0}"}, - - { ER_MISSING_LANG_ATTRIB, - "(StylesheetHandler) ''lang'' f\u00F6r {0}-attribut saknas"}, - - { ER_MISSING_CONTAINER_ELEMENT_COMPONENT, - "(StylesheetHandler) {0}-element?? \u00E4r felplacerat Container-elementet ''component'' saknas"}, - - { ER_CAN_ONLY_OUTPUT_TO_ELEMENT, - "Kan endast skicka utdata till ett Element, ett DocumentFragment, ett Document eller en PrintWriter."}, - - { ER_PROCESS_ERROR, - "StylesheetRoot.process-fel"}, - - { ER_UNIMPLNODE_ERROR, - "UnImplNode-fel: {0}"}, - - { ER_NO_SELECT_EXPRESSION, - "Fel! Hittade inte xpath select-uttryck (-select)."}, - - { ER_CANNOT_SERIALIZE_XSLPROCESSOR, - "Kan inte serialisera en XSLProcessor!"}, - - { ER_NO_INPUT_STYLESHEET, - "Formatmallindata ej angiven!"}, - - { ER_FAILED_PROCESS_STYLESHEET, - "Kunde inte behandla formatmall!"}, - - { ER_COULDNT_PARSE_DOC, - "Kunde inte tolka dokumentet {0}!"}, - - { ER_COULDNT_FIND_FRAGMENT, - "Hittade inte fragment: {0}"}, - - { ER_NODE_NOT_ELEMENT, - "Nod som pekades p\u00E5 av fragment-identifierare var inte ett element: {0}"}, - - { ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB, - "for-each kr\u00E4ver antingen en matchning eller ett namnattribut"}, - - { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB, - "templates kr\u00E4ver antingen en matchning eller ett namnattribut"}, - - { ER_NO_CLONE_OF_DOCUMENT_FRAG, - "Ingen klon av ett dokumentfragment!"}, - - { ER_CANT_CREATE_ITEM, - "Kan inte skapa element i resultattr\u00E4d: {0}"}, - - { ER_XMLSPACE_ILLEGAL_VALUE, - "xml:space i k\u00E4ll-XML har ett otill\u00E5tet v\u00E4rde: {0}"}, - - { ER_NO_XSLKEY_DECLARATION, - "Det finns ingen xsl:key-deklaration f\u00F6r {0}!"}, - - { ER_CANT_CREATE_URL, - "Fel! Kan inte skapa URL f\u00F6r: {0}"}, - - { ER_XSLFUNCTIONS_UNSUPPORTED, - "xsl:functions st\u00F6ds inte"}, - - { ER_PROCESSOR_ERROR, - "XSLT TransformerFactory-fel"}, - - { ER_NOT_ALLOWED_INSIDE_STYLESHEET, - "(StylesheetHandler) {0} \u00E4r inte till\u00E5ten inne i en formatmall!"}, - - { ER_RESULTNS_NOT_SUPPORTED, - "result-ns st\u00F6ds inte l\u00E4ngre! Anv\u00E4nd xsl:output ist\u00E4llet."}, - - { ER_DEFAULTSPACE_NOT_SUPPORTED, - "default-space st\u00F6ds inte l\u00E4ngre! Anv\u00E4nd xsl:strip-space eller xsl:preserve-space ist\u00E4llet."}, - - { ER_INDENTRESULT_NOT_SUPPORTED, - "indent-result st\u00F6ds inte l\u00E4ngre! Anv\u00E4nd xsl:output ist\u00E4llet."}, - - { ER_ILLEGAL_ATTRIB, - "(StylesheetHandler) {0} har ett otill\u00E5tet attribut: {1}"}, - - { ER_UNKNOWN_XSL_ELEM, - "Ok\u00E4nt XSL-element: {0}"}, - - { ER_BAD_XSLSORT_USE, - "(StylesheetHandler) xsl:sort kan endast anv\u00E4ndas med xsl:apply-templates eller xsl:for-each."}, - - { ER_MISPLACED_XSLWHEN, - "(StylesheetHandler) felplacerade xsl:when!"}, - - { ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:when h\u00E4rstammar inte fr\u00E5n xsl:choose!"}, - - { ER_MISPLACED_XSLOTHERWISE, - "(StylesheetHandler) felplacerade xsl:otherwise!"}, - - { ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:otherwise h\u00E4rstammar inte fr\u00E5n xsl:choose!"}, - - { ER_NOT_ALLOWED_INSIDE_TEMPLATE, - "(StylesheetHandler) {0} \u00E4r inte till\u00E5ten inne i en mall!"}, - - { ER_UNKNOWN_EXT_NS_PREFIX, - "(StylesheetHandler) ok\u00E4nt namnrymdsprefix {1} f\u00F6r till\u00E4gg {0}"}, - - { ER_IMPORTS_AS_FIRST_ELEM, - "(StylesheetHandler) Imports kan endast f\u00F6rekomma som de f\u00F6rsta elementen i formatmallen!"}, - - { ER_IMPORTING_ITSELF, - "(StylesheetHandler) {0} importerar, direkt eller indirekt, sig sj\u00E4lv!"}, - - { ER_XMLSPACE_ILLEGAL_VAL, - "(StylesheetHandler) xml:space har ett otill\u00E5tet v\u00E4rde: {0}"}, - - { ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL, - "processStylesheet utf\u00F6rdes inte!"}, - - { ER_SAX_EXCEPTION, - "SAX-undantag"}, - -// add this message to fix bug 21478 - { ER_FUNCTION_NOT_SUPPORTED, - "Funktionen st\u00F6ds inte!"}, - - { ER_XSLT_ERROR, - "XSLT-fel"}, - - { ER_CURRENCY_SIGN_ILLEGAL, - "valutatecken \u00E4r inte till\u00E5tet i formatm\u00F6nsterstr\u00E4ng"}, - - { ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM, - "Dokumentfunktion st\u00F6ds inte i Stylesheet DOM!"}, - - { ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER, - "Kan inte matcha prefix med matchning som saknar prefix!"}, - - { ER_REDIRECT_COULDNT_GET_FILENAME, - "Redirect-till\u00E4gg: Hittade inte filnamn - fil eller valattribut m\u00E5ste returnera giltig str\u00E4ng."}, - - { ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT, - "Kan inte bygga FormatterListener i Redirect-till\u00E4gg!"}, - - { ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX, - "Prefix i exclude-result-prefixes \u00E4r inte giltigt: {0}"}, - - { ER_MISSING_NS_URI, - "Namnrymds-URI saknas f\u00F6r angivna prefix"}, - - { ER_MISSING_ARG_FOR_OPTION, - "Argument saknas f\u00F6r alternativet: {0}"}, - - { ER_INVALID_OPTION, - "Ogiltigt alternativ: {0}"}, - - { ER_MALFORMED_FORMAT_STRING, - "Felaktigt utformad formatstr\u00E4ng: {0}"}, - - { ER_STYLESHEET_REQUIRES_VERSION_ATTRIB, - "xsl:stylesheet kr\u00E4ver ett 'version'-attribut!"}, - - { ER_ILLEGAL_ATTRIBUTE_VALUE, - "Attribut: {0} har ett otill\u00E5tet v\u00E4rde: {1}"}, - - { ER_CHOOSE_REQUIRES_WHEN, - "xsl:choose kr\u00E4ver xsl:when"}, - - { ER_NO_APPLY_IMPORT_IN_FOR_EACH, - "xsl:apply-imports inte till\u00E5tet i xsl:for-each"}, - - { ER_CANT_USE_DTM_FOR_OUTPUT, - "Kan inte anv\u00E4nda DTMLiaison till en DOM utdatanod... skicka en com.sun.org.apache.xpath.internal.DOM2Helper ist\u00E4llet!"}, - - { ER_CANT_USE_DTM_FOR_INPUT, - "Kan inte anv\u00E4nda DTMLiaison till en DOM indatanod... skicka en com.sun.org.apache.xpath.internal.DOM2Helper ist\u00E4llet!"}, - - { ER_CALL_TO_EXT_FAILED, - "Anrop till till\u00E4ggselement utf\u00F6rdes inte: {0}"}, - - { ER_PREFIX_MUST_RESOLVE, - "Prefix m\u00E5ste matchas till en namnrymd: {0}"}, - - { ER_INVALID_UTF16_SURROGATE, - "Ogiltigt UTF-16-surrogat uppt\u00E4ckt: {0} ?"}, - - { ER_XSLATTRSET_USED_ITSELF, - "xsl:attribute-set {0} anv\u00E4nde sig sj\u00E4lvt, vilket kommer att orsaka en o\u00E4ndlig slinga."}, - - { ER_CANNOT_MIX_XERCESDOM, - "Kan inte blanda icke-Xerces-DOM-indata med Xerces-DOM-utdata!"}, - - { ER_TOO_MANY_LISTENERS, - "addTraceListenersToStylesheet - TooManyListenersException"}, - - { ER_IN_ELEMTEMPLATEELEM_READOBJECT, - "I ElemTemplateElement.readObject: {0}"}, - - { ER_DUPLICATE_NAMED_TEMPLATE, - "Hittade fler \u00E4n en mall med namnet: {0}"}, - - { ER_INVALID_KEY_CALL, - "Ogiltigt funktionsanrop: rekursiva key()-anrop \u00E4r inte till\u00E5tna"}, - - { ER_REFERENCING_ITSELF, - "Variabeln {0} refererar, direkt eller indirekt, till sig sj\u00E4lv!"}, - - { ER_ILLEGAL_DOMSOURCE_INPUT, - "Indatanoden till en DOMSource f\u00F6r newTemplates f\u00E5r inte vara null!"}, - - { ER_CLASS_NOT_FOUND_FOR_OPTION, - "Klassfil f\u00F6r alternativ {0} saknas"}, - - { ER_REQUIRED_ELEM_NOT_FOUND, - "Obligatoriska element hittades inte: {0}"}, - - { ER_INPUT_CANNOT_BE_NULL, - "InputStream kan inte vara null"}, - - { ER_URI_CANNOT_BE_NULL, - "URI kan inte vara null"}, - - { ER_FILE_CANNOT_BE_NULL, - "Fil kan inte vara null"}, - - { ER_SOURCE_CANNOT_BE_NULL, - "InputSource kan inte vara null"}, - - { ER_CANNOT_INIT_BSFMGR, - "Kunde inte initiera BSF Manager"}, - - { ER_CANNOT_CMPL_EXTENSN, - "Kunde inte kompilera till\u00E4gg"}, - - { ER_CANNOT_CREATE_EXTENSN, - "Kunde inte skapa till\u00E4gg: {0} p\u00E5 grund av: {1}"}, - - { ER_INSTANCE_MTHD_CALL_REQUIRES, - "Instansmetodanrop till metod {0} kr\u00E4ver en objektinstans som f\u00F6rsta argument"}, - - { ER_INVALID_ELEMENT_NAME, - "Ogiltigt elementnamn angivet {0}"}, - - { ER_ELEMENT_NAME_METHOD_STATIC, - "Elementnamnmetod m\u00E5ste vara statisk {0}"}, - - { ER_EXTENSION_FUNC_UNKNOWN, - "Till\u00E4ggsfunktion {0} : {1} \u00E4r ok\u00E4nd"}, - - { ER_MORE_MATCH_CONSTRUCTOR, - "Fler \u00E4n en b\u00E4sta matchning f\u00F6r konstruktor f\u00F6r {0}"}, - - { ER_MORE_MATCH_METHOD, - "Fler \u00E4n en b\u00E4sta matchning f\u00F6r metod {0}"}, - - { ER_MORE_MATCH_ELEMENT, - "Fler \u00E4n en b\u00E4sta matchning f\u00F6r elementmetod {0}"}, - - { ER_INVALID_CONTEXT_PASSED, - "Ogiltig kontext skickad f\u00F6r att utv\u00E4rdera {0}"}, - - { ER_POOL_EXISTS, - "Pool finns redan"}, - - { ER_NO_DRIVER_NAME, - "Inget drivrutinsnamn angivet"}, - - { ER_NO_URL, - "Ingen URL angiven"}, - - { ER_POOL_SIZE_LESSTHAN_ONE, - "Poolstorlek \u00E4r mindre \u00E4n ett!"}, - - { ER_INVALID_DRIVER, - "Ogiltigt drivrutinsnamn angivet!"}, - - { ER_NO_STYLESHEETROOT, - "Hittade inte formatmallen roten!"}, - - { ER_ILLEGAL_XMLSPACE_VALUE, - "Otill\u00E5tet v\u00E4rde f\u00F6r xml:space"}, - - { ER_PROCESSFROMNODE_FAILED, - "processFromNode utf\u00F6rdes inte"}, - - { ER_RESOURCE_COULD_NOT_LOAD, - "Resursen [ {0} ] kunde inte laddas: {1} \n {2} \t {3}"}, - - { ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Buffertstorlek <=0"}, - - { ER_UNKNOWN_ERROR_CALLING_EXTENSION, - "Ok\u00E4nt fel vid anrop av till\u00E4gg"}, - - { ER_NO_NAMESPACE_DECL, - "Prefix {0} har ingen motsvarande namnrymdsdeklaration"}, - - { ER_ELEM_CONTENT_NOT_ALLOWED, - "Elementinneh\u00E5ll inte till\u00E5tet f\u00F6r lang=javaclass {0}"}, - - { ER_STYLESHEET_DIRECTED_TERMINATION, - "Avslutning via formatmall"}, - - { ER_ONE_OR_TWO, - "1 eller 2"}, - - { ER_TWO_OR_THREE, - "2 eller 3"}, - - { ER_COULD_NOT_LOAD_RESOURCE, - "Kunde inte ladda {0} (kontrollera CLASSPATH), anv\u00E4nder nu enbart standardv\u00E4rden"}, - - { ER_CANNOT_INIT_DEFAULT_TEMPLATES, - "Kan inte initiera standardmallar"}, - - { ER_RESULT_NULL, - "Result borde inte vara null"}, - - { ER_RESULT_COULD_NOT_BE_SET, - "Result kunde inte st\u00E4llas in"}, - - { ER_NO_OUTPUT_SPECIFIED, - "Ingen utdata angiven"}, - - { ER_CANNOT_TRANSFORM_TO_RESULT_TYPE, - "Kan inte omvandla till Result av typ {0}"}, - - { ER_CANNOT_TRANSFORM_SOURCE_TYPE, - "Kan inte omvandla Source av typ {0}"}, - - { ER_NULL_CONTENT_HANDLER, - "Inneh\u00E5llshanterare med v\u00E4rde null"}, - - { ER_NULL_ERROR_HANDLER, - "Felhanterare med v\u00E4rde null"}, - - { ER_CANNOT_CALL_PARSE, - "parse kan inte anropas om ContentHandler inte har satts"}, - - { ER_NO_PARENT_FOR_FILTER, - "Ingen \u00F6verordnad f\u00F6r filter"}, - - { ER_NO_STYLESHEET_IN_MEDIA, - "Formatmall saknas i: {0}, media= {1}"}, - - { ER_NO_STYLESHEET_PI, - "PI f\u00F6r xml-formatmall saknas i: {0}"}, - - { ER_NOT_SUPPORTED, - "Underst\u00F6ds inte: {0}"}, - - { ER_PROPERTY_VALUE_BOOLEAN, - "V\u00E4rde f\u00F6r egenskap {0} b\u00F6r vara en boolesk instans"}, - - { ER_COULD_NOT_FIND_EXTERN_SCRIPT, - "Kunde inte h\u00E4mta externt skript fr\u00E5n {0}"}, - - { ER_RESOURCE_COULD_NOT_FIND, - "Resursen [ {0} ] kunde inte h\u00E4mtas.\n {1}"}, - - { ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, - "Utdataegenskap kan inte identifieras: {0}"}, - - { ER_FAILED_CREATING_ELEMLITRSLT, - "Kunde inte skapa instans av ElemLiteralResult"}, - - //Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE - // In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care - //in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc. - //NOTE: Not only the key name but message has also been changed. - { ER_VALUE_SHOULD_BE_NUMBER, - "V\u00E4rdet f\u00F6r {0} b\u00F6r inneh\u00E5lla ett tal som kan tolkas"}, - - { ER_VALUE_SHOULD_EQUAL, - "V\u00E4rdet f\u00F6r {0} b\u00F6r vara ja eller nej"}, - - { ER_FAILED_CALLING_METHOD, - "Kunde inte anropa metoden {0}"}, - - { ER_FAILED_CREATING_ELEMTMPL, - "Kunde inte skapa instans av ElemTemplateElement"}, - - { ER_CHARS_NOT_ALLOWED, - "Tecken \u00E4r inte till\u00E5tna i dokumentet i det h\u00E4r skedet"}, - - { ER_ATTR_NOT_ALLOWED, - "Attributet \"{0}\" \u00E4r inte till\u00E5tet i elementet {1}!"}, - - { ER_BAD_VALUE, - "{0} felaktigt v\u00E4rde {1} "}, - - { ER_ATTRIB_VALUE_NOT_FOUND, - "Attributet {0} saknas "}, - - { ER_ATTRIB_VALUE_NOT_RECOGNIZED, - "Attributv\u00E4rdet {0} kan inte identifieras "}, - - { ER_NULL_URI_NAMESPACE, - "F\u00F6rs\u00F6ker generera ett namnrymdsprefix med en null-URI"}, - - { ER_NUMBER_TOO_BIG, - "F\u00F6rs\u00F6ker formatera ett tal som \u00E4r st\u00F6rre \u00E4n det st\u00F6rsta l\u00E5nga heltalet"}, - - { ER_CANNOT_FIND_SAX1_DRIVER, - "Hittar inte SAX1-drivrutinen klass {0}"}, - - { ER_SAX1_DRIVER_NOT_LOADED, - "SAX1-drivrutinen klass {0} hittades, men kan inte laddas"}, - - { ER_SAX1_DRIVER_NOT_INSTANTIATED, - "SAX1-drivrutinen klass {0} laddades, men kan inte instansieras"}, - - { ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER, - "SAX1-drivrutinen klass {0} implementerar inte org.xml.sax.Parser"}, - - { ER_PARSER_PROPERTY_NOT_SPECIFIED, - "Systemegenskapen org.xml.sax.parser \u00E4r inte angiven"}, - - { ER_PARSER_ARG_CANNOT_BE_NULL, - "Parserargument m\u00E5ste vara null"}, - - { ER_FEATURE, - "Funktion: {0}"}, - - { ER_PROPERTY, - "Egenskap: {0}"}, - - { ER_NULL_ENTITY_RESOLVER, - "Enhetsmatchning med v\u00E4rde null"}, - - { ER_NULL_DTD_HANDLER, - "DTD-hanterare med v\u00E4rde null"}, - - { ER_NO_DRIVER_NAME_SPECIFIED, - "Inget angivet drivrutinsnamn!"}, - - { ER_NO_URL_SPECIFIED, - "Ingen URL angiven!"}, - - { ER_POOLSIZE_LESS_THAN_ONE, - "Poolstorlek \u00E4r mindre \u00E4n ett!"}, - - { ER_INVALID_DRIVER_NAME, - "Ogiltigt drivrutinsnamn angivet!"}, - - { ER_ERRORLISTENER, - "ErrorListener"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The name -// 'ElemTemplateElement' is the name of a class, and should not be -// translated. - { ER_ASSERT_NO_TEMPLATE_PARENT, - "Programmerarfel! Uttrycket har ingen \u00F6verordnad ElemTemplateElement!"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The substitution text -// provides further information in order to diagnose the problem. The name -// 'RedundentExprEliminator' is the name of a class, and should not be -// translated. - { ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR, - "Programmerarens utsaga i RedundentExprEliminator: {0}"}, - - { ER_NOT_ALLOWED_IN_POSITION, - "{0} \u00E4r inte till\u00E5ten i denna position i formatmallen!"}, - - { ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION, - "Text utan blanktecken \u00E4r inte till\u00E5ten i denna position i formatmallen!"}, - - // This code is shared with warning codes. - // SystemId Unknown - { INVALID_TCHAR, - "Otill\u00E5tet v\u00E4rde: {1} anv\u00E4nds f\u00F6r CHAR-attributet: {0}. Ett attribut av CHAR-typ f\u00E5r bara ha 1 tecken!"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "QNAME" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value and {0} is the attribute name. - //The following codes are shared with the warning codes... - { INVALID_QNAME, - "Otill\u00E5tet v\u00E4rde: {1} anv\u00E4nds f\u00F6r QNAME-attributet: {0}"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "ENUM" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value, {0} is the attribute name, and {2} is a list of valid - // values. - { INVALID_ENUM, - "Otill\u00E5tet v\u00E4rde: {1} anv\u00E4nds f\u00F6r ENUM-attributet: {0}. Giltiga v\u00E4rden \u00E4r: {2}."}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NMTOKEN" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NMTOKEN, - "Otill\u00E5tet v\u00E4rde: {1} anv\u00E4nds f\u00F6r NMTOKEN-attributet: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NCNAME" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NCNAME, - "Otill\u00E5tet v\u00E4rde: {1} anv\u00E4nds f\u00F6r NCNAME-attributet: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "boolean" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_BOOLEAN, - "Otill\u00E5tet v\u00E4rde: {1} anv\u00E4nds f\u00F6r boolean-attributet: {0} "}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "number" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NUMBER, - "Otill\u00E5tet v\u00E4rde: {1} anv\u00E4nds f\u00F6r number-attributet: {0} "}, - - - // End of shared codes... - -// Note to translators: A "match pattern" is a special form of XPath expression -// that is used for matching patterns. The substitution text is the name of -// a function. The message indicates that when this function is referenced in -// a match pattern, its argument must be a string literal (or constant.) -// ER_ARG_LITERAL - new error message for bugzilla //5202 - { ER_ARG_LITERAL, - "Argument f\u00F6r {0} i matchningsm\u00F6nstret m\u00E5ste vara litteral."}, - -// Note to translators: The following message indicates that two definitions of -// a variable. A "global variable" is a variable that is accessible everywher -// in the stylesheet. -// ER_DUPLICATE_GLOBAL_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_GLOBAL_VAR, - "Dubbel deklaration av global variabel."}, - - -// Note to translators: The following message indicates that two definitions of -// a variable were encountered. -// ER_DUPLICATE_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_VAR, - "Dubbel deklaration av variabel."}, - - // Note to translators: "xsl:template, "name" and "match" are XSLT keywords - // which must not be translated. - // ER_TEMPLATE_NAME_MATCH - new error message for bugzilla #789 - { ER_TEMPLATE_NAME_MATCH, - "xsl:template m\u00E5ste ha name- och/eller match-attribut"}, - - // Note to translators: "exclude-result-prefixes" is an XSLT keyword which - // should not be translated. The message indicates that a namespace prefix - // encountered as part of the value of the exclude-result-prefixes attribute - // was in error. - // ER_INVALID_PREFIX - new error message for bugzilla #788 - { ER_INVALID_PREFIX, - "Prefix i exclude-result-prefixes \u00E4r inte giltigt: {0}"}, - - // Note to translators: An "attribute set" is a set of attributes that can - // be added to an element in the output document as a group. The message - // indicates that there was a reference to an attribute set named {0} that - // was never defined. - // ER_NO_ATTRIB_SET - new error message for bugzilla #782 - { ER_NO_ATTRIB_SET, - "attributserien {0} finns inte"}, - - // Note to translators: This message indicates that there was a reference - // to a function named {0} for which no function definition could be found. - { ER_FUNCTION_NOT_FOUND, - "Det finns ingen funktion med namnet {0}"}, - - // Note to translators: This message indicates that the XSLT instruction - // that is named by the substitution text {0} must not contain other XSLT - // instructions (content) or a "select" attribute. The word "select" is - // an XSLT keyword in this case and must not be translated. - { ER_CANT_HAVE_CONTENT_AND_SELECT, - "Elementet {0} kan inte ha b\u00E5de inneh\u00E5ll och select-attribut."}, - - // Note to translators: This message indicates that the value argument - // of setParameter must be a valid Java Object. - { ER_INVALID_SET_PARAM_VALUE, - "Parameterv\u00E4rdet f\u00F6r {0} m\u00E5ste vara giltigt Java-objekt"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT, - "result-prefix-attributet i xsl:namespace-alias-element har v\u00E4rdet '#default', men det finns ingen deklaration av standardnamnrymd inom omfattningen av elementet"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX, - "result-prefix-attributet i xsl:namespace-alias-element har v\u00E4rdet ''{0}'', men det finns ingen deklaration av namnrymd f\u00F6r prefixet ''{0}'' inom omfattningen av elementet."}, - - { ER_SET_FEATURE_NULL_NAME, - "Funktionsnamnet kan inte vara null i TransformerFactory.setFeature(namn p\u00E5 str\u00E4ng, booleskt v\u00E4rde)."}, - - { ER_GET_FEATURE_NULL_NAME, - "Funktionsnamnet kan inte vara null i TransformerFactory.getFeature(namn p\u00E5 str\u00E4ng)."}, - - { ER_UNSUPPORTED_FEATURE, - "Kan inte st\u00E4lla in funktionen ''{0}'' i denna TransformerFactory."}, - - { ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING, - "Anv\u00E4ndning av till\u00E4ggselementet ''{0}'' \u00E4r inte till\u00E5tet n\u00E4r s\u00E4ker bearbetning till\u00E4mpas."}, - - { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE, - "Kan inte h\u00E4mta prefix f\u00F6r namnrymds-uri som \u00E4r null."}, - - { ER_NAMESPACE_CONTEXT_NULL_PREFIX, - "Kan inte h\u00E4mta namnrymds-uri f\u00F6r prefix som \u00E4r null."}, - - { ER_XPATH_RESOLVER_NULL_QNAME, - "Funktionsnamn f\u00E5r inte vara null."}, - - { ER_XPATH_RESOLVER_NEGATIVE_ARITY, - "Ariteten kan inte vara negativ."}, - // Warnings... - - { WG_FOUND_CURLYBRACE, - "Hittade '}' men det finns ingen \u00F6ppen attributmall!"}, - - { WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR, - "Varning: r\u00E4knarattribut matchar inte \u00F6verordnad i xsl:number! Target = {0}"}, - - { WG_EXPR_ATTRIB_CHANGED_TO_SELECT, - "Gammal syntax: Namnet p\u00E5 'expr'-attributet har \u00E4ndrats till 'select'."}, - - { WG_NO_LOCALE_IN_FORMATNUMBER, - "Xalan hanterar \u00E4nnu inte spr\u00E5kkonventionen i funktionen format-number."}, - - { WG_LOCALE_NOT_FOUND, - "Varning: Hittade inte spr\u00E5kkonvention f\u00F6r xml:lang={0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "Kan inte skapa URL fr\u00E5n: {0}"}, - - { WG_CANNOT_LOAD_REQUESTED_DOC, - "Kan inte ladda beg\u00E4rt dokument: {0}"}, - - { WG_CANNOT_FIND_COLLATOR, - "Hittade inte kollationering f\u00F6r >>>>>> Xalan version "}, - { "version2", "<<<<<<<"}, - { "yes", "ja"}, - { "line", "Rad nr"}, - { "column","Kolumn nr"}, - { "xsldone", "XSLProcessor: utf\u00F6rd"}, - - - // Note to translators: The following messages provide usage information - // for the Xalan Process command line. "Process" is the name of a Java class, - // and should not be translated. - { "xslProc_option", "Process-klassalternativ f\u00F6r Xalan-J-kommandorad:"}, - { "xslProc_option", "Process-klassalternativ f\u00F6r Xalan-J-kommandorad:"}, - { "xslProc_invalid_xsltc_option", "Alternativet {0} underst\u00F6ds inte i XSLTC-l\u00E4ge."}, - { "xslProc_invalid_xalan_option", "Alternativet {0} kan anv\u00E4ndas endast med -XSLTC."}, - { "xslProc_no_input", "Fel: Ingen formatmall eller indata-xml har angetts. K\u00F6r kommandot utan n\u00E5got alternativ f\u00F6r att visa syntax."}, - { "xslProc_common_options", "-Allm\u00E4nna alternativ-"}, - { "xslProc_xalan_options", "-Alternativ f\u00F6r Xalan-"}, - { "xslProc_xsltc_options", "-Alternativ f\u00F6r XSLTC-"}, - { "xslProc_return_to_continue", "(tryck p\u00E5 Enter f\u00F6r att forts\u00E4tta)"}, - - // Note to translators: The option name and the parameter name do not need to - // be translated. Only translate the messages in parentheses. Note also that - // leading whitespace in the messages is used to indent the usage information - // for each option in the English messages. - // Do not translate the keywords: XSLTC, SAX, DOM and DTM. - { "optionXSLTC", " [-XSLTC (anv\u00E4nd XSLTC f\u00F6r transformering)]"}, - { "optionIN", " [-IN inputXMLURL]"}, - { "optionXSL", " [-XSL XSLTransformationURL]"}, - { "optionOUT", " [-OUT outputFileName]"}, - { "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"}, - { "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"}, - { "optionPARSER", " [-PARSER fullt kvalificerat klassnamn p\u00E5 parserf\u00F6rbindelse]"}, - { "optionE", " [-E (Ut\u00F6ka inte enhetsreferenser)]"}, - { "optionV", " [-E (Ut\u00F6ka inte enhetsreferenser)]"}, - { "optionQC", " [-QC (Tysta m\u00F6nsterkonfliktvarningar)]"}, - { "optionQ", " [-Q (Tyst l\u00E4ge)]"}, - { "optionLF", " [-LF (Anv\u00E4nd radmatningar endast f\u00F6r utdata {standard \u00E4r CR/LF})]"}, - { "optionCR", " [-CR (Anv\u00E4nd radmatningar endast f\u00F6r utdata {standard \u00E4r CR/LF})]"}, - { "optionESCAPE", " [-ESCAPE (Vilka tecken \u00E4r skiftningstecken {standard \u00E4r <>&\"'\\r\\n}]"}, - { "optionINDENT", " [-INDENT (Best\u00E4m antal blanksteg f\u00F6r indrag {standard \u00E4r 0})]"}, - { "optionTT", " [-TT (Sp\u00E5ra mallar vid anrop.)]"}, - { "optionTG", " [-TG (Sp\u00E5ra varje generationsh\u00E4ndelse.)]"}, - { "optionTS", " [-TS (Sp\u00E5ra varje urvalsh\u00E4ndelse.)]"}, - { "optionTTC", " [-TTC (Sp\u00E5ra mallunderordnade n\u00E4r de bearbetas.)]"}, - { "optionTCLASS", " [-TCLASS (TraceListener-klass f\u00F6r sp\u00E5rningstill\u00E4gg.)]"}, - { "optionVALIDATE", " [-VALIDATE (St\u00E4ll in om validering utf\u00F6rs. Standard \u00E4r att validering \u00E4r avst\u00E4ngd.)]"}, - { "optionEDUMP", " [-EDUMP {valfritt filnamn} (G\u00F6r stackdump vid fel.)]"}, - { "optionXML", " [-XML (Anv\u00E4nd XML-formaterare och l\u00E4gg till XML-huvud.)]"}, - { "optionTEXT", " [-TEXT (Anv\u00E4nd enkel textformaterare.)]"}, - { "optionHTML", " [-HTML (Anv\u00E4nd HTML-formaterare.)]"}, - { "optionPARAM", " [-PARAM-namnuttryck (St\u00E4ll in parameter f\u00F6r formatmall)]"}, - { "noParsermsg1", "XSL-processen utf\u00F6rdes inte."}, - { "noParsermsg2", "** Hittade inte parser **"}, - { "noParsermsg3", "Kontrollera klass\u00F6kv\u00E4gen."}, - { "noParsermsg4", "Om du inte har IBMs XML Parser f\u00F6r Java kan du ladda ned den fr\u00E5n"}, - { "noParsermsg5", "IBMs AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, - { "optionURIRESOLVER", " [-URIRESOLVER fullst\u00E4ndigt klassnamn (URIResolver som anv\u00E4nds vid matchning av URI-er)]"}, - { "optionENTITYRESOLVER", " [-ENTITYRESOLVER fullst\u00E4ndigt klassnamn (EntityResolver som anv\u00E4nds vid matchning av enheter)]"}, - { "optionCONTENTHANDLER", " [-CONTENTHANDLER fullst\u00E4ndigt klassnamn (ContentHandler som anv\u00E4nds vid serialisering av utdata)]"}, - { "optionLINENUMBERS", " [-L anv\u00E4nd radnummer i k\u00E4lldokument]"}, - { "optionSECUREPROCESSING", " [-SECURE (ange att s\u00E4ker bearbetning ska till\u00E4mpas.)]"}, - - // Following are the new options added in XSLTErrorResources.properties files after Jdk 1.4 (Xalan 2.2-D11) - - - { "optionMEDIA", " [-MEDIA mediaType (anv\u00E4nd medieattribut f\u00F6r att hitta formatmall som h\u00F6r ihop med dokument.)]"}, - { "optionFLAVOR", " [-FLAVOR flavorName (Anv\u00E4nd s2s=SAX eller d2d=DOM vid transformering.)] "}, // Added by sboag/scurcuru; experimental - { "optionDIAG", " [-DIAG (Skriv ut tid f\u00F6r transformering i millisekunder.)]"}, - { "optionINCREMENTAL", " [-INCREMENTAL (beg\u00E4r inkrementell DTM-konstruktion genom att ange http://xml.apache.org/xalan/features/incremental true.)]"}, - { "optionNOOPTIMIMIZE", " [-NOOPTIMIMIZE (beg\u00E4r att ingen formatmallsoptimering utf\u00F6rs genom att ange http://xml.apache.org/xalan/features/optimize false.)]"}, - { "optionRL", " [-RL rekursionsgr\u00E4ns (verifiera numeriskt gr\u00E4nsv\u00E4rde f\u00F6r formatmallens rekursionsdjup.)]"}, - { "optionXO", " [-XO [transletName] (tilldela namnet till genererad translet)]"}, - { "optionXD", " [-XD destinationDirectory (ange destinationskatalog f\u00F6r translet)]"}, - { "optionXJ", " [-XJ jarfile (paketerar transletklasserna i en jar-fil med namnet )]"}, - { "optionXP", " [-XP package (anger paketnamnsprefix f\u00F6r alla genererade transletklasser)]"}, - - //AddITIONAL STRINGS that need L10n - // Note to translators: The following message describes usage of a particular - // command-line option that is used to enable the "template inlining" - // optimization. The optimization involves making a copy of the code - // generated for a template in another template that refers to it. - { "optionXN", " [-XN (aktiverar mallinfogning)]" }, - { "optionXX", " [-XX (aktiverar ytterligare fels\u00F6kningsmeddelanden)]"}, - { "optionXT" , " [-XT (anv\u00E4nder translet vid transformering om m\u00F6jligt)]"}, - { "diagTiming"," --------- Transformering av {0} via {1} tog {2} ms" }, - { "recursionTooDeep","Mallkapslingen \u00E4r f\u00F6r djup. kapsling = {0}, mall {1} {2}" }, - { "nameIs", "namnet \u00E4r" }, - { "matchPatternIs", "matchningsm\u00F6nstret \u00E4r" } - - }; - - } - // ================= INFRASTRUCTURE ====================== - - /** String for use when a bad error code was encountered. */ - public static final String BAD_CODE = "BAD_CODE"; - - /** String for use when formatting of the error string failed. */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java deleted file mode 100644 index e6b4c8f408f..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java +++ /dev/null @@ -1,1425 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And - * you need to enter key , value pair as part of contents - * Array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XSLTErrorResources_zh_TW extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /* - * Static variables - */ - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX = - "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX"; - - public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT = - "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT"; - - public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE"; - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE"; - public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS"; - public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD"; - public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES"; - public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB"; - public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND"; - public static final String ER_CANT_RESOLVE_NAME_AVT = "ER_CANT_RESOLVE_NAME_AVT"; - public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB"; - public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB"; - public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB = - "ER_BAD_VAL_ON_LEVEL_ATTRIB"; - public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB"; - public static final String ER_NEED_NAME_OR_MATCH_ATTRIB = - "ER_NEED_NAME_OR_MATCH_ATTRIB"; - public static final String ER_CANT_RESOLVE_NSPREFIX = - "ER_CANT_RESOLVE_NSPREFIX"; - public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE"; - public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC"; - public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR"; - public static final String ER_NULL_CHILD = "ER_NULL_CHILD"; - public static final String ER_NEED_SELECT_ATTRIB = "ER_NEED_SELECT_ATTRIB"; - public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB"; - public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB"; - public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC"; - public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON = - "ER_COULD_NOT_CREATE_XML_PROC_LIAISON"; - public static final String ER_PROCESS_NOT_SUCCESSFUL = - "ER_PROCESS_NOT_SUCCESSFUL"; - public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL"; - public static final String ER_ENCODING_NOT_SUPPORTED = - "ER_ENCODING_NOT_SUPPORTED"; - public static final String ER_COULD_NOT_CREATE_TRACELISTENER = - "ER_COULD_NOT_CREATE_TRACELISTENER"; - public static final String ER_KEY_REQUIRES_NAME_ATTRIB = - "ER_KEY_REQUIRES_NAME_ATTRIB"; - public static final String ER_KEY_REQUIRES_MATCH_ATTRIB = - "ER_KEY_REQUIRES_MATCH_ATTRIB"; - public static final String ER_KEY_REQUIRES_USE_ATTRIB = - "ER_KEY_REQUIRES_USE_ATTRIB"; - public static final String ER_REQUIRES_ELEMENTS_ATTRIB = - "ER_REQUIRES_ELEMENTS_ATTRIB"; - public static final String ER_MISSING_PREFIX_ATTRIB = - "ER_MISSING_PREFIX_ATTRIB"; - public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL"; - public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND"; - public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION"; - public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB"; - public static final String ER_STYLESHEET_INCLUDES_ITSELF = - "ER_STYLESHEET_INCLUDES_ITSELF"; - public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR"; - public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB"; - public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT = - "ER_MISSING_CONTAINER_ELEMENT_COMPONENT"; - public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT = - "ER_CAN_ONLY_OUTPUT_TO_ELEMENT"; - public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR"; - public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR"; - public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION"; - public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR = - "ER_CANNOT_SERIALIZE_XSLPROCESSOR"; - public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET"; - public static final String ER_FAILED_PROCESS_STYLESHEET = - "ER_FAILED_PROCESS_STYLESHEET"; - public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC"; - public static final String ER_COULDNT_FIND_FRAGMENT = - "ER_COULDNT_FIND_FRAGMENT"; - public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT"; - public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB = - "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB = - "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB"; - public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG = - "ER_NO_CLONE_OF_DOCUMENT_FRAG"; - public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM"; - public static final String ER_XMLSPACE_ILLEGAL_VALUE = - "ER_XMLSPACE_ILLEGAL_VALUE"; - public static final String ER_NO_XSLKEY_DECLARATION = - "ER_NO_XSLKEY_DECLARATION"; - public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL"; - public static final String ER_XSLFUNCTIONS_UNSUPPORTED = - "ER_XSLFUNCTIONS_UNSUPPORTED"; - public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR"; - public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET = - "ER_NOT_ALLOWED_INSIDE_STYLESHEET"; - public static final String ER_RESULTNS_NOT_SUPPORTED = - "ER_RESULTNS_NOT_SUPPORTED"; - public static final String ER_DEFAULTSPACE_NOT_SUPPORTED = - "ER_DEFAULTSPACE_NOT_SUPPORTED"; - public static final String ER_INDENTRESULT_NOT_SUPPORTED = - "ER_INDENTRESULT_NOT_SUPPORTED"; - public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB"; - public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM"; - public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE"; - public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN"; - public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_MISPLACED_XSLOTHERWISE = - "ER_MISPLACED_XSLOTHERWISE"; - public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE = - "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE"; - public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE = - "ER_NOT_ALLOWED_INSIDE_TEMPLATE"; - public static final String ER_UNKNOWN_EXT_NS_PREFIX = - "ER_UNKNOWN_EXT_NS_PREFIX"; - public static final String ER_IMPORTS_AS_FIRST_ELEM = - "ER_IMPORTS_AS_FIRST_ELEM"; - public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF"; - public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL"; - public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL = - "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL"; - public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION"; - public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR"; - public static final String ER_CURRENCY_SIGN_ILLEGAL= - "ER_CURRENCY_SIGN_ILLEGAL"; - public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM = - "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM"; - public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER = - "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER"; - public static final String ER_REDIRECT_COULDNT_GET_FILENAME = - "ER_REDIRECT_COULDNT_GET_FILENAME"; - public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT = - "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT"; - public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX = - "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX"; - public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI"; - public static final String ER_MISSING_ARG_FOR_OPTION = - "ER_MISSING_ARG_FOR_OPTION"; - public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION"; - public static final String ER_MALFORMED_FORMAT_STRING = - "ER_MALFORMED_FORMAT_STRING"; - public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String ER_ILLEGAL_ATTRIBUTE_VALUE = - "ER_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN"; - public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH = - "ER_NO_APPLY_IMPORT_IN_FOR_EACH"; - public static final String ER_CANT_USE_DTM_FOR_OUTPUT = - "ER_CANT_USE_DTM_FOR_OUTPUT"; - public static final String ER_CANT_USE_DTM_FOR_INPUT = - "ER_CANT_USE_DTM_FOR_INPUT"; - public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_XSLATTRSET_USED_ITSELF = - "ER_XSLATTRSET_USED_ITSELF"; - public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM"; - public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS"; - public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT = - "ER_IN_ELEMTEMPLATEELEM_READOBJECT"; - public static final String ER_DUPLICATE_NAMED_TEMPLATE = - "ER_DUPLICATE_NAMED_TEMPLATE"; - public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL"; - public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF"; - public static final String ER_ILLEGAL_DOMSOURCE_INPUT = - "ER_ILLEGAL_DOMSOURCE_INPUT"; - public static final String ER_CLASS_NOT_FOUND_FOR_OPTION = - "ER_CLASS_NOT_FOUND_FOR_OPTION"; - public static final String ER_REQUIRED_ELEM_NOT_FOUND = - "ER_REQUIRED_ELEM_NOT_FOUND"; - public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL"; - public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL"; - public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL"; - public static final String ER_SOURCE_CANNOT_BE_NULL = - "ER_SOURCE_CANNOT_BE_NULL"; - public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR"; - public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN"; - public static final String ER_CANNOT_CREATE_EXTENSN = - "ER_CANNOT_CREATE_EXTENSN"; - public static final String ER_INSTANCE_MTHD_CALL_REQUIRES = - "ER_INSTANCE_MTHD_CALL_REQUIRES"; - public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME"; - public static final String ER_ELEMENT_NAME_METHOD_STATIC = - "ER_ELEMENT_NAME_METHOD_STATIC"; - public static final String ER_EXTENSION_FUNC_UNKNOWN = - "ER_EXTENSION_FUNC_UNKNOWN"; - public static final String ER_MORE_MATCH_CONSTRUCTOR = - "ER_MORE_MATCH_CONSTRUCTOR"; - public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD"; - public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT"; - public static final String ER_INVALID_CONTEXT_PASSED = - "ER_INVALID_CONTEXT_PASSED"; - public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS"; - public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME"; - public static final String ER_NO_URL = "ER_NO_URL"; - public static final String ER_POOL_SIZE_LESSTHAN_ONE = - "ER_POOL_SIZE_LESSTHAN_ONE"; - public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER"; - public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT"; - public static final String ER_ILLEGAL_XMLSPACE_VALUE = - "ER_ILLEGAL_XMLSPACE_VALUE"; - public static final String ER_PROCESSFROMNODE_FAILED = - "ER_PROCESSFROMNODE_FAILED"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = - "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = - "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION = - "ER_UNKNOWN_ERROR_CALLING_EXTENSION"; - public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL"; - public static final String ER_ELEM_CONTENT_NOT_ALLOWED = - "ER_ELEM_CONTENT_NOT_ALLOWED"; - public static final String ER_STYLESHEET_DIRECTED_TERMINATION = - "ER_STYLESHEET_DIRECTED_TERMINATION"; - public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO"; - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = - "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES = - "ER_CANNOT_INIT_DEFAULT_TEMPLATES"; - public static final String ER_RESULT_NULL = "ER_RESULT_NULL"; - public static final String ER_RESULT_COULD_NOT_BE_SET = - "ER_RESULT_COULD_NOT_BE_SET"; - public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED"; - public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE = - "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE"; - public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE = - "ER_CANNOT_TRANSFORM_SOURCE_TYPE"; - public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER"; - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE"; - public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER"; - public static final String ER_NO_STYLESHEET_IN_MEDIA = - "ER_NO_STYLESHEET_IN_MEDIA"; - public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_PROPERTY_VALUE_BOOLEAN = - "ER_PROPERTY_VALUE_BOOLEAN"; - public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT = - "ER_COULD_NOT_FIND_EXTERN_SCRIPT"; - public static final String ER_RESOURCE_COULD_NOT_FIND = - "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED = - "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED"; - public static final String ER_FAILED_CREATING_ELEMLITRSLT = - "ER_FAILED_CREATING_ELEMLITRSLT"; - public static final String ER_VALUE_SHOULD_BE_NUMBER = - "ER_VALUE_SHOULD_BE_NUMBER"; - public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL"; - public static final String ER_FAILED_CALLING_METHOD = - "ER_FAILED_CALLING_METHOD"; - public static final String ER_FAILED_CREATING_ELEMTMPL = - "ER_FAILED_CREATING_ELEMTMPL"; - public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED"; - public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED"; - public static final String ER_BAD_VALUE = "ER_BAD_VALUE"; - public static final String ER_ATTRIB_VALUE_NOT_FOUND = - "ER_ATTRIB_VALUE_NOT_FOUND"; - public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED = - "ER_ATTRIB_VALUE_NOT_RECOGNIZED"; - public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE"; - public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG"; - public static final String ER_CANNOT_FIND_SAX1_DRIVER = - "ER_CANNOT_FIND_SAX1_DRIVER"; - public static final String ER_SAX1_DRIVER_NOT_LOADED = - "ER_SAX1_DRIVER_NOT_LOADED"; - public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED = - "ER_SAX1_DRIVER_NOT_INSTANTIATED" ; - public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER = - "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER"; - public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED = - "ER_PARSER_PROPERTY_NOT_SPECIFIED"; - public static final String ER_PARSER_ARG_CANNOT_BE_NULL = - "ER_PARSER_ARG_CANNOT_BE_NULL" ; - public static final String ER_FEATURE = "ER_FEATURE"; - public static final String ER_PROPERTY = "ER_PROPERTY" ; - public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER"; - public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ; - public static final String ER_NO_DRIVER_NAME_SPECIFIED = - "ER_NO_DRIVER_NAME_SPECIFIED"; - public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED"; - public static final String ER_POOLSIZE_LESS_THAN_ONE = - "ER_POOLSIZE_LESS_THAN_ONE"; - public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME"; - public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER"; - public static final String ER_ASSERT_NO_TEMPLATE_PARENT = - "ER_ASSERT_NO_TEMPLATE_PARENT"; - public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR = - "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR"; - public static final String ER_NOT_ALLOWED_IN_POSITION = - "ER_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION = - "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION"; - public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE = - "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE"; - public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX = - "ER_NAMESPACE_CONTEXT_NULL_PREFIX"; - public static final String ER_XPATH_RESOLVER_NULL_QNAME = - "ER_XPATH_RESOLVER_NULL_QNAME"; - public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY = - "ER_XPATH_RESOLVER_NEGATIVE_ARITY"; - public static final String INVALID_TCHAR = "INVALID_TCHAR"; - public static final String INVALID_QNAME = "INVALID_QNAME"; - public static final String INVALID_ENUM = "INVALID_ENUM"; - public static final String INVALID_NMTOKEN = "INVALID_NMTOKEN"; - public static final String INVALID_NCNAME = "INVALID_NCNAME"; - public static final String INVALID_BOOLEAN = "INVALID_BOOLEAN"; - public static final String INVALID_NUMBER = "INVALID_NUMBER"; - public static final String ER_ARG_LITERAL = "ER_ARG_LITERAL"; - public static final String ER_DUPLICATE_GLOBAL_VAR ="ER_DUPLICATE_GLOBAL_VAR"; - public static final String ER_DUPLICATE_VAR = "ER_DUPLICATE_VAR"; - public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH"; - public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX"; - public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET"; - public static final String ER_FUNCTION_NOT_FOUND = - "ER_FUNCTION_NOT_FOUND"; - public static final String ER_CANT_HAVE_CONTENT_AND_SELECT = - "ER_CANT_HAVE_CONTENT_AND_SELECT"; - public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE"; - public static final String ER_SET_FEATURE_NULL_NAME = - "ER_SET_FEATURE_NULL_NAME"; - public static final String ER_GET_FEATURE_NULL_NAME = - "ER_GET_FEATURE_NULL_NAME"; - public static final String ER_UNSUPPORTED_FEATURE = - "ER_UNSUPPORTED_FEATURE"; - public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING = - "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING"; - - public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE"; - public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR = - "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR"; - public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT = - "WG_EXPR_ATTRIB_CHANGED_TO_SELECT"; - public static final String WG_NO_LOCALE_IN_FORMATNUMBER = - "WG_NO_LOCALE_IN_FORMATNUMBER"; - public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_CANNOT_LOAD_REQUESTED_DOC = - "WG_CANNOT_LOAD_REQUESTED_DOC"; - public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR"; - public static final String WG_FUNCTIONS_SHOULD_USE_URL = - "WG_FUNCTIONS_SHOULD_USE_URL"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 = - "WG_ENCODING_NOT_SUPPORTED_USING_UTF8"; - public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA = - "WG_ENCODING_NOT_SUPPORTED_USING_JAVA"; - public static final String WG_SPECIFICITY_CONFLICTS = - "WG_SPECIFICITY_CONFLICTS"; - public static final String WG_PARSING_AND_PREPARING = - "WG_PARSING_AND_PREPARING"; - public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE"; - public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP"; - public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED"; - public static final String WG_NO_DECIMALFORMAT_DECLARATION = - "WG_NO_DECIMALFORMAT_DECLARATION"; - public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS"; - public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED = - "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED"; - public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE = - "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE"; - public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE"; - public static final String WG_COULD_NOT_RESOLVE_PREFIX = - "WG_COULD_NOT_RESOLVE_PREFIX"; - public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB = - "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB"; - public static final String WG_ILLEGAL_ATTRIBUTE_NAME = - "WG_ILLEGAL_ATTRIBUTE_NAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_VALUE = - "WG_ILLEGAL_ATTRIBUTE_VALUE"; - public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG"; - public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = - "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; - public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = - "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; - public static final String WG_ILLEGAL_ATTRIBUTE_POSITION = - "WG_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String NO_MODIFICATION_ALLOWED_ERR = - "NO_MODIFICATION_ALLOWED_ERR"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_NO_CURLYBRACE, - "\u932F\u8AA4: \u8868\u793A\u5F0F\u4E2D\u4E0D\u53EF\u6709 '{'"}, - - { ER_ILLEGAL_ATTRIBUTE , - "{0} \u5177\u6709\u7121\u6548\u5C6C\u6027: {1}"}, - - {ER_NULL_SOURCENODE_APPLYIMPORTS , - "sourceNode \u5728 xsl:apply-imports \u4E2D\u662F\u7A7A\u503C\uFF01"}, - - {ER_CANNOT_ADD, - "\u7121\u6CD5\u65B0\u589E {0} \u81F3 {1}"}, - - { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES, - "sourceNode \u5728 handleApplyTemplatesInstruction \u4E2D\u662F\u7A7A\u503C\uFF01"}, - - { ER_NO_NAME_ATTRIB, - "{0} \u5FC5\u9808\u6709\u540D\u7A31\u5C6C\u6027\u3002"}, - - {ER_TEMPLATE_NOT_FOUND, - "\u627E\u4E0D\u5230\u4E0B\u5217\u540D\u7A31\u7684\u6A23\u677F: {0}"}, - - {ER_CANT_RESOLVE_NAME_AVT, - "\u7121\u6CD5\u89E3\u6790 xsl:call-template \u4E2D\u7684\u540D\u7A31 AVT\u3002"}, - - {ER_REQUIRES_ATTRIB, - "{0} \u9700\u8981\u5C6C\u6027: {1}"}, - - { ER_MUST_HAVE_TEST_ATTRIB, - "{0} \u5FC5\u9808\u6709 ''test'' \u5C6C\u6027\u3002"}, - - {ER_BAD_VAL_ON_LEVEL_ATTRIB, - "\u932F\u8AA4\u7684\u503C\u4F4D\u65BC\u5C64\u6B21\u5C6C\u6027: {0}"}, - - {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML, - "processing-instruction \u540D\u7A31\u4E0D\u53EF\u70BA 'xml'"}, - - { ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, - "processing-instruction \u540D\u7A31\u5FC5\u9808\u662F\u6709\u6548\u7684 NCName: {0}"}, - - { ER_NEED_MATCH_ATTRIB, - "{0} \u82E5\u5177\u6709\u6A21\u5F0F\uFF0C\u5247\u5FC5\u9808\u6709\u914D\u5C0D\u5C6C\u6027\u3002"}, - - { ER_NEED_NAME_OR_MATCH_ATTRIB, - "{0} \u9700\u8981\u540D\u7A31\u6216\u914D\u5C0D\u5C6C\u6027\u3002"}, - - {ER_CANT_RESOLVE_NSPREFIX, - "\u7121\u6CD5\u89E3\u6790\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC: {0}"}, - - { ER_ILLEGAL_VALUE, - "xml:space \u5177\u6709\u7121\u6548\u503C: {0}"}, - - { ER_NO_OWNERDOC, - "\u5B50\u9805\u7BC0\u9EDE\u4E0D\u5177\u6709\u64C1\u6709\u8005\u6587\u4EF6\uFF01"}, - - { ER_ELEMTEMPLATEELEM_ERR, - "ElemTemplateElement \u932F\u8AA4: {0}"}, - - { ER_NULL_CHILD, - "\u5617\u8A66\u65B0\u589E\u7A7A\u503C\u5B50\u9805\uFF01"}, - - { ER_NEED_SELECT_ATTRIB, - "{0} \u9700\u8981\u9078\u53D6\u5C6C\u6027\u3002"}, - - { ER_NEED_TEST_ATTRIB , - "xsl:when \u5FC5\u9808\u5177\u6709 'test' \u5C6C\u6027\u3002"}, - - { ER_NEED_NAME_ATTRIB, - "xsl:with-param \u5FC5\u9808\u5177\u6709 'name' \u5C6C\u6027\u3002"}, - - { ER_NO_CONTEXT_OWNERDOC, - "\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u4E0D\u5177\u6709\u64C1\u6709\u8005\u6587\u4EF6\uFF01"}, - - {ER_COULD_NOT_CREATE_XML_PROC_LIAISON, - "\u7121\u6CD5\u5EFA\u7ACB XML TransformerFactory Liaison: {0}"}, - - {ER_PROCESS_NOT_SUCCESSFUL, - "Xalan: \u8655\u7406\u4F5C\u696D\u5931\u6557\u3002"}, - - { ER_NOT_SUCCESSFUL, - "Xalan: \u5931\u6557\uFF01"}, - - { ER_ENCODING_NOT_SUPPORTED, - "\u4E0D\u652F\u63F4\u7DE8\u78BC: {0}"}, - - {ER_COULD_NOT_CREATE_TRACELISTENER, - "\u7121\u6CD5\u5EFA\u7ACB TraceListener: {0}"}, - - {ER_KEY_REQUIRES_NAME_ATTRIB, - "xsl:key \u9700\u8981 'name' \u5C6C\u6027\uFF01"}, - - { ER_KEY_REQUIRES_MATCH_ATTRIB, - "xsl:key \u9700\u8981 'match' \u5C6C\u6027\uFF01"}, - - { ER_KEY_REQUIRES_USE_ATTRIB, - "xsl:key \u9700\u8981 'use' \u5C6C\u6027\uFF01"}, - - { ER_REQUIRES_ELEMENTS_ATTRIB, - "(StylesheetHandler) {0} \u9700\u8981 ''elements'' \u5C6C\u6027\uFF01"}, - - { ER_MISSING_PREFIX_ATTRIB, - "(StylesheetHandler) \u907A\u6F0F {0} \u5C6C\u6027 ''prefix''"}, - - { ER_BAD_STYLESHEET_URL, - "\u6A23\u5F0F\u8868 URL \u932F\u8AA4: {0}"}, - - { ER_FILE_NOT_FOUND, - "\u627E\u4E0D\u5230\u6A23\u5F0F\u8868\u6A94\u6848: {0}"}, - - { ER_IOEXCEPTION, - "\u6A23\u5F0F\u8868\u6A94\u6848\u767C\u751F IO \u7570\u5E38\u72C0\u6CC1: {0}"}, - - { ER_NO_HREF_ATTRIB, - "(StylesheetHandler) \u627E\u4E0D\u5230 {0} \u7684 href \u5C6C\u6027"}, - - { ER_STYLESHEET_INCLUDES_ITSELF, - "(StylesheetHandler) {0} \u76F4\u63A5\u6216\u9593\u63A5\u5730\u5305\u542B\u672C\u8EAB\uFF01"}, - - { ER_PROCESSINCLUDE_ERROR, - "StylesheetHandler.processInclude \u932F\u8AA4\uFF0C{0}"}, - - { ER_MISSING_LANG_ATTRIB, - "(StylesheetHandler) \u907A\u6F0F {0} \u5C6C\u6027 ''lang''"}, - - { ER_MISSING_CONTAINER_ELEMENT_COMPONENT, - "(StylesheetHandler) {0} \u5143\u7D20\u7684\u4F4D\u7F6E\u932F\u8AA4\uFF1F\u907A\u6F0F\u5BB9\u5668\u5143\u7D20 ''component''"}, - - { ER_CAN_ONLY_OUTPUT_TO_ELEMENT, - "\u53EA\u80FD\u8F38\u51FA\u81F3 Element\u3001DocumentFragment\u3001Document \u6216 PrintWriter\u3002"}, - - { ER_PROCESS_ERROR, - "StylesheetRoot.process \u932F\u8AA4"}, - - { ER_UNIMPLNODE_ERROR, - "UnImplNode \u932F\u8AA4: {0}"}, - - { ER_NO_SELECT_EXPRESSION, - "\u932F\u8AA4\uFF01\u627E\u4E0D\u5230 xpath \u9078\u53D6\u8868\u793A\u5F0F (-select)\u3002"}, - - { ER_CANNOT_SERIALIZE_XSLPROCESSOR, - "\u7121\u6CD5\u5E8F\u5217\u5316 XSLProcessor\uFF01"}, - - { ER_NO_INPUT_STYLESHEET, - "\u672A\u6307\u5B9A\u6A23\u5F0F\u8868\u8F38\u5165\uFF01"}, - - { ER_FAILED_PROCESS_STYLESHEET, - "\u7121\u6CD5\u8655\u7406\u6A23\u5F0F\u8868\uFF01"}, - - { ER_COULDNT_PARSE_DOC, - "\u7121\u6CD5\u5256\u6790 {0} \u6587\u4EF6\uFF01"}, - - { ER_COULDNT_FIND_FRAGMENT, - "\u627E\u4E0D\u5230\u7247\u6BB5: {0}"}, - - { ER_NODE_NOT_ELEMENT, - "\u7247\u6BB5 ID \u6307\u5411\u7684\u7BC0\u9EDE\u4E0D\u662F\u5143\u7D20: {0}"}, - - { ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB, - "for-each \u5FC5\u9808\u6709\u914D\u5C0D\u6216\u540D\u7A31\u5C6C\u6027"}, - - { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB, - "\u6A23\u677F\u5FC5\u9808\u6709\u914D\u5C0D\u6216\u540D\u7A31\u5C6C\u6027"}, - - { ER_NO_CLONE_OF_DOCUMENT_FRAG, - "\u6C92\u6709\u6587\u4EF6\u7247\u6BB5\u7684\u8907\u88FD\uFF01"}, - - { ER_CANT_CREATE_ITEM, - "\u7121\u6CD5\u5728\u7D50\u679C\u6A39\u72C0\u7D50\u69CB\u4E2D\u5EFA\u7ACB\u9805\u76EE: {0}"}, - - { ER_XMLSPACE_ILLEGAL_VALUE, - "\u4F86\u6E90 XML \u4E2D\u7684 xml:space \u5177\u6709\u7121\u6548\u503C: {0}"}, - - { ER_NO_XSLKEY_DECLARATION, - "{0} \u6C92\u6709 xsl:key \u5BA3\u544A\uFF01"}, - - { ER_CANT_CREATE_URL, - "\u932F\u8AA4\uFF01\u7121\u6CD5\u70BA {0} \u5EFA\u7ACB url"}, - - { ER_XSLFUNCTIONS_UNSUPPORTED, - "\u4E0D\u652F\u63F4 xsl:functions"}, - - { ER_PROCESSOR_ERROR, - "XSLT TransformerFactory \u932F\u8AA4"}, - - { ER_NOT_ALLOWED_INSIDE_STYLESHEET, - "(StylesheetHandler) \u6A23\u5F0F\u8868\u5167\u4E0D\u5141\u8A31 {0}\uFF01"}, - - { ER_RESULTNS_NOT_SUPPORTED, - "\u4E0D\u518D\u652F\u63F4 result-ns\uFF01\u8ACB\u6539\u7528 xsl:output\u3002"}, - - { ER_DEFAULTSPACE_NOT_SUPPORTED, - "\u4E0D\u518D\u652F\u63F4 default-space\uFF01\u8ACB\u6539\u7528 xsl:strip-space \u6216 xsl:preserve-space\u3002"}, - - { ER_INDENTRESULT_NOT_SUPPORTED, - "\u4E0D\u518D\u652F\u63F4 indent-result\uFF01\u8ACB\u6539\u7528 xsl:output\u3002"}, - - { ER_ILLEGAL_ATTRIB, - "(StylesheetHandler) {0} \u5177\u6709\u7121\u6548\u5C6C\u6027: {1}"}, - - { ER_UNKNOWN_XSL_ELEM, - "\u4E0D\u660E\u7684 XSL \u5143\u7D20: {0}"}, - - { ER_BAD_XSLSORT_USE, - "(StylesheetHandler) xsl:sort \u53EA\u80FD\u8207 xsl:apply-templates \u6216 xsl:for-each \u4E00\u8D77\u4F7F\u7528\u3002"}, - - { ER_MISPLACED_XSLWHEN, - "(StylesheetHandler) xsl:when \u4F4D\u7F6E\u932F\u8AA4\uFF01"}, - - { ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:when \u7684\u7236\u9805\u4E0D\u662F xsl:choose\uFF01"}, - - { ER_MISPLACED_XSLOTHERWISE, - "(StylesheetHandler) xsl:otherwise \u4F4D\u7F6E\u932F\u8AA4\uFF01"}, - - { ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE, - "(StylesheetHandler) xsl:otherwise \u7684\u7236\u9805\u4E0D\u662F xsl:choose\uFF01"}, - - { ER_NOT_ALLOWED_INSIDE_TEMPLATE, - "(StylesheetHandler) \u6A23\u677F\u5167\u4E0D\u5141\u8A31 {0}\uFF01"}, - - { ER_UNKNOWN_EXT_NS_PREFIX, - "(StylesheetHandler) \u4E0D\u660E\u7684 {0} \u64F4\u5145\u5957\u4EF6\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC {1}"}, - - { ER_IMPORTS_AS_FIRST_ELEM, - "(StylesheetHandler) \u532F\u5165\u53EA\u80FD\u767C\u751F\u65BC\u6A23\u5F0F\u8868\u4E2D\u7684\u7B2C\u4E00\u500B\u5143\u7D20\uFF01"}, - - { ER_IMPORTING_ITSELF, - "(StylesheetHandler) {0} \u76F4\u63A5\u6216\u9593\u63A5\u5730\u532F\u5165\u672C\u8EAB\uFF01"}, - - { ER_XMLSPACE_ILLEGAL_VAL, - "(StylesheetHandler) xml:space \u5177\u6709\u7121\u6548\u503C: {0}"}, - - { ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL, - "processStylesheet \u5931\u6557\uFF01"}, - - { ER_SAX_EXCEPTION, - "SAX \u7570\u5E38\u72C0\u6CC1"}, - -// add this message to fix bug 21478 - { ER_FUNCTION_NOT_SUPPORTED, - "\u4E0D\u652F\u63F4\u51FD\u6578\uFF01"}, - - { ER_XSLT_ERROR, - "XSLT \u932F\u8AA4"}, - - { ER_CURRENCY_SIGN_ILLEGAL, - "\u683C\u5F0F\u6A23\u5F0F\u5B57\u4E32\u4E2D\u4E0D\u5141\u8A31\u8CA8\u5E63\u7B26\u865F"}, - - { ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM, - "Stylesheet DOM \u4E2D\u4E0D\u652F\u63F4\u6587\u4EF6\u51FD\u6578\uFF01"}, - - { ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER, - "\u7121\u6CD5\u89E3\u6790\u975E\u524D\u7F6E\u78BC\u89E3\u6790\u5668\u7684\u524D\u7F6E\u78BC\uFF01"}, - - { ER_REDIRECT_COULDNT_GET_FILENAME, - "\u91CD\u5C0E\u64F4\u5145\u5957\u4EF6: \u7121\u6CD5\u53D6\u5F97\u6A94\u6848\u540D\u7A31 - \u6A94\u6848\u6216\u9078\u53D6\u5C6C\u6027\u5FC5\u9808\u50B3\u56DE\u6709\u6548\u5B57\u4E32\u3002"}, - - { ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT, - "\u7121\u6CD5\u5728\u91CD\u5C0E\u64F4\u5145\u5957\u4EF6\u4E2D\u5EFA\u7ACB FormatterListener\uFF01"}, - - { ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX, - "exclude-result-prefixes \u4E2D\u7684\u524D\u7F6E\u78BC\u7121\u6548: {0}"}, - - { ER_MISSING_NS_URI, - "\u907A\u6F0F\u6307\u5B9A\u524D\u7F6E\u78BC\u7684\u547D\u540D\u7A7A\u9593 URI"}, - - { ER_MISSING_ARG_FOR_OPTION, - "\u907A\u6F0F\u9078\u9805\u7684\u5F15\u6578: {0}"}, - - { ER_INVALID_OPTION, - "\u7121\u6548\u7684\u9078\u9805: {0}"}, - - { ER_MALFORMED_FORMAT_STRING, - "\u683C\u5F0F\u932F\u8AA4\u7684\u683C\u5F0F\u5B57\u4E32: {0}"}, - - { ER_STYLESHEET_REQUIRES_VERSION_ATTRIB, - "xsl:stylesheet \u9700\u8981 'version' \u5C6C\u6027\uFF01"}, - - { ER_ILLEGAL_ATTRIBUTE_VALUE, - "\u5C6C\u6027: {0} \u5177\u6709\u7121\u6548\u503C: {1}"}, - - { ER_CHOOSE_REQUIRES_WHEN, - "xsl:choose \u9700\u8981 xsl:when"}, - - { ER_NO_APPLY_IMPORT_IN_FOR_EACH, - "xsl:for-each \u4E2D\u4E0D\u5141\u8A31 xsl:apply-imports"}, - - { ER_CANT_USE_DTM_FOR_OUTPUT, - "DTMLiaison \u7121\u6CD5\u7528\u65BC\u8F38\u51FA DOM \u7BC0\u9EDE\u3002\u8ACB\u6539\u70BA\u50B3\u9001 com.sun.org.apache.xpath.internal.DOM2Helper\uFF01"}, - - { ER_CANT_USE_DTM_FOR_INPUT, - "DTMLiaison \u7121\u6CD5\u7528\u65BC\u8F38\u5165 DOM \u7BC0\u9EDE\u3002\u8ACB\u6539\u70BA\u50B3\u9001 com.sun.org.apache.xpath.internal.DOM2Helper\uFF01"}, - - { ER_CALL_TO_EXT_FAILED, - "\u547C\u53EB\u64F4\u5145\u5957\u4EF6\u5143\u7D20\u5931\u6557: {0}"}, - - { ER_PREFIX_MUST_RESOLVE, - "\u524D\u7F6E\u78BC\u5FC5\u9808\u89E3\u6790\u70BA\u547D\u540D\u7A7A\u9593: {0}"}, - - { ER_INVALID_UTF16_SURROGATE, - "\u5075\u6E2C\u5230\u7121\u6548\u7684 UTF-16 \u4EE3\u7406: {0}\uFF1F"}, - - { ER_XSLATTRSET_USED_ITSELF, - "xsl:attribute-set {0} \u4F7F\u7528\u672C\u8EAB\uFF0C\u5982\u6B64\u5C07\u9020\u6210\u7121\u9650\u8FF4\u5708\u3002"}, - - { ER_CANNOT_MIX_XERCESDOM, - "\u7121\u6CD5\u6DF7\u5408\u975E Xerces-DOM \u8F38\u5165\u8207 Xerces-DOM \u8F38\u51FA\uFF01"}, - - { ER_TOO_MANY_LISTENERS, - "addTraceListenersToStylesheet - TooManyListenersException"}, - - { ER_IN_ELEMTEMPLATEELEM_READOBJECT, - "\u5728 ElemTemplateElement.readObject \u4E2D: {0}"}, - - { ER_DUPLICATE_NAMED_TEMPLATE, - "\u627E\u5230\u8D85\u904E\u4E00\u500B\u4E0B\u5217\u540D\u7A31\u7684\u6A23\u677F: {0}"}, - - { ER_INVALID_KEY_CALL, - "\u7121\u6548\u7684\u51FD\u6578\u547C\u53EB: \u4E0D\u5141\u8A31\u905E\u8FF4 key() \u547C\u53EB"}, - - { ER_REFERENCING_ITSELF, - "\u8B8A\u6578 {0} \u76F4\u63A5\u6216\u9593\u63A5\u5730\u53C3\u7167\u672C\u8EAB\uFF01"}, - - { ER_ILLEGAL_DOMSOURCE_INPUT, - "newTemplates \u4E4B DOMSource \u7684\u8F38\u5165\u7BC0\u9EDE\u4E0D\u53EF\u70BA\u7A7A\u503C\uFF01"}, - - { ER_CLASS_NOT_FOUND_FOR_OPTION, - "\u627E\u4E0D\u5230\u9078\u9805 {0} \u7684\u985E\u5225\u6A94\u6848"}, - - { ER_REQUIRED_ELEM_NOT_FOUND, - "\u627E\u4E0D\u5230\u9700\u8981\u7684\u5143\u7D20: {0}"}, - - { ER_INPUT_CANNOT_BE_NULL, - "InputStream \u4E0D\u53EF\u70BA\u7A7A\u503C"}, - - { ER_URI_CANNOT_BE_NULL, - "URI \u4E0D\u53EF\u70BA\u7A7A\u503C"}, - - { ER_FILE_CANNOT_BE_NULL, - "File \u4E0D\u53EF\u70BA\u7A7A\u503C"}, - - { ER_SOURCE_CANNOT_BE_NULL, - "InputSource \u4E0D\u53EF\u70BA\u7A7A\u503C"}, - - { ER_CANNOT_INIT_BSFMGR, - "\u7121\u6CD5\u8D77\u59CB BSF \u7BA1\u7406\u7A0B\u5F0F"}, - - { ER_CANNOT_CMPL_EXTENSN, - "\u7121\u6CD5\u7DE8\u8B6F\u64F4\u5145\u5957\u4EF6"}, - - { ER_CANNOT_CREATE_EXTENSN, - "\u7121\u6CD5\u5EFA\u7ACB\u64F4\u5145\u5957\u4EF6: {0}\uFF0C\u56E0\u70BA: {1}"}, - - { ER_INSTANCE_MTHD_CALL_REQUIRES, - "\u57F7\u884C\u8655\u7406\u65B9\u6CD5\u547C\u53EB\u65B9\u6CD5 {0} \u6642\uFF0C\u9700\u8981 Object \u57F7\u884C\u8655\u7406\u4F5C\u70BA\u7B2C\u4E00\u500B\u5F15\u6578"}, - - { ER_INVALID_ELEMENT_NAME, - "\u6307\u5B9A\u4E86\u7121\u6548\u7684\u5143\u7D20\u540D\u7A31 {0}"}, - - { ER_ELEMENT_NAME_METHOD_STATIC, - "\u5143\u7D20\u540D\u7A31\u65B9\u6CD5\u5FC5\u9808\u662F\u975C\u614B {0}"}, - - { ER_EXTENSION_FUNC_UNKNOWN, - "\u64F4\u5145\u5957\u4EF6\u51FD\u6578 {0} : {1} \u4E0D\u660E"}, - - { ER_MORE_MATCH_CONSTRUCTOR, - "{0} \u7684\u5EFA\u69CB\u5B50\u6709\u8D85\u904E\u4E00\u500B\u4EE5\u4E0A\u7684\u6700\u4F73\u914D\u5C0D"}, - - { ER_MORE_MATCH_METHOD, - "\u65B9\u6CD5 {0} \u6709\u8D85\u904E\u4E00\u500B\u4EE5\u4E0A\u7684\u6700\u4F73\u914D\u5C0D"}, - - { ER_MORE_MATCH_ELEMENT, - "\u5143\u7D20\u65B9\u6CD5 {0} \u6709\u8D85\u904E\u4E00\u500B\u4EE5\u4E0A\u7684\u6700\u4F73\u914D\u5C0D"}, - - { ER_INVALID_CONTEXT_PASSED, - "\u50B3\u9001\u4E86\u7121\u6548\u7684\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u4F86\u8A55\u4F30 {0}"}, - - { ER_POOL_EXISTS, - "\u96C6\u5340\u5DF2\u7D93\u5B58\u5728"}, - - { ER_NO_DRIVER_NAME, - "\u672A\u6307\u5B9A\u9A45\u52D5\u7A0B\u5F0F\u540D\u7A31"}, - - { ER_NO_URL, - "\u672A\u6307\u5B9A URL"}, - - { ER_POOL_SIZE_LESSTHAN_ONE, - "\u96C6\u5340\u5927\u5C0F\u5C0F\u65BC\u4E00\uFF01"}, - - { ER_INVALID_DRIVER, - "\u6307\u5B9A\u4E86\u7121\u6548\u7684\u9A45\u52D5\u7A0B\u5F0F\u540D\u7A31\uFF01"}, - - { ER_NO_STYLESHEETROOT, - "\u627E\u4E0D\u5230\u6A23\u5F0F\u8868\u6839\uFF01"}, - - { ER_ILLEGAL_XMLSPACE_VALUE, - "xml:space \u7684\u503C\u7121\u6548"}, - - { ER_PROCESSFROMNODE_FAILED, - "processFromNode \u5931\u6557"}, - - { ER_RESOURCE_COULD_NOT_LOAD, - "\u7121\u6CD5\u8F09\u5165\u8CC7\u6E90 [ {0} ]: {1} \n {2} \t {3}"}, - - { ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\u7DE9\u885D\u5340\u5927\u5C0F <=0"}, - - { ER_UNKNOWN_ERROR_CALLING_EXTENSION, - "\u547C\u53EB\u64F4\u5145\u5957\u4EF6\u6642\uFF0C\u767C\u751F\u4E0D\u660E\u7684\u932F\u8AA4"}, - - { ER_NO_NAMESPACE_DECL, - "\u524D\u7F6E\u78BC {0} \u6C92\u6709\u5C0D\u61C9\u7684\u547D\u540D\u7A7A\u9593\u5BA3\u544A"}, - - { ER_ELEM_CONTENT_NOT_ALLOWED, - "\u5143\u7D20\u5167\u5BB9\u4E0D\u5141\u8A31 lang=javaclass {0}"}, - - { ER_STYLESHEET_DIRECTED_TERMINATION, - "\u6A23\u5F0F\u8868\u5C0E\u5411\u7684\u7D42\u6B62"}, - - { ER_ONE_OR_TWO, - "1 \u6216 2"}, - - { ER_TWO_OR_THREE, - "2 \u6216 3"}, - - { ER_COULD_NOT_LOAD_RESOURCE, - "\u7121\u6CD5\u8F09\u5165 {0} (\u6AA2\u67E5 CLASSPATH)\uFF0C\u76EE\u524D\u53EA\u4F7F\u7528\u9810\u8A2D\u503C"}, - - { ER_CANNOT_INIT_DEFAULT_TEMPLATES, - "\u7121\u6CD5\u8D77\u59CB\u9810\u8A2D\u6A23\u677F"}, - - { ER_RESULT_NULL, - "\u7D50\u679C\u4E0D\u61C9\u70BA\u7A7A\u503C"}, - - { ER_RESULT_COULD_NOT_BE_SET, - "\u7121\u6CD5\u8A2D\u5B9A\u7D50\u679C"}, - - { ER_NO_OUTPUT_SPECIFIED, - "\u672A\u6307\u5B9A\u8F38\u51FA"}, - - { ER_CANNOT_TRANSFORM_TO_RESULT_TYPE, - "\u7121\u6CD5\u8F49\u63DB\u70BA\u985E\u578B {0} \u7684\u7D50\u679C"}, - - { ER_CANNOT_TRANSFORM_SOURCE_TYPE, - "\u7121\u6CD5\u8F49\u63DB\u985E\u578B {0} \u7684\u4F86\u6E90"}, - - { ER_NULL_CONTENT_HANDLER, - "\u7A7A\u503C\u5167\u5BB9\u8655\u7406\u7A0B\u5F0F"}, - - { ER_NULL_ERROR_HANDLER, - "\u7A7A\u503C\u932F\u8AA4\u8655\u7406\u7A0B\u5F0F"}, - - { ER_CANNOT_CALL_PARSE, - "\u82E5\u672A\u8A2D\u5B9A ContentHandler\uFF0C\u5247\u7121\u6CD5\u547C\u53EB\u5256\u6790"}, - - { ER_NO_PARENT_FOR_FILTER, - "\u7BE9\u9078\u6C92\u6709\u7236\u9805"}, - - { ER_NO_STYLESHEET_IN_MEDIA, - "\u5728 {0} \u4E2D\u627E\u4E0D\u5230\u6A23\u5F0F\u8868\uFF0C\u5A92\u9AD4 = {1}"}, - - { ER_NO_STYLESHEET_PI, - "\u5728 {0} \u4E2D\u627E\u4E0D\u5230 xml-stylesheet PI"}, - - { ER_NOT_SUPPORTED, - "\u4E0D\u652F\u63F4: {0}"}, - - { ER_PROPERTY_VALUE_BOOLEAN, - "\u5C6C\u6027 {0} \u7684\u503C\u61C9\u70BA\u5E03\u6797\u57F7\u884C\u8655\u7406"}, - - { ER_COULD_NOT_FIND_EXTERN_SCRIPT, - "\u7121\u6CD5\u5728 {0} \u53D6\u5F97\u5916\u90E8\u547D\u4EE4\u6A94"}, - - { ER_RESOURCE_COULD_NOT_FIND, - "\u627E\u4E0D\u5230\u8CC7\u6E90 [ {0} ]\u3002\n{1}"}, - - { ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, - "\u7121\u6CD5\u8FA8\u8B58\u7684\u8F38\u51FA\u5C6C\u6027: {0}"}, - - { ER_FAILED_CREATING_ELEMLITRSLT, - "\u7121\u6CD5\u5EFA\u7ACB ElemLiteralResult \u57F7\u884C\u8655\u7406"}, - - //Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE - // In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care - //in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc. - //NOTE: Not only the key name but message has also been changed. - { ER_VALUE_SHOULD_BE_NUMBER, - "{0} \u7684\u503C\u61C9\u5305\u542B\u53EF\u5256\u6790\u7684\u6578\u5B57"}, - - { ER_VALUE_SHOULD_EQUAL, - "{0} \u7684\u503C\u61C9\u7B49\u65BC yes \u6216 no"}, - - { ER_FAILED_CALLING_METHOD, - "\u7121\u6CD5\u547C\u53EB {0} \u65B9\u6CD5"}, - - { ER_FAILED_CREATING_ELEMTMPL, - "\u7121\u6CD5\u5EFA\u7ACB ElemTemplateElement \u57F7\u884C\u8655\u7406"}, - - { ER_CHARS_NOT_ALLOWED, - "\u6587\u4EF6\u6B64\u8655\u4E0D\u5141\u8A31\u5B57\u5143"}, - - { ER_ATTR_NOT_ALLOWED, - "{1} \u5143\u7D20\u4E0D\u5141\u8A31 \"{0}\" \u5C6C\u6027\uFF01"}, - - { ER_BAD_VALUE, - "{0} \u7121\u6548\u503C {1} "}, - - { ER_ATTRIB_VALUE_NOT_FOUND, - "\u627E\u4E0D\u5230 {0} \u5C6C\u6027\u503C"}, - - { ER_ATTRIB_VALUE_NOT_RECOGNIZED, - "{0} \u5C6C\u6027\u503C\u7121\u6CD5\u8FA8\u8B58 "}, - - { ER_NULL_URI_NAMESPACE, - "\u5617\u8A66\u4EE5\u7A7A\u503C URI \u7522\u751F\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC"}, - - { ER_NUMBER_TOO_BIG, - "\u5617\u8A66\u683C\u5F0F\u5316\u5927\u65BC\u6700\u5927\u9577\u6574\u6578\u7684\u6578\u5B57"}, - - { ER_CANNOT_FIND_SAX1_DRIVER, - "\u627E\u4E0D\u5230 SAX1 \u9A45\u52D5\u7A0B\u5F0F\u985E\u5225 {0}"}, - - { ER_SAX1_DRIVER_NOT_LOADED, - "\u627E\u5230 SAX1 \u9A45\u52D5\u7A0B\u5F0F\u985E\u5225 {0}\uFF0C\u4F46\u7121\u6CD5\u8F09\u5165"}, - - { ER_SAX1_DRIVER_NOT_INSTANTIATED, - "\u5DF2\u8F09\u5165 SAX1 \u9A45\u52D5\u7A0B\u5F0F\u985E\u5225 {0}\uFF0C\u4F46\u7121\u6CD5\u5EFA\u7ACB"}, - - { ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER, - "SAX1 \u9A45\u52D5\u7A0B\u5F0F\u985E\u5225 {0} \u672A\u5BE6\u884C org.xml.sax.Parser"}, - - { ER_PARSER_PROPERTY_NOT_SPECIFIED, - "\u672A\u6307\u5B9A\u7CFB\u7D71\u5C6C\u6027 org.xml.sax.parser"}, - - { ER_PARSER_ARG_CANNOT_BE_NULL, - "\u5256\u6790\u5668\u5F15\u6578\u4E0D\u53EF\u70BA\u7A7A\u503C"}, - - { ER_FEATURE, - "\u529F\u80FD: {0}"}, - - { ER_PROPERTY, - "\u5C6C\u6027: {0}"}, - - { ER_NULL_ENTITY_RESOLVER, - "\u7A7A\u503C\u5BE6\u9AD4\u89E3\u6790\u5668"}, - - { ER_NULL_DTD_HANDLER, - "\u7A7A\u503C DTD \u8655\u7406\u7A0B\u5F0F"}, - - { ER_NO_DRIVER_NAME_SPECIFIED, - "\u672A\u6307\u5B9A\u9A45\u52D5\u7A0B\u5F0F\u540D\u7A31\uFF01"}, - - { ER_NO_URL_SPECIFIED, - "\u672A\u6307\u5B9A URL\uFF01"}, - - { ER_POOLSIZE_LESS_THAN_ONE, - "\u96C6\u5340\u5927\u5C0F\u5C0F\u65BC 1\uFF01"}, - - { ER_INVALID_DRIVER_NAME, - "\u6307\u5B9A\u4E86\u7121\u6548\u7684\u9A45\u52D5\u7A0B\u5F0F\u540D\u7A31\uFF01"}, - - { ER_ERRORLISTENER, - "ErrorListener"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The name -// 'ElemTemplateElement' is the name of a class, and should not be -// translated. - { ER_ASSERT_NO_TEMPLATE_PARENT, - "\u7A0B\u5F0F\u8A2D\u8A08\u4EBA\u54E1\u7684\u932F\u8AA4\uFF01\u8868\u793A\u5F0F\u6C92\u6709 ElemTemplateElement \u7236\u9805\uFF01"}, - - -// Note to translators: The following message should not normally be displayed -// to users. It describes a situation in which the processor has detected -// an internal consistency problem in itself, and it provides this message -// for the developer to help diagnose the problem. The substitution text -// provides further information in order to diagnose the problem. The name -// 'RedundentExprEliminator' is the name of a class, and should not be -// translated. - { ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR, - "\u7A0B\u5F0F\u8A2D\u8A08\u4EBA\u54E1\u5728 RedundentExprEliminator \u4E2D\u7684\u5BA3\u544A: {0}"}, - - { ER_NOT_ALLOWED_IN_POSITION, - "\u6A23\u5F0F\u8868\u6B64\u4F4D\u7F6E\u4E0D\u5141\u8A31 {0}\uFF01"}, - - { ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION, - "\u6A23\u5F0F\u8868\u6B64\u4F4D\u7F6E\u4E0D\u5141\u8A31\u975E\u7A7A\u683C\u6587\u5B57\uFF01"}, - - // This code is shared with warning codes. - // SystemId Unknown - { INVALID_TCHAR, - "\u7121\u6548\u503C: {1} \u7528\u65BC CHAR \u5C6C\u6027: {0}\u3002\u985E\u578B CHAR \u7684\u5C6C\u6027\u5FC5\u9808\u50C5\u70BA 1 \u500B\u5B57\u5143\uFF01"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "QNAME" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value and {0} is the attribute name. - //The following codes are shared with the warning codes... - { INVALID_QNAME, - "\u7121\u6548\u503C: {1} \u7528\u65BC QNAME \u5C6C\u6027: {0}"}, - - // Note to translators: The following message is used if the value of - // an attribute in a stylesheet is invalid. "ENUM" is the XML data-type of - // the attribute, and should not be translated. The substitution text {1} is - // the attribute value, {0} is the attribute name, and {2} is a list of valid - // values. - { INVALID_ENUM, - "\u7121\u6548\u503C: {1} \u7528\u65BC ENUM \u5C6C\u6027: {0}\u3002\u6709\u6548\u503C\u70BA: {2}\u3002"}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NMTOKEN" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NMTOKEN, - "\u7121\u6548\u503C: {1} \u7528\u65BC NMTOKEN \u5C6C\u6027: {0}"}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "NCNAME" is the XML data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NCNAME, - "\u7121\u6548\u503C: {1} \u7528\u65BC NCNAME \u5C6C\u6027: {0}"}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "boolean" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_BOOLEAN, - "\u7121\u6548\u503C: {1} \u7528\u65BC\u5E03\u6797\u5C6C\u6027: {0}"}, - -// Note to translators: The following message is used if the value of -// an attribute in a stylesheet is invalid. "number" is the XSLT data-type -// of the attribute, and should not be translated. The substitution text {1} is -// the attribute value and {0} is the attribute name. - { INVALID_NUMBER, - "\u7121\u6548\u503C: {1} \u7528\u65BC\u6578\u5B57\u5C6C\u6027: {0}"}, - - - // End of shared codes... - -// Note to translators: A "match pattern" is a special form of XPath expression -// that is used for matching patterns. The substitution text is the name of -// a function. The message indicates that when this function is referenced in -// a match pattern, its argument must be a string literal (or constant.) -// ER_ARG_LITERAL - new error message for bugzilla //5202 - { ER_ARG_LITERAL, - "\u914D\u5C0D\u6A23\u5F0F\u4E2D {0} \u7684\u5F15\u6578\u5FC5\u9808\u662F\u6587\u5B57\u3002"}, - -// Note to translators: The following message indicates that two definitions of -// a variable. A "global variable" is a variable that is accessible everywher -// in the stylesheet. -// ER_DUPLICATE_GLOBAL_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_GLOBAL_VAR, - "\u91CD\u8907\u7684\u5168\u57DF\u8B8A\u6578\u5BA3\u544A\u3002"}, - - -// Note to translators: The following message indicates that two definitions of -// a variable were encountered. -// ER_DUPLICATE_VAR - new error message for bugzilla #790 - { ER_DUPLICATE_VAR, - "\u91CD\u8907\u7684\u8B8A\u6578\u5BA3\u544A\u3002"}, - - // Note to translators: "xsl:template, "name" and "match" are XSLT keywords - // which must not be translated. - // ER_TEMPLATE_NAME_MATCH - new error message for bugzilla #789 - { ER_TEMPLATE_NAME_MATCH, - "xsl:template \u5FC5\u9808\u6709\u540D\u7A31\u6216\u914D\u5C0D\u5C6C\u6027 (\u6216\u5177\u6709\u5169\u8005)"}, - - // Note to translators: "exclude-result-prefixes" is an XSLT keyword which - // should not be translated. The message indicates that a namespace prefix - // encountered as part of the value of the exclude-result-prefixes attribute - // was in error. - // ER_INVALID_PREFIX - new error message for bugzilla #788 - { ER_INVALID_PREFIX, - "exclude-result-prefixes \u4E2D\u7684\u524D\u7F6E\u78BC\u7121\u6548: {0}"}, - - // Note to translators: An "attribute set" is a set of attributes that can - // be added to an element in the output document as a group. The message - // indicates that there was a reference to an attribute set named {0} that - // was never defined. - // ER_NO_ATTRIB_SET - new error message for bugzilla #782 - { ER_NO_ATTRIB_SET, - "\u4E0D\u5B58\u5728\u540D\u7A31\u70BA {0} \u7684 attribute-set"}, - - // Note to translators: This message indicates that there was a reference - // to a function named {0} for which no function definition could be found. - { ER_FUNCTION_NOT_FOUND, - "\u4E0D\u5B58\u5728\u540D\u7A31\u70BA {0} \u7684\u51FD\u6578"}, - - // Note to translators: This message indicates that the XSLT instruction - // that is named by the substitution text {0} must not contain other XSLT - // instructions (content) or a "select" attribute. The word "select" is - // an XSLT keyword in this case and must not be translated. - { ER_CANT_HAVE_CONTENT_AND_SELECT, - "{0} \u5143\u7D20\u4E0D\u53EF\u540C\u6642\u5177\u6709\u5167\u5BB9\u8207\u9078\u53D6\u5C6C\u6027\u3002"}, - - // Note to translators: This message indicates that the value argument - // of setParameter must be a valid Java Object. - { ER_INVALID_SET_PARAM_VALUE, - "\u53C3\u6578 {0} \u7684\u503C\u5FC5\u9808\u662F\u6709\u6548\u7684 Java \u7269\u4EF6"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT, - "xsl:namespace-alias \u5143\u7D20\u7684 result-prefix \u5C6C\u6027\u5177\u6709\u503C '#default'\uFF0C\u4F46\u662F\u5143\u7D20\u7BC4\u570D\u4E2D\u6C92\u6709\u9810\u8A2D\u547D\u540D\u7A7A\u9593\u7684\u5BA3\u544A"}, - - { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX, - "xsl:namespace-alias \u5143\u7D20\u7684 result-prefix \u5C6C\u6027\u5177\u6709\u503C ''{0}''\uFF0C\u4F46\u662F\u5143\u7D20\u7BC4\u570D\u4E2D\u6C92\u6709\u524D\u7F6E\u78BC ''{0}'' \u7684\u547D\u540D\u7A7A\u9593\u5BA3\u544A\u3002"}, - - { ER_SET_FEATURE_NULL_NAME, - "TransformerFactory.setFeature(\u5B57\u4E32\u540D\u7A31, \u5E03\u6797\u503C) \u4E2D\u7684\u529F\u80FD\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"}, - - { ER_GET_FEATURE_NULL_NAME, - "TransformerFactory.getFeature(\u5B57\u4E32\u540D\u7A31) \u4E2D\u7684\u529F\u80FD\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"}, - - { ER_UNSUPPORTED_FEATURE, - "\u7121\u6CD5\u5728\u6B64 TransformerFactory \u4E0A\u8A2D\u5B9A\u529F\u80FD ''{0}''\u3002"}, - - { ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING, - "\u7576\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u6642\uFF0C\u4E0D\u5141\u8A31\u4F7F\u7528\u64F4\u5145\u5957\u4EF6\u5143\u7D20 ''{0}''\u3002"}, - - { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE, - "\u7121\u6CD5\u53D6\u5F97\u7A7A\u503C\u547D\u540D\u7A7A\u9593 uri \u7684\u524D\u7F6E\u78BC\u3002"}, - - { ER_NAMESPACE_CONTEXT_NULL_PREFIX, - "\u7121\u6CD5\u53D6\u5F97\u7A7A\u503C\u524D\u7F6E\u78BC\u7684\u547D\u540D\u7A7A\u9593 uri\u3002"}, - - { ER_XPATH_RESOLVER_NULL_QNAME, - "\u51FD\u6578\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"}, - - { ER_XPATH_RESOLVER_NEGATIVE_ARITY, - "Arity \u4E0D\u53EF\u70BA\u8CA0\u503C\u3002"}, - // Warnings... - - { WG_FOUND_CURLYBRACE, - "\u627E\u5230 '}'\uFF0C\u4F46\u6C92\u6709\u958B\u555F\u7684\u5C6C\u6027\u6A23\u677F\uFF01"}, - - { WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR, - "\u8B66\u544A: \u8A08\u6578\u5C6C\u6027\u4E0D\u7B26\u5408 xsl:number \u4E2D\u7684\u7956\u7CFB\uFF01\u76EE\u6A19 = {0}"}, - - { WG_EXPR_ATTRIB_CHANGED_TO_SELECT, - "\u820A\u8A9E\u6CD5: 'expr' \u5C6C\u6027\u7684\u540D\u7A31\u5DF2\u8B8A\u66F4\u70BA 'select'\u3002"}, - - { WG_NO_LOCALE_IN_FORMATNUMBER, - "Xalan \u5C1A\u672A\u8655\u7406 format-number \u51FD\u6578\u4E2D\u7684\u5730\u5340\u8A2D\u5B9A\u540D\u7A31\u3002"}, - - { WG_LOCALE_NOT_FOUND, - "\u8B66\u544A: \u627E\u4E0D\u5230 xml:lang={0} \u7684\u5730\u5340\u8A2D\u5B9A"}, - - { WG_CANNOT_MAKE_URL_FROM, - "\u7121\u6CD5\u5F9E {0} \u5EFA\u7ACB URL"}, - - { WG_CANNOT_LOAD_REQUESTED_DOC, - "\u7121\u6CD5\u8F09\u5165\u8981\u6C42\u7684\u6587\u4EF6: {0}"}, - - { WG_CANNOT_FIND_COLLATOR, - "\u627E\u4E0D\u5230 >>>>>> Xalan \u7248\u672C "}, - { "version2", "<<<<<<<"}, - { "yes", "\u662F"}, - { "line", "\u884C\u865F"}, - { "column","\u8CC7\u6599\u6B04\u7DE8\u865F"}, - { "xsldone", "XSLProcessor: \u5B8C\u6210"}, - - - // Note to translators: The following messages provide usage information - // for the Xalan Process command line. "Process" is the name of a Java class, - // and should not be translated. - { "xslProc_option", "Xalan-J \u547D\u4EE4\u884C\u8655\u7406\u4F5C\u696D\u985E\u5225\u9078\u9805:"}, - { "xslProc_option", "Xalan-J \u547D\u4EE4\u884C\u8655\u7406\u4F5C\u696D\u985E\u5225\u9078\u9805:"}, - { "xslProc_invalid_xsltc_option", "XSLTC \u6A21\u5F0F\u4E2D\u4E0D\u652F\u63F4\u9078\u9805 {0}\u3002"}, - { "xslProc_invalid_xalan_option", "\u9078\u9805 {0} \u53EA\u80FD\u8207 -XSLTC \u4E00\u8D77\u4F7F\u7528\u3002"}, - { "xslProc_no_input", "\u932F\u8AA4: \u672A\u6307\u5B9A\u6A23\u5F0F\u8868\u6216\u8F38\u5165 xml\u3002\u4E0D\u4F7F\u7528\u4EFB\u4F55\u9078\u9805\u4F86\u57F7\u884C\u6B64\u547D\u4EE4\uFF0C\u53EF\u53D6\u5F97\u7528\u6CD5\u6307\u793A\u3002"}, - { "xslProc_common_options", "-\u4E00\u822C\u9078\u9805-"}, - { "xslProc_xalan_options", "-Xalan \u7684\u9078\u9805-"}, - { "xslProc_xsltc_options", "-XSLTC \u7684\u9078\u9805-"}, - { "xslProc_return_to_continue", "(\u6309 \u4EE5\u7E7C\u7E8C)"}, - - // Note to translators: The option name and the parameter name do not need to - // be translated. Only translate the messages in parentheses. Note also that - // leading whitespace in the messages is used to indent the usage information - // for each option in the English messages. - // Do not translate the keywords: XSLTC, SAX, DOM and DTM. - { "optionXSLTC", " [-XSLTC (\u4F7F\u7528 XSLTC \u9032\u884C\u8F49\u63DB)]"}, - { "optionIN", " [-IN inputXMLURL]"}, - { "optionXSL", " [-XSL XSLTransformationURL]"}, - { "optionOUT", " [-OUT outputFileName]"}, - { "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"}, - { "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"}, - { "optionPARSER", " [-PARSER \u5256\u6790\u5668\u806F\u7D61\u7684\u5B8C\u6574\u985E\u5225\u540D\u7A31]"}, - { "optionE", " [-E (\u52FF\u5C55\u958B\u5BE6\u9AD4\u53C3\u7167)]"}, - { "optionV", " [-E (\u52FF\u5C55\u958B\u5BE6\u9AD4\u53C3\u7167)]"}, - { "optionQC", " [-QC (\u975C\u97F3\u6A23\u5F0F\u885D\u7A81\u8B66\u544A)]"}, - { "optionQ", " [-Q (\u975C\u97F3\u6A21\u5F0F)]"}, - { "optionLF", " [-LF (\u8F38\u51FA\u4E0A\u50C5\u4F7F\u7528\u63DB\u884C\u5B57\u5143 {\u9810\u8A2D\u70BA CR/LF})]"}, - { "optionCR", " [-CR (\u8F38\u51FA\u4E0A\u50C5\u4F7F\u7528\u6B78\u4F4D\u5B57\u5143 {\u9810\u8A2D\u70BA CR/LF})]"}, - { "optionESCAPE", " [-ESCAPE (\u8981\u9041\u96E2\u7684\u5B57\u5143 {\u9810\u8A2D\u70BA <>&\"'\\r\\n}]"}, - { "optionINDENT", " [-INDENT (\u63A7\u5236\u8981\u7E2E\u6392\u7684\u7A7A\u9593 {\u9810\u8A2D\u70BA 0})]"}, - { "optionTT", " [-TT (\u8FFD\u8E64\u547C\u53EB\u7684\u6A23\u677F\u3002)]"}, - { "optionTG", " [-TG (\u8FFD\u8E64\u6BCF\u500B\u7522\u751F\u4E8B\u4EF6\u3002)]"}, - { "optionTS", " [-TS (\u8FFD\u8E64\u6BCF\u500B\u9078\u53D6\u4E8B\u4EF6\u3002)]"}, - { "optionTTC", " [-TTC (\u8FFD\u8E64\u8655\u7406\u7684\u6A23\u677F\u5B50\u9805\u3002)]"}, - { "optionTCLASS", " [-TCLASS (\u8FFD\u8E64\u64F4\u5145\u5957\u4EF6\u7684 TraceListener \u985E\u5225\u3002)]"}, - { "optionVALIDATE", " [-VALIDATE (\u8A2D\u5B9A\u662F\u5426\u57F7\u884C\u9A57\u8B49\u3002\u9810\u8A2D\u4E0D\u6703\u57F7\u884C\u9A57\u8B49\u3002)]"}, - { "optionEDUMP", " [-EDUMP {\u9078\u64C7\u6027\u6A94\u6848\u540D\u7A31} (\u767C\u751F\u932F\u8AA4\u6642\u6703\u57F7\u884C\u5806\u758A\u50BE\u5370\u3002)]"}, - { "optionXML", " [-XML (\u4F7F\u7528 XML \u683C\u5F0F\u5668\u4E26\u65B0\u589E XML \u6A19\u982D\u3002)]"}, - { "optionTEXT", " [-TEXT (\u4F7F\u7528\u7C21\u55AE Text \u683C\u5F0F\u5668\u3002)]"}, - { "optionHTML", " [-HTML (\u4F7F\u7528 HTML \u683C\u5F0F\u5668\u3002)]"}, - { "optionPARAM", " [-PARAM \u540D\u7A31\u8868\u793A\u5F0F (\u8A2D\u5B9A\u6A23\u5F0F\u8868\u53C3\u6578)]"}, - { "noParsermsg1", "XSL \u8655\u7406\u4F5C\u696D\u5931\u6557\u3002"}, - { "noParsermsg2", "** \u627E\u4E0D\u5230\u5256\u6790\u5668 **"}, - { "noParsermsg3", "\u8ACB\u6AA2\u67E5\u985E\u5225\u8DEF\u5F91\u3002"}, - { "noParsermsg4", "\u82E5\u7121 IBM \u7684 XML Parser for Java\uFF0C\u53EF\u4E0B\u8F09\u81EA"}, - { "noParsermsg5", "IBM \u7684 AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, - { "optionURIRESOLVER", " [-URIRESOLVER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u89E3\u6790 URI \u7684 URIResolver)]"}, - { "optionENTITYRESOLVER", " [-ENTITYRESOLVER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u89E3\u6790\u5BE6\u9AD4\u7684 EntityResolver )]"}, - { "optionCONTENTHANDLER", " [-CONTENTHANDLER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u5E8F\u5217\u5316\u8F38\u51FA\u7684 ContentHandler)]"}, - { "optionLINENUMBERS", " [-L \u4F7F\u7528\u884C\u865F\u65BC\u4F86\u6E90\u6587\u4EF6]"}, - { "optionSECUREPROCESSING", " [-SECURE (\u5C07\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u3002)]"}, - - // Following are the new options added in XSLTErrorResources.properties files after Jdk 1.4 (Xalan 2.2-D11) - - - { "optionMEDIA", " [-MEDIA mediaType (\u4F7F\u7528\u5A92\u9AD4\u5C6C\u6027\u4F86\u5C0B\u627E\u8207\u6587\u4EF6\u95DC\u806F\u7684\u6A23\u5F0F\u8868\u3002)]"}, - { "optionFLAVOR", " [-FLAVOR flavorName (\u660E\u78BA\u4F7F\u7528 s2s=SAX \u6216 d2d=DOM \u4F86\u57F7\u884C\u8F49\u63DB\u3002)] "}, // Added by sboag/scurcuru; experimental - { "optionDIAG", " [-DIAG (\u5217\u5370\u8F49\u63DB\u6240\u9700\u8981\u7684\u5168\u90E8\u6BEB\u79D2\u3002)]"}, - { "optionINCREMENTAL", " [-INCREMENTAL (\u8A2D\u5B9A http://xml.apache.org/xalan/features/incremental \u70BA\u771F\uFF0C\u4EE5\u8981\u6C42\u6F38\u9032 DTM \u5EFA\u69CB\u3002)]"}, - { "optionNOOPTIMIMIZE", " [-NOOPTIMIMIZE (\u8A2D\u5B9A http://xml.apache.org/xalan/features/optimize \u70BA\u507D\uFF0C\u4EE5\u8981\u6C42\u7121\u6A23\u5F0F\u8868\u6700\u4F73\u5316\u8655\u7406\u3002)]"}, - { "optionRL", " [-RL recursionlimit (\u5BA3\u544A\u6A23\u5F0F\u8868\u905E\u8FF4\u6DF1\u5EA6\u7684\u6578\u5B57\u9650\u5236\u3002)]"}, - { "optionXO", " [-XO [transletName] (\u6307\u6D3E\u6240\u7522\u751F translet \u7684\u540D\u7A31)]"}, - { "optionXD", " [-XD destinationDirectory (\u6307\u5B9A translet \u7684\u76EE\u7684\u5730\u76EE\u9304)]"}, - { "optionXJ", " [-XJ jarfile (\u5C01\u88DD translet \u985E\u5225\u6210\u70BA\u540D\u7A31\u70BA \u7684 jar \u6A94\u6848)]"}, - { "optionXP", " [-XP \u5957\u88DD\u7A0B\u5F0F (\u6307\u5B9A\u6240\u6709\u7522\u751F\u7684 translet \u985E\u5225\u7684\u5957\u88DD\u7A0B\u5F0F\u540D\u7A31\u524D\u7F6E\u78BC)]"}, - - //AddITIONAL STRINGS that need L10n - // Note to translators: The following message describes usage of a particular - // command-line option that is used to enable the "template inlining" - // optimization. The optimization involves making a copy of the code - // generated for a template in another template that refers to it. - { "optionXN", " [-XN (\u555F\u7528\u6A23\u677F\u5167\u5D4C)]" }, - { "optionXX", " [-XX (\u958B\u555F\u984D\u5916\u7684\u9664\u932F\u8A0A\u606F\u8F38\u51FA)]"}, - { "optionXT" , " [-XT (\u82E5\u6709\u53EF\u80FD\uFF0C\u4F7F\u7528 translet \u4F86\u8F49\u63DB)]"}, - { "diagTiming"," --------- \u7D93\u7531 {1} \u7684 {0} \u8F49\u63DB\u6B77\u6642 {2} \u6BEB\u79D2" }, - { "recursionTooDeep","\u6A23\u677F\u5DE2\u72C0\u7D50\u69CB\u904E\u6DF1\u3002\u5DE2\u72C0\u7D50\u69CB = {0}\uFF0C\u6A23\u677F {1} {2}" }, - { "nameIs", "\u540D\u7A31\u70BA" }, - { "matchPatternIs", "\u914D\u5C0D\u6A23\u5F0F\u70BA" } - - }; - - } - // ================= INFRASTRUCTURE ====================== - - /** String for use when a bad error code was encountered. */ - public static final String BAD_CODE = "BAD_CODE"; - - /** String for use when formatting of the error string failed. */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ca.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ca.java deleted file mode 100644 index 3af790e444e..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ca.java +++ /dev/null @@ -1,861 +0,0 @@ -/* - * 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.xalan.internal.xsltc.compiler.util; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_ca extends ListResourceBundle { - -/* - * XSLTC compile-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 5) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 6) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 7) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 8) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 9) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 10) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 11) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - {ErrorMsg.MULTIPLE_STYLESHEET_ERR, - "S'ha definit m\u00e9s d'un full d'estils en el mateix fitxer."}, - - /* - * Note to translators: The substitution text is the name of a - * template. The same name was used on two different templates in the - * same stylesheet. - */ - {ErrorMsg.TEMPLATE_REDEF_ERR, - "La plantilla ''{0}'' ja est\u00e0 definida en aquest full d''estils."}, - - - /* - * Note to translators: The substitution text is the name of a - * template. A reference to the template name was encountered, but the - * template is undefined. - */ - {ErrorMsg.TEMPLATE_UNDEF_ERR, - "La plantilla ''{0}'' no est\u00e0 definida en aquest full d''estils."}, - - /* - * Note to translators: The substitution text is the name of a variable - * that was defined more than once. - */ - {ErrorMsg.VARIABLE_REDEF_ERR, - "La variable ''{0}'' s''ha definit m\u00e9s d''una vegada en el mateix \u00e0mbit."}, - - /* - * Note to translators: The substitution text is the name of a variable - * or parameter. A reference to the variable or parameter was found, - * but it was never defined. - */ - {ErrorMsg.VARIABLE_UNDEF_ERR, - "La variable o el par\u00e0metre ''{0}'' no s''ha definit."}, - - /* - * Note to translators: The word "class" here refers to a Java class. - * Processing the stylesheet required a class to be loaded, but it could - * not be found. The substitution text is the name of the class. - */ - {ErrorMsg.CLASS_NOT_FOUND_ERR, - "No s''ha trobat la classe ''{0}''."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but it could not be found. "public" is the - * Java keyword. - */ - {ErrorMsg.METHOD_NOT_FOUND_ERR, - "No s''ha trobat el m\u00e8tode extern ''{0}'' (ha de ser public)."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but no method with the required types of - * arguments or return type could be found. - */ - {ErrorMsg.ARGUMENT_CONVERSION_ERR, - "No s''ha pogut convertir l''argument o tipus de retorn a la crida del m\u00e8tode ''{0}''"}, - - /* - * Note to translators: The file or URI named in the substitution text - * is missing. - */ - {ErrorMsg.FILE_NOT_FOUND_ERR, - "No s''ha trobat el fitxer o URI ''{0}''."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.INVALID_URI_ERR, - "L''URI ''{0}'' no \u00e9s v\u00e0lid."}, - - /* - * Note to translators: The file or URI named in the substitution text - * exists but could not be opened. - */ - {ErrorMsg.FILE_ACCESS_ERR, - "No es pot obrir el fitxer o l''URI ''{0}''."}, - - /* - * Note to translators: and are - * keywords that should not be translated. - */ - {ErrorMsg.MISSING_ROOT_ERR, - "S''esperava l''element o ."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ErrorMsg.NAMESPACE_UNDEF_ERR, - "El prefix d''espai de noms ''{0}'' no s''ha declarat."}, - - /* - * Note to translators: The Java function named in the stylesheet could - * not be found. - */ - {ErrorMsg.FUNCTION_RESOLVE_ERR, - "No s''ha pogut resoldre la crida de la funci\u00f3 ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a - * function. A literal string here means a constant string value. - */ - {ErrorMsg.NEED_LITERAL_ERR, - "L''argument de ''{0}'' ha de ser una cadena de literals."}, - - /* - * Note to translators: This message indicates there was a syntactic - * error in the form of an XPath expression. The substitution text is - * the expression. - */ - {ErrorMsg.XPATH_PARSER_ERR, - "S''ha produ\u00eft un error en analitzar l''expressi\u00f3 XPath ''{0}''."}, - - /* - * Note to translators: An element in the stylesheet requires a - * particular attribute named by the substitution text, but that - * attribute was not specified in the stylesheet. - */ - {ErrorMsg.REQUIRED_ATTR_ERR, - "No s''ha especificat l''atribut obligatori ''{0}''."}, - - /* - * Note to translators: This message indicates that a character not - * permitted in an XPath expression was encountered. The substitution - * text is the offending character. - */ - {ErrorMsg.ILLEGAL_CHAR_ERR, - "L''expressi\u00f3 XPath cont\u00e9 el car\u00e0cter no perm\u00e8s ''{0}''."}, - - /* - * Note to translators: A processing instruction is a mark-up item in - * an XML document that request some behaviour of an XML processor. The - * form of the name of was invalid in this case, and the substitution - * text is the name. - */ - {ErrorMsg.ILLEGAL_PI_ERR, - "La instrucci\u00f3 de processament t\u00e9 el nom no perm\u00e8s ''{0}''."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ErrorMsg.STRAY_ATTRIBUTE_ERR, - "L''atribut ''{0}'' es troba fora de l''element."}, - - /* - * Note to translators: An attribute that wasn't recognized was - * specified on an element in the stylesheet. The attribute is named - * by the substitution - * text. - */ - {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "No es permet l''atribut ''{0}''."}, - - /* - * Note to translators: "import" and "include" are keywords that should - * not be translated. This messages indicates that the stylesheet - * named in the substitution text imported or included itself either - * directly or indirectly. - */ - {ErrorMsg.CIRCULAR_INCLUDE_ERR, - "Import/include circular. El full d''estils ''{0}'' ja s''ha carregat."}, - - /* - * Note to translators: A result-tree fragment is a portion of a - * resulting XML document represented as a tree. "" is a - * keyword and should not be translated. - */ - {ErrorMsg.RESULT_TREE_SORT_ERR, - "Els fragments de l'arbre de resultats no es poden classificar (es passen per alt els elements ). Heu de classificar els nodes quan creeu l'arbre de resultats. "}, - - /* - * Note to translators: A name can be given to a particular style to be - * used to format decimal values. The substitution text gives the name - * of such a style for which more than one declaration was encountered. - */ - {ErrorMsg.SYMBOLS_REDEF_ERR, - "El formatatge decimal ''{0}'' ja est\u00e0 definit."}, - - /* - * Note to translators: The stylesheet version named in the - * substitution text is not supported. - */ - {ErrorMsg.XSL_VERSION_ERR, - "XSLTC no d\u00f3na suport a la versi\u00f3 XSL ''{0}''."}, - - /* - * Note to translators: The definitions of one or more variables or - * parameters depend on one another. - */ - {ErrorMsg.CIRCULAR_VARIABLE_ERR, - "Hi ha una refer\u00e8ncia de variable/par\u00e0metre circular a ''{0}''."}, - - /* - * Note to translators: The operator in an expresion with two operands was - * not recognized. - */ - {ErrorMsg.ILLEGAL_BINARY_OP_ERR, - "L'operador de l'expressi\u00f3 bin\u00e0ria \u00e9s desconegut."}, - - /* - * Note to translators: This message is produced if a reference to a - * function has too many or too few arguments. - */ - {ErrorMsg.ILLEGAL_ARG_ERR, - "La crida de funci\u00f3 t\u00e9 arguments no permesos."}, - - /* - * Note to translators: "document()" is the name of function and must - * not be translated. A node-set is a set of the nodes in the tree - * representation of an XML document. - */ - {ErrorMsg.DOCUMENT_ARG_ERR, - "El segon argument de la funci\u00f3 document() ha de ser un conjunt de nodes."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.MISSING_WHEN_ERR, - "Es necessita com a m\u00ednim un element a ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.MULTIPLE_OTHERWISE_ERR, - "Nom\u00e9s es permet un element a ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.STRAY_OTHERWISE_ERR, - " nom\u00e9s es pot utilitzar dins de ."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.STRAY_WHEN_ERR, - " nom\u00e9s es pot utilitzar dins de ."}, - - /* - * Note to translators: "", "" and - * "" are keywords and should not be translated. This - * message describes a syntax error in the stylesheet. - */ - {ErrorMsg.WHEN_ELEMENT_ERR, - "A nom\u00e9s es permeten els elements i ."}, - - /* - * Note to translators: "" and "name" are keywords - * that should not be translated. - */ - {ErrorMsg.UNNAMED_ATTRIBSET_ERR, - "L'atribut 'name' falta a ."}, - - /* - * Note to translators: An element in the stylesheet contained an - * element of a type that it was not permitted to contain. - */ - {ErrorMsg.ILLEGAL_CHILD_ERR, - "L'element subordinat no \u00e9s perm\u00e8s."}, - - /* - * Note to translators: The stylesheet tried to create an element with - * a name that was not a valid XML name. The substitution text contains - * the name. - */ - {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, - "No podeu cridar un element ''{0}''"}, - - /* - * Note to translators: The stylesheet tried to create an attribute - * with a name that was not a valid XML name. The substitution text - * contains the name. - */ - {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, - "No podeu cridar un atribut ''{0}''"}, - - /* - * Note to translators: The children of the outermost element of a - * stylesheet are referred to as top-level elements. No text should - * occur within that outermost element unless it is within a top-level - * element. This message indicates that that constraint was violated. - * "" is a keyword that should not be translated. - */ - {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, - "Hi ha dades fora de l'element de nivell superior ."}, - - /* - * Note to translators: JAXP is an acronym for the Java API for XML - * Processing. This message indicates that the XML parser provided to - * XSLTC to process the XML input document had a configuration problem. - */ - {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "L'analitzador JAXP no s'ha configurat correctament"}, - - /* - * Note to translators: The substitution text names the internal error - * encountered. - */ - {ErrorMsg.INTERNAL_ERR, - "S''ha produ\u00eft un error intern d''XSLTC irrecuperable: ''{0}''"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {ErrorMsg.UNSUPPORTED_XSL_ERR, - "L''element d''XSL ''{0}'' no t\u00e9 suport."}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does - * not recognized the particular extension named. The substitution text - * gives the extension name. - */ - {ErrorMsg.UNSUPPORTED_EXT_ERR, - "No es reconeix l''extensi\u00f3 d''XSLTC ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. XSLTC is able to detect that in this - * case because the outermost element in the stylesheet has to be - * declared with respect to the XSL namespace URI, but no declaration - * for that namespace was seen. - */ - {ErrorMsg.MISSING_XSLT_URI_ERR, - "El document d'entrada no \u00e9s un full d'estils (l'espai de noms XSL no s'ha declarat en l'element arrel)."}, - - /* - * Note to translators: XSLTC could not find the stylesheet document - * with the name specified by the substitution text. - */ - {ErrorMsg.MISSING_XSLT_TARGET_ERR, - "No s''ha trobat la destinaci\u00f3 ''{0}'' del full d''estils."}, - - /* - * Note to translators: access to the stylesheet target is denied - */ - {ErrorMsg.ACCESSING_XSLT_TARGET_ERR, - "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."}, - - /* - * Note to translators: This message represents an internal error in - * condition in XSLTC. The substitution text is the class name in XSLTC - * that is missing some functionality. - */ - {ErrorMsg.NOT_IMPLEMENTED_ERR, - "No s''ha implementat ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. - */ - {ErrorMsg.NOT_STYLESHEET_ERR, - "El document d'entrada no cont\u00e9 cap full d'estils XSL."}, - - /* - * Note to translators: The element named in the substitution text was - * encountered in the stylesheet but is not recognized. - */ - {ErrorMsg.ELEMENT_PARSE_ERR, - "No s''ha pogut analitzar l''element ''{0}''"}, - - /* - * Note to translators: "use", "", "node", "node-set", "string" - * and "number" are keywords in this context and should not be - * translated. This message indicates that the value of the "use" - * attribute was not one of the permitted values. - */ - {ErrorMsg.KEY_USE_ATTR_ERR, - "L'atribut use de ha de ser node, node-set, string o number."}, - - /* - * Note to translators: An XML document can specify the version of the - * XML specification to which it adheres. This message indicates that - * the version specified for the output document was not valid. - */ - {ErrorMsg.OUTPUT_VERSION_ERR, - "La versi\u00f3 del document XML de sortida ha de ser 1.0"}, - - /* - * Note to translators: The operator in a comparison operation was - * not recognized. - */ - {ErrorMsg.ILLEGAL_RELAT_OP_ERR, - "L'operador de l'expressi\u00f3 relacional \u00e9s desconegut."}, - - /* - * Note to translators: An attribute set defines as a set of XML - * attributes that can be added to an element in the output XML document - * as a group. This message is reported if the name specified was not - * used to declare an attribute set. The substitution text is the name - * that is in error. - */ - {ErrorMsg.ATTRIBSET_UNDEF_ERR, - "S''ha intentat utilitzar el conjunt d''atributs ''{0}'' que no existeix."}, - - /* - * Note to translators: The term "attribute value template" is a term - * defined by XSLT which describes the value of an attribute that is - * determined by an XPath expression. The message indicates that the - * expression was syntactically incorrect; the substitution text - * contains the expression that was in error. - */ - {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, - "No es pot analitzar la plantilla de valors d''atributs ''{0}''."}, - - /* - * Note to translators: ??? - */ - {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, - "El tipus de dades de la signatura de la classe ''{0}'' \u00e9s desconegut."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of - * type {0}. - */ - {ErrorMsg.DATA_CONVERSION_ERR, - "No es pot convertir el tipus de dades ''{0}'' en ''{1}''."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_TRANSLET_CLASS_ERR, - "Templates no cont\u00e9 cap definici\u00f3 de classe translet."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_MAIN_TRANSLET_ERR, - "Templates no cont\u00e9 cap classe amb el nom ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSLET_CLASS_ERR, - "No s''ha pogut carregar la classe translet ''{0}''."}, - - {ErrorMsg.TRANSLET_OBJECT_ERR, - "La classe translet s''ha carregat, per\u00f2 no es pot crear la inst\u00e0ncia translet."}, - - /* - * Note to translators: "ErrorListener" is a Java interface name that - * should not be translated. The message indicates that the user tried - * to set an ErrorListener object on object of the class named in the - * substitution text with "null" Java value. - */ - {ErrorMsg.ERROR_LISTENER_NULL_ERR, - "S''ha intentat establir ErrorListener de ''{0}'' en un valor nul."}, - - /* - * Note to translators: StreamSource, SAXSource and DOMSource are Java - * interface names that should not be translated. - */ - {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, - "XSLTC nom\u00e9s d\u00f3na suport a StreamSource, SAXSource i DOMSource."}, - - /* - * Note to translators: "Source" is a Java class name that should not - * be translated. The substitution text is the name of Java method. - */ - {ErrorMsg.JAXP_NO_SOURCE_ERR, - "L''objecte source donat a ''{0}'' no t\u00e9 contingut."}, - - /* - * Note to translators: The message indicates that XSLTC failed to - * compile the stylesheet into a translet (class file). - */ - {ErrorMsg.JAXP_COMPILE_ERR, - "No s'ha pogut compilar el full d'estils."}, - - /* - * Note to translators: "TransformerFactory" is a class name. In this - * context, an attribute is a property or setting of the - * TransformerFactory object. The substitution text is the name of the - * unrecognised attribute. The method used to retrieve the attribute is - * "getAttribute", so it's not clear whether it would be best to - * translate the term "attribute". - */ - {ErrorMsg.JAXP_INVALID_ATTR_ERR, - "TransformerFactory no reconeix l''atribut ''{0}''."}, - - /* - * Note to translators: "setResult()" and "startDocument()" are Java - * method names that should not be translated. - */ - {ErrorMsg.JAXP_SET_RESULT_ERR, - "setResult() s'ha de cridar abans de startDocument()."}, - - /* - * Note to translators: "Transformer" is a Java interface name that - * should not be translated. A Transformer object should contained a - * reference to a translet object in order to be used for - * transformations; this message is produced if that requirement is not - * met. - */ - {ErrorMsg.JAXP_NO_TRANSLET_ERR, - "Transformer no cont\u00e9 cap objecte translet."}, - - /* - * Note to translators: The XML document that results from a - * transformation needs to be sent to an output handler object; this - * message is produced if that requirement is not met. - */ - {ErrorMsg.JAXP_NO_HANDLER_ERR, - "No s'ha definit cap manejador de sortida per al resultat de transformaci\u00f3."}, - - /* - * Note to translators: "Result" is a Java interface name in this - * context. The substitution text is a method name. - */ - {ErrorMsg.JAXP_NO_RESULT_ERR, - "L''objecte result donat a ''{0}'' no \u00e9s v\u00e0lid."}, - - /* - * Note to translators: "Transformer" is a Java interface name. The - * user's program attempted to access an unrecognized property with the - * name specified in the substitution text. The method used to retrieve - * the property is "getOutputProperty", so it's not clear whether it - * would be best to translate the term "property". - */ - {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, - "S''ha intentat accedir a una propietat Transformer ''{0}'' no v\u00e0lida."}, - - /* - * Note to translators: SAX2DOM is the name of a Java class that should - * not be translated. This is an adapter in the sense that it takes a - * DOM object and converts it to something that uses the SAX API. - */ - {ErrorMsg.SAX2DOM_ADAPTER_ERR, - "No s''ha pogut crear l''adaptador SAX2DOM ''{0}''."}, - - /* - * Note to translators: "XSLTCSource.build()" is a Java method name. - * "systemId" is an XML term that is short for "system identification". - */ - {ErrorMsg.XSLTC_SOURCE_ERR, - "S'ha cridat XSLTCSource.build() sense que s'hagu\u00e9s establert la identificaci\u00f3 del sistema."}, - - - {ErrorMsg.COMPILE_STDIN_ERR, - "L'opci\u00f3 -i s'ha d'utilitzar amb l'opci\u00f3 -o."}, - - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java package, so - * it should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.COMPILE_USAGE_STR, - "RESUM\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o ]\n [-d ] [-j ] [-p ]\n [-n] [-x] [-s] [-u] [-v] [-h] { | -i }\n\nOPCIONS\n -o assigna el nom al translet\n generat. Per defecte, el nom de translet\n s'obt\u00e9 del nom de . Aquesta opci\u00f3\n no es t\u00e9 en compte si es compilen diversos fulls d'estils.\n -d especifica un directori de destinaci\u00f3 per al translet\n -j empaqueta les classes translet en un fitxer jar del nom\n especificat com a \n -p especifica un prefix de nom de paquet per a totes les classes\n translet generades.\n -n habilita l'inlining (com a mitjana, el funcionament per defecte\n \u00e9s millor).\n -x habilita la sortida de missatges de depuraci\u00f3 addicionals\n -s inhabilita la crida de System.exit\n -u interpreta els arguments com URL\n -i obliga el compilador a llegir el full d'estils des de l'entrada est\u00e0ndard\n -v imprimeix la versi\u00f3 del compilador\n -h imprimeix aquesta sent\u00e8ncia d'\u00fas.\n"}, - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java class, so it - * should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.TRANSFORM_USAGE_STR, - "RESUM \n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j ]\n [-x] [-s] [-n ] {-u | }\n [= ...]\n\n utilitza la translet per transformar un document XML\n especificat com a . La translet es troba\n o b\u00e9 a la CLASSPATH de l'usuari o b\u00e9 al que es pot especificar opcionalment.\nOPCIONS\n -j especifica un fitxer jar des del qual es pot carregar el translet\n -x habilita la sortida de missatges de depuraci\u00f3 addicionals\n -s inhabilita la crida de System.exit\n -n executa la transformaci\u00f3 el nombre de vegades i\n mostra informaci\u00f3 de perfil\n -u especifica el document d'entrada XML com una URL\n"}, - - - - /* - * Note to translators: "", "" and - * "" are keywords that should not be translated. - * The message indicates that an xsl:sort element must be a child of - * one of the other kinds of elements mentioned. - */ - {ErrorMsg.STRAY_SORT_ERR, - " nom\u00e9s es pot utilitzar amb o ."}, - - /* - * Note to translators: The message indicates that the encoding - * requested for the output document was on that requires support that - * is not available from the Java Virtual Machine being used to execute - * the program. - */ - {ErrorMsg.UNSUPPORTED_ENCODING, - "Aquesta JVM no d\u00f3na suport a la codificaci\u00f3 de sortida ''{0}''."}, - - /* - * Note to translators: The message indicates that the XPath expression - * named in the substitution text was not well formed syntactically. - */ - {ErrorMsg.SYNTAX_ERR, - "S''ha produ\u00eft un error de sintaxi a ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a Java - * class. The term "constructor" here is the Java term. The message is - * displayed if XSLTC could not find a constructor for the specified - * class. - */ - {ErrorMsg.CONSTRUCTOR_NOT_FOUND, - "No s''ha trobat el constructor extern ''{0}''."}, - - /* - * Note to translators: "static" is the Java keyword. The substitution - * text is the name of a function. The first argument of that function - * is not of the required type. - */ - {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, - "El primer argument de la funci\u00f3 Java no static ''{0}'' no \u00e9s una refer\u00e8ncia d''objecte v\u00e0lida."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. The substitution text is the - * expression that was in error. - */ - {ErrorMsg.TYPE_CHECK_ERR, - "S''ha produ\u00eft un error en comprovar el tipus de l''expressi\u00f3 ''{0}''."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. However, the location of the - * problematic expression is unknown. - */ - {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, - "S'ha produ\u00eft un error en comprovar el tipus d'expressi\u00f3 en una ubicaci\u00f3 desconeguda."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option that was not recognized. - */ - {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, - "L''opci\u00f3 de l\u00ednia d''ordres ''{0}'' no \u00e9s v\u00e0lida."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option. - */ - {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, - "A l''opci\u00f3 de l\u00ednia d''ordres ''{0}'' li falta un argument obligatori."}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, - "AV\u00cdS: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.WARNING_MSG, - "AV\u00cdS: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, - "ERROR MOLT GREU: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.FATAL_ERR_MSG, - "ERROR MOLT GREU: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, - "ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.ERROR_MSG, - "ERROR: ''{0}''"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, - "Transformaci\u00f3 mitjan\u00e7ant translet ''{0}'' "}, - - /* - * Note to translators: The first substitution is the name of a class, - * while the second substitution is the name of a jar file. - */ - {ErrorMsg.TRANSFORM_WITH_JAR_STR, - "Transformaci\u00f3 mitjan\u00e7ant translet ''{0}'' des del fitxer jar ''{1}''"}, - - /* - * Note to translators: "TransformerFactory" is the name of a Java - * interface and must not be translated. The substitution text is - * the name of the class that could not be instantiated. - */ - {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, - "No s''ha pogut crear una inst\u00e0ncia de la classe TransformerFactory ''{0}''."}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages are collected together and displayed beneath - * this message. - */ - {ErrorMsg.COMPILER_ERROR_KEY, - "Errors del compilador:"}, - - /* - * Note to translators: The following message is used as a header. - * All the warning messages are collected together and displayed - * beneath this message. - */ - {ErrorMsg.COMPILER_WARNING_KEY, - "Avisos del compilador:"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages that are produced when the stylesheet is - * applied to an input document are collected together and displayed - * beneath this message. A 'translet' is the compiled form of a - * stylesheet (see above). - */ - {ErrorMsg.RUNTIME_ERROR_KEY, - "Errors de translet:"}, - - {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present."} - }; - - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_cs.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_cs.java deleted file mode 100644 index 83587915afe..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_cs.java +++ /dev/null @@ -1,861 +0,0 @@ -/* - * 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.xalan.internal.xsltc.compiler.util; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_cs extends ListResourceBundle { - -/* - * XSLTC compile-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 5) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 6) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 7) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 8) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 9) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 10) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 11) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - {ErrorMsg.MULTIPLE_STYLESHEET_ERR, - "V\u00edce ne\u017e jedna p\u0159edloha stylu je definov\u00e1na ve stejn\u00e9m souboru."}, - - /* - * Note to translators: The substitution text is the name of a - * template. The same name was used on two different templates in the - * same stylesheet. - */ - {ErrorMsg.TEMPLATE_REDEF_ERR, - "\u0160ablona ''{0}'' je ji\u017e v t\u00e9to p\u0159edloze stylu definov\u00e1na."}, - - - /* - * Note to translators: The substitution text is the name of a - * template. A reference to the template name was encountered, but the - * template is undefined. - */ - {ErrorMsg.TEMPLATE_UNDEF_ERR, - "\u0160ablona ''{0}'' nen\u00ed v t\u00e9to p\u0159edloze stylu definov\u00e1na."}, - - /* - * Note to translators: The substitution text is the name of a variable - * that was defined more than once. - */ - {ErrorMsg.VARIABLE_REDEF_ERR, - "Prom\u011bnn\u00e1 ''{0}'' je n\u011bkolikan\u00e1sobn\u011b definov\u00e1na ve stejn\u00e9m oboru."}, - - /* - * Note to translators: The substitution text is the name of a variable - * or parameter. A reference to the variable or parameter was found, - * but it was never defined. - */ - {ErrorMsg.VARIABLE_UNDEF_ERR, - "Prom\u011bnn\u00e1 nebo parametr ''{0}'' nejsou definov\u00e1ny."}, - - /* - * Note to translators: The word "class" here refers to a Java class. - * Processing the stylesheet required a class to be loaded, but it could - * not be found. The substitution text is the name of the class. - */ - {ErrorMsg.CLASS_NOT_FOUND_ERR, - "Nelze naj\u00edt t\u0159\u00eddu ''{0}''."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but it could not be found. "public" is the - * Java keyword. - */ - {ErrorMsg.METHOD_NOT_FOUND_ERR, - "Nelze naj\u00edt extern\u00ed metodu ''{0}'' (mus\u00ed b\u00fdt ve\u0159ejn\u00e1)."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but no method with the required types of - * arguments or return type could be found. - */ - {ErrorMsg.ARGUMENT_CONVERSION_ERR, - "Nelze p\u0159ev\u00e9st argument/n\u00e1vratov\u00fd typ ve vol\u00e1n\u00ed metody ''{0}''"}, - - /* - * Note to translators: The file or URI named in the substitution text - * is missing. - */ - {ErrorMsg.FILE_NOT_FOUND_ERR, - "Soubor nebo URI ''{0}'' nebyl nalezen."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.INVALID_URI_ERR, - "Neplatn\u00e9 URI ''{0}''."}, - - /* - * Note to translators: The file or URI named in the substitution text - * exists but could not be opened. - */ - {ErrorMsg.FILE_ACCESS_ERR, - "Nelze otev\u0159\u00edt soubor nebo URI ''{0}''."}, - - /* - * Note to translators: and are - * keywords that should not be translated. - */ - {ErrorMsg.MISSING_ROOT_ERR, - "Byl o\u010dek\u00e1v\u00e1n prvek nebo ."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ErrorMsg.NAMESPACE_UNDEF_ERR, - "P\u0159edpona oboru n\u00e1zv\u016f ''{0}'' nen\u00ed deklarov\u00e1na."}, - - /* - * Note to translators: The Java function named in the stylesheet could - * not be found. - */ - {ErrorMsg.FUNCTION_RESOLVE_ERR, - "Nelze vy\u0159e\u0161it vol\u00e1n\u00ed funkce ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a - * function. A literal string here means a constant string value. - */ - {ErrorMsg.NEED_LITERAL_ERR, - "Argument pro ''{0}'' mus\u00ed b\u00fdt \u0159et\u011bzcem liter\u00e1lu."}, - - /* - * Note to translators: This message indicates there was a syntactic - * error in the form of an XPath expression. The substitution text is - * the expression. - */ - {ErrorMsg.XPATH_PARSER_ERR, - "Chyba p\u0159i anal\u00fdze v\u00fdrazu XPath ''{0}''."}, - - /* - * Note to translators: An element in the stylesheet requires a - * particular attribute named by the substitution text, but that - * attribute was not specified in the stylesheet. - */ - {ErrorMsg.REQUIRED_ATTR_ERR, - "Po\u017eadovan\u00fd atribut ''{0}'' chyb\u00ed."}, - - /* - * Note to translators: This message indicates that a character not - * permitted in an XPath expression was encountered. The substitution - * text is the offending character. - */ - {ErrorMsg.ILLEGAL_CHAR_ERR, - "Neplatn\u00fd znak ''{0}'' ve v\u00fdrazu XPath."}, - - /* - * Note to translators: A processing instruction is a mark-up item in - * an XML document that request some behaviour of an XML processor. The - * form of the name of was invalid in this case, and the substitution - * text is the name. - */ - {ErrorMsg.ILLEGAL_PI_ERR, - "Neplatn\u00fd n\u00e1zev ''{0}'' pro zpracov\u00e1n\u00ed instrukce."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ErrorMsg.STRAY_ATTRIBUTE_ERR, - "Atribut ''{0}'' je vn\u011b prvku."}, - - /* - * Note to translators: An attribute that wasn't recognized was - * specified on an element in the stylesheet. The attribute is named - * by the substitution - * text. - */ - {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "Neplatn\u00fd atribut ''{0}''."}, - - /* - * Note to translators: "import" and "include" are keywords that should - * not be translated. This messages indicates that the stylesheet - * named in the substitution text imported or included itself either - * directly or indirectly. - */ - {ErrorMsg.CIRCULAR_INCLUDE_ERR, - "Cyklick\u00fd import/zahrnut\u00ed. P\u0159edloha stylu ''{0}'' je ji\u017e zavedena."}, - - /* - * Note to translators: A result-tree fragment is a portion of a - * resulting XML document represented as a tree. "" is a - * keyword and should not be translated. - */ - {ErrorMsg.RESULT_TREE_SORT_ERR, - "Fragmenty stromu v\u00fdsledk\u016f nemohou b\u00fdt \u0159azeny (prvky se ignoruj\u00ed). P\u0159i vytv\u00e1\u0159en\u00ed stromu v\u00fdsledk\u016f mus\u00edte se\u0159adit uzly."}, - - /* - * Note to translators: A name can be given to a particular style to be - * used to format decimal values. The substitution text gives the name - * of such a style for which more than one declaration was encountered. - */ - {ErrorMsg.SYMBOLS_REDEF_ERR, - "Desetinn\u00e9 form\u00e1tov\u00e1n\u00ed ''{0}'' je ji\u017e definov\u00e1no."}, - - /* - * Note to translators: The stylesheet version named in the - * substitution text is not supported. - */ - {ErrorMsg.XSL_VERSION_ERR, - "Verze XSL ''{0}'' nen\u00ed produktem XSLTC podporov\u00e1na."}, - - /* - * Note to translators: The definitions of one or more variables or - * parameters depend on one another. - */ - {ErrorMsg.CIRCULAR_VARIABLE_ERR, - "Cyklick\u00fd odkaz na prom\u011bnnou/parametr v ''{0}''."}, - - /* - * Note to translators: The operator in an expresion with two operands was - * not recognized. - */ - {ErrorMsg.ILLEGAL_BINARY_OP_ERR, - "Nezn\u00e1m\u00fd oper\u00e1tor pro bin\u00e1rn\u00ed v\u00fdraz."}, - - /* - * Note to translators: This message is produced if a reference to a - * function has too many or too few arguments. - */ - {ErrorMsg.ILLEGAL_ARG_ERR, - "Neplatn\u00fd argument pro vol\u00e1n\u00ed funkce."}, - - /* - * Note to translators: "document()" is the name of function and must - * not be translated. A node-set is a set of the nodes in the tree - * representation of an XML document. - */ - {ErrorMsg.DOCUMENT_ARG_ERR, - "Druh\u00fd argument pro funkci document() mus\u00ed b\u00fdt node-set."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.MISSING_WHEN_ERR, - "Alespo\u0148 jeden prvek se vy\u017eaduje v ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.MULTIPLE_OTHERWISE_ERR, - "Jen jeden prvek je povolen v ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.STRAY_OTHERWISE_ERR, - "Prvek m\u016f\u017ee b\u00fdt pou\u017eit jen v ."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.STRAY_WHEN_ERR, - "Prvek m\u016f\u017ee b\u00fdt pou\u017eit jen v ."}, - - /* - * Note to translators: "", "" and - * "" are keywords and should not be translated. This - * message describes a syntax error in the stylesheet. - */ - {ErrorMsg.WHEN_ELEMENT_ERR, - "Pouze prvky a jsou povoleny v ."}, - - /* - * Note to translators: "" and "name" are keywords - * that should not be translated. - */ - {ErrorMsg.UNNAMED_ATTRIBSET_ERR, - "V prvku chyb\u00ed atribut 'name'."}, - - /* - * Note to translators: An element in the stylesheet contained an - * element of a type that it was not permitted to contain. - */ - {ErrorMsg.ILLEGAL_CHILD_ERR, - "Neplatn\u00fd prvek potomka."}, - - /* - * Note to translators: The stylesheet tried to create an element with - * a name that was not a valid XML name. The substitution text contains - * the name. - */ - {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, - "Nelze volat prvek ''{0}''"}, - - /* - * Note to translators: The stylesheet tried to create an attribute - * with a name that was not a valid XML name. The substitution text - * contains the name. - */ - {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, - "Nelze volat atribut ''{0}''"}, - - /* - * Note to translators: The children of the outermost element of a - * stylesheet are referred to as top-level elements. No text should - * occur within that outermost element unless it is within a top-level - * element. This message indicates that that constraint was violated. - * "" is a keyword that should not be translated. - */ - {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, - "Textov\u00e1 data jsou vn\u011b prvku nejvy\u0161\u0161\u00ed \u00farovn\u011b ."}, - - /* - * Note to translators: JAXP is an acronym for the Java API for XML - * Processing. This message indicates that the XML parser provided to - * XSLTC to process the XML input document had a configuration problem. - */ - {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "Analyz\u00e1tor JAXP je nespr\u00e1vn\u011b konfigurov\u00e1n."}, - - /* - * Note to translators: The substitution text names the internal error - * encountered. - */ - {ErrorMsg.INTERNAL_ERR, - "Neopraviteln\u00e1 chyba XSLTC-internal: ''{0}''"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {ErrorMsg.UNSUPPORTED_XSL_ERR, - "Nepodporovan\u00fd prvek XSL ''{0}''."}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does - * not recognized the particular extension named. The substitution text - * gives the extension name. - */ - {ErrorMsg.UNSUPPORTED_EXT_ERR, - "Nerozpoznan\u00e1 p\u0159\u00edpona XSLTC ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. XSLTC is able to detect that in this - * case because the outermost element in the stylesheet has to be - * declared with respect to the XSL namespace URI, but no declaration - * for that namespace was seen. - */ - {ErrorMsg.MISSING_XSLT_URI_ERR, - "Vstupn\u00ed dokument nen\u00ed p\u0159edloha stylu (obor n\u00e1zv\u016f XSL nen\u00ed deklarov\u00e1n v ko\u0159enov\u00e9m elementu)."}, - - /* - * Note to translators: XSLTC could not find the stylesheet document - * with the name specified by the substitution text. - */ - {ErrorMsg.MISSING_XSLT_TARGET_ERR, - "Nelze naj\u00edt c\u00edlovou p\u0159edlohu se stylem ''{0}''."}, - - /* - * Note to translators: access to the stylesheet target is denied - */ - {ErrorMsg.ACCESSING_XSLT_TARGET_ERR, - "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."}, - - /* - * Note to translators: This message represents an internal error in - * condition in XSLTC. The substitution text is the class name in XSLTC - * that is missing some functionality. - */ - {ErrorMsg.NOT_IMPLEMENTED_ERR, - "Neimplementov\u00e1no: ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. - */ - {ErrorMsg.NOT_STYLESHEET_ERR, - "Vstupn\u00ed dokument neobsahuje p\u0159edlohu stylu XSL."}, - - /* - * Note to translators: The element named in the substitution text was - * encountered in the stylesheet but is not recognized. - */ - {ErrorMsg.ELEMENT_PARSE_ERR, - "Nelze analyzovat prvek ''{0}''"}, - - /* - * Note to translators: "use", "", "node", "node-set", "string" - * and "number" are keywords in this context and should not be - * translated. This message indicates that the value of the "use" - * attribute was not one of the permitted values. - */ - {ErrorMsg.KEY_USE_ATTR_ERR, - "Atribut use prom\u011bnn\u00e9 mus\u00ed b\u00fdt typu node, node-set, string nebo number."}, - - /* - * Note to translators: An XML document can specify the version of the - * XML specification to which it adheres. This message indicates that - * the version specified for the output document was not valid. - */ - {ErrorMsg.OUTPUT_VERSION_ERR, - "V\u00fdstupn\u00ed verze dokumentu XML by m\u011bla b\u00fdt 1.0"}, - - /* - * Note to translators: The operator in a comparison operation was - * not recognized. - */ - {ErrorMsg.ILLEGAL_RELAT_OP_ERR, - "Nezn\u00e1m\u00fd oper\u00e1tor pro rela\u010dn\u00ed v\u00fdraz"}, - - /* - * Note to translators: An attribute set defines as a set of XML - * attributes that can be added to an element in the output XML document - * as a group. This message is reported if the name specified was not - * used to declare an attribute set. The substitution text is the name - * that is in error. - */ - {ErrorMsg.ATTRIBSET_UNDEF_ERR, - "Pokus pou\u017e\u00edt neexistuj\u00edc\u00ed sadu atribut\u016f ''{0}''."}, - - /* - * Note to translators: The term "attribute value template" is a term - * defined by XSLT which describes the value of an attribute that is - * determined by an XPath expression. The message indicates that the - * expression was syntactically incorrect; the substitution text - * contains the expression that was in error. - */ - {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, - "Nelze analyzovat \u0161ablonu hodnoty atributu ''{0}''."}, - - /* - * Note to translators: ??? - */ - {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, - "Nezn\u00e1m\u00fd datov\u00fd typ prom\u011bnn\u00e9 signature pro t\u0159\u00eddu ''{0}''."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of - * type {0}. - */ - {ErrorMsg.DATA_CONVERSION_ERR, - "Nelze p\u0159ev\u00e9st datov\u00fd typ ''{0}'' na ''{1}''."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_TRANSLET_CLASS_ERR, - "Tato \u0161ablona neobsahuje platnou definici t\u0159\u00eddy translet."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_MAIN_TRANSLET_ERR, - "Tato \u0161ablona neobsahuje t\u0159\u00eddu se jm\u00e9nem ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSLET_CLASS_ERR, - "Nelze zav\u00e9st t\u0159\u00eddu translet ''{0}''."}, - - {ErrorMsg.TRANSLET_OBJECT_ERR, - "T\u0159\u00edda translet byla zavedena, av\u0161ak nelze vytvo\u0159it instanci translet."}, - - /* - * Note to translators: "ErrorListener" is a Java interface name that - * should not be translated. The message indicates that the user tried - * to set an ErrorListener object on object of the class named in the - * substitution text with "null" Java value. - */ - {ErrorMsg.ERROR_LISTENER_NULL_ERR, - "Pokus nastavit objekt ErrorListener pro ''{0}'' na hodnotu null"}, - - /* - * Note to translators: StreamSource, SAXSource and DOMSource are Java - * interface names that should not be translated. - */ - {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, - "Pouze prom\u011bnn\u00e9 StreamSource, SAXSource a DOMSource jsou podporov\u00e1ny produktem XSLTC"}, - - /* - * Note to translators: "Source" is a Java class name that should not - * be translated. The substitution text is the name of Java method. - */ - {ErrorMsg.JAXP_NO_SOURCE_ERR, - "Zdrojov\u00fd objekt p\u0159edan\u00fd ''{0}'' nem\u00e1 \u017e\u00e1dn\u00fd obsah."}, - - /* - * Note to translators: The message indicates that XSLTC failed to - * compile the stylesheet into a translet (class file). - */ - {ErrorMsg.JAXP_COMPILE_ERR, - "Nelze kompilovat p\u0159edlohu se stylem"}, - - /* - * Note to translators: "TransformerFactory" is a class name. In this - * context, an attribute is a property or setting of the - * TransformerFactory object. The substitution text is the name of the - * unrecognised attribute. The method used to retrieve the attribute is - * "getAttribute", so it's not clear whether it would be best to - * translate the term "attribute". - */ - {ErrorMsg.JAXP_INVALID_ATTR_ERR, - "T\u0159\u00edda TransformerFactory nerozpoznala atribut ''{0}''."}, - - /* - * Note to translators: "setResult()" and "startDocument()" are Java - * method names that should not be translated. - */ - {ErrorMsg.JAXP_SET_RESULT_ERR, - "Metoda setResult() mus\u00ed b\u00fdt vol\u00e1na p\u0159ed metodou startDocument()."}, - - /* - * Note to translators: "Transformer" is a Java interface name that - * should not be translated. A Transformer object should contained a - * reference to a translet object in order to be used for - * transformations; this message is produced if that requirement is not - * met. - */ - {ErrorMsg.JAXP_NO_TRANSLET_ERR, - "Objekt Transformer nem\u00e1 \u017e\u00e1dn\u00fd zapouzd\u0159en\u00fd objekt translet."}, - - /* - * Note to translators: The XML document that results from a - * transformation needs to be sent to an output handler object; this - * message is produced if that requirement is not met. - */ - {ErrorMsg.JAXP_NO_HANDLER_ERR, - "Neexistuje \u017e\u00e1dn\u00fd definovan\u00fd v\u00fdstupn\u00ed obslu\u017en\u00fd program pro v\u00fdsledek transformace."}, - - /* - * Note to translators: "Result" is a Java interface name in this - * context. The substitution text is a method name. - */ - {ErrorMsg.JAXP_NO_RESULT_ERR, - "V\u00fdsledn\u00fd objekt p\u0159edan\u00fd ''{0}'' je neplatn\u00fd."}, - - /* - * Note to translators: "Transformer" is a Java interface name. The - * user's program attempted to access an unrecognized property with the - * name specified in the substitution text. The method used to retrieve - * the property is "getOutputProperty", so it's not clear whether it - * would be best to translate the term "property". - */ - {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, - "Pokus o p\u0159\u00edstup k neplatn\u00e9 vlastnosti objektu Transformer: ''{0}''."}, - - /* - * Note to translators: SAX2DOM is the name of a Java class that should - * not be translated. This is an adapter in the sense that it takes a - * DOM object and converts it to something that uses the SAX API. - */ - {ErrorMsg.SAX2DOM_ADAPTER_ERR, - "Nelze vytvo\u0159it adapt\u00e9r SAX2DOM: ''{0}''."}, - - /* - * Note to translators: "XSLTCSource.build()" is a Java method name. - * "systemId" is an XML term that is short for "system identification". - */ - {ErrorMsg.XSLTC_SOURCE_ERR, - "Byla vol\u00e1na metoda XSLTCSource.build(), ani\u017e by byla nastavena hodnota systemId."}, - - - {ErrorMsg.COMPILE_STDIN_ERR, - "Volba -i mus\u00ed b\u00fdt pou\u017eita s volbou -o."}, - - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java package, so - * it should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.COMPILE_USAGE_STR, - "SYNOPSIS\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o ]\n [-d ] [-j ] [-p ]\n [-n] [-x] [-s] [-u] [-v] [-h] { | -i }\n\nVOLBY\n -o p\u0159i\u0159azuje n\u00e1zev generovan\u00e9mu\n transletu. Standardn\u011b je n\u00e1zev transletu\n p\u0159evzat z n\u00e1zvu . Tato volba\n se ignoruje, pokud se kompiluj\u00ed n\u00e1sobn\u00e9 p\u0159edlohy styl\u016f.\n -d ur\u010duje v\u00fdchoz\u00ed adres\u00e1\u0159 pro translet\n -j zabal\u00ed t\u0159\u00eddu transletu do souboru jar\n pojmenovan\u00e9ho jako \n -p ur\u010duje p\u0159edponu n\u00e1zvu bal\u00ed\u010dku pro v\u0161echny generovan\u00e9 \n t\u0159\u00eddy transletu.\n -n povoluje zarovn\u00e1n\u00ed \u0161ablony (v\u00fdchoz\u00ed chov\u00e1n\u00ed je v pr\u016fm\u011bru lep\u0161\u00ed\n .\n -x zapne dal\u0161\u00ed v\u00fdstup zpr\u00e1vy lad\u011bn\u00ed\n -s zak\u00e1\u017ee vol\u00e1n\u00ed System.exit\n -u interpretuje argumenty jako URL\n -i vynut\u00ed kompil\u00e1tor \u010d\u00edst p\u0159edlohu styl\u016f ze stdin\n -v tiskne verzi kompil\u00e1toru \n -h tiskne v\u00fdpis tohoto pou\u017eit\u00ed \n"}, - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java class, so it - * should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.TRANSFORM_USAGE_STR, - "SYNOPSIS \n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j ]\n [-x] [-s] [-n ] {-u | }\n [= ...]\n\n pou\u017eije translet k transformaci dokumentu XML \n ur\u010den\u00e9ho jako . Translet je bu\u010f v\n v u\u017eivatelsk\u00e9 cest\u011b CLASSPATH nebo ve voliteln\u011b ur\u010den\u00e9m souboru .\nVOLBY\n -j ur\u010duje soubor jarfile, ze kter\u00e9ho se zavede translet\n -x p\u0159evede dal\u0161\u00ed v\u00fdstup zpr\u00e1vy lad\u011bn\u00ed\n -s vypne vol\u00e1n\u00ed System.exit\n -n spust\u00ed transformaci kr\u00e1t a\n zobraz\u00ed informaci o profilu\n -u ur\u010d\u00ed vstupn\u00ed dokument XML jako URL\n"}, - - - - /* - * Note to translators: "", "" and - * "" are keywords that should not be translated. - * The message indicates that an xsl:sort element must be a child of - * one of the other kinds of elements mentioned. - */ - {ErrorMsg.STRAY_SORT_ERR, - "Prvek m\u016f\u017ee b\u00fdt pou\u017eit jen v nebo ."}, - - /* - * Note to translators: The message indicates that the encoding - * requested for the output document was on that requires support that - * is not available from the Java Virtual Machine being used to execute - * the program. - */ - {ErrorMsg.UNSUPPORTED_ENCODING, - "V\u00fdstupn\u00ed k\u00f3dov\u00e1n\u00ed ''{0}'' nen\u00ed v tomto prost\u0159ed\u00ed JVM podporov\u00e1no."}, - - /* - * Note to translators: The message indicates that the XPath expression - * named in the substitution text was not well formed syntactically. - */ - {ErrorMsg.SYNTAX_ERR, - "Chyba syntaxe v ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a Java - * class. The term "constructor" here is the Java term. The message is - * displayed if XSLTC could not find a constructor for the specified - * class. - */ - {ErrorMsg.CONSTRUCTOR_NOT_FOUND, - "Nelze naj\u00edt vn\u011bj\u0161\u00ed konstruktor ''{0}''."}, - - /* - * Note to translators: "static" is the Java keyword. The substitution - * text is the name of a function. The first argument of that function - * is not of the required type. - */ - {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, - "Prvn\u00ed argument nestatick\u00e9 funkce Java ''{0}'' nen\u00ed platn\u00fdm odkazem na objekt."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. The substitution text is the - * expression that was in error. - */ - {ErrorMsg.TYPE_CHECK_ERR, - "Chyba p\u0159i kontrole typu v\u00fdrazu ''{0}''."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. However, the location of the - * problematic expression is unknown. - */ - {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, - "Chyba p\u0159i kontrole typu v\u00fdrazu na nezn\u00e1m\u00e9m m\u00edst\u011b."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option that was not recognized. - */ - {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, - "Volba p\u0159\u00edkazov\u00e9ho \u0159\u00e1dku ''{0}'' nen\u00ed platn\u00e1."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option. - */ - {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, - "Volb\u011b p\u0159\u00edkazov\u00e9ho \u0159\u00e1dku ''{0}'' chyb\u00ed po\u017eadovan\u00fd argument."}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, - "VAROV\u00c1N\u00cd: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.WARNING_MSG, - "VAROV\u00c1N\u00cd: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, - "Z\u00c1VA\u017dN\u00c1 CHYBA: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.FATAL_ERR_MSG, - "Z\u00c1VA\u017dN\u00c1 CHYBA: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, - "CHYBA: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.ERROR_MSG, - "CHYBA: ''{0}''"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, - "Transformace pou\u017eit\u00edm transletu ''{0}'' "}, - - /* - * Note to translators: The first substitution is the name of a class, - * while the second substitution is the name of a jar file. - */ - {ErrorMsg.TRANSFORM_WITH_JAR_STR, - "Transformace pou\u017eit\u00edm transletu ''{0}'' ze souboru jar ''{1}''"}, - - /* - * Note to translators: "TransformerFactory" is the name of a Java - * interface and must not be translated. The substitution text is - * the name of the class that could not be instantiated. - */ - {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, - "Nelze vytvo\u0159it instanci t\u0159\u00eddy TransformerFactory ''{0}''."}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages are collected together and displayed beneath - * this message. - */ - {ErrorMsg.COMPILER_ERROR_KEY, - "Chyby kompil\u00e1toru:"}, - - /* - * Note to translators: The following message is used as a header. - * All the warning messages are collected together and displayed - * beneath this message. - */ - {ErrorMsg.COMPILER_WARNING_KEY, - "Varov\u00e1n\u00ed kompil\u00e1toru:"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages that are produced when the stylesheet is - * applied to an input document are collected together and displayed - * beneath this message. A 'translet' is the compiled form of a - * stylesheet (see above). - */ - {ErrorMsg.RUNTIME_ERROR_KEY, - "Chyby transletu:"}, - - {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present."} - }; - - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java deleted file mode 100644 index 099644221a6..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java +++ /dev/null @@ -1,985 +0,0 @@ -/* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.xsltc.compiler.util; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_es extends ListResourceBundle { - -/* - * XSLTC compile-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 5) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 6) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 7) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 8) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 9) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 10) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 11) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - {ErrorMsg.MULTIPLE_STYLESHEET_ERR, - "Se ha definido m\u00E1s de una hoja de estilo en el mismo archivo."}, - - /* - * Note to translators: The substitution text is the name of a - * template. The same name was used on two different templates in the - * same stylesheet. - */ - {ErrorMsg.TEMPLATE_REDEF_ERR, - "La plantilla ''{0}'' ya se ha definido en esta hoja de estilo."}, - - - /* - * Note to translators: The substitution text is the name of a - * template. A reference to the template name was encountered, but the - * template is undefined. - */ - {ErrorMsg.TEMPLATE_UNDEF_ERR, - "La plantilla ''{0}'' no se ha definido en esta hoja de estilo."}, - - /* - * Note to translators: The substitution text is the name of a variable - * that was defined more than once. - */ - {ErrorMsg.VARIABLE_REDEF_ERR, - "Se ha definido varias veces la variable ''{0}'' en el mismo \u00E1mbito."}, - - /* - * Note to translators: The substitution text is the name of a variable - * or parameter. A reference to the variable or parameter was found, - * but it was never defined. - */ - {ErrorMsg.VARIABLE_UNDEF_ERR, - "No se ha definido la variable o el par\u00E1metro ''{0}''."}, - - /* - * Note to translators: The word "class" here refers to a Java class. - * Processing the stylesheet required a class to be loaded, but it could - * not be found. The substitution text is the name of the class. - */ - {ErrorMsg.CLASS_NOT_FOUND_ERR, - "No se ha encontrado la clase ''{0}''."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but it could not be found. "public" is the - * Java keyword. - */ - {ErrorMsg.METHOD_NOT_FOUND_ERR, - "No se ha encontrado el m\u00E9todo externo ''{0}'' (debe ser p\u00FAblico)."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but no method with the required types of - * arguments or return type could be found. - */ - {ErrorMsg.ARGUMENT_CONVERSION_ERR, - "No se puede convertir el tipo de argumento/retorno en la llamada al m\u00E9todo ''{0}''"}, - - /* - * Note to translators: The file or URI named in the substitution text - * is missing. - */ - {ErrorMsg.FILE_NOT_FOUND_ERR, - "No se ha encontrado el archivo o URI ''{0}''."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.INVALID_URI_ERR, - "URI ''{0}'' no v\u00E1lido."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.CATALOG_EXCEPTION, - "JAXP08090001: CatalogResolver est\u00E1 activado con el cat\u00E1logo \"{0}\", pero se ha devuelto una excepci\u00F3n CatalogException."}, - - /* - * Note to translators: The file or URI named in the substitution text - * exists but could not be opened. - */ - {ErrorMsg.FILE_ACCESS_ERR, - "No se puede abrir el archivo o URI ''{0}''."}, - - /* - * Note to translators: and are - * keywords that should not be translated. - */ - {ErrorMsg.MISSING_ROOT_ERR, - "Se esperaba el elemento o ."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ErrorMsg.NAMESPACE_UNDEF_ERR, - "No se ha declarado el prefijo de espacio de nombres ''{0}''."}, - - /* - * Note to translators: The Java function named in the stylesheet could - * not be found. - */ - {ErrorMsg.FUNCTION_RESOLVE_ERR, - "No se ha podido resolver la llamada a la funci\u00F3n ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a - * function. A literal string here means a constant string value. - */ - {ErrorMsg.NEED_LITERAL_ERR, - "El argumento en ''{0}'' debe ser una cadena literal."}, - - /* - * Note to translators: This message indicates there was a syntactic - * error in the form of an XPath expression. The substitution text is - * the expression. - */ - {ErrorMsg.XPATH_PARSER_ERR, - "Error al analizar la expresi\u00F3n XPath ''{0}''."}, - - /* - * Note to translators: An element in the stylesheet requires a - * particular attribute named by the substitution text, but that - * attribute was not specified in the stylesheet. - */ - {ErrorMsg.REQUIRED_ATTR_ERR, - "Falta el atributo ''{0}'' necesario."}, - - /* - * Note to translators: This message indicates that a character not - * permitted in an XPath expression was encountered. The substitution - * text is the offending character. - */ - {ErrorMsg.ILLEGAL_CHAR_ERR, - "Car\u00E1cter ''{0}'' no permitido en la expresi\u00F3n XPath."}, - - /* - * Note to translators: A processing instruction is a mark-up item in - * an XML document that request some behaviour of an XML processor. The - * form of the name of was invalid in this case, and the substitution - * text is the name. - */ - {ErrorMsg.ILLEGAL_PI_ERR, - "Nombre ''{0}'' no permitido para la instrucci\u00F3n de procesamiento."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ErrorMsg.STRAY_ATTRIBUTE_ERR, - "El atributo ''{0}'' est\u00E1 fuera del elemento."}, - - /* - * Note to translators: An attribute that wasn't recognized was - * specified on an element in the stylesheet. The attribute is named - * by the substitution - * text. - */ - {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "Atributo ''{0}'' no permitido."}, - - /* - * Note to translators: "import" and "include" are keywords that should - * not be translated. This messages indicates that the stylesheet - * named in the substitution text imported or included itself either - * directly or indirectly. - */ - {ErrorMsg.CIRCULAR_INCLUDE_ERR, - "Import/include circular. La hoja de estilo ''{0}'' ya se ha cargado."}, - - /* - * Note to translators: "xsl:import" and "xsl:include" are keywords that - * should not be translated. - */ - {ErrorMsg.IMPORT_PRECEDE_OTHERS_ERR, - "Los secundarios del elemento xsl:import deben preceder al resto de secundarios de elementos de un elemento xsl:stylesheet, incluidos los secundarios de elementos xsl:include."}, - - /* - * Note to translators: A result-tree fragment is a portion of a - * resulting XML document represented as a tree. "" is a - * keyword and should not be translated. - */ - {ErrorMsg.RESULT_TREE_SORT_ERR, - "Los fragmentos del \u00E1rbol de resultados no se pueden ordenar (los elementos se ignoran). Debe ordenar los nodos al crear el \u00E1rbol de resultados."}, - - /* - * Note to translators: A name can be given to a particular style to be - * used to format decimal values. The substitution text gives the name - * of such a style for which more than one declaration was encountered. - */ - {ErrorMsg.SYMBOLS_REDEF_ERR, - "Ya se ha definido el formato decimal ''{0}''."}, - - /* - * Note to translators: The stylesheet version named in the - * substitution text is not supported. - */ - {ErrorMsg.XSL_VERSION_ERR, - "La versi\u00F3n XSL ''{0}'' no est\u00E1 soportada por XSLTC."}, - - /* - * Note to translators: The definitions of one or more variables or - * parameters depend on one another. - */ - {ErrorMsg.CIRCULAR_VARIABLE_ERR, - "La referencia de variable/par\u00E1metro circular en ''{0}''."}, - - /* - * Note to translators: The operator in an expresion with two operands was - * not recognized. - */ - {ErrorMsg.ILLEGAL_BINARY_OP_ERR, - "Operador desconocido para la expresi\u00F3n binaria."}, - - /* - * Note to translators: This message is produced if a reference to a - * function has too many or too few arguments. - */ - {ErrorMsg.ILLEGAL_ARG_ERR, - "Argumentos no permitidos para la llamada de funci\u00F3n."}, - - /* - * Note to translators: "document()" is the name of function and must - * not be translated. A node-set is a set of the nodes in the tree - * representation of an XML document. - */ - {ErrorMsg.DOCUMENT_ARG_ERR, - "El segundo argumento en la funci\u00F3n document() debe ser un juego de nodos."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.MISSING_WHEN_ERR, - "Se necesita al menos un elemento en ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.MULTIPLE_OTHERWISE_ERR, - "S\u00F3lo se permite un elemento en ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.STRAY_OTHERWISE_ERR, - " s\u00F3lo se puede utilizar en ."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.STRAY_WHEN_ERR, - " s\u00F3lo se puede utilizar en ."}, - - /* - * Note to translators: "", "" and - * "" are keywords and should not be translated. This - * message describes a syntax error in the stylesheet. - */ - {ErrorMsg.WHEN_ELEMENT_ERR, - "S\u00F3lo se permiten los elementos y en ."}, - - /* - * Note to translators: "" and "name" are keywords - * that should not be translated. - */ - {ErrorMsg.UNNAMED_ATTRIBSET_ERR, - "Falta el atributo 'name' en "}, - - /* - * Note to translators: An element in the stylesheet contained an - * element of a type that it was not permitted to contain. - */ - {ErrorMsg.ILLEGAL_CHILD_ERR, - "Elemento secundario no permitido."}, - - /* - * Note to translators: The stylesheet tried to create an element with - * a name that was not a valid XML name. The substitution text contains - * the name. - */ - {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, - "No se puede llamar ''{0}'' a un elemento"}, - - /* - * Note to translators: The stylesheet tried to create an attribute - * with a name that was not a valid XML name. The substitution text - * contains the name. - */ - {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, - "No se puede llamar ''{0}'' a un atributo"}, - - /* - * Note to translators: The children of the outermost element of a - * stylesheet are referred to as top-level elements. No text should - * occur within that outermost element unless it is within a top-level - * element. This message indicates that that constraint was violated. - * "" is a keyword that should not be translated. - */ - {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, - "Datos de texto fuera del elemento de nivel superior."}, - - /* - * Note to translators: JAXP is an acronym for the Java API for XML - * Processing. This message indicates that the XML parser provided to - * XSLTC to process the XML input document had a configuration problem. - */ - {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "El analizador JAXP no se ha configurado correctamente"}, - - /* - * Note to translators: The substitution text names the internal error - * encountered. - */ - {ErrorMsg.INTERNAL_ERR, - "Error interno de XSLTC irrecuperable: ''{0}''"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {ErrorMsg.UNSUPPORTED_XSL_ERR, - "Elemento ''{0}'' de XSL no soportado."}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does - * not recognized the particular extension named. The substitution text - * gives the extension name. - */ - {ErrorMsg.UNSUPPORTED_EXT_ERR, - "Extensi\u00F3n ''{0}'' de XSLTC no reconocida."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. XSLTC is able to detect that in this - * case because the outermost element in the stylesheet has to be - * declared with respect to the XSL namespace URI, but no declaration - * for that namespace was seen. - */ - {ErrorMsg.MISSING_XSLT_URI_ERR, - "El documento de entrada no es una hoja de estilo (el espacio de nombres XSL no se ha declarado en el elemento ra\u00EDz)."}, - - /* - * Note to translators: XSLTC could not find the stylesheet document - * with the name specified by the substitution text. - */ - {ErrorMsg.MISSING_XSLT_TARGET_ERR, - "No se ha encontrado el destino de hoja de estilo ''{0}''."}, - - /* - * Note to translators: access to the stylesheet target is denied - */ - {ErrorMsg.ACCESSING_XSLT_TARGET_ERR, - "No se ha podido leer el destino de hoja de estilos ''{0}'', porque no se permite el acceso ''{1}'' debido a una restricci\u00F3n definida por la propiedad accessExternalStylesheet."}, - - /* - * Note to translators: This message represents an internal error in - * condition in XSLTC. The substitution text is the class name in XSLTC - * that is missing some functionality. - */ - {ErrorMsg.NOT_IMPLEMENTED_ERR, - "No implantado: ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. - */ - {ErrorMsg.NOT_STYLESHEET_ERR, - "El documento de entrada no contiene una hoja de estilo XSL."}, - - /* - * Note to translators: The element named in the substitution text was - * encountered in the stylesheet but is not recognized. - */ - {ErrorMsg.ELEMENT_PARSE_ERR, - "No se ha podido analizar el elemento ''{0}''"}, - - /* - * Note to translators: "use", "", "node", "node-set", "string" - * and "number" are keywords in this context and should not be - * translated. This message indicates that the value of the "use" - * attribute was not one of the permitted values. - */ - {ErrorMsg.KEY_USE_ATTR_ERR, - "El atributo use de debe ser node, node-set, string o number."}, - - /* - * Note to translators: An XML document can specify the version of the - * XML specification to which it adheres. This message indicates that - * the version specified for the output document was not valid. - */ - {ErrorMsg.OUTPUT_VERSION_ERR, - "La versi\u00F3n del documento XML de salida debe ser 1.0"}, - - /* - * Note to translators: The operator in a comparison operation was - * not recognized. - */ - {ErrorMsg.ILLEGAL_RELAT_OP_ERR, - "Operador desconocido para la expresi\u00F3n relacional"}, - - /* - * Note to translators: An attribute set defines as a set of XML - * attributes that can be added to an element in the output XML document - * as a group. This message is reported if the name specified was not - * used to declare an attribute set. The substitution text is the name - * that is in error. - */ - {ErrorMsg.ATTRIBSET_UNDEF_ERR, - "Se est\u00E1 intentando utilizar el juego de atributos ''{0}'' no existente."}, - - /* - * Note to translators: The term "attribute value template" is a term - * defined by XSLT which describes the value of an attribute that is - * determined by an XPath expression. The message indicates that the - * expression was syntactically incorrect; the substitution text - * contains the expression that was in error. - */ - {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, - "No se puede analizar la plantilla del valor de atributo ''{0}''."}, - - /* - * Note to translators: ??? - */ - {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, - "Tipo de datos desconocido en la firma para la clase ''{0}''."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of - * type {0}. - */ - {ErrorMsg.DATA_CONVERSION_ERR, - "No se puede convertir el tipo de datos ''{0}'' en ''{1}''."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_TRANSLET_CLASS_ERR, - "Templates no contiene una definici\u00F3n de clase translet."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_MAIN_TRANSLET_ERR, - "Templates no contiene una clase con el nombre ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSLET_CLASS_ERR, - "No se ha podido cargar la clase de translet ''{0}''."}, - - {ErrorMsg.TRANSLET_OBJECT_ERR, - "La clase de translet se ha cargado, pero no se puede crear una instancia de translet."}, - - /* - * Note to translators: "ErrorListener" is a Java interface name that - * should not be translated. The message indicates that the user tried - * to set an ErrorListener object on object of the class named in the - * substitution text with "null" Java value. - */ - {ErrorMsg.ERROR_LISTENER_NULL_ERR, - "Intentando definir ErrorListener para ''{0}'' como nulo"}, - - /* - * Note to translators: StreamSource, SAXSource and DOMSource are Java - * interface names that should not be translated. - */ - {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, - "S\u00F3lo StreamSource, SAXSource y DOMSource est\u00E1n soportados por XSLTC"}, - - /* - * Note to translators: "Source" is a Java class name that should not - * be translated. The substitution text is the name of Java method. - */ - {ErrorMsg.JAXP_NO_SOURCE_ERR, - "El objeto Source que se ha transferido a ''{0}'' no tiene contenido."}, - - /* - * Note to translators: The message indicates that XSLTC failed to - * compile the stylesheet into a translet (class file). - */ - {ErrorMsg.JAXP_COMPILE_ERR, - "No se ha podido compilar la hoja de estilo"}, - - /* - * Note to translators: "TransformerFactory" is a class name. In this - * context, an attribute is a property or setting of the - * TransformerFactory object. The substitution text is the name of the - * unrecognised attribute. The method used to retrieve the attribute is - * "getAttribute", so it's not clear whether it would be best to - * translate the term "attribute". - */ - {ErrorMsg.JAXP_INVALID_ATTR_ERR, - "TransformerFactory no reconoce el atributo ''{0}''."}, - - {ErrorMsg.JAXP_INVALID_ATTR_VALUE_ERR, - "Valor no v\u00E1lido especificado para el atributo ''{0}''."}, - - /* - * Note to translators: "setResult()" and "startDocument()" are Java - * method names that should not be translated. - */ - {ErrorMsg.JAXP_SET_RESULT_ERR, - "setResult() debe llamarse antes de startDocument()."}, - - /* - * Note to translators: "Transformer" is a Java interface name that - * should not be translated. A Transformer object should contained a - * reference to a translet object in order to be used for - * transformations; this message is produced if that requirement is not - * met. - */ - {ErrorMsg.JAXP_NO_TRANSLET_ERR, - "Transformer no tiene un objeto translet encapsulado."}, - - /* - * Note to translators: The XML document that results from a - * transformation needs to be sent to an output handler object; this - * message is produced if that requirement is not met. - */ - {ErrorMsg.JAXP_NO_HANDLER_ERR, - "No se ha definido el manejador de salida para el resultado de la transformaci\u00F3n."}, - - /* - * Note to translators: "Result" is a Java interface name in this - * context. The substitution text is a method name. - */ - {ErrorMsg.JAXP_NO_RESULT_ERR, - "El objeto Result que se ha pasado a ''{0}'' no es v\u00E1lido."}, - - /* - * Note to translators: "Transformer" is a Java interface name. The - * user's program attempted to access an unrecognized property with the - * name specified in the substitution text. The method used to retrieve - * the property is "getOutputProperty", so it's not clear whether it - * would be best to translate the term "property". - */ - {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, - "Se est\u00E1 intentando acceder a la propiedad ''{0}'' de Transformer no v\u00E1lida."}, - - /* - * Note to translators: SAX2DOM is the name of a Java class that should - * not be translated. This is an adapter in the sense that it takes a - * DOM object and converts it to something that uses the SAX API. - */ - {ErrorMsg.SAX2DOM_ADAPTER_ERR, - "No se ha podido crear el adaptador SAX2DOM: ''{0}''."}, - - /* - * Note to translators: "XSLTCSource.build()" is a Java method name. - * "systemId" is an XML term that is short for "system identification". - */ - {ErrorMsg.XSLTC_SOURCE_ERR, - "Se ha llamado a XSLTCSource.build() sin haber definido la identificaci\u00F3n del sistema."}, - - { ErrorMsg.ER_RESULT_NULL, - "El resultado no debe ser nulo"}, - - /* - * Note to translators: This message indicates that the value argument - * of setParameter must be a valid Java Object. - */ - {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, - "El valor del par\u00E1metro {0} debe ser un objeto Java v\u00E1lido"}, - - - {ErrorMsg.COMPILE_STDIN_ERR, - "La opci\u00F3n -i debe utilizarse con la opci\u00F3n -o."}, - - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java package, so - * it should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.COMPILE_USAGE_STR, - "SINOPSIS\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o ]\n [-d ] [-j ] [-p ]\n [-n] [-x] [-u] [-v] [-h] { | -i }\n\nOPCIONES\n -o asigna el nombre de al translet\n generado. Por defecto, el nombre del translet se\n deriva del nombre de . Esta opci\u00F3n\n se ignora si se compilan varias hojas de estilo.\n -d especifica un directorio de destino para el translet\n -j empaqueta las clases de translet en un archivo jar del\n nombre especificado como \n -p especifica un prefijo de nombre de paquete para todas las clases de translet n\n generadas.\n -n permite poner en l\u00EDnea la plantilla (comportamiento por defecto mejor\n sobre la media).\n -x activa la salida del mensaje de depuraci\u00F3n\n -u interpreta los argumentos como URL\n -i obliga al compilador a leer la hoja de estilo de stdin\n -v imprime la versi\u00F3n del compilador\n -h imprime esta sentencia de uso\n"}, - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java class, so it - * should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.TRANSFORM_USAGE_STR, - "SYNOPSIS \n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j ]\n [-x] [-n ] {-u | }\n [= ...]\n\n utiliza el translet para transformar un documento XML \n especificado como . El translet se encuentra en\n la CLASSPATH del usuario o en el especificado opcionalmente.\nOPCIONES\n -j especifica un archivo jar desde el que cargar el translet\n -x activa la salida del mensaje de depuraci\u00F3n adicional\n -n ejecuta el n\u00FAmero de de una transformaci\u00F3n y\n muestra la informaci\u00F3n de la creaci\u00F3n de perfil\n -u especifica el documento de entrada XML como una URL\n"}, - - - - /* - * Note to translators: "", "" and - * "" are keywords that should not be translated. - * The message indicates that an xsl:sort element must be a child of - * one of the other kinds of elements mentioned. - */ - {ErrorMsg.STRAY_SORT_ERR, - " s\u00F3lo se puede utilizar en o ."}, - - /* - * Note to translators: The message indicates that the encoding - * requested for the output document was on that requires support that - * is not available from the Java Virtual Machine being used to execute - * the program. - */ - {ErrorMsg.UNSUPPORTED_ENCODING, - "La codificaci\u00F3n de salida ''{0}'' no est\u00E1 soportada en esta JVM."}, - - /* - * Note to translators: The message indicates that the XPath expression - * named in the substitution text was not well formed syntactically. - */ - {ErrorMsg.SYNTAX_ERR, - "Error de sintaxis en ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a Java - * class. The term "constructor" here is the Java term. The message is - * displayed if XSLTC could not find a constructor for the specified - * class. - */ - {ErrorMsg.CONSTRUCTOR_NOT_FOUND, - "No se ha encontrado el constructor externo ''{0}''."}, - - /* - * Note to translators: "static" is the Java keyword. The substitution - * text is the name of a function. The first argument of that function - * is not of the required type. - */ - {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, - "El primer argumento de la funci\u00F3n Java no est\u00E1tica ''{0}'' no es una referencia de objeto v\u00E1lida."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. The substitution text is the - * expression that was in error. - */ - {ErrorMsg.TYPE_CHECK_ERR, - "Error al comprobar el tipo de la expresi\u00F3n ''{0}''."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. However, the location of the - * problematic expression is unknown. - */ - {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, - "Error al comprobar el tipo de una expresi\u00F3n en una ubicaci\u00F3n desconocida."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option that was not recognized. - */ - {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, - "La opci\u00F3n de l\u00EDnea de comandos ''{0}'' no es v\u00E1lida."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option. - */ - {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, - "Falta un argumento necesario en la opci\u00F3n de l\u00EDnea de comandos ''{0}''."}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, - "WARNING: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.WARNING_MSG, - "WARNING: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, - "FATAL ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.FATAL_ERR_MSG, - "FATAL ERROR: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, - "ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.ERROR_MSG, - "ERROR: ''{0}''"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, - "Transformaci\u00F3n que utiliza el translet ''{0}'' "}, - - /* - * Note to translators: The first substitution is the name of a class, - * while the second substitution is the name of a jar file. - */ - {ErrorMsg.TRANSFORM_WITH_JAR_STR, - "Transformaci\u00F3n que utiliza el translet ''{0}'' del archivo jar ''{1}''"}, - - /* - * Note to translators: "TransformerFactory" is the name of a Java - * interface and must not be translated. The substitution text is - * the name of the class that could not be instantiated. - */ - {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, - "No se ha podido crear una instancia de la clase TransformerFactory ''{0}''."}, - - /* - * Note to translators: This message is produced when the user - * specified a name for the translet class that contains characters - * that are not permitted in a Java class name. The substitution - * text "{0}" specifies the name the user requested, while "{1}" - * specifies the name the processor used instead. - */ - {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT, - "El nombre ''{0}'' no se ha podido utilizar como el nombre de la clase de translet porque contiene caracteres que no est\u00E1n permitidos en el nombre de la clase Java. Se ha utilizado el nombre ''{1}'' en su lugar."}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages are collected together and displayed beneath - * this message. - */ - {ErrorMsg.COMPILER_ERROR_KEY, - "Errores del compilador:"}, - - /* - * Note to translators: The following message is used as a header. - * All the warning messages are collected together and displayed - * beneath this message. - */ - {ErrorMsg.COMPILER_WARNING_KEY, - "Advertencias del compilador:"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages that are produced when the stylesheet is - * applied to an input document are collected together and displayed - * beneath this message. A 'translet' is the compiled form of a - * stylesheet (see above). - */ - {ErrorMsg.RUNTIME_ERROR_KEY, - "Errores del translet:"}, - - /* - * Note to translators: An attribute whose value is constrained to - * be a "QName" or a list of "QNames" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_QNAME_ERR, - "Un atributo cuyo valor debe ser un QName o lista de QNames separados por espacios en blanco ten\u00EDa el valor ''{0}''"}, - - /* - * Note to translators: An attribute whose value is required to - * be an "NCName". - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_NCNAME_ERR, - "Un atributo cuyo valor debe ser un NCName ten\u00EDa el valor ''{0}''"}, - - /* - * Note to translators: An attribute with an incorrect value was - * encountered. The permitted value is one of the literal values - * "xml", "html" or "text"; it is also permitted to have the form of - * a QName that is not also an NCName. The terms "method", - * "xsl:output", "xml", "html" and "text" are keywords that must not - * be translated. The term "qname-but-not-ncname" is an XML syntactic - * term. The substitution text contains the actual value of the - * attribute. - */ - {ErrorMsg.INVALID_METHOD_IN_OUTPUT, - "El atributo method de un elemento ten\u00EDa el valor ''{0}''. El valor debe ser ''xml'', ''html'', ''text'' o qname-but-not-ncname"}, - - {ErrorMsg.JAXP_GET_FEATURE_NULL_NAME, - "El nombre de funci\u00F3n no puede ser nulo en TransformerFactory.getFeature (nombre de cadena)."}, - - {ErrorMsg.JAXP_SET_FEATURE_NULL_NAME, - "El nombre de funci\u00F3n no puede ser nulo en TransformerFactory.setFeature (nombre de cadena, valor booleano)."}, - - {ErrorMsg.JAXP_UNSUPPORTED_FEATURE, - "No se puede definir la funci\u00F3n ''{0}''en esta f\u00E1brica del transformador."}, - - {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: no se puede definir la funci\u00F3n en false cuando est\u00E1 presente el gestor de seguridad."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method, and "try-catch-finally block" - * refers to the Java keywords with those names. "Outlined" is a - * technical term internal to XSLTC and should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_TRY_CATCH, - "Error interno de XSLTC: el c\u00F3digo de bytes generado contiene un bloque try-catch-finally y no se puede delimitar."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The terms "OutlineableChunkStart" and - * "OutlineableChunkEnd" are the names of classes internal to XSLTC and - * should not be translated. The message indicates that for every - * "start" there must be a corresponding "end", and vice versa, and - * that if one of a pair of "start" and "end" appears between another - * pair of corresponding "start" and "end", then the other half of the - * pair must also be between that same enclosing pair. - */ - {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS, - "Error interno de XSLTC: los marcadores OutlineableChunkStart y OutlineableChunkEnd deben estar equilibrados y correctamente anidados."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method. The "method" that is being - * referred to is a Java method in a translet that XSLTC is generating - * in processing a stylesheet. The "instruction" that is being - * referred to is one of the instrutions in the Java byte code in that - * method. "Outlined" is a technical term internal to XSLTC and - * should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_DELETED_TARGET, - "Error interno de XSLTC: todav\u00EDa se hace referencia a una instrucci\u00F3n que formaba parte de un bloque de c\u00F3digo de bytes delimitado en el m\u00E9todo original." - }, - - - /* - * Note to translators: This message describes an internal error in the - * processor. The "method" that is being referred to is a Java method - * in a translet that XSLTC is generating. - * - */ - {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG, - "Error interno de XSLTC: un m\u00E9todo en el translet excede la limitaci\u00F3n de Java Virtual Machine de longitud de un m\u00E9todo de 64 kilobytes. Normalmente, esto lo causan plantillas en una hoja de estilos demasiado grandes. Pruebe a reestructurar la hoja de estilos para utilizar plantillas m\u00E1s peque\u00F1as." - }, - }; - - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java deleted file mode 100644 index 5690aff3192..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java +++ /dev/null @@ -1,986 +0,0 @@ -/* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.xsltc.compiler.util; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_fr extends ListResourceBundle { - -/* - * XSLTC compile-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 5) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 6) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 7) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 8) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 9) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 10) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 11) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - {ErrorMsg.MULTIPLE_STYLESHEET_ERR, - "Plusieurs feuilles de style d\u00E9finies dans le m\u00EAme fichier."}, - - /* - * Note to translators: The substitution text is the name of a - * template. The same name was used on two different templates in the - * same stylesheet. - */ - {ErrorMsg.TEMPLATE_REDEF_ERR, - "Mod\u00E8le ''{0}'' d\u00E9j\u00E0 d\u00E9fini dans cette feuille de style."}, - - - /* - * Note to translators: The substitution text is the name of a - * template. A reference to the template name was encountered, but the - * template is undefined. - */ - {ErrorMsg.TEMPLATE_UNDEF_ERR, - "Mod\u00E8le ''{0}'' non d\u00E9fini dans cette feuille de style."}, - - /* - * Note to translators: The substitution text is the name of a variable - * that was defined more than once. - */ - {ErrorMsg.VARIABLE_REDEF_ERR, - "Plusieurs variables ''{0}'' d\u00E9finies dans la m\u00EAme port\u00E9e."}, - - /* - * Note to translators: The substitution text is the name of a variable - * or parameter. A reference to the variable or parameter was found, - * but it was never defined. - */ - {ErrorMsg.VARIABLE_UNDEF_ERR, - "La variable ou le param\u00E8tre ''{0}'' n''est pas d\u00E9fini."}, - - /* - * Note to translators: The word "class" here refers to a Java class. - * Processing the stylesheet required a class to be loaded, but it could - * not be found. The substitution text is the name of the class. - */ - {ErrorMsg.CLASS_NOT_FOUND_ERR, - "Impossible de trouver la classe ''{0}''."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but it could not be found. "public" is the - * Java keyword. - */ - {ErrorMsg.METHOD_NOT_FOUND_ERR, - "M\u00E9thode externe ''{0}'' introuvable (elle doit \u00EAtre \"public\")."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but no method with the required types of - * arguments or return type could be found. - */ - {ErrorMsg.ARGUMENT_CONVERSION_ERR, - "Impossible de convertir le type de retour/d''argument dans l''appel de la m\u00E9thode ''{0}''"}, - - /* - * Note to translators: The file or URI named in the substitution text - * is missing. - */ - {ErrorMsg.FILE_NOT_FOUND_ERR, - "Fichier ou URI ''{0}'' introuvable."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.INVALID_URI_ERR, - "URI ''{0}'' non valide."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.CATALOG_EXCEPTION, - "JAXP08090001 : le CatalogResolver est activ\u00E9 avec le catalogue \"{0}\", mais une exception CatalogException est renvoy\u00E9e."}, - - /* - * Note to translators: The file or URI named in the substitution text - * exists but could not be opened. - */ - {ErrorMsg.FILE_ACCESS_ERR, - "Impossible d''ouvrir le fichier ou l''URI ''{0}''."}, - - /* - * Note to translators: and are - * keywords that should not be translated. - */ - {ErrorMsg.MISSING_ROOT_ERR, - "El\u00E9ment ou attendu."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ErrorMsg.NAMESPACE_UNDEF_ERR, - "Le pr\u00E9fixe de l''espace de noms ''{0}'' n''a pas \u00E9t\u00E9 d\u00E9clar\u00E9."}, - - /* - * Note to translators: The Java function named in the stylesheet could - * not be found. - */ - {ErrorMsg.FUNCTION_RESOLVE_ERR, - "Impossible de r\u00E9soudre l''appel de la fonction ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a - * function. A literal string here means a constant string value. - */ - {ErrorMsg.NEED_LITERAL_ERR, - "L''argument pour ''{0}'' doit \u00EAtre une cha\u00EEne litt\u00E9rale."}, - - /* - * Note to translators: This message indicates there was a syntactic - * error in the form of an XPath expression. The substitution text is - * the expression. - */ - {ErrorMsg.XPATH_PARSER_ERR, - "Erreur lors de l''analyse de l''expression XPath ''{0}''."}, - - /* - * Note to translators: An element in the stylesheet requires a - * particular attribute named by the substitution text, but that - * attribute was not specified in the stylesheet. - */ - {ErrorMsg.REQUIRED_ATTR_ERR, - "Attribut ''{0}'' obligatoire manquant."}, - - /* - * Note to translators: This message indicates that a character not - * permitted in an XPath expression was encountered. The substitution - * text is the offending character. - */ - {ErrorMsg.ILLEGAL_CHAR_ERR, - "Caract\u00E8re ''{0}'' non admis dans l''expression XPath."}, - - /* - * Note to translators: A processing instruction is a mark-up item in - * an XML document that request some behaviour of an XML processor. The - * form of the name of was invalid in this case, and the substitution - * text is the name. - */ - {ErrorMsg.ILLEGAL_PI_ERR, - "Nom ''{0}'' non admis pour l''instruction de traitement."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ErrorMsg.STRAY_ATTRIBUTE_ERR, - "Attribut ''{0}'' \u00E0 l''ext\u00E9rieur de l''\u00E9l\u00E9ment."}, - - /* - * Note to translators: An attribute that wasn't recognized was - * specified on an element in the stylesheet. The attribute is named - * by the substitution - * text. - */ - {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "Attribut ''{0}'' non admis."}, - - /* - * Note to translators: "import" and "include" are keywords that should - * not be translated. This messages indicates that the stylesheet - * named in the substitution text imported or included itself either - * directly or indirectly. - */ - {ErrorMsg.CIRCULAR_INCLUDE_ERR, - "Op\u00E9ration import/include circulaire. La feuille de style ''{0}'' est d\u00E9j\u00E0 charg\u00E9e."}, - - /* - * Note to translators: "xsl:import" and "xsl:include" are keywords that - * should not be translated. - */ - {ErrorMsg.IMPORT_PRECEDE_OTHERS_ERR, - "Les enfants d'\u00E9l\u00E9ment xsl:import doivent pr\u00E9c\u00E9der tous les autres enfants d'\u00E9l\u00E9ment d'un \u00E9l\u00E9ment xsl:stylesheet, y compris tout enfant d'\u00E9l\u00E9ment xsl:include."}, - - /* - * Note to translators: A result-tree fragment is a portion of a - * resulting XML document represented as a tree. "" is a - * keyword and should not be translated. - */ - {ErrorMsg.RESULT_TREE_SORT_ERR, - "Les fragments de l'arborescence de r\u00E9sultats ne peuvent pas \u00EAtre tri\u00E9s (les \u00E9l\u00E9ments ne sont pas pris en compte). Vous devez trier les noeuds lorsque vous cr\u00E9ez l'arborescence de r\u00E9sultats."}, - - /* - * Note to translators: A name can be given to a particular style to be - * used to format decimal values. The substitution text gives the name - * of such a style for which more than one declaration was encountered. - */ - {ErrorMsg.SYMBOLS_REDEF_ERR, - "Le formatage d\u00E9cimal ''{0}'' est d\u00E9j\u00E0 d\u00E9fini."}, - - /* - * Note to translators: The stylesheet version named in the - * substitution text is not supported. - */ - {ErrorMsg.XSL_VERSION_ERR, - "La version XSL ''{0}'' n''est pas prise en charge par XSLTC."}, - - /* - * Note to translators: The definitions of one or more variables or - * parameters depend on one another. - */ - {ErrorMsg.CIRCULAR_VARIABLE_ERR, - "R\u00E9f\u00E9rence de param\u00E8tre/variable circulaire dans ''{0}''."}, - - /* - * Note to translators: The operator in an expresion with two operands was - * not recognized. - */ - {ErrorMsg.ILLEGAL_BINARY_OP_ERR, - "Op\u00E9rateur inconnu pour l'expression binaire."}, - - /* - * Note to translators: This message is produced if a reference to a - * function has too many or too few arguments. - */ - {ErrorMsg.ILLEGAL_ARG_ERR, - "Arguments non admis pour l'appel de la fonction."}, - - /* - * Note to translators: "document()" is the name of function and must - * not be translated. A node-set is a set of the nodes in the tree - * representation of an XML document. - */ - {ErrorMsg.DOCUMENT_ARG_ERR, - "Le deuxi\u00E8me argument de la fonction document() doit \u00EAtre un jeu de noeuds."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.MISSING_WHEN_ERR, - "Au moins un \u00E9l\u00E9ment est obligatoire dans ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.MULTIPLE_OTHERWISE_ERR, - "Un seul \u00E9l\u00E9ment est autoris\u00E9 dans ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.STRAY_OTHERWISE_ERR, - " ne peut \u00EAtre utilis\u00E9 que dans ."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.STRAY_WHEN_ERR, - " ne peut \u00EAtre utilis\u00E9 que dans ."}, - - /* - * Note to translators: "", "" and - * "" are keywords and should not be translated. This - * message describes a syntax error in the stylesheet. - */ - {ErrorMsg.WHEN_ELEMENT_ERR, - "Seuls les \u00E9l\u00E9ments et sont autoris\u00E9s dans ."}, - - /* - * Note to translators: "" and "name" are keywords - * that should not be translated. - */ - {ErrorMsg.UNNAMED_ATTRIBSET_ERR, - "Attribut \"name\" manquant dans ."}, - - /* - * Note to translators: An element in the stylesheet contained an - * element of a type that it was not permitted to contain. - */ - {ErrorMsg.ILLEGAL_CHILD_ERR, - "El\u00E9ment enfant non admis."}, - - /* - * Note to translators: The stylesheet tried to create an element with - * a name that was not a valid XML name. The substitution text contains - * the name. - */ - {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, - "Vous ne pouvez pas appeler un \u00E9l\u00E9ment ''{0}''"}, - - /* - * Note to translators: The stylesheet tried to create an attribute - * with a name that was not a valid XML name. The substitution text - * contains the name. - */ - {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, - "Vous ne pouvez pas appeler un attribut ''{0}''"}, - - /* - * Note to translators: The children of the outermost element of a - * stylesheet are referred to as top-level elements. No text should - * occur within that outermost element unless it is within a top-level - * element. This message indicates that that constraint was violated. - * "" is a keyword that should not be translated. - */ - {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, - "Donn\u00E9es texte en dehors de l'\u00E9l\u00E9ment de niveau sup\u00E9rieur."}, - - /* - * Note to translators: JAXP is an acronym for the Java API for XML - * Processing. This message indicates that the XML parser provided to - * XSLTC to process the XML input document had a configuration problem. - */ - {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "L'analyseur JAXP n'est pas configur\u00E9 correctement"}, - - /* - * Note to translators: The substitution text names the internal error - * encountered. - */ - {ErrorMsg.INTERNAL_ERR, - "Erreur interne XSLTC irr\u00E9cup\u00E9rable : ''{0}''"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {ErrorMsg.UNSUPPORTED_XSL_ERR, - "El\u00E9ment ''{0}'' XSL non pris en charge."}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does - * not recognized the particular extension named. The substitution text - * gives the extension name. - */ - {ErrorMsg.UNSUPPORTED_EXT_ERR, - "Extension ''{0}'' XSLTC non reconnue."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. XSLTC is able to detect that in this - * case because the outermost element in the stylesheet has to be - * declared with respect to the XSL namespace URI, but no declaration - * for that namespace was seen. - */ - {ErrorMsg.MISSING_XSLT_URI_ERR, - "Le document d'entr\u00E9e n'est pas une feuille de style (l'espace de noms XSL n'est pas d\u00E9clar\u00E9 dans l'\u00E9l\u00E9ment racine)."}, - - /* - * Note to translators: XSLTC could not find the stylesheet document - * with the name specified by the substitution text. - */ - {ErrorMsg.MISSING_XSLT_TARGET_ERR, - "Cible de feuille de style ''{0}'' introuvable."}, - - /* - * Note to translators: access to the stylesheet target is denied - */ - {ErrorMsg.ACCESSING_XSLT_TARGET_ERR, - "Impossible de lire la cible de feuille de style ''{0}'' car l''acc\u00E8s \u00E0 ''{1}'' n''est pas autoris\u00E9 en raison d''une restriction d\u00E9finie par la propri\u00E9t\u00E9 accessExternalStylesheet."}, - - /* - * Note to translators: This message represents an internal error in - * condition in XSLTC. The substitution text is the class name in XSLTC - * that is missing some functionality. - */ - {ErrorMsg.NOT_IMPLEMENTED_ERR, - "Non impl\u00E9ment\u00E9 : ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. - */ - {ErrorMsg.NOT_STYLESHEET_ERR, - "Le document d'entr\u00E9e ne contient pas de feuille de style XSL."}, - - /* - * Note to translators: The element named in the substitution text was - * encountered in the stylesheet but is not recognized. - */ - {ErrorMsg.ELEMENT_PARSE_ERR, - "Impossible d''analyser l''\u00E9l\u00E9ment ''{0}''"}, - - /* - * Note to translators: "use", "", "node", "node-set", "string" - * and "number" are keywords in this context and should not be - * translated. This message indicates that the value of the "use" - * attribute was not one of the permitted values. - */ - {ErrorMsg.KEY_USE_ATTR_ERR, - "L'attribut \"use\" de doit \u00EAtre node, node-set, string ou number."}, - - /* - * Note to translators: An XML document can specify the version of the - * XML specification to which it adheres. This message indicates that - * the version specified for the output document was not valid. - */ - {ErrorMsg.OUTPUT_VERSION_ERR, - "La version du document XML de sortie doit \u00EAtre 1.0"}, - - /* - * Note to translators: The operator in a comparison operation was - * not recognized. - */ - {ErrorMsg.ILLEGAL_RELAT_OP_ERR, - "Op\u00E9rateur inconnu pour l'expression relationnelle"}, - - /* - * Note to translators: An attribute set defines as a set of XML - * attributes that can be added to an element in the output XML document - * as a group. This message is reported if the name specified was not - * used to declare an attribute set. The substitution text is the name - * that is in error. - */ - {ErrorMsg.ATTRIBSET_UNDEF_ERR, - "Tentative d''utilisation de l''ensemble d''attributs non existant ''{0}''."}, - - /* - * Note to translators: The term "attribute value template" is a term - * defined by XSLT which describes the value of an attribute that is - * determined by an XPath expression. The message indicates that the - * expression was syntactically incorrect; the substitution text - * contains the expression that was in error. - */ - {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, - "Impossible d''analyser le mod\u00E8le de valeur d''attribut ''{0}''."}, - - /* - * Note to translators: ??? - */ - {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, - "Type de donn\u00E9es inconnu dans la signature pour la classe ''{0}''."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of - * type {0}. - */ - {ErrorMsg.DATA_CONVERSION_ERR, - "Impossible de convertir le type de donn\u00E9es ''{0}'' en ''{1}''."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_TRANSLET_CLASS_ERR, - "Cette classe Templates ne contient pas de d\u00E9finition de classe de translet valide."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_MAIN_TRANSLET_ERR, - "Cette classe Termplates ne contient pas de classe portant le nom ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSLET_CLASS_ERR, - "Impossible de charger la classe de translet ''{0}''."}, - - {ErrorMsg.TRANSLET_OBJECT_ERR, - "Classe de translet charg\u00E9e, mais impossible de cr\u00E9er une instance de translet."}, - - /* - * Note to translators: "ErrorListener" is a Java interface name that - * should not be translated. The message indicates that the user tried - * to set an ErrorListener object on object of the class named in the - * substitution text with "null" Java value. - */ - {ErrorMsg.ERROR_LISTENER_NULL_ERR, - "Tentative de d\u00E9finition d''ErrorListener sur NULL pour ''{0}''"}, - - /* - * Note to translators: StreamSource, SAXSource and DOMSource are Java - * interface names that should not be translated. - */ - {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, - "Seuls StreamSource, SAXSource et DOMSource sont pris en charge par XSLTC"}, - - /* - * Note to translators: "Source" is a Java class name that should not - * be translated. The substitution text is the name of Java method. - */ - {ErrorMsg.JAXP_NO_SOURCE_ERR, - "L''objet Source transmis \u00E0 ''{0}'' n''a pas de contenu."}, - - /* - * Note to translators: The message indicates that XSLTC failed to - * compile the stylesheet into a translet (class file). - */ - {ErrorMsg.JAXP_COMPILE_ERR, - "Impossible de compiler la feuille de style"}, - - /* - * Note to translators: "TransformerFactory" is a class name. In this - * context, an attribute is a property or setting of the - * TransformerFactory object. The substitution text is the name of the - * unrecognised attribute. The method used to retrieve the attribute is - * "getAttribute", so it's not clear whether it would be best to - * translate the term "attribute". - */ - {ErrorMsg.JAXP_INVALID_ATTR_ERR, - "TransformerFactory ne reconna\u00EEt pas l''attribut ''{0}''."}, - - {ErrorMsg.JAXP_INVALID_ATTR_VALUE_ERR, - "La valeur indiqu\u00E9e pour l''attribut ''{0}'' est incorrecte."}, - - /* - * Note to translators: "setResult()" and "startDocument()" are Java - * method names that should not be translated. - */ - {ErrorMsg.JAXP_SET_RESULT_ERR, - "setResult() doit \u00EAtre appel\u00E9 avant startDocument()."}, - - /* - * Note to translators: "Transformer" is a Java interface name that - * should not be translated. A Transformer object should contained a - * reference to a translet object in order to be used for - * transformations; this message is produced if that requirement is not - * met. - */ - {ErrorMsg.JAXP_NO_TRANSLET_ERR, - "La classe Transformer ne contient pas d'objet translet encapsul\u00E9."}, - - /* - * Note to translators: The XML document that results from a - * transformation needs to be sent to an output handler object; this - * message is produced if that requirement is not met. - */ - {ErrorMsg.JAXP_NO_HANDLER_ERR, - "Aucun gestionnaire de sortie d\u00E9fini pour le r\u00E9sultat de la transformation."}, - - /* - * Note to translators: "Result" is a Java interface name in this - * context. The substitution text is a method name. - */ - {ErrorMsg.JAXP_NO_RESULT_ERR, - "L''objet de r\u00E9sultat transmis \u00E0 ''{0}'' n''est pas valide."}, - - /* - * Note to translators: "Transformer" is a Java interface name. The - * user's program attempted to access an unrecognized property with the - * name specified in the substitution text. The method used to retrieve - * the property is "getOutputProperty", so it's not clear whether it - * would be best to translate the term "property". - */ - {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, - "Tentative d''acc\u00E8s \u00E0 la propri\u00E9t\u00E9 Transformer non valide ''{0}''."}, - - /* - * Note to translators: SAX2DOM is the name of a Java class that should - * not be translated. This is an adapter in the sense that it takes a - * DOM object and converts it to something that uses the SAX API. - */ - {ErrorMsg.SAX2DOM_ADAPTER_ERR, - "Impossible de cr\u00E9er l''adaptateur SAX2DOM : ''{0}''."}, - - /* - * Note to translators: "XSLTCSource.build()" is a Java method name. - * "systemId" is an XML term that is short for "system identification". - */ - {ErrorMsg.XSLTC_SOURCE_ERR, - "XSLTCSource.build() appel\u00E9 sans que l'ID syst\u00E8me soit d\u00E9fini."}, - - { ErrorMsg.ER_RESULT_NULL, - "Le r\u00E9sultat ne doit pas \u00EAtre NULL"}, - - /* - * Note to translators: This message indicates that the value argument - * of setParameter must be a valid Java Object. - */ - {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, - "La valeur du param\u00E8tre {0} doit \u00EAtre un objet Java valide"}, - - - {ErrorMsg.COMPILE_STDIN_ERR, - "L'option -i doit \u00EAtre utilis\u00E9e avec l'option -o."}, - - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java package, so - * it should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.COMPILE_USAGE_STR, - "SYNTAXE\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o ]\n [-d ] [-j ] [-p ]\n [-n] [-x] [-u] [-v] [-h] { | -i }\n\nOPTIONS\n -o attribue le nom au\n translet g\u00E9n\u00E9r\u00E9. Par d\u00E9faut, le nom du translet est\n d\u00E9riv\u00E9 du nom . Cette option\n n'est pas prise en compte lors de la compilation de plusieurs feuilles de style.\n -d indique un r\u00E9pertoire de destination pour le translet\n -j package les classes de translet dans un fichier JAR portant le\n nom sp\u00E9cifi\u00E9 comme \n -p indique un pr\u00E9fixe de nom de package pour toutes les\n classes de translet g\u00E9n\u00E9r\u00E9es.\n -n active le mode INLINE du mod\u00E8le (comportement par d\u00E9faut am\u00E9lior\u00E9\n en moyenne).\n -x active la sortie de messages de d\u00E9bogage suppl\u00E9mentaires\n -u interpr\u00E8te les arguments comme des URL\n -i force le compilateur \u00E0 lire la feuille de style \u00E0 partir de STDIN\n -v affiche la version du compilateur\n -h affiche cette instruction de syntaxe\n"}, - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java class, so it - * should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.TRANSFORM_USAGE_STR, - "SYNTAXE \n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j ]\n [-x] [-n ] {-u | }\n [= ...]\n\n utilise le translet pour transformer un document XML\n sp\u00E9cifi\u00E9 comme . Le translet est soit dans\n la variable d'environnement CLASSPATH de l'utilisateur, soit dans un fichier indiqu\u00E9 en option.\nOPTIONS\n -j indique un fichier JAR \u00E0 partir duquel charger le translet\n -x active la sortie de messages de d\u00E9bogage suppl\u00E9mentaires\n -n ex\u00E9cute la transformation fois et\n affiche les informations de profilage\n -u sp\u00E9cifie le document d'entr\u00E9e XML comme URL\n"}, - - - - /* - * Note to translators: "", "" and - * "" are keywords that should not be translated. - * The message indicates that an xsl:sort element must be a child of - * one of the other kinds of elements mentioned. - */ - {ErrorMsg.STRAY_SORT_ERR, - " peut uniquement \u00EAtre utilis\u00E9 dans ou ."}, - - /* - * Note to translators: The message indicates that the encoding - * requested for the output document was on that requires support that - * is not available from the Java Virtual Machine being used to execute - * the program. - */ - {ErrorMsg.UNSUPPORTED_ENCODING, - "L''encodage de sortie ''{0}'' n''est pas pris en charge sur cette Java Virtual Machine (JVM)."}, - - /* - * Note to translators: The message indicates that the XPath expression - * named in the substitution text was not well formed syntactically. - */ - {ErrorMsg.SYNTAX_ERR, - "Erreur de syntaxe dans ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a Java - * class. The term "constructor" here is the Java term. The message is - * displayed if XSLTC could not find a constructor for the specified - * class. - */ - {ErrorMsg.CONSTRUCTOR_NOT_FOUND, - "Constructeur ''{0}'' externe introuvable."}, - - /* - * Note to translators: "static" is the Java keyword. The substitution - * text is the name of a function. The first argument of that function - * is not of the required type. - */ - {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, - "Le premier argument pour la fonction Java ''{0}'' non static n''est pas une r\u00E9f\u00E9rence d''objet valide."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. The substitution text is the - * expression that was in error. - */ - {ErrorMsg.TYPE_CHECK_ERR, - "Erreur lors de la v\u00E9rification du type de l''expression ''{0}''."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. However, the location of the - * problematic expression is unknown. - */ - {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, - "Erreur lors de la v\u00E9rification du type d'expression \u00E0 un emplacement inconnu."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option that was not recognized. - */ - {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, - "L''option de ligne de commande ''{0}'' n''est pas valide."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option. - */ - {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, - "Argument obligatoire manquant dans l''option de ligne de commande ''{0}''."}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, - "WARNING: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.WARNING_MSG, - "WARNING: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, - "FATAL ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.FATAL_ERR_MSG, - "FATAL ERROR: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, - "ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.ERROR_MSG, - "ERROR: ''{0}''"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, - "Transformation \u00E0 l''aide du translet ''{0}'' "}, - - /* - * Note to translators: The first substitution is the name of a class, - * while the second substitution is the name of a jar file. - */ - {ErrorMsg.TRANSFORM_WITH_JAR_STR, - "Transformation \u00E0 l''aide du translet ''{0}'' dans le fichier JAR ''{1}''"}, - - /* - * Note to translators: "TransformerFactory" is the name of a Java - * interface and must not be translated. The substitution text is - * the name of the class that could not be instantiated. - */ - {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, - "Impossible de cr\u00E9er une instance de la classe TransformerFactory ''{0}''."}, - - /* - * Note to translators: This message is produced when the user - * specified a name for the translet class that contains characters - * that are not permitted in a Java class name. The substitution - * text "{0}" specifies the name the user requested, while "{1}" - * specifies the name the processor used instead. - */ - {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT, - "Impossible d''utiliser le nom ''{0}'' comme nom de classe de translet car il contient des caract\u00E8res non autoris\u00E9s dans le nom de la classe Java. Le nom ''{1}'' a \u00E9t\u00E9 utilis\u00E9 \u00E0 la place."}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages are collected together and displayed beneath - * this message. - */ - {ErrorMsg.COMPILER_ERROR_KEY, - "Erreurs de compilateur :"}, - - /* - * Note to translators: The following message is used as a header. - * All the warning messages are collected together and displayed - * beneath this message. - */ - {ErrorMsg.COMPILER_WARNING_KEY, - "Avertissements de compilateur :"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages that are produced when the stylesheet is - * applied to an input document are collected together and displayed - * beneath this message. A 'translet' is the compiled form of a - * stylesheet (see above). - */ - {ErrorMsg.RUNTIME_ERROR_KEY, - "Erreurs de translet :"}, - - /* - * Note to translators: An attribute whose value is constrained to - * be a "QName" or a list of "QNames" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_QNAME_ERR, - "Un attribut dont la valeur doit \u00EAtre un QName ou une liste de QNames s\u00E9par\u00E9s par des espaces avait la valeur ''{0}''"}, - - /* - * Note to translators: An attribute whose value is required to - * be an "NCName". - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_NCNAME_ERR, - "Un attribut dont la valeur doit \u00EAtre un NCName avait la valeur ''{0}''"}, - - /* - * Note to translators: An attribute with an incorrect value was - * encountered. The permitted value is one of the literal values - * "xml", "html" or "text"; it is also permitted to have the form of - * a QName that is not also an NCName. The terms "method", - * "xsl:output", "xml", "html" and "text" are keywords that must not - * be translated. The term "qname-but-not-ncname" is an XML syntactic - * term. The substitution text contains the actual value of the - * attribute. - */ - {ErrorMsg.INVALID_METHOD_IN_OUTPUT, - "L''attribut \"method\" d''un \u00E9l\u00E9ment avait la valeur ''{0}''. La valeur doit \u00EAtre l''une des suivantes : ''xml'', ''html'', ''text'' ou qname-but-not-ncname"}, - - {ErrorMsg.JAXP_GET_FEATURE_NULL_NAME, - "Le nom de la fonctionnalit\u00E9 ne peut pas \u00EAtre NULL dans TransformerFactory.getFeature (cha\u00EEne pour le nom)."}, - - {ErrorMsg.JAXP_SET_FEATURE_NULL_NAME, - "Le nom de la fonctionnalit\u00E9 ne peut pas \u00EAtre NULL dans TransformerFactory.setFeature (cha\u00EEne pour le nom, valeur bool\u00E9enne)."}, - - {ErrorMsg.JAXP_UNSUPPORTED_FEATURE, - "Impossible de d\u00E9finir la fonctionnalit\u00E9 ''{0}'' sur cette propri\u00E9t\u00E9 TransformerFactory."}, - - {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING : impossible de d\u00E9finir la fonctionnalit\u00E9 sur False en pr\u00E9sence du gestionnaire de s\u00E9curit\u00E9."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method, and "try-catch-finally block" - * refers to the Java keywords with those names. "Outlined" is a - * technical term internal to XSLTC and should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_TRY_CATCH, - "Erreur XSLTC interne : le code ex\u00E9cutable g\u00E9n\u00E9r\u00E9 contient un bloc try-catch-finally et ne peut pas \u00EAtre d\u00E9limit\u00E9."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The terms "OutlineableChunkStart" and - * "OutlineableChunkEnd" are the names of classes internal to XSLTC and - * should not be translated. The message indicates that for every - * "start" there must be a corresponding "end", and vice versa, and - * that if one of a pair of "start" and "end" appears between another - * pair of corresponding "start" and "end", then the other half of the - * pair must also be between that same enclosing pair. - */ - {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS, - "Erreur XSLTC interne : les marqueurs OutlineableChunkStart et OutlineableChunkEnd doivent \u00EAtre \u00E9quilibr\u00E9s et correctement imbriqu\u00E9s."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method. The "method" that is being - * referred to is a Java method in a translet that XSLTC is generating - * in processing a stylesheet. The "instruction" that is being - * referred to is one of the instrutions in the Java byte code in that - * method. "Outlined" is a technical term internal to XSLTC and - * should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_DELETED_TARGET, - "Erreur XSLTC interne : une instruction ayant fait partie d'un bloc de code ex\u00E9cutable d\u00E9limit\u00E9 est toujours r\u00E9f\u00E9renc\u00E9e dans la m\u00E9thode d'origine." - }, - - - /* - * Note to translators: This message describes an internal error in the - * processor. The "method" that is being referred to is a Java method - * in a translet that XSLTC is generating. - * - */ - {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG, - "Erreur XSLTC interne : une m\u00E9thode dans le translet d\u00E9passe la limite de la JVM concernant la longueur d'une m\u00E9thode de 64 kilo-octets. En g\u00E9n\u00E9ral, ceci est d\u00FB \u00E0 de tr\u00E8s grands mod\u00E8les dans une feuille de style. Essayez de restructurer la feuille de style pour utiliser des mod\u00E8les plus petits." - }, - - }; - - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java deleted file mode 100644 index a5c9e0dc348..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java +++ /dev/null @@ -1,986 +0,0 @@ -/* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.xsltc.compiler.util; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_it extends ListResourceBundle { - -/* - * XSLTC compile-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 5) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 6) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 7) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 8) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 9) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 10) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 11) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - {ErrorMsg.MULTIPLE_STYLESHEET_ERR, - "Sono stati definiti pi\u00F9 fogli di stile nello stesso file."}, - - /* - * Note to translators: The substitution text is the name of a - * template. The same name was used on two different templates in the - * same stylesheet. - */ - {ErrorMsg.TEMPLATE_REDEF_ERR, - "Il modello ''{0}'' \u00E8 gi\u00E0 stato definito in questo foglio di stile."}, - - - /* - * Note to translators: The substitution text is the name of a - * template. A reference to the template name was encountered, but the - * template is undefined. - */ - {ErrorMsg.TEMPLATE_UNDEF_ERR, - "Il modello ''{0}'' non \u00E8 stato definito in questo foglio di stile."}, - - /* - * Note to translators: The substitution text is the name of a variable - * that was defined more than once. - */ - {ErrorMsg.VARIABLE_REDEF_ERR, - "La variabile ''{0}'' \u00E8 stata definita pi\u00F9 volte nello stesso ambito."}, - - /* - * Note to translators: The substitution text is the name of a variable - * or parameter. A reference to the variable or parameter was found, - * but it was never defined. - */ - {ErrorMsg.VARIABLE_UNDEF_ERR, - "Variabile o parametro ''{0}'' non definito."}, - - /* - * Note to translators: The word "class" here refers to a Java class. - * Processing the stylesheet required a class to be loaded, but it could - * not be found. The substitution text is the name of the class. - */ - {ErrorMsg.CLASS_NOT_FOUND_ERR, - "Impossibile trovare la classe \"{0}\"."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but it could not be found. "public" is the - * Java keyword. - */ - {ErrorMsg.METHOD_NOT_FOUND_ERR, - "Impossibile trovare il metodo esterno ''{0}'' (deve essere pubblico)."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but no method with the required types of - * arguments or return type could be found. - */ - {ErrorMsg.ARGUMENT_CONVERSION_ERR, - "Impossibile convertire l''argomento o il tipo restituito in una chiamata per il metodo ''{0}''"}, - - /* - * Note to translators: The file or URI named in the substitution text - * is missing. - */ - {ErrorMsg.FILE_NOT_FOUND_ERR, - "File o URI ''{0}'' non trovato."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.INVALID_URI_ERR, - "URI ''{0}'' non valido."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.CATALOG_EXCEPTION, - "JAXP08090001: il CatalogResolver \u00E8 abilitato con il catalogo \"{0}\", ma viene restituita una CatalogException."}, - - /* - * Note to translators: The file or URI named in the substitution text - * exists but could not be opened. - */ - {ErrorMsg.FILE_ACCESS_ERR, - "Impossibile aprire il file o l''URI ''{0}''."}, - - /* - * Note to translators: and are - * keywords that should not be translated. - */ - {ErrorMsg.MISSING_ROOT_ERR, - "\u00C8 previsto un elemento o ."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ErrorMsg.NAMESPACE_UNDEF_ERR, - "Prefisso spazio di nomi ''{0}'' non dichiarato."}, - - /* - * Note to translators: The Java function named in the stylesheet could - * not be found. - */ - {ErrorMsg.FUNCTION_RESOLVE_ERR, - "Impossibile risolvere la chiamata per la funzione ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a - * function. A literal string here means a constant string value. - */ - {ErrorMsg.NEED_LITERAL_ERR, - "L''argomento per ''{0}'' deve essere una stringa di valori."}, - - /* - * Note to translators: This message indicates there was a syntactic - * error in the form of an XPath expression. The substitution text is - * the expression. - */ - {ErrorMsg.XPATH_PARSER_ERR, - "Errore durante l''analisi dell''espressione XPath ''{0}''."}, - - /* - * Note to translators: An element in the stylesheet requires a - * particular attribute named by the substitution text, but that - * attribute was not specified in the stylesheet. - */ - {ErrorMsg.REQUIRED_ATTR_ERR, - "Attributo obbligatorio ''{0}'' mancante."}, - - /* - * Note to translators: This message indicates that a character not - * permitted in an XPath expression was encountered. The substitution - * text is the offending character. - */ - {ErrorMsg.ILLEGAL_CHAR_ERR, - "Carattere ''{0}'' non valido nell''espressione XPath."}, - - /* - * Note to translators: A processing instruction is a mark-up item in - * an XML document that request some behaviour of an XML processor. The - * form of the name of was invalid in this case, and the substitution - * text is the name. - */ - {ErrorMsg.ILLEGAL_PI_ERR, - "Nome ''{0}'' non valido per l''istruzione di elaborazione."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ErrorMsg.STRAY_ATTRIBUTE_ERR, - "Attributo ''{0}'' al di fuori dell''elemento."}, - - /* - * Note to translators: An attribute that wasn't recognized was - * specified on an element in the stylesheet. The attribute is named - * by the substitution - * text. - */ - {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "Attributo ''{0}'' non valido."}, - - /* - * Note to translators: "import" and "include" are keywords that should - * not be translated. This messages indicates that the stylesheet - * named in the substitution text imported or included itself either - * directly or indirectly. - */ - {ErrorMsg.CIRCULAR_INCLUDE_ERR, - "Importazione/inclusione circolare. Il foglio di stile ''{0}'' \u00E8 gi\u00E0 stato caricato."}, - - /* - * Note to translators: "xsl:import" and "xsl:include" are keywords that - * should not be translated. - */ - {ErrorMsg.IMPORT_PRECEDE_OTHERS_ERR, - "Gli elementi figlio dell'elemento xsl:import devono precedere tutti gli elementi figlio di xsl:stylesheet, inclusi eventuali elementi figlio di xsl:include."}, - - /* - * Note to translators: A result-tree fragment is a portion of a - * resulting XML document represented as a tree. "" is a - * keyword and should not be translated. - */ - {ErrorMsg.RESULT_TREE_SORT_ERR, - "Impossibile ordinare i frammenti della struttura di risultati (gli elementi verranno ignorati). \u00C8 necessario ordinare i nodi quando si crea la struttura di risultati."}, - - /* - * Note to translators: A name can be given to a particular style to be - * used to format decimal values. The substitution text gives the name - * of such a style for which more than one declaration was encountered. - */ - {ErrorMsg.SYMBOLS_REDEF_ERR, - "Formattazione decimale ''{0}'' gi\u00E0 definita."}, - - /* - * Note to translators: The stylesheet version named in the - * substitution text is not supported. - */ - {ErrorMsg.XSL_VERSION_ERR, - "La versione XSL ''{0}'' non \u00E8 supportata da XSLTC."}, - - /* - * Note to translators: The definitions of one or more variables or - * parameters depend on one another. - */ - {ErrorMsg.CIRCULAR_VARIABLE_ERR, - "Riferimento di variabile/parametro circolare in ''{0}''."}, - - /* - * Note to translators: The operator in an expresion with two operands was - * not recognized. - */ - {ErrorMsg.ILLEGAL_BINARY_OP_ERR, - "Operatore sconosciuto per l'espressione binaria."}, - - /* - * Note to translators: This message is produced if a reference to a - * function has too many or too few arguments. - */ - {ErrorMsg.ILLEGAL_ARG_ERR, - "Uno o pi\u00F9 argomenti non validi per la chiamata della funzione."}, - - /* - * Note to translators: "document()" is the name of function and must - * not be translated. A node-set is a set of the nodes in the tree - * representation of an XML document. - */ - {ErrorMsg.DOCUMENT_ARG_ERR, - "Il secondo argomento per la funzione document() deve essere un set di nodi."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.MISSING_WHEN_ERR, - "\u00C8 richiesto almeno un elemento in ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.MULTIPLE_OTHERWISE_ERR, - "\u00C8 consentito un solo elemento in ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.STRAY_OTHERWISE_ERR, - " pu\u00F2 essere utilizzato sono in ."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.STRAY_WHEN_ERR, - " pu\u00F2 essere utilizzato sono in ."}, - - /* - * Note to translators: "", "" and - * "" are keywords and should not be translated. This - * message describes a syntax error in the stylesheet. - */ - {ErrorMsg.WHEN_ELEMENT_ERR, - "Sono consentiti solo elementi e in ."}, - - /* - * Note to translators: "" and "name" are keywords - * that should not be translated. - */ - {ErrorMsg.UNNAMED_ATTRIBSET_ERR, - " mancante nell'attributo 'name'."}, - - /* - * Note to translators: An element in the stylesheet contained an - * element of a type that it was not permitted to contain. - */ - {ErrorMsg.ILLEGAL_CHILD_ERR, - "Elemento figlio non valido."}, - - /* - * Note to translators: The stylesheet tried to create an element with - * a name that was not a valid XML name. The substitution text contains - * the name. - */ - {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, - "Impossibile richiamare un elemento ''{0}''"}, - - /* - * Note to translators: The stylesheet tried to create an attribute - * with a name that was not a valid XML name. The substitution text - * contains the name. - */ - {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, - "Impossibile richiamare un attributo ''{0}''"}, - - /* - * Note to translators: The children of the outermost element of a - * stylesheet are referred to as top-level elements. No text should - * occur within that outermost element unless it is within a top-level - * element. This message indicates that that constraint was violated. - * "" is a keyword that should not be translated. - */ - {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, - "I dati di testo non rientrano nell'elemento di livello superiore."}, - - /* - * Note to translators: JAXP is an acronym for the Java API for XML - * Processing. This message indicates that the XML parser provided to - * XSLTC to process the XML input document had a configuration problem. - */ - {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "Parser JAXP non configurato correttamente"}, - - /* - * Note to translators: The substitution text names the internal error - * encountered. - */ - {ErrorMsg.INTERNAL_ERR, - "Errore interno XSLTC irreversibile: ''{0}''"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {ErrorMsg.UNSUPPORTED_XSL_ERR, - "Elemento XSL \"{0}\" non supportato."}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does - * not recognized the particular extension named. The substitution text - * gives the extension name. - */ - {ErrorMsg.UNSUPPORTED_EXT_ERR, - "Estensione XSLTC ''{0}'' non riconosciuta."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. XSLTC is able to detect that in this - * case because the outermost element in the stylesheet has to be - * declared with respect to the XSL namespace URI, but no declaration - * for that namespace was seen. - */ - {ErrorMsg.MISSING_XSLT_URI_ERR, - "Il documento di input non \u00E8 un foglio di stile (spazio di nomi XSL non dichiarato nell'elemento radice)."}, - - /* - * Note to translators: XSLTC could not find the stylesheet document - * with the name specified by the substitution text. - */ - {ErrorMsg.MISSING_XSLT_TARGET_ERR, - "Impossibile trovare la destinazione ''{0}'' del foglio di stile."}, - - /* - * Note to translators: access to the stylesheet target is denied - */ - {ErrorMsg.ACCESSING_XSLT_TARGET_ERR, - "Impossibile leggere la destinazione del foglio di stile ''{0}''. Accesso ''{1}'' non consentito a causa della limitazione definita dalla propriet\u00E0 accessExternalStylesheet."}, - - /* - * Note to translators: This message represents an internal error in - * condition in XSLTC. The substitution text is the class name in XSLTC - * that is missing some functionality. - */ - {ErrorMsg.NOT_IMPLEMENTED_ERR, - "Non implementato: ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. - */ - {ErrorMsg.NOT_STYLESHEET_ERR, - "Il documento di input non contiene un foglio di stile XSL."}, - - /* - * Note to translators: The element named in the substitution text was - * encountered in the stylesheet but is not recognized. - */ - {ErrorMsg.ELEMENT_PARSE_ERR, - "Impossibile analizzare l''elemento ''{0}''"}, - - /* - * Note to translators: "use", "", "node", "node-set", "string" - * and "number" are keywords in this context and should not be - * translated. This message indicates that the value of the "use" - * attribute was not one of the permitted values. - */ - {ErrorMsg.KEY_USE_ATTR_ERR, - "L'attributo di uso deve essere un nodo, un set di nodi, una stringa o un numero."}, - - /* - * Note to translators: An XML document can specify the version of the - * XML specification to which it adheres. This message indicates that - * the version specified for the output document was not valid. - */ - {ErrorMsg.OUTPUT_VERSION_ERR, - "La versione del documento XML di output deve essere 1.0"}, - - /* - * Note to translators: The operator in a comparison operation was - * not recognized. - */ - {ErrorMsg.ILLEGAL_RELAT_OP_ERR, - "Operatore sconosciuto per l'espressione relazionale"}, - - /* - * Note to translators: An attribute set defines as a set of XML - * attributes that can be added to an element in the output XML document - * as a group. This message is reported if the name specified was not - * used to declare an attribute set. The substitution text is the name - * that is in error. - */ - {ErrorMsg.ATTRIBSET_UNDEF_ERR, - "Tentativo di utilizzare un set di attributi ''{0}'' inesistente."}, - - /* - * Note to translators: The term "attribute value template" is a term - * defined by XSLT which describes the value of an attribute that is - * determined by an XPath expression. The message indicates that the - * expression was syntactically incorrect; the substitution text - * contains the expression that was in error. - */ - {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, - "Impossibile analizzare il modello di valore di attributo ''{0}''."}, - - /* - * Note to translators: ??? - */ - {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, - "Tipo di dati sconosciuto nella firma per la classe ''{0}''."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of - * type {0}. - */ - {ErrorMsg.DATA_CONVERSION_ERR, - "Impossibile convertire il tipo di dati ''{0}'' in ''{1}''."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_TRANSLET_CLASS_ERR, - "Il modello non contiene una definizione di classe di translet valida."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_MAIN_TRANSLET_ERR, - "Il modello non contiene una classe denominata ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSLET_CLASS_ERR, - "Impossibile caricare la classe di translet ''{0}''."}, - - {ErrorMsg.TRANSLET_OBJECT_ERR, - "La classe di translet \u00E8 stata caricata, ma non \u00E8 possibile creare l'istanza del translet."}, - - /* - * Note to translators: "ErrorListener" is a Java interface name that - * should not be translated. The message indicates that the user tried - * to set an ErrorListener object on object of the class named in the - * substitution text with "null" Java value. - */ - {ErrorMsg.ERROR_LISTENER_NULL_ERR, - "Tentativo di impostare ErrorListener per ''{0}'' su null"}, - - /* - * Note to translators: StreamSource, SAXSource and DOMSource are Java - * interface names that should not be translated. - */ - {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, - "XSLTC supporta solo StreamSource, SAXSource e DOMSource."}, - - /* - * Note to translators: "Source" is a Java class name that should not - * be translated. The substitution text is the name of Java method. - */ - {ErrorMsg.JAXP_NO_SOURCE_ERR, - "L''oggetto di origine passato a ''{0}'' non ha contenuti."}, - - /* - * Note to translators: The message indicates that XSLTC failed to - * compile the stylesheet into a translet (class file). - */ - {ErrorMsg.JAXP_COMPILE_ERR, - "Impossibile compilare il foglio di stile"}, - - /* - * Note to translators: "TransformerFactory" is a class name. In this - * context, an attribute is a property or setting of the - * TransformerFactory object. The substitution text is the name of the - * unrecognised attribute. The method used to retrieve the attribute is - * "getAttribute", so it's not clear whether it would be best to - * translate the term "attribute". - */ - {ErrorMsg.JAXP_INVALID_ATTR_ERR, - "TransformerFactory non riconosce l''attributo ''{0}''."}, - - {ErrorMsg.JAXP_INVALID_ATTR_VALUE_ERR, - "Valore errato specificato per l''attributo ''{0}''."}, - - /* - * Note to translators: "setResult()" and "startDocument()" are Java - * method names that should not be translated. - */ - {ErrorMsg.JAXP_SET_RESULT_ERR, - "setResult() deve essere richiamato prima di startDocument()."}, - - /* - * Note to translators: "Transformer" is a Java interface name that - * should not be translated. A Transformer object should contained a - * reference to a translet object in order to be used for - * transformations; this message is produced if that requirement is not - * met. - */ - {ErrorMsg.JAXP_NO_TRANSLET_ERR, - "Il trasformatore non contiene alcun oggetto incapsulato."}, - - /* - * Note to translators: The XML document that results from a - * transformation needs to be sent to an output handler object; this - * message is produced if that requirement is not met. - */ - {ErrorMsg.JAXP_NO_HANDLER_ERR, - "Nessun handler di output definito per il risultato della trasformazione."}, - - /* - * Note to translators: "Result" is a Java interface name in this - * context. The substitution text is a method name. - */ - {ErrorMsg.JAXP_NO_RESULT_ERR, - "L''oggetto di risultato passato a ''{0}'' non \u00E8 valido."}, - - /* - * Note to translators: "Transformer" is a Java interface name. The - * user's program attempted to access an unrecognized property with the - * name specified in the substitution text. The method used to retrieve - * the property is "getOutputProperty", so it's not clear whether it - * would be best to translate the term "property". - */ - {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, - "Tentativo di accedere a una propriet\u00E0 ''{0}'' del trasformatore non valida."}, - - /* - * Note to translators: SAX2DOM is the name of a Java class that should - * not be translated. This is an adapter in the sense that it takes a - * DOM object and converts it to something that uses the SAX API. - */ - {ErrorMsg.SAX2DOM_ADAPTER_ERR, - "Impossibile creare l''adattatore SAX2DOM ''{0}''."}, - - /* - * Note to translators: "XSLTCSource.build()" is a Java method name. - * "systemId" is an XML term that is short for "system identification". - */ - {ErrorMsg.XSLTC_SOURCE_ERR, - "XSLTCSource.build() richiamato senza che sia stato impostato systemId."}, - - { ErrorMsg.ER_RESULT_NULL, - "Il risultato non deve essere nullo"}, - - /* - * Note to translators: This message indicates that the value argument - * of setParameter must be a valid Java Object. - */ - {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, - "Il valore del parametro {0} deve essere un oggetto Java valido"}, - - - {ErrorMsg.COMPILE_STDIN_ERR, - "L'opzione -i deve essere utilizzata con l'opzione -o."}, - - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java package, so - * it should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.COMPILE_USAGE_STR, - "RIEPILOGO\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o ]\n [-d ] [-j ] [-p ]\n [-n] [-x] [-u] [-v] [-h] { | -i }\n\nOPZIONI\n -o assegna l' del nome al translet\n generato. Per impostazione predefinita, il nome translet\n \u00E8 derivato dal nome . Questa opzione\n viene ignorata se si compilano pi\u00F9 fogli di stile.\n -d specifica una directory di destinazione per il translet\n -j crea un package di classi di translet inserendolo in un file JAR con il\n nome specificato come \n -p specifica un prefisso di nome package per tutte le\n classi di translet generate.\n -n abilita l'inserimento in linea dei modelli (in media, l'impostazione predefinita \u00E8\n la migliore).\n -x attiva l'output di altri messaggi di debug\n -u interpreta gli argomenti come URL\n -i obbliga il compilatore a leggere il foglio di stile da stdin\n -v visualizza la versione del compilatore\n -h visualizza questa istruzione di uso\n"}, - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java class, so it - * should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.TRANSFORM_USAGE_STR, - "RIPEILOGO\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j ]\n [-x] [-n ] {-u | }\n [= ...]\n\n utilizza la translet per trasformare un documento XML\n specificato come . La di translet si trova nel\n CLASSPATH dell'utente o nel specificato facoltativamente.\\OPZIONI\n -j specifica un file JAR dal quale caricare il translet\n -x attiva l'output di altri messaggi di debug\n -n esegue le di trasformazione e\n visualizza le informazioni sui profili\n -u specifica il documento di input XML come URL\n"}, - - - - /* - * Note to translators: "", "" and - * "" are keywords that should not be translated. - * The message indicates that an xsl:sort element must be a child of - * one of the other kinds of elements mentioned. - */ - {ErrorMsg.STRAY_SORT_ERR, - " pu\u00F2 essere utilizzato sono in o ."}, - - /* - * Note to translators: The message indicates that the encoding - * requested for the output document was on that requires support that - * is not available from the Java Virtual Machine being used to execute - * the program. - */ - {ErrorMsg.UNSUPPORTED_ENCODING, - "La codifica di output ''{0}'' non \u00E8 supportata in questa JVM."}, - - /* - * Note to translators: The message indicates that the XPath expression - * named in the substitution text was not well formed syntactically. - */ - {ErrorMsg.SYNTAX_ERR, - "Errore di sintassi in ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a Java - * class. The term "constructor" here is the Java term. The message is - * displayed if XSLTC could not find a constructor for the specified - * class. - */ - {ErrorMsg.CONSTRUCTOR_NOT_FOUND, - "Impossibile trovare il costruttore esterno ''{0}''."}, - - /* - * Note to translators: "static" is the Java keyword. The substitution - * text is the name of a function. The first argument of that function - * is not of the required type. - */ - {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, - "Il primo argomento per la funzione Java non statica ''{0}'' non \u00E8 un riferimento di oggetto valido."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. The substitution text is the - * expression that was in error. - */ - {ErrorMsg.TYPE_CHECK_ERR, - "Errore durante il controllo del tipo dell''espressione ''{0}''."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. However, the location of the - * problematic expression is unknown. - */ - {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, - "Errore durante il controllo del tipo di un''espressione in una posizione sconosciuta."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option that was not recognized. - */ - {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, - "L''opzione di riga di comando ''{0}'' non \u00E8 valida."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option. - */ - {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, - "Nell''opzione di riga di comando ''{0}'' manca un argomento obbligatorio."}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, - "WARNING: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.WARNING_MSG, - "WARNING: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, - "FATAL ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.FATAL_ERR_MSG, - "FATAL ERROR: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, - "ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.ERROR_MSG, - "ERROR: ''{0}''"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, - "Trasformazione mediante il translet ''{0}'' "}, - - /* - * Note to translators: The first substitution is the name of a class, - * while the second substitution is the name of a jar file. - */ - {ErrorMsg.TRANSFORM_WITH_JAR_STR, - "Trasformazione mediante il translet ''{0}'' del file jar ''{1}''"}, - - /* - * Note to translators: "TransformerFactory" is the name of a Java - * interface and must not be translated. The substitution text is - * the name of the class that could not be instantiated. - */ - {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, - "Impossibile creare un''istanza della classe TransformerFactory ''{0}''."}, - - /* - * Note to translators: This message is produced when the user - * specified a name for the translet class that contains characters - * that are not permitted in a Java class name. The substitution - * text "{0}" specifies the name the user requested, while "{1}" - * specifies the name the processor used instead. - */ - {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT, - "Impossibile utilizzare il nome ''{0}'' per la classe di translet poich\u00E9 contiene caratteri non consentiti nel nome della classe Java. Verr\u00E0 utilizzato il nome ''{1}''."}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages are collected together and displayed beneath - * this message. - */ - {ErrorMsg.COMPILER_ERROR_KEY, - "Errori del compilatore:"}, - - /* - * Note to translators: The following message is used as a header. - * All the warning messages are collected together and displayed - * beneath this message. - */ - {ErrorMsg.COMPILER_WARNING_KEY, - "Avvertenze del compilatore:"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages that are produced when the stylesheet is - * applied to an input document are collected together and displayed - * beneath this message. A 'translet' is the compiled form of a - * stylesheet (see above). - */ - {ErrorMsg.RUNTIME_ERROR_KEY, - "Errori del translet:"}, - - /* - * Note to translators: An attribute whose value is constrained to - * be a "QName" or a list of "QNames" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_QNAME_ERR, - "Un attributo il cui valore deve essere un QName o una lista separata da spazi di QName contiene il valore ''{0}''"}, - - /* - * Note to translators: An attribute whose value is required to - * be an "NCName". - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_NCNAME_ERR, - "Un attributo il cui valore deve essere un NCName contiene il valore ''{0}''"}, - - /* - * Note to translators: An attribute with an incorrect value was - * encountered. The permitted value is one of the literal values - * "xml", "html" or "text"; it is also permitted to have the form of - * a QName that is not also an NCName. The terms "method", - * "xsl:output", "xml", "html" and "text" are keywords that must not - * be translated. The term "qname-but-not-ncname" is an XML syntactic - * term. The substitution text contains the actual value of the - * attribute. - */ - {ErrorMsg.INVALID_METHOD_IN_OUTPUT, - "L''attributo di metodo per un elemento ha il valore ''{0}'', ma deve essere uno tra ''xml'', ''html'', ''text'' o qname-but-not-ncname"}, - - {ErrorMsg.JAXP_GET_FEATURE_NULL_NAME, - "Il nome funzione non pu\u00F2 essere nullo in TransformerFactory.getFeature (nome stringa)."}, - - {ErrorMsg.JAXP_SET_FEATURE_NULL_NAME, - "Il nome funzione non pu\u00F2 essere nullo in TransformerFactory.setFeature (nome stringa, valore booleano)."}, - - {ErrorMsg.JAXP_UNSUPPORTED_FEATURE, - "Impossibile impostare la funzione ''{0}'' in questo TransformerFactory."}, - - {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: impossibile impostare la funzione su false se \u00E8 presente Security Manager."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method, and "try-catch-finally block" - * refers to the Java keywords with those names. "Outlined" is a - * technical term internal to XSLTC and should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_TRY_CATCH, - "Errore XSLTC interno: il bytecode generato contiene un blocco try-catch-finally e non pu\u00F2 essere di tipo outlined."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The terms "OutlineableChunkStart" and - * "OutlineableChunkEnd" are the names of classes internal to XSLTC and - * should not be translated. The message indicates that for every - * "start" there must be a corresponding "end", and vice versa, and - * that if one of a pair of "start" and "end" appears between another - * pair of corresponding "start" and "end", then the other half of the - * pair must also be between that same enclosing pair. - */ - {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS, - "Errore XSLTC interno: gli indicatori OutlineableChunkStart e OutlineableChunkEnd devono essere bilanciati e nidificati correttamente."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method. The "method" that is being - * referred to is a Java method in a translet that XSLTC is generating - * in processing a stylesheet. The "instruction" that is being - * referred to is one of the instrutions in the Java byte code in that - * method. "Outlined" is a technical term internal to XSLTC and - * should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_DELETED_TARGET, - "Errore XSLTC interno: a un'istruzione che faceva parte di un blocco di bytecode di tipo outlined viene ancora fatto riferimento nel metodo originale." - }, - - - /* - * Note to translators: This message describes an internal error in the - * processor. The "method" that is being referred to is a Java method - * in a translet that XSLTC is generating. - * - */ - {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG, - "Errore XSLTC interno: un metodo nel translet supera la limitazione Java Virtual Machine relativa alla lunghezza per un metodo di 64 kilobyte. Ci\u00F2 \u00E8 generalmente causato dalle grandi dimensioni dei modelli in un foglio di stile. Provare a ristrutturare il foglio di stile per utilizzare modelli di dimensioni inferiori." - }, - - }; - - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java deleted file mode 100644 index 5128d65cadf..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java +++ /dev/null @@ -1,986 +0,0 @@ -/* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.xsltc.compiler.util; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_ko extends ListResourceBundle { - -/* - * XSLTC compile-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 5) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 6) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 7) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 8) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 9) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 10) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 11) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - {ErrorMsg.MULTIPLE_STYLESHEET_ERR, - "\uB3D9\uC77C\uD55C \uD30C\uC77C\uC5D0 \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uAC00 \uB450 \uAC1C \uC774\uC0C1 \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text is the name of a - * template. The same name was used on two different templates in the - * same stylesheet. - */ - {ErrorMsg.TEMPLATE_REDEF_ERR, - "\uC774 \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC5D0\uB294 ''{0}'' \uD15C\uD50C\uB9AC\uD2B8\uAC00 \uC774\uBBF8 \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - - /* - * Note to translators: The substitution text is the name of a - * template. A reference to the template name was encountered, but the - * template is undefined. - */ - {ErrorMsg.TEMPLATE_UNDEF_ERR, - "\uC774 \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC5D0\uB294 ''{0}'' \uD15C\uD50C\uB9AC\uD2B8\uAC00 \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text is the name of a variable - * that was defined more than once. - */ - {ErrorMsg.VARIABLE_REDEF_ERR, - "\uB3D9\uC77C\uD55C \uBC94\uC704\uC5D0\uC11C ''{0}'' \uBCC0\uC218\uAC00 \uC5EC\uB7EC \uAC1C \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text is the name of a variable - * or parameter. A reference to the variable or parameter was found, - * but it was never defined. - */ - {ErrorMsg.VARIABLE_UNDEF_ERR, - "\uBCC0\uC218 \uB610\uB294 \uB9E4\uAC1C\uBCC0\uC218 ''{0}''\uC774(\uAC00) \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The word "class" here refers to a Java class. - * Processing the stylesheet required a class to be loaded, but it could - * not be found. The substitution text is the name of the class. - */ - {ErrorMsg.CLASS_NOT_FOUND_ERR, - "''{0}'' \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but it could not be found. "public" is the - * Java keyword. - */ - {ErrorMsg.METHOD_NOT_FOUND_ERR, - "\uC678\uBD80 \uBA54\uC18C\uB4DC ''{0}''\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774 \uBA54\uC18C\uB4DC\uB294 public\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but no method with the required types of - * arguments or return type could be found. - */ - {ErrorMsg.ARGUMENT_CONVERSION_ERR, - "''{0}'' \uBA54\uC18C\uB4DC\uC5D0 \uB300\uD55C \uD638\uCD9C\uC5D0\uC11C \uC778\uC218/\uBC18\uD658 \uC720\uD615\uC744 \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The file or URI named in the substitution text - * is missing. - */ - {ErrorMsg.FILE_NOT_FOUND_ERR, - "\uD30C\uC77C \uB610\uB294 URI ''{0}''\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.INVALID_URI_ERR, - "URI ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.CATALOG_EXCEPTION, - "JAXP08090001: CatalogResolver\uAC00 \"{0}\" \uCE74\uD0C8\uB85C\uADF8\uC5D0 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB418\uC5C8\uC9C0\uB9CC CatalogException\uC774 \uBC18\uD658\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The file or URI named in the substitution text - * exists but could not be opened. - */ - {ErrorMsg.FILE_ACCESS_ERR, - "\uD30C\uC77C \uB610\uB294 URI ''{0}''\uC744(\uB97C) \uC5F4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: and are - * keywords that should not be translated. - */ - {ErrorMsg.MISSING_ROOT_ERR, - " \uB610\uB294 \uC694\uC18C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ErrorMsg.NAMESPACE_UNDEF_ERR, - "\uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4 ''{0}''\uC774(\uAC00) \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The Java function named in the stylesheet could - * not be found. - */ - {ErrorMsg.FUNCTION_RESOLVE_ERR, - "''{0}'' \uD568\uC218\uC5D0 \uB300\uD55C \uD638\uCD9C\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text is the name of a - * function. A literal string here means a constant string value. - */ - {ErrorMsg.NEED_LITERAL_ERR, - "''{0}''\uC5D0 \uB300\uD55C \uC778\uC218\uB294 \uB9AC\uD130\uB7F4 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: This message indicates there was a syntactic - * error in the form of an XPath expression. The substitution text is - * the expression. - */ - {ErrorMsg.XPATH_PARSER_ERR, - "XPath \uD45C\uD604\uC2DD ''{0}''\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: An element in the stylesheet requires a - * particular attribute named by the substitution text, but that - * attribute was not specified in the stylesheet. - */ - {ErrorMsg.REQUIRED_ATTR_ERR, - "\uD544\uC218 \uC18D\uC131 ''{0}''\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: This message indicates that a character not - * permitted in an XPath expression was encountered. The substitution - * text is the offending character. - */ - {ErrorMsg.ILLEGAL_CHAR_ERR, - "XPath \uD45C\uD604\uC2DD\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790 ''{0}''\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: A processing instruction is a mark-up item in - * an XML document that request some behaviour of an XML processor. The - * form of the name of was invalid in this case, and the substitution - * text is the name. - */ - {ErrorMsg.ILLEGAL_PI_ERR, - "''{0}''\uC740(\uB294) \uBA85\uB839 \uCC98\uB9AC\uC5D0 \uC798\uBABB\uB41C \uC774\uB984\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ErrorMsg.STRAY_ATTRIBUTE_ERR, - "''{0}'' \uC18D\uC131\uC774 \uC694\uC18C\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: An attribute that wasn't recognized was - * specified on an element in the stylesheet. The attribute is named - * by the substitution - * text. - */ - {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "''{0}''\uC740(\uB294) \uC798\uBABB\uB41C \uC18D\uC131\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: "import" and "include" are keywords that should - * not be translated. This messages indicates that the stylesheet - * named in the substitution text imported or included itself either - * directly or indirectly. - */ - {ErrorMsg.CIRCULAR_INCLUDE_ERR, - "\uC21C\uD658 import/include\uC785\uB2C8\uB2E4. ''{0}'' \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uAC00 \uC774\uBBF8 \uB85C\uB4DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "xsl:import" and "xsl:include" are keywords that - * should not be translated. - */ - {ErrorMsg.IMPORT_PRECEDE_OTHERS_ERR, - "xsl:import \uC694\uC18C \uD558\uC704\uB294 xsl:include \uC694\uC18C \uD558\uC704\uB97C \uD3EC\uD568\uD574 xsl:stylesheet \uC694\uC18C\uC758 \uBAA8\uB4E0 \uB2E4\uB978 \uC694\uC18C \uD558\uC704 \uC55E\uC5D0 \uC640\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: A result-tree fragment is a portion of a - * resulting XML document represented as a tree. "" is a - * keyword and should not be translated. - */ - {ErrorMsg.RESULT_TREE_SORT_ERR, - "Result-tree \uBD80\uBD84\uC744 \uC815\uB82C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4( \uC694\uC18C\uAC00 \uBB34\uC2DC\uB428). \uACB0\uACFC \uD2B8\uB9AC\uB97C \uC0DD\uC131\uD560 \uB54C\uB294 \uB178\uB4DC\uB97C \uC815\uB82C\uD574\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: A name can be given to a particular style to be - * used to format decimal values. The substitution text gives the name - * of such a style for which more than one declaration was encountered. - */ - {ErrorMsg.SYMBOLS_REDEF_ERR, - "\uC2ED\uC9C4\uC218 \uD615\uC2DD ''{0}''\uC774(\uAC00) \uC774\uBBF8 \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The stylesheet version named in the - * substitution text is not supported. - */ - {ErrorMsg.XSL_VERSION_ERR, - "XSLTC\uB294 XSL \uBC84\uC804 ''{0}''\uC744(\uB97C) \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The definitions of one or more variables or - * parameters depend on one another. - */ - {ErrorMsg.CIRCULAR_VARIABLE_ERR, - "''{0}''\uC5D0 \uC21C\uD658 \uBCC0\uC218/\uB9E4\uAC1C\uBCC0\uC218 \uCC38\uC870\uAC00 \uC788\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The operator in an expresion with two operands was - * not recognized. - */ - {ErrorMsg.ILLEGAL_BINARY_OP_ERR, - "\uBC14\uC774\uB108\uB9AC \uD45C\uD604\uC2DD\uC5D0 \uB300\uD574 \uC54C \uC218 \uC5C6\uB294 \uC5F0\uC0B0\uC790\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: This message is produced if a reference to a - * function has too many or too few arguments. - */ - {ErrorMsg.ILLEGAL_ARG_ERR, - "\uD568\uC218 \uD638\uCD9C\uC5D0 \uB300\uD55C \uC778\uC218\uAC00 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "document()" is the name of function and must - * not be translated. A node-set is a set of the nodes in the tree - * representation of an XML document. - */ - {ErrorMsg.DOCUMENT_ARG_ERR, - "document() \uD568\uC218\uC5D0 \uB300\uD55C \uB450\uBC88\uC9F8 \uC778\uC218\uB294 node-set\uC5EC\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.MISSING_WHEN_ERR, - "\uC5D0\uB294 \uC694\uC18C\uAC00 \uD558\uB098 \uC774\uC0C1 \uD544\uC694\uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.MULTIPLE_OTHERWISE_ERR, - "\uC5D0\uC11C\uB294 \uC694\uC18C\uAC00 \uD558\uB098\uB9CC \uD5C8\uC6A9\uB429\uB2C8\uB2E4."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.STRAY_OTHERWISE_ERR, - "\uB294 \uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.STRAY_WHEN_ERR, - "\uC740 \uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "", "" and - * "" are keywords and should not be translated. This - * message describes a syntax error in the stylesheet. - */ - {ErrorMsg.WHEN_ELEMENT_ERR, - "\uC5D0\uC11C\uB294 \uBC0F \uC694\uC18C\uB9CC \uD5C8\uC6A9\uB429\uB2C8\uB2E4."}, - - /* - * Note to translators: "" and "name" are keywords - * that should not be translated. - */ - {ErrorMsg.UNNAMED_ATTRIBSET_ERR, - "\uC5D0 'name' \uC18D\uC131\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: An element in the stylesheet contained an - * element of a type that it was not permitted to contain. - */ - {ErrorMsg.ILLEGAL_CHILD_ERR, - "\uD558\uC704 \uC694\uC18C\uAC00 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The stylesheet tried to create an element with - * a name that was not a valid XML name. The substitution text contains - * the name. - */ - {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, - "''{0}'' \uC694\uC18C\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The stylesheet tried to create an attribute - * with a name that was not a valid XML name. The substitution text - * contains the name. - */ - {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, - "''{0}'' \uC18D\uC131\uC744 \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The children of the outermost element of a - * stylesheet are referred to as top-level elements. No text should - * occur within that outermost element unless it is within a top-level - * element. This message indicates that that constraint was violated. - * "" is a keyword that should not be translated. - */ - {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, - "\uD14D\uC2A4\uD2B8 \uB370\uC774\uD130\uAC00 \uCD5C\uC0C1\uC704 \uB808\uBCA8 \uC694\uC18C\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: JAXP is an acronym for the Java API for XML - * Processing. This message indicates that the XML parser provided to - * XSLTC to process the XML input document had a configuration problem. - */ - {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "JAXP \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC81C\uB300\uB85C \uAD6C\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text names the internal error - * encountered. - */ - {ErrorMsg.INTERNAL_ERR, - "\uBCF5\uAD6C\uD560 \uC218 \uC5C6\uB294 XSLTC \uB0B4\uBD80 \uC624\uB958: ''{0}''"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {ErrorMsg.UNSUPPORTED_XSL_ERR, - "''{0}''\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 XSL \uC694\uC18C\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does - * not recognized the particular extension named. The substitution text - * gives the extension name. - */ - {ErrorMsg.UNSUPPORTED_EXT_ERR, - "''{0}''\uC740(\uB294) \uC54C \uC218 \uC5C6\uB294 XSLTC \uD655\uC7A5\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. XSLTC is able to detect that in this - * case because the outermost element in the stylesheet has to be - * declared with respect to the XSL namespace URI, but no declaration - * for that namespace was seen. - */ - {ErrorMsg.MISSING_XSLT_URI_ERR, - "\uC785\uB825 \uBB38\uC11C\uB294 \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4. XSL \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uB8E8\uD2B8 \uC694\uC18C\uC5D0 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: XSLTC could not find the stylesheet document - * with the name specified by the substitution text. - */ - {ErrorMsg.MISSING_XSLT_TARGET_ERR, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uB300\uC0C1 ''{0}''\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: access to the stylesheet target is denied - */ - {ErrorMsg.ACCESSING_XSLT_TARGET_ERR, - "accessExternalStylesheet \uC18D\uC131\uC73C\uB85C \uC124\uC815\uB41C \uC81C\uD55C\uC73C\uB85C \uC778\uD574 ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uB300\uC0C1 ''{0}''\uC744(\uB97C) \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: This message represents an internal error in - * condition in XSLTC. The substitution text is the class name in XSLTC - * that is missing some functionality. - */ - {ErrorMsg.NOT_IMPLEMENTED_ERR, - "\uAD6C\uD604\uB418\uC9C0 \uC54A\uC74C: ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. - */ - {ErrorMsg.NOT_STYLESHEET_ERR, - "\uC785\uB825 \uBB38\uC11C\uC5D0 XSL \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The element named in the substitution text was - * encountered in the stylesheet but is not recognized. - */ - {ErrorMsg.ELEMENT_PARSE_ERR, - "''{0}'' \uC694\uC18C\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "use", "", "node", "node-set", "string" - * and "number" are keywords in this context and should not be - * translated. This message indicates that the value of the "use" - * attribute was not one of the permitted values. - */ - {ErrorMsg.KEY_USE_ATTR_ERR, - "\uC758 use \uC18D\uC131\uC740 node, node-set, string \uB610\uB294 number\uC5EC\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: An XML document can specify the version of the - * XML specification to which it adheres. This message indicates that - * the version specified for the output document was not valid. - */ - {ErrorMsg.OUTPUT_VERSION_ERR, - "\uCD9C\uB825 XML \uBB38\uC11C \uBC84\uC804\uC740 1.0\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: The operator in a comparison operation was - * not recognized. - */ - {ErrorMsg.ILLEGAL_RELAT_OP_ERR, - "\uAD00\uACC4 \uD45C\uD604\uC2DD\uC5D0 \uB300\uD574 \uC54C \uC218 \uC5C6\uB294 \uC5F0\uC0B0\uC790\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: An attribute set defines as a set of XML - * attributes that can be added to an element in the output XML document - * as a group. This message is reported if the name specified was not - * used to declare an attribute set. The substitution text is the name - * that is in error. - */ - {ErrorMsg.ATTRIBSET_UNDEF_ERR, - "\uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uC18D\uC131 \uC9D1\uD569 ''{0}''\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: The term "attribute value template" is a term - * defined by XSLT which describes the value of an attribute that is - * determined by an XPath expression. The message indicates that the - * expression was syntactically incorrect; the substitution text - * contains the expression that was in error. - */ - {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, - "\uC18D\uC131\uAC12 \uD15C\uD50C\uB9AC\uD2B8 ''{0}''\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: ??? - */ - {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, - "''{0}'' \uD074\uB798\uC2A4\uC5D0 \uB300\uD55C \uC11C\uBA85\uC5D0 \uC54C \uC218 \uC5C6\uB294 \uB370\uC774\uD130 \uC720\uD615\uC774 \uC788\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of - * type {0}. - */ - {ErrorMsg.DATA_CONVERSION_ERR, - "\uB370\uC774\uD130 \uC720\uD615 ''{0}''\uC744(\uB97C) ''{1}''(\uC73C)\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_TRANSLET_CLASS_ERR, - "\uC774 Templates\uC5D0\uB294 \uC801\uD569\uD55C translet \uD074\uB798\uC2A4 \uC815\uC758\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_MAIN_TRANSLET_ERR, - "\uC774 Templates\uC5D0\uB294 \uC774\uB984\uC774 ''{0}''\uC778 \uD074\uB798\uC2A4\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSLET_CLASS_ERR, - "Translet \uD074\uB798\uC2A4 ''{0}''\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - {ErrorMsg.TRANSLET_OBJECT_ERR, - "Translet \uD074\uB798\uC2A4\uAC00 \uB85C\uB4DC\uB418\uC5C8\uC9C0\uB9CC translet \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "ErrorListener" is a Java interface name that - * should not be translated. The message indicates that the user tried - * to set an ErrorListener object on object of the class named in the - * substitution text with "null" Java value. - */ - {ErrorMsg.ERROR_LISTENER_NULL_ERR, - "''{0}''\uC5D0 \uB300\uD55C ErrorListener\uB97C null\uB85C \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911"}, - - /* - * Note to translators: StreamSource, SAXSource and DOMSource are Java - * interface names that should not be translated. - */ - {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, - "XSLTC\uB294 StreamSource, SAXSource \uBC0F DOMSource\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: "Source" is a Java class name that should not - * be translated. The substitution text is the name of Java method. - */ - {ErrorMsg.JAXP_NO_SOURCE_ERR, - "''{0}''(\uC73C)\uB85C \uC804\uB2EC\uB41C Source \uAC1D\uCCB4\uC5D0 \uCF58\uD150\uCE20\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The message indicates that XSLTC failed to - * compile the stylesheet into a translet (class file). - */ - {ErrorMsg.JAXP_COMPILE_ERR, - "\uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uB97C \uCEF4\uD30C\uC77C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "TransformerFactory" is a class name. In this - * context, an attribute is a property or setting of the - * TransformerFactory object. The substitution text is the name of the - * unrecognised attribute. The method used to retrieve the attribute is - * "getAttribute", so it's not clear whether it would be best to - * translate the term "attribute". - */ - {ErrorMsg.JAXP_INVALID_ATTR_ERR, - "TransformerFactory\uC5D0\uC11C ''{0}'' \uC18D\uC131\uC744 \uC778\uC2DD\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."}, - - {ErrorMsg.JAXP_INVALID_ATTR_VALUE_ERR, - "''{0}'' \uC18D\uC131\uC5D0 \uB300\uD574 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uAC12\uC774 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "setResult()" and "startDocument()" are Java - * method names that should not be translated. - */ - {ErrorMsg.JAXP_SET_RESULT_ERR, - "setResult()\uB294 startDocument() \uC55E\uC5D0 \uD638\uCD9C\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: "Transformer" is a Java interface name that - * should not be translated. A Transformer object should contained a - * reference to a translet object in order to be used for - * transformations; this message is produced if that requirement is not - * met. - */ - {ErrorMsg.JAXP_NO_TRANSLET_ERR, - "Transformer\uC5D0 \uCEA1\uC290\uD654\uB41C translet \uAC1D\uCCB4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The XML document that results from a - * transformation needs to be sent to an output handler object; this - * message is produced if that requirement is not met. - */ - {ErrorMsg.JAXP_NO_HANDLER_ERR, - "\uBCC0\uD658 \uACB0\uACFC\uC5D0 \uB300\uD574 \uC815\uC758\uB41C \uCD9C\uB825 \uCC98\uB9AC\uAE30\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "Result" is a Java interface name in this - * context. The substitution text is a method name. - */ - {ErrorMsg.JAXP_NO_RESULT_ERR, - "''{0}''(\uC73C)\uB85C \uC804\uB2EC\uB41C Result \uAC1D\uCCB4\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: "Transformer" is a Java interface name. The - * user's program attempted to access an unrecognized property with the - * name specified in the substitution text. The method used to retrieve - * the property is "getOutputProperty", so it's not clear whether it - * would be best to translate the term "property". - */ - {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, - "\uBD80\uC801\uD569\uD55C Transformer \uC18D\uC131 ''{0}''\uC5D0 \uC561\uC138\uC2A4\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: SAX2DOM is the name of a Java class that should - * not be translated. This is an adapter in the sense that it takes a - * DOM object and converts it to something that uses the SAX API. - */ - {ErrorMsg.SAX2DOM_ADAPTER_ERR, - "SAX2DOM \uC5B4\uB311\uD130\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: ''{0}''."}, - - /* - * Note to translators: "XSLTCSource.build()" is a Java method name. - * "systemId" is an XML term that is short for "system identification". - */ - {ErrorMsg.XSLTC_SOURCE_ERR, - "systemId\uB97C \uC124\uC815\uD558\uC9C0 \uC54A\uC740 \uC0C1\uD0DC\uB85C XSLTCSource.build()\uAC00 \uD638\uCD9C\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - { ErrorMsg.ER_RESULT_NULL, - "\uACB0\uACFC\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: This message indicates that the value argument - * of setParameter must be a valid Java Object. - */ - {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, - "{0} \uB9E4\uAC1C\uBCC0\uC218\uC758 \uAC12\uC740 \uC801\uD569\uD55C Java \uAC1D\uCCB4\uC5EC\uC57C \uD569\uB2C8\uB2E4."}, - - - {ErrorMsg.COMPILE_STDIN_ERR, - "-i \uC635\uC158\uC740 -o \uC635\uC158\uACFC \uD568\uAED8 \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4."}, - - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java package, so - * it should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.COMPILE_USAGE_STR, - "\uC0AC\uC6A9\uBC95\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o ]\n [-d ] [-j ] [-p ]\n [-n] [-x] [-u] [-v] [-h] { | -i }\n\n\uC635\uC158\n -o \uC0DD\uC131\uB41C translet\uC5D0 \uC774\uB984\uC744\n \uC9C0\uC815\uD569\uB2C8\uB2E4. \uAE30\uBCF8\uC801\uC73C\uB85C translet \uC774\uB984\uC740\n \uC774\uB984\uC5D0\uC11C \uD30C\uC0DD\uB429\uB2C8\uB2E4. \uC5EC\uB7EC \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uB97C\n \uCEF4\uD30C\uC77C\uD558\uB294 \uACBD\uC6B0 \uC774 \uC635\uC158\uC740 \uBB34\uC2DC\uB429\uB2C8\uB2E4.\n -d translet\uC5D0 \uB300\uD55C \uB300\uC0C1 \uB514\uB809\uD1A0\uB9AC\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n -j translet \uD074\uB798\uC2A4\uB97C \uC774\uB77C\uB294 \uC774\uB984\uC774 \uC9C0\uC815\uB41C jar \uD30C\uC77C\uC5D0\n \uD328\uD0A4\uC9C0\uD654\uD569\uB2C8\uB2E4.\n -p \uC0DD\uC131\uB41C \uBAA8\uB4E0 translet \uD074\uB798\uC2A4\uC5D0 \uB300\uD574 \uD328\uD0A4\uC9C0 \uC774\uB984 \uC811\uB450\uC5B4\uB97C\n \uC9C0\uC815\uD569\uB2C8\uB2E4.\n -n \uD15C\uD50C\uB9AC\uD2B8 \uC778\uB77C\uC778\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4. \uC77C\uBC18\uC801\uC73C\uB85C \uAE30\uBCF8 \uB3D9\uC791\uC744\n \uC0AC\uC6A9\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.\n -x \uCD94\uAC00 \uB514\uBC84\uAE45 \uBA54\uC2DC\uC9C0 \uCD9C\uB825\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n -u \uC778\uC218\uB97C URL\uB85C \uD574\uC11D\uD569\uB2C8\uB2E4.\n -i \uCEF4\uD30C\uC77C\uB7EC\uAC00 stdin\uC5D0\uC11C \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uB97C \uAC15\uC81C\uB85C \uC77D\uB3C4\uB85D \uD569\uB2C8\uB2E4.\n -v \uCEF4\uD30C\uC77C\uB7EC\uC758 \uBC84\uC804\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -h \uC774 \uC0AC\uC6A9\uBC95 \uC9C0\uCE68\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n"}, - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java class, so it - * should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.TRANSFORM_USAGE_STR, - "\uC0AC\uC6A9\uBC95 \n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j ]\n [-x] [-n ] {-u | }\n [= ...]\n\n translet \uB97C \uC0AC\uC6A9\uD558\uC5EC \uB85C \uC9C0\uC815\uB41C XML \uBB38\uC11C\uB97C \n \uBCC0\uD658\uD569\uB2C8\uB2E4. translet \uB294 \n \uC0AC\uC6A9\uC790\uC758 CLASSPATH \uB610\uB294 \uC120\uD0DD\uC801\uC73C\uB85C \uC9C0\uC815\uB41C \uC5D0 \uC788\uC2B5\uB2C8\uB2E4.\n\uC635\uC158\n -j translet\uC744 \uB85C\uB4DC\uD574 \uC62C jarfile\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4.\n -x \uCD94\uAC00 \uB514\uBC84\uAE45 \uBA54\uC2DC\uC9C0 \uCD9C\uB825\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n -n \uBCC0\uD658\uC744 \uD68C \uC2E4\uD589\uD558\uACE0\n \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -u XML \uC785\uB825 \uBB38\uC11C\uB97C URL\uB85C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n"}, - - - - /* - * Note to translators: "", "" and - * "" are keywords that should not be translated. - * The message indicates that an xsl:sort element must be a child of - * one of the other kinds of elements mentioned. - */ - {ErrorMsg.STRAY_SORT_ERR, - "\uB294 \uB610\uB294 \uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The message indicates that the encoding - * requested for the output document was on that requires support that - * is not available from the Java Virtual Machine being used to execute - * the program. - */ - {ErrorMsg.UNSUPPORTED_ENCODING, - "\uC774 JVM\uC5D0\uC11C\uB294 \uCD9C\uB825 \uC778\uCF54\uB529 ''{0}''\uC774(\uAC00) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The message indicates that the XPath expression - * named in the substitution text was not well formed syntactically. - */ - {ErrorMsg.SYNTAX_ERR, - "''{0}''\uC5D0 \uAD6C\uBB38 \uC624\uB958\uAC00 \uC788\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text is the name of a Java - * class. The term "constructor" here is the Java term. The message is - * displayed if XSLTC could not find a constructor for the specified - * class. - */ - {ErrorMsg.CONSTRUCTOR_NOT_FOUND, - "\uC678\uBD80 constructor ''{0}''\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: "static" is the Java keyword. The substitution - * text is the name of a function. The first argument of that function - * is not of the required type. - */ - {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, - "\uBE44static Java \uD568\uC218 ''{0}''\uC5D0 \uB300\uD55C \uCCAB\uBC88\uC9F8 \uC778\uC218\uB294 \uC801\uD569\uD55C \uAC1D\uCCB4 \uCC38\uC870\uAC00 \uC544\uB2D9\uB2C8\uB2E4."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. The substitution text is the - * expression that was in error. - */ - {ErrorMsg.TYPE_CHECK_ERR, - "''{0}'' \uD45C\uD604\uC2DD\uC758 \uC720\uD615\uC744 \uD655\uC778\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. However, the location of the - * problematic expression is unknown. - */ - {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, - "\uC54C \uC218 \uC5C6\uB294 \uC704\uCE58\uC5D0\uC11C \uD45C\uD604\uC2DD\uC758 \uC720\uD615\uC744 \uD655\uC778\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option that was not recognized. - */ - {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, - "\uBA85\uB839\uD589 \uC635\uC158 ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option. - */ - {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, - "\uBA85\uB839\uD589 \uC635\uC158 ''{0}''\uC5D0 \uD544\uC218 \uC778\uC218\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, - "WARNING: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.WARNING_MSG, - "WARNING: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, - "FATAL ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.FATAL_ERR_MSG, - "FATAL ERROR: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, - "ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.ERROR_MSG, - "ERROR: ''{0}''"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, - "translet ''{0}''\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uBCC0\uD658\uD558\uC2ED\uC2DC\uC624. "}, - - /* - * Note to translators: The first substitution is the name of a class, - * while the second substitution is the name of a jar file. - */ - {ErrorMsg.TRANSFORM_WITH_JAR_STR, - "jar \uD30C\uC77C ''{1}''\uC758 translet ''{0}''\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uBCC0\uD658\uD558\uC2ED\uC2DC\uC624."}, - - /* - * Note to translators: "TransformerFactory" is the name of a Java - * interface and must not be translated. The substitution text is - * the name of the class that could not be instantiated. - */ - {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, - "TransformerFactory \uD074\uB798\uC2A4 ''{0}''\uC758 \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: This message is produced when the user - * specified a name for the translet class that contains characters - * that are not permitted in a Java class name. The substitution - * text "{0}" specifies the name the user requested, while "{1}" - * specifies the name the processor used instead. - */ - {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT, - "''{0}'' \uC774\uB984\uC5D0\uB294 Java \uD074\uB798\uC2A4 \uC774\uB984\uC5D0 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uB294 \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC5B4 \uC774 \uC774\uB984\uC744 translet \uD074\uB798\uC2A4\uC758 \uC774\uB984\uC73C\uB85C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 ''{1}'' \uC774\uB984\uC774 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages are collected together and displayed beneath - * this message. - */ - {ErrorMsg.COMPILER_ERROR_KEY, - "\uCEF4\uD30C\uC77C\uB7EC \uC624\uB958:"}, - - /* - * Note to translators: The following message is used as a header. - * All the warning messages are collected together and displayed - * beneath this message. - */ - {ErrorMsg.COMPILER_WARNING_KEY, - "\uCEF4\uD30C\uC77C\uB7EC \uACBD\uACE0:"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages that are produced when the stylesheet is - * applied to an input document are collected together and displayed - * beneath this message. A 'translet' is the compiled form of a - * stylesheet (see above). - */ - {ErrorMsg.RUNTIME_ERROR_KEY, - "Translet \uC624\uB958:"}, - - /* - * Note to translators: An attribute whose value is constrained to - * be a "QName" or a list of "QNames" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_QNAME_ERR, - "\uAC12\uC774 QName \uB610\uB294 \uACF5\uBC31\uC73C\uB85C \uAD6C\uBD84\uB41C QName \uBAA9\uB85D\uC774\uC5B4\uC57C \uD558\uB294 \uC18D\uC131\uC758 \uAC12\uC774 ''{0}''\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: An attribute whose value is required to - * be an "NCName". - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_NCNAME_ERR, - "\uAC12\uC774 NCName\uC774\uC5B4\uC57C \uD558\uB294 \uC18D\uC131\uC758 \uAC12\uC774 ''{0}''\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: An attribute with an incorrect value was - * encountered. The permitted value is one of the literal values - * "xml", "html" or "text"; it is also permitted to have the form of - * a QName that is not also an NCName. The terms "method", - * "xsl:output", "xml", "html" and "text" are keywords that must not - * be translated. The term "qname-but-not-ncname" is an XML syntactic - * term. The substitution text contains the actual value of the - * attribute. - */ - {ErrorMsg.INVALID_METHOD_IN_OUTPUT, - " \uC694\uC18C\uC5D0 \uB300\uD55C method \uC18D\uC131\uC758 \uAC12\uC774 ''{0}''\uC785\uB2C8\uB2E4. \uAC12\uC740 ''xml'', ''html'', ''text'' \uB610\uB294 qname-but-not-ncname \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4."}, - - {ErrorMsg.JAXP_GET_FEATURE_NULL_NAME, - "\uAE30\uB2A5 \uC774\uB984\uC740 TransformerFactory.getFeature(\uBB38\uC790\uC5F4 \uC774\uB984)\uC5D0\uC11C \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - {ErrorMsg.JAXP_SET_FEATURE_NULL_NAME, - "\uAE30\uB2A5 \uC774\uB984\uC740 TransformerFactory.setFeature(\uBB38\uC790\uC5F4 \uC774\uB984, \uBD80\uC6B8 \uAC12)\uC5D0\uC11C \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - {ErrorMsg.JAXP_UNSUPPORTED_FEATURE, - "\uC774 TransformerFactory\uC5D0\uC11C ''{0}'' \uAE30\uB2A5\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: \uBCF4\uC548 \uAD00\uB9AC\uC790\uAC00 \uC788\uC744 \uACBD\uC6B0 \uAE30\uB2A5\uC744 false\uB85C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method, and "try-catch-finally block" - * refers to the Java keywords with those names. "Outlined" is a - * technical term internal to XSLTC and should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_TRY_CATCH, - "\uB0B4\uBD80 XSLTC \uC624\uB958: \uC0DD\uC131\uB41C \uBC14\uC774\uD2B8 \uCF54\uB4DC\uAC00 try-catch-finally \uBE14\uB85D\uC744 \uD3EC\uD568\uD558\uBBC0\uB85C outlined \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The terms "OutlineableChunkStart" and - * "OutlineableChunkEnd" are the names of classes internal to XSLTC and - * should not be translated. The message indicates that for every - * "start" there must be a corresponding "end", and vice versa, and - * that if one of a pair of "start" and "end" appears between another - * pair of corresponding "start" and "end", then the other half of the - * pair must also be between that same enclosing pair. - */ - {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS, - "\uB0B4\uBD80 XSLTC \uC624\uB958: OutlineableChunkStart \uBC0F OutlineableChunkEnd \uD45C\uC2DC\uC790\uC758 \uC9DD\uC774 \uB9DE\uC544\uC57C \uD558\uACE0 \uC62C\uBC14\uB974\uAC8C \uC911\uCCA9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method. The "method" that is being - * referred to is a Java method in a translet that XSLTC is generating - * in processing a stylesheet. The "instruction" that is being - * referred to is one of the instrutions in the Java byte code in that - * method. "Outlined" is a technical term internal to XSLTC and - * should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_DELETED_TARGET, - "\uB0B4\uBD80 XSLTC \uC624\uB958: outlined \uCC98\uB9AC\uB41C \uBC14\uC774\uD2B8 \uCF54\uB4DC \uBE14\uB85D\uC5D0 \uC18D\uD55C \uBA85\uB839\uC774 \uC5EC\uC804\uD788 \uC6D0\uB798 \uBA54\uC18C\uB4DC\uC5D0\uC11C \uCC38\uC870\uB429\uB2C8\uB2E4." - }, - - - /* - * Note to translators: This message describes an internal error in the - * processor. The "method" that is being referred to is a Java method - * in a translet that XSLTC is generating. - * - */ - {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG, - "\uB0B4\uBD80 XSLTC \uC624\uB958: translet\uC758 \uBA54\uC18C\uB4DC\uAC00 Java Virtual Machine\uC758 \uBA54\uC18C\uB4DC \uAE38\uC774 \uC81C\uD55C\uC778 64KB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4. \uB300\uAC1C \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC758 \uD15C\uD50C\uB9AC\uD2B8\uAC00 \uB9E4\uC6B0 \uD06C\uAE30 \uB54C\uBB38\uC5D0 \uBC1C\uC0DD\uD569\uB2C8\uB2E4. \uB354 \uC791\uC740 \uD15C\uD50C\uB9AC\uD2B8\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uB97C \uC7AC\uAD6C\uC131\uD574 \uBCF4\uC2ED\uC2DC\uC624." - }, - - }; - - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java deleted file mode 100644 index 061348dc2e5..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java +++ /dev/null @@ -1,986 +0,0 @@ -/* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.xsltc.compiler.util; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_pt_BR extends ListResourceBundle { - -/* - * XSLTC compile-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 5) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 6) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 7) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 8) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 9) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 10) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 11) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - {ErrorMsg.MULTIPLE_STYLESHEET_ERR, - "Mais de uma folha de estilos definida no mesmo arquivo."}, - - /* - * Note to translators: The substitution text is the name of a - * template. The same name was used on two different templates in the - * same stylesheet. - */ - {ErrorMsg.TEMPLATE_REDEF_ERR, - "O modelo ''{0}'' j\u00E1 foi definido nesta folha de estilos."}, - - - /* - * Note to translators: The substitution text is the name of a - * template. A reference to the template name was encountered, but the - * template is undefined. - */ - {ErrorMsg.TEMPLATE_UNDEF_ERR, - "O modelo ''{0}'' n\u00E3o foi definido nesta folha de estilos."}, - - /* - * Note to translators: The substitution text is the name of a variable - * that was defined more than once. - */ - {ErrorMsg.VARIABLE_REDEF_ERR, - "A vari\u00E1vel ''{0}'' est\u00E1 definida v\u00E1rias vezes no mesmo escopo."}, - - /* - * Note to translators: The substitution text is the name of a variable - * or parameter. A reference to the variable or parameter was found, - * but it was never defined. - */ - {ErrorMsg.VARIABLE_UNDEF_ERR, - "Vari\u00E1vel ou par\u00E2metro ''{0}'' indefinido."}, - - /* - * Note to translators: The word "class" here refers to a Java class. - * Processing the stylesheet required a class to be loaded, but it could - * not be found. The substitution text is the name of the class. - */ - {ErrorMsg.CLASS_NOT_FOUND_ERR, - "N\u00E3o \u00E9 poss\u00EDvel localizar a classe ''{0}''."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but it could not be found. "public" is the - * Java keyword. - */ - {ErrorMsg.METHOD_NOT_FOUND_ERR, - "N\u00E3o \u00E9 poss\u00EDvel localizar o m\u00E9todo externo ''{0}'' (deve ser p\u00FAblico)."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but no method with the required types of - * arguments or return type could be found. - */ - {ErrorMsg.ARGUMENT_CONVERSION_ERR, - "N\u00E3o \u00E9 poss\u00EDvel converter o argumento/tipo de retorno na chamada para o m\u00E9todo ''{0}''"}, - - /* - * Note to translators: The file or URI named in the substitution text - * is missing. - */ - {ErrorMsg.FILE_NOT_FOUND_ERR, - "Arquivo ou URI ''{0}'' n\u00E3o encontrado."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.INVALID_URI_ERR, - "URI inv\u00E1lido ''{0}''."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.CATALOG_EXCEPTION, - "JAXP08090001: O CatalogResolver foi ativado com o cat\u00E1logo \"{0}\", mas uma CatalogException foi retornada."}, - - /* - * Note to translators: The file or URI named in the substitution text - * exists but could not be opened. - */ - {ErrorMsg.FILE_ACCESS_ERR, - "N\u00E3o \u00E9 poss\u00EDvel abrir o arquivo ou o URI ''{0}''."}, - - /* - * Note to translators: and are - * keywords that should not be translated. - */ - {ErrorMsg.MISSING_ROOT_ERR, - "elemento ou esperado."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ErrorMsg.NAMESPACE_UNDEF_ERR, - "O prefixo do namespace ''{0}'' n\u00E3o foi declarado."}, - - /* - * Note to translators: The Java function named in the stylesheet could - * not be found. - */ - {ErrorMsg.FUNCTION_RESOLVE_ERR, - "N\u00E3o \u00E9 poss\u00EDvel resolver a chamada para a fun\u00E7\u00E3o ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a - * function. A literal string here means a constant string value. - */ - {ErrorMsg.NEED_LITERAL_ERR, - "O argumento para \"{0}'' deve ser uma string literal."}, - - /* - * Note to translators: This message indicates there was a syntactic - * error in the form of an XPath expression. The substitution text is - * the expression. - */ - {ErrorMsg.XPATH_PARSER_ERR, - "Erro durante o parsing da express\u00E3o XPath ''{0}''."}, - - /* - * Note to translators: An element in the stylesheet requires a - * particular attribute named by the substitution text, but that - * attribute was not specified in the stylesheet. - */ - {ErrorMsg.REQUIRED_ATTR_ERR, - "O atributo obrigat\u00F3rio ''{0}'' n\u00E3o foi encontrado."}, - - /* - * Note to translators: This message indicates that a character not - * permitted in an XPath expression was encountered. The substitution - * text is the offending character. - */ - {ErrorMsg.ILLEGAL_CHAR_ERR, - "Caractere inv\u00E1lido ''{0}'' na express\u00E3o XPath."}, - - /* - * Note to translators: A processing instruction is a mark-up item in - * an XML document that request some behaviour of an XML processor. The - * form of the name of was invalid in this case, and the substitution - * text is the name. - */ - {ErrorMsg.ILLEGAL_PI_ERR, - "Nome inv\u00E1lido ''{0}'' para instru\u00E7\u00E3o de processamento."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ErrorMsg.STRAY_ATTRIBUTE_ERR, - "Atributo ''{0}'' fora do elemento."}, - - /* - * Note to translators: An attribute that wasn't recognized was - * specified on an element in the stylesheet. The attribute is named - * by the substitution - * text. - */ - {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "Atributo ''{0}'' inv\u00E1lido."}, - - /* - * Note to translators: "import" and "include" are keywords that should - * not be translated. This messages indicates that the stylesheet - * named in the substitution text imported or included itself either - * directly or indirectly. - */ - {ErrorMsg.CIRCULAR_INCLUDE_ERR, - "Import/Include circular. Folha de estilos ''{0}'' j\u00E1 carregada."}, - - /* - * Note to translators: "xsl:import" and "xsl:include" are keywords that - * should not be translated. - */ - {ErrorMsg.IMPORT_PRECEDE_OTHERS_ERR, - "Os filhos do elemento xsl:import devem preceder todos os outros filhos de um elemento xsl:stylesheet, inclusive quaisquer filhos do elemento xsl:include."}, - - /* - * Note to translators: A result-tree fragment is a portion of a - * resulting XML document represented as a tree. "" is a - * keyword and should not be translated. - */ - {ErrorMsg.RESULT_TREE_SORT_ERR, - "Os fragmentos da \u00E1rvore n\u00E3o podem ser classificados (os elementos foram ignorados). Voc\u00EA deve classificar os n\u00F3s ao criar a \u00E1rvore de resultados."}, - - /* - * Note to translators: A name can be given to a particular style to be - * used to format decimal values. The substitution text gives the name - * of such a style for which more than one declaration was encountered. - */ - {ErrorMsg.SYMBOLS_REDEF_ERR, - "A formata\u00E7\u00E3o decimal ''{0}'' j\u00E1 foi definida."}, - - /* - * Note to translators: The stylesheet version named in the - * substitution text is not supported. - */ - {ErrorMsg.XSL_VERSION_ERR, - "A vers\u00E3o XSL \"{0}'' n\u00E3o \u00E9 suportada por XSLTC."}, - - /* - * Note to translators: The definitions of one or more variables or - * parameters depend on one another. - */ - {ErrorMsg.CIRCULAR_VARIABLE_ERR, - "Refer\u00EAncia de vari\u00E1vel/par\u00E2metro circulares ''{0}''."}, - - /* - * Note to translators: The operator in an expresion with two operands was - * not recognized. - */ - {ErrorMsg.ILLEGAL_BINARY_OP_ERR, - "Operador desconhecido para a express\u00E3o bin\u00E1ria."}, - - /* - * Note to translators: This message is produced if a reference to a - * function has too many or too few arguments. - */ - {ErrorMsg.ILLEGAL_ARG_ERR, - "Argumento(s) inv\u00E1lido(s) para a chamada da fun\u00E7\u00E3o."}, - - /* - * Note to translators: "document()" is the name of function and must - * not be translated. A node-set is a set of the nodes in the tree - * representation of an XML document. - */ - {ErrorMsg.DOCUMENT_ARG_ERR, - "O segundo argumento para a fun\u00E7\u00E3o document() deve ser um conjunto de n\u00F3s."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.MISSING_WHEN_ERR, - "\u00C9 necess\u00E1rio, pelo menos, um elemento em ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.MULTIPLE_OTHERWISE_ERR, - "\u00C9 permitido somente um elemento em ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.STRAY_OTHERWISE_ERR, - " s\u00F3 pode ser usado em ."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.STRAY_WHEN_ERR, - " s\u00F3 pode ser usado em ."}, - - /* - * Note to translators: "", "" and - * "" are keywords and should not be translated. This - * message describes a syntax error in the stylesheet. - */ - {ErrorMsg.WHEN_ELEMENT_ERR, - "Somente os elementos e s\u00E3o permitidos em ."}, - - /* - * Note to translators: "" and "name" are keywords - * that should not be translated. - */ - {ErrorMsg.UNNAMED_ATTRIBSET_ERR, - " n\u00E3o encontrado no atributo 'name'."}, - - /* - * Note to translators: An element in the stylesheet contained an - * element of a type that it was not permitted to contain. - */ - {ErrorMsg.ILLEGAL_CHILD_ERR, - "Elemento filho inv\u00E1lido."}, - - /* - * Note to translators: The stylesheet tried to create an element with - * a name that was not a valid XML name. The substitution text contains - * the name. - */ - {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, - "Voc\u00EA n\u00E3o pode chamar um elemento ''{0}''"}, - - /* - * Note to translators: The stylesheet tried to create an attribute - * with a name that was not a valid XML name. The substitution text - * contains the name. - */ - {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, - "Voc\u00EA n\u00E3o pode chamar um atributo ''{0}''"}, - - /* - * Note to translators: The children of the outermost element of a - * stylesheet are referred to as top-level elements. No text should - * occur within that outermost element unless it is within a top-level - * element. This message indicates that that constraint was violated. - * "" is a keyword that should not be translated. - */ - {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, - "Dados de texto fora do elemento de n\u00EDvel superior."}, - - /* - * Note to translators: JAXP is an acronym for the Java API for XML - * Processing. This message indicates that the XML parser provided to - * XSLTC to process the XML input document had a configuration problem. - */ - {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "Parser de JAXP n\u00E3o configurado corretamente"}, - - /* - * Note to translators: The substitution text names the internal error - * encountered. - */ - {ErrorMsg.INTERNAL_ERR, - "Erro interno-XSLTC irrecuper\u00E1vel: ''{0}''"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {ErrorMsg.UNSUPPORTED_XSL_ERR, - "Elemento XSL n\u00E3o suportado ''{0}''."}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does - * not recognized the particular extension named. The substitution text - * gives the extension name. - */ - {ErrorMsg.UNSUPPORTED_EXT_ERR, - "Extens\u00E3o de XSLTC n\u00E3o reconhecida ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. XSLTC is able to detect that in this - * case because the outermost element in the stylesheet has to be - * declared with respect to the XSL namespace URI, but no declaration - * for that namespace was seen. - */ - {ErrorMsg.MISSING_XSLT_URI_ERR, - "O documento de entrada n\u00E3o \u00E9 uma folha de estilos (o namespace XSL n\u00E3o foi declarado no elemento-raiz)."}, - - /* - * Note to translators: XSLTC could not find the stylesheet document - * with the name specified by the substitution text. - */ - {ErrorMsg.MISSING_XSLT_TARGET_ERR, - "N\u00E3o foi poss\u00EDvel localizar o alvo da folha de estilos ''{0}''."}, - - /* - * Note to translators: access to the stylesheet target is denied - */ - {ErrorMsg.ACCESSING_XSLT_TARGET_ERR, - "N\u00E3o foi poss\u00EDvel ler o alvo ''{0}'' da folha de estilos, porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido em virtude da restri\u00E7\u00E3o definida pela propriedade accessExternalStylesheet."}, - - /* - * Note to translators: This message represents an internal error in - * condition in XSLTC. The substitution text is the class name in XSLTC - * that is missing some functionality. - */ - {ErrorMsg.NOT_IMPLEMENTED_ERR, - "N\u00E3o implementado: ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. - */ - {ErrorMsg.NOT_STYLESHEET_ERR, - "O documento de entrada n\u00E3o cont\u00E9m uma folha de estilos XSL."}, - - /* - * Note to translators: The element named in the substitution text was - * encountered in the stylesheet but is not recognized. - */ - {ErrorMsg.ELEMENT_PARSE_ERR, - "N\u00E3o foi poss\u00EDvel fazer parsing do elemento ''{0}''"}, - - /* - * Note to translators: "use", "", "node", "node-set", "string" - * and "number" are keywords in this context and should not be - * translated. This message indicates that the value of the "use" - * attribute was not one of the permitted values. - */ - {ErrorMsg.KEY_USE_ATTR_ERR, - "O atributo use de deve ser node, node-set, string ou number."}, - - /* - * Note to translators: An XML document can specify the version of the - * XML specification to which it adheres. This message indicates that - * the version specified for the output document was not valid. - */ - {ErrorMsg.OUTPUT_VERSION_ERR, - "A vers\u00E3o do documento XML de sa\u00EDda deve ser 1.0"}, - - /* - * Note to translators: The operator in a comparison operation was - * not recognized. - */ - {ErrorMsg.ILLEGAL_RELAT_OP_ERR, - "Opera\u00E7\u00E3o desconhecida para a express\u00E3o relacional"}, - - /* - * Note to translators: An attribute set defines as a set of XML - * attributes that can be added to an element in the output XML document - * as a group. This message is reported if the name specified was not - * used to declare an attribute set. The substitution text is the name - * that is in error. - */ - {ErrorMsg.ATTRIBSET_UNDEF_ERR, - "Tentativa de usar um conjunto de atributos ''{0}'' n\u00E3o existente."}, - - /* - * Note to translators: The term "attribute value template" is a term - * defined by XSLT which describes the value of an attribute that is - * determined by an XPath expression. The message indicates that the - * expression was syntactically incorrect; the substitution text - * contains the expression that was in error. - */ - {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, - "N\u00E3o \u00E9 poss\u00EDvel fazer parsing do modelo do valor do atributo ''{0}''."}, - - /* - * Note to translators: ??? - */ - {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, - "Tipo de dados desconhecido na assinatura da classe ''{0}''."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of - * type {0}. - */ - {ErrorMsg.DATA_CONVERSION_ERR, - "N\u00E3o \u00E9 poss\u00EDvel converter o tipo de dados ''{0}'' em ''{1}''."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_TRANSLET_CLASS_ERR, - "Este Templates n\u00E3o cont\u00E9m uma defini\u00E7\u00E3o de classe translet v\u00E1lida."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_MAIN_TRANSLET_ERR, - "Este Templates n\u00E3o cont\u00E9m uma classe com o nome ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSLET_CLASS_ERR, - "N\u00E3o foi poss\u00EDvel carregar a classe translet ''{0}''."}, - - {ErrorMsg.TRANSLET_OBJECT_ERR, - "Classe translet carregada, mas n\u00E3o \u00E9 poss\u00EDvel criar uma inst\u00E2ncia translet."}, - - /* - * Note to translators: "ErrorListener" is a Java interface name that - * should not be translated. The message indicates that the user tried - * to set an ErrorListener object on object of the class named in the - * substitution text with "null" Java value. - */ - {ErrorMsg.ERROR_LISTENER_NULL_ERR, - "Tentativa de definir ErrorListener para ''{0}'' como nulo"}, - - /* - * Note to translators: StreamSource, SAXSource and DOMSource are Java - * interface names that should not be translated. - */ - {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, - "Somente StreamSource, SAXSource e DOMSource s\u00E3o suportados por XSLTC"}, - - /* - * Note to translators: "Source" is a Java class name that should not - * be translated. The substitution text is the name of Java method. - */ - {ErrorMsg.JAXP_NO_SOURCE_ERR, - "O objeto source especificado para ''{0}'' n\u00E3o tem conte\u00FAdo."}, - - /* - * Note to translators: The message indicates that XSLTC failed to - * compile the stylesheet into a translet (class file). - */ - {ErrorMsg.JAXP_COMPILE_ERR, - "N\u00E3o foi poss\u00EDvel compilar a folha de estilos"}, - - /* - * Note to translators: "TransformerFactory" is a class name. In this - * context, an attribute is a property or setting of the - * TransformerFactory object. The substitution text is the name of the - * unrecognised attribute. The method used to retrieve the attribute is - * "getAttribute", so it's not clear whether it would be best to - * translate the term "attribute". - */ - {ErrorMsg.JAXP_INVALID_ATTR_ERR, - "TransformerFactory n\u00E3o reconhece o atributo ''{0}''."}, - - {ErrorMsg.JAXP_INVALID_ATTR_VALUE_ERR, - "Valor incorreto especificado para o atributo ''{0}''."}, - - /* - * Note to translators: "setResult()" and "startDocument()" are Java - * method names that should not be translated. - */ - {ErrorMsg.JAXP_SET_RESULT_ERR, - "setResult() deve ser chamado antes de startDocument()."}, - - /* - * Note to translators: "Transformer" is a Java interface name that - * should not be translated. A Transformer object should contained a - * reference to a translet object in order to be used for - * transformations; this message is produced if that requirement is not - * met. - */ - {ErrorMsg.JAXP_NO_TRANSLET_ERR, - "O Transformer n\u00E3o tem um objeto translet encapsulado."}, - - /* - * Note to translators: The XML document that results from a - * transformation needs to be sent to an output handler object; this - * message is produced if that requirement is not met. - */ - {ErrorMsg.JAXP_NO_HANDLER_ERR, - "Nenhum handler de sa\u00EDda definido para o resultado da transforma\u00E7\u00E3o."}, - - /* - * Note to translators: "Result" is a Java interface name in this - * context. The substitution text is a method name. - */ - {ErrorMsg.JAXP_NO_RESULT_ERR, - "O objeto result especificado para ''{0}'' \u00E9 inv\u00E1lido."}, - - /* - * Note to translators: "Transformer" is a Java interface name. The - * user's program attempted to access an unrecognized property with the - * name specified in the substitution text. The method used to retrieve - * the property is "getOutputProperty", so it's not clear whether it - * would be best to translate the term "property". - */ - {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, - "Tentativa de acessar a propriedade ''{0}'' do Transformer inv\u00E1lida."}, - - /* - * Note to translators: SAX2DOM is the name of a Java class that should - * not be translated. This is an adapter in the sense that it takes a - * DOM object and converts it to something that uses the SAX API. - */ - {ErrorMsg.SAX2DOM_ADAPTER_ERR, - "N\u00E3o foi poss\u00EDvel criar o adaptador SAX2DOM: ''{0}''."}, - - /* - * Note to translators: "XSLTCSource.build()" is a Java method name. - * "systemId" is an XML term that is short for "system identification". - */ - {ErrorMsg.XSLTC_SOURCE_ERR, - "XSLTCSource.build() chamado sem o systemId ser definido."}, - - { ErrorMsg.ER_RESULT_NULL, - "O resultado n\u00E3o deve ser nulo"}, - - /* - * Note to translators: This message indicates that the value argument - * of setParameter must be a valid Java Object. - */ - {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, - "O valor do par\u00E2metro {0} deve ser um Objeto Java v\u00E1lido"}, - - - {ErrorMsg.COMPILE_STDIN_ERR, - "A op\u00E7\u00E3o -i deve ser usada com a op\u00E7\u00E3o -o."}, - - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java package, so - * it should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.COMPILE_USAGE_STR, - "SINOPSE\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o ]\n [-d ] [-j ] [-p ]\n [-n] [-x] [-u] [-v] [-h] { | -i }\n\nOP\u00C7\u00D5ES\n -o atribui o nome ao translet\n gerado. Por padr\u00E3o, o nome translet\n origina-se do nome . Esta op\u00E7\u00E3o\n \u00E9 ignorada caso sejam compiladas v\u00E1rias folhas de estilos.\n -d especifica um diret\u00F3rio de destino para translet\n -j empacota as classes translet em um arquivo jar do\n nome especificado como \n -p especifica um prefixo de nome do pacote para todas as classes\n translet geradas.\n -n permite a inclus\u00E3o do modelo na linha (comportamento padr\u00E3o melhor\n em m\u00E9dia).\n -x ativa a sa\u00EDda de mensagens de depura\u00E7\u00E3o adicionais\n -u interpreta os argumentos como URLs\n -i obriga o compilador a ler a folha de estilos de stdin\n -v imprime a vers\u00E3o do compilador\n -h imprime esta instru\u00E7\u00E3o de uso\n"}, - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java class, so it - * should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.TRANSFORM_USAGE_STR, - "SINOPSE \n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transforme [-j ]\n [-x] [-n ] {-u | }\n [= ...]\n\n usa a translet para transformar um documento XML \n especificado como . O translet est\u00E1 no\n CLASSPATH do usu\u00E1rio ou no opcionalmente especificado.\nOP\u00C7\u00D5ES\n -j especifica um arquivo jar com base no qual ser\u00E1 carregado o translet\n -x ativa a sa\u00EDda de mensagens de depura\u00E7\u00E3o adicionais\n -n executa a transforma\u00E7\u00E3o vezes e\n exibe as informa\u00E7\u00F5es de perfis\n -u especifica o documento XML de entrada na forma de URL\n"}, - - - - /* - * Note to translators: "", "" and - * "" are keywords that should not be translated. - * The message indicates that an xsl:sort element must be a child of - * one of the other kinds of elements mentioned. - */ - {ErrorMsg.STRAY_SORT_ERR, - " s\u00F3 pode ser usado dentro de ou ."}, - - /* - * Note to translators: The message indicates that the encoding - * requested for the output document was on that requires support that - * is not available from the Java Virtual Machine being used to execute - * the program. - */ - {ErrorMsg.UNSUPPORTED_ENCODING, - "A codifica\u00E7\u00E3o de sa\u00EDda ''{0}'' n\u00E3o \u00E9 suportada nesta JVM."}, - - /* - * Note to translators: The message indicates that the XPath expression - * named in the substitution text was not well formed syntactically. - */ - {ErrorMsg.SYNTAX_ERR, - "Erro de sintaxe em ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a Java - * class. The term "constructor" here is the Java term. The message is - * displayed if XSLTC could not find a constructor for the specified - * class. - */ - {ErrorMsg.CONSTRUCTOR_NOT_FOUND, - "N\u00E3o \u00E9 poss\u00EDvel localizar o construtor externo ''{0}''."}, - - /* - * Note to translators: "static" is the Java keyword. The substitution - * text is the name of a function. The first argument of that function - * is not of the required type. - */ - {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, - "O primeiro argumento para a fun\u00E7\u00E3o Java n\u00E3o static ''{0}'' n\u00E3o \u00E9 uma refer\u00EAncia de objeto v\u00E1lida."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. The substitution text is the - * expression that was in error. - */ - {ErrorMsg.TYPE_CHECK_ERR, - "Erro ao verificar o tipo de express\u00E3o ''{0}''."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. However, the location of the - * problematic expression is unknown. - */ - {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, - "Erro ao verificar o tipo de uma express\u00E3o em uma localiza\u00E7\u00E3o desconhecida."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option that was not recognized. - */ - {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, - "A op\u00E7\u00E3o da linha de comandos ''{0}'' n\u00E3o \u00E9 v\u00E1lida."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option. - */ - {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, - "A op\u00E7\u00E3o da linha de comandos ''{0}'' n\u00E3o encontrou um argumento obrigat\u00F3rio."}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, - "WARNING: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.WARNING_MSG, - "WARNING: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, - "FATAL ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.FATAL_ERR_MSG, - "FATAL ERROR: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, - "ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.ERROR_MSG, - "ERROR: ''{0}''"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, - "Transformar usando translet ''{0}'' "}, - - /* - * Note to translators: The first substitution is the name of a class, - * while the second substitution is the name of a jar file. - */ - {ErrorMsg.TRANSFORM_WITH_JAR_STR, - "Transformar usando translet ''{0}'' do arquivo jar ''{1}''"}, - - /* - * Note to translators: "TransformerFactory" is the name of a Java - * interface and must not be translated. The substitution text is - * the name of the class that could not be instantiated. - */ - {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, - "N\u00E3o foi poss\u00EDvel criar uma inst\u00E2ncia da classe TransformerFactory ''{0}''."}, - - /* - * Note to translators: This message is produced when the user - * specified a name for the translet class that contains characters - * that are not permitted in a Java class name. The substitution - * text "{0}" specifies the name the user requested, while "{1}" - * specifies the name the processor used instead. - */ - {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT, - "N\u00E3o foi poss\u00EDvel usar o nome ''{0}'' como o nome da classe translet, pois ele cont\u00E9m caracteres que n\u00E3o s\u00E3o permitidos no nome da classe Java. O nome ''{1}'' foi usado."}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages are collected together and displayed beneath - * this message. - */ - {ErrorMsg.COMPILER_ERROR_KEY, - "Erros do compilador:"}, - - /* - * Note to translators: The following message is used as a header. - * All the warning messages are collected together and displayed - * beneath this message. - */ - {ErrorMsg.COMPILER_WARNING_KEY, - "Advert\u00EAncias do compilador:"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages that are produced when the stylesheet is - * applied to an input document are collected together and displayed - * beneath this message. A 'translet' is the compiled form of a - * stylesheet (see above). - */ - {ErrorMsg.RUNTIME_ERROR_KEY, - "Erros de translet:"}, - - /* - * Note to translators: An attribute whose value is constrained to - * be a "QName" or a list of "QNames" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_QNAME_ERR, - "Um atributo cujo valor deve ser um QName ou uma lista de QNames separada por espa\u00E7os em branco tinha o valor ''{0}''"}, - - /* - * Note to translators: An attribute whose value is required to - * be an "NCName". - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_NCNAME_ERR, - "Um atributo cujo valor deve ser um NCName tinha o valor ''{0}''"}, - - /* - * Note to translators: An attribute with an incorrect value was - * encountered. The permitted value is one of the literal values - * "xml", "html" or "text"; it is also permitted to have the form of - * a QName that is not also an NCName. The terms "method", - * "xsl:output", "xml", "html" and "text" are keywords that must not - * be translated. The term "qname-but-not-ncname" is an XML syntactic - * term. The substitution text contains the actual value of the - * attribute. - */ - {ErrorMsg.INVALID_METHOD_IN_OUTPUT, - "O atributo method de um elemento tinha o valor ''{0}''. O valor deve ser um dos seguintes: ''xml'', ''html'', ''text'', ou qname, mas n\u00E3o ncname"}, - - {ErrorMsg.JAXP_GET_FEATURE_NULL_NAME, - "O nome do recurso n\u00E3o pode ser nulo em TransformerFactory.getFeature(Nome da string)."}, - - {ErrorMsg.JAXP_SET_FEATURE_NULL_NAME, - "O nome do recurso n\u00E3o pode ser nulo em TransformerFactory.setFeature(Nome da string, valor booliano)."}, - - {ErrorMsg.JAXP_UNSUPPORTED_FEATURE, - "N\u00E3o \u00E9 poss\u00EDvel definir o recurso ''{0}'' nesta TransformerFactory."}, - - {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: N\u00E3o \u00E9 poss\u00EDvel definir o recurso como falso quando o gerenciador de seguran\u00E7a est\u00E1 presente."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method, and "try-catch-finally block" - * refers to the Java keywords with those names. "Outlined" is a - * technical term internal to XSLTC and should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_TRY_CATCH, - "Erro interno de XSLTC: o byte code gerado cont\u00E9m um bloco try-catch-finally e n\u00E3o pode ser outlined."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The terms "OutlineableChunkStart" and - * "OutlineableChunkEnd" are the names of classes internal to XSLTC and - * should not be translated. The message indicates that for every - * "start" there must be a corresponding "end", and vice versa, and - * that if one of a pair of "start" and "end" appears between another - * pair of corresponding "start" and "end", then the other half of the - * pair must also be between that same enclosing pair. - */ - {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS, - "Erro interno de XSLTC: os marcadores OutlineableChunkStart e OutlineableChunkEnd devem ser balanceados e aninhados corretamente."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method. The "method" that is being - * referred to is a Java method in a translet that XSLTC is generating - * in processing a stylesheet. The "instruction" that is being - * referred to is one of the instrutions in the Java byte code in that - * method. "Outlined" is a technical term internal to XSLTC and - * should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_DELETED_TARGET, - "Erro interno de XSLTC: ainda h\u00E1 refer\u00EAncia no m\u00E9todo original a uma instru\u00E7\u00E3o que fazia parte de um bloco de byte code que foi outlined." - }, - - - /* - * Note to translators: This message describes an internal error in the - * processor. The "method" that is being referred to is a Java method - * in a translet that XSLTC is generating. - * - */ - {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG, - "Erro interno de XSLTC: um m\u00E9todo no translet excede a limita\u00E7\u00E3o da M\u00E1quina Virtual Java quanto ao tamanho de um m\u00E9todo de de 64 kilobytes. Em geral, essa situa\u00E7\u00E3o \u00E9 causada por modelos de uma folha de estilos que s\u00E3o muito grandes. Tente reestruturar sua folha de estilos de forma a usar modelos menores." - }, - - }; - - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sk.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sk.java deleted file mode 100644 index 27c81236a12..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sk.java +++ /dev/null @@ -1,861 +0,0 @@ -/* - * 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.xalan.internal.xsltc.compiler.util; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_sk extends ListResourceBundle { - -/* - * XSLTC compile-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 5) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 6) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 7) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 8) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 9) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 10) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 11) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - {ErrorMsg.MULTIPLE_STYLESHEET_ERR, - "Viac ne\u017e jeden \u0161t\u00fdl dokumentu bol definovan\u00fd v rovnakom s\u00fabore."}, - - /* - * Note to translators: The substitution text is the name of a - * template. The same name was used on two different templates in the - * same stylesheet. - */ - {ErrorMsg.TEMPLATE_REDEF_ERR, - "Vzor ''{0}'' je u\u017e v tomto \u0161t\u00fdle dokumentu definovan\u00fd."}, - - - /* - * Note to translators: The substitution text is the name of a - * template. A reference to the template name was encountered, but the - * template is undefined. - */ - {ErrorMsg.TEMPLATE_UNDEF_ERR, - "Vzor ''{0}'' nie je v tomto \u0161t\u00fdle dokumentu definovan\u00fd."}, - - /* - * Note to translators: The substitution text is the name of a variable - * that was defined more than once. - */ - {ErrorMsg.VARIABLE_REDEF_ERR, - "Premenn\u00e1 ''{0}'' je viackr\u00e1t definovan\u00e1 v tom istom rozsahu."}, - - /* - * Note to translators: The substitution text is the name of a variable - * or parameter. A reference to the variable or parameter was found, - * but it was never defined. - */ - {ErrorMsg.VARIABLE_UNDEF_ERR, - "Premenn\u00e1 alebo parameter ''{0}'' nie je definovan\u00e1."}, - - /* - * Note to translators: The word "class" here refers to a Java class. - * Processing the stylesheet required a class to be loaded, but it could - * not be found. The substitution text is the name of the class. - */ - {ErrorMsg.CLASS_NOT_FOUND_ERR, - "Nie je mo\u017en\u00e9 n\u00e1js\u0165 triedu ''{0}''."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but it could not be found. "public" is the - * Java keyword. - */ - {ErrorMsg.METHOD_NOT_FOUND_ERR, - "Nie je mo\u017en\u00e9 n\u00e1js\u0165 extern\u00fa met\u00f3du ''{0}'' (mus\u00ed by\u0165 verejn\u00e1)."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but no method with the required types of - * arguments or return type could be found. - */ - {ErrorMsg.ARGUMENT_CONVERSION_ERR, - "Nie je mo\u017en\u00e9 konvertova\u0165 typ argumentu/n\u00e1vratu vo volan\u00ed met\u00f3dy ''{0}''"}, - - /* - * Note to translators: The file or URI named in the substitution text - * is missing. - */ - {ErrorMsg.FILE_NOT_FOUND_ERR, - "S\u00fabor alebo URI ''{0}'' sa nena\u0161li."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.INVALID_URI_ERR, - "Neplatn\u00fd URI ''{0}''."}, - - /* - * Note to translators: The file or URI named in the substitution text - * exists but could not be opened. - */ - {ErrorMsg.FILE_ACCESS_ERR, - "Nie je mo\u017en\u00e9 otvori\u0165 s\u00fabor alebo URI ''{0}''."}, - - /* - * Note to translators: and are - * keywords that should not be translated. - */ - {ErrorMsg.MISSING_ROOT_ERR, - "O\u010dak\u00e1va sa element alebo ."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ErrorMsg.NAMESPACE_UNDEF_ERR, - "Predpona n\u00e1zvov\u00e9ho priestoru ''{0}'' nie je deklarovan\u00e1."}, - - /* - * Note to translators: The Java function named in the stylesheet could - * not be found. - */ - {ErrorMsg.FUNCTION_RESOLVE_ERR, - "Nie je mo\u017en\u00e9 rozl\u00ed\u0161i\u0165 volanie funkcie ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a - * function. A literal string here means a constant string value. - */ - {ErrorMsg.NEED_LITERAL_ERR, - "Argument pre ''{0}'' mus\u00ed by\u0165 re\u0165azcom liter\u00e1lu."}, - - /* - * Note to translators: This message indicates there was a syntactic - * error in the form of an XPath expression. The substitution text is - * the expression. - */ - {ErrorMsg.XPATH_PARSER_ERR, - "Chyba pri anal\u00fdze v\u00fdrazu XPath ''{0}''."}, - - /* - * Note to translators: An element in the stylesheet requires a - * particular attribute named by the substitution text, but that - * attribute was not specified in the stylesheet. - */ - {ErrorMsg.REQUIRED_ATTR_ERR, - "Ch\u00fdba po\u017eadovan\u00fd atrib\u00fat ''{0}''."}, - - /* - * Note to translators: This message indicates that a character not - * permitted in an XPath expression was encountered. The substitution - * text is the offending character. - */ - {ErrorMsg.ILLEGAL_CHAR_ERR, - "Neplatn\u00fd znak ''{0}'' vo v\u00fdraze XPath."}, - - /* - * Note to translators: A processing instruction is a mark-up item in - * an XML document that request some behaviour of an XML processor. The - * form of the name of was invalid in this case, and the substitution - * text is the name. - */ - {ErrorMsg.ILLEGAL_PI_ERR, - "Neplatn\u00fd n\u00e1zov ''{0}'' pre in\u0161trukciu spracovania."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ErrorMsg.STRAY_ATTRIBUTE_ERR, - "Atrib\u00fat ''{0}'' mimo elementu."}, - - /* - * Note to translators: An attribute that wasn't recognized was - * specified on an element in the stylesheet. The attribute is named - * by the substitution - * text. - */ - {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "Neleg\u00e1lny atrib\u00fat ''{0}''."}, - - /* - * Note to translators: "import" and "include" are keywords that should - * not be translated. This messages indicates that the stylesheet - * named in the substitution text imported or included itself either - * directly or indirectly. - */ - {ErrorMsg.CIRCULAR_INCLUDE_ERR, - "Cirkul\u00e1rny import/zahrnutie. \u0160t\u00fdl dokumentu ''{0}'' je u\u017e zaveden\u00fd."}, - - /* - * Note to translators: A result-tree fragment is a portion of a - * resulting XML document represented as a tree. "" is a - * keyword and should not be translated. - */ - {ErrorMsg.RESULT_TREE_SORT_ERR, - "Fragmenty stromu v\u00fdsledkov nemo\u017eno triedi\u0165 (elementy s\u00fa ignorovan\u00e9). Ke\u010f vytv\u00e1rate v\u00fdsledkov\u00fd strom, mus\u00edte triedi\u0165 uzly."}, - - /* - * Note to translators: A name can be given to a particular style to be - * used to format decimal values. The substitution text gives the name - * of such a style for which more than one declaration was encountered. - */ - {ErrorMsg.SYMBOLS_REDEF_ERR, - "Desiatkov\u00e9 form\u00e1tovanie ''{0}'' je u\u017e definovan\u00e9."}, - - /* - * Note to translators: The stylesheet version named in the - * substitution text is not supported. - */ - {ErrorMsg.XSL_VERSION_ERR, - "Verzia XSL ''{0}'' nie je podporovan\u00e1 XSLTC."}, - - /* - * Note to translators: The definitions of one or more variables or - * parameters depend on one another. - */ - {ErrorMsg.CIRCULAR_VARIABLE_ERR, - "Cirkul\u00e1rna referencia premennej/parametra v ''{0}''."}, - - /* - * Note to translators: The operator in an expresion with two operands was - * not recognized. - */ - {ErrorMsg.ILLEGAL_BINARY_OP_ERR, - "Nezn\u00e1my oper\u00e1tor pre bin\u00e1rny v\u00fdraz."}, - - /* - * Note to translators: This message is produced if a reference to a - * function has too many or too few arguments. - */ - {ErrorMsg.ILLEGAL_ARG_ERR, - "Neplatn\u00fd argument(y) pre volanie funkcie."}, - - /* - * Note to translators: "document()" is the name of function and must - * not be translated. A node-set is a set of the nodes in the tree - * representation of an XML document. - */ - {ErrorMsg.DOCUMENT_ARG_ERR, - "Druh\u00fd argument pre funkciu dokumentu() mus\u00ed by\u0165 sada uzlov."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.MISSING_WHEN_ERR, - "V sa vy\u017eaduje najmenej jeden element ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.MULTIPLE_OTHERWISE_ERR, - "V je povolen\u00fd len jeden element ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.STRAY_OTHERWISE_ERR, - " mo\u017eno pou\u017ei\u0165 len v ."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.STRAY_WHEN_ERR, - " mo\u017eno pou\u017ei\u0165 len v ."}, - - /* - * Note to translators: "", "" and - * "" are keywords and should not be translated. This - * message describes a syntax error in the stylesheet. - */ - {ErrorMsg.WHEN_ELEMENT_ERR, - "V s\u00fa povolen\u00e9 len elementy a ."}, - - /* - * Note to translators: "" and "name" are keywords - * that should not be translated. - */ - {ErrorMsg.UNNAMED_ATTRIBSET_ERR, - " ch\u00fdba atrib\u00fat 'name'."}, - - /* - * Note to translators: An element in the stylesheet contained an - * element of a type that it was not permitted to contain. - */ - {ErrorMsg.ILLEGAL_CHILD_ERR, - "Neplatn\u00fd element potomka."}, - - /* - * Note to translators: The stylesheet tried to create an element with - * a name that was not a valid XML name. The substitution text contains - * the name. - */ - {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, - "Nem\u00f4\u017eete vola\u0165 element ''{0}''"}, - - /* - * Note to translators: The stylesheet tried to create an attribute - * with a name that was not a valid XML name. The substitution text - * contains the name. - */ - {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, - "Nem\u00f4\u017eete vola\u0165 atrib\u00fat ''{0}''"}, - - /* - * Note to translators: The children of the outermost element of a - * stylesheet are referred to as top-level elements. No text should - * occur within that outermost element unless it is within a top-level - * element. This message indicates that that constraint was violated. - * "" is a keyword that should not be translated. - */ - {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, - "Textov\u00e9 \u00fadaje s\u00fa mimo elementu vrchnej \u00farovne ."}, - - /* - * Note to translators: JAXP is an acronym for the Java API for XML - * Processing. This message indicates that the XML parser provided to - * XSLTC to process the XML input document had a configuration problem. - */ - {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "Analyz\u00e1tor JAXP nie je spr\u00e1vne nakonfigurovan\u00fd"}, - - /* - * Note to translators: The substitution text names the internal error - * encountered. - */ - {ErrorMsg.INTERNAL_ERR, - "Neodstr\u00e1nite\u013en\u00e1 intern\u00e1 chyba XSLTC: ''{0}''"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {ErrorMsg.UNSUPPORTED_XSL_ERR, - "Nepodporovan\u00fd element XSL ''{0}''."}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does - * not recognized the particular extension named. The substitution text - * gives the extension name. - */ - {ErrorMsg.UNSUPPORTED_EXT_ERR, - "Nerozl\u00ed\u0161en\u00e9 roz\u0161\u00edrenie XSLTC ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. XSLTC is able to detect that in this - * case because the outermost element in the stylesheet has to be - * declared with respect to the XSL namespace URI, but no declaration - * for that namespace was seen. - */ - {ErrorMsg.MISSING_XSLT_URI_ERR, - "Vstupn\u00fd dokument nie je \u0161t\u00fdlom dokumentu (n\u00e1zvov\u00fd priestor XSL nie je deklarovan\u00fd v kore\u0148ovom elemente)."}, - - /* - * Note to translators: XSLTC could not find the stylesheet document - * with the name specified by the substitution text. - */ - {ErrorMsg.MISSING_XSLT_TARGET_ERR, - "Nebolo mo\u017en\u00e9 n\u00e1js\u0165 cie\u013e \u0161t\u00fdlu dokumentu ''{0}''."}, - - /* - * Note to translators: access to the stylesheet target is denied - */ - {ErrorMsg.ACCESSING_XSLT_TARGET_ERR, - "Could not read stylesheet target ''{0}'', because ''{1}'' access is not allowed."}, - - /* - * Note to translators: This message represents an internal error in - * condition in XSLTC. The substitution text is the class name in XSLTC - * that is missing some functionality. - */ - {ErrorMsg.NOT_IMPLEMENTED_ERR, - "Nie je implementovan\u00e9: ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. - */ - {ErrorMsg.NOT_STYLESHEET_ERR, - "Vstupn\u00fd dokument neobsahuje \u0161t\u00fdl dokumentu XSL."}, - - /* - * Note to translators: The element named in the substitution text was - * encountered in the stylesheet but is not recognized. - */ - {ErrorMsg.ELEMENT_PARSE_ERR, - "Nebolo mo\u017en\u00e9 analyzova\u0165 element ''{0}''"}, - - /* - * Note to translators: "use", "", "node", "node-set", "string" - * and "number" are keywords in this context and should not be - * translated. This message indicates that the value of the "use" - * attribute was not one of the permitted values. - */ - {ErrorMsg.KEY_USE_ATTR_ERR, - "Atrib\u00fat pou\u017eitia mus\u00ed by\u0165 uzol, sada uzlov, re\u0165azec alebo \u010d\u00edslo."}, - - /* - * Note to translators: An XML document can specify the version of the - * XML specification to which it adheres. This message indicates that - * the version specified for the output document was not valid. - */ - {ErrorMsg.OUTPUT_VERSION_ERR, - "Verzia v\u00fdstupn\u00e9ho dokumentu XML by mala by\u0165 1.0"}, - - /* - * Note to translators: The operator in a comparison operation was - * not recognized. - */ - {ErrorMsg.ILLEGAL_RELAT_OP_ERR, - "Nezn\u00e1my oper\u00e1tor pre rela\u010dn\u00fd v\u00fdraz"}, - - /* - * Note to translators: An attribute set defines as a set of XML - * attributes that can be added to an element in the output XML document - * as a group. This message is reported if the name specified was not - * used to declare an attribute set. The substitution text is the name - * that is in error. - */ - {ErrorMsg.ATTRIBSET_UNDEF_ERR, - "Pokus o pou\u017eitie neexistuj\u00facej sady atrib\u00fatov ''{0}''."}, - - /* - * Note to translators: The term "attribute value template" is a term - * defined by XSLT which describes the value of an attribute that is - * determined by an XPath expression. The message indicates that the - * expression was syntactically incorrect; the substitution text - * contains the expression that was in error. - */ - {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, - "Nie je mo\u017en\u00e9 analyzova\u0165 vzor hodnoty atrib\u00fatu ''{0}''."}, - - /* - * Note to translators: ??? - */ - {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, - "Nezn\u00e1my typ \u00fadajov v podpise pre triedu ''{0}''."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of - * type {0}. - */ - {ErrorMsg.DATA_CONVERSION_ERR, - "Nie je mo\u017en\u00e9 konvertova\u0165 typ \u00fadajov ''{0}'' na ''{1}''."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_TRANSLET_CLASS_ERR, - "Tento vzor neobsahuje platn\u00fa defin\u00edciu triedy transletu."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_MAIN_TRANSLET_ERR, - "Tento vzor neobsahuje triedu s n\u00e1zvom ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSLET_CLASS_ERR, - "Nebolo mo\u017en\u00e9 zavies\u0165 triedu transletu ''{0}''."}, - - {ErrorMsg.TRANSLET_OBJECT_ERR, - "Trieda transletu zaveden\u00e1, ale nie je mo\u017en\u00e9 vytvori\u0165 in\u0161tanciu transletu."}, - - /* - * Note to translators: "ErrorListener" is a Java interface name that - * should not be translated. The message indicates that the user tried - * to set an ErrorListener object on object of the class named in the - * substitution text with "null" Java value. - */ - {ErrorMsg.ERROR_LISTENER_NULL_ERR, - "Pokus o nastavenie ErrorListener pre ''{0}'' na null"}, - - /* - * Note to translators: StreamSource, SAXSource and DOMSource are Java - * interface names that should not be translated. - */ - {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, - "XSLTC podporuje len StreamSource, SAXSource a DOMSource"}, - - /* - * Note to translators: "Source" is a Java class name that should not - * be translated. The substitution text is the name of Java method. - */ - {ErrorMsg.JAXP_NO_SOURCE_ERR, - "Objekt zdroja odovzdan\u00fd ''{0}'' nem\u00e1 \u017eiadny obsah."}, - - /* - * Note to translators: The message indicates that XSLTC failed to - * compile the stylesheet into a translet (class file). - */ - {ErrorMsg.JAXP_COMPILE_ERR, - "Nebolo mo\u017en\u00e9 skompilova\u0165 \u0161t\u00fdl dokumentu"}, - - /* - * Note to translators: "TransformerFactory" is a class name. In this - * context, an attribute is a property or setting of the - * TransformerFactory object. The substitution text is the name of the - * unrecognised attribute. The method used to retrieve the attribute is - * "getAttribute", so it's not clear whether it would be best to - * translate the term "attribute". - */ - {ErrorMsg.JAXP_INVALID_ATTR_ERR, - "TransformerFactory nerozozn\u00e1va atrib\u00fat ''{0}''."}, - - /* - * Note to translators: "setResult()" and "startDocument()" are Java - * method names that should not be translated. - */ - {ErrorMsg.JAXP_SET_RESULT_ERR, - "setResult() sa mus\u00ed vola\u0165 pred startDocument()."}, - - /* - * Note to translators: "Transformer" is a Java interface name that - * should not be translated. A Transformer object should contained a - * reference to a translet object in order to be used for - * transformations; this message is produced if that requirement is not - * met. - */ - {ErrorMsg.JAXP_NO_TRANSLET_ERR, - "Transform\u00e1tor nem\u00e1 \u017eiadny zapuzdren\u00fd objekt transletu."}, - - /* - * Note to translators: The XML document that results from a - * transformation needs to be sent to an output handler object; this - * message is produced if that requirement is not met. - */ - {ErrorMsg.JAXP_NO_HANDLER_ERR, - "Pre v\u00fdsledok transform\u00e1cie nebol definovan\u00fd \u017eiadny v\u00fdstupn\u00fd handler."}, - - /* - * Note to translators: "Result" is a Java interface name in this - * context. The substitution text is a method name. - */ - {ErrorMsg.JAXP_NO_RESULT_ERR, - "Objekt v\u00fdsledku odovzdan\u00fd ''{0}'' je neplatn\u00fd."}, - - /* - * Note to translators: "Transformer" is a Java interface name. The - * user's program attempted to access an unrecognized property with the - * name specified in the substitution text. The method used to retrieve - * the property is "getOutputProperty", so it's not clear whether it - * would be best to translate the term "property". - */ - {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, - "Pokus o pr\u00edstup k neplatn\u00e9mu majetku transform\u00e1tora ''{0}''."}, - - /* - * Note to translators: SAX2DOM is the name of a Java class that should - * not be translated. This is an adapter in the sense that it takes a - * DOM object and converts it to something that uses the SAX API. - */ - {ErrorMsg.SAX2DOM_ADAPTER_ERR, - "Nebolo mo\u017en\u00e9 vytvori\u0165 adapt\u00e9r SAX2DOM: ''{0}''."}, - - /* - * Note to translators: "XSLTCSource.build()" is a Java method name. - * "systemId" is an XML term that is short for "system identification". - */ - {ErrorMsg.XSLTC_SOURCE_ERR, - "XSLTCSource.build() bol zavolan\u00fd bez nastaven\u00e9ho systemId."}, - - - {ErrorMsg.COMPILE_STDIN_ERR, - "Vo\u013eba -i sa mus\u00ed pou\u017e\u00edva\u0165 s vo\u013ebou -o."}, - - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java package, so - * it should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.COMPILE_USAGE_STR, - "SYNOPSIS\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o ]\n [-d ] [-j ] [-p ]\n [-n] [-x] [-s] [-u] [-v] [-h] { | -i }\n\nOPTIONS\n -o prira\u010fuje n\u00e1zov generovan\u00e9mu transletu \n. \u0160tandardne sa n\u00e1zov transletu \n berie z n\u00e1zvu . T\u00e1to vo\u013eba sa ignoruje pri kompilovan\u00ed viacer\u00fdch \u0161t\u00fdlov dokumentov\n\n. -d uv\u00e1dza cie\u013eov\u00fd adres\u00e1r pre translet\n -j pakuje triedy transletov do s\u00faboru jar n\u00e1zvu \n uveden\u00e9ho ako \n -p uv\u00e1dza predponu n\u00e1zvu bal\u00edku pre v\u0161etky generovan\u00e9 triedy transletu.\n\n -n povo\u013euje zoradenie vzorov v riadku (\u0161tandardn\u00e9 chovanie v priemere lep\u0161ie). \n\n -x zap\u00edna v\u00fdstupy spr\u00e1v ladenia \n -s zakazuje volanie System.exit\n -u interpretuje argumenty ako URL\n -i n\u00fati kompil\u00e1tor \u010d\u00edta\u0165 \u0161t\u00fdl dokumentu z stdin\n -v tla\u010d\u00ed verziu kompil\u00e1tora\n -h tla\u010d\u00ed pr\u00edkaz tohto pou\u017eitia\n"}, - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java class, so it - * should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.TRANSFORM_USAGE_STR, - "SYNOPSIS \n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j ]\n [-x] [-s] [-n ] {-u | }\n [= ...]\n\n pou\u017e\u00edva translet na transform\u00e1ciu dokumentu XML \n uveden\u00e9ho ako . transletu je bu\u010f v \n u\u017e\u00edvate\u013eovej CLASSPATH alebo vo volite\u013ene uvedenom .\nVO\u013dBY\n -j uv\u00e1dza s\u00fabor jar, z ktor\u00e9ho sa m\u00e1 zavies\u0165 translet\n -x zap\u00edna \u010fal\u0161\u00ed v\u00fdstup spr\u00e1v ladenia\n -s zakazuje volanie System.exit\n -n sp\u00fa\u0161\u0165a transform\u00e1ciu r\u00e1z a \n zobrazuje inform\u00e1cie profilovania\n -u uv\u00e1dza vstupn\u00fd dokument XML ako URL\n"}, - - - - /* - * Note to translators: "", "" and - * "" are keywords that should not be translated. - * The message indicates that an xsl:sort element must be a child of - * one of the other kinds of elements mentioned. - */ - {ErrorMsg.STRAY_SORT_ERR, - " mo\u017eno pou\u017ei\u0165 len v alebo ."}, - - /* - * Note to translators: The message indicates that the encoding - * requested for the output document was on that requires support that - * is not available from the Java Virtual Machine being used to execute - * the program. - */ - {ErrorMsg.UNSUPPORTED_ENCODING, - "V\u00fdstupn\u00e9 k\u00f3dovanie ''{0}'' nie je v tomto JVM podporovan\u00e9."}, - - /* - * Note to translators: The message indicates that the XPath expression - * named in the substitution text was not well formed syntactically. - */ - {ErrorMsg.SYNTAX_ERR, - "Chyba syntaxe v ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a Java - * class. The term "constructor" here is the Java term. The message is - * displayed if XSLTC could not find a constructor for the specified - * class. - */ - {ErrorMsg.CONSTRUCTOR_NOT_FOUND, - "Nie je mo\u017en\u00e9 n\u00e1js\u0165 extern\u00fd kon\u0161truktor ''{0}''."}, - - /* - * Note to translators: "static" is the Java keyword. The substitution - * text is the name of a function. The first argument of that function - * is not of the required type. - */ - {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, - "Prv\u00fd argument pre nestatick\u00fa funkciu Java ''{0}'' nie je platnou referenciou objektu."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. The substitution text is the - * expression that was in error. - */ - {ErrorMsg.TYPE_CHECK_ERR, - "Chyba pri kontrole typu v\u00fdrazu ''{0}''."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. However, the location of the - * problematic expression is unknown. - */ - {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, - "Chyba pri kontrole typu v\u00fdrazu na nezn\u00e1mom mieste."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option that was not recognized. - */ - {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, - "Vo\u013eba pr\u00edkazov\u00e9ho riadka ''{0}'' je neplatn\u00e1."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option. - */ - {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, - "Vo\u013ebe pr\u00edkazov\u00e9ho riadka ''{0}'' ch\u00fdba po\u017eadovan\u00fd argument."}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, - "UPOZORNENIE: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.WARNING_MSG, - "UPOZORNENIE: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, - "KRITICK\u00c1 CHYBA: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.FATAL_ERR_MSG, - "KRITICK\u00c1 CHYBA: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, - "CHYBA: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.ERROR_MSG, - "CHYBA: ''{0}''"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, - "Transform\u00e1cia pomocou transletu ''{0}'' "}, - - /* - * Note to translators: The first substitution is the name of a class, - * while the second substitution is the name of a jar file. - */ - {ErrorMsg.TRANSFORM_WITH_JAR_STR, - "Transform\u00e1cia pomocou transletu ''{0}'' zo s\u00faboru jar ''{1}''"}, - - /* - * Note to translators: "TransformerFactory" is the name of a Java - * interface and must not be translated. The substitution text is - * the name of the class that could not be instantiated. - */ - {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, - "Nebolo mo\u017en\u00e9 vytvori\u0165 in\u0161tanciu triedy TransformerFactory ''{0}''."}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages are collected together and displayed beneath - * this message. - */ - {ErrorMsg.COMPILER_ERROR_KEY, - "Chyby preklada\u010da:"}, - - /* - * Note to translators: The following message is used as a header. - * All the warning messages are collected together and displayed - * beneath this message. - */ - {ErrorMsg.COMPILER_WARNING_KEY, - "Upozornenia preklada\u010da:"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages that are produced when the stylesheet is - * applied to an input document are collected together and displayed - * beneath this message. A 'translet' is the compiled form of a - * stylesheet (see above). - */ - {ErrorMsg.RUNTIME_ERROR_KEY, - "Chyby transletu:"}, - - {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present."} - }; - - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java deleted file mode 100644 index 78a7a6b92e3..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java +++ /dev/null @@ -1,986 +0,0 @@ -/* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.xsltc.compiler.util; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_sv extends ListResourceBundle { - -/* - * XSLTC compile-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 5) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 6) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 7) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 8) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 9) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 10) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 11) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - {ErrorMsg.MULTIPLE_STYLESHEET_ERR, - "Fler \u00E4n en formatmall har definierats i samma fil."}, - - /* - * Note to translators: The substitution text is the name of a - * template. The same name was used on two different templates in the - * same stylesheet. - */ - {ErrorMsg.TEMPLATE_REDEF_ERR, - "Mallen ''{0}'' har redan definierats i denna formatmall."}, - - - /* - * Note to translators: The substitution text is the name of a - * template. A reference to the template name was encountered, but the - * template is undefined. - */ - {ErrorMsg.TEMPLATE_UNDEF_ERR, - "Mallen ''{0}'' har inte definierats i denna formatmall."}, - - /* - * Note to translators: The substitution text is the name of a variable - * that was defined more than once. - */ - {ErrorMsg.VARIABLE_REDEF_ERR, - "Variabeln ''{0}'' har definierats flera g\u00E5nger i samma omfattning."}, - - /* - * Note to translators: The substitution text is the name of a variable - * or parameter. A reference to the variable or parameter was found, - * but it was never defined. - */ - {ErrorMsg.VARIABLE_UNDEF_ERR, - "Variabeln eller parametern ''{0}'' har inte definierats."}, - - /* - * Note to translators: The word "class" here refers to a Java class. - * Processing the stylesheet required a class to be loaded, but it could - * not be found. The substitution text is the name of the class. - */ - {ErrorMsg.CLASS_NOT_FOUND_ERR, - "Hittar inte klassen ''{0}''."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but it could not be found. "public" is the - * Java keyword. - */ - {ErrorMsg.METHOD_NOT_FOUND_ERR, - "Hittar inte den externa metoden ''{0}'' (m\u00E5ste vara allm\u00E4n)."}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but no method with the required types of - * arguments or return type could be found. - */ - {ErrorMsg.ARGUMENT_CONVERSION_ERR, - "Kan inte konvertera argument/returtyp vid anrop till metoden ''{0}''"}, - - /* - * Note to translators: The file or URI named in the substitution text - * is missing. - */ - {ErrorMsg.FILE_NOT_FOUND_ERR, - "Fil eller URI ''{0}'' hittades inte."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.INVALID_URI_ERR, - "Ogiltig URI ''{0}''."}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.CATALOG_EXCEPTION, - "JAXP08090001: CatalogResolver \u00E4r aktiverat med katalogen \"{0}\", men ett CatalogException returneras."}, - - /* - * Note to translators: The file or URI named in the substitution text - * exists but could not be opened. - */ - {ErrorMsg.FILE_ACCESS_ERR, - "Kan inte \u00F6ppna filen eller URI ''{0}''."}, - - /* - * Note to translators: and are - * keywords that should not be translated. - */ - {ErrorMsg.MISSING_ROOT_ERR, - "F\u00F6rv\u00E4ntade - eller -element."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ErrorMsg.NAMESPACE_UNDEF_ERR, - "Namnrymdsprefixet ''{0}'' har inte deklarerats."}, - - /* - * Note to translators: The Java function named in the stylesheet could - * not be found. - */ - {ErrorMsg.FUNCTION_RESOLVE_ERR, - "Kan inte matcha anrop till funktionen ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a - * function. A literal string here means a constant string value. - */ - {ErrorMsg.NEED_LITERAL_ERR, - "Argument till ''{0}'' m\u00E5ste vara en litteral str\u00E4ng."}, - - /* - * Note to translators: This message indicates there was a syntactic - * error in the form of an XPath expression. The substitution text is - * the expression. - */ - {ErrorMsg.XPATH_PARSER_ERR, - "Fel vid tolkning av XPath-uttrycket ''{0}''."}, - - /* - * Note to translators: An element in the stylesheet requires a - * particular attribute named by the substitution text, but that - * attribute was not specified in the stylesheet. - */ - {ErrorMsg.REQUIRED_ATTR_ERR, - "Det obligatoriska attributet ''{0}'' saknas."}, - - /* - * Note to translators: This message indicates that a character not - * permitted in an XPath expression was encountered. The substitution - * text is the offending character. - */ - {ErrorMsg.ILLEGAL_CHAR_ERR, - "Otill\u00E5tet tecken ''{0}'' i XPath-uttrycket."}, - - /* - * Note to translators: A processing instruction is a mark-up item in - * an XML document that request some behaviour of an XML processor. The - * form of the name of was invalid in this case, and the substitution - * text is the name. - */ - {ErrorMsg.ILLEGAL_PI_ERR, - "''{0}'' \u00E4r ett otill\u00E5tet namn i bearbetningsinstruktion."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ErrorMsg.STRAY_ATTRIBUTE_ERR, - "Attributet ''{0}'' finns utanf\u00F6r elementet."}, - - /* - * Note to translators: An attribute that wasn't recognized was - * specified on an element in the stylesheet. The attribute is named - * by the substitution - * text. - */ - {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "''{0}'' \u00E4r ett otill\u00E5tet attribut."}, - - /* - * Note to translators: "import" and "include" are keywords that should - * not be translated. This messages indicates that the stylesheet - * named in the substitution text imported or included itself either - * directly or indirectly. - */ - {ErrorMsg.CIRCULAR_INCLUDE_ERR, - "Cirkul\u00E4r import/include. Formatmallen ''{0}'' har redan laddats."}, - - /* - * Note to translators: "xsl:import" and "xsl:include" are keywords that - * should not be translated. - */ - {ErrorMsg.IMPORT_PRECEDE_OTHERS_ERR, - "Underordnade till xsl:import-elementet m\u00E5ste komma f\u00F6re alla andra underordnade till element f\u00F6r ett xsl:stylesheet-element, inklusive alla underordnade till xsl:include-elementet."}, - - /* - * Note to translators: A result-tree fragment is a portion of a - * resulting XML document represented as a tree. "" is a - * keyword and should not be translated. - */ - {ErrorMsg.RESULT_TREE_SORT_ERR, - "Resultattr\u00E4dfragment kan inte sorteras (-element ignoreras). Du m\u00E5ste sortera noderna n\u00E4r resultattr\u00E4det skapas."}, - - /* - * Note to translators: A name can be given to a particular style to be - * used to format decimal values. The substitution text gives the name - * of such a style for which more than one declaration was encountered. - */ - {ErrorMsg.SYMBOLS_REDEF_ERR, - "Decimalformateringen ''{0}'' har redan definierats."}, - - /* - * Note to translators: The stylesheet version named in the - * substitution text is not supported. - */ - {ErrorMsg.XSL_VERSION_ERR, - "XSL-versionen ''{0}'' underst\u00F6ds inte i XSLTC."}, - - /* - * Note to translators: The definitions of one or more variables or - * parameters depend on one another. - */ - {ErrorMsg.CIRCULAR_VARIABLE_ERR, - "Cirkul\u00E4r variabel-/parameterreferens i ''{0}''."}, - - /* - * Note to translators: The operator in an expresion with two operands was - * not recognized. - */ - {ErrorMsg.ILLEGAL_BINARY_OP_ERR, - "Ok\u00E4nd operator f\u00F6r bin\u00E4rt uttryck."}, - - /* - * Note to translators: This message is produced if a reference to a - * function has too many or too few arguments. - */ - {ErrorMsg.ILLEGAL_ARG_ERR, - "Otill\u00E5tna argument f\u00F6r funktionsanrop."}, - - /* - * Note to translators: "document()" is the name of function and must - * not be translated. A node-set is a set of the nodes in the tree - * representation of an XML document. - */ - {ErrorMsg.DOCUMENT_ARG_ERR, - "Andra argumentet f\u00F6r document()-funktion m\u00E5ste vara en nodupps\u00E4ttning."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.MISSING_WHEN_ERR, - "Minst ett -element kr\u00E4vs i ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.MULTIPLE_OTHERWISE_ERR, - "Endast ett -element \u00E4r till\u00E5tet i ."}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.STRAY_OTHERWISE_ERR, - " anv\u00E4nds endast inom ."}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.STRAY_WHEN_ERR, - " anv\u00E4nds endast inom ."}, - - /* - * Note to translators: "", "" and - * "" are keywords and should not be translated. This - * message describes a syntax error in the stylesheet. - */ - {ErrorMsg.WHEN_ELEMENT_ERR, - "Endast - och -element \u00E4r till\u00E5tna i ."}, - - /* - * Note to translators: "" and "name" are keywords - * that should not be translated. - */ - {ErrorMsg.UNNAMED_ATTRIBSET_ERR, - " saknar 'name'-attribut."}, - - /* - * Note to translators: An element in the stylesheet contained an - * element of a type that it was not permitted to contain. - */ - {ErrorMsg.ILLEGAL_CHILD_ERR, - "Otill\u00E5tet underordnat element."}, - - /* - * Note to translators: The stylesheet tried to create an element with - * a name that was not a valid XML name. The substitution text contains - * the name. - */ - {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, - "Du kan inte anropa elementet ''{0}''"}, - - /* - * Note to translators: The stylesheet tried to create an attribute - * with a name that was not a valid XML name. The substitution text - * contains the name. - */ - {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, - "Du kan inte anropa attributet ''{0}''"}, - - /* - * Note to translators: The children of the outermost element of a - * stylesheet are referred to as top-level elements. No text should - * occur within that outermost element unless it is within a top-level - * element. This message indicates that that constraint was violated. - * "" is a keyword that should not be translated. - */ - {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, - "Textdata utanf\u00F6r toppniv\u00E5elementet ."}, - - /* - * Note to translators: JAXP is an acronym for the Java API for XML - * Processing. This message indicates that the XML parser provided to - * XSLTC to process the XML input document had a configuration problem. - */ - {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "JAXP-parser har inte konfigurerats korrekt"}, - - /* - * Note to translators: The substitution text names the internal error - * encountered. - */ - {ErrorMsg.INTERNAL_ERR, - "O\u00E5terkalleligt internt XSLTC-fel: ''{0}''"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {ErrorMsg.UNSUPPORTED_XSL_ERR, - "XSL-elementet ''{0}'' st\u00F6ds inte."}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does - * not recognized the particular extension named. The substitution text - * gives the extension name. - */ - {ErrorMsg.UNSUPPORTED_EXT_ERR, - "XSLTC-till\u00E4gget ''{0}'' \u00E4r ok\u00E4nt."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. XSLTC is able to detect that in this - * case because the outermost element in the stylesheet has to be - * declared with respect to the XSL namespace URI, but no declaration - * for that namespace was seen. - */ - {ErrorMsg.MISSING_XSLT_URI_ERR, - "Indatadokumentet \u00E4r ingen formatmall (XSL-namnrymden har inte deklarerats i rotelementet)."}, - - /* - * Note to translators: XSLTC could not find the stylesheet document - * with the name specified by the substitution text. - */ - {ErrorMsg.MISSING_XSLT_TARGET_ERR, - "Hittade inte formatmallen ''{0}''."}, - - /* - * Note to translators: access to the stylesheet target is denied - */ - {ErrorMsg.ACCESSING_XSLT_TARGET_ERR, - "Kunde inte l\u00E4sa formatmallen ''{0}'', eftersom ''{1}''-\u00E5tkomst inte till\u00E5ts p\u00E5 grund av begr\u00E4nsning som anges av egenskapen accessExternalStylesheet."}, - - /* - * Note to translators: This message represents an internal error in - * condition in XSLTC. The substitution text is the class name in XSLTC - * that is missing some functionality. - */ - {ErrorMsg.NOT_IMPLEMENTED_ERR, - "Inte implementerad: ''{0}''."}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. - */ - {ErrorMsg.NOT_STYLESHEET_ERR, - "Indatadokumentet inneh\u00E5ller ingen XSL-formatmall."}, - - /* - * Note to translators: The element named in the substitution text was - * encountered in the stylesheet but is not recognized. - */ - {ErrorMsg.ELEMENT_PARSE_ERR, - "Kunde inte tolka elementet ''{0}''"}, - - /* - * Note to translators: "use", "", "node", "node-set", "string" - * and "number" are keywords in this context and should not be - * translated. This message indicates that the value of the "use" - * attribute was not one of the permitted values. - */ - {ErrorMsg.KEY_USE_ATTR_ERR, - "use-attribut f\u00F6r m\u00E5ste vara node, node-set, string eller number."}, - - /* - * Note to translators: An XML document can specify the version of the - * XML specification to which it adheres. This message indicates that - * the version specified for the output document was not valid. - */ - {ErrorMsg.OUTPUT_VERSION_ERR, - "XML-dokumentets utdataversion m\u00E5ste vara 1.0"}, - - /* - * Note to translators: The operator in a comparison operation was - * not recognized. - */ - {ErrorMsg.ILLEGAL_RELAT_OP_ERR, - "Ok\u00E4nd operator f\u00F6r relationsuttryck"}, - - /* - * Note to translators: An attribute set defines as a set of XML - * attributes that can be added to an element in the output XML document - * as a group. This message is reported if the name specified was not - * used to declare an attribute set. The substitution text is the name - * that is in error. - */ - {ErrorMsg.ATTRIBSET_UNDEF_ERR, - "F\u00F6rs\u00F6ker anv\u00E4nda en icke-befintlig attributupps\u00E4ttning ''{0}''."}, - - /* - * Note to translators: The term "attribute value template" is a term - * defined by XSLT which describes the value of an attribute that is - * determined by an XPath expression. The message indicates that the - * expression was syntactically incorrect; the substitution text - * contains the expression that was in error. - */ - {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, - "Kan inte tolka attributv\u00E4rdemallen ''{0}''."}, - - /* - * Note to translators: ??? - */ - {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, - "Ok\u00E4nd datatyp i signaturen f\u00F6r klassen ''{0}''."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of - * type {0}. - */ - {ErrorMsg.DATA_CONVERSION_ERR, - "Kan inte konvertera datatyp ''{0}'' till ''{1}''."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_TRANSLET_CLASS_ERR, - "Templates inneh\u00E5ller inte n\u00E5gon giltig klassdefinition f\u00F6r translet."}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_MAIN_TRANSLET_ERR, - "Templates inneh\u00E5ller inte n\u00E5gon klass med namnet ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSLET_CLASS_ERR, - "Kunde inte ladda translet-klassen ''{0}''."}, - - {ErrorMsg.TRANSLET_OBJECT_ERR, - "Translet-klassen har laddats, men kan inte skapa instans av translet."}, - - /* - * Note to translators: "ErrorListener" is a Java interface name that - * should not be translated. The message indicates that the user tried - * to set an ErrorListener object on object of the class named in the - * substitution text with "null" Java value. - */ - {ErrorMsg.ERROR_LISTENER_NULL_ERR, - "F\u00F6rs\u00F6ker st\u00E4lla in ErrorListener f\u00F6r ''{0}'' p\u00E5 null"}, - - /* - * Note to translators: StreamSource, SAXSource and DOMSource are Java - * interface names that should not be translated. - */ - {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, - "Endast StreamSource, SAXSource och DOMSource st\u00F6ds av XSLTC"}, - - /* - * Note to translators: "Source" is a Java class name that should not - * be translated. The substitution text is the name of Java method. - */ - {ErrorMsg.JAXP_NO_SOURCE_ERR, - "Source-objektet som \u00F6verf\u00F6rdes till ''{0}'' saknar inneh\u00E5ll."}, - - /* - * Note to translators: The message indicates that XSLTC failed to - * compile the stylesheet into a translet (class file). - */ - {ErrorMsg.JAXP_COMPILE_ERR, - "Kunde inte kompilera formatmall"}, - - /* - * Note to translators: "TransformerFactory" is a class name. In this - * context, an attribute is a property or setting of the - * TransformerFactory object. The substitution text is the name of the - * unrecognised attribute. The method used to retrieve the attribute is - * "getAttribute", so it's not clear whether it would be best to - * translate the term "attribute". - */ - {ErrorMsg.JAXP_INVALID_ATTR_ERR, - "TransformerFactory k\u00E4nner inte igen attributet ''{0}''."}, - - {ErrorMsg.JAXP_INVALID_ATTR_VALUE_ERR, - "Fel v\u00E4rde har angetts f\u00F6r attributet ''{0}''."}, - - /* - * Note to translators: "setResult()" and "startDocument()" are Java - * method names that should not be translated. - */ - {ErrorMsg.JAXP_SET_RESULT_ERR, - "setResult() m\u00E5ste anropas f\u00F6re startDocument()."}, - - /* - * Note to translators: "Transformer" is a Java interface name that - * should not be translated. A Transformer object should contained a - * reference to a translet object in order to be used for - * transformations; this message is produced if that requirement is not - * met. - */ - {ErrorMsg.JAXP_NO_TRANSLET_ERR, - "Transformer saknar inkapslat objekt f\u00F6r translet."}, - - /* - * Note to translators: The XML document that results from a - * transformation needs to be sent to an output handler object; this - * message is produced if that requirement is not met. - */ - {ErrorMsg.JAXP_NO_HANDLER_ERR, - "Det finns ingen definierad utdatahanterare f\u00F6r transformeringsresultat."}, - - /* - * Note to translators: "Result" is a Java interface name in this - * context. The substitution text is a method name. - */ - {ErrorMsg.JAXP_NO_RESULT_ERR, - "Result-objekt som \u00F6verf\u00F6rdes till ''{0}'' \u00E4r ogiltigt."}, - - /* - * Note to translators: "Transformer" is a Java interface name. The - * user's program attempted to access an unrecognized property with the - * name specified in the substitution text. The method used to retrieve - * the property is "getOutputProperty", so it's not clear whether it - * would be best to translate the term "property". - */ - {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, - "F\u00F6rs\u00F6ker f\u00E5 \u00E5tkomst till ogiltig Transformer-egenskap, ''{0}''."}, - - /* - * Note to translators: SAX2DOM is the name of a Java class that should - * not be translated. This is an adapter in the sense that it takes a - * DOM object and converts it to something that uses the SAX API. - */ - {ErrorMsg.SAX2DOM_ADAPTER_ERR, - "Kunde inte skapa SAX2DOM-adapter: ''{0}''."}, - - /* - * Note to translators: "XSLTCSource.build()" is a Java method name. - * "systemId" is an XML term that is short for "system identification". - */ - {ErrorMsg.XSLTC_SOURCE_ERR, - "XSLTCSource.build() anropades utan angivet systemId."}, - - { ErrorMsg.ER_RESULT_NULL, - "Result borde inte vara null"}, - - /* - * Note to translators: This message indicates that the value argument - * of setParameter must be a valid Java Object. - */ - {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, - "Parameterv\u00E4rdet f\u00F6r {0} m\u00E5ste vara giltigt Java-objekt"}, - - - {ErrorMsg.COMPILE_STDIN_ERR, - "Alternativet -i m\u00E5ste anv\u00E4ndas med alternativet -o."}, - - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java package, so - * it should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.COMPILE_USAGE_STR, - "SYNOPSIS\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o ]\n [-d ] [-j ] [-p ]\n [-n] [-x] [-u] [-v] [-h] { | -i }\n\nALTERNATIV\n -o tilldelar namnet till genererad\n translet. Som standard tas namnet p\u00E5 translet\n fr\u00E5n namnet p\u00E5 . Alternativet\n ignoreras vid kompilering av flera formatmallar.\n -d anger en destinationskatalog f\u00F6r translet\n -j paketerar transletklasserna i en jar-fil med\n namnet \n -p anger ett paketnamnprefix f\u00F6r alla genererade\n transletklasser.\n -n aktiverar mallinfogning (ger ett b\u00E4ttre genomsnittligt\n standardbeteende).\n -x ger ytterligare fels\u00F6kningsmeddelanden\n -u tolkar argument i som URL:er\n -i tvingar kompilatorn att l\u00E4sa formatmallen fr\u00E5n stdin\n -v skriver ut kompilatorns versionsnummer\n -h skriver ut denna syntaxsats\n"}, - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java class, so it - * should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.TRANSFORM_USAGE_STR, - "SYNOPSIS \n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j ]\n [-x] [-n ] {-u | }\n [= ...]\n\n anv\u00E4nder translet vid transformering av XML-dokument \n angivna som . Translet- finns antingen i\n anv\u00E4ndarens CLASSPATH eller i valfritt angiven .\nALTERNATIV\n -j anger en jar-fil varifr\u00E5n translet laddas\n -x ger ytterligare fels\u00F6kningsmeddelanden\n -n k\u00F6r -tider vid transformering och\n visar profileringsinformation\n -u anger XML-indatadokument som URL\n"}, - - - - /* - * Note to translators: "", "" and - * "" are keywords that should not be translated. - * The message indicates that an xsl:sort element must be a child of - * one of the other kinds of elements mentioned. - */ - {ErrorMsg.STRAY_SORT_ERR, - " kan anv\u00E4ndas endast i eller ."}, - - /* - * Note to translators: The message indicates that the encoding - * requested for the output document was on that requires support that - * is not available from the Java Virtual Machine being used to execute - * the program. - */ - {ErrorMsg.UNSUPPORTED_ENCODING, - "Utdatakodning ''{0}'' underst\u00F6ds inte i JVM."}, - - /* - * Note to translators: The message indicates that the XPath expression - * named in the substitution text was not well formed syntactically. - */ - {ErrorMsg.SYNTAX_ERR, - "Syntaxfel i ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a Java - * class. The term "constructor" here is the Java term. The message is - * displayed if XSLTC could not find a constructor for the specified - * class. - */ - {ErrorMsg.CONSTRUCTOR_NOT_FOUND, - "Hittar inte den externa konstruktorn ''{0}''."}, - - /* - * Note to translators: "static" is the Java keyword. The substitution - * text is the name of a function. The first argument of that function - * is not of the required type. - */ - {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, - "Det f\u00F6rsta argumentet f\u00F6r den icke-statiska Java-funktionen ''{0}'' \u00E4r inte n\u00E5gon giltig objektreferens."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. The substitution text is the - * expression that was in error. - */ - {ErrorMsg.TYPE_CHECK_ERR, - "Fel vid kontroll av typ av uttrycket ''{0}''."}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. However, the location of the - * problematic expression is unknown. - */ - {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, - "Fel vid kontroll av typ av ett uttryck p\u00E5 ok\u00E4nd plats."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option that was not recognized. - */ - {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, - "Ogiltigt kommandoradsalternativ: ''{0}''."}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option. - */ - {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, - "Kommandoradsalternativet ''{0}'' saknar obligatoriskt argument."}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, - "WARNING: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.WARNING_MSG, - "WARNING: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, - "FATAL ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.FATAL_ERR_MSG, - "FATAL ERROR: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, - "ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.ERROR_MSG, - "ERROR: ''{0}''"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, - "Transformering via translet ''{0}'' "}, - - /* - * Note to translators: The first substitution is the name of a class, - * while the second substitution is the name of a jar file. - */ - {ErrorMsg.TRANSFORM_WITH_JAR_STR, - "Transformering via translet ''{0}'' fr\u00E5n jar-filen ''{1}''"}, - - /* - * Note to translators: "TransformerFactory" is the name of a Java - * interface and must not be translated. The substitution text is - * the name of the class that could not be instantiated. - */ - {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, - "Kunde inte skapa en instans av TransformerFactory-klassen ''{0}''."}, - - /* - * Note to translators: This message is produced when the user - * specified a name for the translet class that contains characters - * that are not permitted in a Java class name. The substitution - * text "{0}" specifies the name the user requested, while "{1}" - * specifies the name the processor used instead. - */ - {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT, - "''{0}'' kunde inte anv\u00E4ndas som namn p\u00E5 transletklassen eftersom det inneh\u00E5ller otill\u00E5tna tecken f\u00F6r Java-klassnamn. Namnet ''{1}'' anv\u00E4ndes ist\u00E4llet."}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages are collected together and displayed beneath - * this message. - */ - {ErrorMsg.COMPILER_ERROR_KEY, - "Kompileringsfel:"}, - - /* - * Note to translators: The following message is used as a header. - * All the warning messages are collected together and displayed - * beneath this message. - */ - {ErrorMsg.COMPILER_WARNING_KEY, - "Kompileringsvarningar:"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages that are produced when the stylesheet is - * applied to an input document are collected together and displayed - * beneath this message. A 'translet' is the compiled form of a - * stylesheet (see above). - */ - {ErrorMsg.RUNTIME_ERROR_KEY, - "Transletfel:"}, - - /* - * Note to translators: An attribute whose value is constrained to - * be a "QName" or a list of "QNames" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_QNAME_ERR, - "Ett attribut vars v\u00E4rde m\u00E5ste vara ett QName eller en blankteckenavgr\u00E4nsad lista med QNames hade v\u00E4rdet ''{0}''"}, - - /* - * Note to translators: An attribute whose value is required to - * be an "NCName". - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_NCNAME_ERR, - "Ett attribut vars v\u00E4rde m\u00E5ste vara ett NCName hade v\u00E4rdet ''{0}''"}, - - /* - * Note to translators: An attribute with an incorrect value was - * encountered. The permitted value is one of the literal values - * "xml", "html" or "text"; it is also permitted to have the form of - * a QName that is not also an NCName. The terms "method", - * "xsl:output", "xml", "html" and "text" are keywords that must not - * be translated. The term "qname-but-not-ncname" is an XML syntactic - * term. The substitution text contains the actual value of the - * attribute. - */ - {ErrorMsg.INVALID_METHOD_IN_OUTPUT, - "Metodattributet f\u00F6r ett -element hade v\u00E4rdet ''{0}''. Endast n\u00E5got av f\u00F6ljande v\u00E4rden kan anv\u00E4ndas: ''xml'', ''html'', ''text'' eller qname-but-not-ncname i XML"}, - - {ErrorMsg.JAXP_GET_FEATURE_NULL_NAME, - "Funktionsnamnet kan inte vara null i TransformerFactory.getFeature(namn p\u00E5 str\u00E4ng)."}, - - {ErrorMsg.JAXP_SET_FEATURE_NULL_NAME, - "Funktionsnamnet kan inte vara null i TransformerFactory.setFeature(namn p\u00E5 str\u00E4ng, booleskt v\u00E4rde)."}, - - {ErrorMsg.JAXP_UNSUPPORTED_FEATURE, - "Kan inte st\u00E4lla in funktionen ''{0}'' i denna TransformerFactory."}, - - {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: Funktionen kan inte anges till false om s\u00E4kerhetshanteraren anv\u00E4nds."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method, and "try-catch-finally block" - * refers to the Java keywords with those names. "Outlined" is a - * technical term internal to XSLTC and should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_TRY_CATCH, - "Internt XSLTC-fel: den genererade bytekoden inneh\u00E5ller ett try-catch-finally-block och kan inte g\u00F6ras till en disposition."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The terms "OutlineableChunkStart" and - * "OutlineableChunkEnd" are the names of classes internal to XSLTC and - * should not be translated. The message indicates that for every - * "start" there must be a corresponding "end", and vice versa, and - * that if one of a pair of "start" and "end" appears between another - * pair of corresponding "start" and "end", then the other half of the - * pair must also be between that same enclosing pair. - */ - {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS, - "Internt XSLTC-fel: mark\u00F6rerna OutlineableChunkStart och OutlineableChunkEnd m\u00E5ste vara balanserade och korrekt kapslade."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method. The "method" that is being - * referred to is a Java method in a translet that XSLTC is generating - * in processing a stylesheet. The "instruction" that is being - * referred to is one of the instrutions in the Java byte code in that - * method. "Outlined" is a technical term internal to XSLTC and - * should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_DELETED_TARGET, - "Internt XSLTC-fel: originalmetoden refererar fortfarande till en instruktion som var en del av ett bytekodsblock som gjordes till en disposition." - }, - - - /* - * Note to translators: This message describes an internal error in the - * processor. The "method" that is being referred to is a Java method - * in a translet that XSLTC is generating. - * - */ - {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG, - "Internt XSLTC-fel: en metod i transleten \u00F6verstiger Java Virtual Machines l\u00E4ngdbegr\u00E4nsning f\u00F6r en metod p\u00E5 64 kilobytes. Det h\u00E4r orsakas vanligen av mycket stora mallar i en formatmall. F\u00F6rs\u00F6k att omstrukturera formatmallen att anv\u00E4nda mindre mallar." - }, - - }; - - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java deleted file mode 100644 index 07f1ff4f63d..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java +++ /dev/null @@ -1,986 +0,0 @@ -/* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xalan.internal.xsltc.compiler.util; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_zh_TW extends ListResourceBundle { - -/* - * XSLTC compile-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler". - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 5) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 6) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 7) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 8) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 9) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 10) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 11) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - {ErrorMsg.MULTIPLE_STYLESHEET_ERR, - "\u76F8\u540C\u6A94\u6848\u4E2D\u5B9A\u7FA9\u4E86\u8D85\u904E\u4E00\u500B\u6A23\u5F0F\u8868\u3002"}, - - /* - * Note to translators: The substitution text is the name of a - * template. The same name was used on two different templates in the - * same stylesheet. - */ - {ErrorMsg.TEMPLATE_REDEF_ERR, - "\u6A23\u677F ''{0}'' \u5DF2\u7D93\u5B9A\u7FA9\u5728\u6B64\u6A23\u5F0F\u8868\u4E2D\u3002"}, - - - /* - * Note to translators: The substitution text is the name of a - * template. A reference to the template name was encountered, but the - * template is undefined. - */ - {ErrorMsg.TEMPLATE_UNDEF_ERR, - "\u6A23\u677F ''{0}'' \u672A\u5B9A\u7FA9\u5728\u6B64\u6A23\u5F0F\u8868\u4E2D\u3002"}, - - /* - * Note to translators: The substitution text is the name of a variable - * that was defined more than once. - */ - {ErrorMsg.VARIABLE_REDEF_ERR, - "\u8B8A\u6578 ''{0}'' \u5728\u76F8\u540C\u7BC4\u570D\u4E2D\u5B9A\u7FA9\u591A\u6B21\u3002"}, - - /* - * Note to translators: The substitution text is the name of a variable - * or parameter. A reference to the variable or parameter was found, - * but it was never defined. - */ - {ErrorMsg.VARIABLE_UNDEF_ERR, - "\u8B8A\u6578\u6216\u53C3\u6578 ''{0}'' \u672A\u5B9A\u7FA9\u3002"}, - - /* - * Note to translators: The word "class" here refers to a Java class. - * Processing the stylesheet required a class to be loaded, but it could - * not be found. The substitution text is the name of the class. - */ - {ErrorMsg.CLASS_NOT_FOUND_ERR, - "\u627E\u4E0D\u5230\u985E\u5225 ''{0}''\u3002"}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but it could not be found. "public" is the - * Java keyword. - */ - {ErrorMsg.METHOD_NOT_FOUND_ERR, - "\u627E\u4E0D\u5230\u5916\u90E8\u65B9\u6CD5 ''{0}'' (\u5FC5\u9808\u70BA\u516C\u7528)\u3002"}, - - /* - * Note to translators: The word "method" here refers to a Java method. - * Processing the stylesheet required a reference to the method named by - * the substitution text, but no method with the required types of - * arguments or return type could be found. - */ - {ErrorMsg.ARGUMENT_CONVERSION_ERR, - "\u7121\u6CD5\u8F49\u63DB\u547C\u53EB\u65B9\u6CD5 ''{0}'' \u4E2D\u7684\u5F15\u6578/\u50B3\u56DE\u985E\u578B"}, - - /* - * Note to translators: The file or URI named in the substitution text - * is missing. - */ - {ErrorMsg.FILE_NOT_FOUND_ERR, - "\u627E\u4E0D\u5230\u6A94\u6848\u6216 URI ''{0}''\u3002"}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.INVALID_URI_ERR, - "\u7121\u6548\u7684 URI ''{0}''\u3002"}, - - /* - * Note to translators: This message is displayed when the URI - * mentioned in the substitution text is not well-formed syntactically. - */ - {ErrorMsg.CATALOG_EXCEPTION, - "JAXP08090001: CatalogResolver \u5DF2\u555F\u7528\u76EE\u9304 \"{0}\"\uFF0C\u4F46\u50B3\u56DE CatalogException\u3002"}, - - /* - * Note to translators: The file or URI named in the substitution text - * exists but could not be opened. - */ - {ErrorMsg.FILE_ACCESS_ERR, - "\u7121\u6CD5\u958B\u555F\u6A94\u6848\u6216 URI ''{0}''\u3002"}, - - /* - * Note to translators: and are - * keywords that should not be translated. - */ - {ErrorMsg.MISSING_ROOT_ERR, - "\u9810\u671F \u6216 \u5143\u7D20\u3002"}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ErrorMsg.NAMESPACE_UNDEF_ERR, - "\u672A\u5BA3\u544A\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC ''{0}''\u3002"}, - - /* - * Note to translators: The Java function named in the stylesheet could - * not be found. - */ - {ErrorMsg.FUNCTION_RESOLVE_ERR, - "\u7121\u6CD5\u89E3\u6790\u51FD\u6578 ''{0}'' \u7684\u547C\u53EB\u3002"}, - - /* - * Note to translators: The substitution text is the name of a - * function. A literal string here means a constant string value. - */ - {ErrorMsg.NEED_LITERAL_ERR, - "''{0}'' \u7684\u5F15\u6578\u5FC5\u9808\u662F\u6587\u5B57\u5B57\u4E32\u3002"}, - - /* - * Note to translators: This message indicates there was a syntactic - * error in the form of an XPath expression. The substitution text is - * the expression. - */ - {ErrorMsg.XPATH_PARSER_ERR, - "\u5256\u6790 XPath \u8868\u793A\u5F0F ''{0}'' \u6642\u767C\u751F\u932F\u8AA4\u3002"}, - - /* - * Note to translators: An element in the stylesheet requires a - * particular attribute named by the substitution text, but that - * attribute was not specified in the stylesheet. - */ - {ErrorMsg.REQUIRED_ATTR_ERR, - "\u907A\u6F0F\u5FC5\u8981\u7684\u5C6C\u6027 ''{0}''\u3002"}, - - /* - * Note to translators: This message indicates that a character not - * permitted in an XPath expression was encountered. The substitution - * text is the offending character. - */ - {ErrorMsg.ILLEGAL_CHAR_ERR, - "XPath \u8868\u793A\u5F0F\u4E2D\u7121\u6548\u7684\u5B57\u5143 ''{0}''\u3002"}, - - /* - * Note to translators: A processing instruction is a mark-up item in - * an XML document that request some behaviour of an XML processor. The - * form of the name of was invalid in this case, and the substitution - * text is the name. - */ - {ErrorMsg.ILLEGAL_PI_ERR, - "\u8655\u7406\u6307\u793A\u7684\u7121\u6548\u540D\u7A31 ''{0}''\u3002"}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ErrorMsg.STRAY_ATTRIBUTE_ERR, - "\u5C6C\u6027 ''{0}'' \u5728\u5143\u7D20\u4E4B\u5916\u3002"}, - - /* - * Note to translators: An attribute that wasn't recognized was - * specified on an element in the stylesheet. The attribute is named - * by the substitution - * text. - */ - {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, - "\u7121\u6548\u7684\u5C6C\u6027 ''{0}''\u3002"}, - - /* - * Note to translators: "import" and "include" are keywords that should - * not be translated. This messages indicates that the stylesheet - * named in the substitution text imported or included itself either - * directly or indirectly. - */ - {ErrorMsg.CIRCULAR_INCLUDE_ERR, - "\u5FAA\u74B0\u532F\u5165/\u5305\u542B\u3002\u5DF2\u7D93\u8F09\u5165\u6A23\u5F0F\u8868 ''{0}''\u3002"}, - - /* - * Note to translators: "xsl:import" and "xsl:include" are keywords that - * should not be translated. - */ - {ErrorMsg.IMPORT_PRECEDE_OTHERS_ERR, - "xsl:import \u5143\u7D20\u5B50\u9805\u5FC5\u9808\u5728 xsl:stylesheet \u5143\u7D20\u7684\u6240\u6709\u5176\u4ED6\u5143\u7D20\u5B50\u9805\u4E4B\u524D\uFF0C\u5305\u62EC\u4EFB\u4F55 xsl:include \u5143\u7D20\u5B50\u9805\u3002"}, - - /* - * Note to translators: A result-tree fragment is a portion of a - * resulting XML document represented as a tree. "" is a - * keyword and should not be translated. - */ - {ErrorMsg.RESULT_TREE_SORT_ERR, - "\u7121\u6CD5\u6392\u5E8F Result-tree \u7247\u6BB5 (\u5FFD\u7565 \u5143\u7D20)\u3002\u5EFA\u7ACB\u7D50\u679C\u6A39\u72C0\u7D50\u69CB\u6642\uFF0C\u5FC5\u9808\u6392\u5E8F\u7BC0\u9EDE\u3002"}, - - /* - * Note to translators: A name can be given to a particular style to be - * used to format decimal values. The substitution text gives the name - * of such a style for which more than one declaration was encountered. - */ - {ErrorMsg.SYMBOLS_REDEF_ERR, - "\u5DF2\u7D93\u5B9A\u7FA9\u5341\u9032\u4F4D\u683C\u5F0F ''{0}''\u3002"}, - - /* - * Note to translators: The stylesheet version named in the - * substitution text is not supported. - */ - {ErrorMsg.XSL_VERSION_ERR, - "XSLTC \u4E0D\u652F\u63F4 XSL \u7248\u672C ''{0}''\u3002"}, - - /* - * Note to translators: The definitions of one or more variables or - * parameters depend on one another. - */ - {ErrorMsg.CIRCULAR_VARIABLE_ERR, - "\u5728 ''{0}'' \u4E2D\u6709\u5FAA\u74B0\u8B8A\u6578/\u53C3\u6578\u53C3\u7167\u3002"}, - - /* - * Note to translators: The operator in an expresion with two operands was - * not recognized. - */ - {ErrorMsg.ILLEGAL_BINARY_OP_ERR, - "\u4E8C\u9032\u4F4D\u8868\u793A\u5F0F\u4E0D\u660E\u7684\u904B\u7B97\u5B50\u3002"}, - - /* - * Note to translators: This message is produced if a reference to a - * function has too many or too few arguments. - */ - {ErrorMsg.ILLEGAL_ARG_ERR, - "\u51FD\u6578\u547C\u53EB\u7121\u6548\u7684\u5F15\u6578\u3002"}, - - /* - * Note to translators: "document()" is the name of function and must - * not be translated. A node-set is a set of the nodes in the tree - * representation of an XML document. - */ - {ErrorMsg.DOCUMENT_ARG_ERR, - "document() \u51FD\u6578\u7684\u7B2C\u4E8C\u500B\u5F15\u6578\u5FC5\u9808\u662F node-set\u3002"}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.MISSING_WHEN_ERR, - "\u5728 \u4E2D\u81F3\u5C11\u9700\u8981\u4E00\u500B \u5143\u7D20\u3002"}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.MULTIPLE_OTHERWISE_ERR, - "\u5728 \u4E2D\u53EA\u5141\u8A31\u4E00\u500B \u5143\u7D20\u3002"}, - - /* - * Note to translators: "" and "" are - * keywords and should not be translated. This message describes a - * syntax error in the stylesheet. - */ - {ErrorMsg.STRAY_OTHERWISE_ERR, - " \u53EA\u80FD\u5728 \u5167\u4F7F\u7528\u3002"}, - - /* - * Note to translators: "" and "" are keywords - * and should not be translated. This message describes a syntax error - * in the stylesheet. - */ - {ErrorMsg.STRAY_WHEN_ERR, - " \u53EA\u80FD\u5728 \u5167\u4F7F\u7528\u3002"}, - - /* - * Note to translators: "", "" and - * "" are keywords and should not be translated. This - * message describes a syntax error in the stylesheet. - */ - {ErrorMsg.WHEN_ELEMENT_ERR, - "\u5728 \u4E2D\u53EA\u5141\u8A31 \u8207 \u5143\u7D20\u3002"}, - - /* - * Note to translators: "" and "name" are keywords - * that should not be translated. - */ - {ErrorMsg.UNNAMED_ATTRIBSET_ERR, - " \u907A\u6F0F 'name' \u5C6C\u6027\u3002"}, - - /* - * Note to translators: An element in the stylesheet contained an - * element of a type that it was not permitted to contain. - */ - {ErrorMsg.ILLEGAL_CHILD_ERR, - "\u7121\u6548\u7684\u5B50\u9805\u5143\u7D20\u3002"}, - - /* - * Note to translators: The stylesheet tried to create an element with - * a name that was not a valid XML name. The substitution text contains - * the name. - */ - {ErrorMsg.ILLEGAL_ELEM_NAME_ERR, - "\u60A8\u7121\u6CD5\u547C\u53EB\u5143\u7D20 ''{0}''"}, - - /* - * Note to translators: The stylesheet tried to create an attribute - * with a name that was not a valid XML name. The substitution text - * contains the name. - */ - {ErrorMsg.ILLEGAL_ATTR_NAME_ERR, - "\u60A8\u7121\u6CD5\u547C\u53EB\u5C6C\u6027 ''{0}''"}, - - /* - * Note to translators: The children of the outermost element of a - * stylesheet are referred to as top-level elements. No text should - * occur within that outermost element unless it is within a top-level - * element. This message indicates that that constraint was violated. - * "" is a keyword that should not be translated. - */ - {ErrorMsg.ILLEGAL_TEXT_NODE_ERR, - "\u6700\u4E0A\u5C64 \u5143\u7D20\u4E4B\u5916\u7684\u6587\u5B57\u8CC7\u6599\u3002"}, - - /* - * Note to translators: JAXP is an acronym for the Java API for XML - * Processing. This message indicates that the XML parser provided to - * XSLTC to process the XML input document had a configuration problem. - */ - {ErrorMsg.SAX_PARSER_CONFIG_ERR, - "\u672A\u6B63\u78BA\u8A2D\u5B9A JAXP \u5256\u6790\u5668"}, - - /* - * Note to translators: The substitution text names the internal error - * encountered. - */ - {ErrorMsg.INTERNAL_ERR, - "\u7121\u6CD5\u5FA9\u539F\u7684 XSLTC-internal \u932F\u8AA4: ''{0}''"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {ErrorMsg.UNSUPPORTED_XSL_ERR, - "\u4E0D\u652F\u63F4\u7684 XSL \u5143\u7D20 ''{0}''\u3002"}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does - * not recognized the particular extension named. The substitution text - * gives the extension name. - */ - {ErrorMsg.UNSUPPORTED_EXT_ERR, - "\u7121\u6CD5\u8FA8\u8B58\u7684 XSLTC \u64F4\u5145\u5957\u4EF6 ''{0}''\u3002"}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. XSLTC is able to detect that in this - * case because the outermost element in the stylesheet has to be - * declared with respect to the XSL namespace URI, but no declaration - * for that namespace was seen. - */ - {ErrorMsg.MISSING_XSLT_URI_ERR, - "\u8F38\u5165\u6587\u4EF6\u4E0D\u662F\u6A23\u5F0F\u8868 (\u6839\u5143\u7D20\u4E2D\u672A\u5BA3\u544A XSL \u547D\u540D\u7A7A\u9593)\u3002"}, - - /* - * Note to translators: XSLTC could not find the stylesheet document - * with the name specified by the substitution text. - */ - {ErrorMsg.MISSING_XSLT_TARGET_ERR, - "\u627E\u4E0D\u5230\u6A23\u5F0F\u8868\u76EE\u6A19 ''{0}''\u3002"}, - - /* - * Note to translators: access to the stylesheet target is denied - */ - {ErrorMsg.ACCESSING_XSLT_TARGET_ERR, - "\u7121\u6CD5\u8B80\u53D6\u6A23\u5F0F\u8868\u76EE\u6A19 ''{0}''\uFF0C\u56E0\u70BA accessExternalStylesheet \u5C6C\u6027\u8A2D\u5B9A\u7684\u9650\u5236\uFF0C\u6240\u4EE5\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002"}, - - /* - * Note to translators: This message represents an internal error in - * condition in XSLTC. The substitution text is the class name in XSLTC - * that is missing some functionality. - */ - {ErrorMsg.NOT_IMPLEMENTED_ERR, - "\u672A\u5BE6\u884C: ''{0}''\u3002"}, - - /* - * Note to translators: The XML document given to XSLTC as a stylesheet - * was not, in fact, a stylesheet. - */ - {ErrorMsg.NOT_STYLESHEET_ERR, - "\u8F38\u5165\u6587\u4EF6\u672A\u5305\u542B XSL \u6A23\u5F0F\u8868\u3002"}, - - /* - * Note to translators: The element named in the substitution text was - * encountered in the stylesheet but is not recognized. - */ - {ErrorMsg.ELEMENT_PARSE_ERR, - "\u7121\u6CD5\u5256\u6790\u5143\u7D20 ''{0}''"}, - - /* - * Note to translators: "use", "", "node", "node-set", "string" - * and "number" are keywords in this context and should not be - * translated. This message indicates that the value of the "use" - * attribute was not one of the permitted values. - */ - {ErrorMsg.KEY_USE_ATTR_ERR, - " \u7684\u4F7F\u7528\u5C6C\u6027\u5FC5\u9808\u662F\u7BC0\u9EDE\u3001node-set\u3001\u5B57\u4E32\u6216\u6578\u5B57\u3002"}, - - /* - * Note to translators: An XML document can specify the version of the - * XML specification to which it adheres. This message indicates that - * the version specified for the output document was not valid. - */ - {ErrorMsg.OUTPUT_VERSION_ERR, - "\u8F38\u51FA XML \u6587\u4EF6\u7248\u672C\u61C9\u70BA 1.0"}, - - /* - * Note to translators: The operator in a comparison operation was - * not recognized. - */ - {ErrorMsg.ILLEGAL_RELAT_OP_ERR, - "\u95DC\u806F\u8868\u793A\u5F0F\u7684\u904B\u7B97\u5B50\u4E0D\u660E"}, - - /* - * Note to translators: An attribute set defines as a set of XML - * attributes that can be added to an element in the output XML document - * as a group. This message is reported if the name specified was not - * used to declare an attribute set. The substitution text is the name - * that is in error. - */ - {ErrorMsg.ATTRIBSET_UNDEF_ERR, - "\u5617\u8A66\u4F7F\u7528\u4E0D\u5B58\u5728\u7684\u5C6C\u6027\u96C6 ''{0}''\u3002"}, - - /* - * Note to translators: The term "attribute value template" is a term - * defined by XSLT which describes the value of an attribute that is - * determined by an XPath expression. The message indicates that the - * expression was syntactically incorrect; the substitution text - * contains the expression that was in error. - */ - {ErrorMsg.ATTR_VAL_TEMPLATE_ERR, - "\u7121\u6CD5\u5256\u6790\u5C6C\u6027\u503C\u6A23\u677F ''{0}''\u3002"}, - - /* - * Note to translators: ??? - */ - {ErrorMsg.UNKNOWN_SIG_TYPE_ERR, - "\u985E\u5225 ''{0}'' \u7C3D\u7AE0\u6709\u4E0D\u660E\u7684 data-type\u3002"}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of - * type {0}. - */ - {ErrorMsg.DATA_CONVERSION_ERR, - "\u7121\u6CD5\u8F49\u63DB data-type ''{0}'' \u70BA ''{1}''\u3002"}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_TRANSLET_CLASS_ERR, - "\u6B64\u6A23\u677F\u672A\u5305\u542B\u6709\u6548\u7684 translet \u985E\u5225\u5B9A\u7FA9\u3002"}, - - /* - * Note to translators: "Templates" is a Java class name that should - * not be translated. - */ - {ErrorMsg.NO_MAIN_TRANSLET_ERR, - "\u6B64\u6A23\u677F\u672A\u5305\u542B\u540D\u7A31\u70BA ''{0}'' \u7684\u985E\u5225\u3002"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSLET_CLASS_ERR, - "\u7121\u6CD5\u8F09\u5165 translet \u985E\u5225 ''{0}''\u3002"}, - - {ErrorMsg.TRANSLET_OBJECT_ERR, - "\u5DF2\u8F09\u5165 translet \u985E\u5225\uFF0C\u4F46\u7121\u6CD5\u5EFA\u7ACB translet \u57F7\u884C\u8655\u7406\u3002"}, - - /* - * Note to translators: "ErrorListener" is a Java interface name that - * should not be translated. The message indicates that the user tried - * to set an ErrorListener object on object of the class named in the - * substitution text with "null" Java value. - */ - {ErrorMsg.ERROR_LISTENER_NULL_ERR, - "\u5617\u8A66\u5C07 ''{0}'' \u7684 ErrorListener \u8A2D\u5B9A\u70BA\u7A7A\u503C"}, - - /* - * Note to translators: StreamSource, SAXSource and DOMSource are Java - * interface names that should not be translated. - */ - {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR, - "XSLTC \u50C5\u652F\u63F4 StreamSource\u3001SAXSource \u8207 DOMSource"}, - - /* - * Note to translators: "Source" is a Java class name that should not - * be translated. The substitution text is the name of Java method. - */ - {ErrorMsg.JAXP_NO_SOURCE_ERR, - "\u50B3\u9001\u81F3 ''{0}'' \u7684\u4F86\u6E90\u7269\u4EF6\u6C92\u6709\u5167\u5BB9\u3002"}, - - /* - * Note to translators: The message indicates that XSLTC failed to - * compile the stylesheet into a translet (class file). - */ - {ErrorMsg.JAXP_COMPILE_ERR, - "\u7121\u6CD5\u7DE8\u8B6F\u6A23\u5F0F\u8868"}, - - /* - * Note to translators: "TransformerFactory" is a class name. In this - * context, an attribute is a property or setting of the - * TransformerFactory object. The substitution text is the name of the - * unrecognised attribute. The method used to retrieve the attribute is - * "getAttribute", so it's not clear whether it would be best to - * translate the term "attribute". - */ - {ErrorMsg.JAXP_INVALID_ATTR_ERR, - "TransformerFactory \u7121\u6CD5\u8FA8\u8B58\u5C6C\u6027 ''{0}''\u3002"}, - - {ErrorMsg.JAXP_INVALID_ATTR_VALUE_ERR, - "\u70BA ''{0}'' \u5C6C\u6027\u6307\u5B9A\u7684\u503C\u4E0D\u6B63\u78BA\u3002"}, - - /* - * Note to translators: "setResult()" and "startDocument()" are Java - * method names that should not be translated. - */ - {ErrorMsg.JAXP_SET_RESULT_ERR, - "\u547C\u53EB startDocument() \u4E4B\u524D\uFF0C\u5FC5\u9808\u5148\u547C\u53EB setResult()\u3002"}, - - /* - * Note to translators: "Transformer" is a Java interface name that - * should not be translated. A Transformer object should contained a - * reference to a translet object in order to be used for - * transformations; this message is produced if that requirement is not - * met. - */ - {ErrorMsg.JAXP_NO_TRANSLET_ERR, - "\u8F49\u63DB\u5668\u6C92\u6709\u5C01\u88DD\u7684 translet \u7269\u4EF6\u3002"}, - - /* - * Note to translators: The XML document that results from a - * transformation needs to be sent to an output handler object; this - * message is produced if that requirement is not met. - */ - {ErrorMsg.JAXP_NO_HANDLER_ERR, - "\u8F49\u63DB\u7D50\u679C\u6C92\u6709\u5B9A\u7FA9\u7684\u8F38\u51FA\u8655\u7406\u7A0B\u5F0F\u3002"}, - - /* - * Note to translators: "Result" is a Java interface name in this - * context. The substitution text is a method name. - */ - {ErrorMsg.JAXP_NO_RESULT_ERR, - "\u50B3\u9001\u81F3 ''{0}'' \u7684\u7D50\u679C\u7269\u4EF6\u7121\u6548\u3002"}, - - /* - * Note to translators: "Transformer" is a Java interface name. The - * user's program attempted to access an unrecognized property with the - * name specified in the substitution text. The method used to retrieve - * the property is "getOutputProperty", so it's not clear whether it - * would be best to translate the term "property". - */ - {ErrorMsg.JAXP_UNKNOWN_PROP_ERR, - "\u5617\u8A66\u5B58\u53D6\u7121\u6548\u7684\u8F49\u63DB\u5668\u5C6C\u6027 ''{0}''\u3002"}, - - /* - * Note to translators: SAX2DOM is the name of a Java class that should - * not be translated. This is an adapter in the sense that it takes a - * DOM object and converts it to something that uses the SAX API. - */ - {ErrorMsg.SAX2DOM_ADAPTER_ERR, - "\u7121\u6CD5\u5EFA\u7ACB SAX2DOM \u8F49\u63A5\u5668: ''{0}''\u3002"}, - - /* - * Note to translators: "XSLTCSource.build()" is a Java method name. - * "systemId" is an XML term that is short for "system identification". - */ - {ErrorMsg.XSLTC_SOURCE_ERR, - "\u672A\u8A2D\u5B9A systemId \u800C\u547C\u53EB XSLTCSource.build()\u3002"}, - - { ErrorMsg.ER_RESULT_NULL, - "\u7D50\u679C\u4E0D\u61C9\u70BA\u7A7A\u503C"}, - - /* - * Note to translators: This message indicates that the value argument - * of setParameter must be a valid Java Object. - */ - {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, - "\u53C3\u6578 {0} \u7684\u503C\u5FC5\u9808\u662F\u6709\u6548\u7684 Java \u7269\u4EF6"}, - - - {ErrorMsg.COMPILE_STDIN_ERR, - "-i \u9078\u9805\u5FC5\u9808\u8207 -o \u9078\u9805\u4E00\u8D77\u4F7F\u7528\u3002"}, - - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java package, so - * it should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.COMPILE_USAGE_STR, - "\u6982\u8981\n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Compile [-o ]\n [-d ] [-j ] [-p ]\n [-n] [-x] [-u] [-v] [-h] { | -i }\n\n\u9078\u9805\n -o \u6307\u6D3E\u540D\u7A31 \u81F3\u7522\u751F\u7684\n translet\u3002\u6839\u64DA\u9810\u8A2D\uFF0Ctranslet \u540D\u7A31\n \u884D\u751F\u81EA \u540D\u7A31\u3002\u82E5\u7DE8\u8B6F\n \u591A\u500B\u6A23\u5F0F\u8868\uFF0C\u5C07\u5FFD\u7565\u6B64\u9078\u9805\u3002\n -d \u6307\u5B9A translet \u7684\u76EE\u7684\u5730\u76EE\u9304\n -j \u5C01\u88DD translet \u985E\u5225\u6210\u70BA jar \u6A94\u6848\uFF0C\n \u540D\u7A31\u6307\u5B9A\u70BA \n -p \u6307\u5B9A\u6240\u6709\u7522\u751F\u7684 translet \u985E\u5225\u7684\u5957\u88DD\u7A0B\u5F0F\n \u540D\u7A31\u524D\u7F6E\u78BC\u3002\n -n \u555F\u7528\u6A23\u677F\u5167\u5D4C (\u9810\u8A2D\u884C\u70BA\u4E00\u822C\u800C\u8A00\n \u8F03\u4F73)\u3002\n -x \u958B\u555F\u984D\u5916\u7684\u9664\u932F\u8A0A\u606F\u8F38\u51FA\n -u \u89E3\u8B6F \u5F15\u6578\u70BA URL\n -i \u5F37\u5236\u7DE8\u8B6F\u5668\u5F9E stdin \u8B80\u53D6\u6A23\u5F0F\u8868\n -v \u5217\u5370\u7DE8\u8B6F\u5668\u7248\u672C\n -h \u5217\u5370\u6B64\u7528\u6CD5\u6558\u8FF0\n"}, - - /* - * Note to translators: This message contains usage information for a - * means of invoking XSLTC from the command-line. The message is - * formatted for presentation in English. The strings , - * , etc. indicate user-specified argument values, and can - * be translated - the argument refers to a Java class, so it - * should be handled in the same way the term is handled for JDK - * documentation. - */ - {ErrorMsg.TRANSFORM_USAGE_STR, - "\u6982\u8981 \n java com.sun.org.apache.xalan.internal.xsltc.cmdline.Transform [-j ]\n [-x] [-n ] {-u | }\n [= ...]\n\n \u4F7F\u7528 translet \u8F49\u63DB\u6307\u5B9A\u70BA \n \u7684 XML \u6587\u4EF6\u3002translet \u4F4D\u65BC\n \u4F7F\u7528\u8005\u7684\u985E\u5225\u8DEF\u5F91\uFF0C\u6216\u662F\u5728\u9078\u64C7\u6027\u6307\u5B9A\u7684 \u4E2D\u3002\n\u9078\u9805\n -j \u6307\u5B9A\u8F09\u5165 translet \u7684\u4F86\u6E90 jarfile\n -x \u958B\u555F\u984D\u5916\u7684\u9664\u932F\u8A0A\u606F\u8F38\u51FA\n -n \u57F7\u884C\u8F49\u63DB \u6B21\u6578\u8207\n \u986F\u793A\u5206\u6790\u8CC7\u8A0A\n -u \u6307\u5B9A XML \u8F38\u5165\u6587\u4EF6\u70BA URL\n"}, - - - - /* - * Note to translators: "", "" and - * "" are keywords that should not be translated. - * The message indicates that an xsl:sort element must be a child of - * one of the other kinds of elements mentioned. - */ - {ErrorMsg.STRAY_SORT_ERR, - " \u53EA\u80FD\u5728 \u6216 \u4E2D\u4F7F\u7528\u3002"}, - - /* - * Note to translators: The message indicates that the encoding - * requested for the output document was on that requires support that - * is not available from the Java Virtual Machine being used to execute - * the program. - */ - {ErrorMsg.UNSUPPORTED_ENCODING, - "\u6B64 JVM \u4E0D\u652F\u63F4\u8F38\u51FA\u7DE8\u78BC ''{0}''\u3002"}, - - /* - * Note to translators: The message indicates that the XPath expression - * named in the substitution text was not well formed syntactically. - */ - {ErrorMsg.SYNTAX_ERR, - "''{0}'' \u4E2D\u7684\u8A9E\u6CD5\u932F\u8AA4\u3002"}, - - /* - * Note to translators: The substitution text is the name of a Java - * class. The term "constructor" here is the Java term. The message is - * displayed if XSLTC could not find a constructor for the specified - * class. - */ - {ErrorMsg.CONSTRUCTOR_NOT_FOUND, - "\u627E\u4E0D\u5230\u5916\u90E8\u5EFA\u69CB\u5B50 ''{0}''\u3002"}, - - /* - * Note to translators: "static" is the Java keyword. The substitution - * text is the name of a function. The first argument of that function - * is not of the required type. - */ - {ErrorMsg.NO_JAVA_FUNCT_THIS_REF, - "\u975E\u975C\u614B Java \u51FD\u6578 ''{0}'' \u7684\u7B2C\u4E00\u500B\u5F15\u6578\u4E0D\u662F\u6709\u6548\u7684\u7269\u4EF6\u53C3\u7167\u3002"}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. The substitution text is the - * expression that was in error. - */ - {ErrorMsg.TYPE_CHECK_ERR, - "\u6AA2\u67E5\u8868\u793A\u5F0F ''{0}'' \u7684\u985E\u578B\u6642\u767C\u751F\u932F\u8AA4\u3002"}, - - /* - * Note to translators: An XPath expression was not of the type - * required in a particular context. However, the location of the - * problematic expression is unknown. - */ - {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR, - "\u6AA2\u67E5\u4F4D\u65BC\u4E0D\u660E\u4F4D\u7F6E\u8868\u793A\u5F0F\u7684\u985E\u578B\u6642\u767C\u751F\u932F\u8AA4\u3002"}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option that was not recognized. - */ - {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR, - "\u547D\u4EE4\u884C\u9078\u9805 ''{0}'' \u7121\u6548\u3002"}, - - /* - * Note to translators: The substitution text is the name of a command- - * line option. - */ - {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR, - "\u547D\u4EE4\u884C\u9078\u9805 ''{0}'' \u907A\u6F0F\u5FC5\u8981\u7684\u5F15\u6578\u3002"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.WARNING_PLUS_WRAPPED_MSG, - "WARNING: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.WARNING_MSG, - "WARNING: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG, - "FATAL ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.FATAL_ERR_MSG, - "FATAL ERROR: ''{0}''"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text contains two error - * messages. The spacing before the second substitution text indents - * it the same amount as the first in English. - */ - {ErrorMsg.ERROR_PLUS_WRAPPED_MSG, - "ERROR: ''{0}''\n :{1}"}, - - /* - * Note to translators: This message is used to indicate the severity - * of another message. The substitution text is an error message. - */ - {ErrorMsg.ERROR_MSG, - "ERROR: ''{0}''"}, - - /* - * Note to translators: The substitution text is the name of a class. - */ - {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, - "\u4F7F\u7528 translet ''{0}'' \u8F49\u63DB"}, - - /* - * Note to translators: The first substitution is the name of a class, - * while the second substitution is the name of a jar file. - */ - {ErrorMsg.TRANSFORM_WITH_JAR_STR, - "\u4F7F\u7528\u4F86\u81EA jar \u6A94\u6848 ''{1}'' \u7684 translet ''{0}'' \u8F49\u63DB"}, - - /* - * Note to translators: "TransformerFactory" is the name of a Java - * interface and must not be translated. The substitution text is - * the name of the class that could not be instantiated. - */ - {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT, - "\u7121\u6CD5\u5EFA\u7ACB TransformerFactory \u985E\u5225 ''{0}'' \u7684\u57F7\u884C\u8655\u7406\u3002"}, - - /* - * Note to translators: This message is produced when the user - * specified a name for the translet class that contains characters - * that are not permitted in a Java class name. The substitution - * text "{0}" specifies the name the user requested, while "{1}" - * specifies the name the processor used instead. - */ - {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT, - "\u540D\u7A31 ''{0}'' \u7121\u6CD5\u4F5C\u70BA translet \u985E\u5225\u7684\u540D\u7A31\uFF0C\u56E0\u70BA\u5B83\u5305\u542B Java \u985E\u5225\u540D\u7A31\u4E0D\u5141\u8A31\u7684\u5B57\u5143\u3002\u8ACB\u6539\u7528\u540D\u7A31 ''{1}''\u3002"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages are collected together and displayed beneath - * this message. - */ - {ErrorMsg.COMPILER_ERROR_KEY, - "\u7DE8\u8B6F\u5668\u932F\u8AA4:"}, - - /* - * Note to translators: The following message is used as a header. - * All the warning messages are collected together and displayed - * beneath this message. - */ - {ErrorMsg.COMPILER_WARNING_KEY, - "\u7DE8\u8B6F\u5668\u8B66\u544A:"}, - - /* - * Note to translators: The following message is used as a header. - * All the error messages that are produced when the stylesheet is - * applied to an input document are collected together and displayed - * beneath this message. A 'translet' is the compiled form of a - * stylesheet (see above). - */ - {ErrorMsg.RUNTIME_ERROR_KEY, - "Translet \u932F\u8AA4:"}, - - /* - * Note to translators: An attribute whose value is constrained to - * be a "QName" or a list of "QNames" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_QNAME_ERR, - "\u503C\u5FC5\u9808\u70BA QName \u6216\u4F7F\u7528\u7A7A\u683C\u52A0\u4EE5\u5340\u9694\u7684 QNames \u6E05\u55AE\u7684\u5C6C\u6027\uFF0C\u5177\u6709\u503C ''{0}''"}, - - /* - * Note to translators: An attribute whose value is required to - * be an "NCName". - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {ErrorMsg.INVALID_NCNAME_ERR, - "\u503C\u5FC5\u9808\u70BA NCName \u7684\u5C6C\u6027\uFF0C\u5177\u6709\u503C ''{0}''"}, - - /* - * Note to translators: An attribute with an incorrect value was - * encountered. The permitted value is one of the literal values - * "xml", "html" or "text"; it is also permitted to have the form of - * a QName that is not also an NCName. The terms "method", - * "xsl:output", "xml", "html" and "text" are keywords that must not - * be translated. The term "qname-but-not-ncname" is an XML syntactic - * term. The substitution text contains the actual value of the - * attribute. - */ - {ErrorMsg.INVALID_METHOD_IN_OUTPUT, - " \u5143\u7D20\u7684\u65B9\u6CD5\u5C6C\u6027\u5177\u6709\u503C ''{0}''\u3002\u6B64\u503C\u5FC5\u9808\u662F ''xml''\u3001''html''\u3001''text'' \u6216 qname-but-not-ncname \u5176\u4E2D\u4E4B\u4E00"}, - - {ErrorMsg.JAXP_GET_FEATURE_NULL_NAME, - "TransformerFactory.getFeature(\u5B57\u4E32\u540D\u7A31) \u4E2D\u7684\u529F\u80FD\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"}, - - {ErrorMsg.JAXP_SET_FEATURE_NULL_NAME, - "TransformerFactory.setFeature(\u5B57\u4E32\u540D\u7A31, \u5E03\u6797\u503C) \u4E2D\u7684\u529F\u80FD\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"}, - - {ErrorMsg.JAXP_UNSUPPORTED_FEATURE, - "\u7121\u6CD5\u5728\u6B64 TransformerFactory \u4E0A\u8A2D\u5B9A\u529F\u80FD ''{0}''\u3002"}, - - {ErrorMsg.JAXP_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: \u5B89\u5168\u7BA1\u7406\u7A0B\u5F0F\u5B58\u5728\u6642\uFF0C\u7121\u6CD5\u5C07\u529F\u80FD\u8A2D\u70BA\u507D\u3002"}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method, and "try-catch-finally block" - * refers to the Java keywords with those names. "Outlined" is a - * technical term internal to XSLTC and should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_TRY_CATCH, - "\u5167\u90E8 XSLTC \u932F\u8AA4: \u7522\u751F\u7684\u4F4D\u5143\u7D44\u78BC\u5305\u542B try-catch-finally \u5340\u584A\uFF0C\u7121\u6CD5\u52A0\u4EE5 outlined."}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The terms "OutlineableChunkStart" and - * "OutlineableChunkEnd" are the names of classes internal to XSLTC and - * should not be translated. The message indicates that for every - * "start" there must be a corresponding "end", and vice versa, and - * that if one of a pair of "start" and "end" appears between another - * pair of corresponding "start" and "end", then the other half of the - * pair must also be between that same enclosing pair. - */ - {ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS, - "\u5167\u90E8 XSLTC \u932F\u8AA4: OutlineableChunkStart \u548C OutlineableChunkEnd \u6A19\u8A18\u5FC5\u9808\u6210\u5C0D\u51FA\u73FE\uFF0C\u4E26\u4F7F\u7528\u6B63\u78BA\u7684\u5DE2\u72C0\u7D50\u69CB\u3002"}, - - /* - * Note to translators: This message describes an internal error in the - * processor. The term "byte code" is a Java technical term for the - * executable code in a Java method. The "method" that is being - * referred to is a Java method in a translet that XSLTC is generating - * in processing a stylesheet. The "instruction" that is being - * referred to is one of the instrutions in the Java byte code in that - * method. "Outlined" is a technical term internal to XSLTC and - * should not be translated. - */ - {ErrorMsg.OUTLINE_ERR_DELETED_TARGET, - "\u5167\u90E8 XSLTC \u932F\u8AA4: \u539F\u59CB\u65B9\u6CD5\u4E2D\u4ECD\u7136\u53C3\u7167\u5C6C\u65BC outlined \u4F4D\u5143\u7D44\u78BC\u5340\u584A\u4E00\u90E8\u5206\u7684\u6307\u793A\u3002" - }, - - - /* - * Note to translators: This message describes an internal error in the - * processor. The "method" that is being referred to is a Java method - * in a translet that XSLTC is generating. - * - */ - {ErrorMsg.OUTLINE_ERR_METHOD_TOO_BIG, - "\u5167\u90E8 XSLTC \u932F\u8AA4: translet \u4E2D\u7684\u65B9\u6CD5\u8D85\u904E Java \u865B\u64EC\u6A5F\u5668\u5C0D\u65BC\u65B9\u6CD5\u9577\u5EA6 64 KB \u7684\u9650\u5236\u3002\u9019\u901A\u5E38\u662F\u56E0\u70BA\u6A23\u5F0F\u8868\u4E2D\u6709\u975E\u5E38\u5927\u7684\u6A23\u677F\u3002\u8ACB\u5617\u8A66\u91CD\u65B0\u7D44\u7E54\u60A8\u7684\u6A23\u5F0F\u8868\u4EE5\u4F7F\u7528\u8F03\u5C0F\u7684\u6A23\u677F\u3002" - }, - - }; - - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ca.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ca.java deleted file mode 100644 index 20bd7af3dc4..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ca.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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.xalan.internal.xsltc.runtime; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_ca extends ListResourceBundle { - -/* - * XSLTC run-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for XML Stylesheet: - * Transformations Compiler - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant output XML document (or HTML document or text) - * - * 3) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 4) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 5) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 6) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 7) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 8) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /* - * Note to translators: the substitution text in the following message - * is a class name. Used for internal errors in the processor. - */ - {BasisLibrary.RUN_TIME_INTERNAL_ERR, - "S''ha produ\u00eft un error intern de temps d''execuci\u00f3 a ''{0}''"}, - - /* - * Note to translators: is a keyword that should not be - * translated. - */ - {BasisLibrary.RUN_TIME_COPY_ERR, - "Es produeix un error de temps d'execuci\u00f3 en executar ."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of type - * {0}. - */ - {BasisLibrary.DATA_CONVERSION_ERR, - "La conversi\u00f3 de ''{0}'' a ''{1}'' no \u00e9s v\u00e0lida."}, - - /* - * Note to translators: This message is displayed if the function named - * by the substitution text is not a function that is supported. XSLTC - * is the acronym naming the product. - */ - {BasisLibrary.EXTERNAL_FUNC_ERR, - "XSLTC no d\u00f3na suport a la funci\u00f3 externa ''{0}''."}, - - /* - * Note to translators: This message is displayed if two values are - * compared for equality, but the data type of one of the values is - * unknown. - */ - {BasisLibrary.EQUALITY_EXPR_ERR, - "L'expressi\u00f3 d'igualtat cont\u00e9 un tipus d'argument desconegut."}, - - /* - * Note to translators: The substitution text for {0} will be a data - * type; the substitution text for {1} will be the name of a function. - * This is displayed if an argument of the particular data type is not - * permitted for a call to this function. - */ - {BasisLibrary.INVALID_ARGUMENT_ERR, - "La crida a ''{1}'' cont\u00e9 un tipus d''argument ''{0}'' no v\u00e0lid."}, - - /* - * Note to translators: There is way of specifying a format for a - * number using a pattern; the processor was unable to format the - * particular value using the specified pattern. - */ - {BasisLibrary.FORMAT_NUMBER_ERR, - "S''ha intentat donar format al n\u00famero ''{0}'' mitjan\u00e7ant el patr\u00f3 ''{1}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor was unable to create a copy of an - * iterator. (See definition of iterator above.) - */ - {BasisLibrary.ITERATOR_CLONE_ERR, - "No es pot clonar l''iterador ''{0}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.AXIS_SUPPORT_ERR, - "L''iterador de l''eix ''{0}'' no t\u00e9 suport."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.TYPED_AXIS_SUPPORT_ERR, - "L''iterador de l''eix escrit ''{0}'' no t\u00e9 suport."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {BasisLibrary.STRAY_ATTRIBUTE_ERR, - "L''atribut ''{0}'' es troba fora de l''element."}, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {BasisLibrary.STRAY_NAMESPACE_ERR, - "La declaraci\u00f3 d''espai de noms ''{0}''=''{1}'' es troba fora de l''element."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {BasisLibrary.NAMESPACE_PREFIX_ERR, - "L''espai de noms del prefix ''{0}'' no s''ha declarat."}, - - /* - * Note to translators: The following represents an internal error. - * DOMAdapter is a Java class in XSLTC. - */ - {BasisLibrary.DOM_ADAPTER_INIT_ERR, - "DOMAdapter s'ha creat mitjan\u00e7ant un tipus incorrecte de DOM d'origen."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not describe to XSLTC the structure of the input XML document's - * DTD. - */ - {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "L'analitzador SAX que feu servir no gestiona esdeveniments de declaraci\u00f3 de DTD."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not distinguish between ordinary XML attributes and namespace - * declarations. - */ - {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "L'analitzador SAX que feu servir no d\u00f3na suport a espais de noms XML."}, - - /* - * Note to translators: The substitution text is the URI that was in - * error. - */ - {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR, - "No s''ha pogut resoldre la refer\u00e8ncia d''URI ''{0}''."} - }; - - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_cs.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_cs.java deleted file mode 100644 index 35c3af49c7b..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_cs.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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.xalan.internal.xsltc.runtime; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_cs extends ListResourceBundle { - -/* - * XSLTC run-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for XML Stylesheet: - * Transformations Compiler - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant output XML document (or HTML document or text) - * - * 3) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 4) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 5) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 6) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 7) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 8) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /* - * Note to translators: the substitution text in the following message - * is a class name. Used for internal errors in the processor. - */ - {BasisLibrary.RUN_TIME_INTERNAL_ERR, - "Vnit\u0159n\u00ed b\u011bhov\u00e1 chyba v ''{0}''"}, - - /* - * Note to translators: is a keyword that should not be - * translated. - */ - {BasisLibrary.RUN_TIME_COPY_ERR, - "Vnit\u0159n\u00ed b\u011bhov\u00e1 chyba p\u0159i prov\u00e1d\u011bn\u00ed funkce ."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of type - * {0}. - */ - {BasisLibrary.DATA_CONVERSION_ERR, - "Neplatn\u00e1 konverze z ''{0}'' do ''{1}''."}, - - /* - * Note to translators: This message is displayed if the function named - * by the substitution text is not a function that is supported. XSLTC - * is the acronym naming the product. - */ - {BasisLibrary.EXTERNAL_FUNC_ERR, - "Extern\u00ed funkce ''{0}'' nen\u00ed podporov\u00e1na produktem SLTC."}, - - /* - * Note to translators: This message is displayed if two values are - * compared for equality, but the data type of one of the values is - * unknown. - */ - {BasisLibrary.EQUALITY_EXPR_ERR, - "Nezn\u00e1m\u00fd typ argumentu ve v\u00fdrazu rovnosti."}, - - /* - * Note to translators: The substitution text for {0} will be a data - * type; the substitution text for {1} will be the name of a function. - * This is displayed if an argument of the particular data type is not - * permitted for a call to this function. - */ - {BasisLibrary.INVALID_ARGUMENT_ERR, - "Neplatn\u00fd typ argumentu ''{0}'' p\u0159i vol\u00e1n\u00ed ''{1}''"}, - - /* - * Note to translators: There is way of specifying a format for a - * number using a pattern; the processor was unable to format the - * particular value using the specified pattern. - */ - {BasisLibrary.FORMAT_NUMBER_ERR, - "Pokus form\u00e1tovat \u010d\u00edslo ''{0}'' pou\u017eit\u00edm vzorku ''{1}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor was unable to create a copy of an - * iterator. (See definition of iterator above.) - */ - {BasisLibrary.ITERATOR_CLONE_ERR, - "Nelze klonovat iter\u00e1tor ''{0}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.AXIS_SUPPORT_ERR, - "Iter\u00e1tor pro osu ''{0}'' nen\u00ed podporov\u00e1n."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.TYPED_AXIS_SUPPORT_ERR, - "Iter\u00e1tor pro typizovanou osu ''{0}'' nen\u00ed podporov\u00e1n."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {BasisLibrary.STRAY_ATTRIBUTE_ERR, - "Atribut ''{0}'' je vn\u011b prvku."}, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {BasisLibrary.STRAY_NAMESPACE_ERR, - "Deklarace oboru n\u00e1zv\u016f ''{0}''=''{1}'' je vn\u011b prvku."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {BasisLibrary.NAMESPACE_PREFIX_ERR, - "Obor n\u00e1zv\u016f pro p\u0159edponu ''{0}'' nebyl deklarov\u00e1n."}, - - /* - * Note to translators: The following represents an internal error. - * DOMAdapter is a Java class in XSLTC. - */ - {BasisLibrary.DOM_ADAPTER_INIT_ERR, - "DOMAdapter byl vytvo\u0159en s pou\u017eit\u00edm chybn\u00e9ho typu zdroje DOM."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not describe to XSLTC the structure of the input XML document's - * DTD. - */ - {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "Pou\u017eit\u00fd analyz\u00e1tor SAX nem\u016f\u017ee manipulovat s deklara\u010dn\u00edmi ud\u00e1lostmi DTD."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not distinguish between ordinary XML attributes and namespace - * declarations. - */ - {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "Pou\u017eit\u00fd analyz\u00e1tor SAX nem\u016f\u017ee podporovat obory n\u00e1zv\u016f pro XML."}, - - /* - * Note to translators: The substitution text is the URI that was in - * error. - */ - {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR, - "Nelze p\u0159elo\u017eit odkazy URI ''{0}''."} - }; - - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_es.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_es.java deleted file mode 100644 index 375173c9189..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_es.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 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.xalan.internal.xsltc.runtime; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_es extends ListResourceBundle { - -/* - * XSLTC run-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for XML Stylesheet: - * Transformations Compiler - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant output XML document (or HTML document or text) - * - * 3) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 4) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 5) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 6) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 7) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 8) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 9) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /* - * Note to translators: the substitution text in the following message - * is a class name. Used for internal errors in the processor. - */ - {BasisLibrary.RUN_TIME_INTERNAL_ERR, - "Error interno de tiempo de ejecuci\u00F3n en ''{0}''"}, - - /* - * Note to translators: is a keyword that should not be - * translated. - */ - {BasisLibrary.RUN_TIME_COPY_ERR, - "Error de tiempo de ejecuci\u00F3n al ejecutar ."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of type - * {0}. - */ - {BasisLibrary.DATA_CONVERSION_ERR, - "Conversi\u00F3n no v\u00E1lida de ''{0}'' a ''{1}''."}, - - /* - * Note to translators: This message is displayed if the function named - * by the substitution text is not a function that is supported. XSLTC - * is the acronym naming the product. - */ - {BasisLibrary.EXTERNAL_FUNC_ERR, - "Funci\u00F3n externa ''{0}'' no soportada por XSLTC."}, - - /* - * Note to translators: This message is displayed if two values are - * compared for equality, but the data type of one of the values is - * unknown. - */ - {BasisLibrary.EQUALITY_EXPR_ERR, - "Tipo de argumento desconocido en la expresi\u00F3n de igualdad."}, - - /* - * Note to translators: The substitution text for {0} will be a data - * type; the substitution text for {1} will be the name of a function. - * This is displayed if an argument of the particular data type is not - * permitted for a call to this function. - */ - {BasisLibrary.INVALID_ARGUMENT_ERR, - "Tipo de argumento ''{0}'' no v\u00E1lido en la llamada a ''{1}''"}, - - /* - * Note to translators: There is way of specifying a format for a - * number using a pattern; the processor was unable to format the - * particular value using the specified pattern. - */ - {BasisLibrary.FORMAT_NUMBER_ERR, - "Intentando formatear n\u00FAmero ''{0}'' mediante el patr\u00F3n ''{1}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor was unable to create a copy of an - * iterator. (See definition of iterator above.) - */ - {BasisLibrary.ITERATOR_CLONE_ERR, - "No se puede clonar el iterador ''{0}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.AXIS_SUPPORT_ERR, - "El iterador para el eje ''{0}'' no est\u00E1 soportado."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.TYPED_AXIS_SUPPORT_ERR, - "El iterador para el eje introducido ''{0}'' no est\u00E1 soportado."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {BasisLibrary.STRAY_ATTRIBUTE_ERR, - "El atributo ''{0}'' est\u00E1 fuera del elemento."}, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {BasisLibrary.STRAY_NAMESPACE_ERR, - "Declaraci\u00F3n del espacio de nombres ''{0}''=''{1}'' fuera del elemento."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {BasisLibrary.NAMESPACE_PREFIX_ERR, - "No se ha declarado el espacio de nombres para el prefijo ''{0}''."}, - - /* - * Note to translators: The following represents an internal error. - * DOMAdapter is a Java class in XSLTC. - */ - {BasisLibrary.DOM_ADAPTER_INIT_ERR, - "Se ha creado DOMAdapter mediante un tipo incorrecto de DOM de origen."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not describe to XSLTC the structure of the input XML document's - * DTD. - */ - {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "El analizador SAX que est\u00E1 utilizando no maneja los eventos de declaraci\u00F3n DTD."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not distinguish between ordinary XML attributes and namespace - * declarations. - */ - {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "El analizador SAX que est\u00E1 utilizando no soporta los espacios de nombres XML."}, - - /* - * Note to translators: The substitution text is the URI that was in - * error. - */ - {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR, - "No se ha podido resolver la referencia al URI ''{0}''."}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {BasisLibrary.UNSUPPORTED_XSL_ERR, - "Elemento ''{0}'' de XSL no soportado"}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSLTC does - * not recognize the particular extension named. The substitution text - * gives the extension name. - */ - {BasisLibrary.UNSUPPORTED_EXT_ERR, - "Extensi\u00F3n ''{0}'' de XSLTC no reconocida"}, - - - /* - * Note to translators: This error message is produced if the translet - * class was compiled using a newer version of XSLTC and deployed for - * execution with an older version of XSLTC. The substitution text is - * the name of the translet class. - */ - {BasisLibrary.UNKNOWN_TRANSLET_VERSION_ERR, - "El translet especificado, ''{0}'' se ha creado con una versi\u00F3n de XSLTC m\u00E1s reciente que la versi\u00F3n del tiempo de ejecuci\u00F3n de XSLTC que se est\u00E1 utilizando. Debe volver a compilar la hoja de estilo o utilizar una versi\u00F3n m\u00E1s reciente de XSLTC para ejecutar este translet."}, - - /* - * Note to translators: An attribute whose effective value is required - * to be a "QName" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_QNAME_ERR, - "Un atributo cuyo valor debe ser un QName ten\u00EDa el valor ''{0}''"}, - - - /* - * Note to translators: An attribute whose effective value is required - * to be a "NCName" had a value that was incorrect. - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_NCNAME_ERR, - "Un atributo cuyo valor debe ser un NCName ten\u00EDa el valor ''{0}''"}, - - {BasisLibrary.UNALLOWED_EXTENSION_FUNCTION_ERR, - "El uso de la funci\u00F3n de extensi\u00F3n ''{0}'' no est\u00E1 permitido cuando la funci\u00F3n de procesamiento seguro se ha definido en true."}, - - {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, - "El uso del elemento de extensi\u00F3n ''{0}'' no est\u00E1 permitido cuando la funci\u00F3n de procesamiento seguro se ha definido en true."}, - }; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_fr.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_fr.java deleted file mode 100644 index 40b2c11bc11..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_fr.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 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.xalan.internal.xsltc.runtime; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_fr extends ListResourceBundle { - -/* - * XSLTC run-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for XML Stylesheet: - * Transformations Compiler - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant output XML document (or HTML document or text) - * - * 3) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 4) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 5) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 6) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 7) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 8) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 9) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /* - * Note to translators: the substitution text in the following message - * is a class name. Used for internal errors in the processor. - */ - {BasisLibrary.RUN_TIME_INTERNAL_ERR, - "Erreur interne d''ex\u00E9cution dans ''{0}''"}, - - /* - * Note to translators: is a keyword that should not be - * translated. - */ - {BasisLibrary.RUN_TIME_COPY_ERR, - "Erreur d'ex\u00E9cution de ."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of type - * {0}. - */ - {BasisLibrary.DATA_CONVERSION_ERR, - "Conversion de ''{0}'' \u00E0 ''{1}'' non valide."}, - - /* - * Note to translators: This message is displayed if the function named - * by the substitution text is not a function that is supported. XSLTC - * is the acronym naming the product. - */ - {BasisLibrary.EXTERNAL_FUNC_ERR, - "Fonction externe ''{0}'' non prise en charge par XSLTC."}, - - /* - * Note to translators: This message is displayed if two values are - * compared for equality, but the data type of one of the values is - * unknown. - */ - {BasisLibrary.EQUALITY_EXPR_ERR, - "Type d'argument inconnu dans l'expression d'\u00E9galit\u00E9."}, - - /* - * Note to translators: The substitution text for {0} will be a data - * type; the substitution text for {1} will be the name of a function. - * This is displayed if an argument of the particular data type is not - * permitted for a call to this function. - */ - {BasisLibrary.INVALID_ARGUMENT_ERR, - "Type d''argument ''{0}'' non valide dans l''appel de ''{1}''"}, - - /* - * Note to translators: There is way of specifying a format for a - * number using a pattern; the processor was unable to format the - * particular value using the specified pattern. - */ - {BasisLibrary.FORMAT_NUMBER_ERR, - "Tentative de formatage du nombre ''{0}'' \u00E0 l''aide du mod\u00E8le ''{1}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor was unable to create a copy of an - * iterator. (See definition of iterator above.) - */ - {BasisLibrary.ITERATOR_CLONE_ERR, - "Impossible de cloner l''it\u00E9rateur ''{0}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.AXIS_SUPPORT_ERR, - "It\u00E9rateur de l''axe ''{0}'' non pris en charge."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.TYPED_AXIS_SUPPORT_ERR, - "It\u00E9rateur de l''axe saisi ''{0}'' non pris en charge."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {BasisLibrary.STRAY_ATTRIBUTE_ERR, - "Attribut ''{0}'' en dehors de l''\u00E9l\u00E9ment."}, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {BasisLibrary.STRAY_NAMESPACE_ERR, - "La d\u00E9claration d''espace de noms ''{0}''=''{1}'' est \u00E0 l''ext\u00E9rieur de l''\u00E9l\u00E9ment."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {BasisLibrary.NAMESPACE_PREFIX_ERR, - "L''espace de noms du pr\u00E9fixe ''{0}'' n''a pas \u00E9t\u00E9 d\u00E9clar\u00E9."}, - - /* - * Note to translators: The following represents an internal error. - * DOMAdapter is a Java class in XSLTC. - */ - {BasisLibrary.DOM_ADAPTER_INIT_ERR, - "DOMAdapter cr\u00E9\u00E9 avec le mauvais type de DOM source."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not describe to XSLTC the structure of the input XML document's - * DTD. - */ - {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "L'analyseur SAX que vous utilisez ne g\u00E8re pas les \u00E9v\u00E9nements de d\u00E9claration DTD."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not distinguish between ordinary XML attributes and namespace - * declarations. - */ - {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "L'analyseur SAX que vous utilisez ne prend pas en charge les espaces de noms XML."}, - - /* - * Note to translators: The substitution text is the URI that was in - * error. - */ - {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR, - "Impossible de r\u00E9soudre la r\u00E9f\u00E9rence d''URI ''{0}''."}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {BasisLibrary.UNSUPPORTED_XSL_ERR, - "El\u00E9ment XSL ''{0}'' non pris en charge"}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSLTC does - * not recognize the particular extension named. The substitution text - * gives the extension name. - */ - {BasisLibrary.UNSUPPORTED_EXT_ERR, - "Extension XSLTC ''{0}'' non reconnue"}, - - - /* - * Note to translators: This error message is produced if the translet - * class was compiled using a newer version of XSLTC and deployed for - * execution with an older version of XSLTC. The substitution text is - * the name of the translet class. - */ - {BasisLibrary.UNKNOWN_TRANSLET_VERSION_ERR, - "Le translet sp\u00E9cifi\u00E9, ''{0}'', a \u00E9t\u00E9 cr\u00E9\u00E9 \u00E0 l''aide d''une version de XSLTC plus r\u00E9cente que la version de l''ex\u00E9cution XSLTC utilis\u00E9e. Vous devez recompiler la feuille de style ou utiliser une version plus r\u00E9cente de XSLTC pour ex\u00E9cuter ce translet."}, - - /* - * Note to translators: An attribute whose effective value is required - * to be a "QName" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_QNAME_ERR, - "Un attribut dont la valeur doit \u00EAtre un QName avait la valeur ''{0}''"}, - - - /* - * Note to translators: An attribute whose effective value is required - * to be a "NCName" had a value that was incorrect. - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_NCNAME_ERR, - "Un attribut dont la valeur doit \u00EAtre un NCName avait la valeur ''{0}''"}, - - {BasisLibrary.UNALLOWED_EXTENSION_FUNCTION_ERR, - "L''utilisation de la fonction d''extension ''{0}'' n''est pas autoris\u00E9e lorsque la fonctionnalit\u00E9 de traitement s\u00E9curis\u00E9 est d\u00E9finie sur True."}, - - {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, - "L''utilisation de l''\u00E9l\u00E9ment d''extension ''{0}'' n''est pas autoris\u00E9e lorsque la fonctionnalit\u00E9 de traitement s\u00E9curis\u00E9 est d\u00E9finie sur True."}, - }; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_it.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_it.java deleted file mode 100644 index 9229c7593f4..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_it.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 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.xalan.internal.xsltc.runtime; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_it extends ListResourceBundle { - -/* - * XSLTC run-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for XML Stylesheet: - * Transformations Compiler - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant output XML document (or HTML document or text) - * - * 3) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 4) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 5) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 6) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 7) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 8) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 9) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /* - * Note to translators: the substitution text in the following message - * is a class name. Used for internal errors in the processor. - */ - {BasisLibrary.RUN_TIME_INTERNAL_ERR, - "Errore interno in fase di esecuzione in ''{0}''"}, - - /* - * Note to translators: is a keyword that should not be - * translated. - */ - {BasisLibrary.RUN_TIME_COPY_ERR, - "Errore in fase di esecuzione durante l'esecuzione di ."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of type - * {0}. - */ - {BasisLibrary.DATA_CONVERSION_ERR, - "Conversione non valida da ''{0}'' a ''{1}''."}, - - /* - * Note to translators: This message is displayed if the function named - * by the substitution text is not a function that is supported. XSLTC - * is the acronym naming the product. - */ - {BasisLibrary.EXTERNAL_FUNC_ERR, - "Funzione esterna ''{0}'' non supportata da XSLTC."}, - - /* - * Note to translators: This message is displayed if two values are - * compared for equality, but the data type of one of the values is - * unknown. - */ - {BasisLibrary.EQUALITY_EXPR_ERR, - "Tipo di argomento sconosciuto nell'espressione di uguaglianza."}, - - /* - * Note to translators: The substitution text for {0} will be a data - * type; the substitution text for {1} will be the name of a function. - * This is displayed if an argument of the particular data type is not - * permitted for a call to this function. - */ - {BasisLibrary.INVALID_ARGUMENT_ERR, - "Tipo di argomento ''{0}'' non valido nella chiamata a ''{1}''"}, - - /* - * Note to translators: There is way of specifying a format for a - * number using a pattern; the processor was unable to format the - * particular value using the specified pattern. - */ - {BasisLibrary.FORMAT_NUMBER_ERR, - "Tentativo di formattare il numero ''{0}'' mediante il pattern ''{1}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor was unable to create a copy of an - * iterator. (See definition of iterator above.) - */ - {BasisLibrary.ITERATOR_CLONE_ERR, - "Impossibile duplicare l''iteratore ''{0}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.AXIS_SUPPORT_ERR, - "Iteratore per l''asse ''{0}'' non supportato."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.TYPED_AXIS_SUPPORT_ERR, - "Iteratore per l''asse immesso ''{0}'' non supportato."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {BasisLibrary.STRAY_ATTRIBUTE_ERR, - "Attributo ''{0}'' al di fuori dell''elemento."}, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {BasisLibrary.STRAY_NAMESPACE_ERR, - "Dichiarazione dello spazio di nomi ''{0}''=''{1}'' al di fuori dell''elemento."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {BasisLibrary.NAMESPACE_PREFIX_ERR, - "Lo spazio di nomi per il prefisso ''{0}'' non \u00E8 stato dichiarato."}, - - /* - * Note to translators: The following represents an internal error. - * DOMAdapter is a Java class in XSLTC. - */ - {BasisLibrary.DOM_ADAPTER_INIT_ERR, - "DOMAdapter creato utilizzando il tipo errato di DOM di origine."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not describe to XSLTC the structure of the input XML document's - * DTD. - */ - {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "Il parser SAX in uso non gestisce gli eventi di dichiarazione DTD."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not distinguish between ordinary XML attributes and namespace - * declarations. - */ - {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "Il parser SAX in uso non supporta gli spazi di nomi XML."}, - - /* - * Note to translators: The substitution text is the URI that was in - * error. - */ - {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR, - "Impossibile risolvere il riferimento URI ''{0}''."}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {BasisLibrary.UNSUPPORTED_XSL_ERR, - "Elemento XSL \"{0}\" non supportato"}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSLTC does - * not recognize the particular extension named. The substitution text - * gives the extension name. - */ - {BasisLibrary.UNSUPPORTED_EXT_ERR, - "Estensione XSLTC ''{0}'' non riconosciuta"}, - - - /* - * Note to translators: This error message is produced if the translet - * class was compiled using a newer version of XSLTC and deployed for - * execution with an older version of XSLTC. The substitution text is - * the name of the translet class. - */ - {BasisLibrary.UNKNOWN_TRANSLET_VERSION_ERR, - "Il translet specificato ''{0}'' \u00E8 stato creato utilizzando una versione di XSLTC pi\u00F9 recente di quella della fase di esecuzione XSLTC in uso. Ricompilare il foglio di stile o utilizzare una versione pi\u00F9 recente di XSLTC per eseguire questo translet."}, - - /* - * Note to translators: An attribute whose effective value is required - * to be a "QName" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_QNAME_ERR, - "Un attributo il cui valore deve essere un QName contiene il valore ''{0}''"}, - - - /* - * Note to translators: An attribute whose effective value is required - * to be a "NCName" had a value that was incorrect. - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_NCNAME_ERR, - "Un attributo il cui valore deve essere un NCName contiene il valore ''{0}''"}, - - {BasisLibrary.UNALLOWED_EXTENSION_FUNCTION_ERR, - "Non \u00E8 consentito utilizzare la funzione di estensione ''{0}'' se la funzione di elaborazione sicura \u00E8 impostata su true."}, - - {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, - "Non \u00E8 consentito utilizzare l''elemento di estensione ''{0}'' se la funzione di elaborazione sicura \u00E8 impostata su true."}, - }; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java deleted file mode 100644 index b2a9824ee66..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 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.xalan.internal.xsltc.runtime; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_ko extends ListResourceBundle { - -/* - * XSLTC run-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for XML Stylesheet: - * Transformations Compiler - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant output XML document (or HTML document or text) - * - * 3) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 4) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 5) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 6) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 7) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 8) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 9) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /* - * Note to translators: the substitution text in the following message - * is a class name. Used for internal errors in the processor. - */ - {BasisLibrary.RUN_TIME_INTERNAL_ERR, - "''{0}''\uC5D0 \uB7F0\uD0C0\uC784 \uB0B4\uBD80 \uC624\uB958\uAC00 \uC788\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: is a keyword that should not be - * translated. - */ - {BasisLibrary.RUN_TIME_COPY_ERR, - "\uB97C \uC2E4\uD589\uD558\uB294 \uC911 \uB7F0\uD0C0\uC784 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of type - * {0}. - */ - {BasisLibrary.DATA_CONVERSION_ERR, - "''{0}''\uC5D0\uC11C ''{1}''(\uC73C)\uB85C\uC758 \uBCC0\uD658\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: This message is displayed if the function named - * by the substitution text is not a function that is supported. XSLTC - * is the acronym naming the product. - */ - {BasisLibrary.EXTERNAL_FUNC_ERR, - "XSLTC\uB294 \uC678\uBD80 \uD568\uC218 ''{0}''\uC744(\uB97C) \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: This message is displayed if two values are - * compared for equality, but the data type of one of the values is - * unknown. - */ - {BasisLibrary.EQUALITY_EXPR_ERR, - "\uB3D9\uB4F1\uC131 \uD45C\uD604\uC2DD\uC5D0 \uC54C \uC218 \uC5C6\uB294 \uC778\uC218 \uC720\uD615\uC774 \uC788\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text for {0} will be a data - * type; the substitution text for {1} will be the name of a function. - * This is displayed if an argument of the particular data type is not - * permitted for a call to this function. - */ - {BasisLibrary.INVALID_ARGUMENT_ERR, - "''{1}''\uC5D0 \uB300\uD55C \uD638\uCD9C\uC5D0 \uBD80\uC801\uD569\uD55C \uC778\uC218 \uC720\uD615 ''{0}''\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: There is way of specifying a format for a - * number using a pattern; the processor was unable to format the - * particular value using the specified pattern. - */ - {BasisLibrary.FORMAT_NUMBER_ERR, - "''{1}'' \uD328\uD134\uC744 \uC0AC\uC6A9\uD558\uC5EC ''{0}'' \uC22B\uC790\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor was unable to create a copy of an - * iterator. (See definition of iterator above.) - */ - {BasisLibrary.ITERATOR_CLONE_ERR, - "''{0}'' \uC774\uD130\uB808\uC774\uD130\uB97C \uBCF5\uC81C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.AXIS_SUPPORT_ERR, - "''{0}'' \uCD95\uC5D0 \uB300\uD55C \uC774\uD130\uB808\uC774\uD130\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.TYPED_AXIS_SUPPORT_ERR, - "\uC785\uB825\uB41C \uCD95 ''{0}''\uC5D0 \uB300\uD55C \uC774\uD130\uB808\uC774\uD130\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {BasisLibrary.STRAY_ATTRIBUTE_ERR, - "''{0}'' \uC18D\uC131\uC774 \uC694\uC18C\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {BasisLibrary.STRAY_NAMESPACE_ERR, - "\uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC120\uC5B8 ''{0}''=''{1}''\uC774(\uAC00) \uC694\uC18C\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {BasisLibrary.NAMESPACE_PREFIX_ERR, - "''{0}'' \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The following represents an internal error. - * DOMAdapter is a Java class in XSLTC. - */ - {BasisLibrary.DOM_ADAPTER_INIT_ERR, - "\uC18C\uC2A4 DOM\uC758 \uC798\uBABB\uB41C \uC720\uD615\uC744 \uC0AC\uC6A9\uD558\uC5EC DOMAdapter\uAC00 \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not describe to XSLTC the structure of the input XML document's - * DTD. - */ - {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 DTD \uC120\uC5B8 \uC774\uBCA4\uD2B8\uB97C \uCC98\uB9AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not distinguish between ordinary XML attributes and namespace - * declarations. - */ - {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 XML \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The substitution text is the URI that was in - * error. - */ - {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR, - "URI \uCC38\uC870 ''{0}''\uC744(\uB97C) \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {BasisLibrary.UNSUPPORTED_XSL_ERR, - "''{0}''\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 XSL \uC694\uC18C\uC785\uB2C8\uB2E4."}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSLTC does - * not recognize the particular extension named. The substitution text - * gives the extension name. - */ - {BasisLibrary.UNSUPPORTED_EXT_ERR, - "''{0}''\uC740(\uB294) \uC54C \uC218 \uC5C6\uB294 XSLTC \uD655\uC7A5\uC785\uB2C8\uB2E4."}, - - - /* - * Note to translators: This error message is produced if the translet - * class was compiled using a newer version of XSLTC and deployed for - * execution with an older version of XSLTC. The substitution text is - * the name of the translet class. - */ - {BasisLibrary.UNKNOWN_TRANSLET_VERSION_ERR, - "\uC9C0\uC815\uB41C translet ''{0}''\uC774(\uAC00) \uC0AC\uC6A9 \uC911\uC778 XSLTC \uB7F0\uD0C0\uC784 \uBC84\uC804\uBCF4\uB2E4 \uCD5C\uC2E0\uC758 XSLTC \uBC84\uC804\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC774 translet\uC744 \uC2E4\uD589\uD558\uB824\uBA74 \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uB97C \uC7AC\uCEF4\uD30C\uC77C\uD558\uAC70\uB098 \uCD5C\uC2E0 XSLTC \uBC84\uC804\uC744 \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4."}, - - /* - * Note to translators: An attribute whose effective value is required - * to be a "QName" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_QNAME_ERR, - "\uAC12\uC774 QName\uC774\uC5B4\uC57C \uD558\uB294 \uC18D\uC131\uC758 \uAC12\uC774 ''{0}''\uC785\uB2C8\uB2E4."}, - - - /* - * Note to translators: An attribute whose effective value is required - * to be a "NCName" had a value that was incorrect. - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_NCNAME_ERR, - "\uAC12\uC774 NCName\uC774\uC5B4\uC57C \uD558\uB294 \uC18D\uC131\uC758 \uAC12\uC774 ''{0}''\uC785\uB2C8\uB2E4."}, - - {BasisLibrary.UNALLOWED_EXTENSION_FUNCTION_ERR, - "\uBCF4\uC548 \uCC98\uB9AC \uAE30\uB2A5\uC774 true\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 \uD655\uC7A5 \uD568\uC218 ''{0}''\uC744(\uB97C) \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, - "\uBCF4\uC548 \uCC98\uB9AC \uAE30\uB2A5\uC774 true\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 \uD655\uC7A5 \uC694\uC18C ''{0}''\uC744(\uB97C) \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - }; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java deleted file mode 100644 index 0449d56d528..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 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.xalan.internal.xsltc.runtime; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_pt_BR extends ListResourceBundle { - -/* - * XSLTC run-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for XML Stylesheet: - * Transformations Compiler - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant output XML document (or HTML document or text) - * - * 3) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 4) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 5) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 6) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 7) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 8) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 9) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /* - * Note to translators: the substitution text in the following message - * is a class name. Used for internal errors in the processor. - */ - {BasisLibrary.RUN_TIME_INTERNAL_ERR, - "Erro interno de runtime em ''{0}''"}, - - /* - * Note to translators: is a keyword that should not be - * translated. - */ - {BasisLibrary.RUN_TIME_COPY_ERR, - "Erro de runtime ao executar ."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of type - * {0}. - */ - {BasisLibrary.DATA_CONVERSION_ERR, - "Convers\u00E3o inv\u00E1lida de ''{0}'' para ''{1}''."}, - - /* - * Note to translators: This message is displayed if the function named - * by the substitution text is not a function that is supported. XSLTC - * is the acronym naming the product. - */ - {BasisLibrary.EXTERNAL_FUNC_ERR, - "Fun\u00E7\u00E3o externa ''{0}'' n\u00E3o suportada por XSLTC."}, - - /* - * Note to translators: This message is displayed if two values are - * compared for equality, but the data type of one of the values is - * unknown. - */ - {BasisLibrary.EQUALITY_EXPR_ERR, - "Tipo de argumento desconhecido na express\u00E3o de igualdade."}, - - /* - * Note to translators: The substitution text for {0} will be a data - * type; the substitution text for {1} will be the name of a function. - * This is displayed if an argument of the particular data type is not - * permitted for a call to this function. - */ - {BasisLibrary.INVALID_ARGUMENT_ERR, - "Tipo de argumento inv\u00E1lido ''{0}'' na chamada para ''{1}''"}, - - /* - * Note to translators: There is way of specifying a format for a - * number using a pattern; the processor was unable to format the - * particular value using the specified pattern. - */ - {BasisLibrary.FORMAT_NUMBER_ERR, - "Tentativa de formatar o n\u00FAmero ''{0}'' usando o padr\u00E3o ''{1}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor was unable to create a copy of an - * iterator. (See definition of iterator above.) - */ - {BasisLibrary.ITERATOR_CLONE_ERR, - "N\u00E3o \u00E9 poss\u00EDvel clonar o iterador ''{0}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.AXIS_SUPPORT_ERR, - "Iterador do eixo ''{0}'' n\u00E3o suportado."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.TYPED_AXIS_SUPPORT_ERR, - "Iterador do eixo digitado ''{0}'' n\u00E3o suportado."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {BasisLibrary.STRAY_ATTRIBUTE_ERR, - "Atributo ''{0}'' fora do elemento."}, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {BasisLibrary.STRAY_NAMESPACE_ERR, - "Declara\u00E7\u00E3o de namespace ''{0}''=''{1}'' fora do elemento."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {BasisLibrary.NAMESPACE_PREFIX_ERR, - "O namespace do prefixo ''{0}'' n\u00E3o foi declarado."}, - - /* - * Note to translators: The following represents an internal error. - * DOMAdapter is a Java class in XSLTC. - */ - {BasisLibrary.DOM_ADAPTER_INIT_ERR, - "DOMAdapter criado usando o tipo incorreto de DOM de origem."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not describe to XSLTC the structure of the input XML document's - * DTD. - */ - {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "O parser SAX que voc\u00EA est\u00E1 usando n\u00E3o trata eventos de declara\u00E7\u00E3o de DTD."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not distinguish between ordinary XML attributes and namespace - * declarations. - */ - {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "O parser SAX que voc\u00EA est\u00E1 usando n\u00E3o tem suporte para os Namespaces de XML."}, - - /* - * Note to translators: The substitution text is the URI that was in - * error. - */ - {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR, - "N\u00E3o foi poss\u00EDvel resolver a refer\u00EAncia do URI ''{0}''."}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {BasisLibrary.UNSUPPORTED_XSL_ERR, - "Elemento XSL ''{0}'' n\u00E3o suportado"}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSLTC does - * not recognize the particular extension named. The substitution text - * gives the extension name. - */ - {BasisLibrary.UNSUPPORTED_EXT_ERR, - "Extens\u00E3o ''{0}'' de XSLTC n\u00E3o reconhecida"}, - - - /* - * Note to translators: This error message is produced if the translet - * class was compiled using a newer version of XSLTC and deployed for - * execution with an older version of XSLTC. The substitution text is - * the name of the translet class. - */ - {BasisLibrary.UNKNOWN_TRANSLET_VERSION_ERR, - "O translet especificado, ''{0}'', foi criado usando uma vers\u00E3o do XSLTC mais recente que a vers\u00E3o de runtime de XSLTC em uso. Recompile a folha de estilos ou use uma vers\u00E3o mais recente de XSLTC para executar este translet."}, - - /* - * Note to translators: An attribute whose effective value is required - * to be a "QName" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_QNAME_ERR, - "Um atributo cujo valor deve ser um QName tinha o valor ''{0}''"}, - - - /* - * Note to translators: An attribute whose effective value is required - * to be a "NCName" had a value that was incorrect. - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_NCNAME_ERR, - "Um atributo cujo valor deve ser um NCName tinha o valor ''{0}''"}, - - {BasisLibrary.UNALLOWED_EXTENSION_FUNCTION_ERR, - "O uso da fun\u00E7\u00E3o da extens\u00E3o ''{0}'' n\u00E3o ser\u00E1 permitido quando o recurso de processamento seguro for definido como verdadeiro."}, - - {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, - "O uso do elemento da extens\u00E3o ''{0}'' n\u00E3o ser\u00E1 permitido quando o recurso de processamento seguro for definido como verdadeiro."}, - }; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sk.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sk.java deleted file mode 100644 index cdaae51704c..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sk.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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.xalan.internal.xsltc.runtime; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_sk extends ListResourceBundle { - -/* - * XSLTC run-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for XML Stylesheet: - * Transformations Compiler - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant output XML document (or HTML document or text) - * - * 3) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 4) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 5) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 6) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 7) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 8) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /* - * Note to translators: the substitution text in the following message - * is a class name. Used for internal errors in the processor. - */ - {BasisLibrary.RUN_TIME_INTERNAL_ERR, - "Intern\u00e1 chyba \u010dasu spustenia v ''{0}''"}, - - /* - * Note to translators: is a keyword that should not be - * translated. - */ - {BasisLibrary.RUN_TIME_COPY_ERR, - "Chyba \u010dasu spustenia pri sp\u00fa\u0161\u0165an\u00ed ."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of type - * {0}. - */ - {BasisLibrary.DATA_CONVERSION_ERR, - "Neplatn\u00e1 konverzia z ''{0}'' na ''{1}''."}, - - /* - * Note to translators: This message is displayed if the function named - * by the substitution text is not a function that is supported. XSLTC - * is the acronym naming the product. - */ - {BasisLibrary.EXTERNAL_FUNC_ERR, - "XSLTC nepodporuje extern\u00fa funkciu ''{0}''."}, - - /* - * Note to translators: This message is displayed if two values are - * compared for equality, but the data type of one of the values is - * unknown. - */ - {BasisLibrary.EQUALITY_EXPR_ERR, - "Nezn\u00e1my typ argumentu je v\u00fdrazom rovnosti."}, - - /* - * Note to translators: The substitution text for {0} will be a data - * type; the substitution text for {1} will be the name of a function. - * This is displayed if an argument of the particular data type is not - * permitted for a call to this function. - */ - {BasisLibrary.INVALID_ARGUMENT_ERR, - "Neplatn\u00fd typ argumentu ''{0}'' vo volan\u00ed do ''{1}''"}, - - /* - * Note to translators: There is way of specifying a format for a - * number using a pattern; the processor was unable to format the - * particular value using the specified pattern. - */ - {BasisLibrary.FORMAT_NUMBER_ERR, - "Pokus o form\u00e1tovanie \u010d\u00edsla ''{0}'' pomocou vzoru ''{1}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor was unable to create a copy of an - * iterator. (See definition of iterator above.) - */ - {BasisLibrary.ITERATOR_CLONE_ERR, - "Nie je mo\u017en\u00e9 klonova\u0165 iter\u00e1tor ''{0}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.AXIS_SUPPORT_ERR, - "Iter\u00e1tor pre os ''{0}'' nie je podporovan\u00fd."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.TYPED_AXIS_SUPPORT_ERR, - "Iter\u00e1tor pre nap\u00edsan\u00fa os ''{0}'' nie je podporovan\u00fd."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {BasisLibrary.STRAY_ATTRIBUTE_ERR, - "Atrib\u00fat ''{0}'' je mimo elementu."}, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {BasisLibrary.STRAY_NAMESPACE_ERR, - "Deklar\u00e1cia n\u00e1zvov\u00e9ho priestoru ''{0}''=''{1}'' je mimo elementu."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {BasisLibrary.NAMESPACE_PREFIX_ERR, - "N\u00e1zvov\u00fd priestor pre predponu ''{0}'' nebol deklarovan\u00fd."}, - - /* - * Note to translators: The following represents an internal error. - * DOMAdapter is a Java class in XSLTC. - */ - {BasisLibrary.DOM_ADAPTER_INIT_ERR, - "DOMAdapter bol vytvoren\u00fd pomocou nespr\u00e1vneho typu zdrojov\u00e9ho DOM."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not describe to XSLTC the structure of the input XML document's - * DTD. - */ - {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "Analyz\u00e1tor SAX, ktor\u00fd pou\u017e\u00edvate, nesprac\u00fava udalosti deklar\u00e1cie DTD."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not distinguish between ordinary XML attributes and namespace - * declarations. - */ - {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "Analyz\u00e1tor SAX, ktor\u00fd pou\u017e\u00edvate, nem\u00e1 podporu pre n\u00e1zvov\u00e9 priestory XML."}, - - /* - * Note to translators: The substitution text is the URI that was in - * error. - */ - {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR, - "Nebolo mo\u017en\u00e9 rozl\u00ed\u0161i\u0165 referenciu URI ''{0}''."} - }; - - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java deleted file mode 100644 index 214c20c5e28..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 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.xalan.internal.xsltc.runtime; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_sv extends ListResourceBundle { - -/* - * XSLTC run-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for XML Stylesheet: - * Transformations Compiler - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant output XML document (or HTML document or text) - * - * 3) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 4) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 5) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 6) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 7) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 8) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 9) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /* - * Note to translators: the substitution text in the following message - * is a class name. Used for internal errors in the processor. - */ - {BasisLibrary.RUN_TIME_INTERNAL_ERR, - "Internt exekveringsfel i ''{0}''"}, - - /* - * Note to translators: is a keyword that should not be - * translated. - */ - {BasisLibrary.RUN_TIME_COPY_ERR, - "Exekveringsexekveringsfel av ."}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of type - * {0}. - */ - {BasisLibrary.DATA_CONVERSION_ERR, - "Ogiltig konvertering fr\u00E5n ''{0}'' till ''{1}''."}, - - /* - * Note to translators: This message is displayed if the function named - * by the substitution text is not a function that is supported. XSLTC - * is the acronym naming the product. - */ - {BasisLibrary.EXTERNAL_FUNC_ERR, - "Den externa funktionen ''{0}'' underst\u00F6ds inte i XSLTC."}, - - /* - * Note to translators: This message is displayed if two values are - * compared for equality, but the data type of one of the values is - * unknown. - */ - {BasisLibrary.EQUALITY_EXPR_ERR, - "Ok\u00E4nd argumenttyp i likhetsuttryck."}, - - /* - * Note to translators: The substitution text for {0} will be a data - * type; the substitution text for {1} will be the name of a function. - * This is displayed if an argument of the particular data type is not - * permitted for a call to this function. - */ - {BasisLibrary.INVALID_ARGUMENT_ERR, - "Argumenttyp ''{0}'' i anrop till ''{1}'' \u00E4r inte giltig"}, - - /* - * Note to translators: There is way of specifying a format for a - * number using a pattern; the processor was unable to format the - * particular value using the specified pattern. - */ - {BasisLibrary.FORMAT_NUMBER_ERR, - "F\u00F6rs\u00F6ker formatera talet ''{0}'' med m\u00F6nstret ''{1}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor was unable to create a copy of an - * iterator. (See definition of iterator above.) - */ - {BasisLibrary.ITERATOR_CLONE_ERR, - "Kan inte klona iteratorn ''{0}''."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.AXIS_SUPPORT_ERR, - "Iteratorn f\u00F6r axeln ''{0}'' underst\u00F6ds inte."}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.TYPED_AXIS_SUPPORT_ERR, - "Iteratorn f\u00F6r den typade axeln ''{0}'' underst\u00F6ds inte."}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {BasisLibrary.STRAY_ATTRIBUTE_ERR, - "Attributet ''{0}'' finns utanf\u00F6r elementet."}, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {BasisLibrary.STRAY_NAMESPACE_ERR, - "Namnrymdsdeklarationen ''{0}''=''{1}'' finns utanf\u00F6r element."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {BasisLibrary.NAMESPACE_PREFIX_ERR, - "Namnrymd f\u00F6r prefix ''{0}'' har inte deklarerats."}, - - /* - * Note to translators: The following represents an internal error. - * DOMAdapter is a Java class in XSLTC. - */ - {BasisLibrary.DOM_ADAPTER_INIT_ERR, - "DOMAdapter har skapats med fel typ av DOM-k\u00E4lla."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not describe to XSLTC the structure of the input XML document's - * DTD. - */ - {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "Den SAX-parser som du anv\u00E4nder hanterar inga DTD-deklarationsh\u00E4ndelser."}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not distinguish between ordinary XML attributes and namespace - * declarations. - */ - {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "Den SAX-parser som du anv\u00E4nder saknar st\u00F6d f\u00F6r XML-namnrymder."}, - - /* - * Note to translators: The substitution text is the URI that was in - * error. - */ - {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR, - "Kunde inte matcha URI-referensen ''{0}''."}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {BasisLibrary.UNSUPPORTED_XSL_ERR, - "XSL-elementet ''{0}'' st\u00F6ds inte"}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSLTC does - * not recognize the particular extension named. The substitution text - * gives the extension name. - */ - {BasisLibrary.UNSUPPORTED_EXT_ERR, - "XSLTC-till\u00E4gget ''{0}'' \u00E4r ok\u00E4nt"}, - - - /* - * Note to translators: This error message is produced if the translet - * class was compiled using a newer version of XSLTC and deployed for - * execution with an older version of XSLTC. The substitution text is - * the name of the translet class. - */ - {BasisLibrary.UNKNOWN_TRANSLET_VERSION_ERR, - "Angiven translet, ''{0}'', har skapats med en XSLTC-version som \u00E4r senare \u00E4n den XSLTC-k\u00F6rning i bruk. F\u00F6r att kunna k\u00F6ra denna translet m\u00E5ste du omkompilera formatmallen eller anv\u00E4nda en senare version av XSLTC."}, - - /* - * Note to translators: An attribute whose effective value is required - * to be a "QName" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_QNAME_ERR, - "Ett attribut vars v\u00E4rde m\u00E5ste vara ett QName hade v\u00E4rdet ''{0}''"}, - - - /* - * Note to translators: An attribute whose effective value is required - * to be a "NCName" had a value that was incorrect. - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_NCNAME_ERR, - "Ett attribut vars v\u00E4rde m\u00E5ste vara ett NCName hade v\u00E4rdet ''{0}''"}, - - {BasisLibrary.UNALLOWED_EXTENSION_FUNCTION_ERR, - "Anv\u00E4ndning av till\u00E4ggsfunktionen ''{0}'' \u00E4r inte till\u00E5tet n\u00E4r s\u00E4ker bearbetning till\u00E4mpas."}, - - {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, - "Anv\u00E4ndning av till\u00E4ggselementet ''{0}'' \u00E4r inte till\u00E5tet n\u00E4r s\u00E4ker bearbetning till\u00E4mpas."}, - }; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_TW.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_TW.java deleted file mode 100644 index 92736a4154c..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_TW.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 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.xalan.internal.xsltc.runtime; - -import java.util.ListResourceBundle; - -/** - * @author Morten Jorgensen - */ -public class ErrorMessages_zh_TW extends ListResourceBundle { - -/* - * XSLTC run-time error messages. - * - * General notes to translators and definitions: - * - * 1) XSLTC is the name of the product. It is an acronym for XML Stylesheet: - * Transformations Compiler - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant output XML document (or HTML document or text) - * - * 3) An axis is a particular "dimension" in a tree representation of an XML - * document; the nodes in the tree are divided along different axes. - * Traversing the "child" axis, for instance, means that the program - * would visit each child of a particular node; traversing the "descendant" - * axis means that the program would visit the child nodes of a particular - * node, their children, and so on until the leaf nodes of the tree are - * reached. - * - * 4) An iterator is an object that traverses nodes in a tree along a - * particular axis, one at a time. - * - * 5) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 6) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 7) DOM is an acronym for Document Object Model. It is a tree - * representation of an XML document. - * - * SAX is an acronym for the Simple API for XML processing. It is an API - * used inform an XML processor (in this case XSLTC) of the structure and - * content of an XML document. - * - * Input to the stylesheet processor can come from an XML parser in the - * form of a DOM tree or through the SAX API. - * - * 8) DTD is a document type declaration. It is a way of specifying the - * grammar for an XML file, the names and types of elements, attributes, - * etc. - * - * 9) Translet is an invented term that refers to the class file that contains - * the compiled form of a stylesheet. - */ - - // These message should be read from a locale-specific resource bundle - /** Get the lookup table for error messages. - * - * @return The message lookup table. - */ - public Object[][] getContents() - { - return new Object[][] { - - /* - * Note to translators: the substitution text in the following message - * is a class name. Used for internal errors in the processor. - */ - {BasisLibrary.RUN_TIME_INTERNAL_ERR, - "''{0}'' \u4E2D\u7684\u57F7\u884C\u968E\u6BB5\u5167\u90E8\u932F\u8AA4"}, - - /* - * Note to translators: is a keyword that should not be - * translated. - */ - {BasisLibrary.RUN_TIME_COPY_ERR, - "\u57F7\u884C \u6642\u767C\u751F\u57F7\u884C\u968E\u6BB5\u932F\u8AA4"}, - - /* - * Note to translators: The substitution text refers to data types. - * The message is displayed if a value in a particular context needs to - * be converted to type {1}, but that's not possible for a value of type - * {0}. - */ - {BasisLibrary.DATA_CONVERSION_ERR, - "\u5F9E ''{0}'' \u81F3 ''{1}'' \u7684\u8F49\u63DB\u7121\u6548\u3002"}, - - /* - * Note to translators: This message is displayed if the function named - * by the substitution text is not a function that is supported. XSLTC - * is the acronym naming the product. - */ - {BasisLibrary.EXTERNAL_FUNC_ERR, - "XSLTC \u4E0D\u652F\u63F4\u5916\u90E8\u51FD\u6578 ''{0}''\u3002"}, - - /* - * Note to translators: This message is displayed if two values are - * compared for equality, but the data type of one of the values is - * unknown. - */ - {BasisLibrary.EQUALITY_EXPR_ERR, - "\u76F8\u7B49\u6027\u8868\u793A\u5F0F\u4E2D\u7684\u5F15\u6578\u985E\u578B\u4E0D\u660E\u3002"}, - - /* - * Note to translators: The substitution text for {0} will be a data - * type; the substitution text for {1} will be the name of a function. - * This is displayed if an argument of the particular data type is not - * permitted for a call to this function. - */ - {BasisLibrary.INVALID_ARGUMENT_ERR, - "\u547C\u53EB ''{1}'' \u4E2D\u7684\u5F15\u6578\u985E\u578B ''{0}'' \u7121\u6548"}, - - /* - * Note to translators: There is way of specifying a format for a - * number using a pattern; the processor was unable to format the - * particular value using the specified pattern. - */ - {BasisLibrary.FORMAT_NUMBER_ERR, - "\u5617\u8A66\u4F7F\u7528\u6A23\u5F0F ''{1}'' \u683C\u5F0F\u5316\u6578\u5B57 ''{0}''\u3002"}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor was unable to create a copy of an - * iterator. (See definition of iterator above.) - */ - {BasisLibrary.ITERATOR_CLONE_ERR, - "\u7121\u6CD5\u8907\u88FD\u91CD\u8907\u7A0B\u5F0F ''{0}''\u3002"}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.AXIS_SUPPORT_ERR, - "\u4E0D\u652F\u63F4\u8EF8 ''{0}'' \u7684\u91CD\u8907\u7A0B\u5F0F\u3002"}, - - /* - * Note to translators: The following represents an internal error - * situation in XSLTC. The processor attempted to create an iterator - * for a particular axis (see definition above) that it does not - * support. - */ - {BasisLibrary.TYPED_AXIS_SUPPORT_ERR, - "\u4E0D\u652F\u63F4\u985E\u578B\u8EF8 ''{0}'' \u7684\u91CD\u8907\u7A0B\u5F0F\u3002"}, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {BasisLibrary.STRAY_ATTRIBUTE_ERR, - "\u5C6C\u6027 ''{0}'' \u5728\u5143\u7D20\u4E4B\u5916\u3002"}, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {BasisLibrary.STRAY_NAMESPACE_ERR, - "\u547D\u540D\u7A7A\u9593\u5BA3\u544A ''{0}''=''{1}'' \u8D85\u51FA\u5143\u7D20\u5916\u3002"}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {BasisLibrary.NAMESPACE_PREFIX_ERR, - "\u5B57\u9996 ''{0}'' \u7684\u547D\u540D\u7A7A\u9593\u5C1A\u672A\u5BA3\u544A\u3002"}, - - /* - * Note to translators: The following represents an internal error. - * DOMAdapter is a Java class in XSLTC. - */ - {BasisLibrary.DOM_ADAPTER_INIT_ERR, - "\u4F7F\u7528\u932F\u8AA4\u7684\u4F86\u6E90 DOM \u985E\u578B\u5EFA\u7ACB DOMAdapter\u3002"}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not describe to XSLTC the structure of the input XML document's - * DTD. - */ - {BasisLibrary.PARSER_DTD_SUPPORT_ERR, - "\u60A8\u6B63\u5728\u4F7F\u7528\u7684 SAX \u5256\u6790\u5668\u4E0D\u6703\u8655\u7406 DTD \u5BA3\u544A\u4E8B\u4EF6\u3002"}, - - /* - * Note to translators: The following message indicates that the XML - * parser that is providing input to XSLTC cannot be used because it - * does not distinguish between ordinary XML attributes and namespace - * declarations. - */ - {BasisLibrary.NAMESPACES_SUPPORT_ERR, - "\u60A8\u6B63\u5728\u4F7F\u7528\u7684 SAX \u5256\u6790\u5668\u4E0D\u652F\u63F4 XML \u547D\u540D\u7A7A\u9593\u3002"}, - - /* - * Note to translators: The substitution text is the URI that was in - * error. - */ - {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR, - "\u7121\u6CD5\u89E3\u6790 URI \u53C3\u7167 ''{0}''\u3002"}, - - /* - * Note to translators: The stylesheet contained an element that was - * not recognized as part of the XSL syntax. The substitution text - * gives the element name. - */ - {BasisLibrary.UNSUPPORTED_XSL_ERR, - "\u4E0D\u652F\u63F4\u7684 XSL \u5143\u7D20 ''{0}''"}, - - /* - * Note to translators: The stylesheet referred to an extension to the - * XSL syntax and indicated that it was defined by XSLTC, but XSLTC does - * not recognize the particular extension named. The substitution text - * gives the extension name. - */ - {BasisLibrary.UNSUPPORTED_EXT_ERR, - "\u7121\u6CD5\u8FA8\u8B58\u7684 XSLTC \u64F4\u5145\u5957\u4EF6 ''{0}''"}, - - - /* - * Note to translators: This error message is produced if the translet - * class was compiled using a newer version of XSLTC and deployed for - * execution with an older version of XSLTC. The substitution text is - * the name of the translet class. - */ - {BasisLibrary.UNKNOWN_TRANSLET_VERSION_ERR, - "\u5EFA\u7ACB\u6307\u5B9A translet ''{0}'' \u7684 XSLTC \u7248\u672C\u6BD4\u4F7F\u7528\u4E2D XSLTC \u57F7\u884C\u968E\u6BB5\u7684\u7248\u672C\u8F03\u65B0\u3002\u60A8\u5FC5\u9808\u91CD\u65B0\u7DE8\u8B6F\u6A23\u5F0F\u8868\uFF0C\u6216\u4F7F\u7528\u8F03\u65B0\u7684 XSLTC \u7248\u672C\u4F86\u57F7\u884C\u6B64 translet\u3002"}, - - /* - * Note to translators: An attribute whose effective value is required - * to be a "QName" had a value that was incorrect. - * 'QName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_QNAME_ERR, - "\u503C\u5FC5\u9808\u70BA QName \u7684\u5C6C\u6027\uFF0C\u5177\u6709\u503C ''{0}''"}, - - - /* - * Note to translators: An attribute whose effective value is required - * to be a "NCName" had a value that was incorrect. - * 'NCName' is an XML syntactic term that must not be translated. The - * substitution text contains the actual value of the attribute. - */ - {BasisLibrary.INVALID_NCNAME_ERR, - "\u503C\u5FC5\u9808\u70BA NCName \u7684\u5C6C\u6027\uFF0C\u5177\u6709\u503C ''{0}''"}, - - {BasisLibrary.UNALLOWED_EXTENSION_FUNCTION_ERR, - "\u7576\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u6642\uFF0C\u4E0D\u5141\u8A31\u4F7F\u7528\u64F4\u5145\u5957\u4EF6\u51FD\u6578 ''{0}''\u3002"}, - - {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, - "\u7576\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u6642\uFF0C\u4E0D\u5141\u8A31\u4F7F\u7528\u64F4\u5145\u5957\u4EF6\u5143\u7D20 ''{0}''\u3002"}, - }; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties deleted file mode 100644 index 3a291526ca0..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# DOM implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. - FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n - -# DOM Core - -# exception codes -DOMSTRING_SIZE_ERR = El rango especificado de texto no cabe en una cadena DOM. -HIERARCHY_REQUEST_ERR = Se ha realizado un intento de insertar un nodo donde no está permitido. -INDEX_SIZE_ERR = El índice o tamaño es negativo o superior al valor permitido. -INUSE_ATTRIBUTE_ERR = Se ha realizado un intento de agregar un atributo que ya se está utilizando en otro lugar. -INVALID_ACCESS_ERR = El objeto subyacente no soporta un parámetro o una operación. -INVALID_CHARACTER_ERR = Se ha especificado un carácter XML no válido o no permitido. -INVALID_MODIFICATION_ERR = Se ha realizado un intento de modificar el tipo de objeto subyacente. -INVALID_STATE_ERR = Se ha realizado un intento de utilizar un objeto que ya no se puede utilizar. -NAMESPACE_ERR = Se ha realizado un intento de crear o cambiar un objeto de un modo incorrecto con respecto a los espacios de nombres. -NOT_FOUND_ERR = Se ha realizado un intento de hacer referencia a un nodo en un contexto en el que no existe. -NOT_SUPPORTED_ERR = La implantación no soporta el tipo solicitado de objeto u operación. -NO_DATA_ALLOWED_ERR = Se han especificado datos para un nodo que no soporta datos. -NO_MODIFICATION_ALLOWED_ERR = Se ha realizado un intento de modificar un objeto en el que no están permitidas las modificaciones. -SYNTAX_ERR = Se ha especificado una cadena no válida o no permitida. -VALIDATION_ERR = Una llamada a un método como insertBefore o removeChild invalidaría el nodo con respecto a la gramática del documento. -WRONG_DOCUMENT_ERR = Se ha utilizado un nodo en un documento distinto al que lo creó. -TYPE_MISMATCH_ERR = El tipo de valor para este nombre de parámetro no es compatible con el tipo de valor esperado. - -#error messages or exceptions -FEATURE_NOT_SUPPORTED = Se reconoce el parámetro {0} pero no se puede definir el valor solicitado. -FEATURE_NOT_FOUND = No se reconoce el parámetro {0}. -STRING_TOO_LONG = La cadena resultante es demasiado larga para que quepa en una cadena DOM: ''{0}''. - -#DOM Level 3 DOMError codes -wf-invalid-character = El texto {0} del nodo {1} contiene caracteres XML no válidos. -wf-invalid-character-in-node-name = El nodo {0} con el nombre {1} contiene caracteres XML no válidos. -cdata-sections-splitted = Las secciones CDATA contienen el marcador de terminación de sección CDATA '']]>'' -doctype-not-allowed = La declaración DOCTYPE no está permitida. -unsupported-encoding = La codificación {0} no está soportada. - -#Error codes used in DOM Normalizer -InvalidXMLCharInDOM = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en DOM durante la normalización. -UndeclaredEntRefInAttrValue = El atributo "{0}" con valor "{1}" ha hecho referencia a una entidad que no se declaró. -NullLocalElementName = Se ha encontrado un nombre local nulo durante la normalización del espacio de nombres del elemento {0}. -NullLocalAttrName = Se ha encontrado un nombre local nulo durante la normalización del espacio de nombres del atributo {0}. - -#Error codes used in DOMParser -InvalidDocumentClassName = El nombre de clase de la fábrica de documentos "{0}" utilizado para construir el árbol DOM no es del tipo org.w3c.dom.Document. -MissingDocumentClassName = No se ha encontrado el nombre de clase de la fábrica de documentos "{0}" utilizado para construir el árbol DOM. -CannotCreateDocumentClass = No se ha podido construir la clase con el nombre "{0}" como un org.w3c.dom.Document. - -# Error codes used by JAXP DocumentBuilder -jaxp-order-not-supported = La propiedad ''{0}'' debe definirse antes de definir la propiedad ''{1}''. -jaxp-null-input-source = El origen especificado no puede ser nulo. - -#Ranges -BAD_BOUNDARYPOINTS_ERR = Los puntos de límite de un rango no cumplen los requisitos específicos. -INVALID_NODE_TYPE_ERR = El contenedor de un punto de límite de un rango se está definiendo en un nodo de un tipo no válido o un nodo con un ascendiente de un tipo no válido. - - -#Events -UNSPECIFIED_EVENT_TYPE_ERR = No se ha especificado el tipo de evento mediante la inicialización del evento antes de que se llame al método. - - -jaxp-schema-support=Se utiliza tanto el método setSchema como la propiedad schemaLanguage - -jaxp_feature_not_supported=La función "{0}" no está soportada. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties deleted file mode 100644 index c337c72af53..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# DOM implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = Le message d'erreur correspondant à la clé de message est introuvable. - FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n - -# DOM Core - -# exception codes -DOMSTRING_SIZE_ERR = La plage de texte indiquée ne tient pas dans un élément DOMString. -HIERARCHY_REQUEST_ERR = Tentative d'insertion d'un noeud à un emplacement non autorisé. -INDEX_SIZE_ERR = L'index ou la taille est négatif ou dépasse la valeur autorisée. -INUSE_ATTRIBUTE_ERR = Tentative d'ajout d'un attribut déjà utilisé ailleurs. -INVALID_ACCESS_ERR = Un paramètre ou une opération n'est pas pris en charge par l'objet sous-jacent. -INVALID_CHARACTER_ERR = Un caractère XML non valide ou non admis est indiqué. -INVALID_MODIFICATION_ERR = Tentative de modification du type de l'objet sous-jacent. -INVALID_STATE_ERR = Tentative d'utilisation d'un objet qui n'est pas ou plus utilisable. -NAMESPACE_ERR = Tentative de création ou de modification d'un objet incorrecte par rapport aux espaces de noms. -NOT_FOUND_ERR = Tentative de référencement d'un noeud dans un contexte où il n'existe pas. -NOT_SUPPORTED_ERR = L'implémentation ne prend pas en charge le type d'objet ou d'opération demandé. -NO_DATA_ALLOWED_ERR = Des données ont été indiquées pour un noeud ne prenant pas en charge les données. -NO_MODIFICATION_ALLOWED_ERR = Tentative de modification d'un objet pour lequel les modifications ne sont pas autorisées. -SYNTAX_ERR = Une chaîne non valide ou non admise est indiquée. -VALIDATION_ERR = L'appel d'une méthode comme insertBefore ou removeChild risque de rendre le noeud non valide par rapport à la grammaire de document. -WRONG_DOCUMENT_ERR = Un noeud est utilisé dans un document différent de celui l'ayant créé. -TYPE_MISMATCH_ERR = Le type de valeur pour ce nom de paramètre n'est pas compatible avec le type de valeur attendu. - -#error messages or exceptions -FEATURE_NOT_SUPPORTED = Le paramètre {0} est reconnu mais la valeur demandée ne peut pas être définie. -FEATURE_NOT_FOUND = Le paramètre {0} n''est pas reconnu. -STRING_TOO_LONG = La chaîne obtenue est trop longue pour tenir dans un élément DOMString : ''{0}''. - -#DOM Level 3 DOMError codes -wf-invalid-character = Le texte {0} du noeud {1} contient des caractères XML non valides. -wf-invalid-character-in-node-name = Le noeud {0} nommé {1} contient des caractères XML non valides. -cdata-sections-splitted = Sections CDATA contenant le marqueur de fin de section CDATA '']]>'' -doctype-not-allowed = La déclaration DOCTYPE n'est pas autorisée. -unsupported-encoding = L''encodage {0} n''est pas pris en charge. - -#Error codes used in DOM Normalizer -InvalidXMLCharInDOM = Un caractère XML non valide (Unicode : 0x{0}) a été trouvé dans le DOM au cours de la normalisation. -UndeclaredEntRefInAttrValue = La valeur de l''attribut "{0}", "{1}", référençait une entité non déclarée. -NullLocalElementName = Un nom local NULL a été détecté au cours de la normalisation de l''espace de noms de l''élément {0}. -NullLocalAttrName = Un nom local NULL a été détecté au cours de la normalisation de l''espace de noms de l''attribut {0}. - -#Error codes used in DOMParser -InvalidDocumentClassName = Le nom de classe de la fabrique de documents "{0}" utilisée pour construire l''arborescence DOM n''est pas de type org.w3c.dom.Document. -MissingDocumentClassName = Le nom de classe de la fabrique de documents "{0}" utilisée pour construire l''arborescence DOM est introuvable. -CannotCreateDocumentClass = La classe nommée "{0}" n''a pas pu être construite en tant que org.w3c.dom.Document. - -# Error codes used by JAXP DocumentBuilder -jaxp-order-not-supported = La propriété ''{0}'' doit être définie avant la propriété ''{1}''. -jaxp-null-input-source = La source indiquée ne peut pas être NULL. - -#Ranges -BAD_BOUNDARYPOINTS_ERR = Les points de limite d'une plage ne répondent pas aux exigences spécifiques. -INVALID_NODE_TYPE_ERR = Le conteneur d'un point de limite d'une plage est défini sur un noeud de type non valide ou sur un noeud ayant un ancêtre de type non valide. - - -#Events -UNSPECIFIED_EVENT_TYPE_ERR = Le type d'événement n'a pas été indiqué en initialisant l'événement avant l'appel de la méthode. - - -jaxp-schema-support=La méthode setSchema et la propriété schemaLanguage sont utilisées - -jaxp_feature_not_supported=La fonctionnalité ''{0}'' n''est pas prise en charge. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties deleted file mode 100644 index b81739e46fd..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# DOM implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. - FormatFailed = Si è verificato un errore interno durante la formattazione del seguente messaggio:\n - -# DOM Core - -# exception codes -DOMSTRING_SIZE_ERR = L'intervallo di testo specificato non si adatta in DOMString. -HIERARCHY_REQUEST_ERR = Si è tentato di inserire un nodo in un punto in cui non è consentito. -INDEX_SIZE_ERR = L'indice o la dimensione è negativa o maggiore del valore consentito. -INUSE_ATTRIBUTE_ERR = Si è tentato di aggiungere un attributo già in uso altrove. -INVALID_ACCESS_ERR = Un parametro o un'operazione non è supportata dall'oggetto di base. -INVALID_CHARACTER_ERR = È stato specificato un carattere XML non valido. -INVALID_MODIFICATION_ERR = Si è tentato di modificare il tipo dell'oggetto di base. -INVALID_STATE_ERR = Si è tentato di utilizzare un oggetto che non è o non è più utilizzabile. -NAMESPACE_ERR = Si è tentato di creare o modificare un oggetto in modo errato per quel che riguarda gli spazi di nomi. -NOT_FOUND_ERR = Si è tentato di fare riferimento a un nodo in un contesto in cui non esiste. -NOT_SUPPORTED_ERR = L'implementazione non supporta il tipo richiesto di oggetto o operazione. -NO_DATA_ALLOWED_ERR = Sono stati specificati dati per un nodo che non supporta dati. -NO_MODIFICATION_ALLOWED_ERR = Si è tentato di modificare un oggetto non modificabile. -SYNTAX_ERR = È stata specificata una stringa non valida. -VALIDATION_ERR = Se si richiama un metodo come insertBefore o removeChild, il nodo non sarà valido per quel che riguarda la grammatica del documento. -WRONG_DOCUMENT_ERR = Un nodo è utilizzato in un documento diverso da quello che lo ha creato. -TYPE_MISMATCH_ERR = Il tipo di valore per questo nome parametro non è compatibile con il tipo di valore previsto. - -#error messages or exceptions -FEATURE_NOT_SUPPORTED = Il parametro {0} è stato riconosciuto, ma non è possibile impostare il valore richiesto. -FEATURE_NOT_FOUND = Il parametro {0} non è riconosciuto. -STRING_TOO_LONG = La stringa risultante è troppo lunga per adattarsi in DOMString: ''{0}''. - -#DOM Level 3 DOMError codes -wf-invalid-character = Il testo {0} del nodo {1} contiene caratteri XML non validi. -wf-invalid-character-in-node-name = Il nodo {0} denominato {1} contiene caratteri XML non validi. -cdata-sections-splitted = Sezioni CDATA che contengono l'indicatore di fine della sezione CDATA '']]>'' -doctype-not-allowed = Dichiarazione DOCTYPE non consentita. -unsupported-encoding = La codifica {0} non è supportata. - -#Error codes used in DOM Normalizer -InvalidXMLCharInDOM = È stato trovato un carattere XML non valido (Unicode: 0x{0}) in DOM durante la normalizzazione. -UndeclaredEntRefInAttrValue = L''attributo "{0}" con valore "{1}" fa riferimento a un''entità non dichiarata. -NullLocalElementName = È stato rilevato un nome locale nullo durante la normalizzazione dello spazio di nomi dell''elemento {0}. -NullLocalAttrName = È stato rilevato un nome locale nullo durante la normalizzazione dello spazio di nomi dell''attributo {0}. - -#Error codes used in DOMParser -InvalidDocumentClassName = Il nome classe del document factory "{0}" utilizzato per creare la struttura DOM non è di tipo org.w3c.dom.Document. -MissingDocumentClassName = Impossibile trovare il nome classe del document factory "{0}" utilizzato per creare la struttura DOM. -CannotCreateDocumentClass = Impossibile creare la classe denominata "{0}" come org.w3c.dom.Document. - -# Error codes used by JAXP DocumentBuilder -jaxp-order-not-supported = Impostare la proprietà ''{0}'' prima di impostare la proprietà ''{1}''. -jaxp-null-input-source = L'origine specificata non può essere nulla. - -#Ranges -BAD_BOUNDARYPOINTS_ERR = I punti limite di un intervallo non rispettano i requisiti specifici. -INVALID_NODE_TYPE_ERR = Il contenitore di un punto limite di un intervallo è stato impostato su un nodo di tipo non valido o su un nodo con un predecessore di tipo non valido. - - -#Events -UNSPECIFIED_EVENT_TYPE_ERR = Il tipo di evento non è stato specificato inizializzando l'evento prima che fosse richiamato il metodo. - - -jaxp-schema-support=Sono stati utilizzati sia il metodo setSchema che la proprietà schemaLanguage - -jaxp_feature_not_supported=La funzione "{0}" non è supportata. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties deleted file mode 100644 index 90c61541038..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# DOM implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = 메시지 키에 해당하는 오류 메시지를 찾을 수 없습니다. - FormatFailed = 다음 메시지의 형식을 지정하는 중 내부 오류가 발생했습니다.\n - -# DOM Core - -# exception codes -DOMSTRING_SIZE_ERR = 텍스트의 지정된 범위가 DOMString에 맞지 않습니다. -HIERARCHY_REQUEST_ERR = 삽입이 허용되지 않는 노드를 삽입하려고 시도했습니다. -INDEX_SIZE_ERR = 인덱스 또는 크기가 음수이거나 허용되는 값보다 큽니다. -INUSE_ATTRIBUTE_ERR = 다른 위치에서 이미 사용 중인 속성을 추가하려고 시도했습니다. -INVALID_ACCESS_ERR = 기본 객체에서 매개변수 또는 작업을 지원하지 않습니다. -INVALID_CHARACTER_ERR = 부적합하거나 잘못된 XML 문자가 지정되었습니다. -INVALID_MODIFICATION_ERR = 기본 객체의 유형을 수정하려고 시도했습니다. -INVALID_STATE_ERR = 사용할 수 없거나 더 이상 사용이 허가되지 않은 객체를 사용하려고 시도했습니다. -NAMESPACE_ERR = 네임스페이스에 대해 올바르지 않은 방식으로 객체를 생성하거나 변경하려고 시도했습니다. -NOT_FOUND_ERR = 존재하지 않는 컨텍스트의 노드를 참조하려고 시도했습니다. -NOT_SUPPORTED_ERR = 구현에서 요청된 유형의 객체 또는 작업을 지원하지 않습니다. -NO_DATA_ALLOWED_ERR = 데이터를 지원하지 않는 노드에 대해 데이터가 지정되었습니다. -NO_MODIFICATION_ALLOWED_ERR = 수정이 허용되지 않는 객체를 수정하려고 시도했습니다. -SYNTAX_ERR = 부적합하거나 잘못된 문자열이 지정되었습니다. -VALIDATION_ERR = insertBefore 또는 removeChild와 같은 메소드를 호출하면 노드가 문서 문법에 대해 부적합해집니다. -WRONG_DOCUMENT_ERR = 노드가 생성된 문서가 아닌 다른 문서에서 사용되었습니다. -TYPE_MISMATCH_ERR = 이 매개변수 이름에 대한 값 유형이 필요한 값 유형과 호환되지 않습니다. - -#error messages or exceptions -FEATURE_NOT_SUPPORTED = {0} 매개변수가 인식되었지만 요청된 값을 설정할 수 없습니다. -FEATURE_NOT_FOUND = {0} 매개변수를 인식할 수 없습니다. -STRING_TOO_LONG = 결과 문자열이 너무 커서 DOMString에 맞지 않음: ''{0}''. - -#DOM Level 3 DOMError codes -wf-invalid-character = {1} 노드의 {0} 텍스트에 부적합한 XML 문자가 포함되어 있습니다. -wf-invalid-character-in-node-name = 이름이 {1}인 {0} 노드에 부적합한 XML 문자가 포함되어 있습니다. -cdata-sections-splitted = CDATA 섹션 종료 표시자 '']]>''를 포함하는 CDATA 섹션 -doctype-not-allowed = DOCTYPE 선언은 허용되지 않습니다. -unsupported-encoding = {0} 인코딩은 지원되지 않습니다. - -#Error codes used in DOM Normalizer -InvalidXMLCharInDOM = 정규화 중 DOM에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. -UndeclaredEntRefInAttrValue = 속성 "{0}" 값 "{1}"이(가) 선언되지 않은 엔티티를 참조했습니다. -NullLocalElementName = {0} 요소의 네임스페이스 정규화 중 널 로컬 이름이 발견되었습니다. -NullLocalAttrName = {0} 속성의 네임스페이스 정규화 중 널 로컬 이름이 발견되었습니다. - -#Error codes used in DOMParser -InvalidDocumentClassName = DOM 트리 생성에 사용된 문서 팩토리 "{0}"의 클래스 이름은 org.w3c.dom.Document 유형이 아닙니다. -MissingDocumentClassName = DOM 트리 생성에 사용된 문서 팩토리 "{0}"의 클래스 이름을 찾을 수 없습니다. -CannotCreateDocumentClass = 이름이 "{0}"인 클래스를 org.w3c.dom.Document로 생성할 수 없습니다. - -# Error codes used by JAXP DocumentBuilder -jaxp-order-not-supported = ''{1}'' 속성을 설정하기 전에 ''{0}'' 속성을 설정해야 합니다. -jaxp-null-input-source = 지정된 소스는 널일 수 없습니다. - -#Ranges -BAD_BOUNDARYPOINTS_ERR = 범위의 경계 지점이 특정 요구 사항을 충족하지 않습니다. -INVALID_NODE_TYPE_ERR = 범위의 경계 지점 컨테이너가 부적합한 유형의 노드 또는 부적합한 유형의 조상을 가진 노드로 설정되고 있습니다. - - -#Events -UNSPECIFIED_EVENT_TYPE_ERR = 메소드가 호출되기 전에 이벤트를 초기화하여 이벤트 유형이 지정되지 않았습니다. - - -jaxp-schema-support=setSchema 메소드와 schemaLanguage 속성이 모두 사용되었습니다. - -jaxp_feature_not_supported="{0}" 기능은 지원되지 않습니다. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties deleted file mode 100644 index 5b8c87cb51b..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# DOM implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = Não foi possível encontrar a mensagem de erro correspondente à chave da mensagem. - FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n - -# DOM Core - -# exception codes -DOMSTRING_SIZE_ERR = A faixa de texto especificada não se ajusta a DOMString. -HIERARCHY_REQUEST_ERR = Houve uma tentativa de inserir um nó onde não era permitido. -INDEX_SIZE_ERR = O índice ou o tamanho é negativo ou maior que o valor permitido. -INUSE_ATTRIBUTE_ERR = Houve uma tentativa de adicionar um atributo que já está sendo usado em outro lugar. -INVALID_ACCESS_ERR = Um parâmetro ou uma operação não suportado pelo objeto subjacente. -INVALID_CHARACTER_ERR = Um caractere XML inválido ou ilegal foi especificado. -INVALID_MODIFICATION_ERR = Houve uma tentativa de modificar o tipo de objeto subjacente. -INVALID_STATE_ERR = Houve uma tentativa de usar um objeto que não é mais utilizável. -NAMESPACE_ERR = Houve uma tentativa de criar ou alterar um objeto de uma forma incorreta em relação aos namespaces. -NOT_FOUND_ERR = Houve uma tentativa de fazer referência a um nó em um contexto no qual ele não existe. -NOT_SUPPORTED_ERR = A implementação não suporta o tipo solicitado de objeto ou operação. -NO_DATA_ALLOWED_ERR = Os dados foram especificados para um nó que não suporta dados. -NO_MODIFICATION_ALLOWED_ERR = Foi feita uma tentativa de modificar um objeto no qual não são permitidas modificações. -SYNTAX_ERR = Uma string inválida ou ilegal foi especificada. -VALIDATION_ERR = Uma chamada para um método como insertBefore ou removeChild tornaria o Nó inválido em relação à gramática do documento. -WRONG_DOCUMENT_ERR = Um nó é usado em um documento diferente daquele que foi criado. -TYPE_MISMATCH_ERR = O tipo de valor do nome deste parâmetro é incompatível com o tipo de valor esperado. - -#error messages or exceptions -FEATURE_NOT_SUPPORTED = O parâmetro {0} é reconhecido, mas o valor solicitado não pode ser definido. -FEATURE_NOT_FOUND = O parâmetro {0} não é reconhecido. -STRING_TOO_LONG = A string resultante é muito longa para se ajustar a uma DOMString: ''{0}''. - -#DOM Level 3 DOMError codes -wf-invalid-character = O texto {0} do nó {1} contém caracteres XML inválidos. -wf-invalid-character-in-node-name = O nó {0} com o nome {1} contém caracteres XML inválidos. -cdata-sections-splitted = Seções CDATA que contêm o marcador '']]>'' de terminação de seção CDATA -doctype-not-allowed = A declaração DOCTYPE não é permitida. -unsupported-encoding = A codificação {0} não é suportada. - -#Error codes used in DOM Normalizer -InvalidXMLCharInDOM = Um caractere XML inválido (Unicode: 0x {0}) foi encontrado no DOM durante a normalização. -UndeclaredEntRefInAttrValue = O atributo "{0}" valor "{1}" mencionou uma entidade que não foi declarada. -NullLocalElementName = Um nome de local nulo foi encontrado durante a normalização do namespace do elemento {0}. -NullLocalAttrName = Um nome de local nulo foi encontrado durante a normalização do namespace do atributo {0}. - -#Error codes used in DOMParser -InvalidDocumentClassName = O nome da classe do factory do documento "{0}" usado para construir a árvore DOM não é do tipo org.w3c.dom.Document. -MissingDocumentClassName = Não foi possível encontrar o nome da classe do factory do documento "{0}" usado para construir a árvore DOM. -CannotCreateDocumentClass = Não foi possível construir a classe com o nome "{0}" como um org.w3c.dom.Document. - -# Error codes used by JAXP DocumentBuilder -jaxp-order-not-supported = A propriedade ''{0}'' deve ser estabelecida antes da definição da propriedade ''{1}''. -jaxp-null-input-source = A origem especificada não pode ser nula. - -#Ranges -BAD_BOUNDARYPOINTS_ERR = Os pontos-limite de uma Faixa não atendem aos requisitos específicos. -INVALID_NODE_TYPE_ERR = O container de um ponto-limite de uma Faixa está sendo definido para um nó de um tipo inválido ou um nó com um ancestral de um tipo inválido. - - -#Events -UNSPECIFIED_EVENT_TYPE_ERR = O tipo de Evento não foi especificado por meio da inicialização do evento antes do método ser chamado. - - -jaxp-schema-support=O método setSchema e a propriedade schemaLanguage foram usados - -jaxp_feature_not_supported=O recurso "{0}" não é suportado. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties deleted file mode 100644 index f3a488928c7..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# DOM implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. - FormatFailed = Ett internt fel inträffade vid formatering av följande meddelande:\n - -# DOM Core - -# exception codes -DOMSTRING_SIZE_ERR = Angivet textintervall ryms inte i DOMString. -HIERARCHY_REQUEST_ERR = Ett försök gjordes att infoga nod där det inte är tillåtet. -INDEX_SIZE_ERR = Index eller storlek är negativt tal eller större än tillåtet värde. -INUSE_ATTRIBUTE_ERR = Ett försök görs att lägga till ett attribut som redan används på annan plats. -INVALID_ACCESS_ERR = En parameter eller en åtgärd stöds inte av underliggande objekt. -INVALID_CHARACTER_ERR = Ett ogiltigt eller otillåtet XML-tecken har angetts. -INVALID_MODIFICATION_ERR = Ett försök görs att ändra typ av underliggande objekt. -INVALID_STATE_ERR = Ett försök görs att använda ett objekt som inte (längre) är användbar. -NAMESPACE_ERR = Ett försök görs att skapa eller ändra ett objekt på ett felaktigt sätt avseende namnrymder. -NOT_FOUND_ERR = Ett försök görs att skapa referens till en nod i ett sammanhang där den inte finns. -NOT_SUPPORTED_ERR = Implementeringen saknar stöd för begärd typ av objekt eller åtgärd. -NO_DATA_ALLOWED_ERR = Data anges för en nod som inte stöder data. -NO_MODIFICATION_ALLOWED_ERR = Försöker ändra ett objekt där ändringar inte är tillåtna. -SYNTAX_ERR = En ogiltig eller otillåten sträng anges. -VALIDATION_ERR = Ett anrop till en metod som insertBefore eller removeChild skulle göra noden ogiltig med aktuell dokumentgrammatik. -WRONG_DOCUMENT_ERR = En nod används i ett annat dokument än det som skapade noden. -TYPE_MISMATCH_ERR = Värdetypen för detta parameternamn är inkompatibelt med förväntad värdetyp. - -#error messages or exceptions -FEATURE_NOT_SUPPORTED = Parametern {0} kan identifieras, men det begärda värdet kan inte anges. -FEATURE_NOT_FOUND = Parametern {0} kan inte identifieras. -STRING_TOO_LONG = Resultatsträngen är för lång och ryms inte i DOMString: ''{0}''. - -#DOM Level 3 DOMError codes -wf-invalid-character = Texten {0} i noden {1} innehåller ogiltiga XML-tecken. -wf-invalid-character-in-node-name = Noden {0} med namnet {1} innehåller ogiltiga XML-tecken. -cdata-sections-splitted = CDATA-sektioner innehåller avslutningsmarkören '']]>'' -doctype-not-allowed = DOCTYPE-deklaration är inte tillåtet. -unsupported-encoding = Kodningen {0} stöds inte. - -#Error codes used in DOM Normalizer -InvalidXMLCharInDOM = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i DOM vid normalisering. -UndeclaredEntRefInAttrValue = Attributet "{0}" med värdet "{1}" refererade en enhet som inte har deklarerats. -NullLocalElementName = Ett lokalt namn med null-värde påträffades vid namnrymdsnormalisering av elementet {0}. -NullLocalAttrName = Ett lokalt namn med null-värde påträffades vid namnrymdsnormalisering av attributet {0}. - -#Error codes used in DOMParser -InvalidDocumentClassName = Klassnamnet på dokumentfabrik "{0}" som används vid konstruktion av DOM-trädet är inte typ org.w3c.dom.Document. -MissingDocumentClassName = Hittade inte klassnamnet på dokumentfabrik "{0}" som används vid konstruktion av DOM-trädet. -CannotCreateDocumentClass = Klassen "{0}" kunde inte konstrueras som org.w3c.dom.Document. - -# Error codes used by JAXP DocumentBuilder -jaxp-order-not-supported = Egenskapen ''{0}'' måste anges före inställning av egenskapen ''{1}''. -jaxp-null-input-source = Angiven källa får inte vara null. - -#Ranges -BAD_BOUNDARYPOINTS_ERR = Gränspunkterna i ett intervall uppfyller inte de specifika kraven. -INVALID_NODE_TYPE_ERR = En container med gränspunktsintervall anges till nod av ogiltig typ eller nod med överordnad av ogiltig typ. - - -#Events -UNSPECIFIED_EVENT_TYPE_ERR = Händelsetyp specificerades inte när händelsen initierades före metodanrop. - - -jaxp-schema-support=Både setSchema-metoden och schemaLanguage-egenskapen används - -jaxp_feature_not_supported=Funktionen "{0}" stöds inte. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties deleted file mode 100644 index f2502366142..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces -# DOM implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = 找不到對應訊息索引鍵的錯誤訊息。 - FormatFailed = 格式化下列訊息時發生內部錯誤:\n - -# DOM Core - -# exception codes -DOMSTRING_SIZE_ERR = 指定的文字範圍無法納入 DOMString。 -HIERARCHY_REQUEST_ERR = 嘗試在不允許的位置插入節點。 -INDEX_SIZE_ERR = 索引或大小為負值,或是大於允許的值。 -INUSE_ATTRIBUTE_ERR = 嘗試新增已經在他處使用的屬性。 -INVALID_ACCESS_ERR = 底層物件不支援的參數或作業。 -INVALID_CHARACTER_ERR = 指定了無效的 XML 字元。 -INVALID_MODIFICATION_ERR = 嘗試修改底層物件的類型。 -INVALID_STATE_ERR = 嘗試使用不可用或無法再使用的物件。 -NAMESPACE_ERR = 對於命名空間而言,嘗試使用不正確的方式來建立或變更物件。 -NOT_FOUND_ERR = 嘗試在相關資訊環境中參照不存在的節點。 -NOT_SUPPORTED_ERR = 實行不支援要求的物件或作業類型。 -NO_DATA_ALLOWED_ERR = 為不支援資料的節點指定了資料。 -NO_MODIFICATION_ALLOWED_ERR = 嘗試修改不允許修改的物件。 -SYNTAX_ERR = 指定了無效的字串。 -VALIDATION_ERR = 對於文件文法而言,呼叫 insertBefore 或 removeChild 之類的方法,會使得節點無效。 -WRONG_DOCUMENT_ERR = 節點用在有別於建立該節點文件的不同文件。 -TYPE_MISMATCH_ERR = 此參數名稱的值類型與預期的值類型不相容。 - -#error messages or exceptions -FEATURE_NOT_SUPPORTED = 可辨識參數 {0},但無法設定要求的值。 -FEATURE_NOT_FOUND = 無法辨識參數 {0}。 -STRING_TOO_LONG = 結果字串太長,無法納入 DOMString: ''{0}''。 - -#DOM Level 3 DOMError codes -wf-invalid-character = {1} 節點的文字 {0} 包含無效的 XML 字元。 -wf-invalid-character-in-node-name = 名稱為 {1} 的 {0} 節點包含無效的 XML 字元。 -cdata-sections-splitted = 包含 CDATA 段落終止標記 '']]>'' 的 CDATA 段落 -doctype-not-allowed = 不允許 DOCTYPE 宣告。 -unsupported-encoding = 不支援編碼 {0}。 - -#Error codes used in DOM Normalizer -InvalidXMLCharInDOM = 正規化期間在 DOM 中找到無效的 XML 字元 (Unicode: 0x{0})。 -UndeclaredEntRefInAttrValue = 屬性 "{0}" 值 "{1}" 參照未宣告的實體。 -NullLocalElementName = 元素 {0} 命名空間正規化期間,出現空值區域名稱。 -NullLocalAttrName = 屬性 {0} 命名空間正規化期間,出現空值區域名稱。 - -#Error codes used in DOMParser -InvalidDocumentClassName = 用於建構 DOM 樹狀結構的文件處理站 "{0}" 類別名稱並非類型 org.w3c.dom.Document。 -MissingDocumentClassName = 找不到用於建構 DOM 樹狀結構的文件處理站 "{0}" 類別名稱。 -CannotCreateDocumentClass = 名稱為 "{0}" 的類別無法建構為 org.w3c.dom.Document。 - -# Error codes used by JAXP DocumentBuilder -jaxp-order-not-supported = 設定屬性 ''{1}'' 之前,必須設定屬性 ''{0}''。 -jaxp-null-input-source = 指定的來源不可為空值。 - -#Ranges -BAD_BOUNDARYPOINTS_ERR = 範圍的界限點不符合特定的需求。 -INVALID_NODE_TYPE_ERR = 範圍的界限點容器被設為無效類型的節點,或是祖系為無效類型的節點。 - - -#Events -UNSPECIFIED_EVENT_TYPE_ERR = 呼叫方法之前起始事件,不會指定事件的類型。 - - -jaxp-schema-support=同時使用 setSchema 方法與 schemaLanguage 屬性 - -jaxp_feature_not_supported=不支援功能 "{0}"。 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties deleted file mode 100644 index a8cdecad8e2..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Datatype API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. -FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n - -FieldCannotBeNull=no se puede llamar a {0} con un parámetro ''nulo''. -UnknownField=se ha llamado a {0} con un campo desconocido:{1} -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-milli=Año = {0}, Mes = {1}, Día = {2}, Hora = {3}, Minuto = {4}, Segundo = {5}, Segundo Fraccionario = {6}, Zona Horaria = {7} , no es una representación válida de un valor del calendario gregoriano XML. -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-fractional=Año = {0}, Mes = {1}, Día = {2}, Hora = {3}, Minuto = {4}, Segundo = {5}, Segundo Fraccionario = {6}, Zona Horaria = {7} , no es una representación válida de un valor del calendario gregoriano XML. - -InvalidXGCFields=Juego de campos no válido definido para el calendario gregoriano XML - -InvalidFractional=Valor no válido {0} para el segundo fraccionario. - -#XGC stands for XML Gregorian Calendar -InvalidXGCRepresentation="{0}" no es una representación válida de un valor del calendario gregoriano XML. - -InvalidFieldValue=Valor no válido {0} para el campo {1}. - -NegativeField= El campo {0} es negativo - -AllFieldsNull=Todos los campos (javax.xml.datatype.DatatypeConstants.Field) son nulos. - -TooLarge=El valor "{1}" de {0} es demasiado largo para que esta implantación pueda soportarlo diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties deleted file mode 100644 index cbdd2cdbc85..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Datatype API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -BadMessageKey = Le message d'erreur correspondant à la clé de message est introuvable. -FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n - -FieldCannotBeNull=Impossible d''appeler {0} avec le paramètre ''null''. -UnknownField={0} a été appelé avec un champ inconnu : {1} -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-milli=Année = {0}, Mois = {1}, Jour = {2}, Heure = {3}, Minute = {4}, Seconde = {5}, Fraction de seconde = {6}, Fuseau horaire = {7} ne représentent pas des valeurs de calendrier grégorien XML valides. -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-fractional=Année = {0}, Mois = {1}, Jour = {2}, Heure = {3}, Minute = {4}, Seconde = {5}, Fraction de seconde = {6}, Fuseau horaire = {7} ne représentent pas des valeurs de calendrier grégorien XML valides. - -InvalidXGCFields=Ensemble de champs non valide pour XMLGregorianCalendar - -InvalidFractional=Valeur non valide {0} pour la fraction de seconde. - -#XGC stands for XML Gregorian Calendar -InvalidXGCRepresentation="{0}" ne représente pas une valeur de calendrier grégorien XML valide. - -InvalidFieldValue=Valeur {0} non valide pour le champ {1}. - -NegativeField= Le champ {0} est négatif - -AllFieldsNull=Tous les champs (javax.xml.datatype.DatatypeConstants.Field) sont NULL. - -TooLarge=La valeur {0} "{1}" est trop élevée pour être prise en charge par cette implémentation diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties deleted file mode 100644 index 30d285ac94b..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Datatype API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. -FormatFailed = Si è verificato un errore interno durante la formattazione del seguente messaggio:\n - -FieldCannotBeNull=Impossibile richiamare {0} con un parametro ''null''. -UnknownField={0} richiamato con un campo sconosciuto:{1} -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-milli=Anno = {0}, mese = {1}, giorno = {2}, ora = {3}, minuto = {4}, secondo = {5}, frazione di secondo = {6}, fuso orario = {7} non è una rappresentazione valida di un valore di calendario gregoriano XML. -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-fractional=Anno = {0}, mese = {1}, giorno = {2}, ora = {3}, minuto = {4}, secondo = {5}, frazione di secondo = {6}, fuso orario = {7} non è una rappresentazione valida di un valore di calendario gregoriano XML. - -InvalidXGCFields=Impostato set di campi non valido per XMLGregorianCalendar - -InvalidFractional=Valore {0} non valido per la frazione di secondo. - -#XGC stands for XML Gregorian Calendar -InvalidXGCRepresentation="{0}" non è una rappresentazione valida di un valore di calendario gregoriano XML. - -InvalidFieldValue=Valore {0} non valido per il campo {1}. - -NegativeField= Il campo {0} è negativo - -AllFieldsNull=Tutti i campi (javax.xml.datatype.DatatypeConstants.Field) sono nulli. - -TooLarge=Il valore {0} "{1}" è troppo grande per essere supportato da questa implementazione diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties deleted file mode 100644 index 5b808459ea5..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Datatype API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -BadMessageKey = 메시지 키에 해당하는 오류 메시지를 찾을 수 없습니다. -FormatFailed = 다음 메시지의 형식을 지정하는 중 내부 오류가 발생했습니다.\n - -FieldCannotBeNull={0}은(는) ''null'' 매개변수로 호출할 수 없습니다. -UnknownField={0}이(가) 알 수 없는 필드로 호출됨:{1} -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-milli=연도 = {0}, 월 = {1}, 날짜 = {2}, 시간 = {3}, 분 = {4}, 초 = {5}, 소수점 이하 초 = {6}, 시간대 = {7}은(는) XML 양력 값에 부적합한 형식입니다. -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-fractional=연도 = {0}, 월 = {1}, 날짜 = {2}, 시간 = {3}, 분 = {4}, 초 = {5}, 소수점 이하 초 = {6}, 시간대 = {7}은(는) XML 양력 값에 부적합한 형식입니다. - -InvalidXGCFields=XMLGregorianCalendar에 대해 부적합한 필드 집합이 설정되었습니다. - -InvalidFractional={0}은(는) 소수점 이하 초에 대해 부적합한 값입니다. - -#XGC stands for XML Gregorian Calendar -InvalidXGCRepresentation="{0}"은(는) XML 양력 값에 부적합한 형식입니다. - -InvalidFieldValue={0}은(는) {1} 필드에 대해 부적합한 값입니다. - -NegativeField= {0} 필드가 음수입니다. - -AllFieldsNull=모든 필드(javax.xml.datatype.DatatypeConstants.Field)가 널입니다. - -TooLarge={0} 값 "{1}"이(가) 이 구현에서 지원되는 값에 비해 너무 큽니다. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties deleted file mode 100644 index 63e59588f7b..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Datatype API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -BadMessageKey = Não foi possível encontrar a mensagem de erro correspondente à chave da mensagem. -FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n - -FieldCannotBeNull={0} não pode ser chamado com o parâmetro ''null''. -UnknownField={0} chamado com um campo desconhecido:{1} -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-milli=Ano = {0}, Mês = {1}, Dia = {2}, Hora = {3}, Minuto = {4}, Segundo = {5}, fractionalSecond = {6}, Fuso horário = {7} , não é uma representação válida de um valor do Calendário Gregoriano XML. -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-fractional=Ano = {0}, Mês = {1}, Dia = {2}, Hora = {3}, Minuto = {4}, Segundo = {5}, fractionalSecond = {6}, Fuso horário = {7} , não é uma representação válida de um valor do Calendário Gregoriano XML. - -InvalidXGCFields=Conjunto inválido de conjunto de campos para XMLGregorianCalendar - -InvalidFractional=Valor inválido {0} para segundo fracional. - -#XGC stands for XML Gregorian Calendar -InvalidXGCRepresentation="{0}" não é uma representação válida de um valor do Calendário Gregoriano XML. - -InvalidFieldValue=Valor inválido {0} para o campo {1}. - -NegativeField= o campo {0} é negativo - -AllFieldsNull=Todos os campos (javax.xml.datatype.DatatypeConstants.Field) são nulos. - -TooLarge=valor {0} "{1}" muito grande para ser suportado por esta implementação diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties deleted file mode 100644 index ebfc4c6b1c6..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Datatype API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. -FormatFailed = Ett internt fel inträffade vid formatering av följande meddelande:\n - -FieldCannotBeNull={0} kan inte anropas med null-parameter. -UnknownField={0} anropades med okänt fält:{1} -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-milli=År = {0}, månad = {1}, dag = {2}, timme = {3}, minut = {4}, sekund = {5}, bråkdelssekund = {6}, tidszon = {7} är ogiltigt värde för gregoriansk kalender i XML. -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-fractional=År = {0}, månad = {1}, dag = {2}, timme = {3}, minut = {4}, sekund = {5}, bråkdelssekund = {6}, tidszon = {7} är ogiltigt värde för gregoriansk kalender i XML. - -InvalidXGCFields=Ogiltig uppsättning med fält angivet i XMLGregorianCalendar - -InvalidFractional=Ogiltigt värde {0} angivet för bråkdelssekund. - -#XGC stands for XML Gregorian Calendar -InvalidXGCRepresentation="{0}" är ogiltigt värde för gregoriansk kalender i XML. - -InvalidFieldValue={0} är ett ogiltigt värde i fältet {1}. - -NegativeField= Fältet {0} är negativt - -AllFieldsNull=Alla fält (javax.xml.datatype.DatatypeConstants.Field) är null. - -TooLarge={0}-värdet "{1}" är för stort och kan inte användas i denna implementering diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties deleted file mode 100644 index 8f91597ac60..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Datatype API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -BadMessageKey = 找不到對應訊息索引鍵的錯誤訊息。 -FormatFailed = 格式化下列訊息時發生內部錯誤:\n - -FieldCannotBeNull=無法使用 ''null'' 參數呼叫 {0} -UnknownField=使用不明的欄位呼叫 {0}:{1} -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-milli=年 = {0}、月 = {1}、日 = {2}、小時 = {3}、分鐘 = {4}、秒 = {5}、小數秒 = {6}、時區 = {7},不是 XML 公曆值的有效表示法。 -#There are two similar keys 'InvalidXMLGreogorianCalendarValue' . Suffix (year, month) has been added and are used as per the context. -InvalidXGCValue-fractional=年 = {0}、月 = {1}、日 = {2}、小時 = {3}、分鐘 = {4}、秒 = {5}、小數秒 = {6}、時區 = {7},不是 XML 公曆值的有效表示法。 - -InvalidXGCFields=XMLGregorianCalendar 設定了無效的欄位集 - -InvalidFractional=小數秒的值 {0} 無效。 - -#XGC stands for XML Gregorian Calendar -InvalidXGCRepresentation="{0}" 不是 XML 公曆值的有效表示法。 - -InvalidFieldValue={1} 欄位的值 {0} 無效。 - -NegativeField= {0} 欄位為負值 - -AllFieldsNull=所有欄位 (javax.xml.datatype.DatatypeConstants.Field) 皆為空值。 - -TooLarge={0} 值 "{1}" 太大,此實行不支援 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties deleted file mode 100644 index 36d7e8126a0..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Validation API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. -FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n - -# SchemaFactory error messages -SchemaLanguageNull = El idioma del esquema especificado no puede ser nulo. -SchemaLanguageLengthZero = El idioma del esquema especificado no puede tener una longitud de cero caracteres. -SchemaSourceArrayNull = El parámetro de matriz de origen no puede ser nulo. -SchemaSourceArrayMemberNull = El parámetro de matriz de origen no puede contener ningún elemento que sea nulo. -SchemaFactorySourceUnrecognized = Este SchemaFactory no reconoce el parámetro de origen del tipo ''{0}''. - -# Validator error messages -SourceParameterNull = El parámetro de origen no puede ser nulo. -SourceNotAccepted = Este validador no acepta el parámetro de origen del tipo ''{0}''. -SourceResultMismatch = El parámetro de origen del tipo ''{0}'' no es compatible con el parámetro de resultado del tipo ''{1}''. - -# TypeInfoProvider error messages -TypeInfoProviderIllegalState = Un TypeInfoProvider no puede consultarse fuera de una devolución de llamada de startElement. - -# General error messages -FeatureNameNull = El nombre de la función no puede ser nulo. -ProperyNameNull = El nombre de la propiedad no puede ser nulo. -SAXSourceNullInputSource = El SAXSource especificado no contiene ningún valor de InputSource. - diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties deleted file mode 100644 index d6a0ca0fa56..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Validation API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = Le message d'erreur correspondant à la clé de message est introuvable. -FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n - -# SchemaFactory error messages -SchemaLanguageNull = La langue de schéma indiquée ne peut pas être NULL. -SchemaLanguageLengthZero = La longueur de la langue de schéma indiquée ne peut être de zéro caractère. -SchemaSourceArrayNull = Le paramètre de tableau source ne peut pas être NULL. -SchemaSourceArrayMemberNull = Le paramètre de tableau source ne peut pas contenir d'élément NULL. -SchemaFactorySourceUnrecognized = Le paramètre source de type ''{0}'' n''est pas reconnu par cet élément SchemaFactory. - -# Validator error messages -SourceParameterNull = Le paramètre source ne peut pas être NULL. -SourceNotAccepted = Le paramètre source de type ''{0}'' n''est pas accepté par ce valideur. -SourceResultMismatch = Le paramètre source de type ''{0}'' n''est pas compatible avec le paramètre de résultat de type ''{1}''. - -# TypeInfoProvider error messages -TypeInfoProviderIllegalState = Un élément TypeInfoProvider ne peut pas être interrogé en dehors d'un callback startElement. - -# General error messages -FeatureNameNull = Le nom de fonctionnalité ne peut pas être NULL. -ProperyNameNull = Le nom de propriété ne peut pas être NULL. -SAXSourceNullInputSource = L'élément SAXSource indiqué ne contient aucun élément InputSource. - diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties deleted file mode 100644 index 07814b73e4a..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Validation API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. -FormatFailed = Si è verificato un errore interno durante la formattazione del seguente messaggio:\n - -# SchemaFactory error messages -SchemaLanguageNull = La lingua dello schema specificata non può essere nulla. -SchemaLanguageLengthZero = La lingua dello schema specificata non può avere una lunghezza di zero caratteri. -SchemaSourceArrayNull = Il parametro di array di origine non può essere nullo. -SchemaSourceArrayMemberNull = Il parametro di array di origine non può contenere elementi nulli. -SchemaFactorySourceUnrecognized = Il parametro di origine di tipo ''{0}'' non è riconosciuto in questo SchemaFactory. - -# Validator error messages -SourceParameterNull = Il parametro di origine non può essere nullo. -SourceNotAccepted = Il parametro di origine di tipo ''{0}'' non è accettato da questo validator. -SourceResultMismatch = Il parametro di origine di tipo ''{0}'' non è compatibile con il parametro dei risultati di tipo ''{1}''. - -# TypeInfoProvider error messages -TypeInfoProviderIllegalState = Impossibile eseguire una query su TypeInfoProvider al di fuori di un callback startElement. - -# General error messages -FeatureNameNull = Il nome funzione non può essere nullo. -ProperyNameNull = Il nome proprietà non può essere nullo. -SAXSourceNullInputSource = Il valore specificato per SAXSource non contiene InputSource. - diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties deleted file mode 100644 index efa5809174a..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Validation API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = 메시지 키에 해당하는 오류 메시지를 찾을 수 없습니다. -FormatFailed = 다음 메시지의 형식을 지정하는 중 내부 오류가 발생했습니다.\n - -# SchemaFactory error messages -SchemaLanguageNull = 지정된 스키마 언어는 널일 수 없습니다. -SchemaLanguageLengthZero = 지정된 스키마 언어의 길이는 0자일 수 없습니다. -SchemaSourceArrayNull = 소스 배열 매개변수는 널일 수 없습니다. -SchemaSourceArrayMemberNull = 소스 배열 매개변수에는 널인 항목이 포함될 수 없습니다. -SchemaFactorySourceUnrecognized = 이 SchemaFactory가 ''{0}'' 유형의 소스 매개변수를 인식할 수 없습니다. - -# Validator error messages -SourceParameterNull = 소스 매개변수는 널일 수 없습니다. -SourceNotAccepted = 이 검증기는 ''{0}'' 유형의 소스 매개변수를 사용할 수 없습니다. -SourceResultMismatch = ''{0}'' 유형의 소스 매개변수가 ''{1}'' 유형의 결과 매개변수와 호환되지 않습니다. - -# TypeInfoProvider error messages -TypeInfoProviderIllegalState = TypeInfoProvider는 startElement 콜백 외부에서 질의할 수 없습니다. - -# General error messages -FeatureNameNull = 기능 이름은 널일 수 없습니다. -ProperyNameNull = 속성 이름은 널일 수 없습니다. -SAXSourceNullInputSource = 지정된 SAXSource에 InputSource가 포함되어 있지 않습니다. - diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties deleted file mode 100644 index 68bf0427747..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Validation API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = Não foi possível encontrar a mensagem de erro correspondente à chave da mensagem. -FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n - -# SchemaFactory error messages -SchemaLanguageNull = O idioma do esquema especificado não pode ser nulo. -SchemaLanguageLengthZero = O idioma do esquema especificado não pode ter um tamanho de zero caracteres. -SchemaSourceArrayNull = O parâmetro do array de Origem não pode ser nulo. -SchemaSourceArrayMemberNull = O parâmetro do array de Origem não pode conter nenhum item que seja nulo. -SchemaFactorySourceUnrecognized = O parâmetro de origem do tipo ''{0}'' não reconheceu este SchemaFactory. - -# Validator error messages -SourceParameterNull = O parâmetro de origem não pode ser nulo. -SourceNotAccepted = O parâmetro de origem do tipo ''{0}'' não é aceito por este validador. -SourceResultMismatch = O parâmetro do origem do tipo ''{0}'' não é compatível com o parâmetro de resultado do tipo ''{1}''. - -# TypeInfoProvider error messages -TypeInfoProviderIllegalState = Um TypeInfoProvider não pode ser consultado fora de um callback startElement. - -# General error messages -FeatureNameNull = O nome do recurso não pode ser nulo. -ProperyNameNull = O nome da propriedade não pode ser nulo. -SAXSourceNullInputSource = O SAXSource especificado não contém InputSource. - diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties deleted file mode 100644 index f2af535878b..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Validation API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. -FormatFailed = Ett internt fel inträffade vid formatering av följande meddelande:\n - -# SchemaFactory error messages -SchemaLanguageNull = Angivet schemaspråk får inte vara null. -SchemaLanguageLengthZero = Angivet schemaspråk får inte ha en längd som är noll tecken. -SchemaSourceArrayNull = Parametern för Source-uppställning får inte vara null. -SchemaSourceArrayMemberNull = Parametern för Source-uppställning får inte innehålla några objekt som är null. -SchemaFactorySourceUnrecognized = Source-parametrar av typ ''{0}'' identifieras inte av SchemaFactory. - -# Validator error messages -SourceParameterNull = Source-parameter får inte vara null. -SourceNotAccepted = Source-parametrar av typ ''{0}'' accepteras inte av valideraren. -SourceResultMismatch = Source-parametrar av typ ''{0}'' är inte kompatibla med resultatparametrar av typ ''{1}''. - -# TypeInfoProvider error messages -TypeInfoProviderIllegalState = TypeInfoProvider får inte ta emot frågor utanför respons från startElement. - -# General error messages -FeatureNameNull = Funktionsnamn får inte vara null. -ProperyNameNull = Egenskapsnamn får inte vara null. -SAXSourceNullInputSource = Angiven SAXSource innehåller ingen InputSource. - diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties deleted file mode 100644 index aea7aad57b3..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces JAXP Validation API implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = 找不到對應訊息索引鍵的錯誤訊息。 -FormatFailed = 格式化下列訊息時發生內部錯誤:\n - -# SchemaFactory error messages -SchemaLanguageNull = 指定的綱要語言不可為空值。 -SchemaLanguageLengthZero = 指定的綱要語言不可為零字元長度。 -SchemaSourceArrayNull = 來源陣列參數不可為空值。 -SchemaSourceArrayMemberNull = 來源陣列參數不可包含任何空值項目。 -SchemaFactorySourceUnrecognized = 類型 ''{0}'' 的來源參數無法辨識此 SchemaFactory。 - -# Validator error messages -SourceParameterNull = 來源參數不可為空值。 -SourceNotAccepted = 此驗證程式不接受類型 ''{0}'' 的來源參數。 -SourceResultMismatch = 類型 ''{0}'' 的來源參數與類型 ''{1}'' 的結果參數不相容。 - -# TypeInfoProvider error messages -TypeInfoProviderIllegalState = 不可在 startElement 回呼之外查詢 TypeInfoProvider。 - -# General error messages -FeatureNameNull = 功能名稱不可為空值。 -ProperyNameNull = 屬性名稱不可為空值。 -SAXSourceNullInputSource = 指定的 SAXSource 未包含 InputSource。 - diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties deleted file mode 100644 index 77ca15d88f1..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# SAX implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - -BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. -FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n - -# JAXP messages -schema-not-supported = El idioma del esquema especificado no está soportado. -jaxp-order-not-supported = La propiedad ''{0}'' debe definirse antes de definir la propiedad ''{1}''. -schema-already-specified = La propiedad ''{0}'' no puede definirse cuando un objeto de esquema no nulo ya se haya especificado. - -# feature messages -feature-not-supported = La función "{0}" no está soportada. -feature-not-recognized = La función "{0}" no se ha reconocido. -true-not-supported = El estado true para la función ''{0}'' no está soportado. -false-not-supported = El estado false para la función ''{0}'' no está soportado. -feature-read-only = La función "{0}" es de sólo lectura. -jaxp-secureprocessing-feature = FEATURE_SECURE_PROCESSING: no se puede definir la función en false cuando está presente el gestor de seguridad. - -# property messages -property-not-supported = La propiedad "{0}" no está soportada. -property-not-recognized = La propiedad "{0}" no se ha reconocido. -property-read-only = La propiedad "{0}" es de sólo lectura. -property-not-parsing-supported = La propiedad "{0}" no está soportada durante el análisis. -dom-node-read-not-supported = No se puede leer la propiedad del nodo DOM. No existe el árbol DOM. -incompatible-class = El valor especificado para la propiedad ''{0}'' no se puede convertir en {1}. - -start-document-not-called=La propiedad "{0}" debe llamarse después de que se haya devuelto el evento startDocument -nullparameter=el parámetro de nombre para "{0}" es nulo -errorHandlerNotSet=Advertencia: se activó la validación pero no se definió un org.xml.sax.ErrorHandler, lo cual probablemente sea un resultado no deseado. El analizador utilizará un ErrorHandler por defecto para imprimir los primeros {0} errores. Llame al método ''setErrorHandler'' para solucionarlo. -errorHandlerDebugMsg=Error: URI = "{0}", Línea = "{1}", : {2} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties deleted file mode 100644 index 9171a16b69f..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# SAX implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - -BadMessageKey = Le message d'erreur correspondant à la clé de message est introuvable. -FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n - -# JAXP messages -schema-not-supported = La langue de schéma indiquée n'est pas prise en charge. -jaxp-order-not-supported = La propriété ''{0}'' doit être définie avant la propriété ''{1}''. -schema-already-specified = La propriété ''{0}'' ne peut pas être définie lorsqu''un objet de schéma non NULL a déjà été indiqué. - -# feature messages -feature-not-supported = La fonctionnalité ''{0}'' n''est pas prise en charge. -feature-not-recognized = La fonctionnalité ''{0}'' n''est pas reconnue. -true-not-supported = L''état True de la fonctionnalité ''{0}'' n''est pas pris en charge. -false-not-supported = L''état False de la fonctionnalité ''{0}'' n''est pas pris en charge. -feature-read-only = La fonctionnalité ''{0}''est accessible en lecture seule. -jaxp-secureprocessing-feature = FEATURE_SECURE_PROCESSING : impossible de définir la fonctionnalité sur False en présence du gestionnaire de sécurité. - -# property messages -property-not-supported = La propriété ''{0}'' n''est pas prise en charge. -property-not-recognized = La propriété ''{0}'' n''est pas reconnue. -property-read-only = La propriété ''{0}'' est accessible en lecture seule. -property-not-parsing-supported = La propriété ''{0}'' n''est pas prise en charge au cours de l''analyse. -dom-node-read-not-supported = Impossible de lire la propriété de noeud DOM. Aucune arborescence DOM n'existe. -incompatible-class = La valeur indiquée pour la propriété ''{0}'' ne peut pas être convertie en {1}. - -start-document-not-called=La propriété "{0}" doit être appelée après qu''un événement startDocument est généré -nullparameter=le paramètre de nom pour "{0}" est NULL -errorHandlerNotSet=Avertissement : la validation a été activée mais aucun élément org.xml.sax.ErrorHandler n''a été défini, ce qui devrait probablement être le cas. L''analyseur utilisera un gestionnaire d''erreurs par défaut pour imprimer les {0} premières erreurs. Appelez la méthode ''setErrorHandler'' pour résoudre ce problème. -errorHandlerDebugMsg=Erreur : URI = "{0}", ligne = "{1}", : {2} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties deleted file mode 100644 index 66e2692057e..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# SAX implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - -BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. -FormatFailed = Si è verificato un errore interno durante la formattazione del seguente messaggio:\n - -# JAXP messages -schema-not-supported = La lingua dello schema specificata non è supportata. -jaxp-order-not-supported = Impostare la proprietà ''{0}'' prima di impostare la proprietà ''{1}''. -schema-already-specified = Impossibile impostare la proprietà ''{0}'' se è già stato specificato un oggetto di schema non nullo. - -# feature messages -feature-not-supported = La funzione "{0}" non è supportata. -feature-not-recognized = La funzione "{0}" non è riconosciuta. -true-not-supported = Lo stato true per la funzione "{0}" non è supportato. -false-not-supported = Lo stato false per la funzione "{0}" non è supportato. -feature-read-only = La funzione "{0}" è di sola lettura. -jaxp-secureprocessing-feature = FEATURE_SECURE_PROCESSING: impossibile impostare la funzione su false se è presente Security Manager. - -# property messages -property-not-supported = La proprietà "{0}" non è supportata. -property-not-recognized = La proprietà "{0}" non è riconosciuta. -property-read-only = La proprietà "{0}" è di sola lettura. -property-not-parsing-supported = La proprietà "{0}" non è supportata durante l''analisi. -dom-node-read-not-supported = Impossibile leggere la proprietà di nodo DOM. Non esiste alcuna struttura DOM. -incompatible-class = Impossibile eseguire la conversione cast del valore specificato per la proprietà ''{0}'' in {1}. - -start-document-not-called=Richiamare la proprietà "{0}" dopo l''esecuzione dell''evento startDocument -nullparameter=il parametro del nome per "{0}" è nullo -errorHandlerNotSet=Avvertenza: la convalida è stata attivata, ma org.xml.sax.ErrorHandler non è stato impostato, il che potrebbe essere un errore. Il parser utilizzerà un ErrorHandler predefinito per visualizzare i primi {0} errori. Richiamare il metodo ''setErrorHandler'' per correggere questo problema. -errorHandlerDebugMsg=Errore: URI = "{0}", riga = "{1}", : {2} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties deleted file mode 100644 index 78223a0a47e..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# SAX implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - -BadMessageKey = 메시지 키에 해당하는 오류 메시지를 찾을 수 없습니다. -FormatFailed = 다음 메시지의 형식을 지정하는 중 내부 오류가 발생했습니다.\n - -# JAXP messages -schema-not-supported = 지정된 스키마 언어는 지원되지 않습니다. -jaxp-order-not-supported = ''{1}'' 속성을 설정하기 전에 ''{0}'' 속성을 설정해야 합니다. -schema-already-specified = 널이 아닌 스키마 객체가 이미 지정된 경우 ''{0}'' 속성을 설정할 수 없습니다. - -# feature messages -feature-not-supported = ''{0}'' 기능은 지원되지 않습니다. -feature-not-recognized = ''{0}'' 기능을 인식할 수 없습니다. -true-not-supported = ''{0}'' 기능의 True 상태는 지원되지 않습니다. -false-not-supported = ''{0}'' 기능의 False 상태는 지원되지 않습니다. -feature-read-only = ''{0}'' 기능은 읽기 전용입니다. -jaxp-secureprocessing-feature = FEATURE_SECURE_PROCESSING: 보안 관리자가 있을 경우 기능을 false로 설정할 수 없습니다. - -# property messages -property-not-supported = ''{0}'' 속성은 지원되지 않습니다. -property-not-recognized = ''{0}'' 속성을 인식할 수 없습니다. -property-read-only = ''{0}'' 속성은 읽기 전용입니다. -property-not-parsing-supported = 구문 분석 중 ''{0}'' 속성은 지원되지 않습니다. -dom-node-read-not-supported = DOM 노드 속성을 읽을 수 없습니다. DOM 트리가 존재하지 않습니다. -incompatible-class = ''{0}'' 속성에 대해 지정된 값의 데이터형을 {1}(으)로 변환할 수 없습니다. - -start-document-not-called="{0}" 속성은 startDocument 이벤트가 발생된 후 호출해야 합니다. -nullparameter="{0}"에 대한 이름 매개변수가 널입니다. -errorHandlerNotSet=경고: 검증이 설정되었지만 org.xml.sax.ErrorHandler가 적절히 설정되지 않았습니다. 구문 분석기가 기본 ErrorHandler를 사용하여 처음 {0}개의 오류를 인쇄합니다. 이 오류를 수정하려면 ''setErrorHandler'' 메소드를 호출하십시오. -errorHandlerDebugMsg=오류: URI = "{0}", 행 = "{1}", : {2} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties deleted file mode 100644 index c9459ae0efc..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# SAX implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - -BadMessageKey = Não foi possível encontrar a mensagem de erro correspondente à chave da mensagem. -FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n - -# JAXP messages -schema-not-supported = O idioma do esquema especificado não é suportado. -jaxp-order-not-supported = A propriedade ''{0}'' deve ser definida antes da definição da propriedade ''{1}''. -schema-already-specified = A propriedade ''{0}'' não pode ser definida quando um objeto do Esquema não nulo já tiver sido especificado. - -# feature messages -feature-not-supported = O recurso ''{0}'' não é suportado. -feature-not-recognized = O recurso ''{0}'' não é reconhecido. -true-not-supported = Estado verdadeiro do recurso ''{0}'' não suportado. -false-not-supported = Estado falso do recurso ''{0}'' não suportado. -feature-read-only = O recurso ''{0}'' é somente para leitura. -jaxp-secureprocessing-feature = FEATURE_SECURE_PROCESSING: Não é possível definir o recurso como falso quando o gerenciador de segurança está presente. - -# property messages -property-not-supported = A propriedade ''{0}'' não é suportada. -property-not-recognized = A propriedade ''{0}'' não é reconhecida. -property-read-only = A propriedade ''{0}'' é somente para leitura. -property-not-parsing-supported = A propriedade ''{0}'' não é suportada durante o parsing. -dom-node-read-not-supported = Não é possível ler a propriedade do nó de DOM. Não existe uma árvore de DOM. -incompatible-class = O valor especificado para a propriedade ''{0}'' não pode ser transmitido para ''{1}''. - -start-document-not-called=A propriedade "{0}" deve ser chamada após o evento startDocument ser lançado -nullparameter=o parâmetro de nome de "{0}" é nulo -errorHandlerNotSet=Advertência: A validação foi ativada, mas um org.xml.sax.ErrorHandler não foi definido, provavelmente porque não era necessário. O parser usará um ErrorHandler padrão para imprimir os primeiros {0} erros. Chame o método ''setErrorHandler'' para corrigir o problema. -errorHandlerDebugMsg=Erro: URI = "{0}", Linha = "{1}", : {2} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties deleted file mode 100644 index d0bfd1eba0f..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# SAX implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - -BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. -FormatFailed = Ett internt fel inträffade vid formatering av följande meddelande:\n - -# JAXP messages -schema-not-supported = Angivet schemaspråk stöds inte. -jaxp-order-not-supported = Egenskapen ''{0}'' måste anges före inställning av egenskapen ''{1}''. -schema-already-specified = Egenskapen ''{0}'' kan inte anges om ett Schema-objekt som är icke-null redan har angetts. - -# feature messages -feature-not-supported = Funktionen ''{0}'' stöds inte. -feature-not-recognized = Funktionen ''{0}'' är okänd. -true-not-supported = True-tillstånd för funktionen ''{0}'' stöds inte. -false-not-supported = False-tillstånd för funktionen ''{0}'' stöds inte. -feature-read-only = Funktionen ''{0}'' är skrivskyddad. -jaxp-secureprocessing-feature = FEATURE_SECURE_PROCESSING: Funktionen kan inte anges till false om säkerhetshanteraren används. - -# property messages -property-not-supported = Egenskapen ''{0}'' stöds inte. -property-not-recognized = Egenskapen ''{0}'' är okänd. -property-read-only = Egenskapen ''{0}'' är skrivskyddad. -property-not-parsing-supported = Egenskapen ''{0}'' stöds inte vid tolkning. -dom-node-read-not-supported = Kan inte läsa egenskap för DOM-nod. Det finns inget DOM-träd. -incompatible-class = Värdet angivet för egenskapen ''{0}'' kan inte omvandlas till {1}. - -start-document-not-called=Egenskapen "{0}" bör anropas efter startDocument-händelsen utlöses -nullparameter=namnparametern för "{0}" är null -errorHandlerNotSet=Varning: valideringen startades, men det fanns ingen angiven org.xml.sax.ErrorHandler. Parser använder ErrorHandler av standardtyp vid utskrift av de första {0} felen. Korrigera felet genom anrop av setErrorHandler-metoden. -errorHandlerDebugMsg=Fel: URI = "{0}", Rad = "{1}", : {2} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties deleted file mode 100644 index 4be053931de..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces -# SAX implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - - -BadMessageKey = 找不到對應訊息索引鍵的錯誤訊息。 -FormatFailed = 格式化下列訊息時發生內部錯誤:\n - -# JAXP messages -schema-not-supported = 不支援指定的綱要語言。 -jaxp-order-not-supported = 設定屬性 ''{1}'' 之前,必須設定屬性 ''{0}''。 -schema-already-specified = 已經指定非空值綱要物件時,無法設定屬性 ''{0}''。 - -# feature messages -feature-not-supported = 不支援功能 ''{0}''。 -feature-not-recognized = 無法辨識功能 ''{0}''。 -true-not-supported = 不支援功能 ''{0}'' 的真狀態。 -false-not-supported = 不支援功能 ''{0}'' 的偽狀態。 -feature-read-only = 功能 ''{0}'' 為唯讀。 -jaxp-secureprocessing-feature = FEATURE_SECURE_PROCESSING: 安全管理程式存在時,無法將功能設為偽。 - -# property messages -property-not-supported = 不支援屬性 ''{0}''。 -property-not-recognized = 無法辨識屬性 ''{0}''。 -property-read-only = 屬性 ''{0}'' 為唯讀。 -property-not-parsing-supported = 剖析時不支援屬性 ''{0}''。 -dom-node-read-not-supported = 無法讀取 DOM 節點屬性。DOM 樹狀結構不存在。 -incompatible-class = 為屬性 ''{0}'' 指定的值不可轉換為 {1}。 - -start-document-not-called=發生 startDocument 事件之後,應呼叫屬性 "{0}"。 -nullparameter="{0}" 的名稱參數為空值 -errorHandlerNotSet=警告: 已開啟驗證,但是未設定 org.xml.sax.ErrorHandler,這可能不是所要的狀態。剖析器將使用預設的 ErrorHandler 來列印第一個 {0} 錯誤。請呼叫 ''setErrorHandler'' 方法來修正此問題。 -errorHandlerDebugMsg=錯誤: URI = "{0}",行 = "{1}",: {2} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_es.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_es.properties deleted file mode 100644 index 66d8a539897..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_es.properties +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# Messages for message reporting -BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. -FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n - -# Messages for erroneous input -NoFallback = Ha fallado un elemento ''include'' con href ''{0}'' y no se ha encontrado ningún elemento ''fallback''. -MultipleFallbacks = Los [secundarios] de un elemento 'include' no pueden contener más de un elemento 'fallback'. -FallbackParent = Se ha encontrado un elemento 'fallback' que no tenía un elemento 'include' como principal. -IncludeChild = No se permite que los elementos del espacio de nombres ''http://www.w3.org/2001/XInclude'', distintos de los elementos ''fallback'' sean secundarios de los elementos ''include''. Sin embargo, se ha encontrado ''{0}''. -FallbackChild = No se permite que los elementos del espacio de nombres ''http://www.w3.org/2001/XInclude'', distintos de los elementos ''include'' sean secundarios de los elementos ''fallback''. Sin embargo, se ha encontrado ''{0}''. -HrefMissing = Falta el atributo 'href' de un elemento 'include'. -RecursiveInclude = Se ha detectado un elemento include recursivo. El documento ''{0}'' ya se ha procesado. -InvalidParseValue = Valor no válido para el atributo ''parse'' en el elemento ''include'': ''{0}''. -XMLParseError = Error al intentar analizar el archivo XML (href=''{0}''). Motivo: {1} -XMLResourceError = Fallo de la operación include, conversión a fallback. Error del recurso al leer el archivo como XML (href=''{0}''). Motivo: {1} -TextResourceError = Fallo de la operación include, conversión a fallback. Error del recurso al leer el archivo como texto (href=''{0}''). Motivo: {1} -NO_XPointerSchema = El esquema para "{0}" no está soportado por defecto. Defina su propio esquema para {0}. Consulte http://apache.org/xml/properties/xpointer-schema -NO_SubResourceIdentified = El procesador XPointer no ha identificado el subrecurso para el puntero {0}. -NonDuplicateNotation = Se han utilizado varias notaciones con el nombre''{0}'', pero no se ha determinado que sean duplicados. -NonDuplicateUnparsedEntity = Se han utilizado varias entidades no analizadas con el nombre''{0}'', pero no se ha determinado que sean duplicados. -XpointerMissing = el atributo xpointer debe estar presente cuando el atributo href esté ausente. -AcceptMalformed = Los caracteres fuera del rango de #x20 a #x7E no están permitidos en el valor del atributo 'accept' de un elemento 'include'. -AcceptLanguageMalformed = Los caracteres fuera del rango #x20 through #x7E no están permitidos en el valor del atributo 'accept-language' de un elemento 'include'. -RootElementRequired = Un documento con formato correcto necesita un elemento raíz. -MultipleRootElements = Un documento con formato correcto no debe contener varios elementos raíz. -ContentIllegalAtTopLevel = La sustitución de un elemento 'include' que aparece como el elemento de documento en el juego de información de origen de nivel superior no puede contener caracteres. -UnexpandedEntityReferenceIllegal = La sustitución de un elemento 'include' que aparece como el elemento de documento en el juego de información de origen de nivel superior no puede contener referencias de entidad no ampliadas. -HrefFragmentIdentifierIllegal = Los identificadores de fragmento no deben utilizarse. El valor del atributo ''href'' ''{0}'' no está permitido. -HrefSyntacticallyInvalid = El valor del atributo ''href'' ''{0}'' no es válido sintácticamente. Después de aplicar las reglas de escape, el valor no es un URI ni un IRI sintácticamente correctos. -XPointerStreamability = Se ha especificado un xpointer que apunta a una ubicación en el juego de información de origen. No se puede acceder a esta ubicación debido a la naturaleza de flujo del procesador. - -XPointerResolutionUnsuccessful = Resolución de XPointer incorrecta. - -# Messages from erroneous set-up -IncompatibleNamespaceContext = El tipo de NamespaceContext es incompatible con el uso de XInclude; debe ser una instancia de XIncludeNamespaceSupport -ExpandedSystemId = No se ha podido ampliar el identificador del sistema del recurso incluido diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_fr.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_fr.properties deleted file mode 100644 index 14498314a5b..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_fr.properties +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# Messages for message reporting -BadMessageKey = Le message d'erreur correspondant à la clé de message est introuvable. -FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n - -# Messages for erroneous input -NoFallback = Echec d''un élément ''include'' avec l''attribut href ''{0}'' ; aucun élément ''fallback'' n''a été trouvé. -MultipleFallbacks = Les [enfants] d'un élément 'include' ne doivent pas contenir plusieurs éléments 'fallback'. -FallbackParent = Un élément 'fallback' n'ayant pas l'élément 'include' comme parent été trouvé. -IncludeChild = Les éléments de l''espace de noms ''http://www.w3.org/2001/XInclude'', autres que ''fallback'', ne peuvent pas être des enfants des éléments ''include''. Cependant, ''{0}'' a été trouvé. -FallbackChild = Les éléments de l''espace de noms ''http://www.w3.org/2001/XInclude'', autres que ''include'', ne peuvent pas être des enfants des éléments ''fallback''. Cependant, ''{0}'' a été trouvé. -HrefMissing = L'attribut 'href' d'un élément 'include' est manquant. -RecursiveInclude = Elément "include" récursif détecté. Le document ''{0}'' a déjà été traité. -InvalidParseValue = Valeur non valide pour l''attribut ''parse'' sur l''élément ''include'' : ''{0}''. -XMLParseError = Erreur lors de la tentative d''analyse du fichier XML (href=''{0}''). Raison : {1} -XMLResourceError = Echec de l''opération Include, rétablissement de l''élément fallback. Erreur de ressource lors de la lecture du fichier en tant que XML (href=''{0}''). Raison : {1} -TextResourceError = Echec de l''opération Include, rétablissement de l''élément fallback. Erreur de ressource lors de la lecture du fichier en tant que texte (href=''{0}''). Raison : {1} -NO_XPointerSchema = Par défaut, le schéma pour "{0}" n''est pas pris en charge. Définissez votre propre schéma pour {0}. Reportez-vous à l''adresse http://apache.org/xml/properties/xpointer-schema -NO_SubResourceIdentified = Aucune sous-ressource n''est identifiée par le processeur XPointer pour le pointeur {0}. -NonDuplicateNotation = Plusieurs notations portant le nom ''{0}'' ont été utilisées, mais elles n''ont pas été considérées comme des doublons. -NonDuplicateUnparsedEntity = Plusieurs entités non analysées portant le nom ''{0}'' ont été utilisées, mais elles n''ont pas été considérées comme des doublons. -XpointerMissing = l'attribut xpointer doit être présent lorsque l'attribut href est absent. -AcceptMalformed = Les caractères non compris entre #x20 et #x7E ne sont pas autorisés comme valeur de l'attribut 'accept' d'un élément 'include'. -AcceptLanguageMalformed = Les caractères non compris entre #x20 et #x7E ne sont pas autorisés comme valeur de l'attribut 'accept-language' d'un élément 'include'. -RootElementRequired = Un document dont le format est correct requiert un élément racine. -MultipleRootElements = Un document dont le format est correct ne doit pas contenir plusieurs éléments racine. -ContentIllegalAtTopLevel = Le remplacement d'un élément 'include' affiché en tant qu'élément de document dans l'ensemble d'information source de niveau supérieur ne doit pas contenir de caractères. -UnexpandedEntityReferenceIllegal = Le remplacement d'un élément 'include' affiché en tant qu'élément de document dans l'ensemble d'information source de niveau supérieur ne doit pas contenir de références d'entité non développées. -HrefFragmentIdentifierIllegal = Les identificateurs de fragment ne doivent pas être utilisés. La valeur d''attribut ''href'' ''{0}'' n''est pas autorisée. -HrefSyntacticallyInvalid = La syntaxe de la valeur d''attribut ''href'' ''{0}'' est incorrecte. Après l''application des règles d''échappement, la valeur n''est pas un URI ou un IRI exprimé dans une syntaxe correcte. -XPointerStreamability = Un XPointer pointant sur un emplacement de l'ensemble d'information source a été indiqué. Cet emplacement est inaccessible en raison des caractéristiques de transmission en continu du processeur. - -XPointerResolutionUnsuccessful = Echec de la résolution de XPointer. - -# Messages from erroneous set-up -IncompatibleNamespaceContext = Le type de l'élément NamespaceContext n'est pas compatible avec l'utilisation de l'élément XInclude ; il doit s'agir d'une instance de XIncludeNamespaceSupport -ExpandedSystemId = Impossible de développer l'ID système de la ressource incluse diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_it.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_it.properties deleted file mode 100644 index d9bba9ce159..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_it.properties +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# Messages for message reporting -BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. -FormatFailed = Si è verificato un errore interno durante la formattazione del seguente messaggio:\n - -# Messages for erroneous input -NoFallback = Errore dell''elemento ''include'' con href ''{0}''. Non è stato trovato alcune elemento ''fallback''. -MultipleFallbacks = [children] di un elemento 'include' non possono contenere più elementi 'fallback'. -FallbackParent = È stato trovato un elemento 'fallback' che non ha un elemento 'include' come padre. -IncludeChild = Gli elementi dello spazio di nomi ''http://www.w3.org/2001/XInclude'' diversi da ''fallback'' non possono avere elementi figlio di elementi ''include''. Tuttavia, è stato trovato ''{0}''. -FallbackChild = Gli elementi dello spazio di nomi ''http://www.w3.org/2001/XInclude'' diversi da ''include'' non possono avere elementi figlio di elementi ''fallback''. Tuttavia, è stato trovato ''{0}''. -HrefMissing = Manca l'attributo 'href' di un elemento 'include'. -RecursiveInclude = Inclusione ricorsiva rilevata. Il documento ''{0}'' è già stato elaborato. -InvalidParseValue = Valore non valido per l''attributo ''parse'' nell''elemento ''include'': ''{0}''. -XMLParseError = Errore durante il tentativo di analizzare il file XML (href=''{0}''). Causa: {1} -XMLResourceError = Operazione di inclusione non riuscita. Verrà ripristinato il fallback. Errore di risorsa durante la lettura del file come XML (href=''{0}''). Motivo: {1} -TextResourceError = Operazione di inclusione non riuscita. Verrà ripristinato il fallback. Errore di risorsa durante la lettura del file come testo (href=''{0}''). Motivo: {1} -NO_XPointerSchema = Lo schema per "{0}" non è supportato per impostazione predefinita. Definire il proprio schema per {0}. Vedere http://apache.org/xml/properties/xpointer-schema. -NO_SubResourceIdentified = Nessuna risorsa secondaria identificata dal processore XPointer per il puntatore {0}. -NonDuplicateNotation = Sono state utilizzate più notazioni con il nome ''{0}'', ma è stato determinato che non sono duplicati. -NonDuplicateUnparsedEntity = Sono state utilizzate più entità non analizzate con il nome ''{0}'', ma è stato determinato che non sono duplicati. -XpointerMissing = L'attributo xpointer deve essere presente se è assente l'attributo href. -AcceptMalformed = I caratteri che non rientrano tra #x20 e #x7E non sono consentiti nel valore dell'attributo 'accept' di un elemento 'include'. -AcceptLanguageMalformed = I caratteri che non rientrano tra #x20 e #x7E non sono consentiti nel valore dell'attributo 'accept-language' di un elemento 'include'. -RootElementRequired = Un documento con formato corretto richiede un elemento radice. -MultipleRootElements = Un documento con formato corretto non deve contenere più elementi radice. -ContentIllegalAtTopLevel = La sostituzione di un elemento 'include' indicato come elemento di documento nel set di informazioni di origine nel livello superiore non può contenere caratteri. -UnexpandedEntityReferenceIllegal = La sostituzione di un elemento 'include' indicato come elemento di documento nel set di informazioni di origine nel livello superiore non può contenere riferimenti di entità non espansi. -HrefFragmentIdentifierIllegal = Non utilizzare gli identificativi di frammento. Il valore ''{0}'' dell''attributo ''href'' non è consentito. -HrefSyntacticallyInvalid = Il valore ''{0}'' dell''attributo ''href'' non è valido a livello di sintassi. Dopo aver applicato le regole di escape, il valore non è un URI o un IRI con sintassi corretta. -XPointerStreamability = È stato specificato un xpointer che punta a una posizione nel set di informazioni di origine. Non è possibile accedere a questa posizione poiché il processore è di tipo streaming. - -XPointerResolutionUnsuccessful = Risoluzione di XPointer non riuscita. - -# Messages from erroneous set-up -IncompatibleNamespaceContext = Il tipo di NamespaceContext non è compatibile con l'uso di XInclude; deve essere un'istanza di XIncludeNamespaceSupport. -ExpandedSystemId = Impossibile espandere l'ID di sistema della risorsa inclusa diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_ko.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_ko.properties deleted file mode 100644 index ca12d337604..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_ko.properties +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# Messages for message reporting -BadMessageKey = 메시지 키에 해당하는 오류 메시지를 찾을 수 없습니다. -FormatFailed = 다음 메시지의 형식을 지정하는 중 내부 오류가 발생했습니다.\n - -# Messages for erroneous input -NoFallback = href ''{0}''을(를) 사용한 ''include''를 실패했으며 ''fallback'' 요소를 찾을 수 없습니다. -MultipleFallbacks = 'include' 요소의 [children]에는 두 개 이상의 'fallback' 요소가 포함될 수 없습니다. -FallbackParent = 상위로 'include'를 포함하지 않은 'fallback' 요소가 발견되었습니다. -IncludeChild = ''fallback'' 외에 다른 ''http://www.w3.org/2001/XInclude'' 네임스페이스의 요소는 ''include'' 요소의 하위 항목일 수 없지만, ''{0}''이(가) 발견되었습니다. -FallbackChild = ''include'' 외에 다른 ''http://www.w3.org/2001/XInclude'' 네임스페이스의 요소는 ''fallback'' 요소의 하위 항목일 수 없지만, ''{0}''이(가) 발견되었습니다. -HrefMissing = 'include' 요소의 'href' 속성이 누락되었습니다. -RecursiveInclude = 순환 include가 감지되었습니다. ''{0}'' 문서가 이미 처리되었습니다. -InvalidParseValue = ''include'' 요소에 ''parse'' 속성에 대해 부적합한 값이 있음: ''{0}''. -XMLParseError = XML 파일(href=''{0}'')의 구문을 분석하려고 시도하는 중 오류가 발생했습니다. 원인: {1} -XMLResourceError = Include 작업을 실패하여 fallback으로 복원하는 중입니다. 파일을 XML(href=''{0}'')로 읽는 중 리소스 오류가 발생했습니다. 원인: {1} -TextResourceError = Include 작업을 실패하여 fallback으로 복원하는 중입니다. 파일을 텍스트(href=''{0}'')로 읽는 중 리소스 오류가 발생했습니다. 원인: {1} -NO_XPointerSchema = 기본적으로 "{0}"에 대한 스키마는 지원되지 않습니다. {0}에 대해 고유한 스키마를 정의하십시오. http://apache.org/xml/properties/xpointer-schema를 참조하십시오. -NO_SubResourceIdentified = {0} 포인터에 대한 XPointer 프로세서가 식별한 하위 리소스가 없습니다. -NonDuplicateNotation = 이름이 ''{0}''이지만 중복된 것으로 확인되지 않은 표기법이 여러 개 사용되었습니다. -NonDuplicateUnparsedEntity = 이름이 ''{0}''이지만 중복된 것으로 확인되지 않았으며 구문이 분석되지 않은 엔티티가 여러 개 사용되었습니다. -XpointerMissing = href 속성이 없을 경우 xpointer 속성이 있어야 합니다. -AcceptMalformed = 'include' 요소의 'accept' 속성값에서는 #x20 - #x7E 범위에 속하지 않는 문자가 허용되지 않습니다. -AcceptLanguageMalformed = 'include' 요소의 'accept-language' 속성값에서는 #x20 - #x7E 범위에 속하지 않는 문자가 허용되지 않습니다. -RootElementRequired = 올바른 형식의 문서에는 루트 요소가 필요합니다. -MultipleRootElements = 올바른 형식의 문서에는 루트 요소가 여러 개 포함되지 않아야 합니다. -ContentIllegalAtTopLevel = 최상위 레벨 소스 infoset에서 문서 요소로 나타나는 'include' 요소의 대체에는 문자가 포함될 수 없습니다. -UnexpandedEntityReferenceIllegal = 최상위 레벨 소스 infoset에서 문서 요소로 나타나는 'include' 요소의 대체에는 확장되지 않은 엔티티 참조가 포함될 수 없습니다. -HrefFragmentIdentifierIllegal = 부분 식별자는 사용하지 않아야 합니다. ''href'' 속성값 ''{0}''은(는) 허용되지 않습니다. -HrefSyntacticallyInvalid = ''href'' 속성값 ''{0}''이(가) 구문적으로 부적합합니다. 이스케이프 규칙을 적용한 후 값이 구문적으로 올바른 URI 또는 IRI가 아닌 것으로 확인되었습니다. -XPointerStreamability = 소스 infoset의 위치를 가리키는 xpointer가 지정되었습니다. 프로세서의 스트리밍 특성으로 인해 이 위치에 액세스할 수 없습니다. - -XPointerResolutionUnsuccessful = XPointer 분석을 실패했습니다. - -# Messages from erroneous set-up -IncompatibleNamespaceContext = NamespaceContext의 유형이 사용 중인 XInclude와 호환되지 않습니다. XIncludeNamespaceSupport의 인스턴스여야 합니다. -ExpandedSystemId = 포함된 리소스의 시스템 ID를 확장할 수 없습니다. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_pt_BR.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_pt_BR.properties deleted file mode 100644 index 8a2db17c0c7..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_pt_BR.properties +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# Messages for message reporting -BadMessageKey = Não foi possível encontrar a mensagem de erro correspondente à chave da mensagem. -FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n - -# Messages for erroneous input -NoFallback = Falha em um ''include'' com href ''{0}'' e não foi encontrado elemento ''fallback''. -MultipleFallbacks = O [children] de um elemento 'include' não pode conter mais de um elemento 'fallback'. -FallbackParent = Um elemento 'fallback' que foi encontrado não tinha 'include' como pai. -IncludeChild = Elementos do namespace ''http://www.w3.org/2001/XInclude'', diferentes de ''fallback'', não podem ser filhos dos elementos ''include''. No entanto, ''{0}'' foi encontrado. -FallbackChild = Elementos do namespace ''http://www.w3.org/2001/XInclude'', diferentes de ''include'', não podem ser filhos dos elementos ''fallback''. No entanto, ''{0}'' foi encontrado. -HrefMissing = O atributo 'href' de um elemento 'include' não foi encontrado. -RecursiveInclude = Inclusão recursiva detectada. O documento ''{0}'' já foi processado. -InvalidParseValue = Valor inválido para o atributo ''parse'' no elemento ''include'': ''{0}''. -XMLParseError = Erro ao tentar fazer parse do arquivo XML (href=''{0}''). Motivo: {1} -XMLResourceError = Falha na operação de inclusão; revertendo para fallback. Erro do recurso ao ler o arquivo como XML (href=''{0}''). Motivo: {1} -TextResourceError = Falha na operação de inclusão; revertendo para fallback. Erro do recurso ao ler o arquivo como texto (href=''{0}''). Motivo: {1} -NO_XPointerSchema = Por padrão, o esquema para "{0}" não é suportado. Defina seu próprio esquema para {0}. Consulte http://apache.org/xml/properties/xpointer-schema -NO_SubResourceIdentified = Nenhum Sub-recurso foi identificado pelo Processador XPointer do Ponteiro {0}. -NonDuplicateNotation = Foram usadas várias notações que tinham o nome ''{0}'', mas não foram determinadas como duplicações. -NonDuplicateUnparsedEntity = Foram usadas várias entidades que tinham o nome ''{0}'', mas não foram determinadas como duplicações. -XpointerMissing = o atributo xpointer deverá estar presente quando o atributo href estiver ausente. -AcceptMalformed = Não são permitidos caracteres fora da faixa #x20 até #x7E no valor do atributo 'accept' de um elemento 'include'. -AcceptLanguageMalformed = Não são permitidos caracteres fora da faixa #x20 até #x7E no valor do atributo 'accept-language' de um elemento 'include'. -RootElementRequired = Um documento correto requer um elemento-raiz. -MultipleRootElements = Um documento correto não deve conter vários elementos-raiz. -ContentIllegalAtTopLevel = A substituição de um elemento 'include' que aparece como o elemento do documento no conjunto de informações de origem de nível superior não pode conter caracteres. -UnexpandedEntityReferenceIllegal = A substituição de um elemento 'include' que aparece como o elemento do documento no conjunto de informações de origem de nível superior não pode conter referências da entidade não expandidas. -HrefFragmentIdentifierIllegal = Os identificadores de fragmento não devem ser usados. O valor do atributo ''href'' "{0}'' não é permitido. -HrefSyntacticallyInvalid = o valor do atributo ''href'' ''{0}'' é inválido sintaticamente. Após aplicar as regras de escape, o valor não é um URI ou IRI correto. -XPointerStreamability = Foi especificado um xpointer que aponta para uma localização no conjunto de informações de origem. Esta localização não pode ser acessada em decorrência da natureza do fluxo do processador. - -XPointerResolutionUnsuccessful = Resolução de XPointer malsucedida. - -# Messages from erroneous set-up -IncompatibleNamespaceContext = O tipo de NamespaceContext é incompatível ao usar XInclude. Deve ser uma instância de XIncludeNamespaceSupport -ExpandedSystemId = Não foi possível expandir o id do sistema do recurso incluído diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties deleted file mode 100644 index b9711a32347..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# Messages for message reporting -BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. -FormatFailed = Ett internt fel inträffade vid formatering av följande meddelande:\n - -# Messages for erroneous input -NoFallback = Ett ''include'' med href ''{0}'' utfördes inte, hittade inget återskapningselement (''fallback''). -MultipleFallbacks = [underordnade] i ett 'include'-element får inte innehålla fler än ett 'fallback'-element. -FallbackParent = Ett 'fallback'-element hittades utan något 'include' som överordnat element. -IncludeChild = Element från namnrymd ''http://www.w3.org/2001/XInclude'', utöver ''fallback'', är inte tillåtna som underordnade i ''include''-element. Hittade däremot ''{0}''. -FallbackChild = Element från namnrymd ''http://www.w3.org/2001/XInclude'', utöver ''include'', är inte tillåtna som underordnade i ''fallback''-element. Hittade däremot ''{0}''. -HrefMissing = Ett 'href'-attribut i ett 'include'-element saknas. -RecursiveInclude = Rekursiv inkludering upptäcktes. Dokumentet ''{0}'' har redan bearbetats. -InvalidParseValue = Ogiltigt värde för ''parse''-attribut i ''include''-element: ''{0}''. -XMLParseError = Fel vid försök att tolka XML-fil (href=''{0}''). Orsak: {1} -XMLResourceError = Inkluderingsåtgärden utfördes inte, återställer genom att återskapa. Resursfel vid läsning av fil som XML (href=''{0}''). Orsak: {1} -TextResourceError = Inkluderingsåtgärden utfördes inte, återställer genom att återskapa. Resursfel vid läsning av fil som text (href=''{0}''). Orsak: {1} -NO_XPointerSchema = Schema för "{0}" stöds inte som standard. Definiera ett eget schema för {0}.Se http://apache.org/xml/properties/xpointer-schema -NO_SubResourceIdentified = Ingen Subresource har identifierats av XPointer-processorn för pekare {0}. -NonDuplicateNotation = Flera noteringar används med namnet ''{0}'', men som inte fastställs som dubbletter. -NonDuplicateUnparsedEntity = Flera otolkade enheter används med namnet ''{0}'', men som inte fastställs som dubbletter. -XpointerMissing = Om href-attribut saknas måste det finnas ett xpointer-attribut. -AcceptMalformed = Tecken utanför intervallet #x20 till #x7E tillåts inte i värdet för 'accept'-attributet i 'include'-element. -AcceptLanguageMalformed = Tecken utanför intervallet #x20 till #x7E tillåts inte i värdet för 'accept-language'-attributet i 'include'-element. -RootElementRequired = Ett välformulerat dokument kräver ett rotelement. -MultipleRootElements = Ett välformulerat dokument får inte innehålla flera rotelement. -ContentIllegalAtTopLevel = Ersättningen av ett 'include'-element som förekommer som dokumentelement i källans informationsuppsättning på toppnivån får inte innehålla tecken. -UnexpandedEntityReferenceIllegal = Ersättningen av ett 'include'-element som förekommer som dokumentelement i källans informationsuppsättning på toppnivån får inte innehålla utökade enhetsreferenser. -HrefFragmentIdentifierIllegal = Fragmentidentifierare får inte användas. ''href''-attributvärdet ''{0}'' är inte tillåtet. -HrefSyntacticallyInvalid = ''href''-attributvärdet ''{0}'' är syntaktiskt ogiltigt. Efter tillämpning av avbrottsregler har värdet varken syntaktiskt korrekt URI eller IRI. -XPointerStreamability = En xpointer har angetts som pekar till en plats i källans informationsuppsättning. Det finns ingen åtkomst till denna plats på grund av processorns strömningsmetod. - -XPointerResolutionUnsuccessful = XPointer-matchningen utfördes inte. - -# Messages from erroneous set-up -IncompatibleNamespaceContext = Typ av NamespaceContext är inkompatibel med XInclude; det krävs en instans av XIncludeNamespaceSupport -ExpandedSystemId = Kunde inte utöka system-id:t för inkluderad resurs diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_zh_TW.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_zh_TW.properties deleted file mode 100644 index a96a4f47b6b..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_zh_TW.properties +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# Messages for message reporting -BadMessageKey = 找不到對應訊息索引鍵的錯誤訊息。 -FormatFailed = 格式化下列訊息時發生內部錯誤:\n - -# Messages for erroneous input -NoFallback = 含有 href ''{0}'' 的 ''include'' 失敗,找不到 ''fallback'' 元素。 -MultipleFallbacks = 'include' 元素的 [children] 不可包含超過一個以上的 'fallback' 元素。 -FallbackParent = 找到一個不具有 'include' 作為父項的 'fallback' 元素。 -IncludeChild = 來自命名空間 ''http://www.w3.org/2001/XInclude'' 且不是 ''fallback'' 的元素,不允許成為 ''include'' 元素的子項。不過,卻找到 ''{0}''。 -FallbackChild = 來自命名空間 ''http://www.w3.org/2001/XInclude'' 且不是 ''include'' 的元素,不允許成為 ''fallback'' 元素的子項。不過,卻找到 ''{0}''。 -HrefMissing = 遺漏 'include' 元素的 'href' 屬性。 -RecursiveInclude = 偵測到遞迴包含。已經處理文件 ''{0}''。 -InvalidParseValue = ''include'' 元素上 ''parse'' 屬性的無效值: ''{0}''。 -XMLParseError = 嘗試剖析 XML 檔案 (href=''{0}'') 時發生錯誤。原因: {1} -XMLResourceError = 包含作業失敗,回復至後援。以 XML (href=''{0}'') 方式讀取檔案時發生資源錯誤。原因: {1} -TextResourceError = 包含作業失敗,回復至後援。以文字 (href=''{0}'') 方式讀取檔案時發生資源錯誤。原因: {1} -NO_XPointerSchema = 預設不支援 "{0}" 的綱要。請為 {0} 定義您自己的綱要。請參閱 http://apache.org/xml/properties/xpointer-schema -NO_SubResourceIdentified = XPointer 處理器未能為指標 {0} 識別任何子資源。 -NonDuplicateNotation = 使用名稱為 ''{0}'' 的多個表示法,但是未能判斷這些表示法重複。 -NonDuplicateUnparsedEntity = 使用名稱為 ''{0}'' 的多個未剖析實體,但是未能判斷這些實體重複。 -XpointerMissing = 沒有 href 屬性時,必須有 xpointer 屬性。 -AcceptMalformed = 'include' 元素的 'accept' 屬性值中,不允許範圍 #x20 至 #x7E 之外的字元。 -AcceptLanguageMalformed = 'include' 元素的 'accept-language' 屬性值中,不允許範圍 #x20 至 #x7E 之外的字元。 -RootElementRequired = 格式正確的文件需要根元素。 -MultipleRootElements = 格式正確的文件不可包含多個根元素。 -ContentIllegalAtTopLevel = 取代 'include' 元素作為最上層來源 infoset 的文件元素不能包含字元。 -UnexpandedEntityReferenceIllegal = 取代 'include' 元素作為最上層來源 infoset 的文件元素不能包含未展開的實體參照。 -HrefFragmentIdentifierIllegal = 不可使用片段 ID。不允許 ''href'' 屬性值 ''{0}''。 -HrefSyntacticallyInvalid = ''href'' 屬性值 ''{0}'' 句法無效。套用遁離規則之後,值為句法正確的 URI 或 IRI。 -XPointerStreamability = 指定 xpointer 指向來源 infoset 中的位置。由於處理器串流特性,因此無法存取此位置。 - -XPointerResolutionUnsuccessful = XPointer 解析失敗。 - -# Messages from erroneous set-up -IncompatibleNamespaceContext = NamespaceContext 類型與使用 XInclude 不相容; 它必須是 XIncludeNamespaceSupport 的執行處理 -ExpandedSystemId = 無法展開包含資源的系統 ID diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties deleted file mode 100644 index f20c7db5164..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties +++ /dev/null @@ -1,308 +0,0 @@ -# This file contains error and warning messages related to XML -# The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version - - BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. - FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n - -# Document messages - PrematureEOF=Final de archivo prematuro. -# 2.1 Well-Formed XML Documents - RootElementRequired = El elemento raíz es necesario en un documento con formato correcto. -# 2.2 Characters - - InvalidCharInCDSect = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en la sección CDATA. - InvalidCharInContent = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en el contenido del elemento del documento. - TwoColonsInQName = Se ha encontrado un segundo ':' no válido en el tipo de elemento o en el nombre del atributo. - ColonNotLegalWithNS = No se permite incluir dos puntos en el nombre ''{0}'' cuando se activan los espacios de nombres. - InvalidCharInMisc = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en el marcador al finalizar el contenido del elemento. - InvalidCharInProlog = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en el prólogo del documento. - InvalidCharInXMLDecl = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en la declaración XML. -# 2.4 Character Data and Markup - CDEndInContent = La secuencia de caracteres "]]>" no debe aparecer en el contenido, a menos que se utilice para marcar el final de una sección CDATA. -# 2.7 CDATA Sections - CDSectUnterminated = La sección CDATA debe finalizar en "]]>". -# 2.8 Prolog and Document Type Declaration - XMLDeclMustBeFirst = La declaración XML sólo puede aparecer al principio del documento. - EqRequiredInXMLDecl = El carácter '' = '' debe aparecer después de "{0}" en la declaración XML. - QuoteRequiredInXMLDecl = El valor después de "{0}" en la declaración XML debe ser una cadena con comillas. - XMLDeclUnterminated = La declaración XML debe finalizar en "?>". - VersionInfoRequired = La versión es necesaria en la declaración XML. - SpaceRequiredBeforeVersionInXMLDecl = Es necesario un espacio en blanco antes del pseudo atributo version en la declaración XML. - SpaceRequiredBeforeEncodingInXMLDecl = Es necesario un espacio en blanco antes del pseudo atributo encoding en la declaración XML. - SpaceRequiredBeforeStandalone = Es necesario un espacio en blanco antes del pseudo atributo encoding en la declaración XML. - MarkupNotRecognizedInProlog = El marcador en el documento que precede al elemento raíz debe tener el formato correcto. - MarkupNotRecognizedInMisc = El marcador en el documento que aparece tras el elemento raíz debe tener el formato correcto. - AlreadySeenDoctype = Tipo de documento ya consultado. - DoctypeNotAllowed = DOCTYPE no está permitido cuando la función "http://apache.org/xml/features/disallow-doctype-decl" se ha definido en true. - ContentIllegalInProlog = El contenido no está permitido en el prólogo. - ReferenceIllegalInProlog = La referencia no está permitida en el prólogo. -# Trailing Misc - ContentIllegalInTrailingMisc=El contenido no está permitido en la sección final. - ReferenceIllegalInTrailingMisc=La referencia no está permitida en la sección final. - -# 2.9 Standalone Document Declaration - SDDeclInvalid = El valor de declaración del documento autónomo debe ser "yes" o "no", pero nunca "{0}". - SDDeclNameInvalid = Puede que el nombre autónomo de la declaración XML esté mal escrito. -# 2.12 Language Identification - XMLLangInvalid = El valor del atributo xml:lang "{0}" es un identificador de idioma no válido. -# 3. Logical Structures - ETagRequired = El tipo de elemento "{0}" debe finalizar por la etiqueta final coincidente "". -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ElementUnterminated = El tipo de elemento "{0}" debe ir seguido de una de estas especificaciones de atributo: ">" o "/>". - EqRequiredInAttribute = El nombre de atributo "{1}" asociado a un tipo de elemento "{0}" debe ir seguido del carácter '' = ''. - OpenQuoteExpected = Las comillas de apertura se deben utilizar para el atributo "{1}" asociado a un tipo de elemento "{0}". - CloseQuoteExpected = Las comillas de cierre se deben utilizar para el atributo "{1}" asociado a un tipo de elemento "{0}". - AttributeNotUnique = El atributo "{1}" ya se ha especificado para el elemento "{0}". - AttributeNSNotUnique = El atributo "{1}" enlazado al espacio de nombres "{2}" ya se ha especificado para el elemento "{0}". - ETagUnterminated = La etiqueta final para el tipo de elemento "{0}" debe finalizar en un delimitador ''>''. - MarkupNotRecognizedInContent = El contenido de los elementos debe constar de marcadores o datos de carácter con un formato correcto. - DoctypeIllegalInContent = No se permite un DOCTYPE en el contenido. -# 4.1 Character and Entity References - ReferenceUnterminated = La referencia debe finalizar con un delimitador ';'. -# 4.3.2 Well-Formed Parsed Entities - ReferenceNotInOneEntity = La referencia debe incluirse totalmente en la misma entidad analizada. - ElementEntityMismatch = El elemento "{0}" debe empezar y finalizar en la misma entidad. - MarkupEntityMismatch=Las estructuras del documento XML deben empezar y finalizar en la misma entidad. - -# Messages common to Document and DTD -# 2.2 Characters - InvalidCharInAttValue = Se ha encontrado un carácter XML (Unicode: 0x{2}) no válido en el valor del atributo "{1}" y el elemento es "{0}". - InvalidCharInComment = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en el comentario. - InvalidCharInPI = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en la instrucción de procesamiento. - InvalidCharInInternalSubset = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en el subconjunto interno del DTD. - InvalidCharInTextDecl = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en la declaración de texto. -# 2.3 Common Syntactic Constructs - QuoteRequiredInAttValue = El valor del atributo "{1}" debe empezar por un carácter de comillas dobles o simples. - LessthanInAttValue = El valor del atributo "{1}" asociado a un tipo de elemento "{0}" no debe contener el carácter ''<''. - AttributeValueUnterminated = El valor para el atributo "{1}" debe finalizar en un carácter de comillas coincidentes. -# 2.5 Comments - InvalidCommentStart = El comentario debe empezar por "". - COMMENT_NOT_IN_ONE_ENTITY = El comentario no está incluido en la misma entidad. -# 2.6 Processing Instructions - PITargetRequired = La instrucción de procesamiento debe empezar por el nombre del destino. - SpaceRequiredInPI = Es necesario un espacio en blanco entre el destino de la instrucción de procesamiento y los datos. - PIUnterminated = La instrucción de procesamiento debe finalizar en "?>". - ReservedPITarget = El destino de la instrucción de procesamiento que coincide con "[xX][mM][lL]" no está permitido. - PI_NOT_IN_ONE_ENTITY = La instrucción de procesamiento no está incluida en la misma entidad. -# 2.8 Prolog and Document Type Declaration - VersionInfoInvalid = Versión no válida "{0}". - VersionNotSupported = La versión XML "{0}" no está soportada, sólo la versión XML 1.0 está soportada. - VersionNotSupported11 = La versión XML "{0}" no está soportada, sólo las versiones XML 1.0 y XML 1.1 están soportadas. - VersionMismatch= Una entidad no puede incluir otra entidad de una versión posterior. -# 4.1 Character and Entity References - DigitRequiredInCharRef = Una representación decimal debe aparecer inmediatamente después de "&#" en una referencia de caracteres. - HexdigitRequiredInCharRef = Una representación hexadecimal debe aparecer inmediatamente después de "&#" en una referencia de caracteres. - SemicolonRequiredInCharRef = La referencia de caracteres debe finalizar en el delimitador ';'. - InvalidCharRef = La referencia de caracteres "&#{0}" es un carácter XML no válido. - NameRequiredInReference = El nombre de la entidad debe aparecer inmediatamente después de '&' en la referencia de entidades. - SemicolonRequiredInReference = La referencia a la entidad "{0}" debe finalizar en el delimitador '';''. -# 4.3.1 The Text Declaration - TextDeclMustBeFirst = La declaración de texto sólo puede aparecer al principio de la entidad analizada externa. - EqRequiredInTextDecl = El carácter '' = '' debe aparecer después de "{0}" en la declaración de texto. - QuoteRequiredInTextDecl = El valor después de "{0}" en la declaración de texto debe ser una cadena con comillas. - CloseQuoteMissingInTextDecl = Faltan las comillas de cierre en el valor después de "{0}" en la declaración de texto. - SpaceRequiredBeforeVersionInTextDecl = Es necesario un espacio en blanco antes del pseudo atributo version en la declaración de texto. - SpaceRequiredBeforeEncodingInTextDecl = Es necesario un espacio en blanco antes del pseudo atributo encoding en la declaración de texto. - TextDeclUnterminated = La declaración de texto debe finalizar en "?>". - EncodingDeclRequired = La declaración de codificación es necesaria en la declaración de texto. - NoMorePseudoAttributes = No se permiten más pseudo atributos. - MorePseudoAttributes = Se esperan más pseudo atributos. - PseudoAttrNameExpected = Se espera el nombre de un pseudo atributo. -# 4.3.2 Well-Formed Parsed Entities - CommentNotInOneEntity = El comentario debe incluirse totalmente en la misma entidad analizada. - PINotInOneEntity = La instrucción de procesamiento debe incluirse totalmente en la misma entidad analizada. -# 4.3.3 Character Encoding in Entities - EncodingDeclInvalid = Nombre de codificación no válido "{0}". - EncodingByteOrderUnsupported = El orden de bytes proporcionado para la codificación "{0}" no está soportado. - InvalidByte = Byte no válido {0} de la secuencia UTF-8 de {1} bytes - ExpectedByte = Byte esperado {0} de la secuencia UTF-8 de {1} bytes. - InvalidHighSurrogate = Los bits de sustitución superior en la secuencia UTF-8 no deben exceder 0x10 pero se han encontrado 0x{0}. - OperationNotSupported = La operación "{0}" no está soportada por el lector {1}. - InvalidASCII = El byte "{0}"no es un miembro del juego de caracteres ASCII (7 bits). - CharConversionFailure = Una entidad con una codificación determinada no debe contener secuencias no permitidas en dicha codificación. - -# DTD Messages -# 2.2 Characters - InvalidCharInEntityValue = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en el valor de entidad literal. - InvalidCharInExternalSubset = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en el subjuego externo del DTD. - InvalidCharInIgnoreSect = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en la sección condicional excluida. - InvalidCharInPublicID = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en el identificador público. - InvalidCharInSystemID = Se ha encontrado un carácter XML (Unicode: 0x{0}) no válido en el identificador del sistema. -# 2.3 Common Syntactic Constructs - SpaceRequiredAfterSYSTEM = Es necesario un espacio en blanco después de la palabra clave SYSTEM en la declaración DOCTYPE. - QuoteRequiredInSystemID = El identificador del sistema debe empezar por un carácter de comillas dobles o simples. - SystemIDUnterminated = El identificador del sistema debe finalizar en un carácter de comillas coincidente. - SpaceRequiredAfterPUBLIC = Son necesarios espacios en blanco después de la palabra clave PUBLIC en la declaración DOCTYPE. - QuoteRequiredInPublicID = El identificador público debe empezar por un carácter de comillas dobles o simples. - PublicIDUnterminated = El identificador público debe finalizar en un carácter de comillas coincidente. - PubidCharIllegal = El carácter (Unicode: 0x{0}) no está permitido en el identificador público. - SpaceRequiredBetweenPublicAndSystem = Son necesarios espacios en blanco entre publicId y systemId. -# 2.8 Prolog and Document Type Declaration - MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Es necesario un espacio en blanco después de "''. - DoctypedeclNotClosed = La declaración de tipo de documento para el tipo de elemento raíz "{0}" debe finalizar en '']''. - PEReferenceWithinMarkup = La referencia de entidad del parámetro "%{0};" no puede producirse en el marcador en el subconjunto interno del DTD. - MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Las declaraciones de marcador que se incluyen o a las que apunta la declaración de tipo de documento deben tener el formato correcto. -# 2.10 White Space Handling - MSG_XML_SPACE_DECLARATION_ILLEGAL = La declaración de atributo para "xml:space" debe ofrecerse como un tipo enumerado cuyos únicos valores posibles son "default" y "preserve". -# 3.2 Element Type Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Es necesario un espacio en blanco después de "''. -# 3.2.1 Element Content - MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un carácter ''('' o un tipo de elemento es necesario en la declaración de tipo de elemento "{0}". - MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un carácter '')'' es necesario en la declaración de tipo de elemento "{0}". -# 3.2.2 Mixed Content - MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un tipo de elemento es necesario en la declaración de tipo de elemento "{0}". - MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un carácter '')'' es necesario en la declaración de tipo de elemento "{0}". - MixedContentUnterminated = El modelo de contenido mixto "{0}" debe finalizar en ")*" cuando los tipos de elementos secundarios están restringidos. -# 3.3 Attribute-List Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Es necesario un espacio en blanco después de "". - IgnoreSectUnterminated = La sección condicional excluida debe finalizar en "]]>". -# 4.1 Character and Entity References - NameRequiredInPEReference = El nombre de la entidad debe aparecer inmediatamente después de '%' en la referencia de entidad de parámetro. - SemicolonRequiredInPEReference = La referencia de entidad de parámetro "%{0};" debe finalizar en el delimitador '';''. -# 4.2 Entity Declarations - MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Es necesario un espacio en blanco después de "''. - MSG_DUPLICATE_ENTITY_DEFINITION = La entidad "{0}" se ha declarado más de una vez. -# 4.2.2 External Entities - ExternalIDRequired = La declaración de entidad externa debe empezar por "SYSTEM" o "PUBLIC". - MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre "PUBLIC" y el identificador público. - MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre el identificador público y el identificador del sistema. - MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre "SYSTEM" y el identificador del sistema. - MSG_URI_FRAGMENT_IN_SYSTEMID = No se debe especificar el identificador del fragmento como parte del identificador del sistema "{0}". -# 4.7 Notation Declarations - MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Es necesario un espacio en blanco después de "''. - -# Validation messages - DuplicateTypeInMixedContent = El tipo de elemento "{1}" ya se especificó en el modelo de contenido de la declaración de elementos "{0}". - ENTITIESInvalid = El valor de atributo "{1}" del tipo ENTITIES debe ser el nombre de una o más entidades no analizadas. - ENTITYInvalid = El valor de atributo "{1}" del tipo ENTITY debe ser el nombre de una entidad no analizada. - IDDefaultTypeInvalid = El atributo de identificador "{0}" debe tener un valor por defecto declarado de "#IMPLIED" o "#REQUIRED". - IDInvalid = El valor de atributo "{0}" del tipo ID debe ser un nombre. - IDInvalidWithNamespaces = El valor de atributo "{0}" del tipo ID debe ser un NCName cuando los espacios de nombres estén activados. - IDNotUnique = El valor de atributo "{0}" del tipo ID debe ser único en el documento. - IDREFInvalid = El valor de atributo "{0}" del tipo IDREF debe ser un nombre. - IDREFInvalidWithNamespaces = El valor de atributo "{0}" del tipo IDREF debe ser un NCName cuando los espacios de nombres estén activados. - IDREFSInvalid = El valor de atributo "{0}" del tipo IDREFS debe ser uno o más nombres. - ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = El texto de sustitución de la entidad del parámetro "{0}" debe incluir declaraciones correctamente anidadas cuando la referencia de entidad se utiliza como una declaración completa. - ImproperDeclarationNesting = El texto de sustitución de la entidad del parámetro "{0}" debe incluir declaraciones correctamente anidadas. - ImproperGroupNesting = El texto de sustitución de la entidad del parámetro "{0}" debe incluir pares de paréntesis correctamente anidados. - INVALID_PE_IN_CONDITIONAL = El texto de sustitución de la entidad del parámetro "{0}" debe incluir la sección condicional completa o sólo INCLUDE o IGNORE. - MSG_ATTRIBUTE_NOT_DECLARED = El atributo "{1}" se debe haber declarado para el tipo de elemento "{0}". - MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = El atributo "{0}" con el valor "{1}" debe tener un valor de la lista "{2}". - MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = El valor "{1}" del atributo "{0}" no se debe cambiar mediante la normalización (a "{2}") en un documento autónomo. - MSG_CONTENT_INCOMPLETE = El contenido del tipo de elemento "{0}" es incompleto, debe coincidir con "{1}". - MSG_CONTENT_INVALID = El contenido del tipo de elemento "{0}" debe coincidir con "{1}". - MSG_CONTENT_INVALID_SPECIFIED = El contenido del tipo de elemento "{0}" debe coincidir con "{1}". Los secundarios del tipo "{2}" no están permitidos. - MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = El atributo "{1}" para el tipo de elemento "{0}" tiene un valor por defecto y debe especificarse en un documento autónomo. - MSG_DUPLICATE_ATTDEF = El atributo "{1}" ya se ha declarado para el tipo de elemento "{0}". - MSG_ELEMENT_ALREADY_DECLARED = El tipo de elemento "{0}" no debe declararse más de una vez. - MSG_ELEMENT_NOT_DECLARED = El tipo de elemento "{0}" debe declararse. - MSG_GRAMMAR_NOT_FOUND = El documento no es válido: no se ha encontrado la gramática. - MSG_ELEMENT_WITH_ID_REQUIRED = Un elemento con el identificador "{0}" debe aparecer en el documento. - MSG_EXTERNAL_ENTITY_NOT_PERMITTED = La referencia a la entidad externa "{0}" no está permitida en un documento autónomo. - MSG_FIXED_ATTVALUE_INVALID = El atributo "{1}" con el valor "{2}" debe tener un valor de "{3}". - MSG_MORE_THAN_ONE_ID_ATTRIBUTE = El tipo de elemento "{0}" ya tiene un atributo "{1}" del tipo ID, un segundo atributo "{2}" del tipo ID no está permitido. - MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = El tipo de elemento "{0}" ya tiene un atributo "{1}" del tipo NOTATION, un segundo atributo "{2}" del tipo NOTATION no está permitido. - MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notación "{1}" debe declararse cuando se hace referencia a la misma en la lista de tipos de notación para el atributo "{0}". - MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notación "{1}" debe declararse cuando se hace referencia a la misma en la declaración de entidad no analizada para "{0}". - MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = La referencia a la entidad "{0}" declarada en una entidad analizada externa no está permitida en un documento autónomo. - MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = El atributo "{1}" es necesario y debe especificarse para el tipo de elemento "{0}". - MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = No debe incluirse un espacio en blanco entre los elementos declarados en una entidad analizada externa con el contenido del elemento en un documento autónomo. - NMTOKENInvalid = El valor de atributo "{0}" del tipo NMTOKEN debe ser un token de nombre. - NMTOKENSInvalid = El valor de atributo "{0}" del tipo NMTOKENS debe ser uno o más tokens de nombre. - NoNotationOnEmptyElement = El tipo de elemento "{0}" que se declaró como EMPTY no puede declarar el atributo "{1}" del tipo NOTATION. - RootElementTypeMustMatchDoctypedecl = El elemento raíz del documento "{1}", debe coincidir con la raíz DOCTYPE "{0}". - UndeclaredElementInContentSpec = El modelo de contenido del elemento "{0}" hace referencia al elemento no declarado "{1}". - UniqueNotationName = La declaración de la notación "{0}" no es única. Un nombre determinado no debe declararse en más de una declaración de notación. - ENTITYFailedInitializeGrammar = Fallo del validador ENTITYDatatype. Es necesario llamar al método de inicialización con una referencia de gramática válida. \t - ENTITYNotUnparsed = ENTITY "{0}"no está sin analizar. - ENTITYNotValid = ENTITY "{0}" no es válida. - EmptyList = El valor de tipo ENTITIES, IDREFS y NMTOKENS no puede ser una lista vacía. - -# Entity related messages -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ReferenceToExternalEntity = La referencia de entidad externa "&{0};" no está permitida en un valor de atributo. - AccessExternalDTD = DTD externa: fallo al leer DTD externa ''{0}'' porque el acceso a ''{1}'' no está permitido debido a una restricción que ha definido la propiedad accessExternalDTD. - AccessExternalEntity = Entidad externa: fallo al leer el documento externo ''{0}'' porque el acceso a ''{1}'' no está permitido debido a una restricción que ha definido la propiedad accessExternalDTD. - -# 4.1 Character and Entity References - EntityNotDeclared = Se hizo referencia a la entidad "{0}", pero no se declaró. - ReferenceToUnparsedEntity = La referencia de entidad no analizada "&{0};" no está permitida. - RecursiveReference = Referencia de entidad recursiva "{0}". (Ruta de acceso de referencia: {1}), - RecursiveGeneralReference = Referencia de entidad general recursiva "&{0};". (Ruta de acceso de referencia: {1}), - RecursivePEReference = Referencia de entidad de parámetro recursiva "%{0};". (Ruta de acceso de referencia: {1}), -# 4.3.3 Character Encoding in Entities - EncodingNotSupported = La codificación "{0}" no está soportada. - EncodingRequired = Una entidad analizada no codificada en UTF-8 o UTF-16 debe contener una declaración de codificación. - -# Namespaces support -# 4. Using Qualified Names - IllegalQName = El elemento o el atributo no coinciden con la producción del QName: QName::=(NCName':')?NCName. - ElementXMLNSPrefix = El elemento "{0}" no puede tener "xmlns" como prefijo. - ElementPrefixUnbound = El prefijo "{0}" para el elemento "{1}" no está enlazado. - AttributePrefixUnbound = El prefijo "{2}" para el atributo "{1}" asociado a un tipo de elemento "{0}" no está enlazado. - EmptyPrefixedAttName = El valor del atributo "{0}" no es válido. Los enlaces de espacio de nombres utilizados de prefijo no pueden estar vacíos. - PrefixDeclared = El prefijo de espacio de nombres "{0}" no se ha declarado. - CantBindXMLNS = El prefijo "xmlns" no puede enlazarse a ningún espacio de nombres explícitamente; tampoco puede enlazarse el espacio de nombres para "xmlns" a cualquier prefijo explícitamente. - CantBindXML = El prefijo "xml" no puede enlazarse a ningún espacio de nombres que no sea el habitual; tampoco puede enlazarse el espacio de nombres para "xml" a cualquier prefijo que no sea "xml". - MSG_ATT_DEFAULT_INVALID = El valor por defecto "{1}" del atributo "{0}" no es legal para las restricciones léxicas de este tipo de atributo. - -# REVISIT: These need messages - MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID - OpenQuoteMissingInDecl=OpenQuoteMissingInDecl - InvalidCharInLiteral=InvalidCharInLiteral - - -# Implementation limits - EntityExpansionLimit=JAXP00010001: el analizador ha encontrado más de "{0}"ampliaciones de entidad en este documento; éste es el límite impuesto por el JDK. - ElementAttributeLimit=JAXP00010002: el elemento "{0}" tiene más de "{1}" atributos, "{1}" es el límite impuesto por el JDK. - MaxEntitySizeLimit=JAXP00010003: la longitud de la entidad "{0}" es "{1}", que excede el límite de "{2}" que ha definido "{3}". - TotalEntitySizeLimit=JAXP00010004: el tamaño acumulado de las entidades es "{0}" y excede el límite de "{1}" definido por "{2}". - MaxXMLNameLimit=JAXP00010005: la longitud de la entidad "{0}" es "{1}" y excede el límite de "{2}" definido por "{3}". - MaxElementDepthLimit=JAXP00010006: El elemento "{0}" tiene una profundidad de "{1}" que excede el límite "{2}" definido por "{3}". - EntityReplacementLimit=JAXP00010007: El número total de nodos en las referencias de entidad es de "{0}" que supera el límite de "{1}" definido por "{2}". - -# Catalog 09 -# Technical term, do not translate: catalog - CatalogException=JAXP00090001: CatalogResolver está activado con el catálogo "{0}", pero se ha devuelto una excepción CatalogException. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties deleted file mode 100644 index a47daba87f0..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties +++ /dev/null @@ -1,308 +0,0 @@ -# This file contains error and warning messages related to XML -# The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version - - BadMessageKey = Le message d'erreur correspondant à la clé de message est introuvable. - FormatFailed = Une erreur interne s'est produite pendant la mise en forme du message suivant :\n - -# Document messages - PrematureEOF=Fin prématurée du fichier. -# 2.1 Well-Formed XML Documents - RootElementRequired = L'élément racine est obligatoire dans un document au format correct. -# 2.2 Characters - - InvalidCharInCDSect = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans la section CDATA. - InvalidCharInContent = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans le contenu d''élément du document. - TwoColonsInQName = Un deuxième ":" non valide a été détecté dans le type d'élément ou le nom d'attribut. - ColonNotLegalWithNS = Les deux-points ne sont pas autorisés dans le nom ''{0}'' lorsque les espaces de noms sont activés. - InvalidCharInMisc = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans le balisage après la fin du contenu d''élément. - InvalidCharInProlog = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans le prologue du document. - InvalidCharInXMLDecl = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans la déclaration XML. -# 2.4 Character Data and Markup - CDEndInContent = La séquence de caractères "]]>" ne doit pas figurer dans le contenu sauf si elle est utilisée pour baliser la fin d'une section CDATA. -# 2.7 CDATA Sections - CDSectUnterminated = La section CDATA doit se terminer par "]]>". -# 2.8 Prolog and Document Type Declaration - XMLDeclMustBeFirst = La déclaration XML ne peut figurer qu'au début du document. - EqRequiredInXMLDecl = Le caractère ''='' doit suivre "{0}" dans la déclaration XML. - QuoteRequiredInXMLDecl = La valeur suivant "{0}" dans la déclaration XML doit être une chaîne entre guillemets. - XMLDeclUnterminated = La déclaration XML doit se terminer par "?>". - VersionInfoRequired = La version est obligatoire dans la déclaration XML. - SpaceRequiredBeforeVersionInXMLDecl = Un espace est obligatoire devant le pseudo-attribut version dans la déclaration XML. - SpaceRequiredBeforeEncodingInXMLDecl = Un espace est obligatoire devant le pseudo-attribut encoding dans la déclaration XML. - SpaceRequiredBeforeStandalone = Un espace est obligatoire devant le pseudo-attribut encoding dans la déclaration XML. - MarkupNotRecognizedInProlog = Le balisage du document précédant l'élément racine doit avoir un format correct. - MarkupNotRecognizedInMisc = Le balisage du document suivant l'élément racine doit avoir un format correct. - AlreadySeenDoctype = DOCTYPE déjà vu. - DoctypeNotAllowed = DOCTYPE n'est pas autorisé lorsque la fonctionnalité "http://apache.org/xml/features/disallow-doctype-decl" est définie sur True. - ContentIllegalInProlog = Contenu non autorisé dans le prologue. - ReferenceIllegalInProlog = Référence non autorisée dans le prologue. -# Trailing Misc - ContentIllegalInTrailingMisc=Contenu non autorisé dans la section de fin. - ReferenceIllegalInTrailingMisc=Référence non autorisée dans la section de fin. - -# 2.9 Standalone Document Declaration - SDDeclInvalid = La valeur de déclaration de document autonome doit être "oui" ou "non", mais pas "{0}". - SDDeclNameInvalid = Le nom de document autonome contenu dans la déclaration XML est peut-être mal orthographié. -# 2.12 Language Identification - XMLLangInvalid = La valeur d''attribut xml:lang "{0}" est un identificateur de langue non valide. -# 3. Logical Structures - ETagRequired = Le type d''élément "{0}" doit se terminer par la balise de fin correspondante "". -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ElementUnterminated = Le type d''élément "{0}" doit être suivi des spécifications d''attribut, ">" ou "/>". - EqRequiredInAttribute = Le nom d''attribut "{1}" associé à un type d''élément "{0}" doit être suivi du caractère ''=''. - OpenQuoteExpected = Des guillemets ouvrants sont attendus pour l''attribut "{1}" associé à un type d''élément "{0}". - CloseQuoteExpected = Des guillemets fermants sont attendus pour l''attribut "{1}" associé à un type d''élément "{0}". - AttributeNotUnique = L''attribut "{1}" a déjà été spécifié pour l''élément "{0}". - AttributeNSNotUnique = L''attribut "{1}" lié à l''espace de noms "{2}" a déjà été spécifié pour l''élément "{0}". - ETagUnterminated = La balise de fin pour le type d''élément "{0}" doit se terminer par un délimiteur ''>''. - MarkupNotRecognizedInContent = Le contenu des éléments doit inclure un balisage ou des caractères au format correct. - DoctypeIllegalInContent = Un DOCTYPE n'est pas autorisé dans le contenu. -# 4.1 Character and Entity References - ReferenceUnterminated = La référence doit se terminer par un délimiteur ';'. -# 4.3.2 Well-Formed Parsed Entities - ReferenceNotInOneEntity = La référence doit être entièrement incluse dans la même entité analysée. - ElementEntityMismatch = L''élément "{0}" doit commencer et se terminer dans la même entité. - MarkupEntityMismatch=Les structures de document XML doivent commencer et se terminer dans la même entité. - -# Messages common to Document and DTD -# 2.2 Characters - InvalidCharInAttValue = Un caractère XML non valide (Unicode : 0x{2}) a été détecté dans la valeur de l''attribut "{1}" et l''élément est "{0}". - InvalidCharInComment = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans le commentaire. - InvalidCharInPI = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans l''instruction de traitement. - InvalidCharInInternalSubset = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans le sous-ensemble interne de la DTD. - InvalidCharInTextDecl = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans la déclaration textuelle. -# 2.3 Common Syntactic Constructs - QuoteRequiredInAttValue = La valeur de l''attribut "{1}" doit commencer par une apostrophe ou des guillemets. - LessthanInAttValue = La valeur de l''attribut "{1}" associé à un type d''élément "{0}" ne doit pas contenir le caractère ''<''. - AttributeValueUnterminated = La valeur de l''attribut "{1}" doit se terminer par les guillemets correspondants. -# 2.5 Comments - InvalidCommentStart = Le commentaire doit commencer par "". - COMMENT_NOT_IN_ONE_ENTITY = Le commentaire n'est pas compris dans la même entité. -# 2.6 Processing Instructions - PITargetRequired = L'instruction de traitement doit commencer par le nom de la cible. - SpaceRequiredInPI = Un espace est obligatoire entre les données et la cible de l'instruction de traitement. - PIUnterminated = L'instruction de traitement doit se terminer par "?>". - ReservedPITarget = La cible de l'instruction de traitement correspondant à "[xX][mM][lL]" n'est pas autorisée. - PI_NOT_IN_ONE_ENTITY = L'instruction de traitement n'est pas comprise dans la même entité. -# 2.8 Prolog and Document Type Declaration - VersionInfoInvalid = Version "{0}" non valide. - VersionNotSupported = La version XML "{0}" n''est pas prise en charge. Seule la version XML 1.0 est prise en charge. - VersionNotSupported11 = La version XML "{0}" n''est pas prise en charge. Seules les versions XML 1.0 et XML 1.1 sont prises en charge. - VersionMismatch= Une entité ne peut pas inclure une autre entité d'une version ultérieure. -# 4.1 Character and Entity References - DigitRequiredInCharRef = Une représentation décimale doit immédiatement suivre la chaîne "&#" dans une référence de caractère. - HexdigitRequiredInCharRef = Une représentation hexadécimale doit immédiatement suivre la chaîne "&#x" dans une référence de caractère. - SemicolonRequiredInCharRef = La référence de caractère doit se terminer par le délimiteur ';'. - InvalidCharRef = La référence de caractère "&#{0}" est un caractère XML non valide. - NameRequiredInReference = Le nom de l'identité doit immédiatement suivre le caractère "&" dans la référence d'entité. - SemicolonRequiredInReference = La référence à l''entité "{0}" doit se terminer par le délimiteur '';''. -# 4.3.1 The Text Declaration - TextDeclMustBeFirst = La déclaration textuelle ne doit figurer qu'au début de l'entité analysée externe. - EqRequiredInTextDecl = Le caractère ''='' doit suivre "{0}" dans la déclaration textuelle. - QuoteRequiredInTextDecl = La valeur suivant "{0}" dans la déclaration textuelle doit être une chaîne entre guillemets. - CloseQuoteMissingInTextDecl = Dans la valeur suivant "{0}" dans la déclaration textuelle, il manque les guillemets fermants. - SpaceRequiredBeforeVersionInTextDecl = Un espace est obligatoire devant le pseudo-attribut version dans la déclaration textuelle. - SpaceRequiredBeforeEncodingInTextDecl = Un espace est obligatoire devant le pseudo-attribut encoding dans la déclaration textuelle. - TextDeclUnterminated = La déclaration textuelle doit se terminer par "?>". - EncodingDeclRequired = La déclaration d'encodage est obligatoire dans la déclaration textuelle. - NoMorePseudoAttributes = Aucun autre pseudo-attribut n'est autorisé. - MorePseudoAttributes = D'autres pseudo-attributs sont attendus. - PseudoAttrNameExpected = Un nom de pseudo-attribut est attendu. -# 4.3.2 Well-Formed Parsed Entities - CommentNotInOneEntity = Le commentaire doit être entièrement inclus dans la même entité analysée. - PINotInOneEntity = L'instruction de traitement doit être entièrement incluse dans la même entité analysée. -# 4.3.3 Character Encoding in Entities - EncodingDeclInvalid = Nom d''encodage "{0}" non valide. - EncodingByteOrderUnsupported = L''ordre des octets donné pour encoder "{0}" n''est pas pris en charge. - InvalidByte = Octet {0} de la séquence UTF-8 à {1} octets non valide. - ExpectedByte = Octet {0} de la séquence UTF-8 à {1} octets attendu. - InvalidHighSurrogate = Les bits de substitution supérieurs (High surrogate) dans la séquence UTF-8 ne doivent pas dépasser 0x10 mais des bits 0x{0} ont été détectés. - OperationNotSupported = Opération "{0}" non prise en charge par le lecteur {1}. - InvalidASCII = L''octet "{0}" n''appartient pas au jeu de caractères ASCII (7 bits). - CharConversionFailure = Une entité respectant un certain encodage ne doit pas contenir de séquences non admises dans cet encodage. - -# DTD Messages -# 2.2 Characters - InvalidCharInEntityValue = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans la valeur d''entité littérale. - InvalidCharInExternalSubset = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans le sous-ensemble externe de la DTD. - InvalidCharInIgnoreSect = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans la section conditionnelle exclue. - InvalidCharInPublicID = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans l''identificateur public. - InvalidCharInSystemID = Un caractère XML non valide (Unicode : 0x{0}) a été détecté dans l''identificateur système. -# 2.3 Common Syntactic Constructs - SpaceRequiredAfterSYSTEM = Un espace est obligatoire après le mot-clé SYSTEM dans la déclaration DOCTYPE. - QuoteRequiredInSystemID = L'identificateur système doit commencer par une apostrophe ou des guillemets. - SystemIDUnterminated = L'identificateur système doit se terminer par les guillemets correspondants. - SpaceRequiredAfterPUBLIC = Un espace est obligatoire après le mot-clé PUBLIC dans la déclaration DOCTYPE. - QuoteRequiredInPublicID = L'identificateur public doit commencer par une apostrophe ou des guillemets. - PublicIDUnterminated = L'identificateur public doit se terminer par les guillemets correspondants. - PubidCharIllegal = Ce caractère (Unicode : 0x{0}) n''est pas autorisé dans l''identificateur public. - SpaceRequiredBetweenPublicAndSystem = Des espaces sont obligatoires entre les ID publicId et systemId. -# 2.8 Prolog and Document Type Declaration - MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Un espace est obligatoire après "''. - DoctypedeclNotClosed = La déclaration de type de document pour le type d''élément racine "{0}" doit se terminer par '']''. - PEReferenceWithinMarkup = La référence d''entité de paramètre "%{0};" ne peut pas survenir dans le balisage du sous-ensemble interne de la DTD. - MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Les déclarations de balisage contenues dans la déclaration de type de document ou sur lesquelles pointe cette dernière doivent avoir un format correct. -# 2.10 White Space Handling - MSG_XML_SPACE_DECLARATION_ILLEGAL = La déclaration d'attribut pour "xml:space" doit être présentée comme type énuméré dont les seules valeurs possibles sont "default" et "preserve". -# 3.2 Element Type Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Un espace est obligatoire après "''. -# 3.2.1 Element Content - MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un caractère ''('' ou un type d''élément est obligatoire dans la déclaration du type d''élément "{0}". - MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un caractère '')'' est obligatoire dans la déclaration du type d''élément "{0}". -# 3.2.2 Mixed Content - MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un type d''élément est obligatoire dans la déclaration du type d''élément "{0}". - MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un caractère '')'' est obligatoire dans la déclaration du type d''élément "{0}". - MixedContentUnterminated = Le modèle de contenu mixte "{0}" doit se terminer par ")*" lorsque les types d''élément enfant sont contraints. -# 3.3 Attribute-List Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Un espace est obligatoire après "". - IgnoreSectUnterminated = La section conditionnelle exclue doit se terminer par "]]>". -# 4.1 Character and Entity References - NameRequiredInPEReference = Le nom de l'entité doit immédiatement suivre le caractère "%" dans la référence d'entité de paramètre. - SemicolonRequiredInPEReference = La référence d''entité de paramètre "%{0};" doit se terminer par le délimiteur '';''. -# 4.2 Entity Declarations - MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Un espace est obligatoire après "''. - MSG_DUPLICATE_ENTITY_DEFINITION = L''entité "{0}" est déclarée plusieurs fois. -# 4.2.2 External Entities - ExternalIDRequired = La déclaration d'entité externe doit commencer par "SYSTEM" ou "PUBLIC". - MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Un espace est obligatoire entre "PUBLIC" et l'identificateur public. - MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Un espace est obligatoire entre l'identificateur public et l'identificateur système. - MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Un espace est obligatoire entre "SYSTEM" et l'identificateur système. - MSG_URI_FRAGMENT_IN_SYSTEMID = L''identificateur du fragment ne doit pas être spécifié comme faisant partie de l''identificateur système "{0}". -# 4.7 Notation Declarations - MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Un espace est obligatoire après "''. - -# Validation messages - DuplicateTypeInMixedContent = Le type d''élément "{1}" a déjà été spécifié dans le modèle de contenu de la déclaration d''élément "{0}". - ENTITIESInvalid = La valeur d''attribut "{1}" de type ENTITIES doit correspondre au nom d''au moins une entité non analysée. - ENTITYInvalid = La valeur d''attribut "{1}" de type ENTITY doit correspondre au nom d''une entité non analysée. - IDDefaultTypeInvalid = L''attribut d''ID "{0}" doit avoir une valeur par défaut déclarée de "#IMPLIED" ou "#REQUIRED". - IDInvalid = La valeur d''attribut "{0}" de type ID doit être un nom. - IDInvalidWithNamespaces = La valeur d''attribut "{0}" de type ID doit être un NCName lorsque les espaces de noms sont activés. - IDNotUnique = La valeur d''attribut "{0}" de type ID doit être unique dans le document. - IDREFInvalid = La valeur d''attribut "{0}" de type IDREF doit être un nom. - IDREFInvalidWithNamespaces = La valeur d''attribut "{0}" de type IDREF doit être un NCName lorsque les espaces de noms sont activés. - IDREFSInvalid = Une valeur d''attribut "{0}" de type IDREFS doit correspondre à au moins un nom. - ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Le texte de remplacement de l''entité de paramètre "{0}" doit inclure des déclarations correctement imbriquées lorsque la référence d''entité est utilisée comme déclaration complète. - ImproperDeclarationNesting = Le texte de remplacement de l''entité de paramètre "{0}" doit inclure des déclarations correctement imbriquées. - ImproperGroupNesting = Le texte de remplacement de l''entité de paramètre "{0}" doit inclure des paires de parenthèses correctement imbriquées. - INVALID_PE_IN_CONDITIONAL = Le texte de remplacement de l''entité de paramètre "{0}" doit inclure la section conditionnelle complète ou seulement INCLUDE ou IGNORE. - MSG_ATTRIBUTE_NOT_DECLARED = L''attribut "{1}" doit être déclaré pour le type d''élément "{0}". - MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = L''attribut "{0}" de valeur "{1}" doit avoir une valeur issue de la liste "{2}". - MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = La valeur "{1}" de l''attribut "{0}" ne doit pas être modifiée par normalisation (et devenir "{2}") dans un document autonome. - MSG_CONTENT_INCOMPLETE = Le contenu du type d''élément "{0}" est incomplet. Il doit correspondre à "{1}". - MSG_CONTENT_INVALID = Le contenu du type d''élément "{0}" doit correspondre à "{1}". - MSG_CONTENT_INVALID_SPECIFIED = Le contenu du type d''élément "{0}" doit correspondre à "{1}". Les enfants de type "{2}" ne sont pas autorisés. - MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = L''attribut "{1}" du type d''élément "{0}" a une valeur par défaut et doit être spécifié dans un document autonome. - MSG_DUPLICATE_ATTDEF = L''attribut "{1}" est déjà déclaré pour le type d''élément "{0}". - MSG_ELEMENT_ALREADY_DECLARED = Le type d''élément "{0}" ne doit pas être déclaré plusieurs fois. - MSG_ELEMENT_NOT_DECLARED = Le type d''élément "{0}" doit être déclaré. - MSG_GRAMMAR_NOT_FOUND = Le document n'est pas valide : aucune grammaire détectée. - MSG_ELEMENT_WITH_ID_REQUIRED = Un élément avec l''identificateur "{0}" doit figurer dans le document. - MSG_EXTERNAL_ENTITY_NOT_PERMITTED = La référence à l''entité externe "{0}" n''est pas autorisée dans le document autonome. - MSG_FIXED_ATTVALUE_INVALID = L''attribut "{1}" de valeur "{2}" doit avoir une valeur de "{3}". - MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Le type d''élément "{0}" a déjà l''attribut "{1}" de type ID. Un deuxième attribut "{2}" de type ID n''est pas autorisé. - MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Le type d''élément "{0}" a déjà l''attribut "{1}" de type NOTATION. Un deuxième attribut "{2}" de type NOTATION n''est pas autorisé. - MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notation "{1}" doit être déclarée lorsqu''elle est référencée dans la liste des types de notation de l''attribut "{0}". - MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notation "{1}" doit être déclarée lorsqu''elle est référencée dans la déclaration d''entité non analysée pour "{0}". - MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = La référence à l''entité "{0}" déclarée dans une entité analysée externe n''est pas autorisée dans un document autonome. - MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = L''attribut "{1}" est obligatoire et doit être spécifié pour le type d''élément "{0}". - MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Aucun espace ne doit figurer entre les éléments déclarés dans une entité analysée externe avec le contenu des éléments dans un document autonome. - NMTOKENInvalid = La valeur d''attribut "{0}" de type NMTOKEN doit correspondre à un jeton de nom. - NMTOKENSInvalid = La valeur d''attribut "{0}" de type NMTOKENS doit correspondre à au moins un jeton de nom. - NoNotationOnEmptyElement = Le type d''élément "{0}" déclaré EMPTY ne peut pas déclarer un attribut "{1}" de type NOTATION. - RootElementTypeMustMatchDoctypedecl = L''élément racine de document "{1}" doit correspondre à la racine DOCTYPE "{0}". - UndeclaredElementInContentSpec = Le modèle de contenu de l''élément "{0}" fait référence à l''élément non déclaré "{1}". - UniqueNotationName = La déclaration de la notation "{0}" n''est pas unique. Une valeur Name donnée ne doit pas être déclarée dans plusieurs déclarations de notation. - ENTITYFailedInitializeGrammar = Valideur ENTITYDatatype : échec. Besoin d'appeler une méthode d'initialisation avec une référence de grammaire valide. \t - ENTITYNotUnparsed = La valeur ENTITY "{0}" est analysée. - ENTITYNotValid = La valeur ENTITY "{0}" n''est pas valide. - EmptyList = Une valeur de type ENTITIES, IDREFS et NMTOKENS ne peut pas correspondre à une liste vide. - -# Entity related messages -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ReferenceToExternalEntity = La référence d''entité externe "&{0};" n''est pas autorisée dans une valeur d''attribut. - AccessExternalDTD = DTD externe : échec de la lecture de la DTD externe ''{0}'', car l''accès ''{1}'' n''est pas autorisé en raison d''une restriction définie par la propriété accessExternalDTD. - AccessExternalEntity = Entité externe : échec de la lecture du document externe ''{0}'', car l''accès ''{1}'' n''est pas autorisé en raison d''une restriction définie par la propriété accessExternalDTD. - -# 4.1 Character and Entity References - EntityNotDeclared = L''entité "{0}" était référencée, mais pas déclarée. - ReferenceToUnparsedEntity = La référence d''entité non analysée "&{0};" n''est pas autorisée. - RecursiveReference = Référence d''entité récursive "{0}". (Chemin de référence : {1}), - RecursiveGeneralReference = Référence d''entité générale récursive "&{0};". (Chemin de référence : {1}), - RecursivePEReference = Référence d''entité de paramètre récursive "%{0};". (Chemin de référence : {1}), -# 4.3.3 Character Encoding in Entities - EncodingNotSupported = L''encodage "{0}" n''est pas pris en charge. - EncodingRequired = Une entité analysée sans encodage UTF-8 ou UTF-16 doit contenir une déclaration d'encodage. - -# Namespaces support -# 4. Using Qualified Names - IllegalQName = L'élément ou l'attribut ne correspond pas à la production QName : QName::=(NCName':')?NCName. - ElementXMLNSPrefix = L''élément "{0}" ne peut pas avoir "xmlns" comme préfixe. - ElementPrefixUnbound = Le préfixe "{0}" de l''élément "{1}" n''est pas lié. - AttributePrefixUnbound = Le préfixe "{2}" de l''attribut "{1}" associé à un type d''élément "{0}" n''est pas lié. - EmptyPrefixedAttName = La valeur de l''attribut "{0}" n''est pas valide. Les liaisons d''espaces de noms préfixés ne peuvent pas être vides. - PrefixDeclared = Le préfixe d''espace de noms "{0}" n''était pas déclaré. - CantBindXMLNS = Le préfixe "xmlns" ne peut pas être lié à un espace de noms de façon explicite, pas plus que l'espace de noms de "xmlns" à un préfixe quelconque. - CantBindXML = Le préfixe "xml" ne peut pas être lié à un autre espace de noms que son espace de noms habituel. L'espace de noms de "xml" ne peut pas non plus être lié à un autre préfixe que "xml". - MSG_ATT_DEFAULT_INVALID = La valeur par défaut "{1}" de l''attribut "{0}" n''est pas admise conformément aux contraintes lexicales de ce type d''attribut. - -# REVISIT: These need messages - MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID - OpenQuoteMissingInDecl=OpenQuoteMissingInDecl - InvalidCharInLiteral=InvalidCharInLiteral - - -# Implementation limits - EntityExpansionLimit=JAXP00010001 : L''analyseur a rencontré plus de "{0}" développements d''entité dans ce document. Il s''agit de la limite imposée par le JDK. - ElementAttributeLimit=JAXP00010002 : L''élément "{0}" a plus de "{1}" attributs. "{1}" est la limite imposée par le JDK. - MaxEntitySizeLimit=JAXP00010003 : La longueur de l''entité "{0}" est de "{1}". Cette valeur dépasse la limite de "{2}" définie par "{3}". - TotalEntitySizeLimit=JAXP00010004 : La taille cumulée des entités est "{0}" et dépasse la limite de "{1}" définie par "{2}". - MaxXMLNameLimit=JAXP00010005 : La longueur de l''entité "{0}" est de "{1}". Cette valeur dépasse la limite de "{2}" définie par "{3}". - MaxElementDepthLimit=JAXP00010006 : l''élément "{0}" a une profondeur de "{1}" qui dépasse la limite de "{2}" définie par "{3}". - EntityReplacementLimit=JAXP00010007 : Le nombre total de noeuds dans les références d''entité est "{0}", soit plus que la limite de "{1}" définie par "{2}". - -# Catalog 09 -# Technical term, do not translate: catalog - CatalogException=JAXP00090001 : le CatalogResolver est activé avec le catalogue "{0}", mais une exception CatalogException est renvoyée. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties deleted file mode 100644 index 7af820eb7c0..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties +++ /dev/null @@ -1,308 +0,0 @@ -# This file contains error and warning messages related to XML -# The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version - - BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. - FormatFailed = Si è verificato un errore interno durante la formattazione del seguente messaggio:\n - -# Document messages - PrematureEOF=Fine del file anticipata. -# 2.1 Well-Formed XML Documents - RootElementRequired = L'elemento radice è obbligatorio in un documento con formato corretto. -# 2.2 Characters - - InvalidCharInCDSect = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nella sezione CDATA. - InvalidCharInContent = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nel contenuto dell''elemento del documento. - TwoColonsInQName = È stato trovato un secondo carattere dei due punti (':') non valido nel tipo di elemento o nel nome attributo. - ColonNotLegalWithNS = Non sono consentiti i due punti nel nome "{0}" se sono abilitati gli spazi di nomi. - InvalidCharInMisc = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nel markup dopo la fine del contenuto dell''elemento. - InvalidCharInProlog = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nel prologo del documento. - InvalidCharInXMLDecl = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nella dichiarazione XML. -# 2.4 Character Data and Markup - CDEndInContent = La sequenza di caratteri "]]>" non deve essere presente nel contenuto a meno che non sia utilizzata per contrassegnare la fine di una sezione CDATA. -# 2.7 CDATA Sections - CDSectUnterminated = La sezione CDATA deve terminare con "]]>". -# 2.8 Prolog and Document Type Declaration - XMLDeclMustBeFirst = La dichiarazione XML può comparire solo all'inizio del documento. - EqRequiredInXMLDecl = Il carattere '' = '' deve seguire "{0}" nella dichiarazione XML. - QuoteRequiredInXMLDecl = Il valore che segue "{0}" nella dichiarazione XML deve essere una stringa compresa tra apici. - XMLDeclUnterminated = La dichiarazione XML deve terminare con "?>". - VersionInfoRequired = La versione è obbligatoria nella dichiarazione XML. - SpaceRequiredBeforeVersionInXMLDecl = È richiesto uno spazio prima dell'attributo pseudo della versione nella dichiarazione XML. - SpaceRequiredBeforeEncodingInXMLDecl = È richiesto uno spazio prima dell'attributo pseudo di codifica nella dichiarazione XML. - SpaceRequiredBeforeStandalone = È richiesto uno spazio prima dell'attributo pseudo di codifica nella dichiarazione XML. - MarkupNotRecognizedInProlog = Il markup nel documento che precede l'elemento radice deve avere un formato corretto. - MarkupNotRecognizedInMisc = Il markup nel documento che segue l'elemento radice deve avere un formato corretto. - AlreadySeenDoctype = Doctype già presente. - DoctypeNotAllowed = DOCTYPE non è consentito se la funzione "http://apache.org/xml/features/disallow-doctype-decl" è impostata su true. - ContentIllegalInProlog = Il contenuto non è consentito nel prologo. - ReferenceIllegalInProlog = Il riferimento non è consentito nel prologo. -# Trailing Misc - ContentIllegalInTrailingMisc=Il contenuto non è consentito nella sezione finale. - ReferenceIllegalInTrailingMisc=Il riferimento non è consentito nella sezione finale. - -# 2.9 Standalone Document Declaration - SDDeclInvalid = Il valore della dichiarazione del documento standalone deve essere "yes" o "no", non "{0}". - SDDeclNameInvalid = Il nome standalone nella dichiarazione XML potrebbe essere stato digitato in modo errato. -# 2.12 Language Identification - XMLLangInvalid = Il valore dell''attributo xml:lang "{0}" è un identificativo di lingua non valido. -# 3. Logical Structures - ETagRequired = Il tipo di elemento "{0}" deve terminare con la corrispondente tag finale "". -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ElementUnterminated = Il tipo di elemento "{0}" deve essere seguito dalle specifiche di attributo ">" o "/>". - EqRequiredInAttribute = Il nome attributo "{1}" associato a un tipo di elemento "{0}" deve essere seguito dal carattere '' = ''. - OpenQuoteExpected = È previsto un apice di apertura per l''attributo "{1}" associato a un tipo di elemento "{0}". - CloseQuoteExpected = È previsto un apice di chiusura per l''attributo "{1}" associato a un tipo di elemento "{0}". - AttributeNotUnique = L''attributo "{1}" è già stato specificato per l''elemento "{0}". - AttributeNSNotUnique = L''attributo "{1}" associato allo spazio di nomi "{2}" è già stato specificato per l''elemento "{0}". - ETagUnterminated = La tag finale per il tipo di elemento "{0}" deve terminare con un delimitatore ''>''. - MarkupNotRecognizedInContent = Il contenuto degli elementi deve essere composto da dati o markup di caratteri con formato corretto. - DoctypeIllegalInContent = DOCTYPE non è consentito nel contenuto. -# 4.1 Character and Entity References - ReferenceUnterminated = Il riferimento deve terminare con un delimitatore ';'. -# 4.3.2 Well-Formed Parsed Entities - ReferenceNotInOneEntity = Il riferimento deve essere compreso completamente all'interno della stessa entità analizzata. - ElementEntityMismatch = L''elemento "{0}" deve iniziare e finire con la stessa entità. - MarkupEntityMismatch=Le strutture di documenti XML devono iniziare e finire con la stessa entità. - -# Messages common to Document and DTD -# 2.2 Characters - InvalidCharInAttValue = È stato trovato un carattere XML non valido (Unicode: 0x{2}) nel valore dell''attributo "{1}". L''elemento è "{0}". - InvalidCharInComment = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nel commento. - InvalidCharInPI = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nell''istruzione di elaborazione. - InvalidCharInInternalSubset = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nel set secondario interno del DTD. - InvalidCharInTextDecl = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nella dichiarazione testuale. -# 2.3 Common Syntactic Constructs - QuoteRequiredInAttValue = Il valore dell''attributo "{1}" deve iniziare con un apice o una virgoletta. - LessthanInAttValue = Il valore dell''attributo "{1}" associato a un tipo di elemento "{0}" non deve essere contenere il carattere ''<''. - AttributeValueUnterminated = Il valore dell''attributo "{1}" deve terminare con un apice corrispondente. -# 2.5 Comments - InvalidCommentStart = Il commento deve iniziare con "". - COMMENT_NOT_IN_ONE_ENTITY = Il commento non è compreso all'interno della stessa entità. -# 2.6 Processing Instructions - PITargetRequired = L'istruzione di elaborazione deve iniziare con il nome della destinazione. - SpaceRequiredInPI = È richiesto uno spazio tra la destinazione delle istruzioni di elaborazione e i dati. - PIUnterminated = L'istruzione di elaborazione deve terminare con "?>". - ReservedPITarget = Non è consentita una destinazione di istruzione di elaborazione corrispondente a "[xX][mM][lL]". - PI_NOT_IN_ONE_ENTITY = L'istruzione di elaborazione non è compresa all'interno della stessa entità. -# 2.8 Prolog and Document Type Declaration - VersionInfoInvalid = Versione "{0}" non valida. - VersionNotSupported = La versione XML "{0}" non è supportata. Solo la versione XML 1.0 è supportata. - VersionNotSupported11 = La versione XML "{0}" non è supportata. Solo le versioni XML 1.0 e XML 1.1 sono supportate. - VersionMismatch= Un'entità non può includerne un'altra con una versione successiva. -# 4.1 Character and Entity References - DigitRequiredInCharRef = Una rappresentazione decimale deve seguire immediatamente "&#" in un riferimento di carattere. - HexdigitRequiredInCharRef = Una rappresentazione esadecimale deve seguire immediatamente "&#" in un riferimento di carattere. - SemicolonRequiredInCharRef = Il riferimento di carattere deve terminare con il delimitatore ';'. - InvalidCharRef = Il riferimento di carattere "&#{0}" è un carattere XML non valido. - NameRequiredInReference = Il nome entità deve seguire immediatamente '&' nel riferimento di entità. - SemicolonRequiredInReference = Il riferimento di entità "{0}" deve terminare con il delimitatore '';''. -# 4.3.1 The Text Declaration - TextDeclMustBeFirst = La dichiarazione di testo può comparire solo all'inizio dell'entità esterna analizzata. - EqRequiredInTextDecl = Il carattere '' = '' deve seguire "{0}" nella dichiarazione di testo. - QuoteRequiredInTextDecl = Il valore che segue "{0}" nella dichiarazione di testo deve essere una stringa compresa tra apici. - CloseQuoteMissingInTextDecl = manca l''apice di chiusura nel valore che segue "{0}" nella dichiarazione di testo. - SpaceRequiredBeforeVersionInTextDecl = È richiesto uno spazio prima dell'attributo pseudo della versione nella dichiarazione del testo. - SpaceRequiredBeforeEncodingInTextDecl = È richiesto uno spazio prima dell'attributo pseudo di codifica nella dichiarazione del testo. - TextDeclUnterminated = La dichiarazione di testo deve terminare con "?>". - EncodingDeclRequired = La dichiarazione di codifica è obbligatoria nella dichiarazione di testo. - NoMorePseudoAttributes = Non sono consentiti altri attributi pseudo. - MorePseudoAttributes = Sono previsti altri attributi pseudo. - PseudoAttrNameExpected = È previsto un nome attributo pseudo. -# 4.3.2 Well-Formed Parsed Entities - CommentNotInOneEntity = Il commento deve essere compreso completamente all'interno della stessa entità analizzata. - PINotInOneEntity = L'istruzione di elaborazione deve essere compresa completamente all'interno della stessa entità analizzata. -# 4.3.3 Character Encoding in Entities - EncodingDeclInvalid = Nome codifica "{0}" non valido. - EncodingByteOrderUnsupported = L''ordine di byte specificato per la codifica "{0}" non è supportato. - InvalidByte = Byte non valido {0} della sequenza UTF-8 a {1} byte. - ExpectedByte = È previsto il byte {0} della sequenza UTF-8 a {1} byte. - InvalidHighSurrogate = I bit per surrogato alto nella sequenza UTF-8 non devono superare 0x10, ma è stato trovato 0x{0}. - OperationNotSupported = Operazione "{0}" non supportata dal processo di lettura {1}. - InvalidASCII = Il byte "{0}" non fa parte del set di caratteri ASCII (a 7 bit). - CharConversionFailure = Un'entità che deve trovarsi in una determinata codifica non può contenere sequenze non valide in quella codifica. - -# DTD Messages -# 2.2 Characters - InvalidCharInEntityValue = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nel valore dell''entità. - InvalidCharInExternalSubset = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nel set secondario esterno del DTD. - InvalidCharInIgnoreSect = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nella sezione condizionale esclusa. - InvalidCharInPublicID = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nell''identificativo pubblico. - InvalidCharInSystemID = È stato trovato un carattere XML non valido (Unicode: 0x{0}) nell''identificativo di sistema. -# 2.3 Common Syntactic Constructs - SpaceRequiredAfterSYSTEM = È richiesto uno spazio dopo la parola chiave SYSTEM nella dichiarazione DOCTYPE. - QuoteRequiredInSystemID = L'identificativo di sistema deve iniziare con un apice o con virgolette. - SystemIDUnterminated = L'identificativo di sistema deve terminare con un apice corrispondente. - SpaceRequiredAfterPUBLIC = Sono richiesti spazi dopo la parola chiave PUBLIC nella dichiarazione DOCTYPE. - QuoteRequiredInPublicID = L'identificativo pubblico deve iniziare con un apice o con le virgolette. - PublicIDUnterminated = L'identificativo pubblico deve terminare con un apice corrispondente. - PubidCharIllegal = Il carattere (Unicode: 0x{0}) non è consentito nell''identificativo pubblico. - SpaceRequiredBetweenPublicAndSystem = Sono richiesti spazi tra publicId e systemId. -# 2.8 Prolog and Document Type Declaration - MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = È richiesto uno spazio dopo "''. - DoctypedeclNotClosed = La dichiarazione del tipo di documento per il tipo di elemento radice "{0}" deve terminare con '']''. - PEReferenceWithinMarkup = Il riferimento di entità di parametro "%{0};" non può essere presente nel markup del set secondario interno del DTD. - MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Le dichiarazioni di markup contenute o indicate dalla dichiarazione del tipo di documento devono avere un formato corretto. -# 2.10 White Space Handling - MSG_XML_SPACE_DECLARATION_ILLEGAL = La dichiarazione di attributo "xml:space" deve essere specificata come tipo enumerato, i cui unici possibili valori sono "default" e "preserve". -# 3.2 Element Type Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = È richiesto uno spazio dopo "''. -# 3.2.1 Element Content - MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un carattere ''('' o un tipo di elemento è obbligatorio nella dichiarazione del tipo di elemento "{0}". - MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un carattere '')'' è obbligatorio nella dichiarazione del tipo di elemento "{0}". -# 3.2.2 Mixed Content - MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un tipo di elemento è obbligatorio nella dichiarazione del tipo di elemento "{0}". - MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un carattere '')'' è obbligatorio nella dichiarazione del tipo di elemento "{0}". - MixedContentUnterminated = Il modello di contenuto misto "{0}" deve terminare con ")*" se i tipi di elementi figlio hanno vincoli. -# 3.3 Attribute-List Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = È richiesto uno spazio dopo "". - IgnoreSectUnterminated = La sezione condizionale esclusa deve terminare con "]]>". -# 4.1 Character and Entity References - NameRequiredInPEReference = Il nome entità deve seguire immediatamente '%' nel riferimento di entità di parametro. - SemicolonRequiredInPEReference = Il riferimento di entità di parametro "%{0};" deve terminare con il delimitatore '';''. -# 4.2 Entity Declarations - MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = È richiesto uno spazio dopo "''. - MSG_DUPLICATE_ENTITY_DEFINITION = L''entità "{0}" è stata dichiarata più volte. -# 4.2.2 External Entities - ExternalIDRequired = La dichiarazione di entità esterna deve iniziare con "SYSTEM" o "PUBLIC". - MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = È richiesto uno spazio tra "PUBLIC" e l'identificativo pubblico. - MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = È richiesto uno spazio tra l'identificativo pubblico e quello di sistema. - MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = È richiesto uno spazio tra "SYSTEM" e l'identificativo di sistema. - MSG_URI_FRAGMENT_IN_SYSTEMID = L''identificativo di frammento non deve essere specificato nell''identificativo di sistema "{0}". -# 4.7 Notation Declarations - MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = È richiesto uno spazio dopo "''. - -# Validation messages - DuplicateTypeInMixedContent = Il tipo di elemento "{1}" è già stato specificato nel modello di contenuto della dichiarazione di elemento "{0}". - ENTITIESInvalid = Il valore di attributo "{1}" di tipo ENTITIES deve corrispondere ai nomi di una o più entità non analizzate. - ENTITYInvalid = Il valore di attributo "{1}" di tipo ENTITY deve corrispondere al nome di un''entità non analizzata. - IDDefaultTypeInvalid = Nell''attributo ID "{0}" deve essere dichiarato un valore predefinito "#IMPLIED" o "#REQUIRED". - IDInvalid = Il valore di attributo "{0}" di tipo ID deve essere un nome. - IDInvalidWithNamespaces = Il valore di attributo "{0}" di tipo ID deve essere un NCName se sono abilitati gli spazi di nomi. - IDNotUnique = Il valore di attributo "{0}" di tipo ID deve essere univoco all''interno del documento. - IDREFInvalid = Il valore di attributo "{0}" di tipo IDREF deve essere un nome. - IDREFInvalidWithNamespaces = Il valore di attributo "{0}" di tipo IDREF deve essere un NCName se sono abilitati gli spazi di nomi. - IDREFSInvalid = Il valore di attributo "{0}" di tipo IDREFS deve corrispondere a uno o più nomi. - ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Il testo di sostituzione dell''entità di parametro "{0}" deve includere dichiarazioni nidificate correttamente se il riferimento dell''entità è utilizzato come dichiarazione completa. - ImproperDeclarationNesting = Il testo di sostituzione dell''entità di parametro "{0}" deve includere dichiarazioni nidificate correttamente. - ImproperGroupNesting = Il testo di sostituzione dell''entità di parametro "{0}" deve includere coppie di parentesi nidificate correttamente. - INVALID_PE_IN_CONDITIONAL = Il testo di sostituzione dell''entità di parametro "{0}" deve includere tutta la sezione condizionale oppure solo INCLUDE o IGNORE. - MSG_ATTRIBUTE_NOT_DECLARED = Dichiarare l''attributo "{1}" per il tipo di elemento "{0}". - MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = L''attributo "{0}" con valore "{1}" deve avere un valore della lista "{2}". - MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = Il valore "{1}" dell''attributo "{0}" non deve essere modificato dalla normalizzazione (in "{2}") in un documento standalone. - MSG_CONTENT_INCOMPLETE = Il contenuto del tipo di elemento "{0}" è incompleto. Deve corrispondere a "{1}". - MSG_CONTENT_INVALID = Il contenuto del tipo di elemento "{0}" deve corrispondere a "{1}". - MSG_CONTENT_INVALID_SPECIFIED = Il contenuto del tipo di elemento "{0}" deve corrispondere a "{1}". Non sono consentiti elementi figlio di tipo "{2}". - MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = L''attributo "{1}" per il tipo di elemento "{0}" ha un valore predefinito e deve essere specificato in un documento standalone. - MSG_DUPLICATE_ATTDEF = L''attributo "{1}" è già stato dichiarato per il tipo di elemento "{0}". - MSG_ELEMENT_ALREADY_DECLARED = Il tipo di elemento "{0}" non deve essere dichiarato più volte. - MSG_ELEMENT_NOT_DECLARED = Il tipo di elemento "{0}" deve essere dichiarato. - MSG_GRAMMAR_NOT_FOUND = Documento non valido: nessuna grammatica trovata. - MSG_ELEMENT_WITH_ID_REQUIRED = Un elemento con identificativo "{0}" deve esistere nel documento. - MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Il riferimento all''entità esterna "{0}" non è consentito in un documento standalone. - MSG_FIXED_ATTVALUE_INVALID = L''attributo "{1}" con valore "{2}" deve avere un valore "{3}". - MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Il tipo di elemento "{0}" ha già un attributo "{1}" di tipo ID. Non è consentito un secondo attributo "{2}" di tipo ID. - MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Il tipo di elemento "{0}" ha già un attributo "{1}" di tipo NOTATION. Non è consentito un secondo attributo "{2}" di tipo NOTATION. - MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notazione "{1}" deve essere dichiarata se vi viene fatto riferimento nella lista dei tipi di notazione per l''attributo "{0}". - MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notazione "{1}" deve essere dichiarata se vi viene fatto riferimento dichiarazione di entità non analizzata per "{0}". - MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Il riferimento all''entità "{0}" dichiarata in un''entità esterna analizzata non è consentito in un documento standalone. - MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = L''attributo "{1}" è obbligatorio e deve essere specificato per il tipo di elemento "{0}". - MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Non deve esistere nessuno spazio tra gli elementi dichiarati in un'entità esterna analizzata con il contenuto dell'elemento in un documento standalone. - NMTOKENInvalid = Il valore di attributo "{0}" di tipo NMTOKEN deve essere un token di nome. - NMTOKENSInvalid = Il valore di attributo "{0}" di tipo NMTOKENS deve corrispondere a uno o più token di nomi. - NoNotationOnEmptyElement = Il tipo di elemento "{0}" dichiarato come EMPTY non può dichiarare l''attributo "{1}" di tipo NOTATION. - RootElementTypeMustMatchDoctypedecl = L''elemento radice "{1}" del documento deve corrispondere alla radice DOCTYPE "{0}". - UndeclaredElementInContentSpec = Il modello di contenuto dell''elemento "{0}" fa riferimento a un elemento "{1}" non dichiarato. - UniqueNotationName = La dichiarazione per la notazione "{0}" non è univoca. Un nome non deve essere dichiarato più volte nella dichiarazione di una notazione. - ENTITYFailedInitializeGrammar = ENTITYDatatype Validator: errore. È necessario richiamare il metodo di inizializzazione con un riferimento di grammatica valido. \t - ENTITYNotUnparsed = ENTITY "{0}" non analizzata. - ENTITYNotValid = ENTITY "{0}" non valida. - EmptyList = I valori di tipo ENTITIES, IDREFS e NMTOKENS non possono essere una lista vuota. - -# Entity related messages -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ReferenceToExternalEntity = Il riferimento di entità esterna "&{0};" non è consentito in un valore di attributo. - AccessExternalDTD = DTD esterna: lettura della DTD esterna ''{0}'' non riuscita. Accesso ''{1}'' non consentito a causa della limitazione definita dalla proprietà accessExternalDTD. - AccessExternalEntity = Entità esterna: lettura del documento esterno ''{0}'' non riuscita. Accesso ''{1}'' non consentito a causa della limitazione definita dalla proprietà accessExternalDTD. - -# 4.1 Character and Entity References - EntityNotDeclared = L''entità "{0}" è indicata da un riferimento, ma non è dichiarata. - ReferenceToUnparsedEntity = Il riferimento di entità non analizzata "&{0};" non è consentito. - RecursiveReference = Riferimento di entità ricorsivo "{0}" (percorso riferimento: {1}). - RecursiveGeneralReference = Riferimento di entità generale ricorsivo "&{0};" (percorso riferimento: {1}). - RecursivePEReference = Riferimento di entità parametro ricorsivo "%{0};" (percorso riferimento: {1}). -# 4.3.3 Character Encoding in Entities - EncodingNotSupported = La codifica "{0}" non è supportata. - EncodingRequired = Un'entità analizzata non codificata in UTF-8 o UTF-16 deve contenere una dichiarazione di codifica. - -# Namespaces support -# 4. Using Qualified Names - IllegalQName = L'elemento o l'attributo non corrisponde alla produzione del QName: QName::=(NCName':')?NCName. - ElementXMLNSPrefix = L''elemento "{0}" non può avere "xmlns" come prefisso. - ElementPrefixUnbound = Il prefisso "{0}" per l''elemento "{1}" non è associato. - AttributePrefixUnbound = Il prefisso "{2}" per l''attributo "{1}" associato a un tipo di elemento "{0}" non è associato. - EmptyPrefixedAttName = Il valore dell''attributo "{0}" non è valido. Le associazioni di spazi di nomi con prefisso non possono essere vuote. - PrefixDeclared = Il prefisso spazio di nomi "{0}" non è stato dichiarato. - CantBindXMLNS = Il prefisso "xmlns" non può essere associato esplicitamente a uno spazio di nomi, né lo spazio di nomi per "xmlns" può essere associato esplicitamente a un prefisso. - CantBindXML = Il prefisso "xml" non può essere associato a uno spazio di nomi diverso da quello al quale appartiene, né lo spazio di nomi per "xml" può essere associato a un prefisso diverso da "xml". - MSG_ATT_DEFAULT_INVALID = defaultValue "{1}" dell''attributo "{0}" non valido per i vincoli lessicali di questo tipo di attributo. - -# REVISIT: These need messages - MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID - OpenQuoteMissingInDecl=OpenQuoteMissingInDecl - InvalidCharInLiteral=InvalidCharInLiteral - - -# Implementation limits - EntityExpansionLimit=JAXP00010001: il parser ha rilevato più "{0}" espansioni di entità nel documento. Questo è il limite imposto dal kit JDK. - ElementAttributeLimit=JAXP00010002: l''elemento "{0}" contiene più di "{1}" attributi. "{1}" è il limite imposto dal kit JDK. - MaxEntitySizeLimit=JAXP00010003: la lunghezza dell''entità "{0}" è "{1}". Tale valore supera il limite "{2}" definito da "{3}". - TotalEntitySizeLimit=JAXP00010004: le dimensioni accumulate delle entità sono pari a "{0}". Tale valore supera il limite "{1}" definito da "{2}". - MaxXMLNameLimit=JAXP00010005: la lunghezza dell''entità "{0}" è "{1}". Tale valore supera il limite "{2}" definito da "{3}". - MaxElementDepthLimit=JAXP00010006: la profondità dell''elemento "{0}" è "{1}". Tale valore supera il limite "{2}" definito da "{3}". - EntityReplacementLimit=JAXP00010007: il numero totale di nodi nei riferimenti entità è "{0}". Tale valore supera il limite di "{1}" impostato da "{2}". - -# Catalog 09 -# Technical term, do not translate: catalog - CatalogException=JAXP00090001: il CatalogResolver è abilitato con il catalogo "{0}", ma viene restituita una CatalogException. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties deleted file mode 100644 index e63654de23c..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties +++ /dev/null @@ -1,308 +0,0 @@ -# This file contains error and warning messages related to XML -# The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version - - BadMessageKey = 메시지 키에 해당하는 오류 메시지를 찾을 수 없습니다. - FormatFailed = 다음 메시지의 형식을 지정하는 중 내부 오류가 발생했습니다.\n - -# Document messages - PrematureEOF=예기치 않은 파일의 끝입니다. -# 2.1 Well-Formed XML Documents - RootElementRequired = 올바른 형식의 문서에는 루트 요소가 필요합니다. -# 2.2 Characters - - InvalidCharInCDSect = CDATA 섹션에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - InvalidCharInContent = 문서의 요소 콘텐츠에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - TwoColonsInQName = 요소 유형 또는 속성 이름에서 부적합한 두번째 ':'이 발견되었습니다. - ColonNotLegalWithNS = 네임스페이스가 사용으로 설정된 경우 ''{0}'' 이름에서는 콜론이 허용되지 않습니다. - InvalidCharInMisc = 요소 콘텐츠 끝까지 읽은 후 마크업에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - InvalidCharInProlog = 문서의 프롤로그에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - InvalidCharInXMLDecl = XML 선언에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. -# 2.4 Character Data and Markup - CDEndInContent = 문자 시퀀스 "]]>"는 CDATA 섹션 끝을 표시하는 데 사용되지 않는 경우 콘텐츠에 나타나지 않아야 합니다. -# 2.7 CDATA Sections - CDSectUnterminated = CDATA 섹션은 "]]>"로 끝나야 합니다. -# 2.8 Prolog and Document Type Declaration - XMLDeclMustBeFirst = XML 선언은 문서 맨 앞에만 나타날 수 있습니다. - EqRequiredInXMLDecl = XML 선언에서는 "{0}" 다음에 '' = '' 문자가 와야 합니다. - QuoteRequiredInXMLDecl = XML 선언에서 "{0}" 다음에 오는 값은 따옴표가 붙은 문자열이어야 합니다. - XMLDeclUnterminated = XML 선언은 "?>"로 끝나야 합니다. - VersionInfoRequired = XML 선언에는 버전이 필요합니다. - SpaceRequiredBeforeVersionInXMLDecl = XML 선언에서는 버전 의사 속성 앞에 공백이 필요합니다. - SpaceRequiredBeforeEncodingInXMLDecl = XML 선언에서는 인코딩 의사 속성 앞에 공백이 필요합니다. - SpaceRequiredBeforeStandalone = XML 선언에서는 인코딩 의사 속성 앞에 공백이 필요합니다. - MarkupNotRecognizedInProlog = 문서에서 루트 요소 앞에 오는 마크업은 올바른 형식이어야 합니다. - MarkupNotRecognizedInMisc = 문서에서 루트 요소 다음에 오는 마크업은 올바른 형식이어야 합니다. - AlreadySeenDoctype = doctype이 이미 표시되었습니다. - DoctypeNotAllowed = DOCTYPE은 "http://apache.org/xml/features/disallow-doctype-decl" 기능이 true로 설정된 경우 허용되지 않습니다. - ContentIllegalInProlog = 프롤로그에서는 콘텐츠가 허용되지 않습니다. - ReferenceIllegalInProlog = 프롤로그에서는 참조가 허용되지 않습니다. -# Trailing Misc - ContentIllegalInTrailingMisc=후행 섹션에서는 콘텐츠가 허용되지 않습니다. - ReferenceIllegalInTrailingMisc=후행 섹션에서는 참조가 허용되지 않습니다. - -# 2.9 Standalone Document Declaration - SDDeclInvalid = 독립형 문서 선언 값은 "{0}"이(가) 아닌 "yes" 또는 "no"여야 합니다. - SDDeclNameInvalid = XML 선언의 독립형 이름의 철자가 잘못되었을 수 있습니다. -# 2.12 Language Identification - XMLLangInvalid = xml:lang 속성값 "{0}"은(는) 부적합한 언어 식별자입니다. -# 3. Logical Structures - ETagRequired = 요소 유형 "{0}"은(는) 짝이 맞는 종료 태그 ""(으)로 종료되어야 합니다. -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ElementUnterminated = 요소 유형 "{0}" 다음에는 속성 사양 ">" 또는 "/>"가 와야 합니다. - EqRequiredInAttribute = 요소 유형 "{0}"과(와) 연관된 속성 이름 "{1}" 다음에는 '' = '' 문자가 와야 합니다. - OpenQuoteExpected = 요소 유형 "{0}"과(와) 연관된 "{1}" 속성에는 여는 따옴표가 필요합니다. - CloseQuoteExpected = 요소 유형 "{0}"과(와) 연관된 "{1}" 속성에는 닫는 따옴표가 필요합니다. - AttributeNotUnique = "{1}" 속성이 "{0}" 요소에 대해 이미 지정되었습니다. - AttributeNSNotUnique = "{2}" 네임스페이스에 바인드된 "{1}" 속성이 "{0}" 요소에 대해 이미 지정되었습니다. - ETagUnterminated = 요소 유형 "{0}"에 대한 종료 태그는 ''>'' 구분자로 끝나야 합니다. - MarkupNotRecognizedInContent = 요소 콘텐츠는 올바른 형식의 문자 데이터 또는 마크업으로 구성되어야 합니다. - DoctypeIllegalInContent = 콘텐츠에서는 DOCTYPE이 허용되지 않습니다. -# 4.1 Character and Entity References - ReferenceUnterminated = 참조는 ';' 구분자로 종료되어야 합니다. -# 4.3.2 Well-Formed Parsed Entities - ReferenceNotInOneEntity = 참조는 구문이 분석된 동일한 엔티티에 완전히 포함되어야 합니다. - ElementEntityMismatch = "{0}" 요소는 동일한 엔티티에서 시작되고 끝나야 합니다. - MarkupEntityMismatch=XML 문서 구조는 동일한 엔티티에서 시작되고 끝나야 합니다. - -# Messages common to Document and DTD -# 2.2 Characters - InvalidCharInAttValue = "{1}" 속성의 값에서 부적합한 XML 문자(유니코드: 0x{2})가 발견되었으며 요소가 "{0}"입니다. - InvalidCharInComment = 주석에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - InvalidCharInPI = 처리 명령에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - InvalidCharInInternalSubset = DTD의 내부 부분 집합에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - InvalidCharInTextDecl = 텍스트 선언에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. -# 2.3 Common Syntactic Constructs - QuoteRequiredInAttValue = "{1}" 속성의 값은 작은 따옴표 또는 큰 따옴표 문자로 시작해야 합니다. - LessthanInAttValue = 요소 유형 "{0}"과(와) 연관된 "{1}" 속성의 값에는 ''<'' 문자가 포함되지 않아야 합니다. - AttributeValueUnterminated = "{1}" 속성의 값은 짝이 맞는 따옴표 문자로 끝나야 합니다. -# 2.5 Comments - InvalidCommentStart = 주석은 ""로 끝나야 합니다. - COMMENT_NOT_IN_ONE_ENTITY = 주석이 동일한 엔티티 안에 있지 않습니다. -# 2.6 Processing Instructions - PITargetRequired = 처리 명령은 대상 이름으로 시작해야 합니다. - SpaceRequiredInPI = 처리 명령 대상과 데이터 사이에는 공백이 필요합니다. - PIUnterminated = 처리 명령은 "?>"로 끝나야 합니다. - ReservedPITarget = "[xX][mM][lL]"과 일치하는 처리 명령 대상은 허용되지 않습니다. - PI_NOT_IN_ONE_ENTITY = 처리 명령이 동일한 엔티티 안에 있지 않습니다. -# 2.8 Prolog and Document Type Declaration - VersionInfoInvalid = "{0}"은(는) 부적합한 버전입니다. - VersionNotSupported = XML 버전 "{0}"은(는) 지원되지 않습니다. XML 1.0만 지원됩니다. - VersionNotSupported11 = XML 버전 "{0}"은(는) 지원되지 않습니다. XML 1.0 및 XML 1.1만 지원됩니다. - VersionMismatch= 하나의 엔티티에는 이후 버전의 다른 엔티티가 포함될 수 없습니다. -# 4.1 Character and Entity References - DigitRequiredInCharRef = 문자 참조에서는 "&#" 바로 다음에 십진수 표현이 와야 합니다. - HexdigitRequiredInCharRef = 문자 참조에서는 "&#x" 바로 다음에 16진수 표현이 와야 합니다. - SemicolonRequiredInCharRef = 문자 참조는 ';' 구분자로 끝나야 합니다. - InvalidCharRef = 문자 참조 "&#{0}"은(는) 부적합한 XML 문자입니다. - NameRequiredInReference = 엔티티 참조에서는 '&' 바로 다음에 엔티티 이름이 와야 합니다. - SemicolonRequiredInReference = "{0}" 엔티티에 대한 참조는 '';'' 구분자로 끝나야 합니다. -# 4.3.1 The Text Declaration - TextDeclMustBeFirst = 텍스트 선언은 구문이 분석된 외부 엔티티 맨 앞에만 나타날 수 있습니다. - EqRequiredInTextDecl = 텍스트 선언에서는 "{0}" 다음에 '' = '' 문자가 와야 합니다. - QuoteRequiredInTextDecl = 텍스트 선언에서 "{0}" 다음에 오는 값은 따옴표가 붙은 문자열이어야 합니다. - CloseQuoteMissingInTextDecl = 텍스트 선언에서 "{0}" 다음에 오는 값의 닫는 따옴표가 누락되었습니다. - SpaceRequiredBeforeVersionInTextDecl = 텍스트 선언은 버전 의사 속성 앞에 공백이 필요합니다. - SpaceRequiredBeforeEncodingInTextDecl = 텍스트 선언은 인코딩 의사 속성 앞에 공백이 필요합니다. - TextDeclUnterminated = 텍스트 선언은 "?>"로 끝나야 합니다. - EncodingDeclRequired = 텍스트 선언에는 인코딩 선언이 필요합니다. - NoMorePseudoAttributes = 의사 속성은 더 이상 허용되지 않습니다. - MorePseudoAttributes = 의사 속성이 더 필요합니다. - PseudoAttrNameExpected = 의사 속성 이름이 필요합니다. -# 4.3.2 Well-Formed Parsed Entities - CommentNotInOneEntity = 주석은 구문이 분석된 동일한 엔티티에 완전히 포함되어야 합니다. - PINotInOneEntity = 처리 명령은 구문이 분석된 동일한 엔티티에 완전히 포함되어야 합니다. -# 4.3.3 Character Encoding in Entities - EncodingDeclInvalid = "{0}"은(는) 부적합한 인코딩 이름입니다. - EncodingByteOrderUnsupported = "{0}" 인코딩에 대해 제공된 바이트 순서는 지원되지 않습니다. - InvalidByte = {0}은(는) {1}바이트 UTF-8 시퀀스에 대해 부적합한 바이트입니다. - ExpectedByte = {1}바이트 UTF-8 시퀀스에 필요한 바이트는 {0}입니다. - InvalidHighSurrogate = UTF-8 시퀀스의 높은 대리 비트는 0x10을 초과하지 않아야 하지만 0x{0}이(가) 발견되었습니다. - OperationNotSupported = {1} 읽기 프로그램은 "{0}" 작업을 지원하지 않습니다. - InvalidASCII = 바이트 "{0}"은(는) (7비트) ASCII 문자 집합에 속하지 않습니다. - CharConversionFailure = 특정 인코딩 형식이어야 하는 것으로 확인된 엔티티에는 해당 인코딩에 부적합한 시퀀스가 포함되지 않아야 합니다. - -# DTD Messages -# 2.2 Characters - InvalidCharInEntityValue = 리터럴 엔티티 값에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - InvalidCharInExternalSubset = DTD의 외부 부분 집합에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - InvalidCharInIgnoreSect = 제외된 조건부 섹션에서 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - InvalidCharInPublicID = 공용 식별자에 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. - InvalidCharInSystemID = 시스템 식별자에 부적합한 XML 문자(유니코드: 0x{0})가 발견되었습니다. -# 2.3 Common Syntactic Constructs - SpaceRequiredAfterSYSTEM = DOCTYPE 선언에는 SYSTEM 키워드 다음에 공백이 필요합니다. - QuoteRequiredInSystemID = 시스템 식별자는 작은 따옴표 또는 큰 따옴표 문자로 시작해야 합니다. - SystemIDUnterminated = 시스템 식별자는 짝이 맞는 따옴표 문자로 끝나야 합니다. - SpaceRequiredAfterPUBLIC = DOCTYPE 선언에는 PUBLIC 키워드 다음에 공백이 필요합니다. - QuoteRequiredInPublicID = 공용 식별자는 작은 따옴표 또는 큰 따옴표 문자로 시작해야 합니다. - PublicIDUnterminated = 공용 식별자는 짝이 맞는 따옴표 문자로 끝나야 합니다. - PubidCharIllegal = 공용 식별자에는 문자(유니코드: 0x{0})가 허용되지 않습니다. - SpaceRequiredBetweenPublicAndSystem = publicId와 systemId 사이에는 공백이 필요합니다. -# 2.8 Prolog and Document Type Declaration - MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = 문서 유형 선언에서는 "''로 끝나야 합니다. - DoctypedeclNotClosed = 루트 요소 유형 "{0}"에 대한 문서 유형 선언은 '']''로 끝나야 합니다. - PEReferenceWithinMarkup = 매개변수 엔티티 참조 "%{0};"은 DTD의 내부 부분 집합에 있는 마크업 안에 표시될 수 없습니다. - MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = 문서 유형 선언을 포함하거나 문서 유형 선언이 가리키는 마크업 선언은 올바른 형식이어야 합니다. -# 2.10 White Space Handling - MSG_XML_SPACE_DECLARATION_ILLEGAL = "xml:space"에 대한 속성 선언은 "default" 및 "preserve" 값만 가능한 열거 유형으로 지정되어야 합니다. -# 3.2 Element Type Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = 요소 유형 선언에서는 "''로 끝나야 합니다. -# 3.2.1 Element Content - MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = 요소 유형 "{0}"의 선언에는 ''('' 문자 또는 요소 유형이 필요합니다. - MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = 요소 유형 "{0}"의 선언에는 '')''가 필요합니다. -# 3.2.2 Mixed Content - MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = 요소 유형 "{0}"의 선언에는 요소 유형이 필요합니다. - MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = 요소 유형 "{0}"의 선언에는 '')''가 필요합니다. - MixedContentUnterminated = 하위 요소 유형이 제한되는 경우 혼합 콘텐츠 모델 "{0}"은(는) ")*"로 끝나야 합니다. -# 3.3 Attribute-List Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = attribute-list 선언에서는 ""로 끝나야 합니다. - IgnoreSectUnterminated = 제외된 조건부 섹션은 "]]>"로 끝나야 합니다. -# 4.1 Character and Entity References - NameRequiredInPEReference = 매개변수 엔티티 참조에서는 '%' 바로 다음에 엔티티 이름이 와야 합니다. - SemicolonRequiredInPEReference = 매개변수 엔티티 참조 "%{0};"은 '';'' 구분자로 끝나야 합니다. -# 4.2 Entity Declarations - MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = 엔티티 선언에서는 "''로 끝나야 합니다. - MSG_DUPLICATE_ENTITY_DEFINITION = "{0}" 엔티티가 두 번 이상 선언되었습니다. -# 4.2.2 External Entities - ExternalIDRequired = 외부 엔티티 선언은 "SYSTEM" 또는 "PUBLIC"으로 시작해야 합니다. - MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = "PUBLIC"과 공용 식별자 사이에는 공백이 필요합니다. - MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = 공용 식별자와 시스템 식별자 사이에는 공백이 필요합니다. - MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = "SYSTEM"과 시스템 식별자 사이에는 공백이 필요합니다. - MSG_URI_FRAGMENT_IN_SYSTEMID = 부분 식별자는 시스템 식별자 "{0}"의 일부로 지정되지 않아야 합니다. -# 4.7 Notation Declarations - MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = 표기법 선언에서는 "''로 끝나야 합니다. - -# Validation messages - DuplicateTypeInMixedContent = 요소 유형 "{1}"이(가) 요소 선언 "{0}"의 콘텐츠 모델에 이미 지정되었습니다. - ENTITIESInvalid = ENTITIES 유형의 속성값 "{1}"은(는) 구문이 분석되지 않은 하나 이상의 엔티티에 대한 이름이어야 합니다. - ENTITYInvalid = ENTITY 유형의 속성값 "{1}"은(는) 구문이 분석되지 않은 엔티티에 대한 이름이어야 합니다. - IDDefaultTypeInvalid = ID 속성 "{0}"의 선언된 기본값은 "#IMPLIED" 또는 "#REQUIRED"여야 합니다. - IDInvalid = ID 유형의 속성값 "{0}"은(는) 이름이어야 합니다. - IDInvalidWithNamespaces = 네임스페이스가 사용으로 설정된 경우 ID 유형의 속성값 "{0}"은(는) NCName이어야 합니다. - IDNotUnique = ID 유형의 속성값 "{0}"은(는) 문서 내에서 고유해야 합니다. - IDREFInvalid = IDREF 유형의 속성값 "{0}"은(는) 이름이어야 합니다. - IDREFInvalidWithNamespaces = 네임스페이스가 사용으로 설정된 경우 IDREF 유형의 속성값 "{0}"은(는) NCName이어야 합니다. - IDREFSInvalid = IDREFS 유형의 속성값 "{0}"은(는) 하나 이상의 이름이어야 합니다. - ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = 엔티티 참조가 전체 선언으로 사용된 경우 매개변수 엔티티 "{0}"의 대체 텍스트에는 제대로 중첩된 선언이 포함되어야 합니다. - ImproperDeclarationNesting = 매개변수 엔티티 "{0}"의 대체 텍스트에는 제대로 중첩된 선언이 포함되어야 합니다. - ImproperGroupNesting = 매개변수 엔티티 "{0}"의 대체 텍스트에는 제대로 중첩된 괄호 쌍이 포함되어야 합니다. - INVALID_PE_IN_CONDITIONAL = 매개변수 엔티티 "{0}"의 대체 텍스트에는 전체 조건부 섹션이 포함되거나 INCLUDE 또는 IGNORE만 포함되어야 합니다. - MSG_ATTRIBUTE_NOT_DECLARED = 요소 유형 "{0}"에 대한 "{1}" 속성을 선언해야 합니다. - MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = 값이 "{1}"인 "{0}" 속성에는 "{2}" 목록의 값이 사용되어야 합니다. - MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = "{0}" 속성의 "{1}" 값은 독립형 문서에서 정규화에 의해 "{2}"(으)로 변경되지 않아야 합니다. - MSG_CONTENT_INCOMPLETE = 요소 유형 "{0}"의 콘텐츠가 불완전합니다. 해당 콘텐츠는 "{1}"과(와) 일치해야 합니다. - MSG_CONTENT_INVALID = 요소 유형 "{0}"의 콘텐츠는 "{1}"과(와) 일치해야 합니다. - MSG_CONTENT_INVALID_SPECIFIED = 요소 유형 "{0}"의 콘텐츠는 "{1}"과(와) 일치해야 합니다. "{2}" 유형의 하위 항목은 허용되지 않습니다. - MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = 요소 유형 "{0}"에 대한 "{1}" 속성에 기본값이 있으며 독립형 문서에 지정되어야 합니다. - MSG_DUPLICATE_ATTDEF = 요소 유형 "{0}"에 대한 "{1}" 속성이 이미 선언되어 있습니다. - MSG_ELEMENT_ALREADY_DECLARED = 요소 유형 "{0}"은(는) 두 번 이상 선언되지 않아야 합니다. - MSG_ELEMENT_NOT_DECLARED = 요소 유형 "{0}"을(를) 선언해야 합니다. - MSG_GRAMMAR_NOT_FOUND = 문서가 부적합함: 문법을 찾을 수 없습니다. - MSG_ELEMENT_WITH_ID_REQUIRED = 식별자가 "{0}"인 요소가 문서에 나타나야 합니다. - MSG_EXTERNAL_ENTITY_NOT_PERMITTED = 독립형 문서에서는 외부 엔티티 "{0}"에 대한 참조가 허용되지 않습니다. - MSG_FIXED_ATTVALUE_INVALID = 값이 "{2}"인 "{1}" 속성의 값은 "{3}"이어야 합니다. - MSG_MORE_THAN_ONE_ID_ATTRIBUTE = 요소 유형 "{0}"에 ID 유형의 "{1}" 속성이 이미 있으므로 ID 유형의 두번째 속성 "{2}"이(가) 허용되지 않습니다. - MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = 요소 유형 "{0}"에 NOTATION 유형의 "{1}" 속성이 이미 있으므로 NOTATION 유형의 두번째 속성 "{2}"이(가) 허용되지 않습니다. - MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = "{1}" 표기법은 "{0}" 속성에 대한 표기법 유형 목록에서 참조되는 경우 선언되어야 합니다. - MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = "{1}" 표기법은 "{0}"에 대해 구문이 분석되지 않은 엔티티 선언에서 참조되는 경우 선언되어야 합니다. - MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = 독립형 문서에서는 구문이 분석된 외부 엔티티에서 선언된 "{0}" 엔티티에 대한 참조가 허용되지 않습니다. - MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = "{1}" 속성이 필요하며 요소 유형 "{0}"에 대해 지정되어야 합니다. - MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = 독립형 문서에서는 요소 콘텐츠를 가지며 구문이 분석된 외부 엔티티에서 선언된 요소 사이에 공백이 없어야 합니다. - NMTOKENInvalid = NMTOKEN 유형의 속성값 "{0}"은(는) 이름 토큰이어야 합니다. - NMTOKENSInvalid = NMTOKENS 유형의 속성값 "{0}"은(는) 하나 이상의 이름 토큰이어야 합니다. - NoNotationOnEmptyElement = EMPTY로 선언된 요소 유형 "{0}"은(는) NOTATION 유형의 "{1}" 속성을 선언할 수 없습니다. - RootElementTypeMustMatchDoctypedecl = 문서 루트 요소 "{1}"은(는) DOCTYPE 루트 "{0}"과(와) 일치해야 합니다. - UndeclaredElementInContentSpec = "{0}" 요소의 콘텐츠 모델이 선언되지 않은 요소 "{1}"을(를) 참조합니다. - UniqueNotationName = "{0}" 표기법에 대한 선언이 고유하지 않습니다. 제공된 이름은 두 개 이상의 표기법 선언에서 선언되지 않아야 합니다. - ENTITYFailedInitializeGrammar = ENTITYDatatype 검증기: 실패했습니다. 적합한 문법 참조로 초기화 메소드를 호출해야 합니다. \t - ENTITYNotUnparsed = ENTITY "{0}"의 구문이 분석되지 않았습니다. - ENTITYNotValid = ENTITY "{0}"이(가) 부적합합니다. - EmptyList = ENTITIES, IDREFS 및 NMTOKENS 유형의 값은 빈 목록일 수 없습니다. - -# Entity related messages -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ReferenceToExternalEntity = 속성값에서는 외부 엔티티 참조 "&{0};"이 허용되지 않습니다. - AccessExternalDTD = 외부 DTD: accessExternalDTD 속성으로 설정된 제한으로 인해 ''{1}'' 액세스가 허용되지 않으므로 외부 DTD ''{0}'' 읽기를 실패했습니다. - AccessExternalEntity = 외부 엔티티: accessExternalDTD 속성으로 설정된 제한으로 인해 ''{1}'' 액세스가 허용되지 않으므로 외부 문서 ''{0}'' 읽기를 실패했습니다. - -# 4.1 Character and Entity References - EntityNotDeclared = "{0}" 엔티티가 참조되었지만 선언되지 않았습니다. - ReferenceToUnparsedEntity = 구문이 분석되지 않은 엔티티 참조 "&{0};"은(는) 허용되지 않습니다. - RecursiveReference = "{0}"은(는) 순환 엔티티 참조입니다(참조 경로: {1}). - RecursiveGeneralReference = "&{0};"은 순환 일반 엔티티 참조입니다(참조 경로: {1}). - RecursivePEReference = "%{0};"은 순환 매개변수 엔티티 참조입니다(참조 경로: {1}). -# 4.3.3 Character Encoding in Entities - EncodingNotSupported = "{0}" 인코딩은 지원되지 않습니다. - EncodingRequired = UTF-8 또는 UTF-16으로 인코딩되지 않은 구문이 분석된 엔티티에는 인코딩 선언이 포함되어야 합니다. - -# Namespaces support -# 4. Using Qualified Names - IllegalQName = 요소 또는 속성이 QName 작성과 일치하지 않음: QName::=(NCName':')?NCName. - ElementXMLNSPrefix = "{0}" 요소에는 "xmlns"가 접두어로 사용될 수 없습니다. - ElementPrefixUnbound = "{1}" 요소에 대한 "{0}" 접두어가 바인드되지 않았습니다. - AttributePrefixUnbound = 요소 유형 "{0}"과(와) 연관된 "{1}" 속성의 "{2}" 접두어가 바인드되지 않았습니다. - EmptyPrefixedAttName = "{0}" 속성의 값이 부적합합니다. 접두어가 지정된 네임스페이스 바인딩은 비워 둘 수 없습니다. - PrefixDeclared = 네임스페이스 접두어 "{0}"이(가) 선언되지 않았습니다. - CantBindXMLNS = "xmlns" 접두어는 명시적으로 네임스페이스에 바인드될 수 없습니다. "xmlns"에 대한 네임스페이스도 명시적으로 접두어에 바인드될 수 없습니다. - CantBindXML = "xml" 접두어는 일반 네임스페이스가 아닌 다른 네임스페이스에 바인드될 수 없습니다. "xml"에 대한 네임스페이스도 "xml" 이외의 접두어에 바인드될 수 없습니다. - MSG_ATT_DEFAULT_INVALID = "{0}" 속성의 defaultValue "{1}"은(는) 이 속성 유형의 렉시칼 제약 조건에 대한 값으로 부적합합니다. - -# REVISIT: These need messages - MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID - OpenQuoteMissingInDecl=OpenQuoteMissingInDecl - InvalidCharInLiteral=InvalidCharInLiteral - - -# Implementation limits - EntityExpansionLimit=JAXP00010001: 구문 분석기가 이 문서에서 "{0}"개를 초과하는 엔티티 확장을 발견했습니다. 이는 JDK에서 적용하는 제한입니다. - ElementAttributeLimit=JAXP00010002: "{0}" 요소에 "{1}"개를 초과하는 속성이 있습니다. "{1}"은(는) JDK에서 적용하는 제한입니다. - MaxEntitySizeLimit=JAXP00010003: "{0}" 엔티티의 길이가 "{3}"에서 설정된 "{2}" 제한을 초과하는 "{1}"입니다. - TotalEntitySizeLimit=JAXP00010004: 엔티티의 누적 크기가 "{2}"에서 설정한 "{1}" 제한을 초과하는 "{0}"입니다. - MaxXMLNameLimit=JAXP00010005: "{0}" 엔티티의 길이가 "{3}"에서 설정한 "{2}" 제한을 초과하는 "{1}"입니다. - MaxElementDepthLimit=JAXP00010006: "{0}" 요소의 깊이가 "{3}"에서 설정된 "{2}" 제한을 초과하는 "{1}"입니다. - EntityReplacementLimit=JAXP00010007: 엔티티 참조의 총 노드 수가 "{2}"에서 설정한 "{1}" 제한을 초과하는 "{0}"입니다. - -# Catalog 09 -# Technical term, do not translate: catalog - CatalogException=JAXP00090001: CatalogResolver가 "{0}" 카탈로그에 사용으로 설정되었지만 CatalogException이 반환되었습니다. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties deleted file mode 100644 index 4be5baae0d0..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties +++ /dev/null @@ -1,308 +0,0 @@ -# This file contains error and warning messages related to XML -# The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version - - BadMessageKey = Não foi possível encontrar a mensagem de erro correspondente à chave da mensagem. - FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n - -# Document messages - PrematureEOF=Fim prematuro do arquivo. -# 2.1 Well-Formed XML Documents - RootElementRequired = O elemento-raiz é necessário em um documento correto. -# 2.2 Characters - - InvalidCharInCDSect = Um caractere XML inválido (Unicode: 0x{0}) foi encontrado na seção CDATA. - InvalidCharInContent = Um caractere XML inválido (Unicode: 0x {0}) foi encontrado no conteúdo do elemento do documento. - TwoColonsInQName = Um segundo ':' inválido foi encontrado no tipo de elemento ou no nome do atributo. - ColonNotLegalWithNS = Não é permitido usar dois-pontos no nome ''{0}'' quando namespaces estiverem ativados. - InvalidCharInMisc = Um caractere XML inválido (Unicode: 0x {0}) foi encontrado na marcação após o fim do conteúdo do elemento. - InvalidCharInProlog = Um caractere XML inválido (Unicode: 0x {0}) foi encontrado no prólogo do documento. - InvalidCharInXMLDecl = Um caractere XML inválido (Unicode: 0x{0}) foi encontrado na declaração XML. -# 2.4 Character Data and Markup - CDEndInContent = A sequência de caracteres "]]>" não deve aparecer no conteúdo, a menos que seja usada para marcar o fim de uma seção CDATA. -# 2.7 CDATA Sections - CDSectUnterminated = A seção CDATA deve terminar com "]]>". -# 2.8 Prolog and Document Type Declaration - XMLDeclMustBeFirst = A declaração XML pode aparecer somente bem no início do documento. - EqRequiredInXMLDecl = O caractere '' = '' deve estar após "{0}" na declaração XML. - QuoteRequiredInXMLDecl = O valor após "{0}" na declaração XML deve ser uma string entre aspas. - XMLDeclUnterminated = A declaração XML deve terminar com "?>". - VersionInfoRequired = A versão é obrigatória na declaração XML. - SpaceRequiredBeforeVersionInXMLDecl = O espaço em branco é necessário antes do pseudo-atributo da versão na declaração XML. - SpaceRequiredBeforeEncodingInXMLDecl = O espaço em branco é necessário antes de codificar o pseudo-atributo na declaração XML. - SpaceRequiredBeforeStandalone = O espaço em branco é necessário antes de codificar o pseudo-atributo na declaração XML. - MarkupNotRecognizedInProlog = A marcação no documento que precede o elemento-raiz deve estar correta. - MarkupNotRecognizedInMisc = A marcação no documento após o elemento-raiz deve estar correta. - AlreadySeenDoctype = Tipo de documento já visto. - DoctypeNotAllowed = DOCTYPE fica desativado quando o recurso "http://apache.org/xml/features/disallow-doctype-decl" é definido como verdadeiro. - ContentIllegalInProlog = O conteúdo não é permitido no prólogo. - ReferenceIllegalInProlog = A referência não é permitida no prólogo. -# Trailing Misc - ContentIllegalInTrailingMisc=O conteúdo não é permitido na seção à esquerda. - ReferenceIllegalInTrailingMisc=A referência não é permitida na seção à esquerda. - -# 2.9 Standalone Document Declaration - SDDeclInvalid = O valor da declaração do documento stand-alone deve ser "sim" ou "não", mas não deve ser "{0}". - SDDeclNameInvalid = O nome standalone na declaração XML pode estar grafado incorretamente. -# 2.12 Language Identification - XMLLangInvalid = O valor do atributo xml:lang "{0}" é um identificador de idioma inválido. -# 3. Logical Structures - ETagRequired = O tipo de elemento {0}" deve ser encerrado pela tag final correspondente "". -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ElementUnterminated = O tipo de elemento "{0}" deve ser seguido pelas especificações do atributo, ">" ou "/>". - EqRequiredInAttribute = O nome do atributo "{1}" associado a um tipo de elemento "{0}" deve ser seguido do caractere '' = ''. - OpenQuoteExpected = São esperadas aspas de abertura para o atributo "{1}" associado a um tipo de elemento "{0}". - CloseQuoteExpected = São esperadas aspas de fechamento para o atributo "{1}" associado a um tipo de elemento "{0}". - AttributeNotUnique = O atributo "{1}" já foi especificado para o elemento "{0}". - AttributeNSNotUnique = O atributo "{1}" vinculado ao namespace "{2}" já foi especificado para o elemento "{0}". - ETagUnterminated = A tag final do tipo de elemento "{0}" deve terminar com um delimitador ''>". - MarkupNotRecognizedInContent = O conteúdo dos elementos deve consistir em dados ou marcação do caractere correto. - DoctypeIllegalInContent = Um DOCTYPE não é permitido no conteúdo. -# 4.1 Character and Entity References - ReferenceUnterminated = A referência deve ser encerrada por um delimitador ';'. -# 4.3.2 Well-Formed Parsed Entities - ReferenceNotInOneEntity = A referência deve estar totalmente contida na mesma entidade submetida a parsing. - ElementEntityMismatch = O elemento "{0}" deve começar e terminar com a mesma entidade. - MarkupEntityMismatch=As estruturas do documento XML devem começar e terminar com a mesma entidade. - -# Messages common to Document and DTD -# 2.2 Characters - InvalidCharInAttValue = Um caractere XML inválido (Unicode: 0x {2}) foi encontrado no valor do atributo "{1}" e o elemento é "{0}". - InvalidCharInComment = Um caractere XML inválido (Unicode: 0x{0}) foi encontrado no comentário. - InvalidCharInPI = Um caractere XML inválido (Unicode: 0x{0}) foi encontrado na instrução de processamento. - InvalidCharInInternalSubset = Um caractere XML inválido (Unicode: 0x {0}) foi encontrado no subconjunto interno do DTD. - InvalidCharInTextDecl = Um caractere XML inválido (Unicode: 0x{0}) foi encontrado na declaração de texto. -# 2.3 Common Syntactic Constructs - QuoteRequiredInAttValue = O valor do atributo "{1}" deve começar com aspas simples ou duplas. - LessthanInAttValue = O valor do atributo "{1}" associado a um tipo de elemento "{0}" não deve conter o caractere ''<''. - AttributeValueUnterminated = O valor do atributo "{1}" deve terminar com as aspas correspondentes. -# 2.5 Comments - InvalidCommentStart = O comentário deve começar com "". - COMMENT_NOT_IN_ONE_ENTITY = O comentário não está entre chaves na mesma entidade. -# 2.6 Processing Instructions - PITargetRequired = A instrução de processamento deve começar com o nome do destino. - SpaceRequiredInPI = O espaço em branco é obrigatório entre o destino da instrução de processamento e os dados. - PIUnterminated = A instrução de processamento deve terminar com "?>". - ReservedPITarget = O destino da instrução de processamento correspondente "[xX][mM][lL]" não é permitido. - PI_NOT_IN_ONE_ENTITY = A instrução de processamento não está entre chaves na mesma entidade. -# 2.8 Prolog and Document Type Declaration - VersionInfoInvalid = Versão inválida "{0}". - VersionNotSupported = Versão XML "{0}" não suportada; somente XML 1.0 é suportada. - VersionNotSupported11 = Versão XML "{0}" não suportada, somente XML 1.0 e XML 1.1 são suportadas. - VersionMismatch= Uma entidade não pode incluir outra entidade de uma versão posterior. -# 4.1 Character and Entity References - DigitRequiredInCharRef = Uma representação decimal deve seguir imediatamente o "&#" em uma referência de caractere. - HexdigitRequiredInCharRef = Uma representação hexadecimal deve seguir imediatamente o "&#" em uma referência de caractere. - SemicolonRequiredInCharRef = A referência de caractere deve terminar com o delimitador ';'. - InvalidCharRef = A referência do caractere "&#{0}" é um caractere XML inválido. - NameRequiredInReference = O nome da entidade deve seguir imediatamente o '&' na referência da entidade. - SemicolonRequiredInReference = A referência à entidade "{0}" deve terminar com o delimitador '';''. -# 4.3.1 The Text Declaration - TextDeclMustBeFirst = A declaração de texto somente pode aparecer bem no início da entidade externa submetida a parsing. - EqRequiredInTextDecl = O caractere '' = '' deve estar após "{0}" na declaração de texto. - QuoteRequiredInTextDecl = O valor após "{0}" na declaração de texto deve ser uma string entre aspas. - CloseQuoteMissingInTextDecl = não foi encontrada a aspa de fechamento no valor após "{0}" na declaração de texto. - SpaceRequiredBeforeVersionInTextDecl = O espaço em branco é necessário antes do pseudo-atributo da versão na declaração de texto. - SpaceRequiredBeforeEncodingInTextDecl = O espaço em branco é necessário antes de codificar o pseudo-atributo na declaração de texto. - TextDeclUnterminated = A declaração de texto deve terminar com "?>". - EncodingDeclRequired = A declaração de codificação é necessária na declaração de texto. - NoMorePseudoAttributes = Não são mais permitidos pseudo-atributos. - MorePseudoAttributes = São esperados mais pseudo-atributos. - PseudoAttrNameExpected = É esperado um nome de um pseudo-atributo. -# 4.3.2 Well-Formed Parsed Entities - CommentNotInOneEntity = O comentário deve estar totalmente contido na mesma entidade submetida a parsing. - PINotInOneEntity = A instrução de processamento deve estar totalmente contida na mesma entidade submetida a parsing. -# 4.3.3 Character Encoding in Entities - EncodingDeclInvalid = Nome da codificação inválida "{0}". - EncodingByteOrderUnsupported = A ordem de bytes fornecida para codificação "{0}" não é suportada. - InvalidByte = Byte inválido {0} da sequência UTF-8 do byte {1}. - ExpectedByte = Esperava {0} byte da sequência UTF-8 do byte {1}. - InvalidHighSurrogate = Os bits substitutos altos na sequência da UTF-8 não devem exceder 0x10 mas foi encontrado 0x{0}. - OperationNotSupported = A operação "{0}" não é suportada pelo leitor {1}. - InvalidASCII = O byte "{0}" não é membro do conjunto de caracteres ASCII (7 bits). - CharConversionFailure = Uma entidade destinada a estar em uma determinada codificação não deve conter sequências inválidas na referida codificação. - -# DTD Messages -# 2.2 Characters - InvalidCharInEntityValue = Um caractere XML inválido (Unicode: 0x {0}) foi encontrado no valor da entidade da literal. - InvalidCharInExternalSubset = Um caractere XML inválido (Unicode: 0x {0}) foi encontrado no subconjunto externo do DTD. - InvalidCharInIgnoreSect = Um caractere XML inválido (Unicode: 0x{0}) foi encontrado na seção condicional excluída. - InvalidCharInPublicID = Um caractere XML inválido (Unicode: 0x{0}) foi encontrado no identificador público. - InvalidCharInSystemID = Um caractere XML inválido (Unicode: 0x{0}) foi encontrado no identificador do sistema. -# 2.3 Common Syntactic Constructs - SpaceRequiredAfterSYSTEM = É necessário um espaço em branco após a palavra-chave SYTEM na declaração DOCTYPE. - QuoteRequiredInSystemID = O identificador do sistema deve começar com aspas simples ou duplas. - SystemIDUnterminated = O identificador do sistema deve terminar com as aspas correspondentes. - SpaceRequiredAfterPUBLIC = São necessários espaços em branco após a palavra-chave PUBLIC na declaração DOCTYPE. - QuoteRequiredInPublicID = O identificador público deve começar com aspas simples ou duplas. - PublicIDUnterminated = O identificador público deve terminar com as aspas correspondentes. - PubidCharIllegal = O caractere XML (Unicode: 0x{0}) não é permitido no identificador público. - SpaceRequiredBetweenPublicAndSystem = Espaços em branco são necessários entre publicId e systemId. -# 2.8 Prolog and Document Type Declaration - MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = O espaço em branco é necessário após "''. - DoctypedeclNotClosed = A declaração do tipo de documento do tipo de elemento "{0}" deve terminar com '']''. - PEReferenceWithinMarkup = A referência da entidade do parâmetro "%{0};" não pode ocorrer na marcação no subconjunto interno do DTD. - MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = As declarações de marcação contidas ou apontadas pela declaração do tipo de documento devem estar corretas. -# 2.10 White Space Handling - MSG_XML_SPACE_DECLARATION_ILLEGAL = Deve ser fornecida a declaração do atributo para "xml:space" como um tipo enumerado, cujo os únicos valores possíveis são "padrão" e "preserve". -# 3.2 Element Type Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = O espaço em branco é necessário após "''. -# 3.2.1 Element Content - MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = É necessário um caractere ''('' ou um tipo de elemento na declaração do tipo de elemento "{0}". - MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = É necessário um caractere '')'' na declaração do tipo de elemento "{0}". -# 3.2.2 Mixed Content - MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = É necessário um tipo de elemento na declaração do tipo de elemento "{0}". - MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = É necessário um caractere '')'' na declaração do tipo de elemento "{0}". - MixedContentUnterminated = O modelo de conteúdo misto "{0}" deve terminar com ")*" quando os tipos de elementos filhos forem restringidos. -# 3.3 Attribute-List Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = O espaço em branco é necessário após "". - IgnoreSectUnterminated = A seção condicional excluída deve terminar com "]]>". -# 4.1 Character and Entity References - NameRequiredInPEReference = O nome da entidade deve seguir imediatamente o '%' na referência da entidade do parâmetro. - SemicolonRequiredInPEReference = A referência da entidade do parâmetro "%{0};" deve terminar com o delimitador '';". -# 4.2 Entity Declarations - MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = O espaço em branco é necessário após "''. - MSG_DUPLICATE_ENTITY_DEFINITION = A entidade "{0}" foi declarada mais de uma vez. -# 4.2.2 External Entities - ExternalIDRequired = A declaração da entidade externa deve começar com "SYSTEM" ou "PUBLIC". - MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = O espaço em branco é necessário entre "PUBLIC" e o identificador público. - MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = O espaço em branco é necessário entre o identificador público e o identificador do sistema. - MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = O espaço em branco é necessário entre "SYSTEM" e o identificador do sistema. - MSG_URI_FRAGMENT_IN_SYSTEMID = O identificador do fragmento não deve ser especificado como parte do identificador do sistema "{0}". -# 4.7 Notation Declarations - MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = O espaço em branco é necessário após "''. - -# Validation messages - DuplicateTypeInMixedContent = O tipo de elemento "{1}" já foi especificado no modelo de conteúdo da declaração do elemento "{0}". - ENTITIESInvalid = O valor do atributo "{1}" do tipo ENTITIES deve ser o nome de uma ou mais entidades não submetidas a parsing. - ENTITYInvalid = O valor do atributo "{1}" do tipo ENTITY deve ser o nome de uma entidade não submetida a parsing. - IDDefaultTypeInvalid = O atributo do ID "{0}" deve ter um padrão declarado "#IMPLIED" ou "#REQUIRED". - IDInvalid = O valor do atributo "{0}" do ID de tipo deve ser um nome. - IDInvalidWithNamespaces = O valor do atributo "{0}" do ID de tipo deve ser um NCName quando os namespaces estiverem ativados. - IDNotUnique = O valor do atributo "{0}" do ID de tipo deve ser exclusivo no documento. - IDREFInvalid = O valor do atributo "{0}" do IDREF de tipo deve ser um nome. - IDREFInvalidWithNamespaces = O valor do atributo "{0}" do IDREF de tipo deve ser um NCName quando os namespaces estiverem ativados. - IDREFSInvalid = O valor do atributo "{0}" de tipo IDREFS deve ter um ou mais nomes. - ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = O texto de substituição da entidade do parâmetro "{0}" deve incluir as declarações aninhadas corretamente quando a referência da entidade for usada como uma declaração completa. - ImproperDeclarationNesting = O texto de substituição da entidade do parâmetro "{0}" deve incluir as declarações aninhadas corretamente. - ImproperGroupNesting = O texto de substituição da entidade do parâmetro "{0}" deve incluir pares de parênteses aninhados corretamente. - INVALID_PE_IN_CONDITIONAL = O texto de substituição da entidade do parâmetro "{0}" deve incluir a seção condicional inteira ou apenas INCLUDE ou IGNORE. - MSG_ATTRIBUTE_NOT_DECLARED = O atributo "{1}" deve ser declarado para o tipo de elemento "{0}". - MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = O atributo "{0}" com o valor "{1}" deve ter um valor da lista "{2}". - MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = O valor "{1}" do atributo "{0}" não deve ser alterado por meio da normalização (para "{2}") em um documento stand-alone. - MSG_CONTENT_INCOMPLETE = O conteúdo do tipo de elemento "{0}" está incompleto; ele deve corresponder a "{1}". - MSG_CONTENT_INVALID = O conteúdo do tipo de elemento "{0}" deve corresponder a "{1}". - MSG_CONTENT_INVALID_SPECIFIED = O conteúdo do tipo de elemento "{0}" deve corresponder a "{1}". Não são permitidos os filhos do tipo "{2}". - MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = O atributo "{1}" do tipo de elemento "{0}" tem um valor padrão e deve ser especificado em um documento stand-alone. - MSG_DUPLICATE_ATTDEF = O atributo "{1}" já foi declarado para o tipo de elemento "{0}". - MSG_ELEMENT_ALREADY_DECLARED = O tipo de elemento "{0}" não deve ser declarado mais de uma vez. - MSG_ELEMENT_NOT_DECLARED = O tipo de elemento "{0}" deve ser declarado. - MSG_GRAMMAR_NOT_FOUND = O documento é inválido: nenhuma gramática encontrada. - MSG_ELEMENT_WITH_ID_REQUIRED = Um elemento com o identificador "{0}" deve aparecer no documento. - MSG_EXTERNAL_ENTITY_NOT_PERMITTED = A referência à entidade externa "{0}" não é permitida em um documento stand-alone. - MSG_FIXED_ATTVALUE_INVALID = O atributo "{1}" com o valor "{2}" deve ter um valor "{3}". - MSG_MORE_THAN_ONE_ID_ATTRIBUTE = O tipo de elemento "{0}" já tem o atributo "{1}" do ID do tipo; um segundo atributo "{2}" do ID de tipo não é permitido. - MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = O tipo de elemento "{0}" já tem o atributo "{1}" do tipo NOTATION; um segundo atributo "{2}" do tipo NOTATION não é permitido. - MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = A notação "{1}" deve ser declarada quando referenciada na lista de tipos de notação do atributo "{0}". - MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = A notação "{1}" deve ser declarada quando referenciada na declaração da entidade não submetida a parsing para "{0}". - MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = A referência à entidade "{0}" declarada em uma entidade externa submetida a parsing não é permitida em um documento stand-alone. - MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = O atributo "{1}" é necessário e deve ser especificado para o tipo de elemento "{0}". - MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Não deve haver espaço em branco entre os elementos declarados em uma entidade externa submetida a parsing com o conteúdo do elemento em um documento stand-alone. - NMTOKENInvalid = O valor do atributo "{0}" do tipo NMTOKEN deve ser um token de nome. - NMTOKENSInvalid = O valor do atributo "{0}" do tipo NMTOKENS deve ter um ou mais tokens de nome. - NoNotationOnEmptyElement = O tipo de elemento "{0}" que foi declarado EMPTY não pode declarar o atributo "{1}" do tipo NOTATION. - RootElementTypeMustMatchDoctypedecl = O elemento-raiz do documento "{1}" deve corresponder à raiz de DOCTYPE "{0}". - UndeclaredElementInContentSpec = O modelo do conteúdo do elemento "{0}" refere-se ao elemento não declarado "{1}". - UniqueNotationName = A declaração da notação "{0}" não é exclusiva. Um Nome fornecido não deve ser declarado em mais de uma declaração de notação. - ENTITYFailedInitializeGrammar = Validador de ENTITYDatatype: Falha ao chamar o método de inicialização com uma referência de Gramática válida. \t - ENTITYNotUnparsed = ENTITY "{0}" não é submetida a parsing. - ENTITYNotValid = ENTITY "{0}" não é válida. - EmptyList = O valor dos tipos ENTITIES, IDREFS e NMTOKENS não pode estar na lista vazia. - -# Entity related messages -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ReferenceToExternalEntity = A referência da entidade externa "&{0};" não é permitida em um valor do atributo. - AccessExternalDTD = DTD Externo: falha ao ler o DTD ''{0}'' externo porque o acesso a ''{1}'' não é permitido em decorrência de uma restrição definida pela propriedade accessExternalDTD. - AccessExternalEntity = Entidade Externa: falha ao ler o documento ''{0}'' externo porque o acesso a ''{1}'' não é permitido em decorrência de uma restrição definida pela propriedade accessExternalDTD. - -# 4.1 Character and Entity References - EntityNotDeclared = A entidade "{0}" foi referenciada, mas não declarada. - ReferenceToUnparsedEntity = A referência da entidade não submetida a parsing "&{0};" não é permitida. - RecursiveReference = Referência da entidade recursiva "{0}". (Caminho de referência: {1}), - RecursiveGeneralReference = Referência geral da entidade recursiva "&{0};". (Caminho de referência: {1}), - RecursivePEReference = Referência da entidade do parâmetro recursivo "%{0};". (Caminho de referência: {1}), -# 4.3.3 Character Encoding in Entities - EncodingNotSupported = A codificação "{0}" não é suportada. - EncodingRequired = Uma entidade submetida a parsing não codificada em UTF-8 nem em UTF-16 deve conter uma declaração de codificação. - -# Namespaces support -# 4. Using Qualified Names - IllegalQName = O elemento ou o atributo não correspondem à produção QName: QName::=(NCName':')?NCName. - ElementXMLNSPrefix = O elemento "{0}" não pode ter "xmlns" como seu prefixo. - ElementPrefixUnbound = O prefixo "{0}" do elemento "{1}" não está vinculado. - AttributePrefixUnbound = O prefixo "{2}" do atributo "{1}" associado a um tipo de elemento "{0}" não está vinculado. - EmptyPrefixedAttName = O valor do atributo "{0}" é inválido. Associações de namespace prefixadas não podem ficar vazias. - PrefixDeclared = O prefixo do namespace "{0}" não foi declarado. - CantBindXMLNS = O prefixo "xmlns" não pode ser vinculado a um namespace explicitamente, assim como o namespace de "xmlns" não pode ser vinculado a um prefixo explicitamente. - CantBindXML = O prefixo "xml" não pode ser vinculado a um namespace diferente do namespace comum, assim como o namespace de "xml" não pode ser vinculado a um prefixo diferente de "xml". - MSG_ATT_DEFAULT_INVALID = O defaultValue "{1}" do atributo "{0}" não é válido para as restrições léxicas deste tipo de atributo. - -# REVISIT: These need messages - MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID - OpenQuoteMissingInDecl=OpenQuoteMissingInDecl - InvalidCharInLiteral=InvalidCharInLiteral - - -# Implementation limits - EntityExpansionLimit=JAXP00010001: O parser detectou mais de "{0}" expansões da entidade neste documento. Este é o limite imposto pelo JDK. - ElementAttributeLimit=JAXP00010002: o elemento "{0}" tem mais de "{1}" atributos. "{1}" é o limite imposto pelo JDK. - MaxEntitySizeLimit=JAXP00010003: o tamanho da entidade "{0}" é "{1}", o que excede o limite de "{2}" definido por "{3}". - TotalEntitySizeLimit=JAXP00010004: o tamanho acumulado de entidades é "{0}", o que excedeu o limite de "{1}" definido por "{2}". - MaxXMLNameLimit=JAXP00010005: o tamanho da entidade "{0}" é "{1}", o que excede o limite de "{2}" definido por "{3}". - MaxElementDepthLimit=JAXP00010006: o elemento "{0}" tem uma profundidade de "{1}" que excede o limite de "{2}" definido por "{3}". - EntityReplacementLimit=JAXP00010007: O número total de nós nas referências da entidade é de "{0}", o que está acima do limite de "{1}" definido por "{2}". - -# Catalog 09 -# Technical term, do not translate: catalog - CatalogException=JAXP00090001: O CatalogResolver foi ativado com o catálogo "{0}", mas uma CatalogException foi retornada. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties deleted file mode 100644 index b27963ef058..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties +++ /dev/null @@ -1,308 +0,0 @@ -# This file contains error and warning messages related to XML -# The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version - - BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. - FormatFailed = Ett internt fel inträffade vid formatering av följande meddelande:\n - -# Document messages - PrematureEOF=Filen har avslutats för tidigt. -# 2.1 Well-Formed XML Documents - RootElementRequired = Rotelementet krävs i ett välformulerat dokument. -# 2.2 Characters - - InvalidCharInCDSect = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i CDATA-sektionen. - InvalidCharInContent = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i dokumentets elementinnehåll. - TwoColonsInQName = En ogiltig andra förekomst av ':' hittades i elementtyp eller attributnamn. - ColonNotLegalWithNS = Kolon är inte tillåtet i namnet ''{0}'' om namnrymder är aktiverade. - InvalidCharInMisc = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i kodtext efter elementinnehållet. - InvalidCharInProlog = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i dokumentets prolog. - InvalidCharInXMLDecl = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i XML-deklarationen. -# 2.4 Character Data and Markup - CDEndInContent = Teckensekvensen "]]>" får inte förekomma i innehållet, såvida det inte används för att markera slut av CDATA-sektion. -# 2.7 CDATA Sections - CDSectUnterminated = CDATA-sektionen måste sluta med "]]>". -# 2.8 Prolog and Document Type Declaration - XMLDeclMustBeFirst = XML-deklarationen får endast förekomma allra överst i dokumentet. - EqRequiredInXMLDecl = Tecknet '' = '' måste anges efter "{0}" i XML-deklarationen. - QuoteRequiredInXMLDecl = Värdet som följer "{0}" i XML-deklarationen måste omges av citattecken. - XMLDeclUnterminated = XML-deklarationen måste avslutas med "?>". - VersionInfoRequired = Versionen krävs i XML-deklarationen. - SpaceRequiredBeforeVersionInXMLDecl = Tomt utrymme krävs före versionens pseudoattribut i XML-deklarationen. - SpaceRequiredBeforeEncodingInXMLDecl = Tomt utrymme krävs före kodningens pseudoattribut i XML-deklarationen. - SpaceRequiredBeforeStandalone = Tomt utrymme krävs före kodningens pseudoattribut i XML-deklarationen. - MarkupNotRecognizedInProlog = Dokumentets kodtext före rotelementet måste vara välformulerad. - MarkupNotRecognizedInMisc = Dokumentets kodtext efter rotelementet måste vara välformulerad. - AlreadySeenDoctype = DOCTYPE har redan tagits emot. - DoctypeNotAllowed = DOCTYPE är inte tillåtet om funktionen "http://apache.org/xml/features/disallow-doctype-decl" anges som true. - ContentIllegalInProlog = Innehållet är inte tillåtet i prologen. - ReferenceIllegalInProlog = Referensen är inte tillåten i prologen. -# Trailing Misc - ContentIllegalInTrailingMisc=Innehållet är inte tillåtet i efterföljande sektion. - ReferenceIllegalInTrailingMisc=Referensen är inte tillåten i efterföljande sektion. - -# 2.9 Standalone Document Declaration - SDDeclInvalid = Deklarationsvärdet för fristående dokument måste vara "yes" eller "no", inte "{0}". - SDDeclNameInvalid = Det fristående namnet i XML-deklarationen kan vara felstavat. -# 2.12 Language Identification - XMLLangInvalid = Attributvärdet "{0}" för xml:lang är en ogiltig språkidentifierare. -# 3. Logical Structures - ETagRequired = Elementtyp "{0}" måste avslutas med matchande sluttagg "". -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ElementUnterminated = Elementtyp "{0}" måste följas av någondera av attributspecifikationerna ">" eller "/>". - EqRequiredInAttribute = Attributnamnet "{1}" som associeras med elementtyp "{0}" måste följas av likhetstecknet ('' = ''). - OpenQuoteExpected = Öppningscitattecken förväntas för attributet "{1}" som associeras med elementtyp "{0}". - CloseQuoteExpected = Slutcitattecken förväntas för attributet "{1}" som associeras med elementtyp "{0}". - AttributeNotUnique = Attributet "{1}" har redan angetts för elementet "{0}". - AttributeNSNotUnique = Attributet "{1}" bundet till namnrymden "{2}" har redan angetts för elementet "{0}". - ETagUnterminated = Sluttaggen för elementtyp "{0}" måste avslutas med en ''>''-avgränsare. - MarkupNotRecognizedInContent = Elementinnehållet måste bestå av välformulerad(e) teckendata eller kodtext. - DoctypeIllegalInContent = DOCTYPE är inte tillåtet i innehållet. -# 4.1 Character and Entity References - ReferenceUnterminated = Referensen måste avslutas med en ';'-avgränsare. -# 4.3.2 Well-Formed Parsed Entities - ReferenceNotInOneEntity = Referensen måste finnas med inom samma tolkade enhet. - ElementEntityMismatch = Elementet "{0}" måste börja och sluta inom samma enhet. - MarkupEntityMismatch=XML-dokumentstrukturer måste börja och sluta inom samma enhet. - -# Messages common to Document and DTD -# 2.2 Characters - InvalidCharInAttValue = Ett ogiltigt XML-tecken (Unicode: 0x{2}) hittades i attributvärdet "{1}" och elementet är "{0}". - InvalidCharInComment = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i kommentaren. - InvalidCharInPI = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i bearbetningsinstruktionen. - InvalidCharInInternalSubset = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i den interna delmängden i DTD. - InvalidCharInTextDecl = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i textdeklarationen. -# 2.3 Common Syntactic Constructs - QuoteRequiredInAttValue = Attributvärdet "{1}" måste börja med antingen enkelt eller dubbelt citattecken. - LessthanInAttValue = Attributvärdet "{1}" som associeras med elementtyp "{0}" får inte innehålla något ''<''-tecken. - AttributeValueUnterminated = Attributvärdet "{1}" måste avslutas med matchande citattecken. -# 2.5 Comments - InvalidCommentStart = Kommentarer måste inledas med "". - COMMENT_NOT_IN_ONE_ENTITY = Kommentaren innesluts inte i samma enhet. -# 2.6 Processing Instructions - PITargetRequired = Bearbetningsinstruktionen måste börja med målnamnet. - SpaceRequiredInPI = Tomt utrymme krävs mellan bearbetningsinstruktionens mål och data. - PIUnterminated = Bearbetningsinstruktionen måste avslutas med "?>". - ReservedPITarget = Bearbetningsinstruktionens målmatchning "[xX][mM][lL]" är inte tillåten. - PI_NOT_IN_ONE_ENTITY = Bearbetningsinstruktionen innesluts inte i samma enhet. -# 2.8 Prolog and Document Type Declaration - VersionInfoInvalid = Ogiltig version "{0}". - VersionNotSupported = XML-versionen "{0}" stöds inte, endast XML 1.0 stöds. - VersionNotSupported11 = XML-versionen "{0}" stöds inte, endast XML 1.0 och XML 1.1 stöds. - VersionMismatch= En enhet kan inte inkludera någon annan enhet som har en senare version. -# 4.1 Character and Entity References - DigitRequiredInCharRef = Ett decimalt uttryck måste anges direkt efter "&#" i en teckenreferens. - HexdigitRequiredInCharRef = Ett hexadecimalt uttryck måste anges direkt efter "&#x" i en teckenreferens. - SemicolonRequiredInCharRef = Teckenreferensen måste avslutas med ';'-avgränsare. - InvalidCharRef = Teckenreferensen "&#{0}" är ett ogiltigt XML-tecken. - NameRequiredInReference = Enhetsnamnet måste omedelbart följas av '&' i enhetsreferensen. - SemicolonRequiredInReference = Referensen till enhet "{0}" måste avslutas med '';''-avgränsare. -# 4.3.1 The Text Declaration - TextDeclMustBeFirst = Textdeklarationen måste anges direkt i början av externt tolkad enhet. - EqRequiredInTextDecl = Ett likhetstecken ('' = '') måste anges efter "{0}" i textdeklarationen. - QuoteRequiredInTextDecl = Värdet som följer "{0}" i textdeklarationen måste omges av citattecken. - CloseQuoteMissingInTextDecl = avslutande citattecken saknas för värdet efter "{0}" i textdeklarationen. - SpaceRequiredBeforeVersionInTextDecl = Tomt utrymme krävs före versionens pseudoattribut i textdeklarationen. - SpaceRequiredBeforeEncodingInTextDecl = Tomt utrymme krävs före kodningens pseudoattribut i textdeklarationen. - TextDeclUnterminated = Textdeklarationen måste avslutas med "?>". - EncodingDeclRequired = Koddeklaration krävs i textdeklarationen. - NoMorePseudoAttributes = Inga fler pseudoattribut är tillåtna. - MorePseudoAttributes = Ytterligare pseudoattribut förväntas. - PseudoAttrNameExpected = Ett pseudoattributnamn förväntas. -# 4.3.2 Well-Formed Parsed Entities - CommentNotInOneEntity = Kommentaren måste finnas med inom samma tolkade enhet. - PINotInOneEntity = Bearbetningsinstruktionen måste finnas med inom samma tolkade enhet. -# 4.3.3 Character Encoding in Entities - EncodingDeclInvalid = Ogiltigt kodnamn, "{0}". - EncodingByteOrderUnsupported = Angiven byteordningsföljd i kodning "{0}" stöds inte. - InvalidByte = Ogiltig byte {0} i UTF-8-sekvensen för {1}-byte. - ExpectedByte = Förväntad byte {0} i UTF-8-sekvensen för {1}-byte. - InvalidHighSurrogate = Höga surrogatbitar i UTF-8-sekvens får inte överskrida 0x10, men 0x{0} hittades. - OperationNotSupported = Åtgärden "{0}" stöds inte i läsaren {1}. - InvalidASCII = Byte "{0}" ingår inte i ASCII-teckenuppsättningen (7 bitar). - CharConversionFailure = En enhet som fastställs använda ett visst kodformat får inte innehålla sekvenser som är otillåtna i kodningen. - -# DTD Messages -# 2.2 Characters - InvalidCharInEntityValue = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i det litterala enhetsvärdet. - InvalidCharInExternalSubset = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i den externa delmängden i DTD. - InvalidCharInIgnoreSect = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i sektionen för exkluderade villkor. - InvalidCharInPublicID = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i allmän identifierare. - InvalidCharInSystemID = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i systemidentifierare. -# 2.3 Common Syntactic Constructs - SpaceRequiredAfterSYSTEM = Tomt utrymme krävs efter nyckelordet SYSTEM i DOCTYPE-deklarationen. - QuoteRequiredInSystemID = Systemidentifieraren måste inledas med antingen enkelt eller dubbelt citattecken. - SystemIDUnterminated = Systemidentifieraren måste avslutas med matchande citattecken. - SpaceRequiredAfterPUBLIC = Tomma utrymmen krävs efter nyckelordet PUBLIC i DOCTYPE-deklarationen. - QuoteRequiredInPublicID = Den allmänna identifieraren måste inledas med antingen enkelt eller dubbelt citattecken. - PublicIDUnterminated = Den allmänna identifieraren måste avslutas med matchande citattecken. - PubidCharIllegal = Tecknet (Unicode: 0x{0}) är inte tillåtet i den allmänna identifieraren. - SpaceRequiredBetweenPublicAndSystem = Tomma utrymmen krävs mellan publicId och systemId. -# 2.8 Prolog and Document Type Declaration - MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Tomt utrymme krävs efter "''. - DoctypedeclNotClosed = Dokumenttypsdeklarationen för rotelementtypen "{0}" måste stängas med '']''. - PEReferenceWithinMarkup = Parameterreferensen "%{0};" får inte förekomma i kodtexten i den interna delmängden i DTD. - MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Kodtextdeklarationerna som finns med eller pekas till från dokumenttypdeklarationen måste vara välformulerade. -# 2.10 White Space Handling - MSG_XML_SPACE_DECLARATION_ILLEGAL = Attributdeklarationen för "xml:space" måste anges som uppräkningstyp vars enda möjliga värden är "default" och "preserve". -# 3.2 Element Type Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Tomt utrymme krävs efter "''. -# 3.2.1 Element Content - MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Tecknet ''('' eller en elementtyp måste anges i deklarationen av elementtyp "{0}". - MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Tecknet '')'' måste anges i deklarationen av elementtyp "{0}". -# 3.2.2 Mixed Content - MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = En elementtyp måste anges i deklarationen av elementtyp "{0}". - MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Tecknet '')'' måste anges i deklarationen av elementtyp "{0}". - MixedContentUnterminated = Modellen med blandat innehåll "{0}" måste avslutas med ")*" om typer av underordnade element är begränsade. -# 3.3 Attribute-List Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Tomt utrymme krävs efter "". - IgnoreSectUnterminated = Sektionen för exkluderade villkor måste avslutas med "]]>". -# 4.1 Character and Entity References - NameRequiredInPEReference = Enhetsnamnet måste omedelbart följas av '%' i parameterreferensen. - SemicolonRequiredInPEReference = Parameterreferensen "%{0};" måste avslutas med '';''-avgränsare. -# 4.2 Entity Declarations - MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Tomt utrymme krävs efter "''. - MSG_DUPLICATE_ENTITY_DEFINITION = Enheten "{0}" har deklarerats mer än en gång. -# 4.2.2 External Entities - ExternalIDRequired = Den externa enhetsdeklarationen måste inledas med antingen "SYSTEM" eller "PUBLIC". - MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Tomt utrymme krävs mellan "PUBLIC" och den allmänna identifieraren. - MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Tomt utrymme krävs mellan den allmänna identifieraren och systemidentifieraren. - MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Tomt utrymme krävs mellan "SYSTEM" och systemidentifieraren. - MSG_URI_FRAGMENT_IN_SYSTEMID = Fragmentidentifieraren får inte anges som del av systemidentifieraren "{0}". -# 4.7 Notation Declarations - MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Tomt utrymme krävs efter "''. - -# Validation messages - DuplicateTypeInMixedContent = Elementtyp "{1}" har redan angetts i modellen med innehåll för elementdeklarationen "{0}". - ENTITIESInvalid = Attributvärdet "{1}" av typen ENTITIES måste motsvara namnen på en eller flera otolkade enheter. - ENTITYInvalid = Attributvärdet "{1}" av typen ENTITY måste motsvara namnet på en otolkad enhet. - IDDefaultTypeInvalid = Id-attributet "{0}" måste innehålla deklarerat standardvärde "#IMPLIED" eller "#REQUIRED". - IDInvalid = Attributvärdet "{0}" av typen ID måste vara ett namn. - IDInvalidWithNamespaces = Attributvärdet "{0}" av typen ID måste vara NCName om namnrymder används. - IDNotUnique = Attributvärdet "{0}" av typen ID måste vara unikt inom dokumentet. - IDREFInvalid = Attributvärdet "{0}" av typen IDREF måste vara ett namn. - IDREFInvalidWithNamespaces = Attributvärdet "{0}" av typen IDREF måste vara NCName om namnrymder används. - IDREFSInvalid = Attributvärdet "{0}" av typen IDREFS måste vara ett eller flera namn. - ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Ersättningstexten för parameterenheten "{0}" måste inkludera korrekt kapslade deklarationer om enhetsreferensen används som fullständig deklaration. - ImproperDeclarationNesting = Ersättningstexten för parameterenheten "{0}" måste inkludera deklarationer som är korrekt kapslade. - ImproperGroupNesting = Ersättningstexten för parameterenheten "{0}" måste inkludera parentespar som är korrekt kapslade. - INVALID_PE_IN_CONDITIONAL = Ersättningstexten för parameterenheten "{0}" måst inkludera hela villkorssektionen eller endast INCLUDE eller IGNORE. - MSG_ATTRIBUTE_NOT_DECLARED = Attributet "{1}" måste deklareras för elementtyp "{0}". - MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attributet "{0}" med värdet "{1}" måste ha ett värde från listan "{2}". - MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = Värdet "{1}" för attributet "{0}" får inte ändras vid normalisering (till "{2}") i ett fristående dokument. - MSG_CONTENT_INCOMPLETE = Innehållet i elementtyp "{0}" är ofullständigt, det måste matcha "{1}". - MSG_CONTENT_INVALID = Innehållet i elementtyp "{0}" måste matcha "{1}". - MSG_CONTENT_INVALID_SPECIFIED = Innehållet i elementtyp "{0}" måste matcha "{1}". Underordnade till typ "{2}" är inte tillåtna. - MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attributet "{1}" för elementtyp "{0}" har ett standardvärde och måste anges i ett fristående dokument. - MSG_DUPLICATE_ATTDEF = Attributet "{1}" har redan deklarerats för elementtyp "{0}". - MSG_ELEMENT_ALREADY_DECLARED = Elementtyp "{0}" får deklareras endast en gång. - MSG_ELEMENT_NOT_DECLARED = Elementtyp "{0}" måste deklareras. - MSG_GRAMMAR_NOT_FOUND = Dokumentet är ogiltigt: hittade ingen grammatik. - MSG_ELEMENT_WITH_ID_REQUIRED = Ett element med identifieraren "{0}" måste finnas med i dokumentet. - MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Referens till den externa enheten "{0}" är inte tillåtet i fristående dokument. - MSG_FIXED_ATTVALUE_INVALID = Attributet "{1}" med värdet "{2}" måste ha värdet "{3}". - MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Elementtyp "{0}" har redan attributet "{1}" av id-typ, ett andra attribut "{2}" av samma typ är inte tillåtet. - MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Elementtyp "{0}" har redan attributet "{1}" av NOTATION-typ, ett andra attribut "{2}" av samma typ är inte tillåtet. - MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = Notationen "{1}" måste deklareras vid referens i notationstyplistan för attributet "{0}". - MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = Notationen "{1}" måste deklareras vid referens i otolkad enhetsdeklaration för "{0}". - MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Referensen till enheten "{0}" som har deklarerats i en externt tolkad enhet är inte tillåtet i fristående dokument. - MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attributet "{1}" måste anges för elementtyp "{0}". - MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Tomt utrymme får inte förekomma mellan element som har deklarerats i en externt tolkad enhet med elementinnehåll i fristående dokument. - NMTOKENInvalid = Attributvärdet "{0}" av typen NMTOKEN måste vara ett namntecken. - NMTOKENSInvalid = Attributvärdet "{0}" av typen NMTOKENS måste vara ett eller flera namntecken. - NoNotationOnEmptyElement = Elementtyp "{0}" med deklarationen EMPTY kan inte deklareras med attributet "{1}" av typen NOTATION. - RootElementTypeMustMatchDoctypedecl = Dokumentrotelementet "{1}" måste matcha DOCTYPE-roten "{0}". - UndeclaredElementInContentSpec = Modellen med innehåll för elementet "{0}" refererar till elementet "{1}" som inte har deklarerats. - UniqueNotationName = Deklarationen för notationen "{0}" är inte unik. Ett namn får inte deklareras i fler än en notationsdeklaration. - ENTITYFailedInitializeGrammar = ENTITYDatatype-validerare: Behov att anropa initieringsmetod med giltig grammatikreferens utfördes inte. \t - ENTITYNotUnparsed = ENTITY "{0}" är otolkat. - ENTITYNotValid = ENTITY "{0}" är inte giltigt. - EmptyList = Värdet för typ ENTITIES, IDREFS och NMTOKENS får inte vara en tom lista. - -# Entity related messages -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ReferenceToExternalEntity = Den externa enhetsreferensen "&{0};" tillåts inte i ett attributvärde. - AccessExternalDTD = Extern DTD: Kunde inte läsa extern DTD ''{0}'', eftersom ''{1}'' åtkomst inte tillåts på grund av begränsning som anges av accessExternalDTD-egenskapen. - AccessExternalEntity = Extern enhet: Kunde inte läsa externt dokument ''{0}'', eftersom ''{1}'' åtkomst inte tillåts på grund av begränsning som anges av accessExternalDTD-egenskapen. - -# 4.1 Character and Entity References - EntityNotDeclared = Enheten "{0}" har refererats, men är inte deklarerad. - ReferenceToUnparsedEntity = Den otolkade enhetsreferensen "&{0};" är inte tillåten. - RecursiveReference = Rekursiv enhetsreferens "{0}". (Referenssökväg: {1}), - RecursiveGeneralReference = Rekursiv allmän enhetsreferens "&{0};". (Referenssökväg: {1}), - RecursivePEReference = Rekursiv parameterreferens "%{0};". (Referenssökväg: {1}), -# 4.3.3 Character Encoding in Entities - EncodingNotSupported = Kodningen "{0}" stöds inte. - EncodingRequired = En tolkad enhet som inte är kodad i varken UTF-8 eller UTF-16 måste ha en kodningsdeklaration. - -# Namespaces support -# 4. Using Qualified Names - IllegalQName = Element eller attribut matchar inte QName-produktion: QName::=(NCName':')?NCName. - ElementXMLNSPrefix = Elementet "{0}" kan inte användas med "xmlns" som prefix. - ElementPrefixUnbound = Prefixet "{0}" för elementet "{1}" är inte bundet. - AttributePrefixUnbound = Prefixet "{2}" för attributet "{1}" som associeras med elementtyp "{0}" är inte bundet. - EmptyPrefixedAttName = Ogiltigt värde för attributet "{0}". Namnrymdsbindningar som prefix kanske inte är tomma. - PrefixDeclared = Namnrymdsprefixet "{0}" har inte deklarerats. - CantBindXMLNS = Prefixet "xmlns" kan inte bindas till en specifik namnrymd och namnrymden för "xmlns" kan inte heller bindas till ett specifikt prefix. - CantBindXML = Prefixet "xml" kan inte bindas till en namnrymd utöver den vanliga och namnrymden för "xml" kan inte heller bindas till något annat prefix än "xml". - MSG_ATT_DEFAULT_INVALID = defaultValue "{1}" för attributet "{0}" är inte tillåtet vad gäller de lexikala begränsningarna för denna attributtyp. - -# REVISIT: These need messages - MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID - OpenQuoteMissingInDecl=OpenQuoteMissingInDecl - InvalidCharInLiteral=InvalidCharInLiteral - - -# Implementation limits - EntityExpansionLimit=JAXP00010001: Parsern har påträffat fler än "{0}" enhetstillägg i dokumentet - gränsvärdet för JDK har uppnåtts. - ElementAttributeLimit=JAXP00010002: Elementet "{0}" har fler än "{1}" attribut, "{1}" är gränsvärdet för JDK. - MaxEntitySizeLimit=JAXP00010003: Längden på enheten "{0}" är "{1}" som överskriver gränsvärdet på "{2}" som anges av "{3}". - TotalEntitySizeLimit=JAXP00010004: Den ackumulerade storleken för enheter är "{0}", vilket överskrider gränsvärdet "{1}" som anges av "{2}". - MaxXMLNameLimit=JAXP00010005: Längden på enheten "{0}" är "{1}", vilket överskrider gränsvärdet "{2}" som anges av "{3}". - MaxElementDepthLimit=JAXP00010006: Elementet "{0}" har djupet "{1}" vilket är större än gränsen "{2}" som anges av "{3}". - EntityReplacementLimit=JAXP00010007: Det totala antalet noder i enhetsreferenser är "{0}", vilket är över gränsen "{1}" som har angetts av "{2}". - -# Catalog 09 -# Technical term, do not translate: catalog - CatalogException=JAXP00090001: CatalogResolver är aktiverat med katalogen "{0}", men ett CatalogException returneras. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties deleted file mode 100644 index 976fde3085c..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties +++ /dev/null @@ -1,308 +0,0 @@ -# This file contains error and warning messages related to XML -# The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version - - BadMessageKey = 找不到對應訊息索引鍵的錯誤訊息。 - FormatFailed = 格式化下列訊息時發生內部錯誤:\n - -# Document messages - PrematureEOF=檔案提早結束。 -# 2.1 Well-Formed XML Documents - RootElementRequired = 格式正確的文件需要根元素。 -# 2.2 Characters - - InvalidCharInCDSect = 在 CDATA 段落中找到無效的 XML 字元 (Unicode: 0x{0})。 - InvalidCharInContent = 在文件元素內容中找到無效的 XML 字元 (Unicode: 0x{0})。 - TwoColonsInQName = 在元素類型或屬性名稱中找到無效的第二個 ':'。 - ColonNotLegalWithNS = 啟用命名空間時,名稱 ''{0}'' 中不允許冒號。 - InvalidCharInMisc = 在元素內容結束後的標記中找到無效的 XML 字元 (Unicode: 0x{0})。 - InvalidCharInProlog = 在文件宣告集中找到無效的 XML 字元 (Unicode: 0x{0})。 - InvalidCharInXMLDecl = 在 XML 宣告中找到無效的 XML 字元 (Unicode: 0x{0})。 -# 2.4 Character Data and Markup - CDEndInContent = 字元順序 "]]>" 不可出現在內容中,除非用於標示 CDATA 段落的結尾。 -# 2.7 CDATA Sections - CDSectUnterminated = CDATA 段落結尾必須是 "]]>"。 -# 2.8 Prolog and Document Type Declaration - XMLDeclMustBeFirst = XML 宣告僅能出現在文件的開頭。 - EqRequiredInXMLDecl = 在 XML 宣告中,'' = '' 字元必須緊接在 "{0}" 之後。 - QuoteRequiredInXMLDecl = 在 XML 宣告中,"{0}" 之後的值必須是以引號括住的字串。 - XMLDeclUnterminated = XML 宣告結尾必須是 "?>"。 - VersionInfoRequired = XML 宣告中需要版本。 - SpaceRequiredBeforeVersionInXMLDecl = 在 XML 宣告中,版本虛擬屬性之前需要有空格。 - SpaceRequiredBeforeEncodingInXMLDecl = 在 XML 宣告中,編碼虛擬屬性之前需要有空格。 - SpaceRequiredBeforeStandalone = 在 XML 宣告中,編碼虛擬屬性之前需要有空格。 - MarkupNotRecognizedInProlog = 文件中根元素前的標記必須格式正確。 - MarkupNotRecognizedInMisc = 文件中根元素後的標記必須格式正確。 - AlreadySeenDoctype = doctype 已經出現過。 - DoctypeNotAllowed = 當功能 "http://apache.org/xml/features/disallow-doctype-decl" 設為真時,不允許 DOCTYPE。 - ContentIllegalInProlog = 宣告集中不允許內容。 - ReferenceIllegalInProlog = 宣告集中不允許參照。 -# Trailing Misc - ContentIllegalInTrailingMisc=尾端段落中不允許內容。 - ReferenceIllegalInTrailingMisc=尾端段落中不允許參照。 - -# 2.9 Standalone Document Declaration - SDDeclInvalid = 獨立文件宣告值必須是 "yes" 或 "no",而非 "{0}"。 - SDDeclNameInvalid = XML 宣告中的獨立名稱可能拼錯了。 -# 2.12 Language Identification - XMLLangInvalid = xml:lang 屬性值 "{0}" 為無效的語言 ID。 -# 3. Logical Structures - ETagRequired = 元素類型 "{0}" 必須由配對的結束標記 "" 終止。 -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ElementUnterminated = 元素類型 "{0}" 之後必須緊接屬性設定 ">" 或 "/>"。 - EqRequiredInAttribute = 關聯元素類型 "{0}" 的屬性名稱 "{1}" 之後必須緊接 '' = '' 字元。 - OpenQuoteExpected = 關聯元素類型 "{0}" 的屬性 "{1}" 預期有開頭引號。 - CloseQuoteExpected = 關聯元素類型 "{0}" 的屬性 "{1}" 預期有結束引號。 - AttributeNotUnique = 已經為元素 "{0}" 指定屬性 "{1}"。 - AttributeNSNotUnique = 已經為元素 "{0}" 指定連結命名空間 "{2}" 的屬性 "{1}"。 - ETagUnterminated = 元素類型 "{0}" 的結束標記結尾必須是 ''>'' 分界字元。 - MarkupNotRecognizedInContent = 元素的內容必須由格式正確的位描述資料或標記所組成。 - DoctypeIllegalInContent = 內容不允許 DOCTYPE。 -# 4.1 Character and Entity References - ReferenceUnterminated = 參照必須由 ';' 分界字元終止。 -# 4.3.2 Well-Formed Parsed Entities - ReferenceNotInOneEntity = 參照必須整個包含在相同的剖析實體內。 - ElementEntityMismatch = 元素 "{0}" 的開頭與結尾必須在相同實體內。 - MarkupEntityMismatch=XML 文件結構的開頭與結尾必須在相同實體內。 - -# Messages common to Document and DTD -# 2.2 Characters - InvalidCharInAttValue = 在屬性 "{1}" 的值中找到無效的 XML 字元 (Unicode: 0x{2}) 且元素為 "{0}"。 - InvalidCharInComment = 在註解中找到無效的 XML 字元 (Unicode: 0x{0})。 - InvalidCharInPI = 在處理指示中找到無效的 XML 字元 (Unicode: 0x{0})。 - InvalidCharInInternalSubset = 在 DTD 內部子集中找到無效的 XML 字元 (Unicode: 0x{0})。 - InvalidCharInTextDecl = 在文字宣告中找到無效的 XML 字元 (Unicode: 0x{0})。 -# 2.3 Common Syntactic Constructs - QuoteRequiredInAttValue = 屬性 "{1}" 的值開頭必須為單引號或雙引號字元。 - LessthanInAttValue = 關聯元素類型 "{0}" 之屬性 "{1}" 的值不可包含 ''<'' 字元。 - AttributeValueUnterminated = 屬性 "{1}" 的值結尾必須是配對的引號字元。 -# 2.5 Comments - InvalidCommentStart = 註解開頭必須為 ""。 - COMMENT_NOT_IN_ONE_ENTITY = 註解未包含在相同實體內。 -# 2.6 Processing Instructions - PITargetRequired = 處理指示的開頭必須是目標的名稱。 - SpaceRequiredInPI = 處理指示目標與資料之間需要空格。 - PIUnterminated = 處理指示結尾必須是 "?>"。 - ReservedPITarget = 不允許符合 "[xX][mM][lL]" 的處理指示目標。 - PI_NOT_IN_ONE_ENTITY = 處理指示未包含在相同實體內。 -# 2.8 Prolog and Document Type Declaration - VersionInfoInvalid = 無效的版本 "{0}"。 - VersionNotSupported = 不支援 XML 版本 "{0}",僅支援 XML 1.0。 - VersionNotSupported11 = 不支援 XML 版本 "{0}",僅支援 XML 1.0 與 XML 1.1。 - VersionMismatch= 實體不可包含較新版本的其他實體。 -# 4.1 Character and Entity References - DigitRequiredInCharRef = 在字元參照中,十進位表示法必須緊接在 "&#" 之後。 - HexdigitRequiredInCharRef = 在字元參照中,十六進位表示法必須緊接在 "&#x" 之後。 - SemicolonRequiredInCharRef = 字元參照的結尾必須是 ';' 分界字元。 - InvalidCharRef = 字元參照 "&#{0}" 為無效的 XML 字元。 - NameRequiredInReference = 在實體參照中,實體名稱必須緊接在 '&' 之後。 - SemicolonRequiredInReference = 實體 "{0}" 的參照結尾必須為 '';'' 分界字元。 -# 4.3.1 The Text Declaration - TextDeclMustBeFirst = 文字宣告僅能出現在外部剖析實體的開頭。 - EqRequiredInTextDecl = 在文字宣告中,'' = '' 字元必須緊接在 "{0}" 之後。 - QuoteRequiredInTextDecl = 文字宣告中 "{0}" 之後的值必須是以引號括住的字串。 - CloseQuoteMissingInTextDecl = 文字宣告中,遺漏 "{0}" 之後的值的結束引號。 - SpaceRequiredBeforeVersionInTextDecl = 在文字宣告中,版本虛擬屬性之前需要有空格。 - SpaceRequiredBeforeEncodingInTextDecl = 在文字宣告中,編碼虛擬屬性之前需要有空格。 - TextDeclUnterminated = 文字宣告結尾必須是 "?>"。 - EncodingDeclRequired = 文字宣告中需要編碼宣告。 - NoMorePseudoAttributes = 不允許更多的虛擬屬性。 - MorePseudoAttributes = 預期更多的虛擬屬性。 - PseudoAttrNameExpected = 預期一個虛擬屬性名稱。 -# 4.3.2 Well-Formed Parsed Entities - CommentNotInOneEntity = 註解必須整個包含在相同的剖析實體內。 - PINotInOneEntity = 處理指示必須整個包含在相同的剖析實體內。 -# 4.3.3 Character Encoding in Entities - EncodingDeclInvalid = 無效的編碼名稱 "{0}"。 - EncodingByteOrderUnsupported = 不支援編碼 "{0}" 的指定位元組順序。 - InvalidByte = {1}-byte UTF-8 序列的無效位元組 {0}。 - ExpectedByte = {1}-byte UTF-8 序列預期的位元組 {0}。 - InvalidHighSurrogate = UTF-8 序列中高替代位元不可超過 0x10,但找到 0x{0}。 - OperationNotSupported = {1} 讀取器不支援作業 "{0}"。 - InvalidASCII = 組元組 "{0}" 不是 (7 位元) ASCII 字元集的成員。 - CharConversionFailure = 決定使用特定編碼的實體,在該編碼中不可包含無效的序列。 - -# DTD Messages -# 2.2 Characters - InvalidCharInEntityValue = 在文字實體值中找到無效的 XML 字元 (Unicode: 0x{0})。 - InvalidCharInExternalSubset = 在 DTD 外部子集中找到無效的 XML 字元 (Unicode: 0x{0})。 - InvalidCharInIgnoreSect = 在排除的條件性段落中找到無效的 XML 字元 (Unicode: 0x{0})。 - InvalidCharInPublicID = 在公用 ID 中找到無效的 XML 字元 (Unicode: 0x{0})。 - InvalidCharInSystemID = 在系統 ID 中找到無效的 XML 字元 (Unicode: 0x{0})。 -# 2.3 Common Syntactic Constructs - SpaceRequiredAfterSYSTEM = 在 DOCTYPE 宣告中關鍵字 SYSTEM 之後需要空格。 - QuoteRequiredInSystemID = 系統 ID 的開頭必須為單引號或雙引號字元。 - SystemIDUnterminated = 系統 ID 的結尾必須是配對的引號字元。 - SpaceRequiredAfterPUBLIC = 在 DOCTYPE 宣告中關鍵字 PUBLIC 之後需要空格。 - QuoteRequiredInPublicID = 公用 ID 的開頭必須為單引號或雙引號字元。 - PublicIDUnterminated = 公用 ID 的結尾必須是配對的引號字元。 - PubidCharIllegal = 公用 ID 中不允許字元 (Unicode: 0x{0})。 - SpaceRequiredBetweenPublicAndSystem = publicId 與 systemId 之間需要空格。 -# 2.8 Prolog and Document Type Declaration - MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = 在文件類型宣告中 "''。 - DoctypedeclNotClosed = 根元素類型 "{0}" 的文件類型宣告結尾必須為 '']''。 - PEReferenceWithinMarkup = DTD 內部字集的標記內不能出現參數實體參照 "%{0};"。 - MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = 文件類型宣告包含或指向的標記宣告必須格式正確。 -# 2.10 White Space Handling - MSG_XML_SPACE_DECLARATION_ILLEGAL = "xml:space" 的屬性宣告必須指定為列舉類型,其可能的值為 "default" 與 "preserve"。 -# 3.2 Element Type Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = 在元素類型宣告中 "''。 -# 3.2.1 Element Content - MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = 元素類型 "{0}" 的宣告中需要一個 ''('' 字元或元素類型。 - MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = 元素類型 "{0}" 的宣告中需要一個 '')''。 -# 3.2.2 Mixed Content - MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = 元素類型 "{0}" 的宣告中需要一個元素類型。 - MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = 元素類型 "{0}" 的宣告中需要一個 '')''。 - MixedContentUnterminated = 子項元素的類型受到限制時,混合內容模型 "{0}" 的結尾必須為 ")*"。 -# 3.3 Attribute-List Declarations - MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = 在 attribute-list 宣告中 ""。 - IgnoreSectUnterminated = 排除條件性段落結尾必須是 "]]>"。 -# 4.1 Character and Entity References - NameRequiredInPEReference = 在參數實體參照中,實體名稱必須緊接在 '%' 之後。 - SemicolonRequiredInPEReference = 參數實體參照 "%{0};" 的結尾必須為 '';'' 分界字元。 -# 4.2 Entity Declarations - MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = 在實體宣告中 "''。 - MSG_DUPLICATE_ENTITY_DEFINITION = 實體 "{0}" 宣告超過一次以上。 -# 4.2.2 External Entities - ExternalIDRequired = 外部實體宣告的開頭必須為 "SYSTEM" 或 "PUBLIC"。 - MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = "PUBLIC" 與公用 ID 之間需要空格。 - MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = 公用 ID 與系統 ID 之間需要空格。 - MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = "SYSTEM" 與系統 ID 之間需要空格。 - MSG_URI_FRAGMENT_IN_SYSTEMID = 片段 ID 不應指定為系統 ID "{0}" 的一部分。 -# 4.7 Notation Declarations - MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = 在表示法宣告中 "''。 - -# Validation messages - DuplicateTypeInMixedContent = 元素宣告 "{0}" 的內容模型中已經指定元素類型 "{1}"。 - ENTITIESInvalid = 類型 ENTITIES 的屬性值 "{1}" 必須是一或多個未剖析實體的名稱。 - ENTITYInvalid = 類型 ENTITY 的屬性值 "{1}" 必須是一個未剖析實體的名稱。 - IDDefaultTypeInvalid = ID 屬性 "{0}" 必須具有 "#IMPLIED" 或 "#REQUIRED" 的宣告預設。 - IDInvalid = 類型 ID 的屬性值 "{0}" 必須是名稱。 - IDInvalidWithNamespaces = 啟用命名空間時,類型 ID 的屬性值 "{0}" 必須是 NCName。 - IDNotUnique = 類型 ID 的屬性值 "{0}" 必須是文件內的唯一值。 - IDREFInvalid = 類型 IDREF 的屬性值 "{0}" 必須是名稱。 - IDREFInvalidWithNamespaces = 啟用命名空間時,類型 IDREF 的屬性值 "{0}" 必須是 NCName。 - IDREFSInvalid = 類型 IDREFS 的屬性值 "{0}" 必須是一或多個名稱。 - ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = 當實體參照當作完整宣告時,參數實體 "{0}" 的取代文字必須包含正確巢狀結構的宣告。 - ImproperDeclarationNesting = 參數實體 "{0}" 的取代文字必須包含正確巢狀結構的宣告。 - ImproperGroupNesting = 參數實體 "{0}" 的取代文字必須包含正確巢狀結構的成對括號。 - INVALID_PE_IN_CONDITIONAL = 參數實體 "{0}" 的取代文字必須包含整個條件性段落或僅包含 INCLUDE 或 IGNORE。 - MSG_ATTRIBUTE_NOT_DECLARED = 元素類型 "{0}" 必須宣告屬性 "{1}"。 - MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = 具有值 "{1}" 的屬性 "{0}" 必須具有來自清單 "{2}" 的值。 - MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = 在獨立文件中,屬性 "{0}" 的值 "{1}" 不可透過正規化進行變更 (成為 "{2}")。 - MSG_CONTENT_INCOMPLETE = 元素類型 "{0}" 的內容不完整,它必須配對 "{1}"。 - MSG_CONTENT_INVALID = 元素類型 "{0}" 的內容必須配對 "{1}"。 - MSG_CONTENT_INVALID_SPECIFIED = 元素類型 "{0}" 的內容必須配對 "{1}"。不允許類型 "{2}" 的子項。 - MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = 元素類型 "{0}" 的屬性 "{1}" 具有預設值,且必須在獨立文件中指定。 - MSG_DUPLICATE_ATTDEF = 元素類型 "{0}" 已經宣告屬性 "{1}"。 - MSG_ELEMENT_ALREADY_DECLARED = 元素類型 "{0}" 不可宣告超過一次以上。 - MSG_ELEMENT_NOT_DECLARED = 必須宣告元素類型 "{0}"。 - MSG_GRAMMAR_NOT_FOUND = 文件無效: 找不到文法。 - MSG_ELEMENT_WITH_ID_REQUIRED = ID 為 "{0}" 的元素必須出現在文件中。 - MSG_EXTERNAL_ENTITY_NOT_PERMITTED = 獨立文件中不允許參照外部實體 "{0}"。 - MSG_FIXED_ATTVALUE_INVALID = 具有值 "{2}" 的屬性 "{1}" 必須具有 "{3}" 的值。 - MSG_MORE_THAN_ONE_ID_ATTRIBUTE = 元素類型 "{0}" 已經具有類型 ID 的屬性 "{1}",不允許該類型 ID 的第二個屬性 "{2}"。 - MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = 元素類型 "{0}" 已經具有類型 NOTATION 的屬性 "{1}",不允許該類型 NOTATION 的第二個屬性 "{2}"。 - MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = 若要在屬性 "{0}" 的表示法類型清單中參照表示法 "{1}",必須予以宣告。 - MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = 若要在 "{0}" 的未剖析實體宣告中參照表示法 "{1}",必須予以宣告。 - MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = 在獨立文件中,不允許參照外部剖析實體中宣告的實體 "{0}"。 - MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = 元素類型 "{0}" 需要屬性 "{1}" 且必須予以指定。 - MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = 在獨立文件中,具有元素內容的外部剖析實體中宣告的元素之間,不可有空格。 - NMTOKENInvalid = 類型 NMTOKEN 的屬性值 "{0}" 必須是名稱記號。 - NMTOKENSInvalid = 類型 NMTOKENS 的屬性值 "{0}" 必須是一或多個名稱記號。 - NoNotationOnEmptyElement = 宣告 EMPTY 的元素類型 "{0}" 不可宣告類型 NOTATION 的屬性 "{1}"。 - RootElementTypeMustMatchDoctypedecl = 文件根元素 "{1}" 必須配對 DOCTYPE 根 "{0}"。 - UndeclaredElementInContentSpec = 元素 "{0}" 的內容模型參照未宣告的元素 "{1}"。 - UniqueNotationName = 表示法 "{0}" 的宣告並非唯一。指定的 Name 不能在一個以上的表示法宣告中宣告。 - ENTITYFailedInitializeGrammar = ENTITYDatatype 驗證程式: 失敗。需要使用有效的文法參照來呼叫起始方法。\t - ENTITYNotUnparsed = ENTITY "{0}" 並非未經剖析。 - ENTITYNotValid = ENTITY "{0}" 無效。 - EmptyList = 類型 ENTITIES、IDREFS 與 NMTOKENS 的值不可為空白清單。 - -# Entity related messages -# 3.1 Start-Tags, End-Tags, and Empty-Element Tags - ReferenceToExternalEntity = 屬性值不允許參照外部實體 "&{0};"。 - AccessExternalDTD = 外部 DTD: 無法讀取外部 DTD ''{0}'',因為 accessExternalDTD 屬性設定的限制,所以不允許 ''{1}'' 存取。 - AccessExternalEntity = 外部實體: 無法讀取外部文件 ''{0}'',因為 accessExternalDTD 屬性設定的限制,所以不允許 ''{1}'' 存取。 - -# 4.1 Character and Entity References - EntityNotDeclared = 參照了實體 "{0}",但是未宣告。 - ReferenceToUnparsedEntity = 不允許未剖析的實體參照 "&{0};"。 - RecursiveReference = 遞迴實體參照 "{0}"。(參照路徑: {1}), - RecursiveGeneralReference = 遞迴一般實體參照 "&{0};"。(參照路徑: {1}), - RecursivePEReference = 遞迴參數實體參照 "%{0};"。(參照路徑: {1}), -# 4.3.3 Character Encoding in Entities - EncodingNotSupported = 不支援編碼 "{0}"。 - EncodingRequired = 未使用 UTF-8 或 UTF-16 編碼的剖析實體,必須包含編碼宣告。 - -# Namespaces support -# 4. Using Qualified Names - IllegalQName = 元素或屬性不符合 QName 產生: QName::=(NCName':')?NCName。 - ElementXMLNSPrefix = 元素 "{0}" 不能使用 "xmlns" 作為前置碼。 - ElementPrefixUnbound = 元素 "{1}" 的前置碼 "{0}" 未連結。 - AttributePrefixUnbound = 關聯元素類型 "{0}" 之屬性 "{1}" 的前置碼 "{2}" 未連結。 - EmptyPrefixedAttName = 屬性 "{0}" 的值無效。前置的命名空間連結不可為空白。 - PrefixDeclared = 未宣告命名空間前置碼 "{0}"。 - CantBindXMLNS = 前置碼 "xmlns" 無法明確連結任何命名空間; "xmlns" 的命名空間也無法明確連結任何前置碼。 - CantBindXML = 前置碼 "xml" 無法連結一般命名空間之外的任何命名空間; "xml" 的命名空間也無法連結 "xml" 之外的任何命名空間。 - MSG_ATT_DEFAULT_INVALID = 由於此屬性類型的語彙限制條件,屬性 "{0}" 的 defaultValue "{1}" 無效。 - -# REVISIT: These need messages - MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID - OpenQuoteMissingInDecl=OpenQuoteMissingInDecl - InvalidCharInLiteral=InvalidCharInLiteral - - -# Implementation limits - EntityExpansionLimit=JAXP00010001: 剖析器在此文件中遇到 "{0}" 個以上的實體擴充; 這是 JDK 所規定的限制。 - ElementAttributeLimit=JAXP00010002: 元素 "{0}" 具有超過 "{1}" 個以上的屬性,"{1}" 是 JDK 所規定的限制。 - MaxEntitySizeLimit=JAXP00010003: 實體 "{0}" 的長度為 "{1}",超過 "{3}" 所設定的 "{2}" 限制。 - TotalEntitySizeLimit=JAXP00010004: 實體的累積大小為 "{0}",超過 "{2}" 所設定的 "{1}" 限制。 - MaxXMLNameLimit=JAXP00010005: 實體 "{0}" 的長度為 "{1}",超過 "{3}" 所設定的 "{2}" 限制。 - MaxElementDepthLimit=JAXP00010006: 元素 "{0}" 的深度為 "{1}",超過 "{3}" 所設定的 "{2}" 限制。 - EntityReplacementLimit=JAXP00010007: 實體參照中的節點總數為 "{0}",超過 "{2}" 所設定的 "{1}" 限制。 - -# Catalog 09 -# Technical term, do not translate: catalog - CatalogException=JAXP00090001: CatalogResolver 已啟用目錄 "{0}",但傳回 CatalogException。 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties deleted file mode 100644 index 2b0da4402be..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties +++ /dev/null @@ -1,328 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file contains error and warning messages related to XML Schema -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. - FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n - -# For internal use - - Internal-Error = Error interno: {0}. - dt-whitespace = El valor de faceta de espacio en blanco no está disponible para simpleType de unión ''{0}'' - GrammarConflict = Una de las gramáticas devueltas del pool de gramática del usuario entra en conflicto con otra gramática. - -# Identity constraints - - AbsentKeyValue = cvc-identity-constraint.4.2.1.a: El elemento "{0}" no tiene ningún valor para la clave "{1}". - DuplicateField = Coincidencia duplicada en ámbito del campo "{0}". - DuplicateKey = cvc-identity-constraint.4.2.2: Valor de clave duplicado [{0}] declarado para la restricción de identidad "{2}" del elemento "{1}". - DuplicateUnique = cvc-identity-constraint.4.1: Valor único duplicado [{0}] declarado para la restricción de identidad "{2}" del elemento "{1}". - FieldMultipleMatch = cvc-identity-constraint.3: El campo "{0}" de la restricción de identidad "{1}" coincide con más de un valor en el ámbito de su selector; los campos deben coincidir con valores únicos. - FixedDiffersFromActual = El contenido de este elemento no es equivalente al valor del atributo "fixed" en la declaración del elemento del esquema. - KeyMatchesNillable = cvc-identity-constraint.4.2.3: El elemento "{0}" tiene una clave "{1}" que coincide con un elemento cuyo valor de Permite Nill está definido en true. - KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: No se han especificado suficientes valores para la restricción de identidad especificada para el elemento "{0}". - KeyNotFound = cvc-identity-constraint.4.3: No se ha encontrado la clave ''{0}'' con el valor ''{1}'' para la restricción de identidad del elemento ''{2}''. - KeyRefOutOfScope = Error de restricción de identidad: la restricción de identidad "{0}" tiene una referencia de clave que hace referencia a una clave o elemento único que se encuentra fuera de ámbito. - KeyRefReferNotFound = La declaración de referencia de clave "{0}" hace referencia a una clave desconocida con el nombre "{1}". - UnknownField = Error de restricción de identidad interno; campo desconocido "{0}" para la restricción de identidad "{2}" especificada para el elemento "{1}". - -# Ideally, we should only use the following error keys, not the ones under -# "Identity constraints". And we should cover all of the following errors. - -#validation (3.X.4) - - cvc-attribute.3 = cvc-attribute.3: El valor ''{2}'' del atributo ''{1}'' del elemento ''{0}'' no es válido con respecto a su tipo, ''{3}''. - cvc-attribute.4 = cvc-attribute.4: El valor ''{2}'' del atributo ''{1}'' del elemento ''{0}'' no es válido con respecto a su '{'value constraint'}' fija. El atributo debe tener un valor de ''{3}''. - cvc-complex-type.2.1 = cvc-complex-type.2.1: El elemento ''{0}'' no debe tener ningún carácter ni ningún elemento de información de elemento [secundarios], porque el tipo de contenido de tipo está vacío. - cvc-complex-type.2.2 = cvc-complex-type.2.2: El elemento ''{0}'' no debe tener ningún elemento [secundarios] y el valor debe ser válido. - cvc-complex-type.2.3 = cvc-complex-type.2.3: El elemento ''{0}'' no debe tener ningún carácter [secundarios], porque el tipo de contenido del tipo es sólo de elemento. - cvc-complex-type.2.4.a = cvc-complex-type.2.4.a: Se ha encontrado contenido no válido a partir del elemento ''{0}''. Se esperaba uno de ''{1}''. - cvc-complex-type.2.4.b = cvc-complex-type.2.4.b: El contenido del elemento ''{0}'' no está completo. Se esperaba uno de ''{1}''. - cvc-complex-type.2.4.c = cvc-complex-type.2.4.c: El comodín coincidente es estricto, pero no se ha encontrado ninguna declaración para el elemento ''{0}''. - cvc-complex-type.2.4.d = cvc-complex-type.2.4.d: Se ha encontrado contenido no válido a partir del elemento ''{0}''. No se espera ningún elemento secundario en este punto. - cvc-complex-type.2.4.d.1 = cvc-complex-type.2.4.d: Se ha encontrado contenido no válido a partir del elemento ''{0}''. No se espera ningún elemento secundario ''{1}'' en este punto. - cvc-complex-type.2.4.e = cvc-complex-type.2.4.e: ''{0}'' puede producirse un máximo de ''{2}'' veces en la secuencia actual. Se ha superado este límite. En este punto se espera uno de ''{1}''. - cvc-complex-type.2.4.f = cvc-complex-type.2.4.f: ''{0}'' puede producirse un máximo de ''{1}'' veces en la secuencia actual. Se ha superado este límite. No se espera ningún elemento secundario en este punto. - cvc-complex-type.2.4.g = cvc-complex-type.2.4.g: Se ha encontrado contenido no válido a partir del elemento ''{0}''. Se esperaba que ''{1}'' se produjese un mínimo de ''{2}'' veces en la secuencia actual. Se necesita una instancia más para cumplir este límite. - cvc-complex-type.2.4.h = cvc-complex-type.2.4.h: Se ha encontrado contenido no válido a partir del elemento ''{0}''. Se esperaba que ''{1}'' se produjese un mínimo de ''{2}'' veces en la secuencia actual. Se necesitan ''{3}'' instancias más para cumplir este límite. - cvc-complex-type.2.4.i = cvc-complex-type.2.4.i: El contenido del elemento ''{0}'' no está completo. Se esperaba que ''{1}'' se produjese un mínimo de ''{2}'' veces. Se necesita una instancia más para cumplir este límite. - cvc-complex-type.2.4.j = cvc-complex-type.2.4.j: El contenido del elemento ''{0}'' no está completo. Se esperaba que ''{1}'' se produjese un mínimo de ''{2}'' veces. Se necesitan ''{3}'' instancias más para cumplir este límite. - cvc-complex-type.3.1 = cvc-complex-type.3.1: El valor ''{2}'' del atributo ''{1}'' del elemento ''{0}'' no es válido con respecto al uso de atributo correspondiente. El atributo ''{1}'' tiene un valor fijo de ''{3}''. - cvc-complex-type.3.2.1 = cvc-complex-type.3.2.1: El elemento ''{0}'' no tiene un comodín de atributo para el atributo ''{1}''. - cvc-complex-type.3.2.2 = cvc-complex-type.3.2.2: No está permitido que el atributo ''{1}'' aparezca en el elemento ''{0}''. - cvc-complex-type.4 = cvc-complex-type.4: El atributo ''{1}'' debe aparecer en el elemento ''{0}''. - cvc-complex-type.5.1 = cvc-complex-type.5.1: En el elemento ''{0}'', el atributo ''{1}'' es un identificador de comodín, pero ya existe un identificador de comodín ''{2}''. Sólo puede existir uno. - cvc-complex-type.5.2 = cvc-complex-type.5.2: En el elemento ''{0}'', el atributo ''{1}'' es un identificador de comodín, pero ya existe un atributo ''{2}'' derivado del identificador entre los '{'attribute uses'}'. - cvc-datatype-valid.1.2.1 = cvc-datatype-valid.1.2.1: ''{0}'' no es un valor válido para ''{1}''. - cvc-datatype-valid.1.2.2 = cvc-datatype-valid.1.2.2: ''{0}'' no es un valor válido de tipo de lista ''{1}''. - cvc-datatype-valid.1.2.3 = cvc-datatype-valid.1.2.3: ''{0}'' no es un valor válido de tipo de unión ''{1}''. - cvc-elt.1.a = cvc-elt.1.a: No se ha encontrado la declaración del elemento ''{0}''. - cvc-elt.1.b = cvc-elt.1.b: El nombre del elemento no coincide con el nombre de la declaración de elemento. Se ha detectado ''{0}''. Se esperaba ''{1}''. - cvc-elt.2 = cvc-elt.2: El valor de '{'abstract'}' en la declaración de elemento para ''{0}'' debe ser false. - cvc-elt.3.1 = cvc-elt.3.1: El atributo ''{1}'' no debe aparecer en el elemento ''{0}'', porque la propiedad '{'nillable'}' de ''{0}'' tiene el valor false. - cvc-elt.3.2.1 = cvc-elt.3.2.1: El elemento ''{0}'' no debe tener ningún carácter ni información de elemento [secundarios], porque se ha especificado ''{1}''. - cvc-elt.3.2.2 = cvc-elt.3.2.2: No debe haber ningún valor fijo de '{'value constraint'}' para el elemento ''{0}'', porque se ha especificado ''{1}''. - cvc-elt.4.1 = cvc-elt.4.1: El valor ''{2}'' del atributo ''{1}'' del elemento ''{0}'' no es un QName válido. - cvc-elt.4.2 = cvc-elt.4.2: No se puede resolver ''{1}'' en una definición de tipo para el elemento ''{0}''. - cvc-elt.4.3 = cvc-elt.4.3: El tipo ''{1}'' no se ha derivado de forma válida de la definición de tipo ''{2}'' del elemento ''{0}''. - cvc-elt.5.1.1 = cvc-elt.5.1.1: '{'value constraint'}' ''{2}'' del elemento ''{0}'' no es un valor por defecto válido para el tipo ''{1}''. - cvc-elt.5.2.2.1 = cvc-elt.5.2.2.1: El elemento ''{0}'' no debe tener ningún elemento de información de elemento [secundarios]. - cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1: El valor ''{1}'' del elemento ''{0}'' no coincide con el valor de '{'value constraint'}' fijo ''{2}''. - cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2: El valor ''{1}'' del elemento ''{0}'' no coincide con el valor de '{'value constraint'}' ''{2}''. - cvc-enumeration-valid = cvc-enumeration-valid: El valor ''{0}'' no es de faceta válida con respecto a la enumeración ''{1}''. Debe ser un valor de la enumeración. - cvc-fractionDigits-valid = cvc-fractionDigits-valid: El valor ''{0}'' tiene {1} dígitos fraccionarios, pero el número de dígitos fraccionarios se ha limitado a {2}. - cvc-id.1 = cvc-id.1: No hay ningún enlace de identificador/IDREF para IDREF ''{0}''. - cvc-id.2 = cvc-id.2: Hay varias incidencias del valor de identificador ''{0}''. - cvc-id.3 = cvc-id.3: Un campo de restricción de identidad ''{0}'' coincide con el elemento ''{1}'', pero el elemento no es de tipo simple. - cvc-length-valid = cvc-length-valid: El valor ''{0}'' con la longitud = ''{1}'' no es de faceta válida con respecto a la longitud ''{2}'' para el tipo ''{3}''. - cvc-maxExclusive-valid = cvc-maxExclusive-valid: El valor ''{0}'' no es de faceta válida con respecto a maxExclusive ''{1}'' para el tipo ''{2}''. - cvc-maxInclusive-valid = cvc-maxInclusive-valid: El valor ''{0}'' no es de faceta válida con respecto a maxInclusive ''{1}'' para el tipo ''{2}''. - cvc-maxLength-valid = cvc-maxLength-valid: El valor ''{0}'' con la longitud = ''{1}'' no es de faceta válida con respecto a maxLength ''{2}'' para el tipo ''{3}''. - cvc-minExclusive-valid = cvc-minExclusive-valid: El valor ''{0}'' no es de faceta válida con respecto a minExclusive ''{1}''para el tipo ''{2}''. - cvc-minInclusive-valid = cvc-minInclusive-valid: El valor ''{0}'' no es de faceta válida con respecto a minInclusive ''{1}'' para el tipo ''{2}''. - cvc-minLength-valid = cvc-minLength-valid: El valor ''{0}'' con la longitud = ''{1}'' no es de faceta válida con respecto a minLength ''{2}'' para el tipo ''{3}''. - cvc-pattern-valid = cvc-pattern-valid: El valor ''{0}'' no es de faceta válida con respecto al patrón ''{1}'' para el tipo ''{2}''. - cvc-totalDigits-valid = cvc-totalDigits-valid: El valor''{0}'' tiene {1} dígitos totales, pero el número de dígitos totales se ha limitado a {2}. - cvc-type.1 = cvc-type.1: No se ha encontrado la definición de tipo ''{0}''. - cvc-type.2 = cvc-type.2: La definición de tipo no puede ser abstracta para el elemento {0}. - cvc-type.3.1.1 = cvc-type.3.1.1: El elemento ''{0}'' es un tipo simple, por lo que no puede tener atributos, excepto aquellos cuyo espacio de nombres sea ''http://www.w3.org/2001/XMLSchema-instance'' y cuyo [nombre local] sea de tipo ''type'', ''nil'', ''schemaLocation'' o ''noNamespaceSchemaLocation''. Sin embargo, se ha encontrado el atributo ''{1}''. - cvc-type.3.1.2 = cvc-type.3.1.2: El elemento''{0}'' es un tipo simple, por lo que no debe tener ningún elemento de información de elemento [secundarios]. - cvc-type.3.1.3 = cvc-type.3.1.3: El valor ''{1}'' del elemento ''{0}'' no es válido. - -#schema valid (3.X.3) - - schema_reference.access = schema_reference: fallo al leer el documento de esquema ''{0}'' porque no se permite el acceso ''{1}'' debido a una restricción definida por la propiedad accessExternalSchema. - schema_reference.4 = schema_reference.4: Fallo al leer el documento de esquema ''{0}'', porque 1) no se ha encontrado el documento; 2) no se ha podido leer el documento; 3) el elemento raíz del documento no es . - src-annotation = src-annotation: Los elementos de sólo pueden contener elementos de y , pero se ha encontrado ''{0}''. - src-attribute.1 = src-attribute.1: Las propiedades ''default'' y ''fixed'' no pueden estar presentes de forma simultánea en la declaración de atributo ''{0}''. Utilice sólo una de ellas. - src-attribute.2 = src-attribute.2: : La propiedad ''default'' está presente en el atributo ''{0}'', por lo que el valor de ''use'' debe ser ''optional''. - src-attribute.3.1 = src-attribute.3.1: 'ref' o 'name' deben estar presentes en una declaración de atributo local. - src-attribute.3.2 = src-attribute.3.2: El contenido debe coincidir con (annotation?) para la referencia de atributo ''{0}''. - src-attribute.4 = src-attribute.4: El atributo ''{0}'' tiene un atributo ''type'' y un secundario anónimo ''simpleType''. Sólo se permite uno de estos como atributo. - src-attribute_group.2 = src-attribute_group.2: La intersección de comodines no se puede expresar para el grupo de atributos ''{0}''. - src-attribute_group.3 = src-attribute_group.3: Se han detectado definiciones circulares para el grupo de atributos ''{0}''. El seguimiento de forma recurrente de las referencias de grupo de atributos vuelve de forma eventual a sí mismo. - src-ct.1 = src-ct.1: Error de representación de definición de tipo complejo para el tipo ''{0}''. Si se utiliza , el tipo de base debe ser complexType. ''{1}'' es simpleType. - src-ct.2.1 = src-ct.2.1: Error de representación de definición de tipo complejo para el tipo ''{0}''. Si se utiliza , el tipo de base debe ser complexType cuyo tipo de contenido sea simple o, sólo en caso de que se especifique una restricción, un tipo complejo con contenido mixto y partícula que se pueda vaciar o, sólo si se especifica la extensión, un tipo simple. ''{1}'' no cumple ninguna de estas condiciones. - src-ct.2.2 = src-ct.2.2: Error de representación de definición de tipo complejo para el tipo ''{0}''. Cuando complexType con simpleContent restringe un valor de complexType con contenido mixto y partícula que se pueda vaciar, debe haber un valor entre los secundarios de . - src-ct.4 = src-ct.4: Error de representación de definición de tipo complejo para el tipo ''{0}''. La intersección de los comodines no se puede expresar. - src-ct.5 = src-ct.5: Error de representación de definición de tipo complejo para el tipo ''{0}''. La unión de los comodines no se puede expresar. - src-element.1 = src-element.1: Las propiedades ''default'' y ''fixed'' no pueden estar presentes de forma simultánea en la declaración de elemento ''{0}''. Utilice sólo una de ellas. - src-element.2.1 = src-element.2.1: : 'ref' o 'name' deben estar presentes en una declaración de elemento local. - src-element.2.2 = src-element.2.2: Como ''{0}'' contiene el atributo ''ref'', su contenido debe coincidir con (annotation?). Sin embargo, se ha encontrado ''{1}''. - src-element.3 = src-element.3: El elemento ''{0}'' tiene un atributo ''type'' y un secundario ''anonymous type''. Solo se permite uno de estos para un elemento. - src-import.1.1 = src-import.1.1: El atributo de espacio de nombres ''{0}'' de un elemento de información de elemento no debe ser igual que el valor de targetNamespace del esquema en el que existe. - src-import.1.2 = src-import.1.2: Si el atributo de espacio de nombres no está presente en un elemento de información de elemento , el esquema delimitador debe tener un targetNamespace. - src-import.2 = src-import.2: El espacio de nombres del elemento raíz del documento ''{0}'' debe llamarse ''http://www.w3.org/2001/XMLSchema'' y el nombre local ''schema''. - src-import.3.1 = src-import.3.1: El atributo de espacio de nombres, ''{0}'', de un elemento de información de elemento debe ser idéntico al atributo targetNamespace, ''{1}'', del documento importado. - src-import.3.2 = src-import.3.2: Se ha encontrado un elemento de información de elemento que no tenía ningún atributo de espacio de nombres, por lo que el documento importado no puede tener un atributo targetNamespace. Sin embargo, se ha encontrado el valor de targetNamespace ''{1}'' en el documento importado. - src-include.1 = src-include.1: El espacio de nombres del elemento raíz del documento ''{0}'' debe llamarse ''http://www.w3.org/2001/XMLSchema'' y el nombre local ''schema''. - src-include.2.1 = src-include.2.1: El valor de targetNamespace del esquema de referencia, actualmente ''{1}'', debe ser igual al del esquema incluido, que actualmente es ''{0}''. - src-redefine.2 = src-redefine.2: El espacio de nombres del elemento raíz del documento ''{0}'' debe llamarse ''http://www.w3.org/2001/XMLSchema'' y el nombre local ''schema''. - src-redefine.3.1 = src-redefine.3.1: El valor de targetNamespace del esquema de referencia, que actualmente es ''{1}'', debe ser igual al del esquema redefinido, que actualmente es ''{0}''. - src-redefine.5.a.a = src-redefine.5.a.a: No se ha encontrado ningún secundario sin anotación de . Los secundarios de de los elementos deben tener descendientes de , con atributos de 'base' que hagan referencia a sí mismos. - src-redefine.5.a.b = src-redefine.5.a.b: ''{0}'' no es un elemento secundario válido. Los secundarios de de los elementos deben tener descendientes de , con atributos de ''base'' que hagan referencia a sí mismos. - src-redefine.5.a.c = src-redefine.5.a.c: ''{0}'' no tiene un atributo de ''base'' que hace referencia al elemento redefinido, ''{1}''. Los secundarios de de los elementos deben tener descendientes de , con atributos de ''base'' que hagan referencia a sí mismos. - src-redefine.5.b.a = src-redefine.5.b.a: No se ha encontrado ningún secundario sin anotación de . Los secundarios de de los elementos deben tener descendientes de o , con atributos de 'base' que hagan referencia a sí mismos. - src-redefine.5.b.b = src-redefine.5.b.b:No se ha encontrado ningún terciario sin anotación de . Los secundarios de de los elementos deben tener descendientes de o , con atributos de 'base' que hagan referencia a sí mismos. - src-redefine.5.b.c = src-redefine.5.b.c: ''{0}'' no es un elemento terciario válido. Los secundarios de de los elementos deben tener descendientes de o , con atributos de ''base'' que hagan referencia a sí mismos. - src-redefine.5.b.d = src-redefine.5.b.d: ''{0}'' no tiene un atributo de ''base'' que hace referencia al elemento redefinido, ''{1}''. Los secundarios de de los elementos deben tener descendientes de o , con atributos de ''base'' que hagan referencia a sí mismos. - src-redefine.6.1.1 = src-redefine.6.1.1: Si un secundario de grupo de un elemento contiene un grupo que hace referencia a sí mismo, debe tener exactamente 1; éste tiene ''{0}''. - src-redefine.6.1.2 = src-redefine.6.1.2: El grupo ''{0}'', que contiene una referencia a un grupo que se está redefiniendo debe tener un valor de ''minOccurs'' = ''maxOccurs'' = 1. - src-redefine.6.2.1 = src-redefine.6.2.1: No hay ningún grupo en el esquema redefinido con un nombre que coincida con ''{0}''. - src-redefine.6.2.2 = src-redefine.6.2.2: El grupo ''{0}'' no restringe correctamente al grupo que redefine; se ha violado la restricción: ''{1}''. - src-redefine.7.1 = src-redefine.7.1: Si un secundario de attributeGroup de un elemento contiene un valor de attributeGroup que hace referencia a sí mismo, debe tener exactamente 1; éste tiene {0}. - src-redefine.7.2.1 = src-redefine.7.2.1: No hay ningún valor de attributeGroup en el esquema redefinido con un nombre que coincida con ''{0}''. - src-redefine.7.2.2 = src-redefine.7.2.2: el valor de attributeGroup ''{0}'' no restringe correctamente el valor de attributeGroup que redefine; se ha violado la restricción: ''{1}''. - src-resolve = src-resolve: No se puede resolver el nombre ''{0}'' para un componente ''{1}''. - src-resolve.4.1 = src-resolve.4.1: Error al resolver el componente ''{2}''. Se ha detectado que ''{2}'' no tiene espacio de nombres, pero no se puede hacer referencia a los componentes sin espacio de nombres de destino desde el documento de esquema ''{0}''. Si se pretende que''{2}'' tenga un espacio de nombres, puede que sea necesario proporcionar un prefijo. Si se pretende que ''{2}'' no tenga ningún espacio de nombres, es necesario agregar un atributo ''import'' sin un atributo "namespace" a ''{0}''. - src-resolve.4.2 = src-resolve.4.2: Error al resolver el componente ''{2}''. Se ha detectado que ''{2}'' está en el espacio de nombres ''{1}'', pero no se puede hacer referencia a los componentes de este espacio de nombres desde el documento de esquema ''{0}''. Si es el espacio de nombres incorrecto, puede que sea necesario cambiar el prefijo ''{2}''. Si es el espacio de nombres correcto, es necesario agregar la etiqueta ''import'' correspondiente a ''{0}''. - src-simple-type.2.a = src-simple-type.2.a: Se ha encontrado un elemento que tiene un [atributo] base y un elemento entre sus [secundarios]. Sólo se permite uno. - src-simple-type.2.b = src-simple-type.2.b: Se ha encontrado un elemento que no tiene ni un [atributo] base ni un elemento entre sus [secundarios]. Se requiere uno. - src-simple-type.3.a = src-simple-type.3.a: Se ha encontrado un elemento que tiene un [atributo] itemType y un elemento entre sus [secundarios]. Sólo se permite uno. - src-simple-type.3.b = src-simple-type.3.b: Se ha encontrado un elemento que no tiene ni un [atributo] itemType ni un elemento entre sus [secundarios]. Se requiere uno. - src-single-facet-value = src-single-facet-value: La faceta ''{0}'' está definida más de una vez. - src-union-memberTypes-or-simpleTypes = src-union-memberTypes-or-simpleTypes: Un elemento debe tener un [atributo] memberTypes no vacío o al menos un elemento entre sus [secundarios]. - -#constraint valid (3.X.6) - - ag-props-correct.2 = ag-props-correct.2: Error en el grupo de atributos ''{0}''. Se han especificado usos de atributo duplicados con el mismo nombre y espacio de nombres de destino. El nombre del uso de atributo duplicado es ''{1}''. - ag-props-correct.3 = ag-props-correct.3: Error en el grupo de atributos ''{0}''. Dos declaraciones de atributo, ''{1}'' y ''{2}'', tienen tipos que se derivan del identificador. - a-props-correct.2 = a-props-correct.2: Valor de restricción de valor ''{1}'' no válido en el atributo ''{0}''. - a-props-correct.3 = a-props-correct.3: El atributo ''{0}'' no puede utilizar ''fixed'' ni ''default'', porque el valor de '{'type definition'}' del atributo es el identificador o se deriva del identificador. - au-props-correct.2 = au-props-correct.2: En la declaración de atributo de ''{0}'', se ha especificado un valor fijo de ''{1}''. Por lo tanto, si el uso del atributo que hace referencia a ''{0}'' también tiene un valor de '{'value constraint'}', debe fijarse y el valor debe ser ''{1}''. - cos-all-limited.1.2 = cos-all-limited.1.2:Debe aparecer un grupo de modelos 'all' en una partícula con '{'min occurs'}' = '{'max occurs'}' = 1 y dicha partícula debe formar parte de un par que constituya el valor de '{'content type'}' de una definición de tipo complejo. - cos-all-limited.2 = cos-all-limited.2: El valor de '{'max occurs'}' de un elemento de un grupo de modelos ''all'' debe ser 0 o 1. El valor ''{0}'' del elemento ''{1}'' no es válido. - cos-applicable-facets = cos-applicable-facets: El tipo {1} no permite la faceta ''{0}''. - cos-ct-extends.1.1 = cos-ct-extends.1.1: El tipo ''{0}'' se ha derivado por extensión del tipo ''{1}''. Sin embargo, el atributo ''final'' de ''{1}'' prohíbe la derivación por extensión. - cos-ct-extends.1.4.3.2.2.1.a = cos-ct-extends.1.4.3.2.2.1.a: El tipo de contenido de un tipo derivado y el de su base deben ser mixtos o ser ambos sólo de elemento. El tipo ''{0}'' es de sólo elemento, pero su tipo base no lo es. - cos-ct-extends.1.4.3.2.2.1.b = cos-ct-extends.1.4.3.2.2.1.b: El tipo de contenido de un tipo derivado y el de su base deben ser mixtos o ser ambos sólo de elemento. El tipo ''{0}'' es mixto, pero su tipo base no lo es. - cos-element-consistent = cos-element-consistent: Error para el tipo ''{0}''. Aparecen en el grupo de modelos varios elementos con el nombre ''{1}'' y con tipos diferentes. - cos-list-of-atomic = cos-list-of-atomic: En la definición de tipo de lista ''{0}'', el tipo ''{1}'' es un tipo de elemento de lista no válido porque no es atómico (''{1}'' es un tipo de lista o un tipo de unión que contiene una lista). - cos-nonambig = cos-nonambig: {0} y {1} (o los elementos de su grupo de sustitución) violan la "atribución de partícula única". Durante la validación a partir de este esquema, se creará ambigüedad para estas dos partículas. - cos-particle-restrict.a = cos-particle-restrict.a: La partícula derivada está vacía y la base no se puede vaciar. - cos-particle-restrict.b = cos-particle-restrict.b: La partícula base está vacía, pero la partícula derivada no. - cos-particle-restrict.2 = cos-particle-restrict.2: Restricción de partícula prohibida: ''{0}''. - cos-st-restricts.1.1 = cos-st-restricts.1.1: El tipo ''{1}'' es atómico, por lo que su '{'base type definition'}', ''{0}'', debe ser una definición de tipo simple atómico o un tipo de dato primitivo incorporado. - cos-st-restricts.2.1 = cos-st-restricts.2.1: En la definición de tipo de lista ''{0}'', el tipo ''{1}'' es un tipo de elemento no válido porque es un tipo de lista o un tipo de unión que contiene una lista. - cos-st-restricts.2.3.1.1 = cos-st-restricts.2.3.1.1: El componente '{'final'}' de '{'item type definition'}', ''{0}'', contiene ''list''. Significa que ''{0}'' no se puede utilizar como un tipo de elemento para el tipo de lista ''{1}''. - cos-st-restricts.3.3.1.1 = cos-st-restricts.3.3.1.1: El componente '{'final'}' de '{'member type definitions'}', ''{0}'', contiene ''union''. Significa que ''{0}'' no se puede utilizar como un tipo de miembro para el tipo de unión ''{1}''. - cos-valid-default.2.1 = cos-valid-default.2.1: El elemento ''{0}'' contiene una restricción de valor y debe tener un modelo de contenido mixto o simple. - cos-valid-default.2.2.2 = cos-valid-default.2.2.2: Como el elemento ''{0}'' tiene una '{'value constraint'}' y su definición de tipo tiene un '{'content type'}' mixto, la partícula de '{'content type'}' debe poder vaciarse. - c-props-correct.2 = c-props-correct.2: La cardinalidad de los campos de la referencia de clave ''{0}'' y la clave ''{1}'' deben coincidir. - ct-props-correct.3 = ct-props-correct.3: Se han detectado definiciones circulares para el tipo complejo ''{0}''. Significa que ''{0}'' está contenido en su propia jerarquía de tipos, lo que es un error. - ct-props-correct.4 = ct-props-correct.4: Error para el tipo ''{0}''. Se han especificado usos de atributo duplicados con el mismo nombre y espacio de nombres de destino. El nombre del uso de atributo duplicado es ''{1}''. - ct-props-correct.5 = ct-props-correct.5: Error para el tipo ''{0}''. Dos declaraciones de atributo, ''{1}'' y ''{2}'','' tienen tipos que se derivan del identificador. - derivation-ok-restriction.1 = derivation-ok-restriction.1: El tipo ''{0}'' se ha derivado por restricción del tipo ''{1}''. Sin embargo, ''{1}'' tiene una propiedad '{'final'}' que prohíbe la derivación por restricción. - derivation-ok-restriction.2.1.1 = derivation-ok-restriction.2.1.1: Error para el tipo ''{0}''. El uso de atributo ''{1}'' en este tipo tiene un valor ''use'' de ''{2}'', que es incoherente con el valor de ''required'' en un uso de atributo coincidente del tipo base. - derivation-ok-restriction.2.1.2 = derivation-ok-restriction.2.1.2: Error para el tipo ''{0}''. El uso de atributo ''{1}'' en este tipo tiene el tipo ''{2}'', que no se ha derivado de forma válida de ''{3}'', el tipo de uso de atributo coincidente del tipo base. - derivation-ok-restriction.2.1.3.a = derivation-ok-restriction.2.1.3.a: Error para el tipo ''{0}''. El uso de atributo ''{1}'' en este tipo tiene una restricción de valor efectivo que no es fija y la restricción de valor efectivo del uso de atributo coincidente en el tipo base es fija. - derivation-ok-restriction.2.1.3.b = derivation-ok-restriction.2.1.3.b: Error para el tipo ''{0}''. El uso de atributo ''{1}'' en este tipo tiene una restricción de valor efectivo fija con un valor de ''{2}'', que no es coherente con el valor de ''{3}'' para la restricción de valor efectivo fija del uso de atributo coincidente en el tipo base. - derivation-ok-restriction.2.2.a = derivation-ok-restriction.2.2.a: Error para el tipo ''{0}''. El uso de atributo ''{1}'' en este tipo no tiene un uso de atributo coincidente en la base y el tipo base no tiene un atributo de comodín. - derivation-ok-restriction.2.2.b = derivation-ok-restriction.2.2.b: Error para el tipo ''{0}''. El uso de atributo ''{1}'' en este tipo no tiene un uso de atributo coincidente en la base y el comodín en el tipo base no permite el espacio de nombres ''{2}'' de este uso de atributo. - derivation-ok-restriction.3 = derivation-ok-restriction.3: Error para el tipo ''{0}''. El uso de atributo ''{1}'' en el tipo base tiene el valor REQUIRED como true, pero no hay ningún uso de atributo coincidente en el tipo derivado. - derivation-ok-restriction.4.1 = derivation-ok-restriction.4.1: Error para el tipo ''{0}''. La derivación tiene un comodín de atributo, pero la base no tiene uno. - derivation-ok-restriction.4.2 = derivation-ok-restriction.4.2: Error para el tipo ''{0}''. El comodín de la derivación no es un subjuego de comodines válido del de la base. - derivation-ok-restriction.4.3 = derivation-ok-restriction.4.3: Error para el tipo ''{0}''. El contenido del proceso del comodín de la derivación ({1}) es más débil que el de la base ({2}). - derivation-ok-restriction.5.2.2.1 = derivation-ok-restriction.5.2.2.1: Error para el tipo ''{0}''. El tipo de contenido simple de este tipo, ''{1}'', no es una restricción válida del tipo de contenido simple de la base, ''{2}''. - derivation-ok-restriction.5.3.2 = derivation-ok-restriction.5.3.2: Error para el tipo ''{0}''. El tipo de contenido de este tipo está vacío, pero el tipo de contenido de la base, ''{1}'', no está vacío o no se puede vaciar. - derivation-ok-restriction.5.4.1.2 = derivation-ok-restriction.5.4.1.2: Error para el tipo ''{0}''. El tipo de contenido de este tipo es mixto, pero el tipo de contenido de la base, ''{1}'', no lo es. - derivation-ok-restriction.5.4.2 = derivation-ok-restriction.5.4.2: Error para el tipo ''{0}''. La partícula del tipo no es una restricción válida de la partícula de la base. - enumeration-required-notation = enumeration-required-notation: El tipo NOTATION ''{0}'', utilizado por {2} ''{1}'', debe tener un valor de faceta de enumeración que especifique los elementos de notación que utiliza este tipo. - enumeration-valid-restriction = enumeration-valid-restriction: El valor de enumeración ''{0}'' no se encuentra en el espacio reservado para el valor del tipo base, {1}. - e-props-correct.2 = e-props-correct.2: Valor de restricción de valor ''{1}'' no válido en el elemento ''{0}''. - e-props-correct.4 = e-props-correct.4: El valor de '{'type definition'}' del elemento ''{0}'' no se ha derivado de forma válida del valor de '{'type definition'}' de substitutionHead ''{1}'' o la propiedad '{'substitution group exclusions'}' de ''{1}'' no permite esta derivación. - e-props-correct.5 = e-props-correct.5: Un valor de '{'value constraint'}' no debe estar presente en el elemento ''{0}'', porque la '{'type definition'}' del elemento o el '{'content type'}' de '{'type definition'}' es un identificador o se deriva del identificador. - e-props-correct.6 = e-props-correct.6: Se ha detectado un grupo de sustitución circular para el elemento ''{0}''. - fractionDigits-valid-restriction = fractionDigits-valid-restriction: En la definición de {2}, el valor ''{0}'' para la faceta ''fractionDigits'' no es válido porque debe ser menor o igual que el valor de ''fractionDigits'' que se ha definido en ''{1}'' en uno de los tipos de ascendientes. - fractionDigits-totalDigits = fractionDigits-totalDigits: En la definición de {2}, el valor ''{0}'' para la faceta ''fractionDigits'' no es válido porque debe ser menor o igual que el valor de ''totalDigits'', que es ''{1}''. - length-minLength-maxLength.1.1 = length-minLength-maxLength.1.1: Para el tipo {0}, es un error que el valor de la longitud ''{1}'' sea inferior al valor de minLength ''{2}''. - length-minLength-maxLength.1.2.a = length-minLength-maxLength.1.2.a: Para el tipo {0}, es un error que la base no tener una faceta de minLength si la restricción actual tiene la faceta de minLength y la restricción o base actual tiene la faceta de longitud. - length-minLength-maxLength.1.2.b = length-minLength-maxLength.1.2.b: Para el tipo {0}, es un error que el valor de minLength actual ''{1}'' no sea igual al valor de minLength de base ''{2}''. - length-minLength-maxLength.2.1 = length-minLength-maxLength.2.1: Para el tipo {0}, es un error que el valor de la longitud ''{1}'' sea superior al valor de maxLength ''{2}''. - length-minLength-maxLength.2.2.a = length-minLength-maxLength.2.2.a: Para el tipo {0}, es un error que la base no tener una faceta de maxLength si la restricción actual tiene la faceta de maxLength y la restricción o base actual tiene la faceta de longitud. - length-minLength-maxLength.2.2.b = length-minLength-maxLength.2.2.b: Para el tipo {0}, es un error que el valor de maxLength actual ''{1}'' no sea igual al valor de maxLength de base ''{2}''. - length-valid-restriction = length-valid-restriction: Error para el tipo ''{2}''. El valor de la longitud = ''{0}'' debe ser igual que el valor del tipo base ''{1}''. - maxExclusive-valid-restriction.1 = maxExclusive-valid-restriction.1: Error para el tipo ''{2}''. El valor de maxExclusive =''{0}'' debe ser menor o igual que el valor de maxExclusive del tipo base ''{1}''. - maxExclusive-valid-restriction.2 = maxExclusive-valid-restriction.2: Error para el tipo ''{2}''. El valor de maxExclusive =''{0}'' debe ser menor o igual que el valor de maxInclusive del tipo base ''{1}''. - maxExclusive-valid-restriction.3 = maxExclusive-valid-restriction.3: Error para el tipo ''{2}''. El valor de maxExclusive =''{0}''debe ser mayor que el valor de minInclusive del tipo base ''{1}''. - maxExclusive-valid-restriction.4 = maxExclusive-valid-restriction.4: Error para el tipo ''{2}''. El valor de maxExclusive =''{0}'' debe ser mayor que el valor de minExclusive del tipo base ''{1}''. - maxInclusive-maxExclusive = maxInclusive-maxExclusive: Es un error especificar maxInclusive y maxExclusive para el mismo tipo de dato. En {2}, maxInclusive = ''{0}'' y maxExclusive = ''{1}''. - maxInclusive-valid-restriction.1 = maxInclusive-valid-restriction.1: Error para el tipo ''{2}''. El valor de maxInclusive =''{0}'' debe ser menor o igual que el valor de maxInclusive del tipo base ''{1}''. - maxInclusive-valid-restriction.2 = maxInclusive-valid-restriction.2: Error para el tipo ''{2}''. El valor de maxInclusive =''{0}'' debe ser menor que el valor de maxExclusive del tipo base ''{1}''. - maxInclusive-valid-restriction.3 = maxInclusive-valid-restriction.3: Error para el tipo ''{2}''. El valor de maxInclusive =''{0}'' debe ser mayor o igual que el valor de minInclusive del tipo base ''{1}''. - maxInclusive-valid-restriction.4 = maxInclusive-valid-restriction.4: Error para el tipo ''{2}''. El valor de maxInclusive =''{0}'' debe ser mayor que el valor de minExclusive del tipo base ''{1}''. - maxLength-valid-restriction = maxLength-valid-restriction: En la definición de {2}, el valor de maxLength = ''{0}'' debe ser menor o igual que el del tipo base ''{1}''. - mg-props-correct.2 = mg-props-correct.2: Se han detectado definiciones circulares para el grupo ''{0}''. El seguimiento recurrente de los valores '{'term'}' de las partículas provoca una partícula cuyo valor de '{'term'}' es el mismo grupo. - minExclusive-less-than-equal-to-maxExclusive = minExclusive-less-than-equal-to-maxExclusive: En la definición de {2}, el valor de minExclusive = ''{0}'' debe ser menor o igual que el valor de maxExclusive = ''{1}''. - minExclusive-less-than-maxInclusive = minExclusive-less-than-maxInclusive: En la definición de {2}, el valor de minExclusive = ''{0}''debe ser menor que el valor de maxInclusive = ''{1}''. - minExclusive-valid-restriction.1 = minExclusive-valid-restriction.1: Error para el tipo ''{2}''. El valor de minExclusive =''{0}'' debe ser mayor o igual que el valor de minExclusive del tipo base ''{1}''. - minExclusive-valid-restriction.2 = minExclusive-valid-restriction.2: Error para el tipo ''{2}''. El valor de minExclusive =''{0}'' debe ser menor o igual que el valor de maxInclusive del tipo base ''{1}''. - minExclusive-valid-restriction.3 = minExclusive-valid-restriction.3: Error para el tipo ''{2}''. El valor de minExclusive =''{0}'' debe ser mayor o igual que el valor de minInclusive del tipo base ''{1}''. - minExclusive-valid-restriction.4 = minExclusive-valid-restriction.4: Error para el tipo ''{2}''. El valor de minExclusive =''{0}'' debe ser menor que el valor de maxExclusive del tipo base ''{1}''. - minInclusive-less-than-equal-to-maxInclusive = minInclusive-less-than-equal-to-maxInclusive: En la definición de {2}, el valor de minInclusive = ''{0}'' debe ser menor o igual que el valor de maxInclusive = ''{1}''. - minInclusive-less-than-maxExclusive = minInclusive-less-than-maxExclusive: En la definición de {2}, el valor de minInclusive = ''{0}'' debe ser menor que el valor de maxExclusive = ''{1}''. - minInclusive-minExclusive = minInclusive-minExclusive: Es un error especificar minInclusive y minExclusive para el mismo tipo de dato. En {2}, minInclusive = ''{0}'' y minExclusive = ''{1}''. - minInclusive-valid-restriction.1 = minInclusive-valid-restriction.1: Error para el tipo ''{2}''. El valor de minInclusive =''{0}'' debe ser mayor o igual que el valor de minInclusive del tipo base ''{1}''. - minInclusive-valid-restriction.2 = minInclusive-valid-restriction.2: Error para el tipo ''{2}''. El valor de minInclusive =''{0}'' debe ser menor o igual que el valor de maxInclusive del tipo base ''{1}''. - minInclusive-valid-restriction.3 = minInclusive-valid-restriction.3: Error para el tipo ''{2}''. El valor de minInclusive =''{0}'' debe ser mayor que el valor de minExclusive del tipo base ''{1}''. - minInclusive-valid-restriction.4 = minInclusive-valid-restriction.4: Error para el tipo ''{2}''. El valor de minInclusive =''{0}'' debe ser menor que el valor de maxExclusive del tipo base ''{1}''. - minLength-less-than-equal-to-maxLength = minLength-less-than-equal-to-maxLength: En la definición de {2}, el valor de minLength = ''{0}'' debe ser menor que el valor de maxLength = ''{1}''. - minLength-valid-restriction = minLength-valid-restriction: En la definición de {2}, el valor de minLength = ''{0}'' debe ser mayor o igual que el del tipo base, ''{1}''. - no-xmlns = no-xmlns: El valor de {name} de una declaración de atributo no debe coincidir con 'xmlns'. - no-xsi = no-xsi: El valor de '{'target namespace'}' de una declaración de atributo no debe coincidir con ''{0}''. - p-props-correct.2.1 = p-props-correct.2.1: En la declaración de ''{0}'', el valor de ''minOccurs'' es ''{1}'', pero no debe ser superior al valor de ''maxOccurs'', que es ''{2}''. - rcase-MapAndSum.1 = rcase-MapAndSum.1: No existe ninguna asignación funcional completa entre las partículas. - rcase-MapAndSum.2 = rcase-MapAndSum.2: El rango de incidencia del grupo, ({0},{1}), no es una restricción válida del rango de incidencia del grupo base, ({2},{3}). - rcase-NameAndTypeOK.1 = rcase-NameAndTypeOK.1: Los elementos tienen nombres y espacios de nombres de destino distintos: El elemento''{0}'' en el espacio de nombres ''{1}'' y el elemento ''{2}'' en el espacio de nombres ''{3}''. - rcase-NameAndTypeOK.2 = rcase-NameAndTypeOK.2: Error para la partícula cuyo valor de '{'term'}' es la declaración de elemento ''{0}''. El valor de '{'nillable'}' de la declaración de elemento es true, pero la partícula correspondiente en el tipo base tiene una declaración de elemento cuyo valor de '{'nillable'}' es false. - rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: Error para la partícula cuyo valor de '{'term'}' es la declaración de elemento ''{0}''. Su rango de incidencia, ({1},{2}), no es una restricción válida del rango, ({3},{4}, de la partícula correspondiente en el tipo base. - rcase-NameAndTypeOK.4.a = rcase-NameAndTypeOK.4.a: El elemento ''{0}'' no es fijo, pero el elemento correspondiente en el tipo base es fijo con el valor ''{1}''. - rcase-NameAndTypeOK.4.b = rcase-NameAndTypeOK.4.b: El elemento ''{0}'' es fijo con el valor ''{1}'', pero el elemento correspondiente en el tipo base es fijo con el valor ''{2}''. - rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5: Las restricciones de identidad del elemento ''{0}'' no son un subjuego de las de la base. - rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6: Las sustituciones no permitidas del elemento ''{0}'' no son un subjuego de las de la base. - rcase-NameAndTypeOK.7 = rcase-NameAndTypeOK.7: El tipo de elemento ''{0}'', ''{1}'', no está derivado del tipo del elemento base, ''{2}''. - rcase-NSCompat.1 = rcase-NSCompat.1: El elemento ''{0}'' tiene un espacio de nombres ''{1}'' que no está permitido por el comodín de la base. - rcase-NSCompat.2 = rcase-NSCompat.2: Error para la partícula cuyo valor de '{'term'}' es la declaración de elemento ''{0}''. Su rango de incidencia, ({1},{2}), no es una restricción válida del rango, ({3},{4}, de la partícula correspondiente en el tipo base. - rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1: No existe ninguna asignación funcional completa entre las partículas. - rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2: El rango de incidencia del grupo, ({0},{1}), no es una restricción válida del rango de comodín de la base, ({2},{3}). - rcase-NSSubset.1 = rcase-NSSubset.1: El comodín no es un subjuego del comodín correspondiente de la base. - rcase-NSSubset.2 = rcase-NSSubset.2: El rango de incidencia del comodín, ({0},{1}), no es una restricción válida del de la base, ({2},{3}). - rcase-NSSubset.3 = rcase-NSSubset.3: El contenido del proceso del comodín, ''{0}'', es más débil que el de la base, ''{1}''. - rcase-Recurse.1 = rcase-Recurse.1: El rango de incidencia del grupo, ({0},{1}), no es una restricción válida del rango de incidencia del grupo base, ({2},{3}). - rcase-Recurse.2 = rcase-Recurse.2: No existe ninguna asignación funcional completa entre las partículas. - rcase-RecurseLax.1 = rcase-RecurseLax.1: El rango de incidencia del grupo, ({0},{1}), no es una restricción válida del rango de incidencia del grupo base, ({2},{3}). - rcase-RecurseLax.2 = rcase-RecurseLax.2: No existe ninguna asignación funcional completa entre las partículas. - rcase-RecurseUnordered.1 = rcase-RecurseUnordered.1: El rango de incidencia del grupo, ({0},{1}), no es una restricción válida del rango de incidencia del grupo base, ({2},{3}). - rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: No existe ninguna asignación funcional completa entre las partículas. -# We're using sch-props-correct.2 instead of the old src-redefine.1 -# src-redefine.1 = src-redefine.1: The component ''{0}'' is begin redefined, but its corresponding component isn't in the schema document being redefined (with namespace ''{2}''), but in a different document, with namespace ''{1}''. - sch-props-correct.2 = sch-props-correct.2: Un esquema no puede contener dos componentes globales con el mismo nombre; éste contiene dos incidencias de ''{0}''. - st-props-correct.2 = st-props-correct.2: Se han detectado definiciones circulares para el tipo simple ''{0}''. Significa que ''{0}'' está contenido en su propia jerarquía de tipos, lo que es un error. - st-props-correct.3 = st-props-correct.3: Error para el tipo ''{0}''. El valor de '{'final'}' de '{'base type definition'}', ''{1}'', prohíbe la derivación por restricción. - totalDigits-valid-restriction = totalDigits-valid-restriction: En la definición de {2}, el valor ''{0}'' para la faceta ''totalDigits'' no es válido porque debe ser menor o igual que el valor de ''totalDigits'' que se ha definido en ''{1}'' en uno de los tipos de ascendientes. - whiteSpace-valid-restriction.1 = whiteSpace-valid-restriction.1: En la definición de {0}, el valor ''{1}'' para la faceta ''whitespace'' no es válido porque el valor de ''whitespace'' se ha definido en ''collapse'' en uno de los tipos de ascendientes. - whiteSpace-valid-restriction.2 = whiteSpace-valid-restriction.2: En la definición de {0}, el valor ''preserve'' para la faceta ''whitespace'' no es válido porque el valor de ''whitespace'' se ha definido en ''replace'' en uno de los tipos de ascendientes. - -#schema for Schemas - - s4s-att-invalid-value = s4s-att-invalid-value: Valor de atributo no válido para ''{1}'' en el elemento ''{0}''. Motivo registrado: {2} - s4s-att-must-appear = s4s-att-must-appear: El atributo ''{1}'' debe aparecer en el elemento ''{0}''. - s4s-att-not-allowed = s4s-att-not-allowed: El atributo ''{1}'' no puede aparecer en el elemento ''{0}''. - s4s-elt-invalid = s4s-elt-invalid: El elemento ''{0}'' no es un elemento válido en un documento de esquema. - s4s-elt-must-match.1 = s4s-elt-must-match.1: El contenido de ''{0}'' debe coincidir con {1}. Se ha encontrado un problema que comienza en: {2}. - s4s-elt-must-match.2 = s4s-elt-must-match.2: El contenido de ''{0}'' debe coincidir con {1}. No se han encontrado suficientes elementos. - # the "invalid-content" messages provide less information than the "must-match" counterparts above. They're used for complex types when providing a "match" would be an information dump - s4s-elt-invalid-content.1 = s4s-elt-invalid-content.1: El contenido de ''{0}'' no es válido. El elemento ''{1}'' no es válido, está mal situado o aparece con demasiada frecuencia. - s4s-elt-invalid-content.2 = s4s-elt-invalid-content.2: El contenido de ''{0}'' no es válido. El elemento ''{1}'' no puede estar vacío. - s4s-elt-invalid-content.3 = s4s-elt-invalid-content.3: Los elementos de tipo''{0}'' no pueden aparecer después de las declaraciones como secundarios de un elemento de . - s4s-elt-schema-ns = s4s-elt-schema-ns: El espacio de nombres del elemento ''{0}'' debe ser del espacio de nombres del esquema, ''http://www.w3.org/2001/XMLSchema''. - s4s-elt-character = s4s-elt-character: Los caracteres distintos de los espacios en blanco no están permitidos en elementos de esquema que no sean ''xs:appinfo'' y ''xs:documentation''. Se ha obtenido ''{0}''. - -# codes not defined by the spec - - c-fields-xpaths = c-fields-xpaths: El valor de campo = ''{0}'' no es válido. - c-general-xpath = c-general-xpath: La expresión ''{0}'' no es válida con respecto al subjuego de XPath soportado por el esquema XML. - c-general-xpath-ns = c-general-xpath-ns: Un prefijo de espacio de nombres en la expresión XPath''{0}'' no estaba enlazado a ningún espacio de nombres. - c-selector-xpath = c-selector-xpath: El valor de selector = ''{0}'' no es válido; los valores de Xpath en el selector no pueden contener atributos. - EmptyTargetNamespace = EmptyTargetNamespace: En el documento de esquema ''{0}'', el valor del atributo ''targetNamespace'' no puede ser una cadena vacía. - FacetValueFromBase = FacetValueFromBase: En la declaración de tipo ''{0}'', el valor ''{1}'' de la faceta ''{2}'' debe proceder del espacio reservado para el valor del tipo base, ''{3}''. - FixedFacetValue = FixedFacetValue: En la definición de {3}, el valor ''{1}'' para la faceta ''{0}'' no es válido porque el valor de ''{0}'' se ha definido en ''{2}'' en uno de los tipos de ascendientes y '{'fixed'}' = true. - InvalidRegex = InvalidRegex: El valor del patrón ''{0}'' no es una expresión regular válida. El error registrado ha sido: ''{1}'' en la columna ''{2}''. - MaxOccurLimit = La configuración actual del analizador no permite que la definición del valor del atributo maxOccurs sea mayor que {0}. - PublicSystemOnNotation = PublicSystemOnNotation: Al menos un valor de ''public'' y ''system'' debe aparecer en el elemento ''notation''. - SchemaLocation = SchemaLocation: El valor de schemaLocation = ''{0}'' debe tener un número par de URI. - TargetNamespace.1 = TargetNamespace.1: Se esperaba el espacio de nombres ''{0}'', pero el espacio de nombres de destino del documento de esquema es ''{1}''. - TargetNamespace.2 = TargetNamespace.2: No se esperaba ningún espacio de nombres, pero el documento de esquema tiene un espacio de nombres de destino ''{1}''. - UndeclaredEntity = UndeclaredEntity: La entidad ''{0}'' no está declarada. - UndeclaredPrefix = UndeclaredPrefix: No se puede resolver ''{0}'' como QName: no se ha declarado el prefijo ''{1}''. - - -# JAXP 1.2 schema source property errors - - jaxp12-schema-source-type.1 = La propiedad ''http://java.sun.com/xml/jaxp/properties/schemaSource'' no puede tener un valor de tipo ''{0}''. Los posibles tipos de valor soportados son String, File, InputStream, InputSource o una matriz de estos tipos. - jaxp12-schema-source-type.2 = La propiedad ''http://java.sun.com/xml/jaxp/properties/schemaSource'' no puede tener un valor de matriz de tipo ''{0}''. Los posibles tipos de matriz soportados son Object, String, File, InputStream e InputSource. - jaxp12-schema-source-ns = Al utilizar una matriz de objetos como valor de la propiedad 'http://java.sun.com/xml/jaxp/properties/schemaSource', no es posible tener dos esquemas con el mismo espacio de nombres de destino. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties deleted file mode 100644 index 89e8f2d1acf..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties +++ /dev/null @@ -1,328 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file contains error and warning messages related to XML Schema -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = Le message d'erreur correspondant à la clé de message est introuvable. - FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n - -# For internal use - - Internal-Error = Erreur interne : {0}. - dt-whitespace = La valeur de facet de caractère non imprimable n''est pas disponible pour le simpleType d''union ''{0}'' - GrammarConflict = L'une des grammaires renvoyées à partir du pool de grammaires de l'utilisateur est en conflit avec une autre grammaire. - -# Identity constraints - - AbsentKeyValue = cvc-identity-constraint.4.2.1.a : L''élément "{0}" n''a aucune valeur pour la clé "{1}". - DuplicateField = Correspondance en double dans la portée du champ "{0}". - DuplicateKey = cvc-identity-constraint.4.2.2 : Valeur de clé en double [{0}] déclarée pour la contrainte d''identité "{2}" de l''élément "{1}". - DuplicateUnique = cvc-identity-constraint.4.1 : Valeur unique en double [{0}] déclarée pour la contrainte d''identité "{2}" de l''élément "{1}". - FieldMultipleMatch = cvc-identity-constraint.3 : Le champ "{0}" de la contrainte d''identité "{1}" concorde avec plusieurs valeurs dans la portée de son sélecteur ; les champs doivent concorder avec des valeurs uniques. - FixedDiffersFromActual = Le contenu de l'élément n'équivaut pas à la valeur de l'attribut "fixed" dans la déclaration de l'élément du schéma. - KeyMatchesNillable = cvc-identity-constraint.4.2.3 : L''élément "{0}" dispose de la clé "{1}" qui concorde avec un élément dont l''attribut nillable a la valeur True. - KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b : Le nombre de valeurs indiquées pour la contrainte d''identité de l''élément "{0}" est insuffisant. - KeyNotFound = cvc-identity-constraint.4.3 : La clé ''{0}'' ayant la valeur ''{1}'' est introuvable pour la contrainte d''identité de l''élément ''{2}''. - KeyRefOutOfScope = Erreur de contrainte d''identité : la contrainte d''identité "{0}" comporte une référence keyref se rapportant à une clé ou à une valeur unique hors portée. - KeyRefReferNotFound = La déclaration de référence de clé "{0}" se rapporte à une clé inconnue portant le nom "{1}". - UnknownField = Erreur de contrainte d''identité interne ; champ inconnu "{0}" pour la contrainte d''identité "{2}" indiquée pour l''élément "{1}". - -# Ideally, we should only use the following error keys, not the ones under -# "Identity constraints". And we should cover all of the following errors. - -#validation (3.X.4) - - cvc-attribute.3 = cvc-attribute.3 : La valeur ''{2}'' de l''attribut ''{1}'' de l''élément ''{0}'' n''est pas valide par rapport à son type, ''{3}''. - cvc-attribute.4 = cvc-attribute.4 : La valeur ''{2}'' de l''attribut ''{1}'' de l''élément ''{0}'' n''est pas valide par rapport à son attribut '{'value constraint'}' fixe. L''attribut doit avoir une valeur de ''{3}''. - cvc-complex-type.2.1 = cvc-complex-type.2.1 : L''élément ''{0}'' ne doit comporter aucun enfant ([children]) de type caractère ou élément d''information, car le type de contenu du type est vide. - cvc-complex-type.2.2 = cvc-complex-type.2.2 : L''élément ''{0}'' ne doit comporter aucun enfant ([children]) de type élément et la valeur doit être valide. - cvc-complex-type.2.3 = cvc-complex-type.2.3 : L''élément ''{0}'' ne doit comporter aucun enfant ([children]) de type caractère, car le type porte le type de contenu "element-only". - cvc-complex-type.2.4.a = cvc-complex-type.2.4.a : Contenu non valide trouvé à partir de l''élément ''{0}''. L''une des valeurs ''{1}'' est attendue. - cvc-complex-type.2.4.b = cvc-complex-type.2.4.b : Le contenu de l''élément ''{0}'' n''est pas complet. L''un des éléments ''{1}'' est attendu. - cvc-complex-type.2.4.c = cvc-complex-type.2.4.c : Le caractère générique concordant est strict, mais aucune déclaration ne peut être trouvée pour l''élément ''{0}''. - cvc-complex-type.2.4.d = cvc-complex-type.2.4.d : Contenu non valide trouvé à partir de l''élément ''{0}''. Aucun élément enfant n''est attendu à cet endroit. - cvc-complex-type.2.4.d.1 = cvc-complex-type.2.4.d : Contenu non valide trouvé à partir de l''élément ''{0}''. Aucun élément enfant ''{1}'' n''est attendu à cet endroit. - cvc-complex-type.2.4.e = cvc-complex-type.2.4.e : ''{0}'' peut se produire au maximum ''{2}'' fois dans la séquence en cours. Cette limite a été dépassée. Un des éléments ''{1}'' est attendu à cet endroit. - cvc-complex-type.2.4.f = cvc-complex-type.2.4.f : ''{0}'' peut se produire au maximum ''{1}'' fois dans la séquence en cours. Cette limite a été dépassée. Aucun élément enfant n''est attendu à cet endroit. - cvc-complex-type.2.4.g = cvc-complex-type.2.4.g : Contenu non valide trouvé à partir de l''élément ''{0}''. ''{1}'' est censé se produire au minimum ''{2}'' fois dans la séquence en cours. Une instance supplémentaire est requise pour respecter cette contrainte. - cvc-complex-type.2.4.h = cvc-complex-type.2.4.h : Contenu non valide trouvé à partir de l''élément ''{0}''. ''{1}'' est censé se produire au minimum ''{2}'' fois dans la séquence en cours. ''{3}'' instances supplémentaires sont requises pour respecter cette contrainte. - cvc-complex-type.2.4.i = cvc-complex-type.2.4.i : Le contenu de l''élément ''{0}'' n''est pas complet. ''{1}'' est censé se produire au minimum ''{2}'' fois. Une instance supplémentaire est requise pour respecter cette contrainte. - cvc-complex-type.2.4.j = cvc-complex-type.2.4.j : Le contenu de l''élément ''{0}'' n''est pas complet. ''{1}'' est censé se produire au minimum ''{2}'' fois. ''{3}'' instances supplémentaires sont requises pour respecter cette contrainte. - cvc-complex-type.3.1 = cvc-complex-type.3.1 : La valeur ''{2}'' de l''attribut ''{1}'' de l''élément ''{0}'' n''est pas valide par rapport à la syntaxe d''attribut correspondante. L''attribut ''{1}'' a une valeur fixe de ''{3}''. - cvc-complex-type.3.2.1 = cvc-complex-type.3.2.1 : L''élément ''{0}'' ne dispose d''aucun caractère générique d''attribut pour l''attribut ''{1}''. - cvc-complex-type.3.2.2 = cvc-complex-type.3.2.2 : L''attribut ''{1}'' n''est pas autorisé dans l''élément ''{0}''. - cvc-complex-type.4 = cvc-complex-type.4 : L''attribut ''{1}'' doit figurer dans l''élément ''{0}''. - cvc-complex-type.5.1 = cvc-complex-type.5.1 : Dans l''élément ''{0}'', l''attribut ''{1}'' est un ID générique. Or, il existe déjà un ID générique ''{2}''. Il ne peut en exister qu''un seul. - cvc-complex-type.5.2 = cvc-complex-type.5.2 : Dans l''élément ''{0}'', l''attribut ''{1}'' est un ID générique. Or, il existe déjà un attribut ''{2}'' dérivé de l''ID dans '{'attribute uses'}'. - cvc-datatype-valid.1.2.1 = cvc-datatype-valid.1.2.1 : ''{0}'' n''est pas une valeur valide pour ''{1}''. - cvc-datatype-valid.1.2.2 = cvc-datatype-valid.1.2.2 : ''{0}'' n''est pas une valeur valide du type de liste ''{1}''. - cvc-datatype-valid.1.2.3 = cvc-datatype-valid.1.2.3 : ''{0}'' n''est pas une valeur valide du type d''union ''{1}''. - cvc-elt.1.a = cvc-elt.1.a : Déclaration de l''élément ''{0}'' introuvable. - cvc-elt.1.b = cvc-elt.1.b : Le nom de l''élément ne concorde pas avec le nom de la déclaration d''élément. Trouvé : ''{0}''. Attendu : ''{1}''. - cvc-elt.2 = cvc-elt.2 : La valeur de l''attribut '{'abstract'}' dans la déclaration de l''élément pour ''{0}'' doit être False. - cvc-elt.3.1 = cvc-elt.3.1 : L''attribut ''{1}'' ne doit pas figurer dans l''élément ''{0}'', car la propriété '{'nillable'}' de ''{0}'' est False. - cvc-elt.3.2.1 = cvc-elt.3.2.1 : L''élément ''{0}'' ne doit comporter aucun enfant ([children]) de type caractère ou élément d''information, car ''{1}'' est indiqué. - cvc-elt.3.2.2 = cvc-elt.3.2.2 : Il ne doit y avoir aucun attribut '{'value constraint'}' fixe pour l''élément ''{0}'', car ''{1}'' est indiqué. - cvc-elt.4.1 = cvc-elt.4.1 : La valeur ''{2}'' de l''attribut ''{1}'' de l''élément ''{0}'' n''est pas un QName valide. - cvc-elt.4.2 = cvc-elt.4.2 : Impossible de résoudre ''{1}'' en une définition de type pour l''élément ''{0}''. - cvc-elt.4.3 = cvc-elt.4.3 : La dérivation du type ''{1}'' à partir de la définition de type ''{2}'' de l''élément "{0}" n''est pas valide. - cvc-elt.5.1.1 = cvc-elt.5.1.1 : L''attribut '{'value constraint'}' ''{2}'' de l''élément ''{0}'' n''est pas une valeur par défaut valide pour le type ''{1}''. - cvc-elt.5.2.2.1 = cvc-elt.5.2.2.1 : L''élément ''{0}'' ne doit comporter aucun enfant ([children]) de type élément d''information. - cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1 : La valeur ''{1}'' de l''élément ''{0}'' ne concorde pas avec la valeur de l''attribut '{'value constraint'}' fixe ''{2}''. - cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2 : La valeur ''{1}'' de l''élément ''{0}'' ne concorde pas avec la valeur de l''attribut '{'value constraint'}' ''{2}''. - cvc-enumeration-valid = cvc-enumeration-valid : La valeur ''{0}'' n''est pas un facet valide par rapport à l''énumération ''{1}''. Il doit s''agir d''une valeur provenant de l''énumération. - cvc-fractionDigits-valid = cvc-fractionDigits-valid : La valeur ''{0}'' possède {1} chiffres après la virgule, mais le nombre de chiffres après la virgule ne doit pas dépasser {2}. - cvc-id.1 = cvc-id.1 : Aucune liaison ID/IDREF pour l''IDREF ''{0}''. - cvc-id.2 = cvc-id.2 : Occurrences multiples de la valeur d''ID ''{0}''. - cvc-id.3 = cvc-id.3 : Un champ de contrainte d''identité "{0}" a été mis en correspondance avec l''élément "{1}", mais cet élément ne comporte pas de type simple. - cvc-length-valid = cvc-length-valid : La valeur ''{0}'', ayant pour longueur ''{1}'', n''est pas un facet valide par rapport à la longueur ''{2}'' pour le type ''{3}''. - cvc-maxExclusive-valid = cvc-maxExclusive-valid : La valeur ''{0}'' n''est pas un facet valide par rapport à maxExclusive ''{1}'' pour le type ''{2}''. - cvc-maxInclusive-valid = cvc-maxInclusive-valid : La valeur ''{0}'' n''est pas un facet valide par rapport à maxInclusive ''{1}'' pour le type ''{2}''. - cvc-maxLength-valid = cvc-maxLength-valid : La valeur ''{0}'', ayant pour longueur ''{1}'', n''est pas un facet valide par rapport à maxLength ''{2}'' pour le type ''{3}''. - cvc-minExclusive-valid = cvc-minExclusive-valid : La valeur ''{0}'' n''est pas un facet valide par rapport à minExclusive ''{1}'' pour le type ''{2}''. - cvc-minInclusive-valid = cvc-minInclusive-valid : La valeur ''{0}'' n''est pas un facet valide par rapport à minInclusive ''{1}'' pour le type ''{2}''. - cvc-minLength-valid = cvc-minLength-valid : La valeur ''{0}'', ayant pour longueur ''{1}'', n''est pas un facet valide par rapport à minLength ''{2}'' pour le type ''{3}''. - cvc-pattern-valid = cvc-pattern-valid : La valeur ''{0}'' n''est pas un facet valide par rapport au modèle ''{1}'' pour le type ''{2}''. - cvc-totalDigits-valid = cvc-totalDigits-valid : La valeur ''{0}'' possède un total de {1} chiffres, mais le nombre total de chiffres ne doit pas dépasser {2}. - cvc-type.1 = cvc-type.1 : La définition de type ''{0}'' est introuvable. - cvc-type.2 = cvc-type.2 : La définition de type ne doit pas être abstract pour l''élément {0}. - cvc-type.3.1.1 = cvc-type.3.1.1 : L''élément ''{0}'' est de type simple et ne peut donc pas avoir d''attributs, à l''exception de ceux où le nom d''espace de noms est identique à ''http://www.w3.org/2001/XMLSchema-instance'' et où [local name] est ''type'', ''nil'', ''schemaLocation'' ou ''noNamespaceSchemaLocation''. Cependant, l''attribut ''{1}'' a été trouvé. - cvc-type.3.1.2 = cvc-type.3.1.2 : L''élément ''{0}'' est de type simple et ne doit comporter aucun enfant ([children]) de type élément d''information. - cvc-type.3.1.3 = cvc-type.3.1.3 : La valeur ''{1}'' de l''élément ''{0}'' n''est pas valide. - -#schema valid (3.X.3) - - schema_reference.access = schema_reference : échec de la lecture du document de schéma ''{0}'', car l''accès ''{1}'' n''est pas autorisé en raison d''une restriction définie par la propriété accessExternalSchema. - schema_reference.4 = schema_reference.4 : Echec de la lecture du document de schéma ''{0}'' pour les raisons suivantes : 1) Le document est introuvable ; 2) Le document n''a pas pu être lu ; 3) L''élément racine du document n''est pas . - src-annotation = src-annotation : Les éléments ne peuvent contenir que des éléments et , mais ''{0}'' a été trouvé. - src-attribute.1 = src-attribute.1 : Les propriétés ''default'' et ''fixed'' ne peuvent pas figurer simultanément dans la déclaration d''attribut ''{0}''. Utilisez uniquement l''une d''entre elles. - src-attribute.2 = src-attribute.2 : La propriété ''default'' figure dans l''attribut ''{0}'', la valeur de ''use'' doit donc être ''optional''. - src-attribute.3.1 = src-attribute.3.1 : 'ref' ou 'name' doit figurer dans les déclarations d'attribut local. - src-attribute.3.2 = src-attribute.3.2 : Le contenu doit concorder avec (annotation?) pour la référence d''attribut ''{0}''. - src-attribute.4 = src-attribute.4 : L''attribut ''{0}'' présente un attribut ''type'' et un enfant ''simpleType'' anonyme. Seul un d''entre eux est autorisé dans un attribut. - src-attribute_group.2 = src-attribute_group.2 : L''intersection de caractères génériques ne peut pas être exprimée pour le groupe d''attribut ''{0}''. - src-attribute_group.3 = src-attribute_group.3 : Définitions circulaires détectées pour le groupe d''attribut ''{0}''. Le suivi récursif des références de groupe d''attribut conduit à lui-même. - src-ct.1 = src-ct.1 : Erreur de représentation de la définition de type complexe pour le type ''{0}''. Lorsque est utilisé, le type de base doit être complexType. ''{1}'' est simpleType. - src-ct.2.1 = src-ct.2.1 : Erreur de représentation de la définition de type complexe pour le type ''{0}''. Lorsque est utilisé, le type de base doit être complexType avec un type de contenu simple. Si une restriction est indiquée, il peut s''agir d''un type complexe avec un contenu mixte et une particule pouvant être vide ou, si une extension est indiquée, d''un type simple. ''{1}'' ne respecte aucune de ces conditions. - src-ct.2.2 = src-ct.2.2 : Erreur de représentation de la définition de type complexe pour le type ''{0}''. Lorsqu''un complexType avec un simpleContent restreint un complexType comportant un contenu mixte et une particule pouvant être vide, un doit figurer parmi les enfants de . - src-ct.4 = src-ct.4 : Erreur de représentation de la définition de type complexe pour le type ''{0}''. L''intersection de caractères génériques ne peut pas être exprimée. - src-ct.5 = src-ct.5 : Erreur de représentation de la définition de type complexe pour le type ''{0}''. L''union de caractères génériques ne peut pas être exprimée. - src-element.1 = src-element.1 : Les propriétés ''default'' et ''fixed'' ne peuvent pas figurer simultanément dans la déclaration d''élément ''{0}''. Utilisez uniquement l''une d''entre elles. - src-element.2.1 = src-element.2.1 : 'ref' ou 'name' doit figurer dans les déclarations d'élément local. - src-element.2.2 = src-element.2.2 : Puisque ''{0}'' contient l''attribut ''ref'', son contenu doit concorder avec (annotation?). Cependant, ''{1}'' a été trouvé. - src-element.3 = src-element.3 : L''élément ''{0}'' présente un attribut ''type'' et un enfant ''anonymous type''. Seul un d''entre eux est autorisé dans un élément. - src-import.1.1 = src-import.1.1 : L''attribut namespace "{0}" d''un élément d''information d''élément ne doit pas être identique à l''attribut targetNamespace du schéma dans lequel il figure. - src-import.1.2 = src-import.1.2 : Si l'attribut namespace ne figure pas dans un élément d'information d'élément , le schéma englobant doit avoir un attribut targetNamespace. - src-import.2 = src-import.2 : L''élément racine du document ''{0}'' doit avoir le nom d''espace de noms ''http://www.w3.org/2001/XMLSchema'' et le nom local ''schema''. - src-import.3.1 = src-import.3.1 : L''attribut namespace "{0}" d''un élément d''information d''élément doit être identique à l''attribut targetNamespace ''{1}'' du document importé. - src-import.3.2 = src-import.3.2 : Un élément d''information d''élément sans attribut namespace a été trouvé. Le document importé ne peut donc pas avoir un attribut targetNamespace. Cependant, l''attribut targetNamespace ''{1}'' a été trouvé dans le document importé. - src-include.1 = src-include.1 : L''élément racine du document ''{0}'' doit avoir le nom d''espace de noms ''http://www.w3.org/2001/XMLSchema'' et le nom local ''schema''. - src-include.2.1 = src-include.2.1: L''attribut targetNamespace du schéma référencé, actuellement ''{1}'', doit être identique à celui du schéma d''inclusion, actuellement ''{0}''. - src-redefine.2 = src-redefine.2 : L''élément racine du document ''{0}'' doit avoir le nom d''espace de noms ''http://www.w3.org/2001/XMLSchema'' et le nom local ''schema''. - src-redefine.3.1 = src-redefine.3.1 : L''attribut targetNamespace du schéma référencé, actuellement ''{1}'', doit être identique à celui du schéma de redéfinition, actuellement ''{0}''. - src-redefine.5.a.a = src-redefine.5.a.a : Aucun enfant de non-annotation de n'a été trouvé. Les enfants des éléments doivent comporter des descendants , avec des attributs "base" faisant référence à eux-mêmes. - src-redefine.5.a.b = src-redefine.5.a.b : ''{0}'' n''est pas un élément enfant valide. Les enfants des éléments doivent comporter des descendants , avec des attributs ''base'' faisant référence à eux-mêmes. - src-redefine.5.a.c = src-redefine.5.a.c : ''{0}'' ne comporte pas d''attribut ''base'' faisant référence à l''élément redéfini, ''{1}''. Les enfants des éléments doivent comporter des descendants , avec des attributs ''base'' faisant référence à eux-mêmes. - src-redefine.5.b.a = src-redefine.5.b.a : Aucun enfant de non-annotation de n'a été trouvé. Les enfants des éléments doivent comporter des descendants ou , avec des attributs "base" faisant référence à eux-mêmes. - src-redefine.5.b.b = src-redefine.5.b.b : Aucun petit-enfant de non-annotation de n'a été trouvé. Les enfants des éléments doivent comporter des descendants ou , avec des attributs "base" faisant référence à eux-mêmes. - src-redefine.5.b.c = src-redefine.5.b.c : ''{0}'' n''est pas un élément petit-enfant valide. Les enfants des éléments doivent comporter des descendants ou , avec des attributs ''base'' faisant référence à eux-mêmes. - src-redefine.5.b.d = src-redefine.5.b.d : ''{0}'' ne comporte pas d''attribut ''base'' faisant référence à l''élément redéfini, ''{1}''. Les enfants des éléments doivent comporter des descendants ou, avec des attributs ''base'' faisant référence à eux-mêmes. - src-redefine.6.1.1 = src-redefine.6.1.1 : Si un enfant de groupe d''un élément contient un groupe faisant référence à lui-même, il ne doit en comporter qu''un seul ; celui-ci en comporte ''{0}''. - src-redefine.6.1.2 = src-redefine.6.1.2 : Le groupe ''{0}'' qui contient une référence à un groupe en cours de redéfinition doit respecter la condition ''minOccurs'' = ''maxOccurs'' = 1. - src-redefine.6.2.1 = src-redefine.6.2.1 : Aucun groupe dans le schéma redéfini ne comporte un nom concordant avec ''{0}''. - src-redefine.6.2.2 = src-redefine.6.2.2 : Le groupe ''{0}'' ne restreint pas correctement le groupe qu''il redéfinit ; contrainte violée : ''{1}''. - src-redefine.7.1 = src-redefine.7.1 : Si un enfant attributeGroup d''un élément contient un élément attributeGroup faisant référence à lui-même, il ne doit en comporter qu''un seul ; celui-ci en comporte {0}. - src-redefine.7.2.1 = src-redefine.7.2.1 : Aucun élément attributeGroup dans le schéma redéfini ne comporte un nom concordant avec ''{0}''. - src-redefine.7.2.2 = src-redefine.7.2.2 : L''élément attributeGroup ''{0}'' ne restreint pas correctement l''élément attributeGroup qu''il redéfinit ; contrainte violée : ''{1}''. - src-resolve = src-resolve : Impossible de résoudre le nom ''{0}'' en un composant ''{1}''. - src-resolve.4.1 = src-resolve.4.1 : Erreur lors de la résolution du composant ''{2}''. ''{2}'' ne comporte pas d''espace de noms, mais les composants sans espace de noms ne peuvent pas être référencés à partir du document de schéma ''{0}''. Si ''{2}'' doit avoir un espace de noms, un préfixe doit éventuellement être indiqué. Si ''{2}'' ne doit pas avoir d''espace de noms, une balise ''import'' sans un attribut "namespace" doit être ajoutée à ''{0}''. - src-resolve.4.2 = src-resolve.4.2 : Erreur lors de la résolution du composant ''{2}''. ''{2}'' se trouve dans l''espace de noms ''{1}'', mais les composants de cet espace de noms ne peuvent pas être référencés à partir du document de schéma ''{0}''. S''il s''agit d''un espace de noms incorrect, le préfixe de ''{2}'' doit éventuellement être modifié. S''il est correct, une balise ''import'' appropriée doit être ajoutée à ''{0}''. - src-simple-type.2.a = src-simple-type.2.a : Un élément a été trouvé avec une valeur [attribute] de base et un élément parmi ses enfants ([children]). Un seul de ces éléments est autorisé. - src-simple-type.2.b = src-simple-type.2.b : Un élément a été trouvé sans valeur [attribute] de base ni élément parmi ses enfants ([children]). Un de ces éléments est obligatoire. - src-simple-type.3.a = src-simple-type.3.a : Un élément a été trouvé avec une valeur [attribute] itemType ou un élément parmi ses enfants ([children]). Un seul de ces éléments est autorisé. - src-simple-type.3.b = src-simple-type.3.b : Un élément a été trouvé sans valeur [attribute] itemType ni élément parmi ses enfants ([children]). Un de ces éléments est obligatoire. - src-single-facet-value = src-single-facet-value : Le facet ''{0}'' est défini plusieurs fois. - src-union-memberTypes-or-simpleTypes = src-union-memberTypes-or-simpleTypes : Un élément doit avoir une valeur [attribute] memberTypes non vide ou au moins un élément parmi ses enfants ([children]). - -#constraint valid (3.X.6) - - ag-props-correct.2 = ag-props-correct.2 : Erreur dans le groupe d''attributs ''{0}''. Des occurrences d''attributs en double avec un nom et un espace de noms cible identiques sont indiquées. Le nom de l''occurrence d''attribut en double est ''{1}''. - ag-props-correct.3 = ag-props-correct.3 : Erreur dans le groupe d''attributs ''{0}''. Deux déclarations d''attribut, ''{1}'' et ''{2}'', ont des types dérivés de l''ID. - a-props-correct.2 = a-props-correct.2 : Valeur de contrainte de valeur ''{1}'' non valide dans l''attribut ''{0}''. - a-props-correct.3 = a-props-correct.3 : L''attribut ''{0}'' ne peut pas utiliser ''fixed'' ou ''default'', car sa valeur '{'type definition'}' est identique à l''ID ou en est dérivée. - au-props-correct.2 = au-props-correct.2 : Dans la déclaration d''attribut de ''{0}'', la valeur fixe ''{1}'' a été indiquée. Par conséquent, si l''occurrence de l''attribut faisant référence à ''{0}'' comporte également '{'value constraint'}', celle-ci doit être fixe et sa valeur doit être ''{1}''. - cos-all-limited.1.2 = cos-all-limited.1.2 : Un groupe de modèles 'all' doit figurer dans une particule où '{'min occurs'}' = '{'max occurs'}' = 1. Cette particule doit en outre faire partie d'une paire constituant la valeur '{'content type'}' d'une définition de type complexe. - cos-all-limited.2 = cos-all-limited.2 : La valeur '{'max occurs'}' d''un élément dans un groupe de modèles ''all'' doit être 0 ou 1. La valeur ''{0}'' pour l''élément ''{1}'' n''est pas valide. - cos-applicable-facets = cos-applicable-facets : Le facet ''{0}'' n''est pas autorisé pour le type {1}. - cos-ct-extends.1.1 = cos-ct-extends.1.1 : Le type ''{0}'' est dérivé par l''extension du type ''{1}''. Toutefois, l''attribut ''final'' de ''{1}'' n''autorise pas la dérivation par extension. - cos-ct-extends.1.4.3.2.2.1.a = cos-ct-extends.1.4.3.2.2.1.a : Le type de contenu d''un type dérivé et celui de sa base doivent tous les deux être mixtes (mixed) ou élément uniquement (element-only). Le type ''{0}'' est élément uniquement, mais le type de sa base ne l''est pas. - cos-ct-extends.1.4.3.2.2.1.b = cos-ct-extends.1.4.3.2.2.1.b : Le type de contenu d''un type dérivé et celui de sa base doivent tous les deux être mixtes (mixed) ou élément uniquement (element-only). Le type ''{0}'' est mixte, mais le type de sa base ne l''est pas. - cos-element-consistent = cos-element-consistent : Erreur dans le type ''{0}''. Plusieurs éléments portant le nom ''{1}'', de divers types, figurent dans le groupe de modèles. - cos-list-of-atomic = cos-list-of-atomic : Dans la définition du type de liste ''{0}'', le type ''{1}'' est un type d''élément de liste non valide car il n''est pas atomique (''{1}'' est un type de liste ou un type d''union contenant une liste). - cos-nonambig = cos-nonambig : {0} et {1} (ou des éléments de leur groupe de substitution) violent la règle d''attribution de particule unique (Unique Particle Attribution). Au cours de la validation par rapport à ce schéma, ces deux particules peuvent devenir ambiguës. - cos-particle-restrict.a = cos-particle-restrict.a : La particule dérivée est vide et la base ne peut pas être vide. - cos-particle-restrict.b = cos-particle-restrict.b : La particule de base est vide, mais la particule dérivée ne l'est pas. - cos-particle-restrict.2 = cos-particle-restrict.2 : Restriction de particule interdite : ''{0}''. - cos-st-restricts.1.1 = cos-st-restricts.1.1 : Le type ''{1}'' étant non décomposable, sa valeur '{'base type definition'}', ''{0}'', doit être une définition de type simple atomique ou un type de données primitif intégré. - cos-st-restricts.2.1 = cos-st-restricts.2.1 : Dans la définition du type de liste ''{0}'', le type ''{1}'' est un type d''élément non valide car il s''agit d''un type de liste ou un type d''union contenant une liste. - cos-st-restricts.2.3.1.1 = cos-st-restricts.2.3.1.1 : Le composant '{'final'}' de la valeur '{'item type definition'}', ''{0}'', contient ''list''. Cela signifie que la valeur ''{0}'' ne peut pas être utilisée en tant que type d''élément pour le type de liste ''{1}''. - cos-st-restricts.3.3.1.1 = cos-st-restricts.3.3.1.1 : Le composant '{'final'}' de la valeur '{'member type definitions'}', ''{0}'', contient ''union''. Cela signifie que la valeur ''{0}'' ne peut pas être utilisée en tant que type de membre pour le type d''union ''{1}''. - cos-valid-default.2.1 = cos-valid-default.2.1 : L''élément ''{0}'' comporte une contrainte de valeur et doit disposer d''un modèle de contenu mixte ou simple. - cos-valid-default.2.2.2 = cos-valid-default.2.2.2 : Puisque l''élément ''{0}'' comporte une valeur '{'value constraint'}' et que sa définition de type a la valeur '{'content type'}' mixte, la particule de '{'content type'}' doit pouvoir être vide. - c-props-correct.2 = c-props-correct.2 : La cardinalité des champs pour les valeurs keyref ''{0}'' et key ''{1}'' doit concorder. - ct-props-correct.3 = ct-props-correct.3 : Définitions circulaires détectées pour le type complexe ''{0}''. Cela signifie que ''{0}'' est contenu dans sa propre hiérarchie des types, ce qui est une erreur. - ct-props-correct.4 = ct-props-correct.4 : Erreur dans le type ''{0}''. Des occurrences d''attributs en double avec un nom et un espace de noms cible identiques sont indiquées. Le nom de l''occurrence d''attribut en double est ''{1}''. - ct-props-correct.5 = ct-props-correct.5 : Erreur dans le type ''{0}''. Deux déclarations d''attribut, ''{1}'' et ''{2}'', ont des types dérivés de l''ID. - derivation-ok-restriction.1 = derivation-ok-restriction.1 : Le type ''{0}'' a été dérivé par restriction du type ''{1}''. Cependant, ''{1}'' comporte une propriété '{'final'}' interdisant la dérivation par restriction. - derivation-ok-restriction.2.1.1 = derivation-ok-restriction.2.1.1 : Erreur dans le type ''{0}''. L''occurrence d''attribut ''{1}'' dans ce type comporte une valeur ''use'' de ''{2}'', ce qui est incohérent avec la valeur ''required'' dans une occurrence d''attribut correspondante dans le type de base. - derivation-ok-restriction.2.1.2 = derivation-ok-restriction.2.1.2 : Erreur dans le type ''{0}''. L''occurrence d''attribut ''{1}'' dans ce type comporte le type ''{2}'', dont la dérivation à partir de ''{3}'', le type de l''occurrence d''attribut correspondante dans le type de base, n''est pas valide. - derivation-ok-restriction.2.1.3.a = derivation-ok-restriction.2.1.3.a : Erreur dans le type ''{0}''. L''occurrence d''attribut ''{1}'' dans ce type comporte une contrainte de valeur effective qui n''est pas fixe, et la contrainte de valeur effective de l''occurrence d''attribut correspondante dans le type de base est fixe. - derivation-ok-restriction.2.1.3.b = derivation-ok-restriction.2.1.3.b : Erreur dans le type ''{0}''. L''occurrence d''attribut ''{1}'' dans ce type comporte une contrainte de valeur effective fixe ayant une valeur de ''{2}'', ce qui n''est pas cohérent avec la valeur de ''{3}'' pour la contrainte de valeur effective fixe de l''occurrence d''attribut correspondante dans le type de base. - derivation-ok-restriction.2.2.a = derivation-ok-restriction.2.2.a : Erreur dans le type ''{0}''. L''occurrence d''attribut ''{1}'' dans ce type ne comporte pas d''occurrence d''attribut correspondante dans la base, et le type de base ne possède pas d''attribut de caractère générique. - derivation-ok-restriction.2.2.b = derivation-ok-restriction.2.2.b : Erreur dans le type ''{0}''. L''occurrence d''attribut ''{1}'' dans ce type ne comporte pas d''occurrence d''attribut correspondante dans la base, et le caractère générique dans le type de base n''accepte pas l''espace de noms ''{2}'' de cette occurrence d''attribut. - derivation-ok-restriction.3 = derivation-ok-restriction.3 : Erreur dans le type ''{0}''. Le paramètre REQUIRED de l''occurrence d''attribut ''{1}'' du type de base a la valeur True, mais il n''existe aucune occurrence d''attribut correspondante dans le type dérivé. - derivation-ok-restriction.4.1 = derivation-ok-restriction.4.1 : Erreur dans le type ''{0}''. La dérivation comporte un caractère générique d''attribut mais le type de base n''en a pas. - derivation-ok-restriction.4.2 = derivation-ok-restriction.4.2 : Erreur dans le type ''{0}''. Le caractère générique de la dérivation n''est pas un sous-ensemble de caractères génériques valide de celui du type de base. - derivation-ok-restriction.4.3 = derivation-ok-restriction.4.3 : Erreur dans le type ''{0}''. Le contenu de processus du caractère générique de la dérivation ({1}) est plus faible que celui du type de base ({2}). - derivation-ok-restriction.5.2.2.1 = derivation-ok-restriction.5.2.2.1 : Erreur dans le type ''{0}''. Le type de contenu simple de ce type, ''{1}'', n''est pas une restriction valide du type de contenu simple du type de base, ''{2}''. - derivation-ok-restriction.5.3.2 = derivation-ok-restriction.5.3.2 : Erreur dans le type ''{0}''. Le type de contenu de ce type est vide, mais le type de contenu du type de base, ''{1}'', n''est pas vide ou ne peut pas être vide. - derivation-ok-restriction.5.4.1.2 = derivation-ok-restriction.5.4.1.2 : Erreur dans le type ''{0}''. Le type de contenu de ce type est mixte, mais le type de contenu du type de base, ''{1}'', ne l''est pas. - derivation-ok-restriction.5.4.2 = derivation-ok-restriction.5.4.2 : Erreur dans le type ''{0}''. La particule du type n''est pas une restriction valide de la particule du type de base. - enumeration-required-notation = enumeration-required-notation : Le type NOTATION, ''{0}'' utilisé par {2} ''{1}'', doit comporter une valeur de facet d''énumération indiquant les éléments de notation utilisés par ce type. - enumeration-valid-restriction = enumeration-valid-restriction : La valeur d''énumération ''{0}'' n''est pas comprise l''espace de valeurs du type de base, {1}. - e-props-correct.2 = e-props-correct.2 : Valeur de contrainte de valeur ''{1}'' non valide dans l''élément ''{0}''. - e-props-correct.4 = e-props-correct.4 : La valeur '{'type definition'}' de l''élément ''{0}'' n''est pas dérivée de façon valide à partir de la valeur '{'type definition'}' de l''élément substitutionHead ''{1}'', ou la propriété '{'substitution group exclusions'}' de ''{1}'' n''accepte pas cette dérivation. - e-props-correct.5 = e-props-correct.5 : Une valeur '{'value constraint'}' ne doit pas figurer dans l''élément ''{0}'', car sa valeur '{'type definition'}' ou le '{'content type'}' de sa valeur '{'type definition'}' est identique à l''ID ou en est dérivé. - e-props-correct.6 = e-props-correct.6 : Groupe de substitution circulaire détecté pour élément ''{0}''. - fractionDigits-valid-restriction = fractionDigits-valid-restriction : Dans la définition de {2}, la valeur ''{0}'' pour le facet ''fractionDigits'' n''est pas valide car elle doit être <= à la valeur de ''fractionDigits'', qui a été définie sur ''{1}'' dans l''un des types d''ancêtre. - fractionDigits-totalDigits = fractionDigits-totalDigits : Dans la définition de {2}, la valeur ''{0}'' pour le facet ''fractionDigits'' n''est pas valide car elle doit être <= à la valeur de ''totalDigits'', définie sur ''{1}''. - length-minLength-maxLength.1.1 = length-minLength-maxLength.1.1 : Pour le type {0}, si la valeur de longueur ''{1}'' est inférieure à la valeur de minLength ''{2}'', une erreur est générée. - length-minLength-maxLength.1.2.a = length-minLength-maxLength.1.2.a : Pour le type {0}, une erreur est générée si le type de base ne comporte pas un facet minLength lorsque la restriction en cours comporte le facet minLength, et que la restriction ou le type de base en cours comporte le facet de longueur. - length-minLength-maxLength.1.2.b = length-minLength-maxLength.1.2.b : Pour le type {0}, si la valeur de minLength en cours ''{1}'' n''est pas égale à la valeur de minLength de base ''{2}'', une erreur est générée. - length-minLength-maxLength.2.1 = length-minLength-maxLength.2.1 : Pour le type {0}, si la valeur de longueur ''{1}'' est supérieure à la valeur de maxLength ''{2}'', une erreur est générée. - length-minLength-maxLength.2.2.a = length-minLength-maxLength.2.2.a : Pour le type {0}, une erreur est générée si le type de base ne comporte pas un facet maxLength lorsque la restriction en cours comporte le facet maxLength, et que la restriction ou le type de base en cours comporte le facet de longueur. - length-minLength-maxLength.2.2.b = length-minLength-maxLength.2.2.b : Pour le type {0}, si la valeur maxLength en cours ''{1}'' n''est pas égale à la valeur maxLength de base ''{2}'', une erreur est générée. - length-valid-restriction = length-valid-restriction : Erreur dans le type ''{2}''. La valeur de longueur ''{0}'' doit être égale à la celle du type de base ''{1}''. - maxExclusive-valid-restriction.1 = maxExclusive-valid-restriction.1 : Erreur dans le type ''{2}''. La valeur maxExclusive ''{0}'' doit être <= à la valeur maxExclusive du type de base ''{1}''. - maxExclusive-valid-restriction.2 = maxExclusive-valid-restriction.2 : Erreur dans le type ''{2}''. La valeur maxExclusive ''{0}'' doit être <= à la valeur maxInclusive du type de base ''{1}''. - maxExclusive-valid-restriction.3 = maxExclusive-valid-restriction.3 : Erreur dans le type ''{2}''. La valeur maxExclusive ''{0}'' doit être > à la valeur minInclusive du type de base ''{1}''. - maxExclusive-valid-restriction.4 = maxExclusive-valid-restriction.4 : Erreur dans le type ''{2}''. La valeur maxExclusive ''{0}'' doit être > à la valeur minExclusive du type de base ''{1}''. - maxInclusive-maxExclusive = maxInclusive-maxExclusive : Vous ne pouvez pas indiquer à la fois maxInclusive et maxExclusive pour le même type de données. Dans {2}, maxInclusive = ''{0}'' et maxExclusive = ''{1}''. - maxInclusive-valid-restriction.1 = maxInclusive-valid-restriction.1 : Erreur dans le type ''{2}''. La valeur maxInclusive ''{0}'' doit être <= à la valeur maxInclusive du type de base ''{1}''. - maxInclusive-valid-restriction.2 = maxInclusive-valid-restriction.2 : Erreur dans le type ''{2}''. La valeur maxInclusive ''{0}'' doit être < à la valeur maxExclusive du type de base ''{1}''. - maxInclusive-valid-restriction.3 = maxInclusive-valid-restriction.3 : Erreur dans le type ''{2}''. La valeur maxInclusive ''{0}'' doit être >= à la valeur minInclusive du type de base ''{1}''. - maxInclusive-valid-restriction.4 = maxInclusive-valid-restriction.4 : Erreur dans le type ''{2}''. La valeur maxInclusive ''{0}'' doit être > à la valeur minExclusive du type de base ''{1}''. - maxLength-valid-restriction = maxLength-valid-restriction : Dans la définition de {2}, la valeur maxLength ''{0}'' doit être <= à celle du type de base ''{1}''. - mg-props-correct.2 = mg-props-correct.2 : Définitions circulaires détectées pour le groupe ''{0}''. Le suivi récursif des valeurs '{'term'}' des particules conduit à une particule où '{'term'}' est le groupe proprement dit. - minExclusive-less-than-equal-to-maxExclusive = minExclusive-less-than-equal-to-maxExclusive : Dans la définition de {2}, la valeur minExclusive ''{0}'' doit être <= à la valeur maxExclusive ''{1}''. - minExclusive-less-than-maxInclusive = minExclusive-less-than-maxInclusive : Dans la définition de {2}, la valeur minExclusive ''{0}'' doit être < à la valeur maxInclusive ''{1}''. - minExclusive-valid-restriction.1 = minExclusive-valid-restriction.1 : Erreur dans le type ''{2}''. La valeur minExclusive ''{0}'' doit être >= à la valeur minExclusive du type de base ''{1}''. - minExclusive-valid-restriction.2 = minExclusive-valid-restriction.2 : Erreur dans le type ''{2}''. La valeur minExclusive ''{0}'' doit être <= à la valeur maxInclusive du type de base ''{1}''. - minExclusive-valid-restriction.3 = minExclusive-valid-restriction.3 : Erreur dans le type ''{2}''. La valeur minExclusive ''{0}'' doit être >= à la valeur minInclusive du type de base ''{1}''. - minExclusive-valid-restriction.4 = minExclusive-valid-restriction.4 : Erreur dans le type ''{2}''. La valeur minExclusive ''{0}'' doit être < à la valeur maxExclusive du type de base ''{1}''. - minInclusive-less-than-equal-to-maxInclusive = minInclusive-less-than-equal-to-maxInclusive : Dans la définition de {2}, la valeur minInclusive ''{0}'' doit être <= à la valeur maxInclusive ''{1}''. - minInclusive-less-than-maxExclusive = minInclusive-less-than-maxExclusive : Dans la définition de {2}, la valeur minInclusive ''{0}'' doit être < à la valeur maxExclusive ''{1}''. - minInclusive-minExclusive = minInclusive-minExclusive : Vous ne pouvez pas indiquer à la fois minInclusive et minExclusive pour le même type de données. Dans {2}, minInclusive = ''{0}'' et minExclusive = ''{1}''. - minInclusive-valid-restriction.1 = minInclusive-valid-restriction.1 : Erreur dans le type ''{2}''. La valeur minInclusive ''{0}'' doit être >= à la valeur minInclusive du type de base ''{1}''. - minInclusive-valid-restriction.2 = minInclusive-valid-restriction.2 : Erreur dans le type ''{2}''. La valeur minInclusive ''{0}'' doit être <= à la valeur maxInclusive du type de base ''{1}''. - minInclusive-valid-restriction.3 = minInclusive-valid-restriction.3 : Erreur dans le type ''{2}''. La valeur minInclusive ''{0}'' doit être > à la valeur minExclusive du type de base ''{1}''. - minInclusive-valid-restriction.4 = minInclusive-valid-restriction.4 : Erreur dans le type ''{2}''. La valeur minInclusive ''{0}'' doit être < à la valeur maxExclusive du type de base ''{1}''. - minLength-less-than-equal-to-maxLength = minLength-less-than-equal-to-maxLength: Dans la définition de {2}, la valeur de minLength ''{0}'' doit être < à la valeur de maxLength ''{1}''. - minLength-valid-restriction = minLength-valid-restriction : Dans la définition de {2}, la valeur de minLength ''{0}'' doit être >= à celle du type de base, ''{1}''. - no-xmlns = no-xmlns : La valeur {name} d'une déclaration d'attribut ne doit pas être identique à 'xmlns'. - no-xsi = no-xsi : La valeur '{'target namespace'}' d''une déclaration d''attribut ne doit pas être identique à ''{0}''. - p-props-correct.2.1 = p-props-correct.2.1 : Dans la déclaration de ''{0}'', la valeur de ''minOccurs'' est ''{1}'', mais elle ne doit pas être supérieure à la valeur de ''maxOccurs'', qui est ''{2}''. - rcase-MapAndSum.1 = rcase-MapAndSum.1 : Aucune mise en correspondance fonctionnelle complète entre les particules. - rcase-MapAndSum.2 = rcase-MapAndSum.2 : La plage d''occurrences du groupe, ({0},{1}), n''est pas une restriction valide de la plage d''occurrences du groupe de base, ({2},{3}). - rcase-NameAndTypeOK.1 = rcase-NameAndTypeOK.1 : Les éléments ont des noms (name) et des espaces de noms cible (target namespace) différents : élément "{0}" dans l''espace de noms "{1}" et élément ''{2}'' dans l''espace de noms ''{3}''. - rcase-NameAndTypeOK.2 = rcase-NameAndTypeOK.2 : Erreur dans la particule où la valeur '{'term'}' est la déclaration d''élément ''{0}''. La valeur '{'nillable'}' de la déclaration d''élément est True, mais la particule correspondante dans le type de base comporte une déclaration d''élément où la valeur '{'nillable'}' est False. - rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3 : Erreur dans la particule où la valeur '{'term'}' est la déclaration d''élément ''{0}''. Sa plage d''occurrences, ({1},{2}), n''est pas une restriction valide de la plage ({3},{4}) de la particule correspondante dans le type de base. - rcase-NameAndTypeOK.4.a = rcase-NameAndTypeOK.4.a : L''élément ''{0}'' n''est pas fixe, mais l''élément correspondant dans le type de base est fixe avec la valeur ''{1}''. - rcase-NameAndTypeOK.4.b = rcase-NameAndTypeOK.4.b : L''élément ''{0}'' est fixe avec la valeur ''{1}'', mais l''élément correspondant dans le type de base est fixe avec la valeur ''{2}''. - rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5 : Les contraintes d''identité de l''élément "{0}" ne sont pas un sous-ensemble de celles de la base. - rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6 : Les substitutions non autorisées pour l''élément ''{0}'' ne sont pas un sur-ensemble de celles de la base. - rcase-NameAndTypeOK.7 = rcase-NameAndTypeOK.7 : Le type de l''élément ''{0}'', ''{1}'', n''est pas dérivé du type de l''élément de base, ''{2}''. - rcase-NSCompat.1 = rcase-NSCompat.1 : L''élément ''{0}'' comporte un espace de noms ''{1}'' non autorisé par le caractère générique de la base. - rcase-NSCompat.2 = rcase-NSCompat.2 : Erreur dans la particule où la valeur '{'term'}' est la déclaration d''élément ''{0}''. Sa plage d''occurrences, ({1},{2}), n''est pas une restriction valide de la plage ({3},{4}) de la particule correspondante dans le type de base. - rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1 : Aucune mise en correspondance fonctionnelle complète entre les particules. - rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2 : La plage d''occurrences du groupe, ({0},{1}), n''est pas une restriction valide de la plage à caractère générique de la base, ({2},{3}). - rcase-NSSubset.1 = rcase-NSSubset.1 : Le caractère générique n'est pas un sous-ensemble du caractère générique correspondant dans la base. - rcase-NSSubset.2 = rcase-NSSubset.2 : La plage d''occurrences du caractère générique, ({0},{1}), n''est pas une restriction valide de celle de la base, ({2},{3}). - rcase-NSSubset.3 = rcase-NSSubset.3 : Le contenu de processus de caractère générique, ''{0}'', est plus faible que celui figurant dans la base, ''{1}''. - rcase-Recurse.1 = rcase-Recurse.1 : La plage d''occurrences du groupe, ({0},{1}), n''est pas une restriction valide de la plage d''occurrences du groupe de base, ({2},{3}). - rcase-Recurse.2 = rcase-Recurse.2 : Aucune mise en correspondance fonctionnelle complète entre les particules. - rcase-RecurseLax.1 = rcase-RecurseLax.1 : La plage d''occurrences du groupe, ({0},{1}), n''est pas une restriction valide de la plage d''occurrences du groupe de base, ({2},{3}). - rcase-RecurseLax.2 = rcase-RecurseLax.2 : Aucune mise en correspondance fonctionnelle complète entre les particules. - rcase-RecurseUnordered.1 = rcase-RecurseUnordered.1 : La plage d''occurrences du groupe, ({0},{1}), n''est pas une restriction valide de la plage d''occurrences du groupe de base, ({2},{3}). - rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2 : Aucune mise en correspondance fonctionnelle complète entre les particules. -# We're using sch-props-correct.2 instead of the old src-redefine.1 -# src-redefine.1 = src-redefine.1: The component ''{0}'' is begin redefined, but its corresponding component isn't in the schema document being redefined (with namespace ''{2}''), but in a different document, with namespace ''{1}''. - sch-props-correct.2 = sch-props-correct.2 : Un schéma ne peut pas contenir deux composants globaux de même nom ; celui-ci contient deux occurrences de ''{0}''. - st-props-correct.2 = st-props-correct.2 : Définitions circulaires détectées pour le type simple ''{0}''. Cela signifie que ''{0}'' est contenu dans sa propre hiérarchie des types, ce qui est une erreur. - st-props-correct.3 = st-props-correct.3 : Erreur dans le type ''{0}''. La valeur '{'final'}' de '{'base type definition'}', ''{1}'', n''accepte pas la dérivation par restriction. - totalDigits-valid-restriction = totalDigits-valid-restriction : Dans la définition de {2}, la valeur ''{0}'' pour le facet ''totalDigits'' n''est pas valide car elle doit être <= à la valeur de ''totalDigits'', qui a été définie sur ''{1}'' dans l''un des types d''ancêtre. - whiteSpace-valid-restriction.1 = whiteSpace-valid-restriction.1 : Dans la définition de {0}, la valeur ''{1}'' du facet ''whitespace'' n''est pas valide car elle a été définie sur ''collapse'' dans l''un des types d''ancêtre. - whiteSpace-valid-restriction.2 = whiteSpace-valid-restriction.2 : Dans la définition de {0}, la valeur ''preserve'' du facet ''whitespace'' n''est pas valide car la valeur de ''whitespace'' a été définie sur ''replace'' dans l''un des types d''ancêtre. - -#schema for Schemas - - s4s-att-invalid-value = s4s-att-invalid-value : Valeur d''attribut non valide pour ''{1}'' dans l''élément ''{0}''. Raison enregistrée : {2} - s4s-att-must-appear = s4s-att-must-appear : L''attribut ''{1}'' doit figurer dans l''élément ''{0}''. - s4s-att-not-allowed = s4s-att-not-allowed : L''attribut ''{1}'' ne doit pas figurer dans l''élément ''{0}''. - s4s-elt-invalid = s4s-elt-invalid : L''élément ''{0}'' n''est pas un élément valide dans un document de schéma. - s4s-elt-must-match.1 = s4s-elt-must-match.1 : Le contenu de ''{0}'' doit concorder avec {1}. Problème détecté à partir de : {2}. - s4s-elt-must-match.2 = s4s-elt-must-match.2 : Le contenu de ''{0}'' doit concorder avec {1}. Nombre insuffisant d''éléments trouvés. - # the "invalid-content" messages provide less information than the "must-match" counterparts above. They're used for complex types when providing a "match" would be an information dump - s4s-elt-invalid-content.1 = s4s-elt-invalid-content.1 : Le contenu de ''{0}'' n''est pas valide. L''élément ''{1}'' n''est pas valide, est mal placé ou compte trop d''occurrences. - s4s-elt-invalid-content.2 = s4s-elt-invalid-content.2 : Le contenu de ''{0}'' n''est pas valide. L''élément ''{1}'' ne peut pas être vide. - s4s-elt-invalid-content.3 = s4s-elt-invalid-content.3 : Les éléments de type ''{0}'' ne peuvent pas apparaître après les déclarations en tant qu''enfants d''un élément . - s4s-elt-schema-ns = s4s-elt-schema-ns : L''espace de noms de l''élément ''{0}'' doit être issu de l''espace de noms du schema, ''http://www.w3.org/2001/XMLSchema''. - s4s-elt-character = s4s-elt-character : Les caractères imprimables ne sont pas autorisés dans les éléments de schéma autres que ''xs:appinfo'' et ''xs:documentation''. ''{0}'' a été détecté. - -# codes not defined by the spec - - c-fields-xpaths = c-fields-xpaths : La valeur de champ ''{0}'' n''est pas valide. - c-general-xpath = c-general-xpath : L''expression ''{0}'' n''est pas valide par rapport au sous-ensemble XPath pris en charge par le schéma XML. - c-general-xpath-ns = c-general-xpath-ns : Un préfixe d''espace de noms dans l''expression XPath ''{0}'' n''est lié à aucun espace de noms. - c-selector-xpath = c-selector-xpath : La valeur de sélecteur ''{0}'' n''est pas valide ; les XPath de sélecteur ne peuvent pas contenir d''attributs. - EmptyTargetNamespace = EmptyTargetNamespace : Dans le document de schéma ''{0}'', la valeur de l''attribut ''targetNamespace'' ne peut pas être une chaîne vide. - FacetValueFromBase = FacetValueFromBase : Dans la déclaration de type ''{0}'', la valeur ''{1}'' du facet ''{2}'' doit être issue de l''espace de valeurs du type de base, ''{3}''. - FixedFacetValue = FixedFacetValue : Dans la définition de {3}, la valeur ''{1}'' du facet ''{0}'' n''est pas valide, car la valeur de ''{0}'' a été définie sur ''{2}'' dans l''un des types d''ancêtre, et '{'fixed'}' = true. - InvalidRegex = InvalidRegex : La valeur de modèle ''{0}'' n''est pas une expression régulière valide. L''erreur signalée est ''{1}'', au niveau de la colonne ''{2}''. - MaxOccurLimit = La configuration en cours de l''analyseur ne permet pas de définir une valeur d''attribut maxOccurs sur une valeur supérieure à {0}. - PublicSystemOnNotation = PublicSystemOnNotation : Au moins une des valeurs ''public'' et ''system'' doit figurer dans l'élément ''notation''. - SchemaLocation = SchemaLocation : La valeur schemaLocation ''{0}'' doit comporter un nombre pair d''URI. - TargetNamespace.1 = TargetNamespace.1 : Espace de noms "{0}" attendu mais l''espace de noms cible du document de schéma est ''{1}''. - TargetNamespace.2 = TargetNamespace.2 : Aucun espace de noms attendu mais le document de schéma comporte un espace de noms cible de ''{1}''. - UndeclaredEntity = UndeclaredEntity : L''entité ''{0}'' n''est pas déclarée. - UndeclaredPrefix = UndeclaredPrefix : Impossible de résoudre ''{0}'' en un QName : le préfixe ''{1}'' n''est pas déclaré. - - -# JAXP 1.2 schema source property errors - - jaxp12-schema-source-type.1 = La propriété ''http://java.sun.com/xml/jaxp/properties/schemaSource'' ne peut pas avoir une valeur de type ''{0}''. Les types de valeur possibles pris en charge sont String, File, InputStream, InputSource ou un tableau de ces types. - jaxp12-schema-source-type.2 = La propriété ''http://java.sun.com/xml/jaxp/properties/schemaSource'' ne peut pas avoir une valeur de tableau de type ''{0}''. Les types de tableau possibles pris en charge sont Object, String, File, InputStream et InputSource. - jaxp12-schema-source-ns = En cas d'utilisation d'un tableau des objets comme valeur de la propriété 'http://java.sun.com/xml/jaxp/properties/schemaSource', il est interdit d'avoir deux schémas qui partagent le même espace de noms cible. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties deleted file mode 100644 index f9f544b583c..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties +++ /dev/null @@ -1,328 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file contains error and warning messages related to XML Schema -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. - FormatFailed = Si è verificato un errore interno durante la formattazione del seguente messaggio:\n - -# For internal use - - Internal-Error = Errore interno: {0}. - dt-whitespace = Spazio vuoto non disponibile come valore di facet per il simpleType di unione ''{0}'' - GrammarConflict = Una grammatica restituita dal pool di grammatiche dell'utente è in conflitto con un'altra grammatica. - -# Identity constraints - - AbsentKeyValue = cvc-identity-constraint.4.2.1.a: l''elemento "{0}" non contiene valori per la chiave "{1}". - DuplicateField = Corrispondenza duplicata nell''ambito per il campo "{0}". - DuplicateKey = cvc-identity-constraint.4.2.2: valore chiave duplicato [{0}] dichiarato per il vincolo di identità "{2}" dell''elemento "{1}". - DuplicateUnique = cvc-identity-constraint.4.1: valore univoco duplicato [{0}] dichiarato per il vincolo di identità "{2}" dell''elemento "{1}". - FieldMultipleMatch = cvc-identity-constraint.3: il campo "{0}" del vincolo di identità "{1}" corrisponde a più valori nell''ambito del proprio selettore; i campi devono corrispondere a valori univoci. - FixedDiffersFromActual = Il contenuto di questo elemento non equivale al valore dell'attributo "fixed" nella dichiarazione dell'elemento nello schema. - KeyMatchesNillable = cvc-identity-constraint.4.2.3: l''elemento "{0}" ha la chiave "{1}" che corrisponde a un elemento che ha l''attributo nillable impostato su true. - KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: valori insufficienti forniti per il vincolo di identità specificato per l''elemento "{0}". - KeyNotFound = cvc-identity-constraint.4.3: chiave ''{0}'' con valore ''{1}'' non trovata per il vincolo di identità dell''elemento ''{2}''. - KeyRefOutOfScope = Errore del vincolo di identità: il vincolo di identità "{0}" ha un keyref che fa riferimento a una chiave o a un valore univoco fuori ambito. - KeyRefReferNotFound = La dichiarazione "{0}" del riferimento chiave fa riferimento a una chiave sconosciuta denominata "{1}". - UnknownField = Errore interno del vincolo di identità; campo "{0}" sconosciuto per il vincolo di identità "{2}" specificato per l''elemento "{1}". - -# Ideally, we should only use the following error keys, not the ones under -# "Identity constraints". And we should cover all of the following errors. - -#validation (3.X.4) - - cvc-attribute.3 = cvc-attribute.3: il valore ''{2}'' dell''attributo ''{1}'' sull''elemento ''{0}'' non è valido rispetto al suo tipo ''{3}''. - cvc-attribute.4 = cvc-attribute.4: il valore ''{2}'' dell''attributo ''{1}'' sull''elemento ''{0}'' non è valido rispetto al suo '{'value constraint'}' fisso. L''attributo deve avere un valore pari a ''{3}''. - cvc-complex-type.2.1 = cvc-complex-type.2.1: l''elemento "{0}" non deve avere [children] di voci di informazioni di carattere o elemento perché il tipo di contenuto è vuoto. - cvc-complex-type.2.2 = cvc-complex-type.2.2: l''elemento "{0}" non deve avere [children] di tipo elemento e il valore deve essere valido. - cvc-complex-type.2.3 = cvc-complex-type.2.3: l''elemento "{0}" non deve avere [children] di tipo carattere perché il tipo di contenuto è di soli elementi. - cvc-complex-type.2.4.a = cvc-complex-type.2.4.a: contenuto non valido che inizia con l''elemento "{0}". È previsto un elemento "{1}". - cvc-complex-type.2.4.b = cvc-complex-type.2.4.b: il contenuto dell''elemento "{0}" non è completo. È previsto un elemento "{1}". - cvc-complex-type.2.4.c = cvc-complex-type.2.4.c: il carattere jolly corrispondente è rigoroso ma non è possibile trovare una dichiarazione per l''elemento "{0}". - cvc-complex-type.2.4.d = cvc-complex-type.2.4.d: contenuto non valido che inizia con l''elemento "{0}". Non sono previsti elementi figlio in questo punto. - cvc-complex-type.2.4.d.1 = cvc-complex-type.2.4.d: contenuto non valido che inizia con l''elemento "{0}". Non è previsto un elemento figlio ''{1}'' in questo punto. - cvc-complex-type.2.4.e = cvc-complex-type.2.4.e: ''{0}'' si può verificare massimo ''{2}'' volte nella sequenza corrente. Questo limite è stato superato. È previsto un elemento ''{1}'' in questo punto. - cvc-complex-type.2.4.f = cvc-complex-type.2.4.f: ''{0}'' si può verificare massimo ''{1}'' volte nella sequenza corrente. Questo limite è stato superato. Non è previsto un elemento figlio in questo punto. - cvc-complex-type.2.4.g = cvc-complex-type.2.4.g: contenuto non valido che inizia con l''elemento ''{0}'' trovato. È previsto che ''{1}'' si verifichi almeno ''{2}'' volte nella sequenza corrente. Per soddisfare questo vincolo, è necessaria un''altra istanza. - cvc-complex-type.2.4.h = cvc-complex-type.2.4.h: contenuto non valido che inizia con l''elemento ''{0}'' trovato. È previsto che ''{1}'' si verifichi almeno ''{2}'' volte nella sequenza corrente. Per soddisfare questo vincolo, sono necessarie altre ''{3}'' istanze. - cvc-complex-type.2.4.i = cvc-complex-type.2.4.i: il contenuto dell''elemento ''{0}'' non è completo. È previsto che ''{1}'' si verifichi almeno ''{2}'' volte. Per soddisfare questo vincolo, è necessaria un''altra istanza. - cvc-complex-type.2.4.j = cvc-complex-type.2.4.j: il contenuto dell''elemento ''{0}'' non è completo. È previsto che ''{1}'' si verifichi almeno ''{2}'' volte. Per soddisfare questo vincolo, sono necessarie altre ''{3}'' istanze. - cvc-complex-type.3.1 = cvc-complex-type.3.1: il valore "{2}" dell''attributo "{1}" dell''elemento "{0}" non è valido rispetto al uso corrispondente dell''attributo. L''attributo ''{1}'' ha un valore fisso pari a ''{3}''. - cvc-complex-type.3.2.1 = cvc-complex-type.3.2.1: l''elemento "{0}" non ha un carattere jolly di attributo per l''attributo "{1}". - cvc-complex-type.3.2.2 = cvc-complex-type.3.2.2: l''attributo "{1}" non è consentito nell''elemento "{0}". - cvc-complex-type.4 = cvc-complex-type.4: l''attributo ''{1}'' deve apparire sull''elemento "{0}". - cvc-complex-type.5.1 = cvc-complex-type.5.1: nell''elemento "{0}", l''attributo "{1}" è un ID Wild ma esiste già un ID Wild "{2}". Può esisterne solo uno. - cvc-complex-type.5.2 = cvc-complex-type.5.2: nell''elemento "{0}", l''attributo "{1}" è un ID Wild ma esiste già un attributo "{2}" derivato dall''ID tra '{'attribute uses'}'. - cvc-datatype-valid.1.2.1 = cvc-datatype-valid.1.2.1: "{0}" non è un valore valido per "{1}". - cvc-datatype-valid.1.2.2 = cvc-datatype-valid.1.2.2: "{0}" non è un valore valido per il tipo di lista "{1}". - cvc-datatype-valid.1.2.3 = cvc-datatype-valid.1.2.3: "{0}" non è un valore valido per il tipo di unione "{1}". - cvc-elt.1.a = cvc-elt.1.a: impossibile trovare la dichiarazione dell''elemento "{0}". - cvc-elt.1.b = cvc-elt.1.b: il nome dell''elemento non corrisponde al nome della dichiarazione dell''elemento. Visualizzato ''{0}''. Previsto ''{1}''. - cvc-elt.2 = cvc-elt.2: il valore di '{'abstract'}' nella dichiarazione di elemento per "{0}" deve essere false. - cvc-elt.3.1 = cvc-elt.3.1: l''attributo "{1}" non deve apparire sull''elemento "{0}" perché la proprietà '{'nillable'}' di "{0}" è false. - cvc-elt.3.2.1 = cvc-elt.3.2.1: l''elemento "{0}" non deve avere [children] di informazioni di tipo carattere o elemento perché è specificato "{1}". - cvc-elt.3.2.2 = cvc-elt.3.2.2: non deve esistere alcun '{'value constraint'}' fisso per l''elemento "{0}" perché è specificato "{1}". - cvc-elt.4.1 = cvc-elt.4.1: il valore "{2}" dell''attributo "{1}" per l''elemento "{0}" non è un QName valido. - cvc-elt.4.2 = cvc-elt.4.2: impossibile risolvere "{1}" in una definizione tipo per l''elemento "{0}". - cvc-elt.4.3 = cvc-elt.4.3: tipo "{1}" non derivato in modo valido dalla definizione tipo ''{2}'' dell''elemento "{0}". - cvc-elt.5.1.1 = cvc-elt.5.1.1: '{'value constraint'}' "{2}" dell''elemento "{0}" non è un valore predefinito valido per il tipo "{1}". - cvc-elt.5.2.2.1 = cvc-elt.5.2.2.1: l''elemento "{0}" non deve avere [children] di voci di informazioni di elemento. - cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1: il valore "{1}" dell''elemento "{0}" non corrisponde al valore fisso di '{'value constraint'}' "{2}". - cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2: il valore "{1}" dell''elemento "{0}" non corrisponde al valore di '{'value constraint'}' "{2}". - cvc-enumeration-valid = cvc-enumeration-valid: il valore "{0}" non è valido come facet rispetto all''enumerazione "{1}". Deve essere un valore dell''enumerazione. - cvc-fractionDigits-valid = cvc-fractionDigits-valid: il valore ''{0}'' ha {1} cifre di frazione, ma il numero di cifre di frazione è stato limitato a {2}. - cvc-id.1 = cvc-id.1: non esiste alcuna associazione ID/IDREF per l''IDREF "{0}". - cvc-id.2 = cvc-id.2: esistono più ricorrenze del valore di ID "{0}". - cvc-id.3 = cvc-id.3: un campo del vincolo di identità "{0}" corrispondeva all''elemento "{1}" ma questo elemento non ha un tipo semplice. - cvc-length-valid = cvc-length-valid: il valore "{0}" con lunghezza = "{1}" non è valido come facet rispetto alla lunghezza "{2}" per il tipo "{3}". - cvc-maxExclusive-valid = cvc-maxExclusive-valid: il valore "{0}" non è valido come facet rispetto a maxExclusive "{1}" per il tipo ''{2}''. - cvc-maxInclusive-valid = cvc-maxInclusive-valid: il valore "{0}" non è valido come facet rispetto a maxInclusive "{1}" per il tipo ''{2}''. - cvc-maxLength-valid = cvc-maxLength-valid: il valore "{0}" con lunghezza = "{1}" non è valido come facet rispetto a maxLength "{2}" per il tipo "{3}". - cvc-minExclusive-valid = cvc-minExclusive-valid: il valore "{0}" non è valido come facet rispetto a minExclusive "{1}" per il tipo ''{2}''. - cvc-minInclusive-valid = cvc-minInclusive-valid: il valore "{0}" non è valido come facet rispetto a minExclusive "{1}" per il tipo ''{2}''. - cvc-minLength-valid = cvc-minLength-valid: il valore "{0}" con lunghezza = "{1}" non è valido come facet rispetto a minLength "{2}" per il tipo "{3}". - cvc-pattern-valid = cvc-pattern-valid: il valore "{0}" non è valido come facet rispetto al pattern "{1}" per il tipo ''{2}''. - cvc-totalDigits-valid = cvc-totalDigits-valid: il valore ''{0}'' ha {1} cifre di totale, ma il numero di cifre di totale è stato limitato a {2}. - cvc-type.1 = cvc-type.1: definizione tipo ''{0}'' non trovata. - cvc-type.2 = cvc-type.2: la definizione tipo non può essere astratta per l''elemento {0}. - cvc-type.3.1.1 = cvc-type.3.1.1: l''elemento ''{0}'' è di tipo semplice, quindi non può avere attributi, tranne quelli il cui spazio di nomi è uguale ''http://www.w3.org/2001/XMLSchema-instance'' e il cui [local name] è uno tra ''type'', ''nil'', ''schemaLocation'' o ''noNamespaceSchemaLocation''. È stato trovato l''attributo ''{1}''. - cvc-type.3.1.2 = cvc-type.3.1.2: l''elemento "{0}" è di tipo semplice, quindi non deve avere [children] di voci di informazioni di elemento. - cvc-type.3.1.3 = cvc-type.3.1.3: il valore "{1}" dell''elemento "{0}" non è valido. - -#schema valid (3.X.3) - - schema_reference.access = schema_reference: lettura del documento di schema ''{0}'' non riuscita. Accesso ''{1}'' non consentito a causa della limitazione definita dalla proprietà accessExternalSchema. - schema_reference.4 = schema_reference.4: lettura del documento di schema "{0}" non riuscita perché 1) non è stato possibile trovare il documento; 2) non è stato possibile leggere il documento; 3) l''elemento radice del documento non è . - src-annotation = src-annotation: possono essere contenuti soltanto elementi e , ma è stato trovato ''{0}''. - src-attribute.1 = src-attribute.1: le proprietà ''default'' e ''fixed'' non possono essere entrambi presenti nella dichiarazione di attributo ''{0}''. Utilizzarne solo una. - src-attribute.2 = src-attribute.2: la proprietà ''default'' è presente nell''attributo ''{0}'', quindi il valore di ''use'' deve essere ''optional''. - src-attribute.3.1 = src-attribute.3.1: in una dichiarazione di attributo locale deve essere presente 'ref' o 'name'. - src-attribute.3.2 = src-attribute.3.2: il contenuto deve corrispondere a (annotation?) per il riferimento di attributo "{0}". - src-attribute.4 = src-attribute.4: l''attributo "{0}" ha sia un attributo ''type'' che un elemento figlio "simpleType" anonimo. È consentito uno solo di questi valori per un attributo. - src-attribute_group.2 = src-attribute_group.2: non è possibile esprimere l''intersezione di caratteri jolly per il gruppo di attributi ''{0}''. - src-attribute_group.3 = src-attribute_group.3: sono state rilevate definizioni circolari per il gruppo di attributi ''{0}''. Se si seguono ricorsivamente i riferimenti ai gruppi di attributi, si torna inevitabilmente al punto di partenza. - src-ct.1 = src-ct.1: errore di rappresentazione della definizione di tipo complesso per il tipo ''{0}''. Se si utilizza , il tipo di base deve essere un complexType. ''{1}'' è simpleType. - src-ct.2.1 = src-ct.2.1: errore di rappresentazione della definizione di tipo complesso per il tipo ''{0}''. Se si utilizza , il tipo di base deve essere un complexType con tipo di contenuto semplice oppure, se è specificata solo la limitazione, un tipo complesso con contenuto misto e parte svuotabile oppure, se è specificato solo l''estensione, un tipo semplice. ''{1}'' non soddisfa alcuna di queste condizioni. - src-ct.2.2 = src-ct.2.2: errore di rappresentazione della definizione di tipo complesso per il tipo "{0}". Quando un complexType con simpleContent limita un complexType con contenuto misto e parte svuotabile, deve esistere un tra gli elementi figlio di . - src-ct.4 = src-ct.4: errore di rappresentazione della definizione di tipo complesso per il tipo ''{0}''. Non è possibile esprimere l''intersezione di caratteri jolly. - src-ct.5 = src-ct.5: errore di rappresentazione della definizione di tipo complesso per il tipo ''{0}''. Non è possibile esprimere l''unione di caratteri jolly. - src-element.1 = src-element.1: le proprietà ''default'' e ''fixed'' non possono essere entrambi presenti nella dichiarazione di elemento ''{0}''. Utilizzarne solo una. - src-element.2.1 = src-element.2.1: in una dichiarazione di elemento locale deve essere presente 'ref' o 'name'. - src-element.2.2 = src-element.2.2: poiché ''{0}'' contiene l''attributo ''ref'', il suo contenuto deve corrispondere a (annotation?), ma è stato trovato ''{1}''. - src-element.3 = src-element.3: l''elemento "{0}" ha sia un attributo ''type'' che un elemento figlio "anonymous type". È consentito uno solo di questi valori per un elemento. - src-import.1.1 = src-import.1.1: l''attributo "{0}" dello spazio di nomi di una voce di informazioni di elemento non deve essere uguale al targetNamespace dello schema in cui esiste. - src-import.1.2 = src-import.1.2: se l'attributo dello spazio di nomi non è presente in una voce di informazioni di elemento , lo schema che lo contiene deve avere un targetNamespace. - src-import.2 = src-import.2: l''elemento radice del documento "{0}" deve avere lo spazio di nomi denominato ''http://www.w3.org/2001/XMLSchema'' e il nome locale ''schema''. - src-import.3.1 = src-import.3.1: l''attributo "{0}" dello spazio di nomi di una voce di informazioni di elemento deve essere uguale all''attributo targetNamespace ''{1}'' del documento importato. - src-import.3.2 = src-import.3.2: non esiste alcun attributo dello spazio di nomi nella voce di informazioni di elemento , pertanto il documento importato non può avere alcun attributo targetNamespace. tuttavia, è stato trovato targetNamespace ''{1}'' nel documento importato. - src-include.1 = src-include.1: l''elemento radice del documento "{0}" deve avere lo spazio di nomi denominato ''http://www.w3.org/2001/XMLSchema'' e il nome locale ''schema''. - src-include.2.1 = src-include.2.1: targetNamespace dello schema di riferimento (attualmente "{1}") deve essere identico a quello dello schema di inclusione (attualmente "{0}"). - src-redefine.2 = src-redefine.2: l''elemento radice del documento "{0}" deve avere lo spazio di nomi denominato ''http://www.w3.org/2001/XMLSchema'' e il nome locale ''schema''. - src-redefine.3.1 = src-redefine.3.1: targetNamespace dello schema di riferimento (attualmente "{1}") deve essere identico a quello dello schema di ridefinizione (attualmente "{0}"). - src-redefine.5.a.a = src-redefine.5.a.a: non è stato trovato alcun elemento figlio di non annotazione di tipo . Gli elementi figlio di elementi devono avere discendenti , con attributi 'base' che fanno riferimento a sé stessi. - src-redefine.5.a.b = src-redefine.5.a.b: ''{0}'' non è un elemento figlio valido. Gli elementi figlio di elementi devono avere discendenti , con attributi ''base'' che fanno riferimento a sé stessi. - src-redefine.5.a.c = src-redefine.5.a.c: ''{0}'' non dispone di un attributo "base" che fa riferimento all''elemento ridefinito ''{1}''. Gli elementi figlio di elementi devono avere discendenti , con attributi ''base'' che fanno riferimento a sé stessi. - src-redefine.5.b.a = src-redefine.5.b.a: non è stato trovato alcun elemento figlio di non annotazione di tipo . Gli elementi figlio di elementi devono avere discendenti o , con attributi 'base' che fanno riferimento a sé stessi. - src-redefine.5.b.b = src-redefine.5.b.b: non è stato trovato alcun elemento nipote di non annotazione di tipo . Gli elementi figlio di elementi devono avere discendenti o , con attributi 'base' che fanno riferimento a sé stessi. - src-redefine.5.b.c = src-redefine.5.b.c: ''{0}'' non è un elemento nipote valido. Gli elementi figlio di elementi devono avere discendenti o , con attributi ''base'' che fanno riferimento a sé stessi. - src-redefine.5.b.d = src-redefine.5.b.d: ''{0}'' non dispone di un attributo "base" che fa riferimento all''elemento ridefinito ''{1}''. Gli elementi figlio di elementi devono avere discendenti o , con attributi ''base'' che fanno riferimento a sé stessi. - src-redefine.6.1.1 = src-redefine.6.1.1: se un elemento figlio del gruppo di un elemento contiene un gruppo che fa riferimento a sé stesso, deve averne esattamente uno, mentre questo ne ha "{0}". - src-redefine.6.1.2 = src-redefine.6.1.2: il gruppo "{0}" che contiene un riferimento a un gruppo in fase di ridefinizione deve avere minOccurs = maxOccurs = 1. - src-redefine.6.2.1 = src-redefine.6.2.1: nessun gruppo nello schema ridefinito con nome corrispondente a "{0}". - src-redefine.6.2.2 = src-redefine.6.2.2: il gruppo "{0}" non limita correttamente il gruppo che ridefinisce; vincolo violato: "{1}". - src-redefine.7.1 = src-redefine.7.1: se un elemento figlio attributeGroup di un elemento contiene un attributeGroup che fa riferimento a sé stesso, deve averne esattamente uno, mentre questo ne ha "{0}". - src-redefine.7.2.1 = src-redefine.7.2.1: nessun attributeGroup nello schema ridefinito con nome corrispondente a "{0}". - src-redefine.7.2.2 = src-redefine.7.2.2: AttributeGroup "{0}" non limita correttamente l''AttributeGroup che ridefinisce; vincolo violato: "{1}". - src-resolve = src-resolve: impossibile risolvere il nome "{0}" in un componente {1}. - src-resolve.4.1 = src-resolve.4.1: errore durante la risoluzione del componente ''{2}''. È stato rilevato che ''{2}'' non dispone di uno spazio di nomi, ma ai componenti senza spazi di nomi di destinazione non è possibile fare riferimento dal documento di schema ''{0}''. Se è previsto che ''{2}'' abbia uno spazio di nomi, è probabile che sia necessario specificare un prefisso. Se, invece, è previsto che ''{2}'' non abbia uno spazio di nomi, aggiungere ''import'' senza un attributo "namespace" a ''{0}''. - src-resolve.4.2 = src-resolve.4.2: errore durante la risoluzione del componente ''{2}''. È stato rilevato che ''{2}'' si trova nello spazio di nomi ''{1}'', ma ai componenti di questo spazio di nomi di destinazione non è possibile fare riferimento dal documento di schema ''{0}''. Se questo spazio di nomi è errato, è probabile che sia necessario modificare il prefisso ''{2}''. Se lo spazio di nomi è corretto, aggiungere la tag ''import'' adeguata a ''{0}''. - src-simple-type.2.a = src-simple-type.2.a: è stato trovato un elemento che contiene sia un [attribute] di base che un elemento tra i rispettivi [children]. È consentito solo uno. - src-simple-type.2.b = src-simple-type.2.b: è stato trovato un elemento che non contiene né un [attribute] di base né un elemento tra i rispettivi [children]. Ne è richiesto uno. - src-simple-type.3.a = src-simple-type.3.a: è stato trovato un elemento che contiene sia un [attribute] itemType che un elemento tra i rispettivi [children]. È consentito solo uno. - src-simple-type.3.b = src-simple-type.3.b: è stato trovato un elemento che non contiene né un [attribute] itemType né un elemento tra i rispettivi [children]. Ne è richiesto uno. - src-single-facet-value = src-single-facet-value: il facet ''{0}'' è stato definito più volte. - src-union-memberTypes-or-simpleTypes = src-union-memberTypes-or-simpleTypes: un elemento deve avere un [attribute] memberTypes non vuoto o almeno un elemento tra i rispettivi [children]. - -#constraint valid (3.X.6) - - ag-props-correct.2 = ag-props-correct.2: errore per il gruppo di attributi "{0}". Sono specificati usi di attributi duplicati con lo stesso nome e spazio di nomi di destinazione. Il nome dell''uso dell''attributo duplicato è "{1}". - ag-props-correct.3 = ag-props-correct.3: errore per il gruppo di attributi "{0}". Due dichiarazioni di attributo, "{1}" e "{2}" hanno tipi derivati dall''ID. - a-props-correct.2 = a-props-correct.2: valore di vincolo di valore "{1}" non valido nell''attributo "{0}". - a-props-correct.3 = a-props-correct.3: l''attributo ''{0}'' non può utilizzare il valore ''fixed'' o ''default'' poiché la '{'type definition'}' dell''attributo è un ID o è derivata dall''ID. - au-props-correct.2 = au-props-correct.2: nella dichiarazione di attributo di ''{0}'' è stato specificato un valore fisso ''{1}''. Se, pertanto, l''uso dell''attributo che fa riferimento a ''{0}'' ha anche un valore '{'value constraint'}', deve essere fisso e il suo valore deve essere ''{1}''. - cos-all-limited.1.2 = cos-all-limited.1.2: deve apparire un gruppo di modelli 'all' in una parte con '{'min occurs'}' = '{'max occurs'}' = 1 e la parte deve far parte di una coppia che costituisca il '{'content type'}' di una definizione di tipo complesso. - cos-all-limited.2 = cos-all-limited.2: il valore '{'max occurs'}' di un elemento in un gruppo di modelli ''all'' deve essere 0 o 1. Il valore ''{0}'' per l''elemento ''{1}'' non è valido. - cos-applicable-facets = cos-applicable-facets: facet ''{0}'' non consentito dal tipo {1}. - cos-ct-extends.1.1 = cos-ct-extends.1.1: il tipo ''{0}'' è stato derivato mediante estensione dal tipo ''{1}'', ma l''attributo "final" di ''{1}'' impedisce la derivazione mediante estensione. - cos-ct-extends.1.4.3.2.2.1.a = cos-ct-extends.1.4.3.2.2.1.a: Il tipo di contenuto di un tipo derivato e quello della rispettiva base devono essere entrambi misti o di soli elementi. Il tipo ''{0}'' è di soli elementi, mentre la rispettiva base non lo è. - cos-ct-extends.1.4.3.2.2.1.b = cos-ct-extends.1.4.3.2.2.1.b: Il tipo di contenuto di un tipo derivato e quello della rispettiva base devono essere entrambi misti o di soli elementi. Il tipo ''{0}'' è misto, mentre la rispettiva base non lo è. - cos-element-consistent = cos-element-consistent: errore per il tipo "{0}". Nel gruppo di modelli appaiono più elementi con nome "{1}" e tipi diversi. - cos-list-of-atomic = cos-list-of-atomic: nella definizione del tipo di lista ''{0}'', il tipo ''{1}'' non è valido poiché non è indivisibile (''{1}'' è un tipo di lista o un tipo di unione che contiene una lista). - cos-nonambig = cos-nonambig: {0} e {1} (o gli elementi derivanti dal gruppo di sostituzione) violano "Unique Particle Attribution". Durante la convalida su questo schema, si creerebbe un''ambiguità per le due parti. - cos-particle-restrict.a = cos-particle-restrict.a: la parte derivata è vuota, mente la base non è svuotabile. - cos-particle-restrict.b = cos-particle-restrict.b: la parte della base è vuota, mente la parte derivata non lo è. - cos-particle-restrict.2 = cos-particle-restrict.2: limitazione di parte vietata: ''{0}''. - cos-st-restricts.1.1 = cos-st-restricts.1.1: il tipo ''{1}'' è indivisibile, quindi la '{'base type definition'}' "{0}" deve essere una definizione di tipo semplice indivisibile o un tipo di dati predefinito incorporato. - cos-st-restricts.2.1 = cos-st-restricts.2.1: nella definizione del tipo di lista ''{0}'', il tipo ''{1}'' non è valido poiché è un tipo di lista o un tipo di unione che contiene una lista. - cos-st-restricts.2.3.1.1 = cos-st-restricts.2.3.1.1: il componente '{'final'}' di '{'item type definition'}' ''{0}'' contiene ''list'', pertanto ''{0}'' non può essere utilizzato come tipo di elemento per il tipo di lista ''{1}''. - cos-st-restricts.3.3.1.1 = cos-st-restricts.3.3.1.1: il componente '{'final'}' di '{'member type definitions'}' ''{0}'' contiene ''union'', pertanto ''{0}'' non può essere utilizzato come tipo di membro per il tipo di unione ''{1}''. - cos-valid-default.2.1 = cos-valid-default.2.1: l''elemento "{0}" ha un vincolo di valore e deve avere un modello di contenuto misto o semplice. - cos-valid-default.2.2.2 = cos-valid-default.2.2.2: l''elemento ''{0}'' ha un '{'value constraint'}' e la rispettiva definizione del tipo contiene '{'content type'}' misto, quindi la parte di '{'content type'}' deve essere svuotabile. - c-props-correct.2 = c-props-correct.2: la cardinalità dei campi per il keyref "{0}" e per la chiave "{1}" deve corrispondere. - ct-props-correct.3 = ct-props-correct.3: sono state rilevate definizioni circolari per il tipo complesso ''{0}''. Ciò significa che ''{0}'' si trova all''interno della sua stessa gerarchia di tipi, il che è errato. - ct-props-correct.4 = ct-props-correct.4: errore per il tipo "{0}". Sono specificati usi di attributi duplicati con lo stesso nome e spazio di nomi di destinazione. Il nome dell''uso dell''attributo duplicato è "{1}". - ct-props-correct.5 = ct-props-correct.5: errore per il tipo "{0}". Due dichiarazioni di attributo, "{1}" e "{2}" hanno tipi derivati dall''ID. - derivation-ok-restriction.1 = derivation-ok-restriction.1: il tipo ''{0}'' è stato derivato mediante limitazione dal tipo ''{1}'', ma ''{1}'' ha una proprietà '{'final'}' che impedisce la derivazione mediante limitazione. - derivation-ok-restriction.2.1.1 = derivation-ok-restriction.2.1.1: errore per il tipo "{0}". Un uso dell''attributo ''{1}'' in questo tipo ha un valore "use" ''{2}'' che è incoerente con il valore di ''required'' in un uso corrispondente dell''attributo nel tipo di base. - derivation-ok-restriction.2.1.2 = derivation-ok-restriction.2.12: errore per il tipo "{0}". Un uso dell''attributo ''{1}'' in questo tipo ha un valore tipo ''{2}'' che è stato derivato in modo valido da ''{3}'', ovvero dal tipo di uso corrispondente dell''attributo nel tipo di base. - derivation-ok-restriction.2.1.3.a = derivation-ok-restriction.2.1.3.a: errore per il tipo "{0}". L''uso dell''attributo ''{1}'' in questo tipo ha un vincolo di valore effettivo che è fisso, mentre il vincolo di valore effettivo dell''uso dell''attributo corrispondente nel tipo di base è fisso. - derivation-ok-restriction.2.1.3.b = derivation-ok-restriction.2.1.3.b: errore per il tipo "{0}". L''uso dell''attributo ''{1}'' in questo tipo ha un vincolo di valore effettivo fisso con valore ''{2}'', che è incoerente con il valore ''{3}'' per il vincolo di valore effettivo fisso dell''uso dell''attributo corrispondente nel tipo di base. - derivation-ok-restriction.2.2.a = derivation-ok-restriction.2.2.a: errore per il tipo "{0}". L''uso dell''attributo ''{1}'' in questo tipo non ha un uso dell''attributo corrispondente nella base e il tipo di base non ha alcun attributo di carattere jolly. - derivation-ok-restriction.2.2.b = derivation-ok-restriction.2.2.b: errore per il tipo "{0}". L''uso dell''attributo ''{1}'' in questo tipo non ha un uso dell''attributo corrispondente nella base e il carattere jolly nel tipo di base non consente lo spazio di nomi ''{2}'' di questo uso dell''attributo. - derivation-ok-restriction.3 = derivation-ok-restriction.3: errore per il tipo "{0}". Nell''uso dell''attributo ''{1}'' nel tipo di base, REQUIRED è impostato su true, ma non esiste alcun uso dell''attributo corrispondente nel tipo derivato. - derivation-ok-restriction.4.1 = derivation-ok-restriction.4.1: errore per il tipo "{0}". La derivazione ha un carattere jolly dell''attributo, ma la base non ne ha uno. - derivation-ok-restriction.4.2 = derivation-ok-restriction.4.2: errore per il tipo "{0}". Il carattere jolly nella derivazione non è un subset di caratteri jolly valido di quello nella base. - derivation-ok-restriction.4.3 = derivation-ok-restriction.4.3: errore per il tipo "{0}". Il contenuto del processo del carattere jolly nella derivazione ({1}) è più debole di quello nella base ({2}). - derivation-ok-restriction.5.2.2.1 = derivation-ok-restriction.5.2.2.1: errore per il tipo ''{0}''. Il tipo di contenuto semplice ''del tipo ''{1}'' non è una limitazione valida del tipo di contenuto semplice della base ''{2}''. - derivation-ok-restriction.5.3.2 = derivation-ok-restriction.5.3.2: errore per il tipo ''{0}''. Il tipo di contenuto di questo tipo è vuoto, ma il tipo di contenuto della base ''{1}'' non è vuoto o svuotabile. - derivation-ok-restriction.5.4.1.2 = derivation-ok-restriction.5.4.1.2: errore per il tipo "{0}". Il tipo di contenuto di questo tipo è misto, ma il tipo di contenuto della base ''{1}'' non lo è. - derivation-ok-restriction.5.4.2 = derivation-ok-restriction.5.4.2: errore per il tipo "{0}". La parte del tipo non è una limitazione valida della parte della base. - enumeration-required-notation = enumeration-required-notation: il tipo NOTATION ''{0}'' utilizzato da {2} ''{1}'' deve avere un valore di facet di enumerazione che specifica gli elementi di notazione utilizzati da questo tipo. - enumeration-valid-restriction = enumeration-valid-restriction: il valore di enumerazione "{0}" non è nello spazio dei valori del tipo di base {1}. - e-props-correct.2 = e-props-correct.2: valore di vincolo di valore "{1}" non valido nell''elemento "{0}". - e-props-correct.4 = e-props-correct.4: '{'type definition'}' dell''elemento "{0}" non è stata derivata in modo valido da '{'type definition'}' di substitutionHead "{1}" o la proprietà '{'substitution group exclusions'}' di ''{1}'' non consente questa derivazione. - e-props-correct.5 = e-props-correct.5: non deve esistere '{'value constraint'}' sull''elemento "{0}" perché '{'type definition'}' dell''elemento o '{'content type'}' di '{'type definition'}' è un ID o è derivato da un ID. - e-props-correct.6 = e-props-correct.6: gruppo di sostituzione circolare rilevato per l''elemento "{0}". - fractionDigits-valid-restriction = fractionDigits-valid-restriction: nella definizione di {2}, il valore ''{0}'' per il facet ''fractionDigits'' non è valido. Deve essere <= rispetto al valore per ''fractionDigits'', impostato su ''{1}'' in uno dei tipi di predecessore. - fractionDigits-totalDigits = fractionDigits-totalDigits: nella definizione di {2}, il valore ''{0}'' per il facet ''fractionDigits'' non è valido. Il valore deve essere <= rispetto al valore per ''totalDigits'', impostato su ''{1}''. - length-minLength-maxLength.1.1 = length-minLength-maxLength.1.1: per il tipo {0}, il valore di lunghezza ''{1}'' non può essere minore del valore di minLength ''{2}''. - length-minLength-maxLength.1.2.a = length-minLength-maxLength.1.2.a: per il tipo {0}, la base non può avere un facet minLength se la limitazione corrente ha un facet minLength e la limitazione corrente o la base ha un facet di lunghezza. - length-minLength-maxLength.1.2.b = length-minLength-maxLength.1.2.b: per il tipo {0}, il valore corrente di minLength ''{1}'' deve essere uguale a valore di minLength ''{2}'' della base. - length-minLength-maxLength.2.1 = length-minLength-maxLength.2.1: per il tipo {0}, il valore di lunghezza ''{1}'' non può essere maggiore del valore di maxLength ''{2}''. - length-minLength-maxLength.2.2.a = length-minLength-maxLength.2.2.a: per il tipo {0}, la base non può avere un facet maxLength se la limitazione corrente ha un facet maxLength e la limitazione corrente o la base ha un facet di lunghezza. - length-minLength-maxLength.2.2.b = length-minLength-maxLength.2.2.b: per il tipo {0}, il valore corrente di maxLength ''{1}'' deve essere uguale a valore di maxLength ''{2}'' della base. - length-valid-restriction = length-valid-restriction: errore per il tipo ''{2}''. Il valore della lunghezza = "{0}" deve essere = al valore di quella del tipo di base "{1}". - maxExclusive-valid-restriction.1 = maxExclusive-valid-restriction.1: errore per il tipo ''{2}''. Il valore maxExclusive ="{0}" deve essere <= maxExclusive del tipo di base "{1}". - maxExclusive-valid-restriction.2 = maxExclusive-valid-restriction.2: errore per il tipo ''{2}''. Il valore maxInclusive ="{0}" deve essere <= maxExclusive del tipo di base "{1}". - maxExclusive-valid-restriction.3 = maxExclusive-valid-restriction.3: errore per il tipo ''{2}''. Il valore maxExclusive ="{0}" deve essere > minInclusive del tipo di base "{1}". - maxExclusive-valid-restriction.4 = maxExclusive-valid-restriction.2: errore per il tipo ''{2}''. Il valore maxExclusive ="{0}" deve essere > minExclusive del tipo di base "{1}". - maxInclusive-maxExclusive = maxInclusive-maxExclusive: non è possibile specificare sia maxInclusive che maxExclusive per lo stesso tipo di dati. In {2}, maxInclusive = ''{0}'' e maxExclusive = ''{1}''. - maxInclusive-valid-restriction.1 = maxInclusive-valid-restriction.1: errore per il tipo ''{2}''. Il valore maxInclusive ="{0}" deve essere <= maxInclusive del tipo di base "{1}". - maxInclusive-valid-restriction.2 = maxInclusive-valid-restriction.2: errore per il tipo ''{2}''. Il valore maxInclusive ="{0}" deve essere <= maxExclusive del tipo di base "{1}". - maxInclusive-valid-restriction.3 = maxInclusive-valid-restriction.3: errore per il tipo ''{2}''. Il valore maxInclusive ="{0}" deve essere >= minInclusive del tipo di base "{1}". - maxInclusive-valid-restriction.4 = maxInclusive-valid-restriction.4: errore per il tipo ''{2}''. Il valore maxInclusive ="{0}" deve essere > minExclusive del tipo di base "{1}". - maxLength-valid-restriction = maxLength-valid-restriction: nella definizione di {2}, il valore maxLength = "{0}" deve essere <= rispetto a quello del tipo di base "{1}". - mg-props-correct.2 = mg-props-correct.2: definizioni circolari rilevate per il gruppo ''{0}''. Se si seguono in maniera ricorsiva i valori '{'term'}' delle parti, se ne avrà una il cui '{'term'}' è il gruppo stesso. - minExclusive-less-than-equal-to-maxExclusive = minExclusive-less-than-equal-to-maxExclusive: nella definizione di {2}, il valore minExclusive = ''{0}'' deve essere <= rispetto al valore maxExclusive = ''{1}''. - minExclusive-less-than-maxInclusive = minExclusive-less-than-maxInclusive: nella definizione di {2}, il valore minExclusive = ''{0}'' deve essere <= rispetto al valore maxInclusive = ''{1}''. - minExclusive-valid-restriction.1 = minExclusive-valid-restriction.1: errore per il tipo ''{2}''. Il valore minExclusive ="{0}" deve essere >= minExclusive del tipo di base "{1}". - minExclusive-valid-restriction.2 = minExclusive-valid-restriction.2: errore per il tipo ''{2}''. Il valore minExclusive ="{0}" deve essere <= maxInclusive del tipo di base "{1}". - minExclusive-valid-restriction.3 = minExclusive-valid-restriction.4: errore per il tipo ''{2}''. Il valore minExclusive ="{0}" deve essere >= minInclusive del tipo di base "{1}". - minExclusive-valid-restriction.4 = minExclusive-valid-restriction.4: errore per il tipo ''{2}''. Il valore minExclusive ="{0}" deve essere < maxExclusive del tipo di base "{1}". - minInclusive-less-than-equal-to-maxInclusive = minInclusive-less-than-equal-to-maxInclusive: nella definizione di {2}, il valore minInclusive = ''{0}'' deve essere <= rispetto al valore maxInclusive = ''{1}''. - minInclusive-less-than-maxExclusive = minInclusive-less-than-maxExclusive: nella definizione di {2}, il valore minInclusive = ''{0}'' deve essere < rispetto al valore maxExclusive = ''{1}''. - minInclusive-minExclusive = minInclusive-minExclusive: non è possibile specificare sia minInclusive che minExclusive per lo stesso tipo di dati. In {2}, minInclusive = ''{0}'' e minExclusive = ''{1}''. - minInclusive-valid-restriction.1 = minInclusive-valid-restriction.1: errore per il tipo ''{2}''. Il valore minInclusive ="{0}" deve essere >= minInclusive del tipo di base "{1}". - minInclusive-valid-restriction.2 = minInclusive-valid-restriction.2: errore per il tipo ''{2}''. Il valore minInclusive ="{0}" deve essere <= maxInclusive del tipo di base "{1}". - minInclusive-valid-restriction.3 = minInclusive-valid-restriction.3: errore per il tipo ''{2}''. Il valore minInclusive ="{0}" deve essere > minExclusive del tipo di base "{1}". - minInclusive-valid-restriction.4 = minInclusive-valid-restriction.4: errore per il tipo ''{2}''. Il valore minInclusive ="{0}" deve essere < maxExclusive del tipo di base "{1}". - minLength-less-than-equal-to-maxLength = minLength-less-than-equal-to-maxLength: nella definizione di {2}, il valore minLength = ''{0}'' deve essere < rispetto al valore maxLength = ''{1}''. - minLength-valid-restriction = minLength-valid-restriction: nella definizione di {2}, minLength = ''{0}'' deve essere >= rispetto a quello del tipo di base ''{1}''. - no-xmlns = no-xmlns: il {'name'} di una dichiarazione di attributo non deve corrispondere a 'xmlns'. - no-xsi = no-xsi: il '{'target namespace'}' di una dichiarazione di attributo non deve corrispondere a "{0}". - p-props-correct.2.1 = p-props-correct.2.1: nella dichiarazione di ''{0}'', il valore di ''minOccurs'' è ''{1}'', ma non deve essere maggiore del valore di ''maxOccurs'', che è ''{2}''. - rcase-MapAndSum.1 = rcase-MapAndSum.1: non esiste un mapping funzionale completo tra le parti. - rcase-MapAndSum.2 = rcase-MapAndSum.2: l''intervallo di ricorrenza ({0},{1}) del gruppo non è una limitazione valida dell''intervallo di ricorrenza ({2},{3}) del gruppo di base. - rcase-NameAndTypeOK.1 = rcase-NameAndTypeOK.1: alcuni elementi hanno nomi e spazi di nomi di destinazione che non sono uguali: l''elemento "{0}" nello spazio di nomi "{1}" e l''elemento "{2}" nello spazio di nomi "{3}". - rcase-NameAndTypeOK.2 = rcase-NameAndTypeOK.2: errore per la parte il cui '{'term'}' è la dichiarazione di elemento ''{0}''. Il valore '{'nillable'}' della dichiarazione di elemento è impostato su true, ma la parte corrispondente nel tipo di base contiene una dichiarazione di elemento per la quale '{'nillable'}' è impostato su false. - rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: errore per la parte il cui '{'term'}' è la dichiarazione di elemento ''{0}''. L''intervallo di ricorrenza ({1},{2}) non è una limitazione valida dell''intervallo ({3},{4}) della parte corrispondente nel tipo di base. - rcase-NameAndTypeOK.4.a = rcase-NameAndTypeOK.4.a: l''elemento "{0}" non è fisso, ma l''elemento corrispondente nel tipo di base è fisso con il valore ''{1}''. - rcase-NameAndTypeOK.4.b = rcase-NameAndTypeOK.4.b: l''elemento "{0}" è fisso con il valore ''{1}'', ma l''elemento corrispondente nel tipo di base è fisso con il valore ''{2}''. - rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5: i vincoli di identità per l''elemento "{0}" non sono un subset di quelli nella base. - rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6: le sostituzioni non consentite per l''elemento "{0}" non sono un superset di quelle nella base. - rcase-NameAndTypeOK.7 = rcase-NameAndTypeOK.7: il tipo "{1}" dell''elemento "{0}" non deriva dal tipo dell''elemento di base "{2}". - rcase-NSCompat.1 = rcase-NSCompat.1: l''elemento "{0}" ha uno spazio di nomi "{1}" che non è consentito dal carattere jolly nella base. - rcase-NSCompat.2 = rcase-NSCompat.2: errore per la parte il cui '{'term'}' è la dichiarazione di elemento ''{0}''. L''intervallo di ricorrenza ({1},{2}) non è una limitazione valida dell''intervallo ({3},{4}) della parte corrispondente nel tipo di base. - rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1: non esiste un mapping funzionale completo tra le parti. - rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2: l''intervallo di ricorrenza ({0},{1}) del gruppo non è una limitazione valida dell''intervallo ({2},{3}) del carattere jolly di base. - rcase-NSSubset.1 = rcase-NSSubset.1: il carattere jolly non è un subset del carattere jolly corrispondente nella base. - rcase-NSSubset.2 = rcase-NSSubset.2: l''intervallo di ricorrenza ({0},{1}) del carattere jolly non è una limitazione valida di quello nella base ({2},{3}). - rcase-NSSubset.3 = rcase-NSSubset.3: il contenuto ''{0}'' del processo del carattere jolly è più debole di quello della base ''{1}''. - rcase-Recurse.1 = rcase-Recurse.1: l''intervallo di ricorrenza ({0},{1}) del gruppo non è una limitazione valida dell''intervallo di ricorrenza ({2},{3}) del gruppo di base. - rcase-Recurse.2 = rcase-Recurse.2: non esiste un mapping funzionale completo tra le parti. - rcase-RecurseLax.1 = rcase-RecurseLax.1: l''intervallo di ricorrenza ({0},{1}) del gruppo non è una limitazione valida dell''intervallo di ricorrenza ({2},{3}) del gruppo di base. - rcase-RecurseLax.2 = rcase-RecurseLax.2: non esiste un mapping funzionale completo tra le parti. - rcase-RecurseUnordered.1 = rcase-RecurseUnordered.1: l''intervallo di ricorrenza ({0},{1}) del gruppo non è una limitazione valida dell''intervallo di ricorrenza ({2},{3}) del gruppo di base. - rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: non esiste un mapping funzionale completo tra le parti. -# We're using sch-props-correct.2 instead of the old src-redefine.1 -# src-redefine.1 = src-redefine.1: The component ''{0}'' is begin redefined, but its corresponding component isn't in the schema document being redefined (with namespace ''{2}''), but in a different document, with namespace ''{1}''. - sch-props-correct.2 = sch-props-correct.2: uno schema non può contenere due componenti globali con lo stesso nome; questo contiene due ricorrenze di "{0}". - st-props-correct.2 = st-props-correct.2: sono state rilevate definizioni circolari per il tipo semplice ''{0}''. Ciò significa che ''{0}'' si trova all''interno della sua stessa gerarchia di tipi, il che è errato. - st-props-correct.3 = st-props-correct.3: errore per il tipo ''{0}''. Il valore di '{'final'}' per '{'base type definition'}', ''{1}'', impedisce la derivazione mediante limitazione. - totalDigits-valid-restriction = totalDigits-valid-restriction: nella definizione di {2}, il valore ''{0}'' per il facet ''totalDigits'' non è valido. Deve essere <= rispetto al valore per ''totalDigits'', impostato su ''{1}'' in uno dei tipi di predecessore. - whiteSpace-valid-restriction.1 = whiteSpace-valid-restriction.1: nella definizione di {0}, il valore ''{1}'' per il facet ''whitespace'' non è valido. Il valore per ''whitespace'' è stato impostato su ''collapse'' in uno dei tipi di predecessore. - whiteSpace-valid-restriction.2 = whiteSpace-valid-restriction.2: nella definizione di {0}, il valore ''preserve'' per il facet ''whitespace'' non è valido. Il valore per ''whitespace'' è stato impostato su ''replace'' in uno dei tipi di predecessore. - -#schema for Schemas - - s4s-att-invalid-value = s4s-att-invalid-value: valore di attributo non valido per "{1}" nell''elemento "{0}": Motivo registrato: {2} - s4s-att-must-appear = s4s-att-must-appear: l''attributo ''{1}'' deve apparire nell''elemento "{0}". - s4s-att-not-allowed = s4s-att-not-allowed: l''attributo ''{1}'' non può apparire nell''elemento "{0}". - s4s-elt-invalid = s4s-elt-invalid: l''elemento "{0}" non è un elemento valido nel documento dello schema. - s4s-elt-must-match.1 = s4s-elt-must-match.1: il contenuto di "{0}" deve corrispondere a {1}. Si è verificato un problema con inizio in {2}. - s4s-elt-must-match.2 = s4s-elt-must-match.2: il contenuto di "{0}" deve corrispondere a {1}. Non sono stati trovati elementi sufficienti. - # the "invalid-content" messages provide less information than the "must-match" counterparts above. They're used for complex types when providing a "match" would be an information dump - s4s-elt-invalid-content.1 = s4s-elt-invalid-content.1: il contenuto di ''{0}'' non è valido. L''elemento ''{1}'' non è valido, si trova in una posizione errata o è presente troppe volte. - s4s-elt-invalid-content.2 = s4s-elt-invalid-content.2: il contenuto di ''{0}'' non è valido. L''elemento ''{1}'' non può essere vuoto. - s4s-elt-invalid-content.3 = s4s-elt-invalid-content.3: gli elementi di tipo ''{0}'' non possono trovarsi dopo dichiarazioni come elementi figlio di un elemento . - s4s-elt-schema-ns = s4s-elt-schema-ns: lo spazio di nomi dell''elemento ''{0}'' deve derivare dallo spazio di nomi dello schema ''http://www.w3.org/2001/XMLSchema''. - s4s-elt-character = s4s-elt-character: non sono consentiti caratteri diversi dallo spazio negli elementi di schema diversi da ''xs:appinfo'' e ''xs:documentation''. Rilevato "{0}". - -# codes not defined by the spec - - c-fields-xpaths = c-fields-xpaths: il valore di campo = "{0}" non è valido. - c-general-xpath = c-general-xpath: l''espressione "{0}" non è valida rispetto al subset XPath supportato dallo schema XML. - c-general-xpath-ns = c-general-xpath-ns: un prefisso dello spazio di nomi nell''espressione XPath "{0}" non è associato a uno spazio di nomi. - c-selector-xpath = c-selector-xpath: il valore del selettore = "{0}" non è valido; gli XPath del selettore non possono contenere attributi. - EmptyTargetNamespace = EmptyTargetNamespace: nel documento di schema ''{0}'' il valore dell''attributo ''targetNamespace'' non può essere una stringa vuota. - FacetValueFromBase = FacetValueFromBase: nella dichiarazione del tipo ''{0}'' il valore ''{1}'' del facet ''{2}'' deve provenire dallo spazio di valori del tipo di base ''{3}''. - FixedFacetValue = FixedFacetValue: nella definizione di {3}, il valore ''{1}'' per il facet ''{0}'' non è valido. Il valore per ''{0}'' è stato impostato su ''{2}'' in uno dei tipi di predecessore e '{'fixed'}' = true. - InvalidRegex = InvalidRegex: il valore di pattern "{0}" non è un''espressione regolare valida. Errore segnalato ''{1}'' nella colonna ''{2}''. - MaxOccurLimit = La configurazione corrente del parser non consente che un valore di attributo maxOccurs sia impostato su un valore maggiore del valore {0}. - PublicSystemOnNotation = PublicSystemOnNotation: almeno uno tra ''public'' e ''system'' deve essere presente nell'elemento ''notation''. - SchemaLocation = SchemaLocation: il valore = ''{0}'' di schemaLocation deve avere un numero pari di URI. - TargetNamespace.1 = TargetNamespace.1: lo spazio di nomi previsto è "{0}", ma lo spazio di nomi di destinazione del documento dello schema è "{1}". - TargetNamespace.2 = TargetNamespace.2: non è previsto nessuno spazio di nomi, ma il documento dello schema ha uno spazio di nomi di destinazione ''{1}''. - UndeclaredEntity = UndeclaredEntity: l''entità ''{0}'' non è stata dichiarata. - UndeclaredPrefix = UndeclaredPrefix: impossibile risolvere ''{0}'' come QName. Il prefisso ''{1}'' non è stato dichiarato. - - -# JAXP 1.2 schema source property errors - - jaxp12-schema-source-type.1 = La proprietà ''http://java.sun.com/xml/jaxp/properties/schemaSource'' non può avere un valore di tipo ''{0}''. I tipi possibili di valori supportati sono String, File, InputStream, InputSource o un array di questi tipi. - jaxp12-schema-source-type.2 = La proprietà ''http://java.sun.com/xml/jaxp/properties/schemaSource'' non può avere un valore di array di tipo ''{0}''. I tipi possibili di array supportati sono Object, String, File, InputStream e InputSource. - jaxp12-schema-source-ns = Quando si utilizza un array di oggetti come valore della proprietà 'http://java.sun.com/xml/jaxp/properties/schemaSource', non è possibile avere due schemi che condividono lo stesso spazio di nomi di destinazione. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties deleted file mode 100644 index 192e1af82bf..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties +++ /dev/null @@ -1,328 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file contains error and warning messages related to XML Schema -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = 메시지 키에 해당하는 오류 메시지를 찾을 수 없습니다. - FormatFailed = 다음 메시지의 형식을 지정하는 중 내부 오류가 발생했습니다.\n - -# For internal use - - Internal-Error = 내부 오류: {0}. - dt-whitespace = 합집합 simpleType ''{0}''에 대한 공백 면 값을 사용할 수 없습니다. - GrammarConflict = 사용자 문법 풀에서 반환된 문법 중 하나가 다른 문법과 충돌합니다. - -# Identity constraints - - AbsentKeyValue = cvc-identity-constraint.4.2.1.a: "{0}" 요소에 "{1}" 키에 대한 값이 없습니다. - DuplicateField = "{0}" 필드 범위에 중복 사항이 있습니다. - DuplicateKey = cvc-identity-constraint.4.2.2: "{1}" 요소의 ID 제약 조건 "{2}"에 대해 중복 키 값 [{0}]이(가) 선언되었습니다. - DuplicateUnique = cvc-identity-constraint.4.1: "{1}" 요소의 ID 제약 조건 "{2}"에 중복 고유 값 [{0}]이(가) 선언되었습니다. - FieldMultipleMatch = cvc-identity-constraint.3: ID 제약 조건 "{1}"의 "{0}" 필드가 해당 선택기 범위 내의 값 둘 이상과 일치합니다. 필드는 고유 값과 일치해야 합니다. - FixedDiffersFromActual = 이 요소의 콘텐츠가 스키마의 요소 선언에 있는 "fixed" 속성값과 일치하지 않습니다. - KeyMatchesNillable = cvc-identity-constraint.4.2.3: "{0}" 요소에 nillable이 true로 설정된 요소와 일치하는 "{1}" 키가 있습니다. - KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: "{0}" 요소의 ID 제약 조건에 대해 지정된 값이 부족합니다. - KeyNotFound = cvc-identity-constraint.4.3: ''{2}'' 요소의 ID 제약 조건에 대해 값이 ''{1}''인 ''{0}'' 키를 찾을 수 없습니다. - KeyRefOutOfScope = ID 제약 조건 오류: ID 제약 조건 "{0}"의 keyref가 범위에서 벗어난 키 또는 고유 항목을 참조합니다. - KeyRefReferNotFound = 키 참조 선언 "{0}"은(는) 이름이 "{1}"인 알 수 없는 키를 참조합니다. - UnknownField = 내부 ID 제약 조건 오류: {1} 요소에 대해 지정된 ID 제약 조건 "{2}"에 대한 알 수 없는 필드 "{0}"입니다. - -# Ideally, we should only use the following error keys, not the ones under -# "Identity constraints". And we should cover all of the following errors. - -#validation (3.X.4) - - cvc-attribute.3 = cvc-attribute.3: ''{0}'' 요소의 ''{1}'' 속성에 대한 ''{2}'' 값이 ''{3}'' 유형에 대해 부적합합니다. - cvc-attribute.4 = cvc-attribute.4: ''{0}'' 요소의 ''{1}'' 속성에 대한 ''{2}'' 값이 고정된 '{'value constraint'}'에 대해 부적합합니다. 속성의 값은 ''{3}''이어야 합니다. - cvc-complex-type.2.1 = cvc-complex-type.2.1: 유형의 콘텐츠 유형이 비어 있으므로 ''{0}'' 요소에는 문자 또는 요소 정보 항목 [children]이 없어야 합니다. - cvc-complex-type.2.2 = cvc-complex-type.2.2: ''{0}'' 요소에는 요소 [children]이 없어야 하며 값이 적합해야 합니다. - cvc-complex-type.2.3 = cvc-complex-type.2.3: 유형의 콘텐츠 유형이 요소 전용이므로 ''{0}'' 요소에는 문자 [children]이 포함될 수 없습니다. - cvc-complex-type.2.4.a = cvc-complex-type.2.4.a: ''{0}'' 요소로 시작하는 부적합한 콘텐츠가 발견되었습니다. ''{1}'' 중 하나가 필요합니다. - cvc-complex-type.2.4.b = cvc-complex-type.2.4.b: ''{0}'' 요소의 콘텐츠가 불완전합니다. ''{1}'' 중 하나가 필요합니다. - cvc-complex-type.2.4.c = cvc-complex-type.2.4.c: 일치하는 와일드 카드 문자가 엄격하게 적용되지만 ''{0}'' 요소에 대한 선언을 찾을 수 없습니다. - cvc-complex-type.2.4.d = cvc-complex-type.2.4.d: ''{0}'' 요소로 시작하는 부적합한 콘텐츠가 발견되었습니다. 여기에는 하위 요소가 필요하지 않습니다. - cvc-complex-type.2.4.d.1 = cvc-complex-type.2.4.d: ''{0}'' 요소로 시작하는 부적합한 콘텐츠가 발견되었습니다. 여기에는 하위 요소 ''{1}''이(가) 필요하지 않습니다. - cvc-complex-type.2.4.e = cvc-complex-type.2.4.e: ''{0}''은(는) 현재 시퀀스에서 최대 ''{2}''번 발생할 수 있습니다. 이 제한이 초과되었습니다. 이 지점에서는 ''{1}'' 중 하나가 필요합니다. - cvc-complex-type.2.4.f = cvc-complex-type.2.4.f: ''{0}''은(는) 현재 시퀀스에서 최대 ''{1}''번 발생할 수 있습니다. 이 제한이 초과되었습니다. 이 지점에서는 하위 요소가 필요하지 않습니다. - cvc-complex-type.2.4.g = cvc-complex-type.2.4.g: ''{0}'' 요소로 시작하는 부적합한 콘텐츠가 발견되었습니다. 현재 시퀀스에서 ''{1}''은(는) ''{2}''번 이상 발생해야 합니다. 이 제약 조건을 만족하려면 인스턴스가 하나 더 필요합니다. - cvc-complex-type.2.4.h = cvc-complex-type.2.4.h: ''{0}'' 요소로 시작하는 부적합한 콘텐츠가 발견되었습니다. 현재 시퀀스에서 ''{1}''은(는) ''{2}''번 이상 발생해야 합니다. 이 제약 조건을 만족하려면 인스턴스가 ''{3}''개 더 필요합니다. - cvc-complex-type.2.4.i = cvc-complex-type.2.4.i: ''{0}'' 요소의 콘텐츠가 완벽하지 않습니다. ''{1}''은(는) ''{2}''번 이상 발생해야 합니다. 이 제약 조건을 만족하려면 인스턴스가 하나 더 필요합니다. - cvc-complex-type.2.4.j = cvc-complex-type.2.4.j: ''{0}'' 요소의 콘텐츠가 완벽하지 않습니다. ''{1}''은(는) ''{2}''번 이상 발생해야 합니다. 이 제약 조건을 만족하려면 인스턴스가 ''{3}''개 더 필요합니다. - cvc-complex-type.3.1 = cvc-complex-type.3.1: ''{0}'' 요소의 ''{1}'' 속성에 대한 ''{2}'' 값이 해당 속성 사용에 대해 부적합합니다. ''{1}'' 속성의 고정된 값이 ''{3}''입니다. - cvc-complex-type.3.2.1 = cvc-complex-type.3.2.1: ''{0}'' 요소에 ''{1}'' 속성에 대한 속성 와일드 카드 문자가 없습니다. - cvc-complex-type.3.2.2 = cvc-complex-type.3.2.2: ''{1}'' 속성은 ''{0}'' 요소에 나타날 수 없습니다. - cvc-complex-type.4 = cvc-complex-type.4: ''{1}'' 속성은 ''{0}'' 요소에 나타나야 합니다. - cvc-complex-type.5.1 = cvc-complex-type.5.1: ''{0}'' 요소에서 ''{1}'' 속성이 대체 ID이지만 대체 ID ''{2}''이(가) 이미 있습니다. 하나만 사용할 수 있습니다. - cvc-complex-type.5.2 = cvc-complex-type.5.2: ''{0}'' 요소에서 ''{1}'' 속성이 대체 ID이지만 '{'attribute uses'}' 중 ID에서 파생된 ''{2}'' 속성이 이미 있습니다. - cvc-datatype-valid.1.2.1 = cvc-datatype-valid.1.2.1: ''{0}''은(는) ''{1}''에 대해 적합한 값이 아닙니다. - cvc-datatype-valid.1.2.2 = cvc-datatype-valid.1.2.2: ''{0}''은(는) 목록 유형 ''{1}''의 적합한 값이 아닙니다. - cvc-datatype-valid.1.2.3 = cvc-datatype-valid.1.2.3: ''{0}''은(는) 합집합 유형 ''{1}''의 적합한 값이 아닙니다. - cvc-elt.1.a = cvc-elt.1.a: ''{0}'' 요소의 선언을 찾을 수 없습니다. - cvc-elt.1.b = cvc-elt.1.b: 요소의 이름이 요소 선언 이름과 일치하지 않습니다. ''{0}''이(가) 발견되었습니다. ''{1}''이(가) 필요합니다. - cvc-elt.2 = cvc-elt.2: ''{0}''에 대한 요소 선언에서 '{'abstract'}'의 값은 false여야 합니다. - cvc-elt.3.1 = cvc-elt.3.1: ''{0}''의 '{'nillable'}' 속성이 false이므로 ''{1}'' 속성은 ''{0}'' 요소에 나타나지 않아야 합니다. - cvc-elt.3.2.1 = cvc-elt.3.2.1: ''{1}''이(가) 지정되었으므로 ''{0}'' 요소에는 문자 또는 요소 정보 [children]이 포함될 수 없습니다. - cvc-elt.3.2.2 = cvc-elt.3.2.2: ''{1}''이(가) 지정되었으므로 ''{0}'' 요소에 대해 고정된 '{'value constraint'}'가 없어야 합니다. - cvc-elt.4.1 = cvc-elt.4.1: ''{0}'' 요소의 ''{1}'' 속성에 대한 ''{2}'' 값은 적합한 QName이 아닙니다. - cvc-elt.4.2 = cvc-elt.4.2: ''{1}''을(를) ''{0}'' 요소에 대한 유형 정의로 분석할 수 없습니다. - cvc-elt.4.3 = cvc-elt.4.3: ''{1}'' 유형은 ''{0}'' 요소의 유형 정의 ''{2}''에서 적합하게 파생된 것이 아닙니다. - cvc-elt.5.1.1 = cvc-elt.5.1.1: ''{0}'' 요소의 '{'value constraint'}' ''{2}''은(는) ''{1}'' 유형에 대해 적합한 기본값이 아닙니다. - cvc-elt.5.2.2.1 = cvc-elt.5.2.2.1: ''{0}'' 요소에는 요소 정보 항목 [children]이 없어야 합니다. - cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1: ''{0}'' 요소의 ''{1}'' 값이 고정된 '{'value constraint'}' 값 ''{2}''과(와) 일치하지 않습니다. - cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2: ''{0}'' 요소의 ''{1}'' 값이 '{'value constraint'}' 값 ''{2}''과(와) 일치하지 않습니다. - cvc-enumeration-valid = cvc-enumeration-valid: ''{0}'' 값은 ''{1}'' 목록에 대해 적합한 면이 아닙니다. 목록의 값이어야 합니다. - cvc-fractionDigits-valid = cvc-fractionDigits-valid: ''{0}'' 값의 소수점 이하 자릿수가 {1}이지만 소수점 이하 자릿수는 {2}(으)로 제한되었습니다. - cvc-id.1 = cvc-id.1: IDREF ''{0}''에 대한 ID/IDREF 바인딩이 없습니다. - cvc-id.2 = cvc-id.2: ID 값 ''{0}''이(가) 여러 번 발생했습니다. - cvc-id.3 = cvc-id.3: ID 제약 조건 ''{0}''의 필드가 ''{1}'' 요소와 일치하지만 이 요소는 단순 유형을 사용하지 않습니다. - cvc-length-valid = cvc-length-valid: length = ''{1}''인 ''{0}'' 값은 ''{3}'' 유형의 length ''{2}''에 대해 적합한 면이 아닙니다. - cvc-maxExclusive-valid = cvc-maxExclusive-valid: ''{0}'' 값은 ''{2}'' 유형의 maxExclusive ''{1}''에 대해 적합한 면이 아닙니다. - cvc-maxInclusive-valid = cvc-maxInclusive-valid: ''{0}'' 값은 ''{2}'' 유형의 maxInclusive ''{1}''에 대해 적합한 면이 아닙니다. - cvc-maxLength-valid = cvc-maxLength-valid: length = ''{1}''인 ''{0}'' 값은 ''{3}'' 유형의 maxLength ''{2}''에 대해 적합한 면이 아닙니다. - cvc-minExclusive-valid = cvc-minExclusive-valid: ''{0}'' 값은 ''{2}'' 유형의 minExclusive ''{1}''에 대해 적합한 면이 아닙니다. - cvc-minInclusive-valid = cvc-minInclusive-valid: ''{0}'' 값은 ''{2}'' 유형의 minInclusive ''{1}''에 대해 적합한 면이 아닙니다. - cvc-minLength-valid = cvc-minLength-valid: length = ''{1}''인 ''{0}'' 값은 ''{3}'' 유형의 minLength ''{2}''에 대해 적합한 면이 아닙니다. - cvc-pattern-valid = cvc-pattern-valid: ''{0}'' 값은 ''{2}'' 유형의 ''{1}'' 패턴에 대해 적합한 면이 아닙니다. - cvc-totalDigits-valid = cvc-totalDigits-valid: ''{0}'' 값의 총 자릿수가 {1}이지만 총 자릿수는 {2}(으)로 제한되었습니다. - cvc-type.1 = cvc-type.1: 유형 정의 ''{0}''을(를) 찾을 수 없습니다. - cvc-type.2 = cvc-type.2: {0} 요소에 대한 유형 정의는 추상적일 수 없습니다. - cvc-type.3.1.1 = cvc-type.3.1.1: ''{0}'' 요소는 단순 유형이므로 네임스페이스 이름이 ''http://www.w3.org/2001/XMLSchema-instance''이며 [local name]이 ''type'', ''nil'', ''schemaLocation'' 또는 ''noNamespaceSchemaLocation'' 중 하나인 속성을 제외하고 다른 속성을 포함할 수 없습니다. 하지만 ''{1}'' 속성이 발견되었습니다. - cvc-type.3.1.2 = cvc-type.3.1.2: ''{0}'' 요소는 단순 유형이므로 요소 정보 항목 [children]을 포함하지 않아야 합니다. - cvc-type.3.1.3 = cvc-type.3.1.3: ''{0}'' 요소의 ''{1}'' 값이 부적합합니다. - -#schema valid (3.X.3) - - schema_reference.access = schema_reference: accessExternalSchema 속성으로 설정된 제한으로 인해 ''{1}'' 액세스가 허용되지 않으므로 스키마 문서 ''{0}'' 읽기를 실패했습니다. - schema_reference.4 = schema_reference.4: 스키마 문서 ''{0}'' 읽기를 실패했습니다. 원인: 1) 문서를 찾을 수 없습니다. 2) 문서를 읽을 수 없습니다. 3) 문서의 루트 요소가 가 아닙니다. - src-annotation = src-annotation: 요소에는 요소만 포함될 수 있지만 ''{0}''이(가) 발견되었습니다. - src-attribute.1 = src-attribute.1: ''default'' 및 ''fixed'' 속성은 속성 선언 ''{0}''에 함께 존재할 수 없습니다. 하나만 사용하십시오. - src-attribute.2 = src-attribute.2: ''default'' 속성이 ''{0}'' 속성에 존재하므로 ''use'' 값은 ''optional''이어야 합니다. - src-attribute.3.1 = src-attribute.3.1: 'ref' 또는 'name' 중 하나가 로컬 속성 선언에 존재해야 합니다. - src-attribute.3.2 = src-attribute.3.2: 콘텐츠가 속성 참조 ''{0}''에 대한 (annotation?)과 일치해야 합니다. - src-attribute.4 = src-attribute.4: ''{0}'' 속성에 ''type'' 속성과 익명의 ''simpleType'' 하위 속성이 모두 있습니다. 이 중 하나만 속성에 허용됩니다. - src-attribute_group.2 = src-attribute_group.2: 속성 그룹 ''{0}''에 대해 와일드 카드 문자의 교집합을 표현할 수 없습니다. - src-attribute_group.3 = src-attribute_group.3: 속성 그룹 ''{0}''에 대한 순환 정의가 감지되었습니다. 순환적으로 뒤에 오는 속성 그룹 참조가 결국 자신에게 돌아옵니다. - src-ct.1 = src-ct.1: ''{0}'' 유형에 대한 복합 유형 정의 표현 오류가 발생했습니다. 가 사용되는 경우 complexType이 기본 유형이어야 합니다. ''{1}''은(는) simpleType입니다. - src-ct.2.1 = src-ct.2.1: ''{0}'' 유형에 대한 복합 유형 정의 표현 오류가 발생했습니다. 가 사용되는 경우 콘텐츠 유형이 단순 유형인 complexType, 혼합 콘텐츠 및 비울 수 있는 조각을 가진 복합 유형(제한 사항이 지정된 경우에만) 또는 단순 유형(확장이 지정된 경우에만)이 기본 유형이어야 합니다. ''{1}''은(는) 이러한 조건을 충족하지 않습니다. - src-ct.2.2 = src-ct.2.2: ''{0}'' 유형에 대한 복합 유형 정의 표현 오류가 발생했습니다. simpleContent를 가진 complexType이 혼합 콘텐츠 및 비울 수 있는 조각을 가진 complexType을 제한하는 경우 의 하위 항목 중 이 있어야 합니다. - src-ct.4 = src-ct.4: ''{0}'' 유형에 대한 복합 유형 정의 표현 오류가 발생했습니다. 와일드 카드 문자의 교집합을 표현할 수 없습니다. - src-ct.5 = src-ct.5: ''{0}'' 유형에 대한 복합 유형 정의 표현 오류가 발생했습니다. 와일드 카드 문자의 합집합을 표현할 수 없습니다. - src-element.1 = src-element.1: ''default'' 및 ''fixed'' 속성은 요소 선언 ''{0}''에 함께 존재할 수 없습니다. 하나만 사용하십시오. - src-element.2.1 = src-element.2.1: 'ref' 또는 'name' 중 하나가 로컬 요소 선언에 존재해야 합니다. - src-element.2.2 = src-element.2.2: ''{0}''에 ''ref'' 속성이 포함되어 있으므로 해당 콘텐츠는 (annotation?)과 일치해야 합니다. 하지만 ''{1}''이(가) 발견되었습니다. - src-element.3 = src-element.3: ''{0}'' 요소에 ''type'' 속성과 ''anonymous type'' 하위 속성이 모두 있습니다. 이 중 하나만 요소에 허용됩니다. - src-import.1.1 = src-import.1.1: 요소 정보 항목의 네임스페이스 속성 ''{0}''은(는) 존재하는 스키마의 targetNamespace와 달라야 합니다. - src-import.1.2 = src-import.1.2: 네임스페이스 속성이 요소 정보 항목에 존재하지 않을 경우 포함하고 있는 스키마에 targetNamespace가 있어야 합니다. - src-import.2 = src-import.2: ''{0}'' 문서의 루트 요소에 네임스페이스 이름 ''http://www.w3.org/2001/XMLSchema''와 로컬 이름 ''schema''가 있어야 합니다. - src-import.3.1 = src-import.3.1: 요소 정보 항목의 네임스페이스 속성 ''{0}''이(가) 임포트된 문서의 targetNamespace 속성 ''{1}''과(와) 동일해야 합니다. - src-import.3.2 = src-import.3.2: 네임스페이스 속성이 없는 요소 정보 항목이 발견되었으므로 임포트된 문서에는 targetNamespace 속성이 포함될 수 없습니다. 하지만 임포트된 문서에서 targetNamespace ''{1}''이(가) 발견되었습니다. - src-include.1 = src-include.1: ''{0}'' 문서의 루트 요소에 네임스페이스 이름 ''http://www.w3.org/2001/XMLSchema''와 로컬 이름 ''schema''가 있어야 합니다. - src-include.2.1 = src-include.2.1: 참조된 스키마(현재''{1}'')와 포함하는 스키마(현재 ''{0}'')의 targetNamespace는 동일해야 합니다. - src-redefine.2 = src-redefine.2: ''{0}'' 문서의 루트 요소에 네임스페이스 이름 ''http://www.w3.org/2001/XMLSchema''와 로컬 이름 ''schema''가 있어야 합니다. - src-redefine.3.1 = src-redefine.3.1: 참조된 스키마(현재''{1}'')와 재정의하는 스키마(현재 ''{0}'')의 targetNamespace는 동일해야 합니다. - src-redefine.5.a.a = src-redefine.5.a.a: 의 비주석 하위 항목을 찾을 수 없습니다. 요소의 하위 항목에는 자신을 참조하는 'base' 속성을 가진 종속 항목이 있어야 합니다. - src-redefine.5.a.b = src-redefine.5.a.b: ''{0}''은(는) 적합한 하위 요소가 아닙니다. 요소의 하위 항목에는 자신을 참조하는 ''base'' 속성을 가진 종속 항목이 있어야 합니다. - src-redefine.5.a.c = src-redefine.5.a.c: ''{0}''에 재정의된 요소 ''{1}''을(를) 참조하는 ''base'' 속성이 없습니다. 요소의 하위 항목에는 자신을 참조하는 ''base'' 속성을 가진 종속 항목이 있어야 합니다. - src-redefine.5.b.a = src-redefine.5.b.a: 의 비주석 하위 항목을 찾을 수 없습니다. 요소의 하위 항목에는 자신을 참조하는 'base' 속성을 가진 또는 종속 항목이 있어야 합니다. - src-redefine.5.b.b = src-redefine.5.b.b: 의 비주석 최하위 항목을 찾을 수 없습니다. 요소의 하위 항목에는 자신을 참조하는 'base' 속성을 가진 또는 종속 항목이 있어야 합니다. - src-redefine.5.b.c = src-redefine.5.b.c: ''{0}''은(는) 적합한 최하위 요소가 아닙니다. 요소의 하위 항목에는 자신을 참조하는 ''base'' 속성을 가진 또는 종속 항목이 있어야 합니다. - src-redefine.5.b.d = src-redefine.5.b.d: ''{0}''에 재정의된 요소 ''{1}''을(를) 참조하는 ''base'' 속성이 없습니다. 요소의 하위 항목에는 자신을 참조하는 ''base'' 속성을 가진 또는 종속 항목이 있어야 합니다. - src-redefine.6.1.1 = src-redefine.6.1.1: 요소의 그룹 하위에 자신을 참조하는 그룹이 포함되어 있을 경우 정확히 1이어야 사용되어야 하지만 ''{0}''이(가) 사용됩니다. - src-redefine.6.1.2 = src-redefine.6.1.2: 재정의하려는 그룹에 대한 참조를 포함하는 ''{0}'' 그룹에는 ''minOccurs'' = ''maxOccurs'' = 1이 사용되어야 합니다. - src-redefine.6.2.1 = src-redefine.6.2.1: 재정의된 스키마에 이름이 ''{0}''인 그룹이 없습니다. - src-redefine.6.2.2 = src-redefine.6.2.2: ''{0}'' 그룹은 재정의하는 그룹을 제대로 제한하지 않습니다. 위반된 제약 조건: ''{1}''. - src-redefine.7.1 = src-redefine.7.1: 요소의 attributeGroup 하위에 자신을 참조하는 attributeGroup이 포함되어 있을 경우 정확히 1이 사용되어야 하지만 {0}이(가) 사용됩니다. - src-redefine.7.2.1 = src-redefine.7.2.1: 재정의된 스키마에 이름이 ''{0}''인 attributeGroup이 없습니다. - src-redefine.7.2.2 = src-redefine.7.2.2: AttributeGroup ''{0}''은(는) 재정의하는 attributeGroup을 제대로 제한하지 않습니다. 위반된 제약 조건: ''{1}''. - src-resolve = src-resolve: ''{0}'' 이름을 ''{1}'' 구성요소로 분석할 수 없습니다. - src-resolve.4.1 = src-resolve.4.1: ''{2}'' 구성요소를 분석하는 중 오류가 발생했습니다. ''{2}''에 네임스페이스가 없는 것으로 확인되었지만 스키마 문서 ''{0}''에서 대상 네임스페이스가 없는 구성요소를 참조할 수 없습니다. ''{2}''에 네임스페이스가 있어야 할 경우 접두어를 제공해야 할 수 있습니다. ''{2}''에 네임스페이스가 없어야 할 경우 "namespace" 속성 없이 ''import''를 ''{0}''에 추가해야 합니다. - src-resolve.4.2 = src-resolve.4.2: ''{2}'' 구성요소를 분석하는 중 오류가 발생했습니다. ''{2}''이(가) ''{1}'' 네임스페이스에 있는 것으로 확인되었지만 스키마 문서 ''{0}''에서 이 네임스페이스의 구성요소를 참조할 수 없습니다. 올바르지 않은 네임스페이스일 경우 접두어인 ''{2}''을(를) 변경해야 할 수 있습니다. 올바른 네임스페이스일 경우 적합한 ''import'' 태그를 ''{0}''에 추가해야 합니다. - src-simple-type.2.a = src-simple-type.2.a: 해당 [children] 중 base [attribute]와 요소가 모두 있는 요소가 발견되었습니다. 하나만 허용됩니다. - src-simple-type.2.b = src-simple-type.2.b: 해당 [children] 중 base [attribute]와 요소가 모두 없는 요소가 발견되었습니다. 하나만 필요합니다. - src-simple-type.3.a = src-simple-type.3.a: 해당 [children] 중 itemType [attribute]와 요소가 모두 있는 요소가 발견되었습니다. 하나만 허용됩니다. - src-simple-type.3.b = src-simple-type.3.b: 해당 [children] 중 itemType [attribute]와 요소가 모두 없는 요소가 발견되었습니다. 하나만 필요합니다. - src-single-facet-value = src-single-facet-value: ''{0}'' 면이 두 번 이상 정의되었습니다. - src-union-memberTypes-or-simpleTypes = src-union-memberTypes-or-simpleTypes: 요소에는 해당 [children] 중 비어 있지 않은 memberTypes [attribute] 또는 하나 이상의 요소가 있어야 합니다. - -#constraint valid (3.X.6) - - ag-props-correct.2 = ag-props-correct.2: 속성 그룹 ''{0}''에 대해 오류가 발생했습니다. 이름 및 대상 네임스페이스가 동일한 중복 속성 사용이 지정되었습니다. 중복 속성 사용의 이름은 ''{1}''입니다. - ag-props-correct.3 = ag-props-correct.3: 속성 그룹 ''{0}''에 대해 오류가 발생했습니다. 두 개의 속성 선언 ''{1}'' 및 ''{2}''에 ID에서 파생된 유형이 있습니다. - a-props-correct.2 = a-props-correct.2: ''{0}'' 속성의 값 제약 조건 값 ''{1}''이(가) 부적합합니다. - a-props-correct.3 = a-props-correct.3: 속성의 '{'type definition'}'이 ID이거나 ID에서 파생된 것이므로 ''{0}'' 속성은 ''fixed'' 또는 ''default''를 사용할 수 없습니다. - au-props-correct.2 = au-props-correct.2: ''{0}''의 속성 선언에서 고정된 값 ''{1}''이(가) 지정되었습니다. 따라서 ''{0}''을(를) 참조하는 속성 사용에도 '{'value constraint'}'가 있을 경우 고정되어야 하며 값은 ''{1}''이어야 합니다. - cos-all-limited.1.2 = cos-all-limited.1.2: 'all' 모델 그룹이 '{'min occurs'}' = '{'max occurs'}' = 1인 조각에 나타나야 하며 해당 조각은 복합 유형 정의의 '{'content type'}'을 구성하는 쌍의 일부여야 합니다. - cos-all-limited.2 = cos-all-limited.2: ''all'' 모델 그룹에 포함된 요소의 '{'max occurs'}'는 0 또는 1이어야 합니다. ''{1}'' 요소에 대한 ''{0}'' 값이 부적합합니다. - cos-applicable-facets = cos-applicable-facets: {1} 유형에서는 ''{0}'' 면이 허용되지 않습니다. - cos-ct-extends.1.1 = cos-ct-extends.1.1: ''{0}'' 유형은 ''{1}'' 유형에서 확장에 의해 파생되었지만 ''{1}''의 ''final'' 속성은 확장에 의한 파생을 금지합니다. - cos-ct-extends.1.4.3.2.2.1.a = cos-ct-extends.1.4.3.2.2.1.a: 파생된 유형과 해당 기본 유형의 콘텐츠 유형은 모두 혼합되거나 모두 요소 전용이어야 합니다. ''{0}'' 유형은 요소 전용이지만 해당 기본 유형은 요소 전용이 아닙니다. - cos-ct-extends.1.4.3.2.2.1.b = cos-ct-extends.1.4.3.2.2.1.b: 파생된 유형과 해당 기본 유형의 콘텐츠 유형은 모두 혼합되거나 모두 요소 전용이어야 합니다. ''{0}'' 유형은 혼합되어 있지만 해당 기본 유형은 혼합되어 있지 않습니다. - cos-element-consistent = cos-element-consistent: ''{0}'' 유형에 대해 오류가 발생했습니다. 이름이 ''{1}''이며 유형이 다른 여러 요소가 모델 그룹에 나타납니다. - cos-list-of-atomic = cos-list-of-atomic: 목록 유형 ''{0}''의 정의에서 ''{1}'' 유형은 기본 단위가 아니므로 부적합한 목록 요소 유형입니다. ''{1}''이(가) 목록 유형이거나 목록을 포함하는 합집합 유형입니다. - cos-nonambig = cos-nonambig: {0} 및 {1}(또는 해당 대체 그룹의 요소)이(가) "Unique Particle Attribution"을 위반합니다. 이 스키마에 대한 검증 중 이러한 두 조각이 모호해질 수 있습니다. - cos-particle-restrict.a = cos-particle-restrict.a: 파생된 조각이 비어 있으므로 기본 조각을 비울 수 없습니다. - cos-particle-restrict.b = cos-particle-restrict.b: 기본 조각은 비어 있지만 파생된 조각은 비어 있지 않습니다. - cos-particle-restrict.2 = cos-particle-restrict.2: 금지된 조각 제한 사항: ''{0}''. - cos-st-restricts.1.1 = cos-st-restricts.1.1: ''{1}'' 유형이 기본 단위이므로 해당 '{'base type definition'}' ''{0}''은(는) 기본 단순 유형 정의 또는 내장된 기본 데이터 유형이어야 합니다. - cos-st-restricts.2.1 = cos-st-restricts.2.1: 목록 유형 ''{0}''의 정의에서 ''{1}'' 유형은 목록 유형이거나 목록을 포함하는 합집합 유형이므로 부적합한 항목 유형입니다. - cos-st-restricts.2.3.1.1 = cos-st-restricts.2.3.1.1: '{'item type definition'}' ''{0}''의 '{'final'}' 구성요소에 ''list''가 포함되어 있습니다. 따라서 ''{0}''을(를) 목록 유형 ''{1}''에 대한 항목 유형으로 사용할 수 없습니다. - cos-st-restricts.3.3.1.1 = cos-st-restricts.3.3.1.1: '{'member type definitions'}' ''{0}''의 '{'final'}' 구성요소에 ''union''이 포함되어 있습니다. 따라서 ''{0}''을(를) 합집합 유형 ''{1}''에 대한 멤버 유형으로 사용할 수 없습니다. - cos-valid-default.2.1 = cos-valid-default.2.1: ''{0}'' 요소에 값 제약 조건이 있으므로 혼합 또는 단순 콘텐츠 모델이 포함되어야 합니다. - cos-valid-default.2.2.2 = cos-valid-default.2.2.2: ''{0}'' 요소에 '{'value constraint'}'가 있으며 해당 유형 정의에 혼합 '{'content type'}'이 있으므로 '{'content type'}'의 조각을 비울 수 있어야 합니다. - c-props-correct.2 = c-props-correct.2: keyref ''{0}''과(와) 키 ''{1}''에 대한 필드 기수는 서로 일치해야 합니다. - ct-props-correct.3 = ct-props-correct.3: 복합 유형 ''{0}''에 대한 순환 정의가 감지되었습니다. 따라서 ''{0}''은(는) 고유한 유형 계층에 포함된 것이며 이는 오류입니다. - ct-props-correct.4 = ct-props-correct.4: ''{0}'' 유형에 대해 오류가 발생했습니다. 이름 및 대상 네임스페이스가 동일한 중복 속성 사용이 지정되었습니다. 중복 속성 사용의 이름은 ''{1}''입니다. - ct-props-correct.5 = ct-props-correct.5: ''{0}'' 유형에 대해 오류가 발생했습니다. 두 개의 속성 선언 ''{1}'' 및 ''{2}''에 ID에서 파생된 유형이 있습니다. - derivation-ok-restriction.1 = derivation-ok-restriction.1: ''{0}'' 유형은 ''{1}'' 유형에서 제한 사항에 의해 파생되었습니다. 하지만 ''{1}''에는 제한 사항에 의한 파생을 금지하는 '{'final'}' 속성이 있습니다. - derivation-ok-restriction.2.1.1 = derivation-ok-restriction.2.1.1: ''{0}'' 유형에 대해 오류가 발생했습니다. 이 유형의 속성 사용 ''{1}''에 대한 ''use'' 값이 ''{2}''입니다. 이는 기본 유형의 일치하는 속성 사용에 대한 값인 ''required''와 다릅니다. - derivation-ok-restriction.2.1.2 = derivation-ok-restriction.2.1.2: ''{0}'' 유형에 대해 오류가 발생했습니다. 이 유형의 속성 사용 ''{1}''에 대한 유형이 ''{2}''입니다. 이는 기본 유형의 일치하는 속성 사용에 대한 유형인 ''{3}''에서 적합하게 파생된 것이 아닙니다. - derivation-ok-restriction.2.1.3.a = derivation-ok-restriction.2.1.3.a: ''{0}'' 유형에 대해 오류가 발생했습니다. 이 유형의 속성 사용 ''{1}''에는 고정되지 않은 유효한 값 제약 조건이 있으며, 기본 유형의 일치하는 속성 사용에 대한 유효한 값 제약 조건은 고정되어 있습니다. - derivation-ok-restriction.2.1.3.b = derivation-ok-restriction.2.1.3.b: ''{0}'' 유형에 대해 오류가 발생했습니다. 이 유형의 속성 사용 ''{1}''에 ''{2}'' 값으로 고정된 유효한 값 제약 조건이 있습니다. 이는 기본 유형의 일치하는 속성 사용에 대한 고정된 유효한 값 제약 조건의 값인 ''{3}''과(와) 다릅니다. - derivation-ok-restriction.2.2.a = derivation-ok-restriction.2.2.a: ''{0}'' 유형에 대해 오류가 발생했습니다. 이 유형의 속성 사용 ''{1}''과(와) 기본 유형의 속성 사용이 일치하지 않으며 기본 유형에 와일드 카드 문자 속성이 없습니다. - derivation-ok-restriction.2.2.b = derivation-ok-restriction.2.2.b: ''{0}'' 유형에 대해 오류가 발생했습니다. 이 유형의 속성 사용 ''{1}''과(와) 기본 유형의 속성 사용이 일치하지 않으며 기본 유형의 와일드 카드 문자가 이 속성 사용의 ''{2}'' 네임스페이스를 허용하지 않습니다. - derivation-ok-restriction.3 = derivation-ok-restriction.3: ''{0}'' 유형에 대해 오류가 발생했습니다. 기본 유형의 속성 사용 ''{1}''에 대한 REQUIRED가 true이지만 파생 유형에 일치하는 속성 사용이 없습니다. - derivation-ok-restriction.4.1 = derivation-ok-restriction.4.1: ''{0}'' 유형에 대해 오류가 발생했습니다. 파생 유형에는 속성 와일드 카드 문자가 있지만 기본 유형에는 없습니다. - derivation-ok-restriction.4.2 = derivation-ok-restriction.4.2: ''{0}'' 유형에 대해 오류가 발생했습니다. 파생 유형의 와일드 카드 문자가 기본 유형의 와일드 카드 문자에 대해 적합한 와일드 카드 문자 부분 집합이 아닙니다. - derivation-ok-restriction.4.3 = derivation-ok-restriction.4.3: ''{0}'' 유형에 대해 오류가 발생했습니다. 파생 유형({1})의 와일드 카드 문자에 대한 프로세스 콘텐츠가 기본 유형({2})의 와일드 카드 문자보다 하위입니다. - derivation-ok-restriction.5.2.2.1 = derivation-ok-restriction.5.2.2.1: ''{0}'' 유형에 대해 오류가 발생했습니다. 이 유형 ''{1}''의 단순 콘텐츠 유형이 기본 유형 ''{2}''의 단순 콘텐츠 유형에 대해 적합한 제한 사항이 아닙니다. - derivation-ok-restriction.5.3.2 = derivation-ok-restriction.5.3.2: ''{0}'' 유형에 대해 오류가 발생했습니다. 이 유형의 콘텐츠 유형이 비어 있지만 기본 유형 ''{1}''의 콘텐츠 유형은 비어 있지 않거나 비울 수 없습니다. - derivation-ok-restriction.5.4.1.2 = derivation-ok-restriction.5.4.1.2: ''{0}'' 유형에 대해 오류가 발생했습니다. 이 유형의 콘텐츠 유형은 혼합되어 있지만 기본 유형 ''{1}''의 콘텐츠 유형은 혼합되어 있지 않습니다. - derivation-ok-restriction.5.4.2 = derivation-ok-restriction.5.4.2: ''{0}'' 유형에 대해 오류가 발생했습니다. 유형 조각이 기본 유형의 조각에 대해 적합한 제한 사항이 아닙니다. - enumeration-required-notation = enumeration-required-notation: {2} ''{1}''에 사용되는 NOTATION 유형 ''{0}''에는 이 유형에 사용되는 표기법 요소를 지정하는 목록 면 값이 있어야 합니다. - enumeration-valid-restriction = enumeration-valid-restriction: 목록 값 ''{0}''이(가) 기본 유형 {1}의 값 공간에 없습니다. - e-props-correct.2 = e-props-correct.2: ''{0}'' 요소의 값 제약 조건 값 ''{1}''이(가) 부적합합니다. - e-props-correct.4 = e-props-correct.4: ''{0}'' 요소의 '{'type definition'}'이 substitutionHead ''{1}''의 '{'type definition'}'에서 적합하게 파생된 것이 아니거나 ''{1}''의 '{'substitution group exclusions'}' 속성이 이 파생을 허용하지 않습니다. - e-props-correct.5 = e-props-correct.5: 요소의 '{'type definition'}' 또는 '{'type definition'}'의 '{'content type'}'이 ID이거나 ID에서 파생된 것이므로 '{'value constraint'}'는 ''{0}'' 요소에 없어야 합니다. - e-props-correct.6 = e-props-correct.6: ''{0}'' 요소에 대한 순환 대체 그룹이 감지되었습니다. - fractionDigits-valid-restriction = fractionDigits-valid-restriction: {2}의 정의에서 ''fractionDigits'' 면에 대한 ''{0}'' 값이 부적합합니다. 이 값은 조상 유형 중 하나에서 ''{1}''(으)로 설정된 ''fractionDigits''에 대한 값보다 작거나 같아야 합니다. - fractionDigits-totalDigits = fractionDigits-totalDigits: {2}의 정의에서 ''fractionDigits'' 면에 대한 ''{0}'' 값이 부적합합니다. 이 값은 ''totalDigits''에 대한 값인 ''{1}''보다 작거나 같아야 합니다. - length-minLength-maxLength.1.1 = length-minLength-maxLength.1.1: {0} 유형의 경우 length ''{1}''의 값은 minLength ''{2}''의 값보다 작을 수 없습니다. - length-minLength-maxLength.1.2.a = length-minLength-maxLength.1.2.a: {0} 유형의 경우 현재 제한 사항에 minLength 면이 있고 현재 제한 사항 또는 기본 유형에 length 면이 있을 경우 기본 유형에 minLength 면이 있어야 합니다. - length-minLength-maxLength.1.2.b = length-minLength-maxLength.1.2.b: {0} 유형의 경우 현재 minLength ''{1}''이(가) 기본 minLength ''{2}''과(와) 같아야 합니다. - length-minLength-maxLength.2.1 = length-minLength-maxLength.2.1: {0} 유형의 경우 length ''{1}''의 값은 maxLength ''{2}''의 값보다 크지 않아야 합니다. - length-minLength-maxLength.2.2.a = length-minLength-maxLength.2.2.a: {0} 유형의 경우 현재 제한 사항에 maxLength 면이 있고 현재 제한 사항 또는 기본 유형에 length 면이 있을 경우 기본 유형에 maxLength 면이 있어야 합니다. - length-minLength-maxLength.2.2.b = length-minLength-maxLength.2.2.b: {0} 유형의 경우 현재 maxLength ''{1}''은(는) 기본 maxLength ''{2}''과(와) 같아야 합니다. - length-valid-restriction = length-valid-restriction: ''{2}'' 유형에 대해 오류가 발생했습니다. length = ''{0}''인 값은 기본 유형 ''{1}''의 해당 값과 같아야 합니다. - maxExclusive-valid-restriction.1 = maxExclusive-valid-restriction.1: ''{2}'' 유형에 대해 오류가 발생했습니다. maxExclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 maxExclusive보다 작거나 같아야 합니다. - maxExclusive-valid-restriction.2 = maxExclusive-valid-restriction.2: ''{2}'' 유형에 대해 오류가 발생했습니다. maxExclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 maxInclusive보다 작거나 같아야 합니다. - maxExclusive-valid-restriction.3 = maxExclusive-valid-restriction.3: ''{2}'' 유형에 대해 오류가 발생했습니다. maxExclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 minInclusive보다 커야 합니다. - maxExclusive-valid-restriction.4 = maxExclusive-valid-restriction.4: ''{2}'' 유형에 대해 오류가 발생했습니다. maxExclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 minExclusive보다 커야 합니다. - maxInclusive-maxExclusive = maxInclusive-maxExclusive: maxInclusive와 maxExclusive는 동일한 데이터 유형에 대해 지정되지 않아야 합니다. {2}에 maxInclusive = ''{0}''과(와) maxExclusive = ''{1}''이(가) 지정되었습니다. - maxInclusive-valid-restriction.1 = maxInclusive-valid-restriction.1: ''{2}'' 유형에 대해 오류가 발생했습니다. maxInclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 maxInclusive보다 작거나 같아야 합니다. - maxInclusive-valid-restriction.2 = maxInclusive-valid-restriction.2: ''{2}'' 유형에 대해 오류가 발생했습니다. maxInclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 maxExclusive보다 작아야 합니다. - maxInclusive-valid-restriction.3 = maxInclusive-valid-restriction.3: ''{2}'' 유형에 대해 오류가 발생했습니다. maxInclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 minInclusive보다 크거나 같아야 합니다. - maxInclusive-valid-restriction.4 = maxInclusive-valid-restriction.4: ''{2}'' 유형에 대해 오류가 발생했습니다. maxInclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 minExclusive보다 커야 합니다. - maxLength-valid-restriction = maxLength-valid-restriction: {2}의 정의에서 maxLength 값 = ''{0}''은(는) 기본 유형 ''{1}''의 값보다 작거나 같아야 합니다. - mg-props-correct.2 = mg-props-correct.2: ''{0}'' 그룹에 대한 순환 정의가 감지되었습니다. 순환적으로 뒤에 오는 '{'term'}' 조각 값이 '{'term'}'이 그룹 자신인 조각에 도달합니다. - minExclusive-less-than-equal-to-maxExclusive = minExclusive-less-than-equal-to-maxExclusive: {2}의 정의에서 minExclusive 값 = ''{0}''은(는) maxExclusive 값 = ''{1}''보다 작거나 같아야 합니다. - minExclusive-less-than-maxInclusive = minExclusive-less-than-maxInclusive: {2}의 정의에서 minExclusive 값 = ''{0}''은(는) maxInclusive 값 = ''{1}''보다 작아야 합니다. - minExclusive-valid-restriction.1 = minExclusive-valid-restriction.1: ''{2}'' 유형에 대해 오류가 발생했습니다. minExclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 minExclusive보다 크거나 같아야 합니다. - minExclusive-valid-restriction.2 = minExclusive-valid-restriction.2: ''{2}'' 유형에 대해 오류가 발생했습니다. minExclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 maxInclusive보다 작거나 같아야 합니다. - minExclusive-valid-restriction.3 = minExclusive-valid-restriction.3: ''{2}'' 유형에 대해 오류가 발생했습니다. minExclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 minInclusive보다 크거나 같아야 합니다. - minExclusive-valid-restriction.4 = minExclusive-valid-restriction.4: ''{2}'' 유형에 대해 오류가 발생했습니다. minExclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 maxExclusive보다 작아야 합니다. - minInclusive-less-than-equal-to-maxInclusive = minInclusive-less-than-equal-to-maxInclusive: {2}의 정의에서 minInclusive 값 = ''{0}''은(는) maxInclusive 값 = ''{1}''보다 작거나 같아야 합니다. - minInclusive-less-than-maxExclusive = minInclusive-less-than-maxExclusive: {2}의 정의에서 minInclusive 값 = ''{0}''은(는) maxExclusive 값 = ''{1}''보다 작아야 합니다. - minInclusive-minExclusive = minInclusive-minExclusive: minInclusive와 minExclusive는 동일한 데이터 유형에 대해 지정되지 않아야 합니다. {2}에 minInclusive = ''{0}''과(와) minExclusive = ''{1}''이(가) 지정되었습니다. - minInclusive-valid-restriction.1 = minInclusive-valid-restriction.1: ''{2}'' 유형에 대해 오류가 발생했습니다. minInclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 minInclusive보다 크거나 같아야 합니다. - minInclusive-valid-restriction.2 = minInclusive-valid-restriction.2: ''{2}'' 유형에 대해 오류가 발생했습니다. minInclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 maxInclusive보다 작거나 같아야 합니다. - minInclusive-valid-restriction.3 = minInclusive-valid-restriction.3: ''{2}'' 유형에 대해 오류가 발생했습니다. minInclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 minExclusive보다 커야 합니다. - minInclusive-valid-restriction.4 = minInclusive-valid-restriction.4: ''{2}'' 유형에 대해 오류가 발생했습니다. minInclusive 값 = ''{0}''은(는) 기본 유형 ''{1}''의 maxExclusive보다 작아야 합니다. - minLength-less-than-equal-to-maxLength = minLength-less-than-equal-to-maxLength: {2}의 정의에서 minLength 값 = ''{0}''은(는) maxLength 값 = ''{1}''보다 작아야 합니다. - minLength-valid-restriction = minLength-valid-restriction: {2}의 정의에서 minLength = ''{0}''은(는) 기본 유형 ''{1}''의 값보다 크거나 같아야 합니다. - no-xmlns = no-xmlns: 속성 선언의 {name}은 'xmlns'와 일치하지 않아야 합니다. - no-xsi = no-xsi: 속성 선언의 '{'target namespace'}'는 ''{0}''과(와) 일치하지 않아야 합니다. - p-props-correct.2.1 = p-props-correct.2.1: ''{0}''의 선언에서 ''minOccurs'' 값이 ''{1}''이지만 이 값은 ''maxOccurs'' 값 ''{2}''보다 크지 않아야 합니다. - rcase-MapAndSum.1 = rcase-MapAndSum.1: 조각 간 전체 기능 매핑이 없습니다. - rcase-MapAndSum.2 = rcase-MapAndSum.2: 그룹의 발생 범위({0},{1})가 기본 그룹의 발생 범위({2},{3})에 대해 적합한 제한 사항이 아닙니다. - rcase-NameAndTypeOK.1 = rcase-NameAndTypeOK.1: 요소에 동일하지 않은 이름 및 대상 네임스페이스(''{1}'' 네임스페이스의 ''{0}'' 요소 및 ''{3}'' 네임스페이스의 ''{2}'' 요소)가 있습니다. - rcase-NameAndTypeOK.2 = rcase-NameAndTypeOK.2: '{'term'}'이 요소 선언 ''{0}''인 조각에 대해 오류가 발생했습니다. 요소 선언의 '{'nillable'}'이 true이지만 기본 유형의 해당 조각에 '{'nillable'}'이 false인 요소 선언이 있습니다. - rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: '{'term'}'이 요소 선언 ''{0}''인 조각에 대해 오류가 발생했습니다. 반복 범위({1},{2})가 기본 유형에 있는 해당 조각의 범위({3},{4})에 대해 적합한 제한 사항이 아닙니다. - rcase-NameAndTypeOK.4.a = rcase-NameAndTypeOK.4.a: ''{0}'' 요소는 고정되어 있지 않지만 기본 유형의 해당 요소는 ''{1}'' 값으로 고정되어 있습니다. - rcase-NameAndTypeOK.4.b = rcase-NameAndTypeOK.4.b: ''{0}'' 요소는 ''{1}'' 값으로 고정되어 있지만 기본 유형의 해당 요소는 ''{2}'' 값으로 고정되어 있습니다. - rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5: ''{0}'' 요소에 대한 ID 제약 조건은 기본 유형의 ID 제약 조건에 대한 부분 집합이 아닙니다. - rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6: ''{0}'' 요소에 대해 허용되지 않는 대체는 기본 유형의 해당 대체에 대한 대집합이 아닙니다. - rcase-NameAndTypeOK.7 = rcase-NameAndTypeOK.7: ''{0}'' 요소의 유형 ''{1}''은(는) 기본 요소의 유형 ''{2}''에서 파생된 것이 아닙니다. - rcase-NSCompat.1 = rcase-NSCompat.1: ''{0}'' 요소에는 기본 유형의 와일드 카드 문자에서 허용하지 않는 ''{1}'' 네임스페이스가 있습니다. - rcase-NSCompat.2 = rcase-NSCompat.2: '{'term'}'이 요소 선언 ''{0}''인 조각에 대해 오류가 발생했습니다. 반복 범위({1},{2})가 기본 유형에 있는 해당 조각의 범위({3},{4})에 대해 적합한 제한 사항이 아닙니다. - rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1: 조각 간 전체 기능 매핑이 없습니다. - rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2: 그룹의 발생 범위({0},{1})가 기본 와일드 카드 문자의 범위({2},{3})에 대해 적합한 제한 사항이 아닙니다. - rcase-NSSubset.1 = rcase-NSSubset.1: 와일드 카드 문자가 기본 유형의 해당 와일드 카드 문자에 대한 부분 집합이 아닙니다. - rcase-NSSubset.2 = rcase-NSSubset.2: 와일드 카드 문자의 발생 범위({0},{1})가 기본 유형의 와일드 카드 문자 범위({2},{3})에 대해 적합한 제한 사항이 아닙니다. - rcase-NSSubset.3 = rcase-NSSubset.3: 와일드 카드 문자의 프로세스 콘텐츠 ''{0}''이(가) 기본 유형의 콘텐츠 ''{1}''보다 하위입니다. - rcase-Recurse.1 = rcase-Recurse.1: 그룹의 발생 범위({0},{1})가 기본 그룹의 발생 범위({2},{3})에 대해 적합한 제한 사항이 아닙니다. - rcase-Recurse.2 = rcase-Recurse.2: 조각 간 전체 기능 매핑이 없습니다. - rcase-RecurseLax.1 = rcase-RecurseLax.1: 그룹의 발생 범위({0},{1})가 기본 그룹의 발생 범위({2},{3})에 대해 적합한 제한 사항이 아닙니다. - rcase-RecurseLax.2 = rcase-RecurseLax.2: 조각 간 전체 기능 매핑이 없습니다. - rcase-RecurseUnordered.1 = rcase-RecurseUnordered.1: 그룹의 발생 범위({0},{1})가 기본 그룹의 발생 범위({2},{3})에 대해 적합한 제한 사항이 아닙니다. - rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: 조각 간 전체 기능 매핑이 없습니다. -# We're using sch-props-correct.2 instead of the old src-redefine.1 -# src-redefine.1 = src-redefine.1: The component ''{0}'' is begin redefined, but its corresponding component isn't in the schema document being redefined (with namespace ''{2}''), but in a different document, with namespace ''{1}''. - sch-props-correct.2 = sch-props-correct.2: 스키마에는 동일한 이름을 가진 두 개의 전역 구성요소가 포함될 수 없습니다. 이 스키마에는 두 개의 ''{0}''이(가) 포함되어 있습니다. - st-props-correct.2 = st-props-correct.2: 단순 유형 ''{0}''에 대한 순환 정의가 감지되었습니다. 따라서 ''{0}''은(는) 고유한 유형 계층에 포함된 것이며 이는 오류입니다. - st-props-correct.3 = st-props-correct.3: ''{0}'' 유형에 대해 오류가 발생했습니다. '{'base type definition'}' ''{1}''의 '{'final'}' 값은 제한 사항에 의한 파생을 금지합니다. - totalDigits-valid-restriction = totalDigits-valid-restriction: {2}의 정의에서 ''totalDigits'' 면에 대한 ''{0}'' 값이 부적합합니다. 이 값은 조상 유형 중 하나에서 ''{1}''(으)로 설정된 ''totalDigits''에 대한 값보다 작거나 같아야 합니다. - whiteSpace-valid-restriction.1 = whiteSpace-valid-restriction.1: {0}의 정의에서 ''whitespace'' 면에 대한 ''{1}'' 값이 부적합합니다. ''whitespace''에 대한 값이 조상 유형 중 하나에서 ''collapse''로 설정되었기 때문입니다. - whiteSpace-valid-restriction.2 = whiteSpace-valid-restriction.2: {0}의 정의에서 ''whitespace'' 면에 대한 ''preserve'' 값이 부적합합니다. ''whitespace''에 대한 값이 조상 유형 중 하나에서 ''replace''로 설정되었기 때문입니다. - -#schema for Schemas - - s4s-att-invalid-value = s4s-att-invalid-value: ''{0}'' 요소의 ''{1}''에 대한 속성값이 부적합합니다. 기록된 원인: {2} - s4s-att-must-appear = s4s-att-must-appear: ''{1}'' 속성은 ''{0}'' 요소에 나타나야 합니다. - s4s-att-not-allowed = s4s-att-not-allowed: ''{1}'' 속성은 ''{0}'' 요소에 나타날 수 없습니다. - s4s-elt-invalid = s4s-elt-invalid: ''{0}'' 요소는 스키마 문서에서 적합한 요소가 아닙니다. - s4s-elt-must-match.1 = s4s-elt-must-match.1: ''{0}''의 콘텐츠는 {1}과(와) 일치해야 합니다. {2}에서 시작된 문제가 발견되었습니다. - s4s-elt-must-match.2 = s4s-elt-must-match.2: ''{0}''의 콘텐츠는 {1}과(와) 일치해야 합니다. 발견된 요소가 부족합니다. - # the "invalid-content" messages provide less information than the "must-match" counterparts above. They're used for complex types when providing a "match" would be an information dump - s4s-elt-invalid-content.1 = s4s-elt-invalid-content.1: ''{0}''의 콘텐츠가 부적합합니다. ''{1}'' 요소가 부적합하거나 너무 자주 발생하거나 해당 요소의 위치가 잘못되었습니다. - s4s-elt-invalid-content.2 = s4s-elt-invalid-content.2: ''{0}''의 콘텐츠가 부적합합니다. ''{1}'' 요소는 비워 둘 수 없습니다. - s4s-elt-invalid-content.3 = s4s-elt-invalid-content.3: ''{0}'' 유형의 요소는 요소의 하위 항목으로 선언 뒤에 나타날 수 없습니다. - s4s-elt-schema-ns = s4s-elt-schema-ns: ''{0}'' 요소의 네임스페이스는 스키마 네임스페이스 ''http://www.w3.org/2001/XMLSchema''에서 와야 합니다. - s4s-elt-character = s4s-elt-character: ''xs:appinfo'' 및 ''xs:documentation'' 외에 다른 스키마 요소에서는 공백이 아닌 문자가 허용되지 않습니다. ''{0}''이(가) 발견되었습니다. - -# codes not defined by the spec - - c-fields-xpaths = c-fields-xpaths: 필드 값 = ''{0}''이(가) 부적합합니다. - c-general-xpath = c-general-xpath: ''{0}'' 표현식은 XML 스키마가 지원하는 XPath 부분 집합에 대해 부적합합니다. - c-general-xpath-ns = c-general-xpath-ns: XPath 표현식 ''{0}''의 네임스페이스 접두어가 네임스페이스에 바인드되지 않았습니다. - c-selector-xpath = c-selector-xpath: 선택기 값 = ''{0}''이(가) 부적합합니다. 선택기 XPath에는 속성이 포함될 수 없습니다. - EmptyTargetNamespace = EmptyTargetNamespace: 스키마 문서 ''{0}''의 ''targetNamespace'' 속성값은 빈 문자열일 수 없습니다. - FacetValueFromBase = FacetValueFromBase: ''{0}'' 유형의 선언에서 ''{2}'' 면의 ''{1}'' 값은 기본 유형 ''{3}''의 값 공백에서 와야 합니다. - FixedFacetValue = FixedFacetValue: {3}의 정의에서 ''{0}'' 면에 대한 ''{1}'' 값이 부적합합니다. ''{0}''에 대한 값이 조상 유형 중 하나에서 ''{2}''(으)로 설정되었으며 '{'fixed'}' = true이기 때문입니다. - InvalidRegex = InvalidRegex: 패턴 값 ''{0}''은(는) 적합한 정규 표현식이 아닙니다. ''{2}'' 열에서 ''{1}'' 오류가 보고되었습니다. - MaxOccurLimit = 구문 분석기의 현재 구성에서 maxOccurs 속성값을 {0} 값보다 크게 설정할 수 없습니다. - PublicSystemOnNotation = PublicSystemOnNotation: 하나 이상의 ''public''과 ''system''이 ''notation'' 요소에 나타나야 합니다. - SchemaLocation = SchemaLocation: schemaLocation 값 = ''{0}''에는 짝수 개의 URI가 있어야 합니다. - TargetNamespace.1 = TargetNamespace.1: ''{0}'' 네임스페이스가 필요하지만 스키마 문서의 대상 네임스페이스가 ''{1}''입니다. - TargetNamespace.2 = TargetNamespace.2: 네임스페이스가 필요하지 않지만 스키마 문서의 대상 네임스페이스가 ''{1}''입니다. - UndeclaredEntity = UndeclaredEntity: ''{0}'' 엔티티가 선언되지 않았습니다. - UndeclaredPrefix = UndeclaredPrefix: ''{0}''을(를) QName으로 분석할 수 없음: ''{1}'' 접두어가 선언되지 않았습니다. - - -# JAXP 1.2 schema source property errors - - jaxp12-schema-source-type.1 = ''http://java.sun.com/xml/jaxp/properties/schemaSource'' 속성에 ''{0}'' 유형의 값이 있을 수 없습니다. 가능한 지원되는 값 유형은 String, File, InputStream, InputSource 또는 이러한 유형의 배열입니다. - jaxp12-schema-source-type.2 = ''http://java.sun.com/xml/jaxp/properties/schemaSource'' 속성에 ''{0}'' 유형의 배열 값이 있을 수 없습니다. 가능한 지원되는 값 유형은 Object, String, File, InputStream 및 InputSource입니다. - jaxp12-schema-source-ns = 객체 배열을 'http://java.sun.com/xml/jaxp/properties/schemaSource' 속성의 값으로 사용 중인 경우 동일한 대상 네임스페이스를 공유하는 스키마 두 개를 사용할 수 없습니다. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties deleted file mode 100644 index fc1da96df23..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties +++ /dev/null @@ -1,328 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file contains error and warning messages related to XML Schema -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = Não foi possível encontrar a mensagem de erro correspondente à chave da mensagem. - FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n - -# For internal use - - Internal-Error = Erro interno: {0}. - dt-whitespace = O valor do aspecto do espaço em branco não está disponível para o simpleType ''{0}'' da união - GrammarConflict = Uma das gramáticas retornadas do pool de gramática do usuário está em conflito com outra. - -# Identity constraints - - AbsentKeyValue = cvc-identity-constraint.4.2.1.a: O Elemento "{0}" não tem valor para a chave "{1}". - DuplicateField = Correspondência duplicada no escopo do campo "{0}". - DuplicateKey = cvc-identity-constraint.4.2.2: Valor de chave duplicado [{0}] declarado para a restrição de identidade "{2}" do elemento "{1}". - DuplicateUnique = cvc-identity-constraint.4.1: Valor exclusivo duplicado [{0}] declarado para a restrição de identidade "{2}" do elemento "{1}". - FieldMultipleMatch = cvc-identity-constraint.3: O campo "{0}" da restrição de identidade "{1}" corresponde a mais de um valor no escopo de seu seletor; os campos devem corresponder a valores exclusivos. - FixedDiffersFromActual = O conteúdo deste elemento não é equivalente ao valor do atributo "fixed" na declaração do elemento do esquema. - KeyMatchesNillable = cvc-identity-constraint.4.2.3: O elemento "{0}" tem a chave "{1}" que corresponde a um elemento que tem o valor anulável definido como verdadeiro. - KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: Valores insuficientes especificados para a restrição de identidade especificada para o elemento "{0}". - KeyNotFound = cvc-identity-constraint.4.3: A Chave ''{0}'' com o valor ''{1}'' não foi encontrada para a restrição de identidade do elemento ''{2}''. - KeyRefOutOfScope = Erro de restrição de identidade: a restrição de identidade "{0}" tem uma keyref que se refere a uma chave exclusiva a qual está fora do escopo. - KeyRefReferNotFound = A declaração de referência da chave "{0}" refere-se a uma chave com o nome "{1}". - UnknownField = Erro interno de restrição de identidade; o campo desconhecido "{0}" para a restrição de identidade "{2}" foi especificado para o elemento "{1}". - -# Ideally, we should only use the following error keys, not the ones under -# "Identity constraints". And we should cover all of the following errors. - -#validation (3.X.4) - - cvc-attribute.3 = cvc-attribute.3: O valor ''{2}'' do atributo ''{1}'' no elemento ''{0}'' não é válido em relação ao seu tipo, ''{3}''. - cvc-attribute.4 = cvc-attribute.4: O valor ''{2}'' do atributo ''{1}'' no elemento ''{0}'' não é válido em relação à sua '{'value constraint'}' fixa. O atributo deve ter um valor ''{3}''. - cvc-complex-type.2.1 = cvc-complex-type.2.1: O elemento ''{0}'' não deve ter um caractere ou um item com informações do elemento [children] porque o tipo de conteúdo do tipo é vazio. - cvc-complex-type.2.2 = cvc-complex-type.2.2: O elemento ''{0}'' não deve ter um elemento [children] e o valor deve ser válido. - cvc-complex-type.2.3 = cvc-complex-type.2.3: O elemento ''{0}'' não pode ter um caractere [children] porque o tipo de conteúdo do tipo é somente elemento. - cvc-complex-type.2.4.a = cvc-complex-type.2.4.a: Foi detectado um conteúdo inválido começando com o elemento ''{0}''. Era esperado um dos ''{1}''. - cvc-complex-type.2.4.b = cvc-complex-type.2.4.b: O conteúdo do elemento ''{0}'' não está completo. Era esperado um dos ''{1}''. - cvc-complex-type.2.4.c = cvc-complex-type.2.4.c: O curinga correspondente é restrito, mas nenhuma declaração pode ser encontrada para o elemento ''{0}''. - cvc-complex-type.2.4.d = cvc-complex-type.2.4.d: Conteúdo inválido encontrado ao iniciar com o elemento ''{0}''. Nenhum elemento filho é esperado neste ponto. - cvc-complex-type.2.4.d.1 = cvc-complex-type.2.4.d: Foi encontrado um conteúdo inválido começando com o elemento ''{0}''. Nenhum elemento filho "{1}" é esperado neste ponto. - cvc-complex-type.2.4.e = cvc-complex-type.2.4.e: ''{0}'' pode ocorrer no máximo ''{2}'' vezes na sequência atual. Esse limite foi excedido. Nesse ponto, um de ''{1}'' é esperado. - cvc-complex-type.2.4.f = cvc-complex-type.2.4.f: ''{0}'' pode ocorrer no máximo ''{1}'' vezes na sequência atual. Esse limite foi excedido. Nenhum elemento filho é esperado nesse ponto. - cvc-complex-type.2.4.g = cvc-complex-type.2.4.g: Foi encontrado um conteúdo inválido que começa com o elemento ''{0}''. O esperado era que ''{1}'' ocorresse no mínimo ''{2}'' vezes na sequência atual. Uma instância a mais é necessária para satisfazer essa restrição. - cvc-complex-type.2.4.h = cvc-complex-type.2.4.h: Foi encontrado um conteúdo inválido que começa com o elemento ''{0}''. O esperado era que ''{1}'' ocorresse no mínimo ''{2}'' vezes na sequência atual. ''{3}'' instâncias a mais são necessárias para satisfazer essa restrição. - cvc-complex-type.2.4.i = cvc-complex-type.2.4.i: O conteúdo do elemento ''{0}'' não está completo. O esperado era que ''{1}'' ocorresse no mínimo ''{2}'' vezes. Uma instância a mais é necessária para satisfazer essa restrição. - cvc-complex-type.2.4.j = cvc-complex-type.2.4.j: O conteúdo do elemento ''{0}'' não está completo. O esperado era que ''{1}'' ocorresse no mínimo ''{2}'' vezes. ''{3}'' instâncias a mais são necessárias para satisfazer essa restrição. - cvc-complex-type.3.1 = cvc-complex-type.3.1: O valor ''{2}'' do atributo ''{1}'' do elemento ''{0}'' não é válido em relação ao uso do atributo correspondente. O atributo ''{1}'' tem um valor fixo de ''{3}''. - cvc-complex-type.3.2.1 = cvc-complex-type.3.2.1: O elemento ''{0}'' não tem um curinga do atributo ''{1}''. - cvc-complex-type.3.2.2 = cvc-complex-type.3.2.2: O atributo ''{1}'' não pode aparecer no elemento ''{0}''. - cvc-complex-type.4 = cvc-complex-type.4: O atributo ''{1}'' deve aparecer no elemento ''{0}''. - cvc-complex-type.5.1 = cvc-complex-type.5.1: No elemento ''{0}'', o atributo ''{1}'' é um ID Curinga, mas já existe um ID Curinga ''{2}''. Pode haver somente um. - cvc-complex-type.5.2 = cvc-complex-type.5.2: No elemento, ''{0}'', o atributo ''{1}'' é um ID Curinga, mas já existe um atributo ''{2}'' obtido do ID entre os '{'attribute uses'}'. - cvc-datatype-valid.1.2.1 = cvc-datatype-valid.1.2.1: ''{0}'' não é um valor válido para ''{1}''. - cvc-datatype-valid.1.2.2 = cvc-datatype-valid.1.2.2: ''{0}'' não é um valor válido do tipo de lista ''{1}''. - cvc-datatype-valid.1.2.3 = cvc-datatype-valid.1.2.3: ''{0}'' não é um valor válido do tipo de união ''{1}''. - cvc-elt.1.a = cvc-elt.1.a: Não foi possível encontrar a declaração do elemento ''{0}''. - cvc-elt.1.b = cvc-elt.1.b: O nome do elemento não corresponde ao nome da declaração do elemento. Foi visto ''{0}''. Era esperado ''{1}''. - cvc-elt.2 = cvc-elt.2: O valor de "{"abstract"}" na declaração do elemento para ''{0}'' deve ser falso. - cvc-elt.3.1 = cvc-elt.3.1: O atributo ''{1}'' não deve aparecer no elemento ''{0}'' porque a propriedade '{'nillable'}' de ''{0}'' é falsa. - cvc-elt.3.2.1 = cvc-elt.3.2.1: O elemento ''{0}'' não pode ter informações de caractere ou de elemento [children] porque ''{1}'' foi especificado. - cvc-elt.3.2.2 = cvc-elt.3.2.2: Não deve haver "{"value constraint"}" fixo para o elemento ''{0}'' porque ''{1}'' foi especificado. - cvc-elt.4.1 = cvc-elt.4.1: O valor ''{2}'' do atributo ''{1}'' do elemento ''{0}'' não é um QName válido. - cvc-elt.4.2 = cvc-elt.4.2: Não é possível resolver ''{1}'' para uma definição de tipo de elemento ''{0}''. - cvc-elt.4.3 = cvc-elt.4.3: O tipo ''{1}'' não é obtido de forma válida da definição do tipo, ''{2}'', do elemento ''{0}''. - cvc-elt.5.1.1 = cvc-elt.5.1.1: "{"value constraint"}" ''{2}'' do elemento ''{0}'' não é um valor padrão válido para o tipo ''{1}''. - cvc-elt.5.2.2.1 = cvc-elt.5.2.2.1: O elemento ''{0}'' não deve ter item de informações do elemento [children]. - cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1: O valor ''{1}'' do elemento ''{0}'' não corresponde ao valor fixo de '{'value constraint'}' ''{2}''. - cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2: O valor ''{1}'' do elemento ''{0}'' não corresponde ao valor de '{'value constraint'}' ''{2}'' . - cvc-enumeration-valid = cvc-enumeration-valid: O valor ''{0}'' não tem um aspecto válido em relação à enumeração ''{1}''. Deve ser um valor da enumeração. - cvc-fractionDigits-valid = cvc-fractionDigits-valid: O valor ''{0}'' tem {1} dígitos fracionários, mas o número de dígitos fracionários foi limitado a {2}. - cvc-id.1 = cvc-id.1: Não há associação de ID/IDREF para IDREF ''{0}''. - cvc-id.2 = cvc-id.2: Há várias ocorrências do valor do ID ''{0}''. - cvc-id.3 = cvc-id.3: Um campo da restrição de identidade ''{0}'' correspondia ao elemento ''{1}'', mas este elemento não tem um tipo simples. - cvc-length-valid = cvc-length-valid: O valor ''{0}'' com tamanho = ''{1}'' não tem um aspecto válido em relação ao tamanho ''{2}'' do tipo ''{3}''. - cvc-maxExclusive-valid = cvc-maxExclusive-valid: O valor ''{0}'' não tem um aspecto válido em relação ao maxExclusive ''{1}'' do tipo ''{2}''. - cvc-maxInclusive-valid = cvc-maxInclusive-valid: O valor ''{0}'' não tem um aspecto válido em relação ao maxInclusive ''{1}'' do tipo ''{2}''. - cvc-maxLength-valid = cvc-maxLength-valid: O valor ''{0}'' com tamanho = ''{1}'' não tem um aspecto válido em relação ao maxLength ''{2}'' do tipo ''{3}''. - cvc-minExclusive-valid = cvc-minExclusive-valid: O valor ''{0}'' não tem um aspecto válido em relação ao minExclusive ''{1}'' do tipo ''{2}''. - cvc-minInclusive-valid = cvc-minInclusive-valid: O valor ''{0}'' não tem um aspecto válido em relação ao minInclusive ''{1}'' do tipo ''{2}''. - cvc-minLength-valid = cvc-minLength-valid: O valor ''{0}'' com tamanho = ''{1}'' não tem um aspecto válido em relação ao minLength ''{2}'' do tipo ''{3}''. - cvc-pattern-valid = cvc-pattern-valid: O valor ''{0}'' não tem um aspecto válido em relação ao padrão ''{1}'' do tipo ''{2}''. - cvc-totalDigits-valid = cvc-totalDigits-valid: O valor ''{0}'' tem {1} dígitos do total, mas o número de dígitos do total foi limitado a {2}. - cvc-type.1 = cvc-type.1: A definição ''{0}'' de tipo não foi encontrada. - cvc-type.2 = cvc-type.2: A definição do tipo não pode ser abstrata para o elemento {0}. - cvc-type.3.1.1 = cvc-type.3.1.1: O elemento ''{0}'' tem um tipo simples. Dessa forma, não pode haver atributos, exceto aqueles cujo nome do namespace é idêntico a ''http://www.w3.org/2001/XMLSchema-instance'' e cujo [local name] é um dos seguintes ''type'', ''nil'', ''schemaLocation'' ou ''noNamespaceSchemaLocation''. No entanto, o atributo ''{1}'' foi encontrado. - cvc-type.3.1.2 = cvc-type.3.1.2: O elemento ''{0}'' tem um tipo simples. Dessa forma, não deve haver um item de informações do elemento [children]. - cvc-type.3.1.3 = cvc-type.3.1.3: O valor ''{1}'' do elemento ''{0}'' não é válido. - -#schema valid (3.X.3) - - schema_reference.access = schema_reference: falha ao ler o documento de esquema ''{0}'' porque o acesso a ''{1}'' não é permitido em decorrência de uma restrição definida pela propriedade accessExternalSchema. - schema_reference.4 = schema_reference.4: Falha ao ler o documento do esquema ''{0}'' porque 1) não foi possível encontrar o documento; 2) não foi possível ler o documento; 3) o elemento-raiz do documento não é . - src-annotation = src-annotation: os elementos de podem conter somente os elementos e , mas foi encontrado ''{0}''. - src-attribute.1 = src-attribute.1: As propriedades ''padrão'' e ''fixed'' não podem estar presentes na declaração do atributo ''{0}''. Use somente uma delas. - src-attribute.2 = src-attribute.2: : A propriedade ''padrão'' está presente no atributo ''{0}''. Dessa forma, o valor de ''use'' deve ser ''optional''. - src-attribute.3.1 = src-attribute.3.1: 'ref' ou 'name' deve estar presente na declaração do atributo de local. - src-attribute.3.2 = src-attribute.3.2: O conteúdo deve corresponder a (annotation?) da referência do atributo ''{0}''. - src-attribute.4 = src-attribute.4: O atributo ''{0}'' tem um atributo ''type'' e um ''simpleType'' filho anônimo. Somente um deles é permitido para um atributo. - src-attribute_group.2 = src-attribute_group.2: A intersecção dos curingas não é expressível para o grupo de atributos ''{0}''. - src-attribute_group.3 = src-attribute_group.3: Definições circulares detectadas para o grupo de atributos ''{0}''. Seguir as referências do grupo de atributos de forma recursiva acaba conduzindo a ele próprio. - src-ct.1 = src-ct.1: Erro de Representação da Definição do Tipo Complexo para o tipo ''{0}''. Quando é usado, o tipo base deve ser um complexType. ''{1}'' é um simpleType. - src-ct.2.1 = src-ct.2.1: Erro de Representação da Definição do Tipo Complexo do tipo ''{0}''. Quando é usado, o tipo de base deve ser um complexType cujo tipo de conteúdo é simples ou, somente se a restrição for especificada, um tipo complexo com conteúdo misto e uma partícula esvaziável, ou, somente se a extensão for especificada, um tipo simples. ''{1}'' não satisfaz nenhuma dessas condições. - src-ct.2.2 = src-ct.2.2: Erro de Representação de Definição do Tipo Complexo do tipo ''{0}''. Quando um complexType com simpleContent é restrito a um complexType com conteúdo misto e partícula esvaziável, então deve haver um entre os filhos de . - src-ct.4 = src-ct.4: Erro de Representação de Definição de Tipo Complexo do tipo ''{0}''. A intersecção de curingas não é expressível. - src-ct.5 = src-ct.5: Erro de Representação da Definição do Tipo Complexo do tipo ''{0}''. A união de curingas não é expressível. - src-element.1 = src-element.1: As propriedades ''padrão'' e ''fixed'' não podem estar presentes na declaração do elemento ''{0}''. Use somente uma delas. - src-element.2.1 = src-attribute.2.1: 'ref' ou 'name' deve estar presente na declaração de elemento do local. - src-element.2.2 = src-element.2.2: Como ''{0}'' contém o atributo ''ref'', seu conteúdo deve ser correspondente (annotation?). No entanto, ''{1}'' foi encontrado. - src-element.3 = src-element.3: O elemento ''{0}'' tem um atributo ''type'' e um filho ''anonymous type''. Somente um deles é permitido para um elemento. - src-import.1.1 = src-import.1.1: O atributo do namespace ''{0}'' de um item de informação do elemento não deve ser igual ao targetNamespace do esquema existente nele. - src-import.1.2 = src-import.1.2: Se o atributo do namespace não estiver presente em um item de informação do elemento , então o esquema delimitador deve ter um targetNamespace. - src-import.2 = src-import.2: O elemento-raiz do documento "{0}'' deve ter o nome do namespace ''http://www.w3.org/2001/XMLSchema'' e o nome do local ''schema''. - src-import.3.1 = src-import.3.1: O atributo do namespace, ''{0}'', de um item de informação do elemento deve ser idêntico ao atributo targetNamespace, ''{1}'', do documento importado. - src-import.3.2 = src-import.3.2: Um item de informação do elemento que não tinha atributo de namespace foi encontrado. Dessa forma, o documento importado não pode ter um atributo de targetNamespace. No entanto, o targetNamespace ''{1}'' foi encontrado no documento importado. - src-include.1 = src-include.1: O elemento-raiz do documento "{0}'' deve ter o nome do namespace ''http://www.w3.org/2001/XMLSchema'' e o nome do local ''schema''. - src-include.2.1 = src-include.2.1: O targetNamespace do esquema mencionado, atualmente ''{1}'', deve ser idêntico ao do esquema de inclusão, atualmente ''{0}''. - src-redefine.2 = src-redefine.2: O elemento-raiz do documento "{0}'' deve ter o nome do namespace ''http://www.w3.org/2001/XMLSchema'' e o nome do local ''schema''. - src-redefine.3.1 = src-redefine.3.1: O targetNamespace do esquema mencionado, atualmente ''{1}'', deve ser idêntico ao do esquema de redefinição, atualmente ''{0}''. - src-redefine.5.a.a = src-redefine.5.a.a: Não foram encontrados filhos sem anotação de . Os filhos dos elementos devem ter descendentes de com atributos 'base' que fazem referência a eles próprios. - src-redefine.5.a.b = src-redefine.5.a.b: ''{0}'' não é um elemento filho válido. Os filhos dos elementos devem ter descendentes de com atributos ''base'' que fazem referência a eles próprios. - src-redefine.5.a.c = src-redefine.5.a.c: ''{0}'' não tem um atributo "base" que faz referência ao elemento ''{1}''. filhos dos elementos devem ter descendentes de com atributos ''base'' que fazem referência a eles próprios. - src-redefine.5.b.a = src-redefine.5.b.a: Nenhum filho sem anotação de foi encontrado. Os filhos de dos elementos devem ter os descendentes ou , com atributos 'base' que fazem referência a eles próprios. - src-redefine.5.b.b = src-redefine.5.b.b: Nenhum neto sem anotação de foi encontrado. Os filhos de dos elementos devem ter os descendentes ou com atributos 'base' que fazem referência a eles próprios. - src-redefine.5.b.c = src-redefine.5.b.c: ''{0}'' não é um elemento do neto válido. Os filhos de dos elementos devem ter os descendentes ou com atributos ''base'' que fazem referência a eles próprios. - src-redefine.5.b.d = src-redefine.5.b.d: ''{0}'' não tem um atributo "base" que faz referência ao elemento redefinido ''{1}''. Os filhos de dos elementos devem ter descendentes de ou com atributos ''base'' que fazem referência a eles próprios. - src-redefine.6.1.1 = src-redefine.6.1.1: Se um filho do grupo de um elemento contiver um grupo que faz referência a si próprio, ele deve ter exatamente 1; este tem ''{0}''. - src-redefine.6.1.2 = src-redefine.6.1.2: O grupo ''{0}'' que contém um referência a um grupo que está sendo redefinido deve ter ''minOccurs'' = ''maxOccurs'' = 1. - src-redefine.6.2.1 = src-redefine.6.2.1: Nenhum grupo no esquema redefinido tem uma correspondência de nome ''{0}''. - src-redefine.6.2.2 = src-redefine.6.2.2: O grupo ''{0}'' não restringe adequadamente o grupo que ele redefine; restrição violada: ''{1}''. - src-redefine.7.1 = src-redefine.7.1: Se um filho de attributeGroup de um elemento contiver um attributeGroup que faz referência a ele próprio, ele deve ter exatamente 1; este tem {0}. - src-redefine.7.2.1 = src-redefine.7.2.1: Nenhum attributeGroup no esquema redefinido tem uma correspondência de nome ''{0}''. - src-redefine.7.2.2 = src-redefine.7.2.2: O AttributeGroup ''{0}'' não restringe adequadamente o attributeGroup que ele redefine; restrição violada: ''{1}''. - src-resolve = src-resolve: Não é possível resolver o nome ''{0}'' para um componente ''{1}''. - src-resolve.4.1 = src-resolve.4.1: Erro ao resolver o componente ''{2}''. Foi detectado que ''{2}'' não tem namespace, mas não é possível fazer referência aos componentes em namespace de destino usando o documento do esquema ''{0}''. Se ''{2}'' for destinado a um namespace, talvez seja necessário um prefixo. Se for determinado que ''{2}'' não tem namespace, então uma "importação" sem um atributo "namespace" deverá ser adicionada a "{0}". - src-resolve.4.2 = src-resolve.4.2: Erro ao resolver o componente ''{2}''. Foi detectado que ''{2}'' está no namespace ''{1}'', mas não é possível fazer referência aos componentes em namespace de destino usando o documento do esquema ''{0}''. Se este for o namespace incorreto, talvez o prefixo de ''{2}'' precise ser alterado. Se este for o namespace correto, então a tag de "importação" apropriada deverá ser adicionada a ''{0}''. - src-simple-type.2.a = src-simple-type.2.a: Foi encontrado um elemento que tem um [attribute] base e um elemento entre seus [children]. Somente um é permitido. - src-simple-type.2.b = src-simple-type.2.b: Foi encontrado um elemento que não tem um [attribute] base nem um elemento entre seus [children]. É necessário um. - src-simple-type.3.a = src-simple-type.3.a: Foi encontrado um elemento que tem um itemType [attribute] e um elemento entre seus [children]. Somente um é permitido. - src-simple-type.3.b = src-simple-type.3.b: Foi encontrado um elemento que não tem um itemType [attribute] nem um elemento entre seus [children]. Um é necessário. - src-single-facet-value = src-single-facet-value: O aspecto ''{0}'' foi definido mais de uma vez. - src-union-memberTypes-or-simpleTypes = src-union-memberTypes-or-simpleTypes: Um elemento deve ter um memberTypes [attribute] não vazio ou pelo menos um elemento entre seus [children]. - -#constraint valid (3.X.6) - - ag-props-correct.2 = ag-props-correct.2: Erro do grupo de atributos ''{0}''. Os usos do atributo duplicado com o mesmo nome e namespace de destino foram especificados. O nome de uso do atributo duplicado é ''{1}''. - ag-props-correct.3 = ag-props-correct.3: Erro do grupo de atributos ''{0}''. Duas declarações de atributo ''{1}'' e ''{2}'' têm tipos que são obtidos do ID. - a-props-correct.2 = a-props-correct.2: Valor de restrição inválido ''{1}'' no atributo ''{0}''. - a-props-correct.3 = a-props-correct.3: O atributo ''{0}'' não pode usar ''fixed'' ou ''padrão'' porque o '{'type definition'}' do atributo é ID ou é obtida do ID. - au-props-correct.2 = au-props-correct.2: Na declaração do atributo de ''{0}'', foi especificado um valor fixo de ''{1}''. Dessa forma, se o uso do atributo que faz referência a ''{0}'' também tiver uma '{'value constraint'}', ele deve ser corrigido e seu valor deve ser ''{1}''. - cos-all-limited.1.2 = cos-all-limited.1.2: Um grupo de modelos 'all' deve ser exibido em uma partícula com '{'min occurs'}' = '{'max occurs'}' = 1 e essa partícula deve fazer parte de um par que constitui o '{'content type'}' de uma definição de tipo complexa. - cos-all-limited.2 = cos-all-limited.2: O "{"max occurs"}" de um elemento em um grupo de modelos ''all'' deve ser 0 ou 1. O valor ''{0}'' do elemento ''{1}'' é inválido. - cos-applicable-facets = cos-applicable-facets: O aspecto ''{0}'' não é permitido pelo tipo {1}. - cos-ct-extends.1.1 = cos-ct-extends.1.1: O tipo ''{0}'' foi obtido através da extensão do tipo ''{1}''. No entanto, o atributo ''final'' de ''{1}'' proíbe a obtenção por meio da extensão. - cos-ct-extends.1.4.3.2.2.1.a = cos-ct-extends.1.4.3.2.2.1.a: O tipo de conteúdo de um tipo derivado e o de sua base deve ser misto ou ambos devem ser de somente do elemento. O tipo ''{0}'' é somente do elemento, mas sua base não é. - cos-ct-extends.1.4.3.2.2.1.b = cos-ct-extends.1.4.3.2.2.1.b: O tipo de conteúdo de um tipo derivado e sua base devem ser mistos ou ambos devem ser somente de elemento. O tipo ''{0}'' é misto, mas seu tipo de base não é. - cos-element-consistent = cos-element-consistent: Erro do tipo ''{0}''. Vários elementos com o nome ''{1}'' com diferentes tipos aparecem no grupo de modelos. - cos-list-of-atomic = cos-list-of-atomic: Na definição do tipo de lista ''{0}'', o tipo ''{1}'' é um tipo de elemento da lista inválido porque não é atômico (''{1}'' é um tipo de lista ou um tipo de união que contém uma lista). - cos-nonambig = cos-nonambig: {0} e {1} (ou elementos de seu grupo de substituição) violam a "Unique Particle Attribution". Durante a validação deste esquema, a ambiguidade será criada para essas duas partículas. - cos-particle-restrict.a = cos-particle-restrict.a: A partícula obtida está vazia e a base não pode ser esvaziada. - cos-particle-restrict.b = cos-particle-restrict.b: A partícula base está vazia, mas a partícula obtida não está. - cos-particle-restrict.2 = cos-particle-restrict.2: Restrição de partícula proibida: ''{0}''. - cos-st-restricts.1.1 = cos-st-restricts.1.1: O tipo ''{1}'' é atômico. Dessa forma, sua '{'base type definition'}', ''{0}'', deve ser uma definição de tipo simples atômico ou um tipo de dados primitivo criado. - cos-st-restricts.2.1 = cos-st-restricts.2.1: Na definição do tipo de lista ''{0}'', o tipo ''{1}'' é um tipo de item inválido porque é um tipo de lista ou um tipo de união que contém uma lista. - cos-st-restricts.2.3.1.1 = cos-st-restricts.2.3.1.1: O componente "{"final"}" da "{"item type definition"}" ''{0}'' contém ''list''. Isso significa que ''{0}'' não pode ser usado como um tipo de item do tipo de lista ''{1}''. - cos-st-restricts.3.3.1.1 = cos-st-restricts.3.3.1.1: O componente "{"final"}" de "{"member type definitions"}", ''{0}'', contém ''union''. Isso significa que ''{0}'' não pode ser usado como um tipo de membro do tipo de união ''{1}''. - cos-valid-default.2.1 = cos-valid-padrão.2.1: O elemento ''{0}'' tem uma restrição de valor e deve ter um modelo de conteúdo simples ou misto. - cos-valid-default.2.2.2 = cos-valid-padrão.2.2.2: Como o elemento ''{0}'' tem uma '{'value constraint'}' e sua definição de tipo tem {''content type'}' misto, então a partícula do '{'content type'}' deve ser esvaziável. - c-props-correct.2 = c-props-correct.2: A cardinalidade dos Campos de keyref ''{0}'' e chave ''{1}'' deve ser correspondente. - ct-props-correct.3 = ct-props-correct.3: Definições circulares detectadas para o tipo complexo ''{0}''. Isso significa que ''{0}'' está contido em sua própria hierarquia de tipo, o que é um erro. - ct-props-correct.4 = ct-props-correct.4: Erro do tipo ''{0}''. Os usos do atributo duplicado com o mesmo nome e namespace de destino foram especificados. O nome do uso do atributo duplicado é ''{1}''. - ct-props-correct.5 = ct-props-correct.5: Erro do tipo ''{0}''. Duas declarações do atributo ''{1}'' e ''{2}'' têm tipos que são obtidos do ID. - derivation-ok-restriction.1 = derivation-ok-restriction.1: O tipo ''{0}'' foi obtido por meio da restrição do tipo ''{1}''. No entanto, ''{1}'' tem uma propriedade '{'final'}' que proíbe a derivação por restrição. - derivation-ok-restriction.2.1.1 = derivation-ok-restriction.2.1.1: Erro do tipo ''{0}''. O uso do atributo ''{1}'' neste tipo tem um valor de ''uso'' de ''{2}'', que é inconsistente com o valor ''obrigatório'' em um uso de atributo correspondente no tipo de base. - derivation-ok-restriction.2.1.2 = derivation-ok-restriction.2.1.2: Erro do tipo ''{0}''. O uso do atributo ''{1}'' neste tipo tem o tipo ''{2}'', que é obtido de forma válida de "{3}", o tipo de uso do atributo correspondente no tipo de base. - derivation-ok-restriction.2.1.3.a = derivation-ok-restriction.2.1.3.a: Erro do tipo ''{0}''. O uso do atributo ''{1}'' neste tipo tem uma restrição de valor efetivo que não é fixa e a restrição de valor efetivo do atributo correspondente no tipo de base é fixa. - derivation-ok-restriction.2.1.3.b = derivation-ok-restriction.2.1.3.b: Erro do tipo ''{0}''. O uso do atributo ''{1}'' neste tipo tem uma restrição de valor efetivo fixa com um valor de "{2}" que não é consistente com o valor de "{3}" para a restrição de valor efetivo fixa do uso do atributo correspondente no tipo de base. - derivation-ok-restriction.2.2.a = derivation-ok-restriction.2.2.a: Erro do tipo ''{0}''. O uso do atributo ''{1}'' neste tipo não tem um uso de atributo correspondente na base e o tipo de base não tem um atributo curinga. - derivation-ok-restriction.2.2.b = derivation-ok-restriction.2.2.b: Erro do tipo ''{0}''. O uso do atributo ''{1}'' neste tipo não tem um uso de atributo correspondente na base e o curinga no tipo de base não permite o namespace "{2}" deste uso do atributo. - derivation-ok-restriction.3 = derivation-ok-restriction.3: Erro do tipo ''{0}''. O uso do atributo ''{1}'' no tipo de base tem REQUIRED como verdadeiro, mas não há uso de atributo correspondente no tipo obtido. - derivation-ok-restriction.4.1 = derivation-ok-restriction.4.1: Erro do tipo ''{0}''. A derivação tem um curinga de atributo, mas a base não tem. - derivation-ok-restriction.4.2 = derivation-ok-restriction.4.2: Erro do tipo ''{0}''. O curinga na derivação não é um subconjunto de curingas válido daquele da base. - derivation-ok-restriction.4.3 = derivation-ok-restriction.4.3: Erro do tipo ''{0}''. O conteúdo do processo do curinga na derivação ({1}) é mais fraco que aquele da base ({2}). - derivation-ok-restriction.5.2.2.1 = derivation-ok-restriction.5.2.2.1: Erro do tipo ''{0}''. O tipo de conteúdo simples deste tipo ''{1}'' não se trata de uma restrição válida do tipo de conteúdo simples da base, ''{2}''. - derivation-ok-restriction.5.3.2 = derivation-ok-restriction.5.3.2: Erro do tipo ''{0}''. O tipo de conteúdo deste tipo está vazio, mas o tipo de conteúdo da base, ''{1}'', não está vazio ou é esvaziável. - derivation-ok-restriction.5.4.1.2 = derivation-ok-restriction.5.4.1.2: Erro do tipo ''{0}''. O tipo de conteúdo deste tipo é misto, mas o tipo de conteúdo da base ''{1}'' não é. - derivation-ok-restriction.5.4.2 = derivation-ok-restriction.5.4.2: Erro do tipo ''{0}''. A partícula do tipo não é uma restrição válida da partícula da base. - enumeration-required-notation = enumeration-required-notation: O tipo de NOTATION, ''{0}'' usado por {2} ''{1}'', deve ter um valor de aspecto de enumeração que especifica os elementos de notação usados por este tipo. - enumeration-valid-restriction = enumeration-valid-restriction: O valor da enumeração ''{0}'' não é o espaço do valor do tipo de base, {1}. - e-props-correct.2 = e-props-correct.2: Valor de restrição de valor inválido ''{1}'' no elemento ''{0}''. - e-props-correct.4 = e-props-correct.4: A "{"type definition"}" do elemento ''{0}'' não é obtida de forma válida a partir da "{"type definition"}" de substitutionHead ''{1}'' ou a propriedade "{"substitution group exclusions"}" de ''{1}'' não permite esta derivação. - e-props-correct.5 = e-props-correct.5: Uma "{"value constraint"}" não deve estar presente no elemento ''{0}'' porque a "{"type definition"}" do elemento ou o "{"content type"}" da "{"type definition"}" é ID ou obtida do ID. - e-props-correct.6 = e-props-correct.6: Grupo de substituição circular detectada para o elemento ''{0}''. - fractionDigits-valid-restriction = fractionDigits-valid-restriction: Na definição de {2}, o valor ''{0}'' de ''fractionDigits'' do aspecto é inválido porque ele deve ser <= ao valor de ''fractionDigits'' que foi definido como ''{1}'' em um dos tipos de ancestrais. - fractionDigits-totalDigits = fractionDigits-totalDigits: Na definição de {2}, o valor ''{0}'' do aspecto ''fractionDigits'' é inválido porque o valor deve ser <= o valor de ''totalDigits'' que é ''{1}''. - length-minLength-maxLength.1.1 = length-minLength-maxLength.1.1: Para o tipo {0}, é um erro para que o valor do tamanho ''{1}'' seja menor que o valor de minLength ''{2}''. - length-minLength-maxLength.1.2.a = length-minLength-maxLength.1.2.a: Para o tipo {0}, é um erro para que a base não tenha um aspecto de minLength, se a restrição atual tiver o aspecto minLength e a restrição atual ou a base tenha o aspecto de tamanho. - length-minLength-maxLength.1.2.b = length-minLength-maxLength.1.2.b: Para o tipo {0}, é um erro para que o minLength ''{1}'' atual não seja igual ao minLength ''{2}'' base. - length-minLength-maxLength.2.1 = length-minLength-maxLength.1.2: Para o tipo {0}, é um erro para que o valor do tamanho ''{1}'' seja maior que o valor de maxLength ''{2}''. - length-minLength-maxLength.2.2.a = length-minLength-maxLength.2.2.a: Para o tipo {0}, é um erro para que a base não tenha um aspecto de maxLength, se a restrição atual tiver o aspecto maxLength e a restrição atual ou a base tiver o aspecto de tamanho. - length-minLength-maxLength.2.2.b = length-minLength-maxLength.2.2.b: Para o tipo {0}, é um erro para que o maxLength ''{1}'' atual não seja igual ao maxnLength ''{2}'' base. - length-valid-restriction = length-valid-restriction: Erro do tipo ''{2}''. O valor do tamanho = ''{0}'' deve ser = o valor do tipo de base ''{1}''. - maxExclusive-valid-restriction.1 = maxExclusive-valid-restriction.1: Erro do tipo ''{2}''. O valor maxExclusive =''{0}'' deve ser <= maxExclusive do tipo de base ''{1}''. - maxExclusive-valid-restriction.2 = maxExclusive-valid-restriction.2: Erro do tipo ''{2}''. O valor maxExclusive =''{0}'' deve ser <= maxInclusive do tipo de base ''{1}''. - maxExclusive-valid-restriction.3 = maxExclusive-valid-restriction.3: Erro do tipo ''{2}''. O valor maxExclusive =''{0}'' deve ser > minExclusive do tipo de base ''{1}''. - maxExclusive-valid-restriction.4 = maxExclusive-valid-restriction.4: Erro do tipo ''{2}''. O valor maxExclusive =''{0}'' deve ser > minExclusive do tipo de base ''{1}''. - maxInclusive-maxExclusive = maxInclusive-maxExclusive: É um erro para que maxInclusive e maxExclusive sejam especificados para o mesmo tipo de dados. Em {2}, maxInclusive = ''{0}'' e maxExclusive = ''{1}''. - maxInclusive-valid-restriction.1 = maxInclusive-valid-restriction.1: Erro do tipo ''{2}''. O valor maxInclusive =''{0}'' deve ser <= maxInclusive do tipo de base ''{1}''. - maxInclusive-valid-restriction.2 = maxInclusive-valid-restriction.2: Erro do tipo ''{2}''. O valor maxInclusive =''{0}'' deve ser <= maxExclusive do tipo de base ''{1}''. - maxInclusive-valid-restriction.3 = maxInclusive-valid-restriction.3: Erro do tipo ''{2}''. O valor maxInclusive =''{0}'' deve ser > = minInclusive do tipo de base ''{1}''. - maxInclusive-valid-restriction.4 = maxInclusive-valid-restriction.4: Erro do tipo ''{2}''. O valor maxInclusive =''{0}'' deve ser > minInclusive do tipo de base ''{1}''. - maxLength-valid-restriction = maxLength-valid-restriction: Na definição de {2}, o valor maxLength = ''{0}'' deve ser <= que o do tipo de base ''{1}''. - mg-props-correct.2 = mg-props-correct.2: Definições circulares detectadas para o grupo ''{0}''. Seguir de forma recursiva dos valores de '{'term'}' das partículas conduz a uma partícula cujo '{'term'}' é o próprio grupo. - minExclusive-less-than-equal-to-maxExclusive = minExclusive-less-than-equal-to-maxExclusive: Na definição de {2}, o valor minExclusive = ''{0}'' deve ser <= que o valor maxExclusive = ''{1}''. - minExclusive-less-than-maxInclusive = minExclusive-less-than-maxInclusive: Na definição de {2}, o valor minExclusive = ''{0}'' deve ser <= que o valor maxInclusive = ''{1}''. - minExclusive-valid-restriction.1 = minExclusive-valid-restriction.1: Erro do tipo ''{2}''. O valor minExclusive =''{0}'' deve ser >= minExclusive do tipo de base ''{1}''. - minExclusive-valid-restriction.2 = minExclusive-valid-restriction.2: Erro do tipo ''{2}''. O valor minExclusive =''{0}'' deve ser <= maxExclusive do tipo de base ''{1}''. - minExclusive-valid-restriction.3 = minExclusive-valid-restriction.3: Erro do tipo ''{2}''. O valor minExclusive =''{0}'' deve ser >= minInclusive do tipo de base ''{1}''. - minExclusive-valid-restriction.4 = minExclusive-valid-restriction.4: Erro do tipo ''{2}''. O valor minExclusive =''{0}'' deve ser < maxExclusive do tipo de base ''{1}''. - minInclusive-less-than-equal-to-maxInclusive = minInclusive-less-than-equal-to-maxInclusive: Na definição de {2}, o valor minInclusive = ''{0}'' deve ser <= que o valor maxInclusive = ''{1}''. - minInclusive-less-than-maxExclusive = minInclusive-less-than-maxExclusive: Na definição de {2}, o valor minInclusive = ''{0}'' deve ser <= que o valor maxExclusive = ''{1}''. - minInclusive-minExclusive = minInclusive-minExclusive: É um erro para que minInclusive e minExclusive sejam especificados para o mesmo tipo de dados. Em {2}, minInclusive = ''{0}'' e minExclusive = ''{1}''. - minInclusive-valid-restriction.1 = minInclusive-valid-restriction.1: Erro do tipo ''{2}''. O valor minInclusive =''{0}'' deve ser >= minInclusive do tipo de base ''{1}''. - minInclusive-valid-restriction.2 = minInclusive-valid-restriction.2: Erro do tipo ''{2}''. O valor minInclusive =''{0}'' deve ser <= maxInclusive do tipo de base ''{1}''. - minInclusive-valid-restriction.3 = minInclusive-valid-restriction.3: Erro do tipo ''{2}''. O valor minInclusive =''{0}'' deve ser > minExclusive do tipo de base ''{1}''. - minInclusive-valid-restriction.4 = minInclusive-valid-restriction.4: Erro do tipo ''{2}''. O valor minInclusive =''{0}'' deve ser <= maxExclusive do tipo de base ''{1}''. - minLength-less-than-equal-to-maxLength = minLength-less-than-equal-to-maxLength: Na definição de {2}, o valor minLength = ''{0}'' deve ser < o valor de maxLength = ''{1}''. - minLength-valid-restriction = minLength-valid-restriction: Na definição de {2}, minLength = ''{0}'' deve ser >= que o do tipo de base ''{1}''. - no-xmlns = no-xmlns: O {name} de uma declaração de atributo não deve corresponder a 'xmlns'. - no-xsi = no-xsi: O "{"target namespace"}" de uma declaração do atributo não deve corresponder a ''{0}''. - p-props-correct.2.1 = p-props-correct.2.1: Na declaração de ''{0}'', o valor de ''minOccurs'' é ''{1}'', mas não deve ser maior que o valor de ''maxOccurs'', que é ''{2}''. - rcase-MapAndSum.1 = rcase-MapAndSum.1: Não há um mapeamento funcional completo entre as partículas. - rcase-MapAndSum.2 = rcase-MapAndSum.2: A faixa de ocorrência do grupo, ({0},{1}), não é uma restrição válida da faixa de ocorrência do grupo base, ({2},{3}). - rcase-NameAndTypeOK.1 = rcase-NameAndTypeOK.1: Os elementos têm nomes e namespaces de destino que não são iguais: Elemento ''{0}'' no namespace ''{1}'' e elemento ''{2}'' no namespace ''{3}''. - rcase-NameAndTypeOK.2 = rcase-NameAndTypeOK.2: Erro da partícula cujo "{"term"}" é a declaração do elemento ''{0}''. O "{"nillable"}" da declaração do elemento é verdadeiro, mas a partícula correspondente no tipo de base tem uma declaração de elemento cujo "{"nillable"}" é falso. - rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: Erro da partícula cujo "{"term"}" é a declaração do elemento ''{0}''. Sua faixa de ocorrência, ({1},{2}) não é uma restrição válida da faixa, ({3},{4} da partícula correspondente no tipo de base. - rcase-NameAndTypeOK.4.a = rcase-NameAndTypeOK.4.a: O elemento ''{0}'' não está fixado, mas o elemento correspondente no tipo de base está fixado com o valor ''{1}''. - rcase-NameAndTypeOK.4.b = rcase-NameAndTypeOK.4.b: O elemento ''{0}'' está fixado com o valor ''{1}'', mas o elemento correspondente no tipo de base está fixado com o valor ''{2}''. - rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5: Restrições de identidade do elemento ''{0}'' não são subconjuntos daquelas da base. - rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6: As substituições não permitidas do elemento ''{0}'' não são um superconjunto daquelas da base. - rcase-NameAndTypeOK.7 = rcase-NameAndTypeOK.7: O tipo de elemento ''{0}'', ''{1}'' não é obtido do tipo de elemento base ''{2}''. - rcase-NSCompat.1 = rcase-NSCompat.1: O elemento ''{0}'' tem um namespace ''{1}'' que não é permitido pelo curinga na base. - rcase-NSCompat.2 = rcase-NSCompat.2: Erro da partícula cujo "{"term"}" é a declaração do elemento ''{0}''. Sua faixa de ocorrência, ({1},{2}), não é uma restrição válida da faixa, ({3},{4}, da partícula correspondente no tipo de base. - rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1: Não há um mapeamento funcional completo entre as partículas. - rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2: A faixa de ocorrências do grupo, ({0},{1}), não é uma restrição válida da faixa de curingas base, ({2},{3}). - rcase-NSSubset.1 = rcase-NSSubset.1: Curinga não é um subconjunto de curingas correspondente na base. - rcase-NSSubset.2 = rcase-NSSubset.2: A faixa de ocorrências de curinga, ({0},{1}), não é uma restrição válida daquela da base, ({2},{3}),. - rcase-NSSubset.3 = rcase-NSSubset.3: O conteúdo do processo do curinga, ''{0}'', é mais fraco que aquele da base, ''{1}''. - rcase-Recurse.1 = rcase-Recurse.1: A faixa de ocorrência do grupo, ({0},{1}), não é uma restrição válida da faixa de ocorrência do grupo base, ({2},{3}). - rcase-Recurse.2 = rcase-Recurse.2: Não há um mapeamento funcional completo entre as partículas. - rcase-RecurseLax.1 = rcase-RecurseLax.1: A faixa de ocorrências do grupo, ({0},{1}), não é uma restrição válida da faixa de ocorrências do grupo base, ({2},{3}). - rcase-RecurseLax.2 = rcase-RecurseLax.2: Não há um mapeamento funcional completo entre as partículas. - rcase-RecurseUnordered.1 = rcase-RecurseUnordered.1: A faixa de ocorrências do grupo, ({0},{1}), não é uma restrição válida da faixa de ocorrências do grupo base, ({2},{3}). - rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: Não há um mapeamento funcional completo entre as partículas. -# We're using sch-props-correct.2 instead of the old src-redefine.1 -# src-redefine.1 = src-redefine.1: The component ''{0}'' is begin redefined, but its corresponding component isn't in the schema document being redefined (with namespace ''{2}''), but in a different document, with namespace ''{1}''. - sch-props-correct.2 = sch-props-correct.2: Um esquema não pode conter dois componentes globais com o mesmo nome; este esquema contém duas ocorrências de ''{0}''. - st-props-correct.2 = st-props-correct.2: Definições circulares detectadas para o tipo simples {0}''. Isso significa que ''{0}'' está contido em sua própria hierarquia de tipo, o que é um erro. - st-props-correct.3 = st-props-correct.3: Erro do tipo ''{0}''. O valor de '{'final'}' da '{'base type definition'}', ''{1}'', proíbe a obtenção por restrição. - totalDigits-valid-restriction = totalDigits-valid-restriction: Na definição de {2}, o valor ''{0}'' do "totalDigits"'' do aspecto é inválido porque ele deve ser <= ao valor de ''totalDigits", que foi definido como ''{1}'' em um dos tipos de ancestrais. - whiteSpace-valid-restriction.1 = whiteSpace-valid-restriction.1: Na definição de {0}, o valor ''{1}'' do aspecto ''whitespace'' é inválido porque o valor para ''whitespace'' foi definido como ''colapse'' em um dos tipos de ancestrais. - whiteSpace-valid-restriction.2 = whiteSpace-valid-restriction.2: Na definição de {0}, o valor do aspecto ''preserve'' é inválido para o aspecto "whitespace" porque o valor para ''whitespace'' foi definido como ''replace'' em um dos tipos de ancestrais. - -#schema for Schemas - - s4s-att-invalid-value = s4s-att-invalid-value: Valor de atributo inválido para ''{1}'' no elemento''{0}''. Motivo gravado: {2} - s4s-att-must-appear = s4s-att-must-appear: O atributo ''{1}'' deve aparecer no elemento ''{0}''. - s4s-att-not-allowed = s4s-att-not-allowed: O atributo ''{1}'' não pode aparecer no elemento ''{0}''. - s4s-elt-invalid = s4s-elt-invalid: O elemento ''{0}'' não é um elemento válido em um documento do esquema. - s4s-elt-must-match.1 = s4s-elt-must-match.1: O conteúdo de ''{0}'' deve corresponder a {1}. Foi detectado um problema começando em: {2}. - s4s-elt-must-match.2 = s4s-elt-must-match.2: O conteúdo de ''{0}'' deve corresponder a {1}. Não foram encontrados elementos suficientes. - # the "invalid-content" messages provide less information than the "must-match" counterparts above. They're used for complex types when providing a "match" would be an information dump - s4s-elt-invalid-content.1 = s4s-elt-invalid-content.1: O conteúdo de ''{0}'' é inválido. O elemento ''{1}'' é inválido, mal posicionado ou ocorre com muita frequência. - s4s-elt-invalid-content.2 = s4s-elt-invalid-content.2: O conteúdo de ''{0}'' é inválido. O elemento ''{1}'' não pode ficar vazio. - s4s-elt-invalid-content.3 = s4s-elt-invalid-content.3: Os elementos do tipo ''{0}'' não podem aparecer após as declarações como filhos de um elemento de . - s4s-elt-schema-ns = s4s-elt-schema-ns: O namespace do elemento ''{0}'' deve ser do namespace do esquema, ''http://www.w3.org/2001/XMLSchema''. - s4s-elt-character = s4s-elt-character: Não são permitidos caracteres sem espaço em branco nos elementos do esquema diferentes de ''xs:appinfo'' e ''xs:documentation''. Verificado ''{0}''. - -# codes not defined by the spec - - c-fields-xpaths = c-fields-xpaths: O valor do campo = ''{0}'' não é válido. - c-general-xpath = c-general-xpath: A expressão ''{0}'' não é válida em relação ao subconjunto de XPath suportado pelo Esquema XML. - c-general-xpath-ns = c-general-xpath-ns: Um prefixo de namespace na expressão de XPath ''{0}'' não foi associado a um namespace. - c-selector-xpath = c-selector-xpath: O valor do seletor = ''{0}'' não é válido; os xpaths do seletor não podem conter atributos. - EmptyTargetNamespace = EmptyTargetNamespace: No documento do esquema ''{0}'', o valor do atributo ''targetNamespace'' não pode ser uma string vazia. - FacetValueFromBase = FacetValueFromBase: Na declaração do tipo ''{0}'', o valor ''{1}'' do aspecto ''{2}'' deve ser proveniente do espaço de valor do tipo de base, ''{3}''. - FixedFacetValue = FixedFacetValue: Na definição de {3}, o valor ''{1}'' do aspecto ''{0}'' é inválido porque o valor de ''{0}'' foi enviado para ''{2}'' em um dos tipos de ancestrais e '{'fixed'}' = true. - InvalidRegex = InvalidRegex: O valor do padrão ''{0}'' não é uma expressão regular válida. O erro reportado foi: ''{1}'' na coluna ''{2}''. - MaxOccurLimit = A configuração atual do parser não permite que o valor de um atributo maxOccurs seja definido como maior que o valor {0}. - PublicSystemOnNotation = PublicSystemOnNotation: Pelo menos ''public'' e ''system'' devem aparecer no elemento ''notation''. - SchemaLocation = SchemaLocation: schemaLocation value = ''{0}''deve ter número par de URIs. - TargetNamespace.1 = TargetNamespace.1: Esperava o namespace ''{0}'', mas o namespace de destino do documento do esquema é ''{1}''. - TargetNamespace.2 = TargetNamespace.2: Exceto no namespace, mas o documento do esquema tem um namespace de destino ''{1}''. - UndeclaredEntity = UndeclaredEntity: A entidade ''{0}'' não foi declarada. - UndeclaredPrefix = UndeclaredPrefix: Não é possível resolver ''{0}'' como um QName: o prefixo ''{1}'' não foi declarado. - - -# JAXP 1.2 schema source property errors - - jaxp12-schema-source-type.1 = A propriedade ''http://java.sun.com/xml/jaxp/properties/schemaSource'' não pode ter um valor do tipo ''{0}''. Os tipos possíveis do valor suportados são String, File, InputStream, InputSource ou um array desses tipos. - jaxp12-schema-source-type.2 = A propriedade ''http://java.sun.com/xml/jaxp/properties/schemaSource'' não pode ter um valor de array do tipo ''{0}''. Os tipos possíveis do array suportados são Object, String, File, InputStream e InputSource. - jaxp12-schema-source-ns = Ao utilizar um array do tipo Object como valor da propriedade 'http://java.sun.com/xml/jaxp/properties/schemaSource', não é válido ter dois esquemas que compartilham o mesmo namespace de destino. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties deleted file mode 100644 index d0ffa141c67..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties +++ /dev/null @@ -1,328 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file contains error and warning messages related to XML Schema -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. - FormatFailed = Ett internt fel inträffade vid formatering av följande meddelande:\n - -# For internal use - - Internal-Error = Internt fel: {0}. - dt-whitespace = Aspektvärde för blanktecken är inte tillgängligt för simpleType ''{0}'' med union - GrammarConflict = Genererad grammatik från användarens grammatikpool strider mot annan grammatik. - -# Identity constraints - - AbsentKeyValue = cvc-identity-constraint.4.2.1.a: Elementet "{0}" har inget värde för nyckeln "{1}". - DuplicateField = Dubblettmatchning inom omfattningen av fältet "{0}". - DuplicateKey = cvc-identity-constraint.4.2.2: Duplicerat nyckelvärde [{0}] har deklarerats för identitetsbegränsningen "{2}" för elementet "{1}". - DuplicateUnique = cvc-identity-constraint.4.1: Duplicerat unikt värde [{0}] har deklarerats för identitetsbegränsningen "{2}" för elementet "{1}". - FieldMultipleMatch = cvc-identity-constraint.3: Fältet "{0}" för identitetsbegränsningen "{1}" matchar flera värden inom omfattningen för väljaren. Fält måste matcha unika värden. - FixedDiffersFromActual = Elementets innehåll motsvarar inte värdet av attributet som anges som "fixed" i elementdeklarationen i schemat. - KeyMatchesNillable = cvc-identity-constraint.4.2.3: Elementet "{0}" har nyckeln "{1}" som matchar ett element där nullbar är satt till sant. - KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: Inte tillräckligt många värden har angetts för identitetsbegränsningen som har angetts för elementet "{0}". - KeyNotFound = cvc-identity-constraint.4.3: Nyckeln ''{0}'' med värdet ''{1}'' hittades inte för identitetsbegränsningen för elementet ''{2}''. - KeyRefOutOfScope = Fel vid id-begränsning: id-begränsning "{0}" har en nyckelreferens som refererar till nyckel eller unikt värde utanför definitionsområdet. - KeyRefReferNotFound = Nyckelreferensdeklarationen "{0}" refererar till okänd nyckel med namnet "{1}". - UnknownField = Internt identitetsbegränsningsfel: det okända fältet "{0}" för identitetsbegränsningen "{2}" har angetts för elementet "{1}". - -# Ideally, we should only use the following error keys, not the ones under -# "Identity constraints". And we should cover all of the following errors. - -#validation (3.X.4) - - cvc-attribute.3 = cvc-attribute.3: Värdet ''{2}'' för attributet ''{1}'' i elementet ''{0}'' har ogiltig typ, ''{3}''. - cvc-attribute.4 = cvc-attribute.4: Värdet ''{2}'' för attributet ''{1}'' i elementet ''{0}'' har ogiltig fast '{'värdebegränsning'}'. Attributet måste ha värdet ''{3}''. - cvc-complex-type.2.1 = cvc-complex-type.2.1: Elementet ''{0}'' får inte ha [underordnade] objekt med tecken- eller elementinformation, eftersom innehållstyp är tomt. - cvc-complex-type.2.2 = cvc-complex-type.2.2: Elementet ''{0}'' får inte ha [underordnade] element och värdet måste vara giltigt. - cvc-complex-type.2.3 = cvc-complex-type.2.3: Elementet ''{0}'' får inte ha [underordnade] tecken, eftersom innehållstyp är endast element. - cvc-complex-type.2.4.a = cvc-complex-type.2.4.a: Ogiltigt innehåll hittades med början med elementet ''{0}''. Något av ''{1}'' förväntas. - cvc-complex-type.2.4.b = cvc-complex-type.2.4.b: Innehållet i elementet ''{0}'' är inte fullständigt. Något av ''{1}'' förväntas. - cvc-complex-type.2.4.c = cvc-complex-type.2.4.c: Matchningen av jokertecken är strikt, men ingen deklaration hittades för elementet ''{0}''. - cvc-complex-type.2.4.d = cvc-complex-type.2.4.d: Ogiltigt innehåll hittades med början med elementet ''{0}''. Inget underordnat element förväntas i det här skedet. - cvc-complex-type.2.4.d.1 = cvc-complex-type.2.4.d: Ogiltigt innehåll hittades med början med elementet ''{0}''. Det underordnade elementet ''{1}'' förväntas i det här skedet. - cvc-complex-type.2.4.e = cvc-complex-type.2.4.e: ''{0}'' kan inträffa högst ''{2}'' gånger i den aktuella sekvensen. Den här gränsen har överskridits. Vid den här punkten förväntas något av ''{1}''. - cvc-complex-type.2.4.f = cvc-complex-type.2.4.f: ''{0}'' kan inträffa högst ''{1}'' gånger i den aktuella sekvensen. Den här gränsen har överskridits. Inget underordnat element förväntas vid den här punkten. - cvc-complex-type.2.4.g = cvc-complex-type.2.4.g: Ogiltigt innehåll hittades med början från elementet ''{0}''. ''{1}'' förväntas inträffa minst ''{2}'' gånger i den aktuella sekvensen. En till instans krävs för att uppfylla den här begränsningen. - cvc-complex-type.2.4.h = cvc-complex-type.2.4.g: Ogiltigt innehåll hittades med början från elementet ''{0}''. ''{1}'' förväntas inträffa minst ''{2}'' gånger i den aktuella sekvensen. ''{3}'' till instanser krävs för att uppfylla den här begränsningen. - cvc-complex-type.2.4.i = cvc-complex-type.2.4.i: Innehållet i elementet ''{0}'' är inte fullständigt. ''{1}'' förväntas inträffa minst ''{2}'' gånger. En till instans krävs för att uppfylla den här begränsningen. - cvc-complex-type.2.4.j = cvc-complex-type.2.4.j: Innehållet i elementet ''{0}'' är inte fullständigt. ''{1}'' förväntas inträffa minst ''{2}'' gånger. ''{3}'' till instanser krävs för att uppfylla den här begränsningen. - cvc-complex-type.3.1 = cvc-complex-type.3.1: Värdet ''{2}'' för attributet ''{1}'' i elementet ''{0}'' är inte giltigt med motsvarande attributanvändning. Attributet ''{1}'' har det fasta värdet ''{3}''. - cvc-complex-type.3.2.1 = cvc-complex-type.3.2.1: Elementet ''{0}'' saknar attributjokertecken för attributet ''{1}''. - cvc-complex-type.3.2.2 = cvc-complex-type.3.2.2: Attributet ''{1}'' är inte tillåtet i elementet ''{0}''. - cvc-complex-type.4 = cvc-complex-type.4: Attributet ''{1}'' måste anger i elementet ''{0}''. - cvc-complex-type.5.1 = cvc-complex-type.5.1: I elementet ''{0}'' är attributet ''{1}'' ett joker-id. Joker-id ''{2}'' finns redan och endast ett id kan användas. - cvc-complex-type.5.2 = cvc-complex-type.5.2: I elementet ''{0}'' är attributet ''{1}'' ett joker-id. Det finns redan ett attribut ''{2}'' som tas från id bland '{'attributanvändningar'}'. - cvc-datatype-valid.1.2.1 = cvc-datatype-valid.1.2.1: ''{0}'' är inte något giltigt värde för ''{1}''. - cvc-datatype-valid.1.2.2 = cvc-datatype-valid.1.2.2: ''{0}'' är inte något giltigt värde för listtyp ''{1}''. - cvc-datatype-valid.1.2.3 = cvc-datatype-valid.1.2.3: ''{0}'' är inte något giltigt värde för uniontyp ''{1}''. - cvc-elt.1.a = cvc-elt.1.a: Kan inte hitta deklarationen för elementet ''{0}''. - cvc-elt.1.b = cvc-elt.1.b: Namnet på elementet matchar inte namnet på elementdeklarationen. Påträffade ''{0}''. Förväntade ''{1}''. - cvc-elt.2 = cvc-elt.2: Värdet för '{'abstrakt'}' i elementdeklarationen för ''{0}'' måste anges som false. - cvc-elt.3.1 = cvc-elt.3.1: Attributet ''{1}'' får inte anges i elementet ''{0}'', eftersom '{'nullbar'}' egenskap för ''{0}'' har angetts som false. - cvc-elt.3.2.1 = cvc-elt.3.2.1: Elementet ''{0}'' får inte innehålla [underordnade] med tecken- eller elementinformation eftersom ''{1}'' har angetts. - cvc-elt.3.2.2 = cvc-elt.3.2.2: Det får inte finnas någon fast '{'värdebegränsning'}' för elementet ''{0}'' eftersom ''{1}'' har angetts. - cvc-elt.4.1 = cvc-elt.4.1: Värdet ''{2}'' för attributet ''{1}'' i elementet ''{0}'' är inte något giltigt QName. - cvc-elt.4.2 = cvc-elt.4.2: Kan inte matcha ''{1}'' med typdefinition för elementet ''{0}''. - cvc-elt.4.3 = cvc-elt.4.3: Typ ''{1}'' är inte giltigt att tas från typdefinitionen ''{2}'' i elementet ''{0}''. - cvc-elt.5.1.1 = cvc-elt.5.1.1: '{'värdebegränsning'}' ''{2}'' i elementet ''{0}'' är inte något giltigt standardvärde för typ ''{1}''. - cvc-elt.5.2.2.1 = cvc-elt.5.2.2.1: Elementet ''{0}'' får inte ha [underordnade] objekt med elementinformation. - cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1: Värdet ''{1}'' i elementet ''{0}'' matchar inte värdet med fast '{'värdebegränsning'}', ''{2}''. - cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2: Värdet ''{1}'' i elementet ''{0}'' matchar inte värdet med '{'värdebegränsning'}', ''{2}''. - cvc-enumeration-valid = cvc-enumeration-valid: Värdet ''{0}'' är ogiltigt med aktuell uppräkning ''{1}''. Värdet måste ingå i uppräkningen. - cvc-fractionDigits-valid = cvc-fractionDigits-valid: Värdet ''{0}'' har {1} bråktalssiffror, men antalet bråktalssiffror är begränsat till {2}. - cvc-id.1 = cvc-id.1: Det finns ingen ID/IDREF-bindning för IDREF ''{0}''. - cvc-id.2 = cvc-id.2: Det finns flera förekomster av id-värdet ''{0}''. - cvc-id.3 = cvc-id.3: Ett fält med id-begränsning ''{0}'' matchade elementet ''{1}'', men elementet saknar enkel typ. - cvc-length-valid = cvc-length-valid: Värdet ''{0}'' med längd = ''{1}'' är ogiltigt med den aktuella längden ''{2}'' för typ ''{3}''. - cvc-maxExclusive-valid = cvc-maxExclusive-valid: Värdet ''{0}'' är ogiltigt med aktuellt maxExclusive ''{1}'' för typ ''{2}''. - cvc-maxInclusive-valid = cvc-maxInclusive-valid: Värdet ''{0}'' är ogiltigt med aktuellt maxInclusive ''{1}'' för typ ''{2}''. - cvc-maxLength-valid = cvc-maxLength-valid: Värdet ''{0}'' med längd = ''{1}'' är ogiltigt med aktuellt maxLength ''{2}'' för typ ''{3}''. - cvc-minExclusive-valid = cvc-minExclusive-valid: Värdet ''{0}'' är ogiltigt med aktuellt minExclusive ''{1}'' för typ ''{2}''. - cvc-minInclusive-valid = cvc-minInclusive-valid: Värdet ''{0}'' är ogiltigt med aktuellt minInclusive ''{1}'' för typ ''{2}''. - cvc-minLength-valid = cvc-minLength-valid: Värdet ''{0}'' med längd = ''{1}'' är ogiltigt med aktuellt minLength ''{2}'' för typ ''{3}''. - cvc-pattern-valid = cvc-pattern-valid: Värdet ''{0}'' är ogiltigt med aktuellt mönster ''{1}'' för typ ''{2}''. - cvc-totalDigits-valid = cvc-totalDigits-valid: Värdet ''{0}'' har {1} siffror, men det totala antalet siffror är begränsat till {2}. - cvc-type.1 = cvc-type.1: Typdefinitionen ''{0}'' hittades inte. - cvc-type.2 = cvc-type.2: Typdefinitionen kan inte vara abstrakt för elementet {0}. - cvc-type.3.1.1 = cvc-type.3.1.1: Elementet ''{0}'' har enkel typ och får inte innehålla attribut, utöver sådana vars namnrymd är identisk med ''http://www.w3.org/2001/XMLSchema-instance'' och vars [lokala namn] har någotdera av ''type'', ''nil'', ''schemaLocation'' eller ''noNamespaceSchemaLocation''. Hittade dock attributet ''{1}''. - cvc-type.3.1.2 = cvc-type.3.1.2: Elementet ''{0}'' har enkel typ och får inte innehålla [underordnade] med elementinformation. - cvc-type.3.1.3 = cvc-type.3.1.3: Värdet ''{1}'' i elementet ''{0}'' är ogiltigt. - -#schema valid (3.X.3) - - schema_reference.access = schema_reference: Kunde inte läsa schemadokumentet ''{0}'' eftersom ''{1}''-åtkomst inte tillåts på grund av begränsning som anges av egenskapen accessExternalSchema. - schema_reference.4 = schema_reference.4: Läsning av schemadokument ''{0}'' utfördes inte på grund av 1) det går inte att hitta dokumentet; 2) det går inte att läsa dokumentet; 3) dokumentets rotelement är inte . - src-annotation = src-annotation: element för får endast innehålla element för och , men ''{0}'' hittades. - src-attribute.1 = src-attribute.1: Båda egenskaperna ''default'' och ''fixed'' kan inte samtidigt ingå i attributdeklarationen ''{0}''. Använd en av dem. - src-attribute.2 = src-attribute.2: Egenskapen ''default'' finns med i attributet ''{0}'', vilket innebär att värdet för ''use'' måste vara ''optional''. - src-attribute.3.1 = src-attribute.3.1: Antingen 'ref' eller 'name' måste finnas med i lokal attributdeklaration. - src-attribute.3.2 = src-attribute.3.2: Innehållet måste matcha (annotation?) för attributreferens ''{0}''. - src-attribute.4 = src-attribute.4: Attributet ''{0}'' har både ett ''typ''-attribut och en anonym ''simpleType''-underordnad. Endast ett av dessa tillåts som attribut. - src-attribute_group.2 = src-attribute_group.2: Snittet mellan jokertecken kan inte uttryckas för attributgruppen ''{0}''. - src-attribute_group.3 = src-attribute_group.3: Cirkulära definitioner har identifierats för attributgruppen ''{0}''. Rekursivt efterföljande attributgruppreferenser leder så småningom tillbaka till sig själv. - src-ct.1 = src-ct.1: Ett fel inträffade vid representationen av definition för typ ''{0}''. Om används måste bastyp vara complexType. ''{1}'' är simpleType. - src-ct.2.1 = src-ct.2.1: Ett fel inträffade vid representationen av definition för typ ''{0}''. Om används måste bastyp vara complexType vars innehåll är enkelt, eller, om det finns en angiven begränsning, komplex typ med blandat innehåll och tömningsbar partikel, eller, om det finns ett angivet tillägg, enkel typ. ''{1}'' uppfyller inget av dessa villkor. - src-ct.2.2 = src-ct.2.2: Ett fel inträffade vid representationen av definition för typ ''{0}''. Om complexType med simpleContent begränsar complexType med blandat innehåll och tömningsbar partikel måste det finnas en bland underordnade i . - src-ct.4 = src-ct.4: Ett fel inträffade vid representationen av definition för typ ''{0}''. Snittet mellan jokertecken kan inte uttryckas. - src-ct.5 = src-ct.5: Ett fel inträffade vid representationen av definition för typ ''{0}''. Unionen mellan jokertecken kan inte uttryckas. - src-element.1 = src-element.1: Båda egenskaperna ''default'' och ''fixed'' kan inte samtidigt ingå i elementdeklarationen ''{0}''. Använd en av dem. - src-element.2.1 = src-element.2.1: Antingen 'ref' eller 'name' måste anges i den lokala elementdeklarationen. - src-element.2.2 = src-element.2.2: Eftersom ''{0}'' innehåller ett ''ref''-attribut måste innehållet matcha (annotation?). ''{1}'' hittades dock inte. - src-element.3 = src-element.3: Elementet ''{0}'' innehåller både ''type''-attribut och underordnat ''anonymous type''. Endast ett av dessa är tillåtet i ett element. - src-import.1.1 = src-import.1.1: Namnrymdsattributet ''{0}'' i ett objekt med elementinformation för får inte vara samma som targetNamespace i det schema som det ingår i. - src-import.1.2 = src-import.1.2: Om namnrymdsattributet inte finns med i ett objekt med elementinformation för måste omslutande schema ha ett angivet targetNamespace. - src-import.2 = src-import.2: Rotelementet för dokumentet ''{0}'' måste ha namnrymdsnamnet ''http://www.w3.org/2001/XMLSchema'' och det lokala namnet ''schema''. - src-import.3.1 = src-import.3.1: Namnrymdsattributet ''{0}'' för ett objekt med elementinformation för måste vara identiskt med targetNamespace-attributet ''{1}'' i det importerade dokumentet. - src-import.3.2 = src-import.3.2: Ett objekt med elementinformation för som saknade namnrymdsattribut hittades och därför kan importerat dokument inte användas med attributet targetNamespace. targetNamespace ''{1}'' hittades dock i importerat dokument. - src-include.1 = src-include.1: Rotelementet för dokumentet ''{0}'' måste ha namnrymdsnamnet ''http://www.w3.org/2001/XMLSchema'' och det lokala namnet ''schema''. - src-include.2.1 = src-include.2.1: targetNamespace för refererat schema, för närvarande ''{1}'', måste vara identiskt med motsvarande i inkluderat schema, för närvarande ''{0}''. - src-redefine.2 = src-redefine.2: Rotelementet för dokumentet ''{0}'' måste ha namnrymdsnamnet ''http://www.w3.org/2001/XMLSchema'' och det lokala namnet ''schema''. - src-redefine.3.1 = src-include.3.1: targetNamespace för refererat schema, för närvarande ''{1}'', måste vara identiskt med motsvarande i omdefinierande schema, för närvarande ''{0}''. - src-redefine.5.a.a = src-redefine.5.a.a: Hittade inga -underordnade med icke-anteckning. -underordnade i -element måste ha -underordnade, med 'base'-attribut som refererar till sig själva. - src-redefine.5.a.b = src-redefine.5.a.b: ''{0}'' är inte något giltigt underordnat element. -underordnade i -element måste ha -underordnade, med ''base''-attribut som refererar till sig själva. - src-redefine.5.a.c = src-redefine.5.a.c: ''{0}'' saknar ett ''base''-attribut som refererar till det omdefinierade elementet ''{1}''. -underordnade i -element måste ha -underordnade, med ''base''-attribut som refererar till sig själva. - src-redefine.5.b.a = src-redefine.5.b.a: Hittade inga -underordnade med icke-anteckning. -underordnade i -element måste ha - eller -underordnade, med 'base'-attribut som refererar till sig själva. - src-redefine.5.b.b = src-redefine.5.b.b: Hittade inga -underordnade på lägsta nivå med icke-anteckning. -underordnade i -element måste ha - eller -underordnade, med 'base'-attribut som refererar till sig själva. - src-redefine.5.b.c = src-redefine.5.a.c: ''{0}'' är inte något giltigt underordnat element på lägsta nivå. -underordnade i -element måste ha - eller -underordnade, med ''base''-attribut som refererar till sig själva. - src-redefine.5.b.d = src-redefine.5.a.d: ''{0}'' saknar ett ''base''-attribut som refererar till det omdefinierade elementet ''{1}''. -underordnade i -element måste ha - eller -underordnade, med ''base''-attribut som refererar till sig själva. - src-redefine.6.1.1 = src-redefine.6.1.1: Om en underordnad grupp i ett -element innehåller en grupp som refererar sig själv måste den ha exakt 1; den här har ''{0}''. - src-redefine.6.1.2 = src-redefine.6.1.2: Gruppen ''{0}'', som innehåller en referens till en grupp som omdefinieras, måste anges som ''minOccurs'' = ''maxOccurs'' = 1. - src-redefine.6.2.1 = src-redefine.6.2.1: Det finns ingen grupp i det omdefinierade schemat med ett namn som matchar ''{0}''. - src-redefine.6.2.2 = src-redefine.6.2.2: Gruppen ''{0}'' ger ingen korrekt begränsning av gruppen som omdefinieras; brott mot begränsning: ''{1}''. - src-redefine.7.1 = src-redefine.7.1: Om en attributeGroup-underordnad i ett -element innehåller attributeGroup som refererar till sig själv måste den ha exakt 1; den här har {0}. - src-redefine.7.2.1 = src-redefine.7.2.1: Det finns ingen attributeGroup i det omdefinierade schemat med ett namn som matchar ''{0}''. - src-redefine.7.2.2 = src-redefine.7.2.2: AttributeGroup ''{0}'' ger ingen korrekt begränsning av attributeGroup som omdefinieras; brott mot begränsning: ''{1}''. - src-resolve = src-resolve: Namnet ''{0}'' kan inte matchas med komponenten ''{1}''. - src-resolve.4.1 = src-resolve.4.1: Ett fel inträffade vid matchning av komponenten ''{2}''. Systemet upptäckte att ''{2}'' saknar namnrymd och komponenter utan namnrymd kan inte refereras till från schemadokumentet ''{0}''. Om ''{2}'' ska användas med namnrymd kanske du behöver ange ett prefix. Om ''{2}'' ska användas utan namnrymd bör du lägga till ''import'' utan "namespace"-attribut till ''{0}''. - src-resolve.4.2 = src-resolve.4.2: Ett fel inträffade vid matchning av komponent ''{2}''. Systemet upptäckte att ''{2}'' finns i namnrymden ''{1}'' och komponenter från denna namnrymd kan inte refereras till från schemadokumentet ''{0}''. Om detta är en felaktig namnrymd kanske du måste ändra prefixet ''{2}''. Om namnrymden är korrekt behöver du lägga till lämplig ''import''-tagg i ''{0}''. - src-simple-type.2.a = src-simple-type.2.a: Ett -element hittades med både ett bas-[attribut] och ett -element bland [underordnade]. Endast ett av dem är tillåtet. - src-simple-type.2.b = src-simple-type.2.b: Ett -element hittades med varken ett bas-[attribut] eller ett -element bland [underordnade]. Någotdera av dem krävs. - src-simple-type.3.a = src-simple-type.3.a: Ett -element hittades med både ett itemType-[attribut] och ett -element bland [underordnade]. Endast ett av dem är tillåtet. - src-simple-type.3.b = src-simple-type.3.b: Ett -element hittades med varken ett itemType-[attribut] eller ett -element bland [underordnade]. Någotdera av dem krävs. - src-single-facet-value = src-single-facet-value: Aspekten (facet) ''{0}'' har definierats fler än en gång. - src-union-memberTypes-or-simpleTypes = src-union-memberTypes-or-simpleTypes: Ett -element måste anges med antingen ett icke-tomt memberTypes-[attribut] eller minst ett -element bland [underordnade]. - -#constraint valid (3.X.6) - - ag-props-correct.2 = ag-props-correct.2: Ett fel inträffade för attributgruppen ''{0}''. Duplicerad attributanvändning med samma namn och namnrymd. Namnet på dubbletten är ''{1}''. - ag-props-correct.3 = ag-props-correct.3: Ett fel inträffade för attributgruppen ''{0}''. Två attributdeklarationer, ''{1}'' och ''{2}'' har angetts med typer som härleds från ID. - a-props-correct.2 = a-props-correct.2: Ogiltigt värde för begränsning, ''{1}'', i attributet ''{0}''. - a-props-correct.3 = a-props-correct.3: Attributet ''{0}'' får inte använda ''fixed'' eller ''default'', eftersom attributets '{'typdefinition'}' är ID eller härleds från ID. - au-props-correct.2 = au-props-correct.2: Det fasta värdet ''{1}'' har angetts i attributdeklarationen ''{0}''. Om attributet som refererar till ''{0}'' även innehåller en '{'värdebegränsning'}' måste du lösa detta och ange värdet ''{1}''. - cos-all-limited.1.2 = cos-all-limited.1.2: En 'all'-modellgrupp måste anges i en partikel med '{'min förekomster'}' = '{'max förekomster'}' = 1 och partikeln måste vara en del i ett par som utgör '{'innehållstyp'}' i en komplex typdefinition. - cos-all-limited.2 = cos-all-limited.2: Värdet för '{'max förekomster'}' i ett element i en ''all''-modellgrupp måste vara 0 eller 1. Värdet ''{0}'' för elementet ''{1}'' är ogiltigt. - cos-applicable-facets = cos-applicable-facets: Aspekten (facet) ''{0}'' är inte tillåten med typ {1}. - cos-ct-extends.1.1 = cos-ct-extends.1.1: Typ ''{0}'' härleds från ett tillägg från typ ''{1}''. Attributet ''final'' i ''{1}'' tillåter dock inte härledning av tillägg. - cos-ct-extends.1.4.3.2.2.1.a = cos-ct-extends.1.4.3.2.2.1.a: Innehållstyp för härledd typ och för basen måste båda vara blandade eller endast element. Typ ''{0}'' är endast element, men däremot inte basen. - cos-ct-extends.1.4.3.2.2.1.b = cos-ct-extends.1.4.3.2.2.1.b: Innehållstyp för härledd typ och för basen måste båda vara blandade eller endast element. Typ ''{0}'' är blandat, men däremot inte basen. - cos-element-consistent = cos-element-consistent: Ett fel inträffade för typ ''{0}''. Flera element med namnet ''{1}'', med olika typer, har angetts i modellgruppen. - cos-list-of-atomic = cos-list-of-atomic: I definitionen av listtyp ''{0}'' är typ ''{1}'' en ogiltig typ av listelement eftersom den inte är atomisk (''{1}'' är antingen en listtyp eller en uniontyp som innehåller en lista). - cos-nonambig = cos-nonambig: {0} och {1} (eller element från ersättningsgruppen) bryter mot "Unique Particle Attribution". Detta skapar tvetydighet för partiklarna vid validering gentemot detta schema. - cos-particle-restrict.a = cos-particle-restrict.a: Härledd partikel är tom och basen är inte tömningsbar. - cos-particle-restrict.b = cos-particle-restrict.b: Baspartikeln är tom, men den härledda partikeln är inte det. - cos-particle-restrict.2 = cos-particle-restrict.2: Förbjuden partikelbegränsning: ''{0}''. - cos-st-restricts.1.1 = cos-st-restricts.1.1: Typ ''{1}'' är atomisk och därför måste '{'bastypdefinitionen'}', ''{0}'', anges som atomisk enkel typ eller inbyggd primitiv datatyp. - cos-st-restricts.2.1 = cos-st-restricts.2.1: I definitionen av listtyp ''{0}'' är typ ''{1}'' en ogiltig objekttyp eftersom det är antingen en listtyp eller en uniontyp som innehåller en lista. - cos-st-restricts.2.3.1.1 = cos-st-restricts.2.3.1.1: Den '{'sista'}' komponenten i '{'objekttypdefinitionen'}', ''{0}'', innehåller ''list''. Detta betyder att ''{0}'' inte kan användas som objekttyp för listtyp ''{1}''. - cos-st-restricts.3.3.1.1 = cos-st-restricts.3.3.1.1: Den '{'sista'}' komponenten i '{'medlemtypdefinitionerna'}', ''{0}'', innehåller ''union''. Detta betyder att ''{0}'' inte kan användas som medlemstyp för uniontyp ''{1}''. - cos-valid-default.2.1 = cos-valid-default.2.1: Elementet ''{0}'' har en värdebegränsning och måste ha en blandad eller enkel innehållsmodell. - cos-valid-default.2.2.2 = cos-valid-default.2.2.2: Eftersom elementet ''{0}'' har en '{'värdebegränsning'}' och typdefinitionen har blandad '{'innehållstyp'}' så måste partikeln av '{'innehållstyp'}' vara tömningsbar. - c-props-correct.2 = c-props-correct.2: Kardinalitet av fält med nyckelreferens ''{0}'' och nyckel ''{1}'' måste matcha varandra. - ct-props-correct.3 = ct-props-correct.3: Cirkulära definitioner har identifierats för komplex typ ''{0}''. Detta innebär att ''{0}'' ingår i sin egen typhierarki, vilket är fel. - ct-props-correct.4 = ct-props-correct.4: Ett fel inträffade för typ ''{0}''. Duplicerad attributanvändning med samma namn och namnrymd. Namnet på dubbletten är ''{1}''. - ct-props-correct.5 = ct-props-correct.5: Ett fel inträffade för typ ''{0}''. Två attributdeklarationer, ''{1}'' och ''{2}'', används med typer som härleds från ID. - derivation-ok-restriction.1 = derivation-ok-restriction.1: Typ ''{0}'' härleddes genom begränsning från typ ''{1}''. ''{1}'' har däremot en '{'slutlig'}' egenskap som förbjuder härledning via begränsning. - derivation-ok-restriction.2.1.1 = derivation-ok-restriction.2.1.1: Ett fel inträffade för typ ''{0}''. Attributanvändning ''{1}'' i denna typ har ''use''-värdet ''{2}'' vilket inte är konsekvent med värdet för ''required'' i matchande attributanvändning i bastypen. - derivation-ok-restriction.2.1.2 = derivation-ok-restriction.2.1.2: Ett fel inträffade för typ ''{0}''. Attributanvändning ''{1}'' i denna typ har typ ''{2}'', som inte får härledas från ''{3}'', typ i matchande attributanvändning i bastypen. - derivation-ok-restriction.2.1.3.a = derivation-ok-restriction.2.1.3.a: Ett fel inträffade för typ ''{0}''. Attributanvändning ''{1}'' i denna typ har en effektiv värdebegränsning som inte är fast, medan den effektiva värdebegränsningen i matchande attributanvändning i bastypen är fast. - derivation-ok-restriction.2.1.3.b = derivation-ok-restriction.2.1.3.b: Ett fel inträffade för typ ''{0}''. Attributanvändning ''{1}'' i denna typ har en effektiv värdebegränsning med det fasta värdet ''{2}'', vilket inte är konsekvent med värdet ''{3}'' för den fasta effektiva värdebegränsningen för matchande attributanvändning i bastypen. - derivation-ok-restriction.2.2.a = derivation-ok-restriction.2.2.a: Ett fel inträffade för typ ''{0}''. Attributanvändning ''{1}'' i denna typ har inte någon matchande attributanvändning i basen och bastypen saknar jokerteckenattribut. - derivation-ok-restriction.2.2.b = derivation-ok-restriction.2.2.b: Ett fel inträffade för typ ''{0}''. Attributanvändning ''{1}'' i denna typ har inte någon matchande attributanvändning i basen och namnrymden ''{2}'' i denna attributanvändning tillåts inte av jokertecknet i bastypen. - derivation-ok-restriction.3 = derivation-ok-restriction.3: Ett fel inträffade för typ ''{0}''. Attributanvändning ''{1}'' i bastypen har REQUIRED angivet som true, men det finns ingen matchande attributanvändning i härledd typ. - derivation-ok-restriction.4.1 = derivation-ok-restriction.4.1: Ett fel inträffade för typen ''{0}''. Härledningen har ett attributjokertecken, men motsvarande i basen saknas. - derivation-ok-restriction.4.2 = derivation-ok-restriction.4.2: Ett fel inträffade för typen ''{0}''. Jokertecknet i härledningen är inte någon giltig jokerteckendel som motsvarar det i basen. - derivation-ok-restriction.4.3 = derivation-ok-restriction.4.3: Ett fel inträffade för typ ''{0}''. Processinnehållet för jokertecken i härledning ({1}) är svagare än det i basen ({2}). - derivation-ok-restriction.5.2.2.1 = derivation-ok-restriction.5.2.2.1: Ett fel inträffade för typ ''{0}''. Den enkla innehållstypen för denna typ, ''{1}'', är inte någon giltig begränsning av den enkla innehållstypen för basen, ''{2}''. - derivation-ok-restriction.5.3.2 = derivation-ok-restriction.5.3.2: Ett fel inträffade för typ ''{0}''. Innehållstypen för denna typ är tom, men innehållstypen för basen, ''{1}'', är inte tom eller tömningsbar. - derivation-ok-restriction.5.4.1.2 = derivation-ok-restriction.5.4.1.2: Ett fel inträffade för typ ''{0}''. Innehållstypen för denna typ är blandad, medan innehållstypen för basen, ''{1}'', inte är det. - derivation-ok-restriction.5.4.2 = derivation-ok-restriction.5.4.2: Ett fel inträffade för typ ''{0}''. Typpartikeln är inte någon giltig begränsning för partikeln i basen. - enumeration-required-notation = enumeration-required-notation: NOTATION-typ, ''{0}'' används av {2} ''{1}'', måste anges med uppräkningsaspektvärde som specificerar de notationselement som används av denna typ. - enumeration-valid-restriction = enumeration-valid-restriction: Uppräkningsvärdet ''{0}'' finns inte i bastypens, {1}, värdeutrymme. - e-props-correct.2 = e-props-correct.2: Ogiltigt värde för begränsningsvärde ''{1}'' i elementet ''{0}''. - e-props-correct.4 = e-props-correct.4: '{'Typdefinition'}' för elementet ''{0}'' har en ogiltig härledning från '{'typdefinitionen'}' för substitutionHead ''{1}'' eller så tillåts inte denna härledning av egenskapen ''{1}'' för '{'ersättningsgruppexkluderingar'}'. - e-props-correct.5 = e-props-correct.5: En '{'värdebegränsning'}' får inte finnas med i elementet ''{0}'' eftersom elementets '{'typdefinition'}' eller '{'typdefinitionens'}' '{'innehållstyp'}' är ID, eller härleds från ID. - e-props-correct.6 = e-props-correct.6: Cirkulär ersättningsgrupp identifierades för elementet ''{0}''. - fractionDigits-valid-restriction = fractionDigits-valid-restriction: I definitionen för {2} är värdet ''{0}'' för ''fractionDigits'' ogiltigt eftersom det måste vara mindre än eller lika med värdet för ''fractionDigits'' som har angetts som ''{1}'' i någon typ för överordnad. - fractionDigits-totalDigits = fractionDigits-totalDigits: I definitionen av {2} är värdet ''{0}'' för ''fractionDigits'' ogiltigt eftersom värdet måste vara mindre än eller lika med värdet för ''totalDigits'' som är ''{1}''. - length-minLength-maxLength.1.1 = length-minLength-maxLength.1.1: Vid användning av typ {0} är det fel om längdvärdet ''{1}'' är mindre än värdet för minLength ''{2}''. - length-minLength-maxLength.1.2.a = length-minLength-maxLength.1.2.a: Vid användning av typ {0} är det fel om basen inte har en minLength-aspekt när aktuell begränsning har minLength-aspekt och aktuell begränsning eller bas har angetts med längdaspekt. - length-minLength-maxLength.1.2.b = length-minLength-maxLength.1.2.b: Vid användning av typ {0} är det fel om aktuell minLength ''{1}'' inte är lika med basen minLength ''{2}''. - length-minLength-maxLength.2.1 = length-minLength-maxLength.2.1: Vid användning av typ {0} är det fel om längdvärdet ''{1}'' är större än värdet för maxLength ''{2}''. - length-minLength-maxLength.2.2.a = length-minLength-maxLength.2.2.a: Vid användning av typ {0} är det fel om basen inte har en maxLength-aspekt när aktuell begränsning har maxLength-aspekt och aktuell begränsning eller bas har angetts med längdaspekt. - length-minLength-maxLength.2.2.b = length-minLength-maxLength.2.2.b: Vid användning av typ {0} är det fel om aktuell maxLength ''{1}'' inte är lika med basen maxLength ''{2}''. - length-valid-restriction = length-valid-restriction: Ett fel inträffade för typ ''{2}''. Längdvärdet ''{0}'' måste vara lika med värdet för bastyp ''{1}''. - maxExclusive-valid-restriction.1 = maxExclusive-valid-restriction.1: Ett fel inträffade för typ ''{2}''. maxExclusive-värdet ''{0}'' måste vara mindre än eller lika med maxExclusive i bastyp ''{1}''. - maxExclusive-valid-restriction.2 = maxExclusive-valid-restriction.2: Ett fel inträffade för typ ''{2}''. maxExclusive-värdet ''{0}'' måste vara mindre än eller lika med maxInclusive i bastyp ''{1}''. - maxExclusive-valid-restriction.3 = maxExclusive-valid-restriction.3: Ett fel inträffade för typ ''{2}''. maxExclusive-värdet ''{0}'' måste vara större än minInclusive i bastyp ''{1}''. - maxExclusive-valid-restriction.4 = maxExclusive-valid-restriction.4: Ett fel inträffade för typ ''{2}''. maxExclusive-värdet ''{0}'' måste vara större än minExclusive i bastyp ''{1}''. - maxInclusive-maxExclusive = maxInclusive-maxExclusive: Det är fel om både maxInclusive och maxExclusive anges för samma datatyp. I {2} är maxInclusive ''{0}'' och maxExclusive ''{1}''. - maxInclusive-valid-restriction.1 = maxInclusive-valid-restriction.1: Ett fel inträffade för typ ''{2}''. maxInclusive-värdet ''{0}'' måste vara mindre än eller lika med maxInclusive i bastyp ''{1}''. - maxInclusive-valid-restriction.2 = maxInclusive-valid-restriction.2: Ett fel inträffade för typ ''{2}''. maxInclusive-värdet ''{0}'' måste vara mindre än maxExclusive i bastyp ''{1}''. - maxInclusive-valid-restriction.3 = maxInclusive-valid-restriction.3: Ett fel inträffade för typ ''{2}''. maxInclusive-värdet ''{0}'' måste vara större än eller lika med minInclusive i bastyp ''{1}''. - maxInclusive-valid-restriction.4 = maxInclusive-valid-restriction.4: Ett fel inträffade för typ ''{2}''. maxInclusive-värdet ''{0}'' måste vara större än minExclusive i bastyp ''{1}''. - maxLength-valid-restriction = maxLength-valid-restriction: I definitionen för {2} måste maxLength-värdet ''{0}'' vara mindre än eller lika med värdet i bastyp ''{1}''. - mg-props-correct.2 = mg-props-correct.2: Cirkulära definitioner identifierades för gruppen ''{0}''. Rekursivt efterföljande värdena för '{'term'}' i partiklarna leder till en partikel vars '{'term'}' är den ursprungliga gruppen. - minExclusive-less-than-equal-to-maxExclusive = minExclusive-less-than-equal-to-maxExclusive: I definitionen för {2} måste minExclusive-värdet ''{0}'' vara mindre än eller lika med maxExclusive-värdet ''{1}''. - minExclusive-less-than-maxInclusive = minExclusive-less-than-maxInclusive: I definitionen för {2} måste minExclusive-värdet ''{0}'' vara mindre än maxInclusive-värdet ''{1}''. - minExclusive-valid-restriction.1 = minExclusive-valid-restriction.1: Ett fel inträffade för typ ''{2}''. minExclusive-värdet ''{0}'' måste vara större än eller lika med minExclusive i bastyp ''{1}''. - minExclusive-valid-restriction.2 = minExclusive-valid-restriction.2: Ett fel inträffade för typ ''{2}''. minExclusive-värdet ''{0}'' måste vara mindre än eller lika med maxInclusive i bastyp ''{1}''. - minExclusive-valid-restriction.3 = minExclusive-valid-restriction.3: Ett fel inträffade för typ ''{2}''. minExclusive-värdet ''{0}'' måste vara större än eller lika med minInclusive i bastyp ''{1}''. - minExclusive-valid-restriction.4 = minExclusive-valid-restriction.4: Ett fel inträffade för typ ''{2}''. minExclusive-värdet ''{0}'' måste vara mindre än maxExclusive i bastyp ''{1}''. - minInclusive-less-than-equal-to-maxInclusive = minInclusive-less-than-equal-to-maxInclusive: I definitionen för {2} måste minInclusive-värdet ''{0}'' vara mindre än eller lika med maxInclusive-värdet ''{1}''. - minInclusive-less-than-maxExclusive = minInclusive-less-than-maxExclusive: I definitionen för {2} måste minInclusive-värdet ''{0}'' vara mindre än maxExclusive-värdet ''{1}''. - minInclusive-minExclusive = minInclusive-minExclusive: Det är fel om både minInclusive och minExclusive anges för samma datatyp. I {2} är minInclusive ''{0}'' och minExclusive ''{1}''. - minInclusive-valid-restriction.1 = minInclusive-valid-restriction.1: Ett fel inträffade för typ ''{2}''. minInclusive-värdet ''{0}'' måste vara större än eller lika med minInclusive i bastyp ''{1}''. - minInclusive-valid-restriction.2 = minInclusive-valid-restriction.2: Ett fel inträffade för typ ''{2}''. minInclusive-värdet ''{0}'' måste vara mindre än eller lika med maxInclusive i bastyp ''{1}''. - minInclusive-valid-restriction.3 = minInclusive-valid-restriction.3: Ett fel inträffade för typ ''{2}''. minInclusive-värdet ''{0}'' måste vara större än minExclusive i bastyp ''{1}''. - minInclusive-valid-restriction.4 = minInclusive-valid-restriction.4: Ett fel inträffade för typ ''{2}''. minInclusive-värdet ''{0}'' måste vara mindre än maxExclusive i bastyp ''{1}''. - minLength-less-than-equal-to-maxLength = minLength-less-than-equal-to-maxLength: I definitionen för {2} måste minLength-värdet ''{0}'' vara mindre än maxLength-värdet ''{1}''. - minLength-valid-restriction = minLength-valid-restriction: I definitionen för {2} måste minLength-värdet ''{0}'' vara större än eller lika med värdet i bastyp ''{1}''. - no-xmlns = no-xmlns: Ett {namn} på en attributdeklaration får inte matcha 'xmlns'. - no-xsi = no-xsi: En '{'målnamnrymd'}' i en attributdeklaration får inte matcha ''{0}''. - p-props-correct.2.1 = p-props-correct.2.1: I deklarationen ''{0}'' är värdet för ''minOccurs'' ''{1}'', men det får inte vara större än värdet för ''maxOccurs'' (som är ''{2}''). - rcase-MapAndSum.1 = rcase-MapAndSum.1: Det finns ingen fullständigt fungerande mappning mellan partiklarna. - rcase-MapAndSum.2 = rcase-MapAndSum.2: Gruppens förekomstintervall ({0},{1}) är inte någon giltig begränsning för basgruppens förekomstintervall, ({2},{3}). - rcase-NameAndTypeOK.1 = rcase-NameAndTypeOK.1: Element har namn och målnamnrymder som inte är desamma: Elementet ''{0}'' i namnrymd ''{1}'' och elementet ''{2}'' i namnrymd ''{3}''. - rcase-NameAndTypeOK.2 = rcase-NameAndTypeOK.2: Ett fel inträffade för partikeln vars '{'term'}' är elementdeklarationen ''{0}''. Elementdeklarationens värde som är '{'nullbart'}' har angetts som true, men motsvarande partikel i bastypen har en elementdeklaration vars värde som är '{'nullbart'}' har angetts som false. - rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: Ett fel inträffade för partikeln vars '{'term'}' är elementdeklarationen ''{0}''. Förekomstintervallet, ({1},{2}), är inte någon giltig begränsning för intervallet, ({3},{4}, i motsvarande partikel i bastypen. - rcase-NameAndTypeOK.4.a = rcase-NameAndTypeOK.4.a: Elementet ''{0}'' har inte något fast värde, men motsvarande element i bastypen har angetts med det fasta värdet ''{1}''. - rcase-NameAndTypeOK.4.b = rcase-NameAndTypeOK.4.b: Elementet ''{0}'' har det fasta värdet ''{1}'', men motsvarande element i bastypen har angetts med det fasta värdet ''{2}''. - rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5: Identitetsbegränsningarna för elementet ''{0}'' är inte någon del av de som finns i basen. - rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6: De avaktiverade ersättningarna för elementet ''{0}'' är inte inneslutna i basen. - rcase-NameAndTypeOK.7 = rcase-NameAndTypeOK.7: Elementtyp ''{0}'', ''{1}'' härleds inte från typ av baselement, ''{2}''. - rcase-NSCompat.1 = rcase-NSCompat.1: Elementet ''{0}'' har namnrymden ''{1}'' som inte är tillåtet av jokertecknet i basen. - rcase-NSCompat.2 = rcase-NSCompat.2: Ett fel inträffade för partikeln vars '{'term'}' är elementdeklarationen ''{0}''. Förekomstintervallet, ({1},{2}), är inte någon giltig begränsning för intervallet, ({3},{4}, i motsvarande partikel i bastypen. - rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1: Det finns ingen fullständigt fungerande mappning mellan partiklarna. - rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2: Gruppens förekomstintervall ({0},{1}) är inte någon giltig begränsning för basjokertecknets intervall, ({2},{3}). - rcase-NSSubset.1 = rcase-NSSubset.1: Jokertecknet är inte någon del av motsvarande jokertecken i basen. - rcase-NSSubset.2 = rcase-NSSubset.2: Jokertecknets förekomstintervall ({0},{1}), är inte någon giltig begränsning som motsvarar den i basen, ({2},{3}),. - rcase-NSSubset.3 = rcase-NSSubset.3: Jokertecknets processinnehåll, ''{0}'', är svagare än det i basen, ''{1}''. - rcase-Recurse.1 = rcase-Recurse.1: Gruppens förekomstintervall ({0},{1}) är inte någon giltig begränsning för basgruppens förekomstintervall, ({2},{3}). - rcase-Recurse.2 = rcase-Recurse.2: Det finns ingen fullständigt fungerande mappning mellan partiklarna. - rcase-RecurseLax.1 = rcase-RecurseLax.1: Gruppens förekomstintervall ({0},{1}) är inte någon giltig begränsning för basgruppens förekomstintervall, ({2},{3}). - rcase-RecurseLax.2 = rcase-RecurseLax.2: Det finns ingen fullständigt fungerande mappning mellan partiklarna. - rcase-RecurseUnordered.1 = rcase-RecurseUnordered.1: Gruppens förekomstintervall ({0},{1}) är inte någon giltig begränsning för basgruppens förekomstintervall, ({2},{3}). - rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: Det finns ingen fullständigt fungerande mappning mellan partiklarna. -# We're using sch-props-correct.2 instead of the old src-redefine.1 -# src-redefine.1 = src-redefine.1: The component ''{0}'' is begin redefined, but its corresponding component isn't in the schema document being redefined (with namespace ''{2}''), but in a different document, with namespace ''{1}''. - sch-props-correct.2 = sch-props-correct.2: Ett schema får inte innehålla två globala komponenter med samma namn. Detta schema har två förekomster av ''{0}''. - st-props-correct.2 = st-props-correct.2: Cirkulära definitioner har identifierats för enkel typ ''{0}''. Detta innebär att ''{0}'' ingår i sin egen typhierarki, vilket är fel. - st-props-correct.3 = st-props-correct.3: Ett fel inträffade för typ ''{0}''. Värdet för '{'slutgiltigt'}' i '{'bastypdefinitionen'}', ''{1}'', förbjuder härledning med begränsning. - totalDigits-valid-restriction = totalDigits-valid-restriction: I definitionen för {2} är värdet ''{0}'' för ''totalDigits'' ogiltigt eftersom det måste vara mindre än eller lika med värdet för ''totalDigits'' som har angetts som ''{1}'' i någon typ för överordnad. - whiteSpace-valid-restriction.1 = whiteSpace-valid-restriction.1: I definitionen för {0} är värdet ''{1}'' för ''whitespace'' ogiltigt, eftersom värdet för ''whitespace'' har angetts som ''collapse'' i någon typ för överordnad. - whiteSpace-valid-restriction.2 = whiteSpace-valid-restriction.2: I definitionen för {0} är värdet ''preserve'' för ''whitespace'' ogiltigt, eftersom värdet för ''whitespace'' har angetts som ''replace'' i någon typ för överordnad. - -#schema for Schemas - - s4s-att-invalid-value = s4s-att-invalid-value: Attributvärdet för ''{1}'' i elementet ''{0}'' är ogiltigt. Registrerad orsak: {2} - s4s-att-must-appear = s4s-att-must-appear: Attributet ''{1}'' måste anges i elementet ''{0}''. - s4s-att-not-allowed = s4s-att-not-allowed: Attributet ''{1}'' får inte anges i elementet ''{0}''. - s4s-elt-invalid = s4s-elt-invalid: Elementet ''{0}'' är inte något giltigt element i schemadokument. - s4s-elt-must-match.1 = s4s-elt-must-match.1: Innehållet i ''{0}'' måste matcha {1}. Ett problem hittades med början från: {2}. - s4s-elt-must-match.2 = s4s-elt-must-match.2: Innehållet i ''{0}'' måste matcha {1}. Hittade inte tillräckligt med element. - # the "invalid-content" messages provide less information than the "must-match" counterparts above. They're used for complex types when providing a "match" would be an information dump - s4s-elt-invalid-content.1 = s4s-elt-invalid-content.1: Innehållet i ''{0}'' är ogiltigt. Elementet ''{1}'' är ogiltigt, felplacerat eller har för många förekomster. - s4s-elt-invalid-content.2 = s4s-elt-invalid-content.2: Innehållet i ''{0}'' är ogiltigt. Elementet ''{1}'' måste anges. - s4s-elt-invalid-content.3 = s4s-elt-invalid-content.3: Element av typ ''{0}'' kan inte anges efter deklarationer som under underordnade i element. - s4s-elt-schema-ns = s4s-elt-schema-ns: Namnrymden i elementet ''{0}'' måste komma från schemats namnrymd, ''http://www.w3.org/2001/XMLSchema''. - s4s-elt-character = s4s-elt-character: Tecken som inte är blanktecken tillåts inte i andra schemaelement än ''xs:appinfo'' och ''xs:documentation''. Upptäckte ''{0}''. - -# codes not defined by the spec - - c-fields-xpaths = c-fields-xpaths: Fältvärdet = ''{0}'' är ogiltigt. - c-general-xpath = c-general-xpath: Uttrycket ''{0}'' är ogiltigt med den XPath-delmängd som stöds i XML-schema. - c-general-xpath-ns = c-general-xpath-ns: Ett namnrymdsprefix i XPath-uttrycket ''{0}'' var inte bundet till någon namnrymd. - c-selector-xpath = c-selector-xpath: Väljarvärdet ''{0}'' är ogiltigt; xpath för väljare får inte innehålla attribut. - EmptyTargetNamespace = EmptyTargetNamespace: I schemadokumentet ''{0}'' får värdet för attributet ''targetNamespace'' inte vara en tom sträng. - FacetValueFromBase = FacetValueFromBase: I deklarationen av typ ''{0}'' måste värdet ''{1}'' för aspekt ''{2}'' komma från värdeutrymmet i bastypen ''{3}''. - FixedFacetValue = FixedFacetValue: I definitionen för {3} är värdet ''{1}'' för aspekten ''{0}'' ogiltigt eftersom värdet för ''{0}'' har angetts som ''{2}'' i någon av typerna för överordnade samtidigt som '{'fast'}' = true. - InvalidRegex = InvalidRegex: Mönstervärdet ''{0}'' är inte något giltigt reguljärt uttryck. Det rapporterade felet är: ''{1}'' i kolumn ''{2}''. - MaxOccurLimit = Den aktuella konfigurationen för parsern tillåter inte att attributvärdet för Occurs anges som större än värdet {0}. - PublicSystemOnNotation = PublicSystemOnNotation: Åtminstone ett av ''public'' och ''system'' måste anges i elementets ''notation''. - SchemaLocation = SchemaLocation: schemaLocation-värdet ''{0}'' måste anges med ett jämnt antal URI:er. - TargetNamespace.1 = TargetNamespace.1: Förväntade namnrymden ''{0}'', men målnamnrymden för schemadokumentet är ''{1}''. - TargetNamespace.2 = TargetNamespace.2: Förväntade inte någon namnrymd, men schemadokumentet har angetts med målnamnrymden ''{1}''. - UndeclaredEntity = UndeclaredEntity: Enhet ''{0}'' har inte deklarerats. - UndeclaredPrefix = UndeclaredPrefix: Kan inte matcha ''{0}'' som QName: prefixet ''{1}'' har inte deklarerats. - - -# JAXP 1.2 schema source property errors - - jaxp12-schema-source-type.1 = Egenskapen ''http://java.sun.com/xml/jaxp/properties/schemaSource'' kan inte ha ett värde av typen {0}''. Möjliga typer av värden som stöds är String, File, InputStream och InputSource, och en uppställning av de här typerna. - jaxp12-schema-source-type.2 = Egenskapen ''http://java.sun.com/xml/jaxp/properties/schemaSource'' kan inte ha ett uppställningsvärde av typen {0}''. Möjliga typer av uppställningar som stöds är Object, String, File, InputStream och InputSource. - jaxp12-schema-source-ns = När du använder en uppställning med objekt som värde för egenskapen 'http://java.sun.com/xml/jaxp/properties/schemaSource' är det inte tillåtet att ha två scheman med samma målnamnrymd. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties deleted file mode 100644 index 8064ab7f32f..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties +++ /dev/null @@ -1,328 +0,0 @@ -# -# Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file contains error and warning messages related to XML Schema -# The messages are arranged in key and value tuples in a ListResourceBundle. - - BadMessageKey = 找不到對應訊息索引鍵的錯誤訊息。 - FormatFailed = 格式化下列訊息時發生內部錯誤:\n - -# For internal use - - Internal-Error = 內部錯誤: {0}。 - dt-whitespace = 聯集 simpleType ''{0}'' 沒有可用的空格 Facet 值 - GrammarConflict = 從使用者文法集區中傳回的一個文法與其他文法衝突。 - -# Identity constraints - - AbsentKeyValue = cvc-identity-constraint.4.2.1.a: 元素 "{0}" 沒有金鑰 "{1}" 的值。 - DuplicateField = 範圍中的欄位 "{0}" 重複配對。 - DuplicateKey = cvc-identity-constraint.4.2.2: 替元素 "{1}" 的識別限制條件 "{2}" 宣告了重複的金鑰值 [{0}]。 - DuplicateUnique = cvc-identity-constraint.4.1: 替元素 "{1}" 的識別限制條件 "{2}" 宣告了重複的唯一值 [{0}]。 - FieldMultipleMatch = cvc-identity-constraint.3: 識別限制條件 "{1}" 的欄位 "{0}" 符合其選取器範圍內的多個值; 欄位必須符合唯一值。 - FixedDiffersFromActual = 此元素的內容不等於綱要元素宣告中 "fixed" 屬性的值。 - KeyMatchesNillable = cvc-identity-constraint.4.2.3: 元素 "{0}" 的金鑰 "{1}" 符合 nillable 設為 true 的元素。 - KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: 未替針對元素 "{0}" 指定的 識別限制條件指定足夠的值。 - KeyNotFound = cvc-identity-constraint.4.3: 找不到元素 ''{2}'' 識別限制條件之值為 ''{1}'' 的金鑰 ''{0}''。 - KeyRefOutOfScope = 識別限制條件錯誤: 識別限制條件 "{0}" 具有一個 keyref,它參照了範圍之外的金鑰或唯一值。 - KeyRefReferNotFound = 金鑰參照宣告 "{0}" 參照了名稱為 "{1}" 的不明金鑰。 - UnknownField = 內部識別限制條件錯誤; 替元素 "{1}" 指定了識別限制條件 "{2}" 的不明欄位 "{0}"。 - -# Ideally, we should only use the following error keys, not the ones under -# "Identity constraints". And we should cover all of the following errors. - -#validation (3.X.4) - - cvc-attribute.3 = cvc-attribute.3: 元素 ''{0}'' 上屬性 ''{1}'' 的值 ''{2}'' 對於其類型 ''{3}'' 無效。 - cvc-attribute.4 = cvc-attribute.4: 元素 ''{0}'' 上屬性 ''{1}'' 的值 ''{2}'' 對於其固定 '{'value constraint'}' 無效。屬性必須具有 ''{3}'' 的值。 - cvc-complex-type.2.1 = cvc-complex-type.2.1: 元素 ''{0}'' 不能有字元或元素資訊項目 [children],因為類型的內容類型為空白。 - cvc-complex-type.2.2 = cvc-complex-type.2.2: 元素 ''{0}'' 不能有元素 [children],且值必須有效。 - cvc-complex-type.2.3 = cvc-complex-type.2.3: 元素 ''{0}'' 不能有字元 [children],因為類型的內容類型為 element-only。 - cvc-complex-type.2.4.a = cvc-complex-type.2.4.a: 從元素 ''{0}'' 開始找到無效的內容。預期一個 ''{1}''。 - cvc-complex-type.2.4.b = cvc-complex-type.2.4.b: 元素 ''{0}'' 的內容不完整。預期一個 ''{1}''。 - cvc-complex-type.2.4.c = cvc-complex-type.2.4.c: 嚴格比對萬用字元,但是找不到元素 ''{0}'' 的宣告。 - cvc-complex-type.2.4.d = cvc-complex-type.2.4.d: 從元素 ''{0}'' 開始找到無效的內容。此處未預期子項元素。 - cvc-complex-type.2.4.d.1 = cvc-complex-type.2.4.d: 從元素 ''{0}'' 開始找到無效的內容。此處未預期子項元素 ''{1}''。 - cvc-complex-type.2.4.e = cvc-complex-type.2.4.e: ''{0}'' 在目前的序列中最多可以出現 ''{2}'' 次。已超過此限制。此處預期要有 ''{1}'' 其中之一。 - cvc-complex-type.2.4.f = cvc-complex-type.2.4.f: ''{0}'' 在目前的序列中最多可以出現 ''{1}'' 次。已超過此限制。此處不應有子項元素。 - cvc-complex-type.2.4.g = cvc-complex-type.2.4.g: 發現以元素 ''{0}'' 為開頭的無效內容。''{1}'' 在目前的序列中應該最少要出現 ''{2}'' 次。還需要再出現一次才能滿足此限制條件。 - cvc-complex-type.2.4.h = cvc-complex-type.2.4.h: 發現以元素 ''{0}'' 為開頭的無效內容。''{1}'' 在目前的序列中應該最少要出現 ''{2}'' 次。還需要再出現 ''{3}'' 次才能滿足此限制條件。 - cvc-complex-type.2.4.i = cvc-complex-type.2.4.i: 元素 ''{0}'' 的內容不完整。''{1}'' 應該最少要出現 ''{2}'' 次。還需要再出現一次才能滿足此限制條件。 - cvc-complex-type.2.4.j = cvc-complex-type.2.4.j: 元素 ''{0}'' 的內容不完整。''{1}'' 應該最少要出現 ''{2}'' 次。還需要再出現 ''{3}'' 次才能滿足此限制條件。 - cvc-complex-type.3.1 = cvc-complex-type.3.1: 元素 ''{0}'' 屬性 ''{1}'' 的值 ''{2}'' 對於屬性使用無效。屬性 ''{1}'' 具有 ''{3}'' 的固定值。 - cvc-complex-type.3.2.1 = cvc-complex-type.3.2.1: 元素 ''{0}'' 沒有屬性 ''{1}'' 的屬性萬用字元。 - cvc-complex-type.3.2.2 = cvc-complex-type.3.2.2: 不允許屬性 ''{1}'' 出現在元素 ''{0}'' 中。 - cvc-complex-type.4 = cvc-complex-type.4: 屬性 ''{1}'' 必須出現在元素 ''{0}'' 中。 - cvc-complex-type.5.1 = cvc-complex-type.5.1: 在元素 ''{0}'' 中,屬性 ''{1}'' 為 Wild ID。但是已經有一個 Wild ID ''{2}''。只能有一個 Wild ID。 - cvc-complex-type.5.2 = cvc-complex-type.5.2: 在元素 ''{0}'' 中,屬性 ''{1}'' 為 Wild ID。但是已經有一個從 '{'attribute uses'}' 中的 ID 衍生而來的屬性 ''{2}''。 - cvc-datatype-valid.1.2.1 = cvc-datatype-valid.1.2.1: ''{0}'' 不是 ''{1}'' 的有效值。 - cvc-datatype-valid.1.2.2 = cvc-datatype-valid.1.2.2: ''{0}'' 不是清單類型 ''{1}'' 的有效值。 - cvc-datatype-valid.1.2.3 = cvc-datatype-valid.1.2.3: ''{0}'' 不是聯集類型 ''{1}'' 的有效值。 - cvc-elt.1.a = cvc-elt.1.a: 找不到元素 ''{0}'' 的宣告。 - cvc-elt.1.b = cvc-elt.1.b: 元素的名稱不符合元素宣告的名稱。發現的是 ''{0}''。預期應為 ''{1}''。 - cvc-elt.2 = cvc-elt.2: ''{0}'' 元素宣告中 '{'abstract'}' 的值必須為偽。 - cvc-elt.3.1 = cvc-elt.3.1: 屬性 ''{1}'' 不可出現在元素 ''{0}'' 中,因為 ''{0}'' 的 '{'nillable'}' 屬性為偽。 - cvc-elt.3.2.1 = cvc-elt.3.2.1: 元素 ''{0}'' 不可有字元或元素資訊 [children],因為指定了 ''{1}''。 - cvc-elt.3.2.2 = cvc-elt.3.2.2: 元素 ''{0}'' 不可有固定的 '{'value constraint'}',因為指定了 ''{1}''。 - cvc-elt.4.1 = cvc-elt.4.1: 元素 ''{0}'' 屬性 ''{1}'' 的值 ''{2}'' 不是有效的 QName。 - cvc-elt.4.2 = cvc-elt.4.2: 無法將 ''{1}'' 解析為元素 ''{0}'' 的類型定義。 - cvc-elt.4.3 = cvc-elt.4.3: 類型 ''{1}'' 不是有效衍生自元素 ''{0}'' 的類型定義 ''{2}''。 - cvc-elt.5.1.1 = cvc-elt.5.1.1: 元素 ''{0}'' 的 '{'value constraint'}' ''{2}'' 不是類型 ''{1}'' 的有效預設值。 - cvc-elt.5.2.2.1 = cvc-elt.5.2.2.1: 元素 ''{0}'' 不可有元素資訊項目 [children]。 - cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1: 元素 ''{0}'' 的值 ''{1}'' 不符合固定 '{'value constraint'}' 值 ''{2}''。 - cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2: 元素 ''{0}'' 的值 ''{1}'' 不符合 '{'value constraint'}' 值 ''{2}''。 - cvc-enumeration-valid = cvc-enumeration-valid: 值 ''{0}'' 對於列舉 ''{1}'' 而言並非 facet-valid。它必須是來自列舉的值。 - cvc-fractionDigits-valid = cvc-fractionDigits-valid: 值 ''{0}'' 具有 {1} 分數位數,但是分數位數的數目限制為 {2}。 - cvc-id.1 = cvc-id.1: IDREF ''{0}'' 沒有 ID/IDREF 連結。 - cvc-id.2 = cvc-id.2: 有多個 ID 值 ''{0}''。 - cvc-id.3 = cvc-id.3: 識別限制條件 ''{0}'' 的欄位符合元素 ''{1}'',但是此元素沒有簡單類型。 - cvc-length-valid = cvc-length-valid: 長度 = ''{1}'' 的值 ''{0}'' 對於類型 ''{3}'' 長度 ''{2}'' 而言並非 facet-valid。 - cvc-maxExclusive-valid = cvc-maxExclusive-valid: 值 ''{0}'' 對於類型 ''{2}'' maxExclusive ''{1}'' 而言並非 facet-valid。 - cvc-maxInclusive-valid = cvc-maxInclusive-valid: 值 ''{0}'' 對於類型 ''{2}'' maxInclusive ''{1}'' 而言並非 facet-valid。 - cvc-maxLength-valid = cvc-maxLength-valid: 長度 = ''{1}'' 的值 ''{0}'' 對於類型 ''{3}'' maxLength ''{2}'' 而言並非 facet-valid。 - cvc-minExclusive-valid = cvc-minExclusive-valid: 值 ''{0}'' 對於類型 ''{2}'' minExclusive ''{1}'' 而言並非 facet-valid。 - cvc-minInclusive-valid = cvc-minInclusive-valid: 值 ''{0}'' 對於類型 ''{2}'' minInclusive ''{1}'' 而言並非 facet-valid。 - cvc-minLength-valid = cvc-minLength-valid: 長度 = ''{1}'' 的值 ''{0}'' 對於類型 ''{3}'' minLength ''{2}'' 而言並非 facet-valid。 - cvc-pattern-valid = cvc-pattern-valid: 值 ''{0}'' 對於類型 ''{2}'' 樣式 ''{1}'' 而言並非 facet-valid。 - cvc-totalDigits-valid = cvc-totalDigits-valid: 值 ''{0}'' 具有 {1} 總位數,但是總位數的數目限制為 {2}。 - cvc-type.1 = cvc-type.1: 找不到類型定義 ''{0}''。 - cvc-type.2 = cvc-type.2: 元素 {0} 的類型定義不可為抽象。 - cvc-type.3.1.1 = cvc-type.3.1.1: 元素 ''{0}'' 為簡單類型,因此不能有屬性,但不包括命名空間名稱等於 ''http://www.w3.org/2001/XMLSchema-instance'' 與 [local name] 為 ''type''、''nil''、''schemaLocation'' 或 ''noNamespaceSchemaLocation'' 其中之一者。不過,找到屬性 ''{1}''。 - cvc-type.3.1.2 = cvc-type.3.1.2: 元素 ''{0}'' 為簡單類型,因此不可有元素資訊項目 [children]。 - cvc-type.3.1.3 = cvc-type.3.1.3: 元素 ''{0}'' 的值 ''{1}'' 無效。 - -#schema valid (3.X.3) - - schema_reference.access = schema_reference: 無法讀取綱要文件 ''{0}'',因為 accessExternalSchema 屬性設定的限制,所以不允許 ''{1}'' 存取。 - schema_reference.4 = schema_reference.4: 無法讀取綱要文件 ''{0}'',因為 1) 找不到文件; 2) 無法讀取文件; 3) 文件的根元素不是 。 - src-annotation = src-annotation: 元素僅能包含 元素,但找到 ''{0}''。 - src-attribute.1 = src-attribute.1: 屬性 ''default'' 與 ''fixed'' 不可同時出現在屬性宣告 ''{0}'' 中。請只使用其中一個。 - src-attribute.2 = src-attribute.2: : 屬性 ''default'' 出現在屬性 ''{0}'' 中,因此 ''use'' 的值必須是 ''optional''。 - src-attribute.3.1 = src-attribute.3.1: 'ref' 或 'name' 其中之一必須出現在區域屬性宣告中。 - src-attribute.3.2 = src-attribute.3.2: 內容必須符合 (annotation?) 屬性參照 ''{0}''。 - src-attribute.4 = src-attribute.4: 屬性 ''{0}'' 同時具有 ''type'' 屬性與匿名 ''simpleType'' 子項。屬性僅允許其中之一。 - src-attribute_group.2 = src-attribute_group.2: 萬用字元的交集對於屬性群組 ''{0}'' 無法表示。 - src-attribute_group.3 = src-attribute_group.3: 屬性群組 ''{0}'' 偵測到循環定義。遞迴使用屬性群組參照將會回到本身。 - src-ct.1 = src-ct.1: 類型 ''{0}'' 的複雜類型定義表示錯誤。當使用 時,基礎類型必須為 complexType。''{1}'' 為 simpleType。 - src-ct.2.1 = src-ct.2.1: 類型 ''{0}'' 的複雜類型定義表示錯誤。使用 時,基礎類型必須為 complexType,但其內容類型為簡單; 或者指定限制時,其內容為混合內容與可空白物件的複雜類型; 或者指定擴充套件時,其內容為簡單類型。''{1}'' 不符合這些條件。 - src-ct.2.2 = src-ct.2.2: 類型 ''{0}'' 的複雜類型定義表示錯誤。當具有 simpleContent 的 complexType 限制具有混合內容的 complexType 與可空白物件時,在 的子項當中必須有一個 。 - src-ct.4 = src-ct.4: 類型 ''{0}'' 的複雜類型定義表示錯誤。萬用字元的交集無法表示。 - src-ct.5 = src-ct.5: 類型 ''{0}'' 的複雜類型定義表示錯誤。萬用字元的聯集無法表示。 - src-element.1 = src-element.1: 屬性 ''default'' 與 ''fixed'' 不可同時出現在元素宣告 ''{0}'' 中。請只使用其中一個。 - src-element.2.1 = src-element.2.1: : 'ref' 或 'name' 其中之一必須出現在區域元素宣告中。 - src-element.2.2 = src-element.2.2: 由於 ''{0}'' 包含 ''ref'' 屬性,其內容必須符合 (annotation?)。不過,找到 ''{1}''。 - src-element.3 = src-element.3: 元素 ''{0}'' 同時具有 ''type'' 屬性與 ''anonymous type'' 子項。元素僅允許其中之一。 - src-import.1.1 = src-import.1.1: 元素資訊項目的命名空間屬性 ''{0}'' 不可與它所存在綱要的 targetNamespace 相同。 - src-import.1.2 = src-import.1.2: 若命名空間屬性未出現在 元素資訊項目上,則包含的綱要必須有 targetNamespace。 - src-import.2 = src-import.2: 文件 ''{0}'' 的根元素必須具有命名空間名稱 ''http://www.w3.org/2001/XMLSchema'' 與區域名稱 ''schema''。 - src-import.3.1 = src-import.3.1: 元素資訊項目的命名空間屬性 ''{0}'' 必須等於匯入文件的 targetNamespace 屬性 ''{1}''。 - src-import.3.2 = src-import.3.2: 找到沒有命名空間屬性的 元素資訊項目,因此,匯入的文件不能具有 targetNamespace 屬性。不過,在匯入的文件中找到 targetNamespace ''{1}''。 - src-include.1 = src-include.1: 文件 ''{0}'' 的根元素必須具有命名空間名稱 ''http://www.w3.org/2001/XMLSchema'' 與區域名稱 ''schema''。 - src-include.2.1 = src-include.2.1: 參照綱要的 targetNamespace (目前為 ''{1}'') 必須等於包含綱要的 targetNamespace (目前為 ''{0}'')。 - src-redefine.2 = src-redefine.2: 文件 ''{0}'' 的根元素必須具有命名空間名稱 ''http://www.w3.org/2001/XMLSchema'' 與區域名稱 ''schema''。 - src-redefine.3.1 = src-redefine.3.1: 參照綱要的 targetNamespace (目前為 ''{1}'') 必須等於重新定義綱要的 targetNamespace (目前為 ''{0}'')。 - src-redefine.5.a.a = src-redefine.5.a.a: 找不到 非註解子項。 元素的 子項必須具有 子系與參照本身的 'base' 屬性。 - src-redefine.5.a.b = src-redefine.5.a.b: ''{0}'' 不是有效子項元素。 元素的 子項必須具有 子系與參照本身的 ''base'' 屬性。 - src-redefine.5.a.c = src-redefine.5.a.c: ''{0}'' 沒有參照重新定義元素 (''{1}'') 的 ''base'' 屬性。 元素的 子項必須具有 子系與參照本身的 ''base'' 屬性。 - src-redefine.5.b.a = src-redefine.5.b.a: 找不到 的非註解子項。 元素的 子項必須具有 子系與參照本身的 'base' 屬性。 - src-redefine.5.b.b = src-redefine.5.b.b: 找不到 的非註解孫系。 元素的 子項必須具有 子系與參照本身的 'base' 屬性。 - src-redefine.5.b.c = src-redefine.5.b.c: ''{0}'' 不是有效孫系元素。 元素的 子項必須具有 子系與參照本身的 ''base'' 屬性。 - src-redefine.5.b.d = src-redefine.5.b.d: ''{0}'' 沒有參照重新定義元素 (''{1}'') 的 ''base'' 屬性。 元素的 子項必須具有 子系與參照本身的 ''base'' 屬性。 - src-redefine.6.1.1 = src-redefine.6.1.1: 若 元素的群組子項包含參照本身的群組,它必須剛好只有 1 個; 此項有 ''{0}'' 個。 - src-redefine.6.1.2 = src-redefine.6.1.2: 包含重新定義群組參照的群組 ''{0}'' 必須具有 ''minOccurs'' = ''maxOccurs'' = 1。 - src-redefine.6.2.1 = src-redefine.6.2.1: 重新定義綱要中沒有群組具有符合 ''{0}'' 的名稱。 - src-redefine.6.2.2 = src-redefine.6.2.2: 群組 ''{0}'' 未適當限制它重新定義的群組; 違反限制條件: ''{1}''。 - src-redefine.7.1 = src-redefine.7.1: 若 元素的 attributeGroup 子項包含參照本身的 attributeGroup,它必須剛好只有 1 個; 此項有 ''{0}'' 個。 - src-redefine.7.2.1 = src-redefine.7.2.1: 重新定義綱要中沒有 attributeGroup 具有符合 ''{0}'' 的名稱。 - src-redefine.7.2.2 = src-redefine.7.2.2: AttributeGroup ''{0}'' 未適當限制它重新定義的 AttributeGroup; 違反限制條件: ''{1}''。 - src-resolve = src-resolve: 無法將名稱 ''{0}'' 解析為 ''{1}'' 元件。 - src-resolve.4.1 = src-resolve.4.1: 解析元件 ''{2}'' 時發生錯誤。偵測到 ''{2}'' 沒有命名空間,但是,從綱要文件 ''{0}'' 無法參照沒有目標命名空間的元件。若要讓 ''{2}'' 具有命名空間,可考慮提供前置碼。若不要讓 ''{2}'' 具有命名空間,則應將沒有 "namespace" 屬性的 ''import'' 新增至 ''{0}''。 - src-resolve.4.2 = src-resolve.4.2: 解析元件 ''{2}'' 時發生錯誤。偵測到 ''{2}'' 位於命名空間 ''{1}'' 中,但是,從綱要文件 ''{0}'' 無法參照此命名空間的元件。若此為不正確的命名空間,可考慮變更 ''{2}'' 的前置碼。若此為正確的命名空間,則應將適當的 ''import'' 標記新增至 ''{0}''。 - src-simple-type.2.a = src-simple-type.2.a: 找到 元素,在其 [children] 中同時有基礎 [attribute] 與 元素。僅允許其中一項。 - src-simple-type.2.b = src-simple-type.2.b: 找到 元素,在其 [children] 中沒有基礎 [attribute],也沒有 元素。需要其中一項。 - src-simple-type.3.a = src-simple-type.3.a: 找到 元素,在其 [children] 中同時有 itemType [attribute] 與 元素。僅允許其中一項。 - src-simple-type.3.b = src-simple-type.3.b: 找到 元素,在其 [children] 中沒有 itemType [attribute],也沒有 元素。需要其中一項。 - src-single-facet-value = src-single-facet-value: 定義 facet ''{0}'' 超過一次以上。 - src-union-memberTypes-or-simpleTypes = src-union-memberTypes-or-simpleTypes: 元素在其 [children] 中,必須具有非空白 memberTypes [attribute] 或至少一個 元素。 - -#constraint valid (3.X.6) - - ag-props-correct.2 = ag-props-correct.2: 屬性群組 ''{0}'' 的錯誤。重複屬性使用相同名稱且指定了目標命名空間。重複屬性使用的名稱為 ''{1}''。 - ag-props-correct.3 = ag-props-correct.3: 屬性群組 ''{0}'' 的錯誤。兩個屬性宣告 ''{1}'' 與 ''{2}'' 具有衍生自 ID 的類型。 - a-props-correct.2 = a-props-correct.2: 屬性 ''{0}'' 中的值限制條件值 ''{1}'' 無效。 - a-props-correct.3 = a-props-correct.3: 屬性 ''{0}'' 無法使用 ''fixed'' 或 ''default'',因為屬性的 '{'type definition'}' 為 ID,或衍生自 ID。 - au-props-correct.2 = au-props-correct.2: 在 ''{0}'' 的屬性宣告中,指定了 ''{1}'' 的固定值。因此,若參照 ''{0}'' 的屬性使用也具有 '{'value constraint'}',它必須是固定值且值必須為 ''{1}''。 - cos-all-limited.1.2 = cos-all-limited.1.2: 'all' 模型群組必須出現在 '{'min occurs'}' = '{'max occurs'}' = 1 的物件中,且該物件必須是一對組成複雜類型定義之 '{'content type'}' 物件中的一部分。 - cos-all-limited.2 = cos-all-limited.2: ''all'' 模型群組中元素的 '{'max occurs'}' 必須是 0 或 1。元素 ''{1}'' 的值 ''{0}'' 無效。 - cos-applicable-facets = cos-applicable-facets: 類型 {1} 不允許 Facet ''{0}''。 - cos-ct-extends.1.1 = cos-ct-extends.1.1: 類型 ''{0}'' 是由擴充套件從類型 ''{1}'' 衍生。不過,''{1}'' 的 ''final'' 屬性禁止由擴充套件衍生。 - cos-ct-extends.1.4.3.2.2.1.a = cos-ct-extends.1.4.3.2.2.1.a: 衍生類型與其基礎的內容類型皆必須是混合類型或兩者皆是 element-only。類型 ''{0}'' 是 element-only,但其基礎類型則否。 - cos-ct-extends.1.4.3.2.2.1.b = cos-ct-extends.1.4.3.2.2.1.b: 衍生類型與其基礎的內容類型皆必須是混合類型或兩者皆是 element-only。類型 ''{0}'' 為混合類型,但其基礎類型則否。 - cos-element-consistent = cos-element-consistent: 類型 ''{0}'' 的錯誤。在模型群組中出現名稱 ''{1}''、不同類型的多個元素。 - cos-list-of-atomic = cos-list-of-atomic: 清單類型 ''{0}'' 的定義中,類型 ''{1}'' 是無效的清單元素類型,因為它不是單元類型 (''{1}'' 為清單類型,或包含清單的聯集類型)。 - cos-nonambig = cos-nonambig: {0} 與 {1} (或來自其替代群組的元素) 違反「唯一物件屬性」。依此綱要驗證期間,為這兩個物件建立了不確定性。 - cos-particle-restrict.a = cos-particle-restrict.a: 衍生物件為空白,則基礎物件不可為空白。 - cos-particle-restrict.b = cos-particle-restrict.b: 基礎物件為空白,但是衍生物件則否。 - cos-particle-restrict.2 = cos-particle-restrict.2: 禁止的物件限制: ''{0}''。 - cos-st-restricts.1.1 = cos-st-restricts.1.1: 類型 ''{1}'' 為單元類型,因此其 '{'base type definition'}' (''{0}'') 必須是單元簡單類型定義或內建的原始資料類型。 - cos-st-restricts.2.1 = cos-st-restricts.2.1: 清單類型 ''{0}'' 的定義中,類型 ''{1}'' 是無效的項目類型,因為它是清單類型,或包含清單的聯集類型。 - cos-st-restricts.2.3.1.1 = cos-st-restricts.2.3.1.1: '{'item type definition'}' 的 '{'final'}' 元件 ''{0}'' 包含 ''list''。這代表 ''{0}'' 無法作為清單類型 ''{1}'' 的項目類型。 - cos-st-restricts.3.3.1.1 = cos-st-restricts.3.3.1.1: '{'member type definitions'}' 的 '{'final'}' 元件 ''{0}'' 包含 ''union''。這代表 ''{0}'' 無法作為聯集類型 ''{1}'' 的成員類型。 - cos-valid-default.2.1 = cos-valid-default.2.1: 元素 ''{0}'' 具有值限制條件,且必須具有混合或簡單內容模型。 - cos-valid-default.2.2.2 = cos-valid-default.2.2.2: 由於元素 ''{0}'' 具有 '{'value constraint'}' 且其類型定義具有混合的 '{'content type'}',因此 '{'content type'}' 的物件必須是可空白。 - c-props-correct.2 = c-props-correct.2: keyref ''{0}'' 與 key ''{1}'' 的 Fields 基數彼此必須相符。 - ct-props-correct.3 = ct-props-correct.3: 偵測到複雜類型 ''{0}'' 的循環定義。這代表 ''{0}'' 包含在自身類型階層中,這是一項錯誤。 - ct-props-correct.4 = ct-props-correct.4: 類型 ''{0}'' 的錯誤。重複屬性使用相同名稱且指定了目標命名空間。重複屬性使用的名稱為 ''{1}''。 - ct-props-correct.5 = ct-props-correct.5: 類型 ''{0}'' 的錯誤。兩個屬性宣告 ''{1}'' 與 ''{2}'' 具有衍生自 ID 的類型。 - derivation-ok-restriction.1 = derivation-ok-restriction.1: 類型 ''{0}'' 由限制從類型 ''{1}'' 衍生。不過,''{1}'' 具有 '{'final'}' 屬性,禁止由限制衍生。 - derivation-ok-restriction.2.1.1 = derivation-ok-restriction.2.1.1: 類型 ''{0}'' 的錯誤。此類型中使用 ''{1}'' 的屬性具有 ''use'' 值的 ''{2}'',這與基礎類型中使用符合屬性的 ''required'' 值不一致。 - derivation-ok-restriction.2.1.2 = derivation-ok-restriction.2.1.2: 類型 ''{0}'' 的錯誤。此類型中使用 ''{1}'' 的屬性具有類型 ''{2}'',這不是有效衍生自 ''{3}'',亦即基礎類型中使用符合屬性的類型。 - derivation-ok-restriction.2.1.3.a = derivation-ok-restriction.2.1.3.a: 類型 ''{0}'' 的錯誤。此類型中使用 ''{1}'' 的屬性具有未固定的有效值限制條件,而基礎類型中使用的符合屬性有效值限制條件為固定式。 - derivation-ok-restriction.2.1.3.b = derivation-ok-restriction.2.1.3.b: 類型 ''{0}'' 的錯誤。此類型中使用 ''{1}'' 的屬性具有 ''{2}'' 固定值的有效值限制條件,這與基礎類型中使用符合屬性的固定有效值限制條件 ''{3}'' 的值不一致。 - derivation-ok-restriction.2.2.a = derivation-ok-restriction.2.2.a: 類型 ''{0}'' 的錯誤。此類型中使用 ''{1}'' 的屬性在基礎類型中沒有使用符合的屬性,且基礎類型沒有萬用字元屬性。 - derivation-ok-restriction.2.2.b = derivation-ok-restriction.2.2.b: 類型 ''{0}'' 的錯誤。此類型中使用 ''{1}'' 的屬性在基礎類型中沒有使用符合的屬性,且基礎類型中的萬用字元不允許使用此屬性的命名空間 ''{2}''。 - derivation-ok-restriction.3 = derivation-ok-restriction.3: 類型 ''{0}'' 的錯誤。基礎類型中使用 ''{1}'' 的屬性 REQUIRED 為真,但是衍生類型中沒有使用符合的屬性。 - derivation-ok-restriction.4.1 = derivation-ok-restriction.4.1: 類型 ''{0}'' 的錯誤。衍生具有屬性萬用字元,但是基礎則否。 - derivation-ok-restriction.4.2 = derivation-ok-restriction.4.2: 類型 ''{0}'' 的錯誤。衍生中的萬用字元不是基礎中有效的萬用字元子集。 - derivation-ok-restriction.4.3 = derivation-ok-restriction.4.3: 類型 ''{0}'' 的錯誤。衍生 ({1}) 中萬用字元的處理作業內容比基礎 ({2}) 中的處理作業內容弱。 - derivation-ok-restriction.5.2.2.1 = derivation-ok-restriction.5.2.2.1: 類型 ''{0}'' 的錯誤。此類型的簡單內容類型 ''{1}'' 不是基礎的簡單內容類型 (''{2}'') 的有效限制。 - derivation-ok-restriction.5.3.2 = derivation-ok-restriction.5.3.2: 類型 ''{0}'' 的錯誤。此類型的內容類型為空白,但是基礎的內容類型 ''{1}'' 不是空白或不可為空白。 - derivation-ok-restriction.5.4.1.2 = derivation-ok-restriction.5.4.1.2: 類型 ''{0}'' 的錯誤。此類型的內容類型為混合類型,但是基礎的內容類型 ''{1}'' 則否。 - derivation-ok-restriction.5.4.2 = derivation-ok-restriction.5.4.2: 類型 ''{0}'' 的錯誤。類型的物件不是基礎物件的有效限制。 - enumeration-required-notation = enumeration-required-notation: 由 {2} ''{1}'' 使用的 NOTATION 類型 ''{0}'',必須具有列舉 facet 值,以指定此類型使用的表示法元素。 - enumeration-valid-restriction = enumeration-valid-restriction: 列舉值 ''{0}'' 不在基礎類型 {1} 的值空間中。 - e-props-correct.2 = e-props-correct.2: 元素 ''{0}'' 中的值限制條件值 ''{1}'' 無效。 - e-props-correct.4 = e-props-correct.4: 元素 ''{0}'' 的 '{'type definition'}' 不是有效衍生自 substitutionHead ''{1}'' 的 '{'type definition'}',或是 ''{1}'' 的 '{'substitution group exclusions'}' 屬性不允許此衍生。 - e-props-correct.5 = e-props-correct.5: '{'value constraint'}' 不可出現在元素 ''{0}'' 上,因為元素的 '{'type definition'}' 或 '{'type definition'}' 的 '{'content type'}' 為 ID,或衍生自 ID。 - e-props-correct.6 = e-props-correct.6: 偵測到 ''{0}'' 的循環替代群組。 - fractionDigits-valid-restriction = fractionDigits-valid-restriction: 在 {2} 的定義中,facet ''fractionDigits'' 的值 ''{0}'' 無效,因為它必須小於或等於 ''fractionDigits'' 的值,此值以其中一個祖系類型設為 ''{1}''。 - fractionDigits-totalDigits = fractionDigits-totalDigits: 在 {2} 的定義中,facet ''fractionDigits'' 的值 ''{0}'' 無效,因為值必須小於或等於 ''totalDigits'' 的值,亦即 ''{1}''。 - length-minLength-maxLength.1.1 = length-minLength-maxLength.1.1: 針對類型 {0},length ''{1}'' 的值小於 minLength ''{2}'' 的值是一項錯誤。 - length-minLength-maxLength.1.2.a = length-minLength-maxLength.1.2.a: 針對類型 {0},若目前限制具有 minLength facet 且目前的限制或基礎具有 length facet,則基礎沒有 minLength facet 是一項錯誤。 - length-minLength-maxLength.1.2.b = length-minLength-maxLength.1.2.b: 針對類型 {0},目前的 minLength ''{1}'' 不等於基礎 minLength ''{2}'' 是一項錯誤。 - length-minLength-maxLength.2.1 = length-minLength-maxLength.2.1: 針對類型 {0},length ''{1}'' 的值大於 maxLength ''{2}'' 的值是一項錯誤。 - length-minLength-maxLength.2.2.a = length-minLength-maxLength.2.2.a: 針對類型 {0},若目前的限制具有 maxLength facet,且目前的限制或基礎具有 length facet,則基礎沒有 maxLength facet 是一項錯誤。 - length-minLength-maxLength.2.2.b = length-minLength-maxLength.2.2.b: 針對類型 {0},目前的 maxLength ''{1}'' 不等於基礎 maxLength ''{2}'' 是一項錯誤。 - length-valid-restriction = length-valid-restriction: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 length 值必須等於基礎類型 ''{1}'' 的 length 值。 - maxExclusive-valid-restriction.1 = maxExclusive-valid-restriction.1: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 maxExclusive 值必須小於或等於基礎類型 ''{1}'' 的 maxExclusive。 - maxExclusive-valid-restriction.2 = maxExclusive-valid-restriction.2: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 maxExclusive 值必須小於或等於基礎類型 ''{1}'' 的 maxInclusive。 - maxExclusive-valid-restriction.3 = maxExclusive-valid-restriction.3: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 maxExclusive 值必須大於基礎類型 ''{1}'' 的 minInclusive。 - maxExclusive-valid-restriction.4 = maxExclusive-valid-restriction.4: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 maxExclusive 值必須大於基礎類型 ''{1}'' 的 minExclusive。 - maxInclusive-maxExclusive = maxInclusive-maxExclusive: 為相同資料類型同時指定 maxInclusive 與 maxExclusive 是一項錯誤。在 {2} 中,maxInclusive 等於 ''{0}'' 且 maxExclusive 等於 ''{1}''。 - maxInclusive-valid-restriction.1 = maxInclusive-valid-restriction.1: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 maxInclusive 值必須小於或等於基礎類型 ''{1}'' 的 maxInclusive。 - maxInclusive-valid-restriction.2 = maxInclusive-valid-restriction.2: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 maxInclusive 值必須小於基礎類型 ''{1}'' 的 maxExclusive。 - maxInclusive-valid-restriction.3 = maxInclusive-valid-restriction.3: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 maxInclusive 值必須大於或等於基礎類型 ''{1}'' 的 minInclusive。 - maxInclusive-valid-restriction.4 = maxInclusive-valid-restriction.4: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 maxInclusive 值必須大於基礎類型 ''{1}'' 的 minExclusive。 - maxLength-valid-restriction = maxLength-valid-restriction: 在 {2} 的定義中,等於 ''{0}'' 的 maxLength 值必須小於或等於基礎類型 ''{1}'' 的 maxLength 值。 - mg-props-correct.2 = mg-props-correct.2: 偵測到群組 ''{0}'' 的循環定義。遞迴使用物件的 '{'term'}' 值將導至其 '{'term'}' 為群組本身的物件。 - minExclusive-less-than-equal-to-maxExclusive = minExclusive-less-than-equal-to-maxExclusive: 在 {2} 的定義中,等於 ''{0}'' 的 minExclusive 值必須小於或等於 maxExclusive 值 (等於 ''{1}'')。 - minExclusive-less-than-maxInclusive = minExclusive-less-than-maxInclusive: 在 {2} 的定義中,等於 ''{0}'' 的 minExclusive 值必須小於 maxInclusive 值 (等於 ''{1}'')。 - minExclusive-valid-restriction.1 = minExclusive-valid-restriction.1: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 minExclusive 值必須大於或等於基礎類型 ''{1}'' 的 minExclusive。 - minExclusive-valid-restriction.2 = minExclusive-valid-restriction.2: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 minExclusive 值必須小於或等於基礎類型 ''{1}'' 的 maxInclusive。 - minExclusive-valid-restriction.3 = minExclusive-valid-restriction.3: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 minExclusive 值必須大於或等於基礎類型 ''{1}'' 的 minInclusive。 - minExclusive-valid-restriction.4 = minExclusive-valid-restriction.4: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 minExclusive 值必須小於基礎類型 ''{1}'' 的 maxExclusive。 - minInclusive-less-than-equal-to-maxInclusive = minInclusive-less-than-equal-to-maxInclusive: 在 {2} 的定義中,等於 ''{0}'' 的 minInclusive 值必須小於或等於 maxInclusive 值 (等於 ''{1}'')。 - minInclusive-less-than-maxExclusive = minInclusive-less-than-maxExclusive: 在 {2} 的定義中,等於 ''{0}'' 的 minInclusive 值必須小於 maxExclusive 值 (等於 ''{1}'')。 - minInclusive-minExclusive = minInclusive-minExclusive: 為相同資料類型同時指定 minInclusive 與 minExclusive 是一項錯誤。在 {2} minInclusive 等於 ''{0}'' 且 minExclusive 等於 ''{1}''。 - minInclusive-valid-restriction.1 = minInclusive-valid-restriction.1: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 minInclusive 值必須大於或等於基礎類型 ''{1}'' 的 minInclusive。 - minInclusive-valid-restriction.2 = minInclusive-valid-restriction.2: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 minInclusive 值必須小於或等於基礎類型 ''{1}'' 的 maxInclusive。 - minInclusive-valid-restriction.3 = minInclusive-valid-restriction.3: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 minInclusive 值必須大於基礎類型 ''{1}'' 的 minExclusive。 - minInclusive-valid-restriction.4 = minInclusive-valid-restriction.4: 類型 ''{2}'' 的錯誤。等於 ''{0}'' 的 minInclusive 值必須小於基礎類型 ''{1}'' 的 maxExclusive。 - minLength-less-than-equal-to-maxLength = minLength-less-than-equal-to-maxLength: 在 {2} 的定義中,等於 ''{0}'' 的 minLength 值必須小於 maxLength 值 (等於 ''{1}'')。 - minLength-valid-restriction = minLength-valid-restriction: 在 {2} 的定義中,等於 ''{0}'' 的 minLength 必須大於或等於基礎類型 ''{1}'' 的 minLength。 - no-xmlns = no-xmlns: 屬性宣告的 {name} 不能與 'xmlns' 相同。 - no-xsi = no-xsi: 屬性宣告的 '{'target namespace'}' 不能與 ''{0}'' 相同。 - p-props-correct.2.1 = p-props-correct.2.1: 在 ''{0}'' 的宣告中,''minOccurs'' 的值為 ''{1}'',但是它不可大於 ''maxOccurs'' 的值 ''{2}''。 - rcase-MapAndSum.1 = rcase-MapAndSum.1: 物件之間沒有完整的功能對應。 - rcase-MapAndSum.2 = rcase-MapAndSum.2: 群組的發生範圍 ({0},{1}) 不是基礎群組發生範圍 ({2},{3}) 的有效限制。 - rcase-NameAndTypeOK.1 = rcase-NameAndTypeOK.1: 元素具有不相同的名稱與目標命名空間: 命名空間 ''{1}'' 中的元素 ''{0}'' 與命名空間 ''{3}'' 中的元素 ''{2}''。 - rcase-NameAndTypeOK.2 = rcase-NameAndTypeOK.2: 物件的 '{'term'}' 為元素宣告 ''{0}'' 的錯誤。元素宣告的 '{'nillable'}' 為真,但是基礎類型中的對應物件具有 '{'nillable'}' 為偽的元素宣告。 - rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: 物件的 '{'term'}' 為元素宣告 ''{0}'' 的錯誤。它的發生範圍 ({1},{2}) 不是基礎類型中對應物件範圍 ({3},{4}) 的有效限制。 - rcase-NameAndTypeOK.4.a = rcase-NameAndTypeOK.4.a: 元素 ''{0}'' 非固定式,但是基礎類型中對應的元素具有固定值 ''{1}''。 - rcase-NameAndTypeOK.4.b = rcase-NameAndTypeOK.4.b: 元素 ''{0}'' 具有固定值 ''{1}'',但是基礎類型中對應的元素具有固定值 ''{2}''。 - rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5: 元素 ''{0}'' 的識別限制條件不是基礎中的子集。 - rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6: 元素 ''{0}'' 不允許的替代不是基礎中的超集。 - rcase-NameAndTypeOK.7 = rcase-NameAndTypeOK.7: 元素 ''{0}'' 的類型 ''{1}'' 不是衍生自基礎元素 ''{2}'' 的類型。 - rcase-NSCompat.1 = rcase-NSCompat.1: 元素 ''{0}'' 具有基礎中萬用字元不允許的命名空間 ''{1}''。 - rcase-NSCompat.2 = rcase-NSCompat.2: 物件的 '{'term'}' 為元素宣告 ''{0}'' 的錯誤。它的發生範圍 ({1},{2}) 不是基礎類型中對應物件範圍 ({3},{4}) 的有效限制。 - rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1: 物件之間沒有完整的功能對應。 - rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2: 群組的發生範圍 ({0},{1}) 不是基礎萬用字元範圍 ({2},{3}) 的有效限制。 - rcase-NSSubset.1 = rcase-NSSubset.1: 萬用字元不是基礎中對應萬用字元的子集。 - rcase-NSSubset.2 = rcase-NSSubset.2: 萬用字元的發生範圍 ({0},{1}) 不是基礎萬用字元範圍 ({2},{3}) 的有效限制。 - rcase-NSSubset.3 = rcase-NSSubset.3: 萬用字元的處理作業內容 ''{0}'' 比基礎 ''{1}'' 中的處理作業內容弱。 - rcase-Recurse.1 = rcase-Recurse.1: 群組的發生範圍 ({0},{1}) 不是基礎群組發生範圍 ({2},{3}) 的有效限制。 - rcase-Recurse.2 = rcase-Recurse.2: 物件之間沒有完整的功能對應。 - rcase-RecurseLax.1 = rcase-RecurseLax.1: 群組的發生範圍 ({0},{1}) 不是基礎群組發生範圍 ({2},{3}) 的有效限制。 - rcase-RecurseLax.2 = rcase-RecurseLax.2: 物件之間沒有完整的功能對應。 - rcase-RecurseUnordered.1 = rcase-RecurseUnordered.1: 群組的發生範圍 ({0},{1}) 不是基礎群組發生範圍 ({2},{3}) 的有效限制。 - rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: 物件之間沒有完整的功能對應。 -# We're using sch-props-correct.2 instead of the old src-redefine.1 -# src-redefine.1 = src-redefine.1: The component ''{0}'' is begin redefined, but its corresponding component isn't in the schema document being redefined (with namespace ''{2}''), but in a different document, with namespace ''{1}''. - sch-props-correct.2 = sch-props-correct.2: 綱要無法包含相同名稱的兩個全域元件; 此綱要包含兩個 ''{0}''。 - st-props-correct.2 = st-props-correct.2: 偵測到簡單類型 ''{0}'' 的循環定義。這代表 ''{0}'' 包含在自身類型階層中,這是一項錯誤。 - st-props-correct.3 = st-props-correct.3: 類型 ''{0}'' 的錯誤。'{'base type definition'}' 的 '{'final'}' 值 ''{1}'' 限制禁止衍生。 - totalDigits-valid-restriction = totalDigits-valid-restriction: 在 {2} 的定義中,facet ''totalDigits'' 的值 ''{0}'' 無效,因為它必須小於或等於 ''totalDigits'' 的值,此值以其中一個祖系類型設為 ''{1}''。 - whiteSpace-valid-restriction.1 = whiteSpace-valid-restriction.1: 在 {0} 的定義中,facet ''whitespace'' 的值 ''{1}'' 無效,因為 ''whitespace'' 的值以其中一個祖系類型設為 ''collapse''。 - whiteSpace-valid-restriction.2 = whiteSpace-valid-restriction.2: 在 {0} 的定義中,facet ''whitespace'' 的值 ''preserve'' 無效,因為 ''whitespace'' 的值在其中一個祖系類型中設為 ''replace''。 - -#schema for Schemas - - s4s-att-invalid-value = s4s-att-invalid-value: 元素 ''{0}'' 中 ''{1}'' 的屬性值無效。記錄的原因: {2} - s4s-att-must-appear = s4s-att-must-appear: 屬性 ''{1}'' 必須出現在元素 ''{0}'' 中。 - s4s-att-not-allowed = s4s-att-not-allowed: 屬性 ''{1}'' 不可出現在元素 ''{0}'' 中。 - s4s-elt-invalid = s4s-elt-invalid: 元素 ''{0}'' 不是綱要文件中的有效元素。 - s4s-elt-must-match.1 = s4s-elt-must-match.1: ''{0}'' 的內容必須符合 {1}。從 {2} 開始出現問題。 - s4s-elt-must-match.2 = s4s-elt-must-match.2: ''{0}'' 的內容必須符合 {1}。找不到足夠的元素。 - # the "invalid-content" messages provide less information than the "must-match" counterparts above. They're used for complex types when providing a "match" would be an information dump - s4s-elt-invalid-content.1 = s4s-elt-invalid-content.1: ''{0}'' 的內容無效。元素 ''{1}'' 無效、位置錯誤或太常出現。 - s4s-elt-invalid-content.2 = s4s-elt-invalid-content.2: ''{0}'' 的內容無效。元素 ''{1}'' 不可空白。 - s4s-elt-invalid-content.3 = s4s-elt-invalid-content.3: 類型 ''{0}'' 的元素不可出現在宣告之後,作為 元素的子項。 - s4s-elt-schema-ns = s4s-elt-schema-ns: 元素 ''{0}'' 的命名空間必須來自綱要命名空間 ''http://www.w3.org/2001/XMLSchema''。 - s4s-elt-character = s4s-elt-character: 綱要元素中不允許非空白字元,但是 ''xs:appinfo'' 與 ''xs:documentation'' 除外。發現 ''{0}''。 - -# codes not defined by the spec - - c-fields-xpaths = c-fields-xpaths: 等於 ''{0}'' 的欄位值無效。 - c-general-xpath = c-general-xpath: 表示式 ''{0}'' 對於 XML 綱要支援的 XPath 子集而言無效。 - c-general-xpath-ns = c-general-xpath-ns: XPath 表示式 ''{0}'' 中的命名空間前置碼未連結命名空間。 - c-selector-xpath = c-selector-xpath: 等於 ''{0}'' 的選取器值無效; 選取器 xpaths 不能包含屬性。 - EmptyTargetNamespace = EmptyTargetNamespace: 在綱要文件 ''{0}'' 中,''targetNamespace'' 屬性的值不可為空白字串。 - FacetValueFromBase = FacetValueFromBase: 在類型 ''{0}'' 的宣告中,facet ''{2}'' 的值 ''{1}'' 必須來自基礎類型的值空間 ''{3}''。 - FixedFacetValue = FixedFacetValue: 在 {3} 的定義中,facet ''{0}'' 的值 ''{1}'' 無效,因為 ''{0}'' 的值以其中一個祖系類型設為 ''{2}'',且 '{'fixed'}' = true。 - InvalidRegex = InvalidRegex: 樣式值 ''{0}'' 不是有效的正規表示式。報告的錯誤: 位於資料欄 ''{2}'' 的 ''{1}''。 - MaxOccurLimit = 剖析器目前的組態不允許 maxOccurs 屬性值設為大於值 {0}。 - PublicSystemOnNotation = PublicSystemOnNotation: ''public'' 與 ''system'' 至少其中之一必須出現在元素 ''notation'' 中。 - SchemaLocation = 等於 ''{0}'' 的 SchemaLocation: schemaLocation 值必須具有偶數個 URI。 - TargetNamespace.1 = TargetNamespace.1: 預期命名空間 ''{0}'',但是綱要文件的目標命名空間為 ''{1}''。 - TargetNamespace.2 = TargetNamespace.2: 未預期命名空間,但是綱要文件具有目標命名空間 ''{1}''。 - UndeclaredEntity = UndeclaredEntity: 未宣告實體 ''{0}''。 - UndeclaredPrefix = UndeclaredPrefix: 無法解析 ''{0}'' 為 QName: 未宣告前置碼 ''{1}''。 - - -# JAXP 1.2 schema source property errors - - jaxp12-schema-source-type.1 = ''http://java.sun.com/xml/jaxp/properties/schemaSource'' 屬性的值不能是 ''{0}'' 類型。支援的值類型為 String、File、InputStream、InputSource 或這些類型的陣列。 - jaxp12-schema-source-type.2 = ''http://java.sun.com/xml/jaxp/properties/schemaSource'' 屬性的陣列值不能是 ''{0}'' 類型。支援的陣列類型為 Object、String、File、InputStream 以及 InputSource。 - jaxp12-schema-source-ns = 如果使用 Object 陣列作為 'http://java.sun.com/xml/jaxp/properties/schemaSource' 屬性的值,就不能有兩個共用相同目標命名空間的綱要。 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties deleted file mode 100644 index e7590e79f30..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores error messages for the Xerces XML -# serializer. Many DOM Load/Save error messages also -# live here, since the serializer largely implements that package. -# -# As usual with properties files, the messages are arranged in -# key/value tuples. - - BadMessageKey = No se ha encontrado el mensaje de error que corresponde a la clave de mensaje. - FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n - - ArgumentIsNull = El argumento ''{0}'' es nulo. - NoWriterSupplied = No se ha suministrado ningún escritor para el serializador. - MethodNotSupported = El método ''{0}'' no está soportado por esta fábrica. - ResetInMiddle = No puede reiniciarse el serializador en medio de la serialización. - Internal = Error interno: el estado del elemento es cero. - NoName = No hay ningún rawName y localName es nulo. - ElementQName = El nombre del elemento ''{0}'' no es un QName. - ElementPrefix = El elemento ''{0}'' no pertenece a ningún espacio de nombres: el prefijo puede ser no declarado o estar enlazado a algún espacio de nombres. - AttributeQName = El nombre del atributo ''{0}'' no es un QName. - AttributePrefix = El atributo ''{0}'' no pertenece a ningún espacio de nombres: el prefijo puede ser no declarado o estar enlazado a algún espacio de nombres. - InvalidNSDecl = La sintaxis de la declaración de espacio de nombres no es correcta: {0}. - EndingCDATA = La secuencia de caracteres "]]>" no debe aparecer en el contenido a menos que se utilice para marcar el final de una sección CDATA. - SplittingCDATA = División de una sección CDATA que contiene el marcador de terminación de sección CDATA "]]>". - ResourceNotFound = No se ha encontrado el recurso ''{0}''. - ResourceNotLoaded = No se ha podido cargar el recurso ''{0}''. {1} - SerializationStopped = La serialización se ha parado a petición del usuario. - - # DOM Level 3 load and save messages - no-output-specified = no-output-specified: El destino de salida en el que se debían escribir los datos era nulo. - unsupported-encoding = unsupported-encoding: Se ha encontrado una codificación no soportada. - unable-to-serialize-node = unable-to-serialize-node: El nodo no se ha podido serializar. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties deleted file mode 100644 index d3727970675..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores error messages for the Xerces XML -# serializer. Many DOM Load/Save error messages also -# live here, since the serializer largely implements that package. -# -# As usual with properties files, the messages are arranged in -# key/value tuples. - - BadMessageKey = Le message d'erreur correspondant à la clé de message est introuvable. - FormatFailed = Une erreur interne est survenue lors de la mise en forme du message suivant :\n - - ArgumentIsNull = L''argument ''{0}'' est NULL. - NoWriterSupplied = Aucun processus d'écriture n'est fourni pour le serializer. - MethodNotSupported = La méthode ''{0}'' n''est pas prise en charge par cette fabrique. - ResetInMiddle = Impossible de réinitialiser le serializer au cours de la sérialisation. - Internal = Erreur interne : l'état de l'élément est zéro. - NoName = Il n'existe aucun élément rawName et l'élément localName est NULL. - ElementQName = Le nom d''élément ''{0}'' n''est pas un QName. - ElementPrefix = L''élément ''{0}'' n''appartient à aucun espace de noms : le préfixe est peut-être non déclaré ou lié à un espace de noms. - AttributeQName = Le nom d''attribut ''{0}'' n''est pas un QName. - AttributePrefix = L''attribut ''{0}'' n''appartient à aucun espace de noms : le préfixe est peut-être non déclaré ou lié à un espace de noms. - InvalidNSDecl = La syntaxe de la déclaration d''espace de noms est incorrecte : {0}. - EndingCDATA = La séquence de caractères "]]>" ne peut figurer dans le contenu que pour marquer la fin de la section CDATA. - SplittingCDATA = Fractionnement d'une section CDATA contenant le marqueur de fin de section CDATA "]]>". - ResourceNotFound = La ressource ''{0}'' est introuvable. - ResourceNotLoaded = La ressource ''{0}'' n''a pas pu être chargée. {1} - SerializationStopped = La sérialisation a été arrêtée à la demande de l'utilisateur. - - # DOM Level 3 load and save messages - no-output-specified = pas de sortie indiquée : la destination de sortie dans laquelle écrire les données est NULL. - unsupported-encoding = encodage non pris en charge : un encodage non pris en charge a été détecté. - unable-to-serialize-node = impossible de sérialiser le noeud : le noeud n'a pas pu être sérialisé. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties deleted file mode 100644 index 0f22ef0c3dc..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores error messages for the Xerces XML -# serializer. Many DOM Load/Save error messages also -# live here, since the serializer largely implements that package. -# -# As usual with properties files, the messages are arranged in -# key/value tuples. - - BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. - FormatFailed = Si è verificato un errore interno durante la formattazione del seguente messaggio:\n - - ArgumentIsNull = L''argomento ''{0}'' è nullo. - NoWriterSupplied = Nessun processo di scrittura fornito per il serializzatore. - MethodNotSupported = Il metodo ''{0}'' non è supportato da questo factory. - ResetInMiddle = Impossibile reimpostare il serializzatore durante una serializzazione. - Internal = Errore interno: lo stato dell'elemento è zero. - NoName = Non esiste alcun rawName e localName è nullo. - ElementQName = Il nome elemento ''{0}'' non è un QName. - ElementPrefix = L''elemento ''{0}'' non appartiene ad alcuno spazio di nomi: il prefisso deve essere non dichiarato o associato a uno spazio di nomi. - AttributeQName = Il nome attributo ''{0}'' non è un QName. - AttributePrefix = L''attributo ''{0}'' non appartiene ad alcuno spazio di nomi: il prefisso deve essere non dichiarato o associato a uno spazio di nomi. - InvalidNSDecl = La sintassi della dichiarazione dello spazio di nomi è errata: {0}. - EndingCDATA = La sequenza di caratteri "]]>" non deve essere presente nel contenuto a meno che non sia utilizzata per contrassegnare la fine di una sezione CDATA. - SplittingCDATA = Verrà suddivisa una sezione CDATA che contiene l'indicatore di fine della sezione CDATA "]]>". - ResourceNotFound = Impossibile trovare la risorsa ''{0}''. - ResourceNotLoaded = Impossibile caricare la risorsa ''{0}''. {1} - SerializationStopped = Serializzazione arrestata su richiesta dell'utente. - - # DOM Level 3 load and save messages - no-output-specified = no-output-specified: la destinazione di output per i dati da scrivere è nulla. - unsupported-encoding = unsupported-encoding: è stata rilevata una codifica non supportata. - unable-to-serialize-node = unable-to-serialize-node: impossibile serializzare il nodo. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties deleted file mode 100644 index a8b342e510b..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores error messages for the Xerces XML -# serializer. Many DOM Load/Save error messages also -# live here, since the serializer largely implements that package. -# -# As usual with properties files, the messages are arranged in -# key/value tuples. - - BadMessageKey = 메시지 키에 해당하는 오류 메시지를 찾을 수 없습니다. - FormatFailed = 다음 메시지의 형식을 지정하는 중 내부 오류가 발생했습니다.\n - - ArgumentIsNull = ''{0}'' 인수가 널입니다. - NoWriterSupplied = Serializer에 대해 제공된 기록 장치가 없습니다. - MethodNotSupported = 이 팩토리는 ''{0}'' 메소드를 지원하지 않습니다. - ResetInMiddle = 직렬화 도중에는 Serializer를 재설정할 수 없습니다. - Internal = 내부 오류: 요소 상태가 0입니다. - NoName = rawName이 없으며 localName이 널입니다. - ElementQName = 요소 이름 ''{0}''은(는) QName이 아닙니다. - ElementPrefix = ''{0}'' 요소가 네임스페이스에 속하지 않음: 접두어의 선언을 해제하거나 접두어를 네임스페이스에 바인드할 수 있습니다. - AttributeQName = 속성 이름 ''{0}''은(는) QName이 아닙니다. - AttributePrefix = ''{0}'' 속성이 네임스페이스에 속하지 않음: 접두어의 선언을 해제하거나 접두어를 네임스페이스에 바인드할 수 있습니다. - InvalidNSDecl = 네임스페이스 선언 구문이 올바르지 않음: {0}. - EndingCDATA = 문자 시퀀스 "]]>"는 CDATA 섹션 끝을 표시하는 데 사용되지 않는 경우 콘텐츠에 나타나지 않아야 합니다. - SplittingCDATA = CDATA 섹션 종료 표시자 "]]>"를 포함하는 CDATA 섹션을 분할하는 중입니다. - ResourceNotFound = ''{0}'' 리소스를 찾을 수 없습니다. - ResourceNotLoaded = ''{0}'' 리소스를 로드할 수 없습니다. {1} - SerializationStopped = 사용자 요청에 따라 직렬화가 정지되었습니다. - - # DOM Level 3 load and save messages - no-output-specified = no-output-specified: 데이터를 쓸 출력 대상이 널입니다. - unsupported-encoding = unsupported-encoding: 지원되지 않는 인코딩이 발견되었습니다. - unable-to-serialize-node = unable-to-serialize-node: 노드를 직렬화할 수 없습니다. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties deleted file mode 100644 index 9049c758dec..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores error messages for the Xerces XML -# serializer. Many DOM Load/Save error messages also -# live here, since the serializer largely implements that package. -# -# As usual with properties files, the messages are arranged in -# key/value tuples. - - BadMessageKey = Não foi possível encontrar a mensagem de erro correspondente à chave da mensagem. - FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n - - ArgumentIsNull = O argumento ''{0}'' é nulo. - NoWriterSupplied = Nenhum gravador fornecido para o serializador. - MethodNotSupported = O método ''{0}'' não é suportado por este factory. - ResetInMiddle = O serializador não pode ser redefinido no meio da serialização. - Internal = Erro interno: o estado do elemento é zero. - NoName = Não há rawName e localName é nulo. - ElementQName = O nome do elemento ''{0}'' não é um QName. - ElementPrefix = O elemento ''{0}'' não pertence a nenhum namespace: o prefixo não pode ser não declarado ou vinculado a algum namespace. - AttributeQName = O nome do atributo ''{0}'' não é QName. - AttributePrefix = O atributo ''{0}'' não pertence a nenhum namespace: o prefixo não pode ser não declarado ou vinculado a algum namespace. - InvalidNSDecl = Sintaxe de declaração de namespace incorreta: {0}. - EndingCDATA = A sequência de caracteres "]]>" não deve aparecer no conteúdo, a menos que seja usada para marcar o fim de uma seção CDATA. - SplittingCDATA = Dividir uma seção CDATA que contém o marcador "]]>" de terminação de seção CDATA. - ResourceNotFound = Não foi possível encontrar o recurso ''{0}''. - ResourceNotLoaded = Não foi possível carregar o recurso ''{0}''. {1} - SerializationStopped = Serialização interrompida na solicitação do usuário. - - # DOM Level 3 load and save messages - no-output-specified = nenhuma saída especificada: O destino da saída dos dados a serem gravados era nulo. - unsupported-encoding = codificação não suportada: Uma codificação não suportada foi encontrada. - unable-to-serialize-node = não é possível serializar o nó: Não foi possível serializar o nó. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties deleted file mode 100644 index 688d45f5c7f..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores error messages for the Xerces XML -# serializer. Many DOM Load/Save error messages also -# live here, since the serializer largely implements that package. -# -# As usual with properties files, the messages are arranged in -# key/value tuples. - - BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. - FormatFailed = Ett internt fel inträffade vid formatering av följande meddelande:\n - - ArgumentIsNull = Argumentet ''{0}'' är null. - NoWriterSupplied = Det finns ingen skrivare för serializer. - MethodNotSupported = Metoden ''{0}'' stöds inte i denna fabriksinställning. - ResetInMiddle = Serializer kan inte återställas under pågående serialisering. - Internal = Internt fel: elementtillstånd är noll. - NoName = Det finns inget rawName och localName är null. - ElementQName = Elementnamnet ''{0}'' är inte något QName. - ElementPrefix = Elementet ''{0}'' tillhör inte någon namnrymd: prefixet kanske inte har deklarerats eller är bundet till annan namnrymd. - AttributeQName = Attributnamnet ''{0}'' är inte något QName. - AttributePrefix = Attributet ''{0}'' tillhör inte någon namnrymd: prefixet kanske inte har deklarerats eller är bundet till annan namnrymd. - InvalidNSDecl = Felaktig syntax i deklaration av namnrymd: {0}. - EndingCDATA = Teckensekvensen "]]>" får inte förekomma i innehållet, såvida det inte används för att markera slut av CDATA-sektion. - SplittingCDATA = Delar en CDATA-sektion som innehåller CDATA-sektionens avslutningsmarkör "]]>". - ResourceNotFound = Resursen ''{0}'' hittades inte. - ResourceNotLoaded = Resursen ''{0}'' kunde inte laddas. {1} - SerializationStopped = Serialiseringen stoppades vid användarbegäran. - - # DOM Level 3 load and save messages - no-output-specified = no-output-specified: Utdatadestinationen som data ska skrivas till är null. - unsupported-encoding = unsupported-encoding: En kodning som inte stöds påträffades. - unable-to-serialize-node = unable-to-serialize-node: Noden kunde inte serialiseras. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties deleted file mode 100644 index 0ecd76828f6..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores error messages for the Xerces XML -# serializer. Many DOM Load/Save error messages also -# live here, since the serializer largely implements that package. -# -# As usual with properties files, the messages are arranged in -# key/value tuples. - - BadMessageKey = 找不到對應訊息索引鍵的錯誤訊息。 - FormatFailed = 格式化下列訊息時發生內部錯誤:\n - - ArgumentIsNull = 引數 ''{0}'' 為空值。 - NoWriterSupplied = 未提供寫入器給序列化程式。 - MethodNotSupported = 此處理站不支援方法 ''{0}''。 - ResetInMiddle = 在序列化期間可能無法重設序列化程式。 - Internal = 內部錯誤: 元素狀態為零。 - NoName = 沒有 rawName 且 localName 為空值。 - ElementQName = 元素名稱 ''{0}'' 不是 QName。 - ElementPrefix = 元素 ''{0}'' 不屬於任何命名空間: 可能未宣告前置碼或前置碼連結其他命名空間。 - AttributeQName = 屬性名稱 ''{0}'' 不是 QName。 - AttributePrefix = 屬性 ''{0}'' 不屬於任何命名空間: 可能未宣告前置碼或前置碼連結其他命名空間。 - InvalidNSDecl = 命名空間宣告語法不正確: {0}。 - EndingCDATA = 字元順序 "]]>" 不可出現在內容中,除非用於標示 CDATA 段落的結尾。 - SplittingCDATA = 分割包含 CDATA 段落終止標記 "]]>" 的 CDATA 段落。 - ResourceNotFound = 找不到資源 ''{0}''。 - ResourceNotLoaded = 無法載入資源 ''{0}''。{1} - SerializationStopped = 依照使用者要求停止序列化。 - - # DOM Level 3 load and save messages - no-output-specified = no-output-specified: 要寫入資料的輸出目的地為空值。 - unsupported-encoding = unsupported-encoding: 出現不支援的編碼。 - unable-to-serialize-node = unable-to-serialize-node: 節點無法序列化。 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties deleted file mode 100644 index fa9b1ef35c8..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces XPointer implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = No se ha encontrado el mensaje de error que corresponde a la clave de mensaje. -FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n - -# XPointer Framework Error Messages -XPointerProcessingError = XPointerProcessingError: Se ha producido un error al procesar la expresión XPointer. -InvalidXPointerToken = InvalidXPointerToken: La expresión XPointer contiene el token no válido ''{0}'' -InvalidXPointerExpression = InvalidXPointerExpression: La expresión XPointer ''{0}'' no es válida. -MultipleShortHandPointers = MultipleShortHandPointers: La expresión XPointer ''{0}'' no es válida. Tiene más de un puntero abreviado. -SchemeDataNotFollowedByCloseParenthesis = SchemeDataNotFollowedByCloseParenthesis: La expresión XPointer ''{0}'' no es válida. SchemeData no viene seguido de un carácter '')''. -SchemeUnsupported = SchemeUnsupported: El esquema XPointer ''{0}'' no está soportado. -InvalidShortHandPointer = InvalidShortHandPointer: El valor de NCName del puntero abreviado ''{0}'' no es válido. -UnbalancedParenthesisInXPointerExpression = UnbalancedParenthesisInXPointerExpression: La expresión XPointer ''{0}'' no es válida. El número de paréntesis de apertura ''{1}'' no es igual al número de paréntesis de cierre ''{2}''. -InvalidSchemeDataInXPointer = InvalidSchemeDataInXPointer: La expresión XPointer ''{0}'' contiene un valor de SchemeData no válido. - -# XPointer Element Scheme Error Messages -InvalidElementSchemeToken = InvalidElementSchemeToken: La expresión XPointer del esquema de element() contiene el token no válido ''{0}'' -InvalidElementSchemeXPointer = InvalidElementSchemeXPointer: La expresión XPointer del esquema de elemento ''{0}'' no es válida. -XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: Se ha producido un error al procesar la expresión de esquema XPointer element(). -InvalidNCNameInElementSchemeData = InvalidNCNameInElementSchemeData: El esquema element() contiene un puntero abreviado ''{0}'' con un valor de NCName no válido. -InvalidChildSequenceCharacter = InvalidChildSequenceCharacter: El esquema element() contiene un carácter de secuencia secundaria no válido ''{0}''. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties deleted file mode 100644 index 5bbdc69480c..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces XPointer implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = Le message d'erreur correspondant à la clé de message est introuvable. -FormatFailed = Une erreur interne est survenue lors de la mise en forme du message suivant :\n - -# XPointer Framework Error Messages -XPointerProcessingError = XPointerProcessingError : une erreur est survenue lors du traitement de l'expression XPointer. -InvalidXPointerToken = InvalidXPointerToken : l''expression XPointer contient le jeton non valide ''{0}'' -InvalidXPointerExpression = InvalidXPointerExpression : l''expression XPointer ''{0}'' n''est pas valide. -MultipleShortHandPointers = MultipleShortHandPointers : l''expression XPointer ''{0}'' n''est pas valide. Elle contient plusieurs pointeurs ShortHand. -SchemeDataNotFollowedByCloseParenthesis = SchemeDataNotFollowedByCloseParenthesis : l''expression XPointer ''{0}'' n''est pas valide. L''élément SchemeData n''est pas suivi d''un caractère '')''. -SchemeUnsupported = SchemeUnsupported : le processus XPointer ''{0}'' n''est pas pris en charge. -InvalidShortHandPointer = InvalidShortHandPointer : le NCName du pointeur ShortHand ''{0}'' n''est pas valide. -UnbalancedParenthesisInXPointerExpression = UnbalancedParenthesisInXPointerExpression : l''expression XPointer ''{0}'' n''est pas valide. Le nombre de parenthèses ouvrantes ''{1}'' est différent du nombre de parenthèses fermantes ''{2}''. -InvalidSchemeDataInXPointer = InvalidSchemeDataInXPointer : l''expression XPointer ''{0}'' contient un élément SchemeData non valide. - -# XPointer Element Scheme Error Messages -InvalidElementSchemeToken = InvalidElementSchemeToken : l''expression XPointer du processus element() contient le jeton non valide ''{0}'' -InvalidElementSchemeXPointer = InvalidElementSchemeXPointer : l''expression XPointer de processus d''élément ''{0}'' n''est pas valide. -XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError : une erreur est survenue lors du traitement de l'expression de processus element() XPointer. -InvalidNCNameInElementSchemeData = InvalidNCNameInElementSchemeData : le processus element() contient un pointeur ShortHand ''{0}'' avec un NCName non valide. -InvalidChildSequenceCharacter = InvalidChildSequenceCharacter : le processus element() contient un caractère de séquence enfant non valide ''{0}''. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties deleted file mode 100644 index 475f51ffea5..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces XPointer implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. -FormatFailed = Si è verificato un errore interno durante la formattazione del seguente messaggio:\n - -# XPointer Framework Error Messages -XPointerProcessingError = XPointerProcessingError: si è verificato un errore durante l'elaborazione dell'espressione XPointer. -InvalidXPointerToken = InvalidXPointerToken: l''espressione XPointer contiene il token non valido ''{0}''. -InvalidXPointerExpression = InvalidXPointerExpression: l''espressione XPointer ''{0}'' non è valida. -MultipleShortHandPointers = MultipleShortHandPointers: l''espressione XPointer ''{0}'' non è valida. Contiene più puntatori ShortHand. -SchemeDataNotFollowedByCloseParenthesis = SchemeDataNotFollowedByCloseParenthesis: l''espressione XPointer ''{0}'' non è valida. SchemeData non è seguito da un carattere '')''. -SchemeUnsupported = SchemeUnsupported: lo schema XPointer ''{0}'' non è supportato. -InvalidShortHandPointer = InvalidShortHandPointer: NCName del puntatore ShortHand ''{0}'' non valido. -UnbalancedParenthesisInXPointerExpression = UnbalancedParenthesisInXPointerExpression: l''espressione XPointer ''{0}'' non è valida. Il numero di parentesi aperte ''{1}'' non corrisponde al numero di parentesi chiuse ''{2}''. -InvalidSchemeDataInXPointer = InvalidSchemeDataInXPointer: l''espressione XPointer ''{0}'' contiene SchemeData non validi. - -# XPointer Element Scheme Error Messages -InvalidElementSchemeToken = InvalidElementSchemeToken: l''espressione XPointer dello schema element() contiene il token non valido ''{0}''. -InvalidElementSchemeXPointer = InvalidElementSchemeXPointer: l''espressione XPointer ''{0}'' dello schema di elemento non è valida. -XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: si è verificato un errore durante l'elaborazione dell'espressione di schema element() XPointer. -InvalidNCNameInElementSchemeData = InvalidNCNameInElementSchemeData: lo schema element() contiene un puntatore ShortHand ''{0}'' con NCName non valido. -InvalidChildSequenceCharacter = InvalidChildSequenceCharacter: lo schema element() contiene un carattere di sequenza secondaria ''{0}'' non valido. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties deleted file mode 100644 index e7e46799e82..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces XPointer implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = 메시지 키에 해당하는 오류 메시지를 찾을 수 없습니다. -FormatFailed = 다음 메시지의 형식을 지정하는 중 내부 오류가 발생했습니다.\n - -# XPointer Framework Error Messages -XPointerProcessingError = XPointerProcessingError: XPointer 표현식을 처리하는 중 오류가 발생했습니다. -InvalidXPointerToken = InvalidXPointerToken: XPointer 표현식에 부적합한 토큰 ''{0}''이(가) 포함되어 있습니다. -InvalidXPointerExpression = InvalidXPointerExpression: XPointer 표현식 ''{0}''이(가) 부적합합니다. -MultipleShortHandPointers = MultipleShortHandPointers: XPointer 표현식 ''{0}''이(가) 부적합합니다. ShortHand Pointer가 두 개 이상 포함되어 있습니다. -SchemeDataNotFollowedByCloseParenthesis = SchemeDataNotFollowedByCloseParenthesis: XPointer 표현식 ''{0}''이(가) 부적합합니다. SchemeData 뒤에 '')'' 문자가 없습니다. -SchemeUnsupported = SchemeUnsupported: XPointer 체계 ''{0}''은(는) 지원되지 않습니다. -InvalidShortHandPointer = InvalidShortHandPointer: ShortHand Pointer ''{0}''의 NCName이 부적합합니다. -UnbalancedParenthesisInXPointerExpression = UnbalancedParenthesisInXPointerExpression: XPointer 표현식 ''{0}''이(가) 부적합합니다. 여는 괄호의 개수 ''{1}''과(와) 닫는 괄호의 개수 ''{2}''이(가) 일치하지 않습니다. -InvalidSchemeDataInXPointer = InvalidSchemeDataInXPointer: XPointer 표현식 ''{0}''에 부적합한 SchemeData가 포함되어 있습니다. - -# XPointer Element Scheme Error Messages -InvalidElementSchemeToken = InvalidElementSchemeToken: element() 체계 XPointer 표현식에 부적합한 토큰 ''{0}''이(가) 포함되어 있습니다. -InvalidElementSchemeXPointer = InvalidElementSchemeXPointer: 요소 체계 XPointer 표현식 ''{0}''이(가) 부적합합니다. -XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: XPointer element() 체계 표현식을 처리하는 중 오류가 발생했습니다. -InvalidNCNameInElementSchemeData = InvalidNCNameInElementSchemeData: element() 체계에 NCName이 부적합한 ShortHand Pointer ''{0}''이(가) 포함되어 있습니다. -InvalidChildSequenceCharacter = InvalidChildSequenceCharacter: element() 체계에 부적합한 하위 시퀀스 문자 ''{0}''이(가) 포함되어 있습니다. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties deleted file mode 100644 index ec6cd7873bb..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces XPointer implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = Não foi possível encontrar a mensagem de erro correspondente à chave da mensagem. -FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n - -# XPointer Framework Error Messages -XPointerProcessingError = XPointerProcessingError: Ocorreu um erro ao processar a expressão XPointer. -InvalidXPointerToken = InvalidXPointerToken: A expressão XPointer contém o token inválido ''{0}'' -InvalidXPointerExpression = InvalidXPointerExpression: A expressão XPointer ''{0}'' é inválida. -MultipleShortHandPointers = MultipleShortHandPointers: A expressão XPointer ''{0}'' é inválida. Tem mais de um Ponteiro ShortHand. -SchemeDataNotFollowedByCloseParenthesis = SchemeDataNotFollowedByCloseParenthesis: A expressão XPointer ''{0}'' é inválida. O SchemeData não foi seguida por um caractere '')". -SchemeUnsupported = SchemeUnsupported: O esquema XPointer ''{0}'' não é suportado. -InvalidShortHandPointer = InvalidShortHandPointer: O NCName do Ponteiro do ShortHand ''{0}'' é inválido. -UnbalancedParenthesisInXPointerExpression = UnbalancedParenthesisInXPointerExpression: A expressão XPointer ''{0}'' é inválida. O número de parênteses de abertura ''{1}'' não é igual ao número de parênteses de fechamento ''{2}''. -InvalidSchemeDataInXPointer = InvalidSchemeDataInXPointer: A expressão XPointer ''{0}'' contém SchemeData inválido. - -# XPointer Element Scheme Error Messages -InvalidElementSchemeToken = InvalidElementSchemeToken: A expressão XPointer do esquema element() contém o token inválido ''{0}'' -InvalidElementSchemeXPointer = InvalidElementSchemeXPointer: A expressão XPointer do Esquema do Elemento ''{0}'' é inválida. -XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: Ocorreu um erro ao processoar a expressão do Esquema do element() do XPointer. -InvalidNCNameInElementSchemeData = InvalidNCNameInElementSchemeData: O Esquema do element() contém um Ponteiro de ShortHand ''{0}'' com um NCName inválido. -InvalidChildSequenceCharacter = InvalidChildSequenceCharacter: O Esquema de element() contém um caractere de sequência filho inválido ''{0}''. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties deleted file mode 100644 index 761d746fee1..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2009, 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. 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. -# - -# This file stores localized messages for the Xerces XPointer implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. -FormatFailed = Ett internt fel inträffade vid formatering av följande meddelande:\n - -# XPointer Framework Error Messages -XPointerProcessingError = XPointerProcessingError: Ett fel inträffade vid bearbetning av XPointer-uttrycket. -InvalidXPointerToken = InvalidXPointerToken: XPointer-uttrycket innehåller ogiltigt tecken, ''{0}'' -InvalidXPointerExpression = InvalidXPointerExpression: XPointer-uttrycket ''{0}'' är ogiltigt. -MultipleShortHandPointers = MultipleShortHandPointers: XPointer-uttrycket ''{0}'' är ogiltigt. Det innehåller fler än en ShortHand Pointer. -SchemeDataNotFollowedByCloseParenthesis = SchemeDataNotFollowedByCloseParenthesis: XPointer-uttrycket ''{0}'' är ogiltigt. SchemeData efterföljdes inte av ett '')''-tecken. -SchemeUnsupported = SchemeUnsupported: XPointer-schemat ''{0}'' stöds inte. -InvalidShortHandPointer = InvalidShortHandPointer: NCName i ShortHand-pekaren ''{0}'' är ogiltigt. -UnbalancedParenthesisInXPointerExpression = UnbalancedParenthesisInXPointerExpression: XPointer-uttrycket ''{0}'' är ogiltigt. Antalet vänsterparenteser ''{1}'' är inte samma som antalet högerparenteser ''{2}''. -InvalidSchemeDataInXPointer = InvalidSchemeDataInXPointer: XPointer-uttrycket ''{0}'' innehåller ogiltig SchemeData. - -# XPointer Element Scheme Error Messages -InvalidElementSchemeToken = InvalidElementSchemeToken: XPointer-uttrycket i element()-schemat innehåller ogiltigt tecken ''{0}'' -InvalidElementSchemeXPointer = InvalidElementSchemeXPointer: XPointer-uttrycket ''{0}'' i elementschemat är ogiltigt. -XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: Ett fel inträffade vid bearbetning av schemauttrycket i XPointer element(). -InvalidNCNameInElementSchemeData = InvalidNCNameInElementSchemeData: element()-schemat innehåller ShortHand-pekaren ''{0}'' med ogiltigt NCName. -InvalidChildSequenceCharacter = InvalidChildSequenceCharacter: element()-schemat innehåller ett ogiltigt tecken ''{0}'' i underordnad sekvens. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties deleted file mode 100644 index 3d3798b7609..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -# This file stores localized messages for the Xerces XPointer implementation. -# -# The messages are arranged in key and value tuples in a ListResourceBundle. - -# Messages for message reporting -BadMessageKey = 找不到對應訊息索引鍵的錯誤訊息。 -FormatFailed = 格式化下列訊息時發生內部錯誤:\n - -# XPointer Framework Error Messages -XPointerProcessingError = XPointerProcessingError: 處理 XPointer 表示式時發生錯誤。 -InvalidXPointerToken = InvalidXPointerToken: XPointer 表示式包含無效記號 ''{0}'' -InvalidXPointerExpression = InvalidXPointerExpression: XPointer 表示式 ''{0}'' 無效。 -MultipleShortHandPointers = MultipleShortHandPointers: XPointer 表示式 ''{0}'' 無效。它具有超過一個以上的 ShortHand 指標。 -SchemeDataNotFollowedByCloseParenthesis = SchemeDataNotFollowedByCloseParenthesis: XPointer 表示式 ''{0}'' 無效。緊接在 SchemeData 之後不是 '')'' 字元。 -SchemeUnsupported = SchemeUnsupported: 不支援 XPointer 配置 ''{0}''。 -InvalidShortHandPointer = InvalidShortHandPointer: ShortHand 指標 ''{0}'' 的 NCName 無效。 -UnbalancedParenthesisInXPointerExpression = UnbalancedParenthesisInXPointerExpression: XPointer 表示式 ''{0}'' 無效。左括號的數目 ''{1}'' 不等於右括號的數目 ''{2}''。 -InvalidSchemeDataInXPointer = InvalidSchemeDataInXPointer: XPointer 表示式 ''{0}'' 包含無效的 SchemeData。 - -# XPointer Element Scheme Error Messages -InvalidElementSchemeToken = InvalidElementSchemeToken: element() 配置 XPointer 表示式包含無效記號 ''{0}'' -InvalidElementSchemeXPointer = InvalidElementSchemeXPointer: 元素配置 XPointer 表示式 ''{0}'' 無效。 -XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: 處理 XPointer element() 配置表示式時發生錯誤。 -InvalidNCNameInElementSchemeData = InvalidNCNameInElementSchemeData: element() 配置包含具有無效 NCName 的 ShortHand 指標 ''{0}''。 -InvalidChildSequenceCharacter = InvalidChildSequenceCharacter: element() 配置包含無效子項順序字元 ''{0}''。 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_es.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_es.properties deleted file mode 100644 index 0ee3c7d94a4..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_es.properties +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. -# - -parser.parse.1=Carácter incorrecto. -parser.parse.2=Número de referencia no válido. -parser.next.1=Es necesario un carácter después de \\. -parser.next.2=No se esperaba '?'. '(?:', '(?=', '(?!', '(?<', '(?#' o '(?>'? -parser.next.3=Se esperaba '(?<=' o '(?'? -parser.next.3='(?<=' ou '(?'? -parser.next.3='(?<=' o '(?'? -parser.next.3='(?<=' 또는 '(?'? -parser.next.3='(?<=' ou '(?'? -parser.next.3='(?<=' eller '(?'? -parser.next.3=預期應為 '(?<=' 或 '(? - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - private static final Object[][] _contents = new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "Aquesta funci\u00f3 no t\u00e9 suport. "}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "No es pot sobreescriure una causa "}, - - { ER_NO_DEFAULT_IMPL, - "No s'ha trobat cap implementaci\u00f3 per defecte "}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "En l''actualitat ChunkedIntArray({0}) no t\u00e9 suport "}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "El despla\u00e7ament \u00e9s m\u00e9s gran que la ranura "}, - - { ER_COROUTINE_NOT_AVAIL, - "Coroutine no est\u00e0 disponible, id={0} "}, - - { ER_COROUTINE_CO_EXIT, - "CoroutineManager ha rebut una petici\u00f3 co_exit() "}, - - { ER_COJOINROUTINESET_FAILED, - "S'ha produ\u00eft un error a co_joinCoroutineSet() "}, - - { ER_COROUTINE_PARAM, - "Error de par\u00e0metre coroutine ({0}) "}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\nUNEXPECTED: doTerminate de l''analitzador respon {0}"}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "L'an\u00e0lisi no es pot cridar mentre s'est\u00e0 duent a terme "}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Error: l''iterador de tipus de l''eix {0} no s''ha implementat "}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Error: l''iterador de l''eix {0} no s''ha implementat "}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "El clonatge de l'iterador no t\u00e9 suport "}, - - { ER_UNKNOWN_AXIS_TYPE, - "Tipus de commutaci\u00f3 de l''eix desconeguda: {0} "}, - - { ER_AXIS_NOT_SUPPORTED, - "La commutaci\u00f3 de l''eix no t\u00e9 suport: {0} "}, - - { ER_NO_DTMIDS_AVAIL, - "No hi ha m\u00e9s ID de DTM disponibles "}, - - { ER_NOT_SUPPORTED, - "No t\u00e9 suport: {0} "}, - - { ER_NODE_NON_NULL, - "El node no ha de ser nul per a getDTMHandleFromNode "}, - - { ER_COULD_NOT_RESOLVE_NODE, - "No s'ha pogut resoldre el node en un manejador "}, - - { ER_STARTPARSE_WHILE_PARSING, - "startParse no es pot cridar mentre s'est\u00e0 duent a terme l'an\u00e0lisi "}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "startParse necessita un SAXParser que no sigui nul "}, - - { ER_COULD_NOT_INIT_PARSER, - "No s'ha pogut inicialitzar l'analitzador amb "}, - - { ER_EXCEPTION_CREATING_POOL, - "S'ha produ\u00eft una excepci\u00f3 en crear una nova inst\u00e0ncia de l'agrupaci\u00f3 "}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "La via d'acc\u00e9s cont\u00e9 una seq\u00fc\u00e8ncia d'escapament no v\u00e0lida "}, - - { ER_SCHEME_REQUIRED, - "Es necessita l'esquema "}, - - { ER_NO_SCHEME_IN_URI, - "No s''ha trobat cap esquema a l''URI: {0} "}, - - { ER_NO_SCHEME_INURI, - "No s'ha trobat cap esquema a l'URI "}, - - { ER_PATH_INVALID_CHAR, - "La via d'acc\u00e9s cont\u00e9 un car\u00e0cter no v\u00e0lid {0} "}, - - { ER_SCHEME_FROM_NULL_STRING, - "No es pot establir un esquema des d'una cadena nul\u00b7la "}, - - { ER_SCHEME_NOT_CONFORMANT, - "L'esquema no t\u00e9 conformitat. "}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "El sistema principal no t\u00e9 una adre\u00e7a ben formada "}, - - { ER_PORT_WHEN_HOST_NULL, - "El port no es pot establir quan el sistema principal \u00e9s nul "}, - - { ER_INVALID_PORT, - "N\u00famero de port no v\u00e0lid "}, - - { ER_FRAG_FOR_GENERIC_URI, - "El fragment nom\u00e9s es pot establir per a un URI gen\u00e8ric "}, - - { ER_FRAG_WHEN_PATH_NULL, - "El fragment no es pot establir si la via d'acc\u00e9s \u00e9s nul\u00b7la "}, - - { ER_FRAG_INVALID_CHAR, - "El fragment cont\u00e9 un car\u00e0cter no v\u00e0lid "}, - - { ER_PARSER_IN_USE, - "L'analitzador ja s'est\u00e0 utilitzant "}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "No es pot modificar {0} {1} mentre es du a terme l''an\u00e0lisi "}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "La causalitat pr\u00f2pia no est\u00e0 permesa. "}, - - { ER_NO_USERINFO_IF_NO_HOST, - "No es pot especificar informaci\u00f3 de l'usuari si no s'especifica el sistema principal "}, - - { ER_NO_PORT_IF_NO_HOST, - "No es pot especificar el port si no s'especifica el sistema principal "}, - - { ER_NO_QUERY_STRING_IN_PATH, - "No es pot especificar una cadena de consulta en la via d'acc\u00e9s i la cadena de consulta "}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "No es pot especificar un fragment tant en la via d'acc\u00e9s com en el fragment "}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "No es pot inicialitzar l'URI amb par\u00e0metres buits "}, - - { ER_METHOD_NOT_SUPPORTED, - "Aquest m\u00e8tode encara no t\u00e9 suport "}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "Ara mateix no es pot reiniciar IncrementalSAXSource_Filter "}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "XMLReader no es pot produir abans de la petici\u00f3 d'startParse "}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "La commutaci\u00f3 de l''eix no t\u00e9 suport: {0} "}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "S''ha creat ListingErrorHandler amb PrintWriter nul "}, - - { ER_SYSTEMID_UNKNOWN, - "ID del sistema (SystemId) desconegut "}, - - { ER_LOCATION_UNKNOWN, - "Ubicaci\u00f3 de l'error desconeguda"}, - - { ER_PREFIX_MUST_RESOLVE, - "El prefix s''ha de resoldre en un espai de noms: {0} "}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "createDocument() no t\u00e9 suport a XPathContext "}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "El subordinat de l'atribut no t\u00e9 un document de propietari. "}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "El subordinat de l'atribut no t\u00e9 un element de document de propietari. "}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "Av\u00eds: no es pot produir text abans de l'element de document. Es passa per alt. "}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "No hi pot haver m\u00e9s d'una arrel en un DOM. "}, - - { ER_ARG_LOCALNAME_NULL, - "L'argument 'localName' \u00e9s nul. "}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "El nom local de QNAME ha de ser un NCName v\u00e0lid. "}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "El prefix de QNAME ha de ser un NCName v\u00e0lid. "}, - - { "BAD_CODE", "El par\u00e0metre de createMessage estava fora dels l\u00edmits. "}, - { "FORMAT_FAILED", "S'ha generat una excepci\u00f3 durant la crida messageFormat. "}, - { "line", "L\u00ednia n\u00fam. "}, - { "column","Columna n\u00fam. "}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "La classe de serialitzador ''{0}'' no implementa org.xml.sax.ContentHandler."}, - - {ER_RESOURCE_COULD_NOT_FIND, - "No s''ha trobat el recurs [ {0} ].\n {1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "El recurs [ {0} ] no s''ha pogut carregar: {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Grand\u00e0ria del buffer <=0 " }, - - {ER_INVALID_UTF16_SURROGATE, - "S''ha detectat un suplent UTF-16 no v\u00e0lid: {0} ? " }, - - {ER_OIERROR, - "Error d'E/S " }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "No es pot afegir l''atribut {0} despr\u00e9s dels nodes subordinats o abans que es produeixi un element. Es passar\u00e0 per alt l''atribut. "}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "L''espai de noms del prefix ''{0}'' no s''ha declarat." }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "L''atribut ''{0}'' es troba fora de l''element." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "La declaraci\u00f3 d''espai de noms ''{0}''=''{1}'' es troba fora de l''element." }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "No s''ha pogut carregar ''{0}'' (comproveu la CLASSPATH); ara s''estan fent servir els valors per defecte."}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "No s''ha pogut carregar el fitxer de propietats ''{0}'' del m\u00e8tode de sortida ''{1}'' (comproveu la CLASSPATH)" } - - - }; - - /** - * Get the lookup table for error messages - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_cs.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_cs.java deleted file mode 100644 index d659883015b..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_cs.java +++ /dev/null @@ -1,442 +0,0 @@ -/* - * 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.xml.internal.res; - - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_cs extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - private static final Object[][] _contents = new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "Nepodporovan\u00e1 funkce!"}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "P\u0159\u00ed\u010dinu nelze p\u0159epsat"}, - - { ER_NO_DEFAULT_IMPL, - "Nebyla nalezena v\u00fdchoz\u00ed implementace. "}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "Funkce ChunkedIntArray({0}) nen\u00ed aktu\u00e1ln\u011b podporov\u00e1na."}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "Offset je v\u011bt\u0161\u00ed ne\u017e slot."}, - - { ER_COROUTINE_NOT_AVAIL, - "Spole\u010dn\u00e1 rutina nen\u00ed k dispozici, id={0}"}, - - { ER_COROUTINE_CO_EXIT, - "Funkce CoroutineManager obdr\u017eela po\u017eadavek co_exit()"}, - - { ER_COJOINROUTINESET_FAILED, - "Selhala funkce co_joinCoroutineSet()"}, - - { ER_COROUTINE_PARAM, - "Chyba parametru spole\u010dn\u00e9 rutiny ({0})"}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\nNeo\u010dek\u00e1van\u00e9: odpov\u011bdi funkce analyz\u00e1toru doTerminate {0}"}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "b\u011bhem anal\u00fdzy nelze volat analyz\u00e1tor"}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Chyba: zadan\u00fd iter\u00e1tor osy {0} nen\u00ed implementov\u00e1n"}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Chyba: zadan\u00fd iter\u00e1tor osy {0} nen\u00ed implementov\u00e1n "}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "Nepodporovan\u00fd klon iter\u00e1toru."}, - - { ER_UNKNOWN_AXIS_TYPE, - "Nezn\u00e1m\u00fd typ osy pr\u016fchodu: {0}"}, - - { ER_AXIS_NOT_SUPPORTED, - "Nepodporovan\u00e1 osa pr\u016fchodu: {0}"}, - - { ER_NO_DTMIDS_AVAIL, - "\u017d\u00e1dn\u00e1 dal\u0161\u00ed ID DTM nejsou k dispozici"}, - - { ER_NOT_SUPPORTED, - "Nepodporov\u00e1no: {0}"}, - - { ER_NODE_NON_NULL, - "Uzel pou\u017eit\u00fd ve funkci getDTMHandleFromNode mus\u00ed m\u00edt hodnotu not-null"}, - - { ER_COULD_NOT_RESOLVE_NODE, - "Uzel nelze p\u0159elo\u017eit do manipul\u00e1toru"}, - - { ER_STARTPARSE_WHILE_PARSING, - "B\u011bhem anal\u00fdzy nelze volat funkci startParse."}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "Funkce startParse vy\u017eaduje SAXParser s hodnotou not-null."}, - - { ER_COULD_NOT_INIT_PARSER, - "nelze inicializovat analyz\u00e1tor s: "}, - - { ER_EXCEPTION_CREATING_POOL, - "v\u00fdjimka p\u0159i vytv\u00e1\u0159en\u00ed nov\u00e9 instance spole\u010dn\u00e9 oblasti"}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Cesta obsahuje neplatnou escape sekvenci"}, - - { ER_SCHEME_REQUIRED, - "Je vy\u017eadov\u00e1no sch\u00e9ma!"}, - - { ER_NO_SCHEME_IN_URI, - "V URI nebylo nalezeno \u017e\u00e1dn\u00e9 sch\u00e9ma: {0}"}, - - { ER_NO_SCHEME_INURI, - "V URI nebylo nalezeno \u017e\u00e1dn\u00e9 sch\u00e9ma"}, - - { ER_PATH_INVALID_CHAR, - "Cesta obsahuje neplatn\u00fd znak: {0}"}, - - { ER_SCHEME_FROM_NULL_STRING, - "Nelze nastavit sch\u00e9ma \u0159et\u011bzce s hodnotou null."}, - - { ER_SCHEME_NOT_CONFORMANT, - "Sch\u00e9ma nevyhovuje."}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "Adresa hostitele m\u00e1 nespr\u00e1vn\u00fd form\u00e1t."}, - - { ER_PORT_WHEN_HOST_NULL, - "M\u00e1-li hostitel hodnotu null, nelze nastavit port."}, - - { ER_INVALID_PORT, - "Neplatn\u00e9 \u010d\u00edslo portu."}, - - { ER_FRAG_FOR_GENERIC_URI, - "Fragment lze nastavit jen u generick\u00e9ho URI."}, - - { ER_FRAG_WHEN_PATH_NULL, - "M\u00e1-li cesta hodnotu null, nelze nastavit fragment."}, - - { ER_FRAG_INVALID_CHAR, - "Fragment obsahuje neplatn\u00fd znak."}, - - { ER_PARSER_IN_USE, - "Analyz\u00e1tor se ji\u017e pou\u017e\u00edv\u00e1."}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "B\u011bhem anal\u00fdzy nelze m\u011bnit {0} {1}."}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "Zp\u016fsoben\u00ed sama sebe (self-causation) nen\u00ed povoleno"}, - - { ER_NO_USERINFO_IF_NO_HOST, - "Nen\u00ed-li ur\u010den hostitel, nelze zadat \u00fadaje o u\u017eivateli."}, - - { ER_NO_PORT_IF_NO_HOST, - "Nen\u00ed-li ur\u010den hostitel, nelze zadat port."}, - - { ER_NO_QUERY_STRING_IN_PATH, - "V \u0159et\u011bzci cesty a dotazu nelze zadat \u0159et\u011bzec dotazu."}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment nelze ur\u010dit z\u00e1rove\u0148 v cest\u011b i ve fragmentu."}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "URI nelze inicializovat s pr\u00e1zdn\u00fdmi parametry."}, - - { ER_METHOD_NOT_SUPPORTED, - "Prozat\u00edm nepodporovan\u00e1 metoda. "}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "Filtr IncrementalSAXSource_Filter nelze aktu\u00e1ln\u011b znovu spustit."}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "P\u0159ed po\u017eadavkem startParse nen\u00ed XMLReader."}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "Nepodporovan\u00e1 osa pr\u016fchodu: {0}"}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "Prvek ListingErrorHandler byl vytvo\u0159en s funkc\u00ed PrintWriter s hodnotou null!"}, - - { ER_SYSTEMID_UNKNOWN, - "Nezn\u00e1m\u00fd identifik\u00e1tor SystemId"}, - - { ER_LOCATION_UNKNOWN, - "Chyba se vyskytla na nezn\u00e1m\u00e9m m\u00edst\u011b"}, - - { ER_PREFIX_MUST_RESOLVE, - "P\u0159edponu mus\u00ed b\u00fdt mo\u017eno p\u0159elo\u017eit do oboru n\u00e1zv\u016f: {0}"}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "Funkce XPathContext nepodporuje funkci createDocument()!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "Potomek atributu nem\u00e1 dokument vlastn\u00edka!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "Potomek atributu nem\u00e1 prvek dokumentu vlastn\u00edka!"}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "Varov\u00e1n\u00ed: v\u00fdstup textu nem\u016f\u017ee p\u0159edch\u00e1zet prvku dokumentu! Ignorov\u00e1no..."}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "DOM nem\u016f\u017ee m\u00edt n\u011bkolik ko\u0159en\u016f!"}, - - { ER_ARG_LOCALNAME_NULL, - "Argument 'localName' m\u00e1 hodnotu null"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "Hodnota Localname ve funkci QNAME by m\u011bla b\u00fdt platn\u00fdm prvkem NCName"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "P\u0159edpona ve funkci QNAME by m\u011bla b\u00fdt platn\u00fdm prvkem NCName"}, - - { "BAD_CODE", "Parametr funkce createMessage je mimo limit"}, - { "FORMAT_FAILED", "P\u0159i vol\u00e1n\u00ed funkce messageFormat do\u0161lo k v\u00fdjimce"}, - { "line", "\u0158\u00e1dek #"}, - { "column","Sloupec #"}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "T\u0159\u00edda serializace ''{0}'' neimplementuje org.xml.sax.ContentHandler."}, - - {ER_RESOURCE_COULD_NOT_FIND, - "Nelze naj\u00edt zdroj [ {0} ].\n {1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "Nelze zav\u00e9st zdroj [ {0} ]: {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Velikost vyrovn\u00e1vac\u00ed pam\u011bti <=0" }, - - {ER_INVALID_UTF16_SURROGATE, - "Byla zji\u0161t\u011bna neplatn\u00e1 n\u00e1hrada UTF-16: {0} ?" }, - - {ER_OIERROR, - "Chyba vstupu/v\u00fdstupu" }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "Nelze p\u0159idat atribut {0} po uzlech potomk\u016f ani p\u0159ed t\u00edm, ne\u017e je vytvo\u0159en prvek. Atribut bude ignorov\u00e1n."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "Obor n\u00e1zv\u016f pro p\u0159edponu ''{0}'' nebyl deklarov\u00e1n." }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "Atribut ''{0}'' je vn\u011b prvku." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "Deklarace oboru n\u00e1zv\u016f ''{0}''=''{1}'' je vn\u011b prvku." }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "Nelze zav\u00e9st ''{0}'' (zkontrolujte prom\u011bnnou CLASSPATH), proto se pou\u017e\u00edvaj\u00ed pouze v\u00fdchoz\u00ed hodnoty"}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Nelze na\u010d\u00edst soubor vlastnost\u00ed ''{0}'' pro v\u00fdstupn\u00ed metodu ''{1}'' (zkontrolujte prom\u011bnnou CLASSPATH)." } - - - }; - - /** - * Get the lookup table for error messages - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java deleted file mode 100644 index fd0b7915481..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * 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.xml.internal.res; - - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_es extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String ER_ILLEGAL_CHARACTER = "ER_ILLEGAL_CHARACTER"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** The lookup table for error messages. */ - private static final Object[][] contents = { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "Funci\u00F3n no soportada."}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "No se puede sobrescribir la causa"}, - - { ER_NO_DEFAULT_IMPL, - "No se ha encontrado la implantaci\u00F3n por defecto "}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "ChunkedIntArray({0}) no est\u00E1 soportado actualmente"}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "El desplazamiento es mayor que la ranura"}, - - { ER_COROUTINE_NOT_AVAIL, - "Corrutina no disponible, id={0}"}, - - { ER_COROUTINE_CO_EXIT, - "CoroutineManager ha recibido la solicitud co_exit()"}, - - { ER_COJOINROUTINESET_FAILED, - "Fallo de co_joinCoroutineSet()"}, - - { ER_COROUTINE_PARAM, - "Error de par\u00E1metro de corrutina ({0})"}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\nINESPERADO: respuestas doTerminate del analizador {0}"}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "no se puede realizar un an\u00E1lisis mientras se lleva a cabo otro"}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Error: el iterador introducido para el eje {0} no se ha implantado"}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Error: el iterador para el eje {0} no se ha implantado "}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "La clonaci\u00F3n del iterador no est\u00E1 soportada"}, - - { ER_UNKNOWN_AXIS_TYPE, - "Tipo de recorrido de eje desconocido: {0}"}, - - { ER_AXIS_NOT_SUPPORTED, - "Traverser de eje no soportado: {0}"}, - - { ER_NO_DTMIDS_AVAIL, - "No hay m\u00E1s identificadores de DTM disponibles"}, - - { ER_NOT_SUPPORTED, - "No soportado: {0}"}, - - { ER_NODE_NON_NULL, - "El nodo debe ser no nulo para getDTMHandleFromNode"}, - - { ER_COULD_NOT_RESOLVE_NODE, - "No se ha podido resolver el nodo en un identificador"}, - - { ER_STARTPARSE_WHILE_PARSING, - "startParse no puede llamarse durante el an\u00E1lisis"}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "startParse necesita un SAXParser no nulo"}, - - { ER_COULD_NOT_INIT_PARSER, - "no se ha podido inicializar el analizador con"}, - - { ER_EXCEPTION_CREATING_POOL, - "excepci\u00F3n al crear la nueva instancia para el pool"}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "La ruta de acceso contiene una secuencia de escape no v\u00E1lida"}, - - { ER_SCHEME_REQUIRED, - "Se necesita un esquema."}, - - { ER_NO_SCHEME_IN_URI, - "No se ha encontrado un esquema en el URI: {0}"}, - - { ER_NO_SCHEME_INURI, - "No se ha encontrado un esquema en el URI"}, - - { ER_PATH_INVALID_CHAR, - "La ruta de acceso contiene un car\u00E1cter no v\u00E1lido: {0}"}, - - { ER_SCHEME_FROM_NULL_STRING, - "No se puede definir un esquema a partir de una cadena nula"}, - - { ER_SCHEME_NOT_CONFORMANT, - "El esquema no es v\u00E1lido."}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "El formato de la direcci\u00F3n de host no es correcto"}, - - { ER_PORT_WHEN_HOST_NULL, - "No se puede definir el puerto si el host es nulo"}, - - { ER_INVALID_PORT, - "N\u00FAmero de puerto no v\u00E1lido"}, - - { ER_FRAG_FOR_GENERIC_URI, - "S\u00F3lo se puede definir el fragmento para un URI gen\u00E9rico"}, - - { ER_FRAG_WHEN_PATH_NULL, - "No se puede definir el fragmento si la ruta de acceso es nula"}, - - { ER_FRAG_INVALID_CHAR, - "El fragmento contiene un car\u00E1cter no v\u00E1lido"}, - - { ER_PARSER_IN_USE, - "El analizador ya se est\u00E1 utilizando"}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "No se puede cambiar {0} {1} durante el an\u00E1lisis"}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "La autocausalidad no est\u00E1 permitida"}, - - { ER_NO_USERINFO_IF_NO_HOST, - "No se puede especificar la informaci\u00F3n de usuario si no se ha especificado el host"}, - - { ER_NO_PORT_IF_NO_HOST, - "No se puede especificar el puerto si no se ha especificado el host"}, - - { ER_NO_QUERY_STRING_IN_PATH, - "No se puede especificar la cadena de consulta en la ruta de acceso y en la cadena de consulta"}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "No se puede especificar el fragmento en la ruta de acceso y en el fragmento"}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "No se puede inicializar el URI con par\u00E1metros vac\u00EDos"}, - - { ER_METHOD_NOT_SUPPORTED, - "M\u00E9todo no soportado a\u00FAn "}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "IncrementalSAXSource_Filter no se puede reiniciar actualmente"}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "XMLReader no anterior a la solicitud startParse"}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "Traverser de eje no soportado: {0}"}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "ListingErrorHandler se ha creado con un valor de PrintWriter nulo"}, - - { ER_SYSTEMID_UNKNOWN, - "Identificador de Sistema Desconocido"}, - - { ER_LOCATION_UNKNOWN, - "Ubicaci\u00F3n del error desconocida"}, - - { ER_PREFIX_MUST_RESOLVE, - "El prefijo se debe resolver en un espacio de nombres: {0}"}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "createDocument() no soportado en XPathContext"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "El atributo child no tiene un documento de propietario."}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "El atributo child no tiene un elemento de documento de propietario."}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "Advertencia: no se puede realizar la salida de texto antes del elemento del documento. Ignorando..."}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "No se puede tener m\u00E1s de una ra\u00EDz en un DOM."}, - - { ER_ARG_LOCALNAME_NULL, - "El argumento 'localName' es nulo"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "El nombre local de QNAME debe ser un NCName v\u00E1lido"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "El prefijo de QNAME debe ser un NCName v\u00E1lido"}, - - { ER_NAME_CANT_START_WITH_COLON, - "El nombre no puede empezar con dos puntos"}, - - { "BAD_CODE", "El par\u00E1metro para crear un mensaje est\u00E1 fuera de los l\u00EDmites"}, - { "FORMAT_FAILED", "Se ha emitido una excepci\u00F3n durante la llamada a messageFormat"}, - { "line", "N\u00BA de L\u00EDnea"}, - { "column","N\u00BA de Columna"}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "La clase de serializador ''{0}'' no implanta org.xml.sax.ContentHandler."}, - - {ER_RESOURCE_COULD_NOT_FIND, - "No se ha encontrado el recurso [ {0} ].\n {1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "No se ha podido cargar el recurso [ {0} ]: {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Tama\u00F1o de buffer menor o igual que 0" }, - - {ER_INVALID_UTF16_SURROGATE, - "\u00BFSe ha detectado un sustituto UTF-16 no v\u00E1lido: {0}?" }, - - {ER_OIERROR, - "Error de ES" }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "No se puede agregar el atributo {0} despu\u00E9s de nodos secundarios o antes de que se produzca un elemento. Se ignorar\u00E1 el atributo."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "No se ha declarado el espacio de nombres para el prefijo ''{0}''." }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "El atributo ''{0}'' est\u00E1 fuera del elemento." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "Declaraci\u00F3n del espacio de nombres ''{0}''=''{1}'' fuera del elemento." }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "No se ha podido cargar ''{0}'' (compruebe la CLASSPATH), ahora s\u00F3lo se est\u00E1n utilizando los valores por defecto"}, - - { ER_ILLEGAL_CHARACTER, - "Intento de realizar la salida del car\u00E1cter del valor integral {0}, que no est\u00E1 representado en la codificaci\u00F3n de salida de {1}."}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "No se ha podido cargar el archivo de propiedades ''{0}'' para el m\u00E9todo de salida ''{1}'' (compruebe la CLASSPATH)" } - - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - - protected Object[][] getContents() { - return contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java deleted file mode 100644 index 26a80d2e161..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * 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.xml.internal.res; - - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_fr extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String ER_ILLEGAL_CHARACTER = "ER_ILLEGAL_CHARACTER"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** The lookup table for error messages. */ - private static final Object[][] contents = { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "Fonction non prise en charge."}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "Impossible de remplacer la cause"}, - - { ER_NO_DEFAULT_IMPL, - "Aucune impl\u00E9mentation par d\u00E9faut trouv\u00E9e "}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "ChunkedIntArray({0}) n''est actuellement pas pris en charge"}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "D\u00E9calage sup\u00E9rieur \u00E0 l'emplacement"}, - - { ER_COROUTINE_NOT_AVAIL, - "Coroutine non disponible, id={0}"}, - - { ER_COROUTINE_CO_EXIT, - "CoroutineManager a re\u00E7u la demande co_exit()"}, - - { ER_COJOINROUTINESET_FAILED, - "Echec de co_joinCoroutineSet()"}, - - { ER_COROUTINE_PARAM, - "Erreur de param\u00E8tre de coroutine ({0})"}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\nINATTENDU : r\u00E9ponses doTerminate de l''analyseur - {0}"}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "impossible d'appeler l'analyse lorsqu'elle est en cours"}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Erreur : it\u00E9rateur saisi pour l''axe {0} non impl\u00E9ment\u00E9"}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Erreur : it\u00E9rateur pour l''axe {0} non impl\u00E9ment\u00E9 "}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "Clone d'it\u00E9rateur non pris en charge"}, - - { ER_UNKNOWN_AXIS_TYPE, - "Type de parcours d''axe inconnu : {0}"}, - - { ER_AXIS_NOT_SUPPORTED, - "Parcours d''axe non pris en charge : {0}"}, - - { ER_NO_DTMIDS_AVAIL, - "Aucun autre ID DTM n'est disponible"}, - - { ER_NOT_SUPPORTED, - "Non pris en charge : {0}"}, - - { ER_NODE_NON_NULL, - "Le noeud doit \u00EAtre non NULL pour getDTMHandleFromNode"}, - - { ER_COULD_NOT_RESOLVE_NODE, - "Impossible de r\u00E9soudre le noeud sur un descripteur"}, - - { ER_STARTPARSE_WHILE_PARSING, - "impossible d'appeler startParse lorsque l'analyse est en cours"}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "startParse n\u00E9cessite un SAXParser non NULL"}, - - { ER_COULD_NOT_INIT_PARSER, - "impossible d'initialiser l'analyseur avec"}, - - { ER_EXCEPTION_CREATING_POOL, - "exception lors de la cr\u00E9ation de l'instance du pool"}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Le chemin d'acc\u00E8s contient une s\u00E9quence d'\u00E9chappement non valide"}, - - { ER_SCHEME_REQUIRED, - "Mod\u00E8le obligatoire."}, - - { ER_NO_SCHEME_IN_URI, - "Mod\u00E8le introuvable dans l''URI: {0}"}, - - { ER_NO_SCHEME_INURI, - "Mod\u00E8le introuvable dans l'URI"}, - - { ER_PATH_INVALID_CHAR, - "Le chemin contient un caract\u00E8re non valide : {0}"}, - - { ER_SCHEME_FROM_NULL_STRING, - "Impossible de d\u00E9finir le mod\u00E8le \u00E0 partir de la cha\u00EEne NULL"}, - - { ER_SCHEME_NOT_CONFORMANT, - "Le mod\u00E8le n'est pas conforme."}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "Le format de l'adresse de l'h\u00F4te n'est pas correct"}, - - { ER_PORT_WHEN_HOST_NULL, - "Impossible de d\u00E9finir le port quand l'h\u00F4te est NULL"}, - - { ER_INVALID_PORT, - "Num\u00E9ro de port non valide"}, - - { ER_FRAG_FOR_GENERIC_URI, - "Le fragment ne peut \u00EAtre d\u00E9fini que pour un URI g\u00E9n\u00E9rique"}, - - { ER_FRAG_WHEN_PATH_NULL, - "Impossible de d\u00E9finir le fragment quand le chemin d'acc\u00E8s est NULL"}, - - { ER_FRAG_INVALID_CHAR, - "Le fragment contient un caract\u00E8re non valide"}, - - { ER_PARSER_IN_USE, - "L'analyseur est d\u00E9j\u00E0 utilis\u00E9"}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "Impossible de modifier {0} {1} pendant l''analyse"}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "Causalit\u00E9 circulaire non autoris\u00E9e"}, - - { ER_NO_USERINFO_IF_NO_HOST, - "Userinfo peut ne pas \u00EAtre sp\u00E9cifi\u00E9 si l'h\u00F4te ne l'est pas"}, - - { ER_NO_PORT_IF_NO_HOST, - "Le port peut ne pas \u00EAtre sp\u00E9cifi\u00E9 si l'h\u00F4te ne l'est pas"}, - - { ER_NO_QUERY_STRING_IN_PATH, - "La cha\u00EEne de requ\u00EAte ne doit pas figurer dans un chemin et une cha\u00EEne de requ\u00EAte"}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "Le fragment ne doit pas \u00EAtre indiqu\u00E9 \u00E0 la fois dans le chemin et dans le fragment"}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Impossible d'initialiser l'URI avec des param\u00E8tres vides"}, - - { ER_METHOD_NOT_SUPPORTED, - "La m\u00E9thode n'est pas encore prise en charge "}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "IncrementalSAXSource_Filter ne peut actuellement pas \u00EAtre red\u00E9marr\u00E9"}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "XMLReader pas avant la demande startParse"}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "Parcours d''axe non pris en charge : {0}"}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "ListingErrorHandler cr\u00E9\u00E9 avec PrintWriter NULL."}, - - { ER_SYSTEMID_UNKNOWN, - "ID syst\u00E8me inconnu"}, - - { ER_LOCATION_UNKNOWN, - "Emplacement de l'erreur inconnu"}, - - { ER_PREFIX_MUST_RESOLVE, - "Le pr\u00E9fixe doit \u00EAtre r\u00E9solu en espace de noms : {0}"}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "createDocument() non pris en charge dans XPathContext."}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "L'enfant de l'attribut ne poss\u00E8de pas de document propri\u00E9taire."}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "L'enfant de l'attribut ne poss\u00E8de pas d'\u00E9l\u00E9ment de document propri\u00E9taire."}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "Avertissement : impossible de g\u00E9n\u00E9rer une sortie du texte avant l'\u00E9l\u00E9ment de document. Non pris en compte..."}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "Impossible d'avoir plus d'une racine sur un DOM."}, - - { ER_ARG_LOCALNAME_NULL, - "L'argument \"localName\" est NULL"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "Le nom local du QName doit \u00EAtre un NCName valide"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "Le pr\u00E9fixe du QName doit \u00EAtre un NCName valide"}, - - { ER_NAME_CANT_START_WITH_COLON, - "Le nom ne peut pas commencer par deux-points"}, - - { "BAD_CODE", "Le param\u00E8tre createMessage \u00E9tait hors limites"}, - { "FORMAT_FAILED", "Exception g\u00E9n\u00E9r\u00E9e pendant l'appel messageFormat"}, - { "line", "Ligne n\u00B0"}, - { "column","Colonne n\u00B0"}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "La classe de serializer ''{0}'' n''impl\u00E9mente pas org.xml.sax.ContentHandler."}, - - {ER_RESOURCE_COULD_NOT_FIND, - "La ressource [ {0} ] est introuvable.\n {1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "La ressource [ {0} ] n''a pas pu charger : {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Taille du tampon <=0" }, - - {ER_INVALID_UTF16_SURROGATE, - "Substitut UTF-16 non valide d\u00E9tect\u00E9 : {0} ?" }, - - {ER_OIERROR, - "Erreur d'E-S" }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "Impossible d''ajouter l''attribut {0} apr\u00E8s des noeuds enfant ou avant la production d''un \u00E9l\u00E9ment. L''attribut est ignor\u00E9."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "L''espace de noms du pr\u00E9fixe ''{0}'' n''a pas \u00E9t\u00E9 d\u00E9clar\u00E9." }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "Attribut ''{0}'' \u00E0 l''ext\u00E9rieur de l''\u00E9l\u00E9ment." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "La d\u00E9claration d''espace de noms ''{0}''=''{1}'' est \u00E0 l''ext\u00E9rieur de l''\u00E9l\u00E9ment." }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "Impossible de charger ''{0}'' (v\u00E9rifier CLASSPATH), les valeurs par d\u00E9faut sont donc employ\u00E9es"}, - - { ER_ILLEGAL_CHARACTER, - "Tentative de sortie d''un caract\u00E8re avec une valeur enti\u00E8re {0}, non repr\u00E9sent\u00E9 dans l''encodage de sortie sp\u00E9cifi\u00E9 pour {1}."}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Impossible de charger le fichier de propri\u00E9t\u00E9s ''{0}'' pour la m\u00E9thode de sortie ''{1}'' (v\u00E9rifier CLASSPATH)" } - - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - - protected Object[][] getContents() { - return contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java deleted file mode 100644 index 2f14e3d3b26..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * 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.xml.internal.res; - - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_it extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String ER_ILLEGAL_CHARACTER = "ER_ILLEGAL_CHARACTER"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** The lookup table for error messages. */ - private static final Object[][] contents = { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "Funzione non supportata."}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "Impossibile sovrascrivere la causa"}, - - { ER_NO_DEFAULT_IMPL, - "Nessuna implementazione predefinita trovata "}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "ChunkedIntArray({0}) non supportato al momento"}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "Offset pi\u00F9 grande dello slot"}, - - { ER_COROUTINE_NOT_AVAIL, - "Co-routine non disponibile, ID={0}"}, - - { ER_COROUTINE_CO_EXIT, - "CoroutineManager ha ricevuto una richiesta co_exit()"}, - - { ER_COJOINROUTINESET_FAILED, - "co_joinCoroutineSet() non riuscito"}, - - { ER_COROUTINE_PARAM, - "Errore del parametro di co-routine ({0})"}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\nIMPREVISTO: risposte doTerminate del parser {0}"}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "impossibile richiamare parse mentre \u00E8 in corso un'analisi"}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Errore: l''iteratore con tipo per l''asse {0} non \u00E8 implementato"}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Errore: l''iteratore per l''asse {0} non \u00E8 implementato "}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "Duplicazione dell'iteratore non supportata"}, - - { ER_UNKNOWN_AXIS_TYPE, - "Tipo di asse trasversale sconosciuto: {0}"}, - - { ER_AXIS_NOT_SUPPORTED, - "Asse trasversale non supportato: {0}"}, - - { ER_NO_DTMIDS_AVAIL, - "Non sono disponibili altri ID DTM"}, - - { ER_NOT_SUPPORTED, - "Non supportato: {0}"}, - - { ER_NODE_NON_NULL, - "Il nodo deve essere non nullo per getDTMHandleFromNode"}, - - { ER_COULD_NOT_RESOLVE_NODE, - "Impossibile risolvere il nodo in un handle"}, - - { ER_STARTPARSE_WHILE_PARSING, - "impossibile richiamare startParse mentre \u00E8 in corso un'analisi"}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "startParse richiede un valore non nullo per SAXParser"}, - - { ER_COULD_NOT_INIT_PARSER, - "impossibile inizializzare il parser con"}, - - { ER_EXCEPTION_CREATING_POOL, - "eccezione durante la creazione di una nuova istanza per il pool"}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Il percorso contiene sequenza di escape non valida"}, - - { ER_SCHEME_REQUIRED, - "Lo schema \u00E8 obbligatorio."}, - - { ER_NO_SCHEME_IN_URI, - "Nessuno schema trovato nell''URI: {0}"}, - - { ER_NO_SCHEME_INURI, - "Nessuno schema trovato nell'URI"}, - - { ER_PATH_INVALID_CHAR, - "Il percorso contiene un carattere non valido: {0}"}, - - { ER_SCHEME_FROM_NULL_STRING, - "Impossibile impostare lo schema da una stringa nulla"}, - - { ER_SCHEME_NOT_CONFORMANT, - "Lo schema non \u00E8 conforme."}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "Host non \u00E8 un indirizzo corretto"}, - - { ER_PORT_WHEN_HOST_NULL, - "La porta non pu\u00F2 essere impostata se l'host \u00E8 nullo"}, - - { ER_INVALID_PORT, - "Numero di porta non valido"}, - - { ER_FRAG_FOR_GENERIC_URI, - "Il frammento pu\u00F2 essere impostato solo per un URI generico"}, - - { ER_FRAG_WHEN_PATH_NULL, - "Il frammento non pu\u00F2 essere impostato se il percorso \u00E8 nullo"}, - - { ER_FRAG_INVALID_CHAR, - "Il frammento contiene un carattere non valido"}, - - { ER_PARSER_IN_USE, - "Parser gi\u00E0 in uso"}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "Impossibile modificare {0} {1} durante l''analisi"}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "Creazione automatica della causa non consentita"}, - - { ER_NO_USERINFO_IF_NO_HOST, - "Userinfo non pu\u00F2 essere specificato se l'host non \u00E8 specificato"}, - - { ER_NO_PORT_IF_NO_HOST, - "La porta non pu\u00F2 essere specificata se l'host non \u00E8 specificato"}, - - { ER_NO_QUERY_STRING_IN_PATH, - "La stringa di query non pu\u00F2 essere specificata nella stringa di percorso e query."}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "Il frammento non pu\u00F2 essere specificato sia nel percorso che nel frammento"}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Impossibile inizializzare l'URI con i parametri vuoti"}, - - { ER_METHOD_NOT_SUPPORTED, - "Metodo attualmente non supportato "}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "IncrementalSAXSource_Filter attualmente non riavviabile"}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "XMLReader non si trova prima della richiesta startParse"}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "Asse trasversale non supportato: {0}"}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "ListingErrorHandler creato con PrintWriter nullo."}, - - { ER_SYSTEMID_UNKNOWN, - "SystemId sconosciuto"}, - - { ER_LOCATION_UNKNOWN, - "Posizione sconosciuta dell'errore"}, - - { ER_PREFIX_MUST_RESOLVE, - "Il prefisso deve essere risolto in uno spazio di nomi: {0}"}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "createDocument() non supportato in XPathContext"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "L'elemento figlio dell'attributo non dispone di un documento proprietario."}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "L'elemento figlio dell'attributo non dispone di un elemento di documento proprietario."}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "Avvertenza: impossibile creare l'output del testo prima dell'elemento del documento. Operazione ignorata..."}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "Non possono esistere pi\u00F9 radici in un DOM."}, - - { ER_ARG_LOCALNAME_NULL, - "L'argomento 'localName' \u00E8 nullo"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "Localname in QNAME deve essere un NCName valido"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "Il prefisso in QNAME deve essere un NCName valido"}, - - { ER_NAME_CANT_START_WITH_COLON, - "Il nome non pu\u00F2 iniziare con i due punti"}, - - { "BAD_CODE", "Parametro per createMessage fuori limite"}, - { "FORMAT_FAILED", "Eccezione durante la chiamata messageFormat"}, - { "line", "N. riga"}, - { "column","N. colonna"}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "La classe serializzatore ''{0}'' non implementa org.xml.sax.ContentHandler."}, - - {ER_RESOURCE_COULD_NOT_FIND, - "Risorsa [ {0} ] non trovata.\n {1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "Impossibile caricare la risorsa [ {0} ]: {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Dimensione buffer <=0" }, - - {ER_INVALID_UTF16_SURROGATE, - "Rilevato surrogato UTF-16 non valido: {0}?" }, - - {ER_OIERROR, - "Errore IO" }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "Impossibile aggiungere l''attributo {0} dopo i nodi figlio o prima che sia prodotto un elemento. L''attributo verr\u00E0 ignorato."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "Lo spazio di nomi per il prefisso ''{0}'' non \u00E8 stato dichiarato." }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "Attributo ''{0}'' al di fuori dell''elemento." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "Dichiarazione dello spazio di nomi ''{0}''=''{1}'' al di fuori dell''elemento." }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "Impossibile caricare ''{0}'' (verificare CLASSPATH); verranno utilizzati i valori predefiniti"}, - - { ER_ILLEGAL_CHARACTER, - "Tentativo di eseguire l''output di un carattere di valore integrale {0} non rappresentato nella codifica di output {1} specificata."}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Impossibile caricare il file delle propriet\u00E0 ''{0}'' per il metodo di emissione ''{1}'' (verificare CLASSPATH)" } - - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - - protected Object[][] getContents() { - return contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java deleted file mode 100644 index f0f2b6f0f62..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * 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.xml.internal.res; - - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_ko extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String ER_ILLEGAL_CHARACTER = "ER_ILLEGAL_CHARACTER"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** The lookup table for error messages. */ - private static final Object[][] contents = { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "\uD568\uC218\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "\uC6D0\uC778\uC744 \uACB9\uCCD0 \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NO_DEFAULT_IMPL, - "\uAE30\uBCF8 \uAD6C\uD604\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "ChunkedIntArray({0})\uB294 \uD604\uC7AC \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "\uC624\uD504\uC14B\uC774 \uC2AC\uB86F\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4."}, - - { ER_COROUTINE_NOT_AVAIL, - "Coroutine\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ID={0}"}, - - { ER_COROUTINE_CO_EXIT, - "CoroutineManager\uAC00 co_exit() \uC694\uCCAD\uC744 \uC218\uC2E0\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_COJOINROUTINESET_FAILED, - "co_joinCoroutineSet()\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_COROUTINE_PARAM, - "Coroutine \uB9E4\uAC1C\uBCC0\uC218 \uC624\uB958({0})"}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\n\uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958: \uAD6C\uBB38 \uBD84\uC11D\uAE30 doTerminate\uAC00 {0}\uC5D0 \uC751\uB2F5\uD569\uB2C8\uB2E4."}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "\uAD6C\uBB38 \uBD84\uC11D \uC911 parse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "\uC624\uB958: {0} \uCD95\uC5D0 \uB300\uD574 \uC785\uB825\uB41C \uC774\uD130\uB808\uC774\uD130\uAC00 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "\uC624\uB958: {0} \uCD95\uC5D0 \uB300\uD55C \uC774\uD130\uB808\uC774\uD130\uAC00 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. "}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "\uC774\uD130\uB808\uC774\uD130 \uBCF5\uC81C\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_UNKNOWN_AXIS_TYPE, - "\uC54C \uC218 \uC5C6\uB294 \uCD95 \uC21C\uD68C \uC720\uD615: {0}"}, - - { ER_AXIS_NOT_SUPPORTED, - "\uCD95 \uC21C\uD658\uAE30\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C: {0}"}, - - { ER_NO_DTMIDS_AVAIL, - "\uB354 \uC774\uC0C1 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C DTM ID\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NOT_SUPPORTED, - "\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C: {0}"}, - - { ER_NODE_NON_NULL, - "\uB178\uB4DC\uB294 getDTMHandleFromNode\uC5D0 \uB300\uD574 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_COULD_NOT_RESOLVE_NODE, - "\uB178\uB4DC\uB97C \uD578\uB4E4\uB85C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_STARTPARSE_WHILE_PARSING, - "\uAD6C\uBB38 \uBD84\uC11D \uC911 startParse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "startParse\uC5D0\uB294 \uB110\uC774 \uC544\uB2CC SAXParser\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."}, - - { ER_COULD_NOT_INIT_PARSER, - "\uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_EXCEPTION_CREATING_POOL, - "\uD480\uC5D0 \uB300\uD55C \uC0C8 \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD558\uB294 \uC911 \uC608\uC678\uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "\uACBD\uB85C\uC5D0 \uBD80\uC801\uD569\uD55C \uC774\uC2A4\uCF00\uC774\uD504 \uC2DC\uD000\uC2A4\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_SCHEME_REQUIRED, - "\uCCB4\uACC4\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4!"}, - - { ER_NO_SCHEME_IN_URI, - "URI\uC5D0\uC11C \uCCB4\uACC4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_NO_SCHEME_INURI, - "URI\uC5D0\uC11C \uCCB4\uACC4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_PATH_INVALID_CHAR, - "\uACBD\uB85C\uC5D0 \uBD80\uC801\uD569\uD55C \uBB38\uC790\uAC00 \uD3EC\uD568\uB428: {0}"}, - - { ER_SCHEME_FROM_NULL_STRING, - "\uB110 \uBB38\uC790\uC5F4\uC5D0\uC11C \uCCB4\uACC4\uB97C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_SCHEME_NOT_CONFORMANT, - "\uCCB4\uACC4\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "\uD638\uC2A4\uD2B8\uAC00 \uC644\uC804\uD55C \uC8FC\uC18C\uAC00 \uC544\uB2D9\uB2C8\uB2E4."}, - - { ER_PORT_WHEN_HOST_NULL, - "\uD638\uC2A4\uD2B8\uAC00 \uB110\uC77C \uACBD\uC6B0 \uD3EC\uD2B8\uB97C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_INVALID_PORT, - "\uD3EC\uD2B8 \uBC88\uD638\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4."}, - - { ER_FRAG_FOR_GENERIC_URI, - "\uC77C\uBC18 URI\uC5D0 \uB300\uD574\uC11C\uB9CC \uBD80\uBD84\uC744 \uC124\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_FRAG_WHEN_PATH_NULL, - "\uACBD\uB85C\uAC00 \uB110\uC77C \uACBD\uC6B0 \uBD80\uBD84\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_FRAG_INVALID_CHAR, - "\uBD80\uBD84\uC5D0 \uBD80\uC801\uD569\uD55C \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_PARSER_IN_USE, - "\uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774\uBBF8 \uC0AC\uC6A9\uB418\uACE0 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "\uAD6C\uBB38 \uBD84\uC11D \uC911 {0} {1}\uC744(\uB97C) \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "\uC790\uCCB4 \uC778\uACFC \uAD00\uACC4\uB294 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_NO_USERINFO_IF_NO_HOST, - "\uD638\uC2A4\uD2B8\uB97C \uC9C0\uC815\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0\uC5D0\uB294 Userinfo\uB97C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NO_PORT_IF_NO_HOST, - "\uD638\uC2A4\uD2B8\uB97C \uC9C0\uC815\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0\uC5D0\uB294 \uD3EC\uD2B8\uB97C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NO_QUERY_STRING_IN_PATH, - "\uACBD\uB85C \uBC0F \uC9C8\uC758 \uBB38\uC790\uC5F4\uC5D0 \uC9C8\uC758 \uBB38\uC790\uC5F4\uC744 \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "\uACBD\uB85C\uC640 \uBD80\uBD84\uC5D0 \uBAA8\uB450 \uBD80\uBD84\uC744 \uC9C0\uC815\uD560 \uC218\uB294 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "\uBE48 \uB9E4\uAC1C\uBCC0\uC218\uB85C URI\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_METHOD_NOT_SUPPORTED, - "\uBA54\uC18C\uB4DC\uAC00 \uC544\uC9C1 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "\uD604\uC7AC IncrementalSAXSource_Filter\uB97C \uC7AC\uC2DC\uC791\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "startParse \uC694\uCCAD \uC804\uC5D0 XMLReader\uAC00 \uC2E4\uD589\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "\uCD95 \uC21C\uD658\uAE30\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C: {0}"}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "\uB110 PrintWriter\uB85C ListingErrorHandler\uAC00 \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4!"}, - - { ER_SYSTEMID_UNKNOWN, - "SystemId\uB97C \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_LOCATION_UNKNOWN, - "\uC624\uB958 \uC704\uCE58\uB97C \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_PREFIX_MUST_RESOLVE, - "\uC811\uB450\uC5B4\uB294 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB85C \uBD84\uC11D\uB418\uC5B4\uC57C \uD568: {0}"}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "XPathContext\uC5D0\uC11C\uB294 createDocument()\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "\uC18D\uC131 \uD558\uC704\uC5D0 \uC18C\uC720\uC790 \uBB38\uC11C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "\uC18D\uC131 \uD558\uC704\uC5D0 \uC18C\uC720\uC790 \uBB38\uC11C \uC694\uC18C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "\uACBD\uACE0: \uBB38\uC11C \uC694\uC18C \uC55E\uC5D0 \uD14D\uC2A4\uD2B8\uB97C \uCD9C\uB825\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4! \uBB34\uC2DC\uD558\uB294 \uC911..."}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "DOM\uC5D0\uC11C \uB8E8\uD2B8\uB97C \uB450 \uAC1C \uC774\uC0C1 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_ARG_LOCALNAME_NULL, - "'localName' \uC778\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4."}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "QNAME\uC758 Localname\uC740 \uC801\uD569\uD55C NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "QNAME\uC758 \uC811\uB450\uC5B4\uB294 \uC801\uD569\uD55C NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4."}, - - { ER_NAME_CANT_START_WITH_COLON, - "\uC774\uB984\uC740 \uCF5C\uB860\uC73C\uB85C \uC2DC\uC791\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { "BAD_CODE", "createMessage\uC5D0 \uB300\uD55C \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uBC94\uC704\uB97C \uBC97\uC5B4\uB0AC\uC2B5\uB2C8\uB2E4."}, - { "FORMAT_FAILED", "messageFormat \uD638\uCD9C \uC911 \uC608\uC678\uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."}, - { "line", "\uD589 \uBC88\uD638"}, - { "column","\uC5F4 \uBC88\uD638"}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "Serializer \uD074\uB798\uC2A4 ''{0}''\uC774(\uAC00) org.xml.sax.ContentHandler\uB97C \uAD6C\uD604\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."}, - - {ER_RESOURCE_COULD_NOT_FIND, - "[{0}] \uB9AC\uC18C\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n {1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "[{0}] \uB9AC\uC18C\uC2A4\uAC00 \uB2E4\uC74C\uC744 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC74C: {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\uBC84\uD37C \uD06C\uAE30 <=0" }, - - {ER_INVALID_UTF16_SURROGATE, - "\uBD80\uC801\uD569\uD55C UTF-16 \uB300\uB9AC \uC694\uC18C\uAC00 \uAC10\uC9C0\uB428: {0}" }, - - {ER_OIERROR, - "IO \uC624\uB958" }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "\uD558\uC704 \uB178\uB4DC\uAC00 \uC0DD\uC131\uB41C \uD6C4 \uB610\uB294 \uC694\uC18C\uAC00 \uC0DD\uC131\uB418\uAE30 \uC804\uC5D0 {0} \uC18D\uC131\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC18D\uC131\uC774 \uBB34\uC2DC\uB429\uB2C8\uB2E4."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "''{0}'' \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4." }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "''{0}'' \uC18D\uC131\uC774 \uC694\uC18C\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "\uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC120\uC5B8 ''{0}''=''{1}''\uC774(\uAC00) \uC694\uC18C\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "{0}\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. CLASSPATH\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \uD604\uC7AC \uAE30\uBCF8\uAC12\uB9CC \uC0AC\uC6A9\uD558\uB294 \uC911\uC785\uB2C8\uB2E4."}, - - { ER_ILLEGAL_CHARACTER, - "{1}\uC758 \uC9C0\uC815\uB41C \uCD9C\uB825 \uC778\uCF54\uB529\uC5D0\uC11C \uD45C\uC2DC\uB418\uC9C0 \uC54A\uB294 \uC815\uC218 \uAC12 {0}\uC758 \uBB38\uC790\uB97C \uCD9C\uB825\uD558\uB824\uACE0 \uC2DC\uB3C4\uD588\uC2B5\uB2C8\uB2E4."}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "\uCD9C\uB825 \uBA54\uC18C\uB4DC ''{1}''\uC5D0 \uB300\uD55C \uC18D\uC131 \uD30C\uC77C ''{0}''\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. CLASSPATH\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624." } - - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - - protected Object[][] getContents() { - return contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java deleted file mode 100644 index 37ef50ab4b0..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * 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.xml.internal.res; - - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_pt_BR extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String ER_ILLEGAL_CHARACTER = "ER_ILLEGAL_CHARACTER"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** The lookup table for error messages. */ - private static final Object[][] contents = { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "Fun\u00E7\u00E3o n\u00E3o suportada!"}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "N\u00E3o \u00E9 poss\u00EDvel substituir a causa"}, - - { ER_NO_DEFAULT_IMPL, - "Nenhuma implementa\u00E7\u00E3o padr\u00E3o encontrada "}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "ChunkedIntArray({0}) n\u00E3o suportado atualmente"}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "Deslocamento maior que o slot"}, - - { ER_COROUTINE_NOT_AVAIL, - "Co-rotina n\u00E3o dispon\u00EDvel, id={0}"}, - - { ER_COROUTINE_CO_EXIT, - "CoroutineManager recebeu a solicita\u00E7\u00E3o co_exit()"}, - - { ER_COJOINROUTINESET_FAILED, - "Falha em co_joinCoroutineSet()"}, - - { ER_COROUTINE_PARAM, - "Erro no par\u00E2metro da co-rotina ({0})"}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\nINESPERADO: Parser doTerminate responde {0}"}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "o parsing n\u00E3o pode ser chamado durante o parsing"}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Erro: iterador digitado para o eixo {0} n\u00E3o implementado"}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Erro: iterador para o eixo {0} n\u00E3o implementado "}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "clonagem do iterador n\u00E3o suportada"}, - - { ER_UNKNOWN_AXIS_TYPE, - "Tipo transversal de eixo desconhecido: {0}"}, - - { ER_AXIS_NOT_SUPPORTED, - "Transversor de eixo n\u00E3o suportado: {0}"}, - - { ER_NO_DTMIDS_AVAIL, - "N\u00E3o h\u00E1 mais IDs de DTM dispon\u00EDveis"}, - - { ER_NOT_SUPPORTED, - "N\u00E3o suportado: {0}"}, - - { ER_NODE_NON_NULL, - "O n\u00F3 deve ser n\u00E3o-nulo para getDTMHandleFromNode"}, - - { ER_COULD_NOT_RESOLVE_NODE, - "N\u00E3o foi poss\u00EDvel resolver o n\u00F3 para um handle"}, - - { ER_STARTPARSE_WHILE_PARSING, - "startParse n\u00E3o pode ser chamado durante o parsing"}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "startParse requer um SAXParser n\u00E3o nulo"}, - - { ER_COULD_NOT_INIT_PARSER, - "n\u00E3o foi poss\u00EDvel inicializar o parser com"}, - - { ER_EXCEPTION_CREATING_POOL, - "exce\u00E7\u00E3o ao criar a nova inst\u00E2ncia do pool"}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "O caminho cont\u00E9m uma sequ\u00EAncia inv\u00E1lida de caracteres de escape"}, - - { ER_SCHEME_REQUIRED, - "O esquema \u00E9 obrigat\u00F3rio!"}, - - { ER_NO_SCHEME_IN_URI, - "Nenhum esquema encontrado no URI: {0}"}, - - { ER_NO_SCHEME_INURI, - "Nenhum esquema encontrado no URI"}, - - { ER_PATH_INVALID_CHAR, - "O caminho cont\u00E9m um caractere inv\u00E1lido: {0}"}, - - { ER_SCHEME_FROM_NULL_STRING, - "N\u00E3o \u00E9 poss\u00EDvel definir o esquema de uma string nula"}, - - { ER_SCHEME_NOT_CONFORMANT, - "O esquema n\u00E3o \u00E9 compat\u00EDvel."}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "O host n\u00E3o \u00E9 um endere\u00E7o correto"}, - - { ER_PORT_WHEN_HOST_NULL, - "A porta n\u00E3o pode ser definida quando o host \u00E9 nulo"}, - - { ER_INVALID_PORT, - "N\u00FAmero de porta inv\u00E1lido"}, - - { ER_FRAG_FOR_GENERIC_URI, - "O fragmento s\u00F3 pode ser definido para um URI gen\u00E9rico"}, - - { ER_FRAG_WHEN_PATH_NULL, - "O fragmento n\u00E3o pode ser definido quando o caminho \u00E9 nulo"}, - - { ER_FRAG_INVALID_CHAR, - "O fragmento cont\u00E9m um caractere inv\u00E1lido"}, - - { ER_PARSER_IN_USE, - "O parser j\u00E1 est\u00E1 sendo usado"}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "N\u00E3o \u00E9 poss\u00EDvel alterar {0} {1} durante o parsing"}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "Autoaverigua\u00E7\u00E3o n\u00E3o permitida"}, - - { ER_NO_USERINFO_IF_NO_HOST, - "As informa\u00E7\u00F5es do usu\u00E1rio n\u00E3o podem ser especificadas se o host n\u00E3o tiver sido especificado"}, - - { ER_NO_PORT_IF_NO_HOST, - "A porta n\u00E3o pode ser especificada se o host n\u00E3o tiver sido especificado"}, - - { ER_NO_QUERY_STRING_IN_PATH, - "A string de consulta n\u00E3o pode ser especificada no caminho nem na string de consulta"}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "O fragmento n\u00E3o pode ser especificado no caminho nem no fragmento"}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "N\u00E3o \u00E9 poss\u00EDvel inicializar o URI com par\u00E2metros vazios"}, - - { ER_METHOD_NOT_SUPPORTED, - "M\u00E9todo ainda n\u00E3o suportado "}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "IncrementalSAXSource_Filter atualmente n\u00E3o reinicializ\u00E1vel"}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "XMLReader n\u00E3o anterior \u00E0 solicita\u00E7\u00E3o de startParse"}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "Transversor de eixo n\u00E3o suportado: {0}"}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "ListingErrorHandler criado com PrintWriter nulo!"}, - - { ER_SYSTEMID_UNKNOWN, - "SystemId Desconhecido"}, - - { ER_LOCATION_UNKNOWN, - "Localiza\u00E7\u00E3o de erro desconhecida"}, - - { ER_PREFIX_MUST_RESOLVE, - "O prefixo deve ser resolvido para um namespace: {0}"}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "createDocument() n\u00E3o suportado no XPathContext!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "O filho do atributo n\u00E3o tem um documento do propriet\u00E1rio!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "O filho do atributo n\u00E3o tem um elemento do documento do propriet\u00E1rio!"}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "Advert\u00EAncia: n\u00E3o pode haver texto antes do elemento do documento! Ignorando..."}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "N\u00E3o pode ter mais de uma raiz em um DOM!"}, - - { ER_ARG_LOCALNAME_NULL, - "O argumento 'localName' \u00E9 nulo"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "Localname em QNAME deve ser um NCName v\u00E1lido"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "O prefixo em QNAME deve ser um NCName v\u00E1lido"}, - - { ER_NAME_CANT_START_WITH_COLON, - "O nome n\u00E3o pode come\u00E7ar com dois pontos"}, - - { "BAD_CODE", "O par\u00E2metro para createMessage estava fora dos limites"}, - { "FORMAT_FAILED", "Exce\u00E7\u00E3o gerada durante a chamada messageFormat"}, - { "line", "N\u00B0 da Linha"}, - { "column","N\u00B0 da Coluna"}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "A classe ''{0}'' do serializador n\u00E3o implementa org.xml.sax.ContentHandler."}, - - {ER_RESOURCE_COULD_NOT_FIND, - "N\u00E3o foi poss\u00EDvel encontrar o recurso [ {0} ].\n {1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "O recurso [ {0} ] n\u00E3o foi carregado: {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Tamanho do buffer <=0" }, - - {ER_INVALID_UTF16_SURROGATE, - "Foi detectado um substituto de UTF-16 inv\u00E1lido: {0} ?" }, - - {ER_OIERROR, - "Erro de E/S" }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "N\u00E3o \u00E9 poss\u00EDvel adicionar o atributo {0} depois dos n\u00F3s filhos ou antes que um elemento seja produzido. O atributo ser\u00E1 ignorado."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "O namespace do prefixo ''{0}'' n\u00E3o foi declarado." }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "Atributo ''{0}'' fora do elemento." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "Declara\u00E7\u00E3o de namespace ''{0}''=''{1}'' fora do elemento." }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "N\u00E3o foi poss\u00EDvel carregar ''{0}'' (verificar CLASSPATH); usando agora apenas os padr\u00F5es"}, - - { ER_ILLEGAL_CHARACTER, - "Tentativa de exibir um caractere de valor integral {0} que n\u00E3o est\u00E1 representado na codifica\u00E7\u00E3o de sa\u00EDda especificada de {1}."}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "N\u00E3o foi poss\u00EDvel carregar o arquivo de propriedade ''{0}'' para o m\u00E9todo de sa\u00EDda ''{1}'' (verificar CLASSPATH)" } - - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - - protected Object[][] getContents() { - return contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sk.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sk.java deleted file mode 100644 index 5f7eb31248a..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sk.java +++ /dev/null @@ -1,442 +0,0 @@ -/* - * 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.xml.internal.res; - - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_sk extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - private static final Object[][] _contents = new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "Funkcia nie je podporovan\u00e1!"}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "Nie je mo\u017en\u00e9 prep\u00edsa\u0165 pr\u00ed\u010dinu"}, - - { ER_NO_DEFAULT_IMPL, - "Nebola n\u00e1jden\u00e1 \u017eiadna predvolen\u00e1 implement\u00e1cia "}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "ChunkedIntArray({0}) nie je moment\u00e1lne podporovan\u00fd"}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "Offset v\u00e4\u010d\u0161\u00ed, ne\u017e z\u00e1suvka"}, - - { ER_COROUTINE_NOT_AVAIL, - "Korutina nie je dostupn\u00e1, id={0}"}, - - { ER_COROUTINE_CO_EXIT, - "CoroutineManager obdr\u017eal po\u017eiadavku co_exit()"}, - - { ER_COJOINROUTINESET_FAILED, - "zlyhal co_joinCoroutineSet()"}, - - { ER_COROUTINE_PARAM, - "Chyba parametra korutiny ({0})"}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\nNEO\u010cAK\u00c1VAN\u00c9: Analyz\u00e1tor doTerminate odpoved\u00e1 {0}"}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "syntaktick\u00fd analyz\u00e1tor nem\u00f4\u017ee by\u0165 volan\u00fd po\u010das vykon\u00e1vania anal\u00fdzy"}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Chyba: nap\u00edsan\u00fd iter\u00e1tor pre os {0} nie je implementovan\u00fd"}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Chyba: iter\u00e1tor pre os {0} nie je implementovan\u00fd "}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "Klon iter\u00e1tora nie je podporovan\u00fd"}, - - { ER_UNKNOWN_AXIS_TYPE, - "Nezn\u00e1my typ pret\u00ednania os\u00ed: {0}"}, - - { ER_AXIS_NOT_SUPPORTED, - "Pret\u00ednanie os\u00ed nie je podporovan\u00e9: {0}"}, - - { ER_NO_DTMIDS_AVAIL, - "\u017diadne \u010fal\u0161ie DTM ID nie s\u00fa dostupn\u00e9"}, - - { ER_NOT_SUPPORTED, - "Nie je podporovan\u00e9: {0}"}, - - { ER_NODE_NON_NULL, - "Pre getDTMHandleFromNode mus\u00ed by\u0165 uzol nenulov\u00fd"}, - - { ER_COULD_NOT_RESOLVE_NODE, - "Nebolo mo\u017en\u00e9 ur\u010di\u0165 uzol na spracovanie"}, - - { ER_STARTPARSE_WHILE_PARSING, - "startParse nem\u00f4\u017ee by\u0165 volan\u00fd po\u010das vykon\u00e1vania anal\u00fdzy"}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "startParse potrebuje nenulov\u00fd SAXParser"}, - - { ER_COULD_NOT_INIT_PARSER, - "nebolo mo\u017en\u00e9 inicializova\u0165 syntaktick\u00fd analyz\u00e1tor pomocou"}, - - { ER_EXCEPTION_CREATING_POOL, - "v\u00fdnimka vytv\u00e1rania novej in\u0161tancie oblasti"}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Cesta obsahuje neplatn\u00fa \u00fanikov\u00fa sekvenciu"}, - - { ER_SCHEME_REQUIRED, - "Je po\u017eadovan\u00e1 sch\u00e9ma!"}, - - { ER_NO_SCHEME_IN_URI, - "V URI sa nena\u0161la \u017eiadna sch\u00e9ma: {0}"}, - - { ER_NO_SCHEME_INURI, - "V URI nebola n\u00e1jden\u00e1 \u017eiadna sch\u00e9ma"}, - - { ER_PATH_INVALID_CHAR, - "Cesta obsahuje neplatn\u00fd znak: {0}"}, - - { ER_SCHEME_FROM_NULL_STRING, - "Nie je mo\u017en\u00e9 stanovi\u0165 sch\u00e9mu z nulov\u00e9ho re\u0165azca"}, - - { ER_SCHEME_NOT_CONFORMANT, - "Nezhodn\u00e1 sch\u00e9ma."}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "Hostite\u013e nie je spr\u00e1vne form\u00e1tovan\u00e1 adresa"}, - - { ER_PORT_WHEN_HOST_NULL, - "Nem\u00f4\u017ee by\u0165 stanoven\u00fd port, ak je hostite\u013e null"}, - - { ER_INVALID_PORT, - "Neplatn\u00e9 \u010d\u00edslo portu"}, - - { ER_FRAG_FOR_GENERIC_URI, - "Fragment m\u00f4\u017ee by\u0165 stanoven\u00fd len pre v\u0161eobecn\u00e9 URI"}, - - { ER_FRAG_WHEN_PATH_NULL, - "Ak je cesta nulov\u00e1, nem\u00f4\u017ee by\u0165 stanoven\u00fd fragment"}, - - { ER_FRAG_INVALID_CHAR, - "Fragment obsahuje neplatn\u00fd znak"}, - - { ER_PARSER_IN_USE, - "Syntaktick\u00fd analyz\u00e1tor je u\u017e pou\u017e\u00edvan\u00fd"}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "Nie je mo\u017en\u00e9 zmeni\u0165 {0} {1} po\u010das vykon\u00e1vania anal\u00fdzy"}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "Samozapr\u00ed\u010dinenie nie je povolen\u00e9"}, - - { ER_NO_USERINFO_IF_NO_HOST, - "Ak nebol zadan\u00fd hostite\u013e, mo\u017eno nebolo zadan\u00e9 userinfo"}, - - { ER_NO_PORT_IF_NO_HOST, - "Ak nebol zadan\u00fd hostite\u013e, mo\u017eno nebol zadan\u00fd port"}, - - { ER_NO_QUERY_STRING_IN_PATH, - "Re\u0165azec dotazu nem\u00f4\u017ee by\u0165 zadan\u00fd v ceste a re\u0165azci dotazu"}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment nem\u00f4\u017ee by\u0165 zadan\u00fd v ceste, ani vo fragmente"}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Nie je mo\u017en\u00e9 inicializova\u0165 URI s pr\u00e1zdnymi parametrami"}, - - { ER_METHOD_NOT_SUPPORTED, - "Met\u00f3da e\u0161te nie je podporovan\u00e1 "}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "IncrementalSAXSource_Filter nie je moment\u00e1lne re\u0161tartovate\u013en\u00fd"}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "XMLReader nepredch\u00e1dza po\u017eiadavke na startParse"}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "Pret\u00ednanie os\u00ed nie je podporovan\u00e9: {0}"}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "ListingErrorHandler vytvoren\u00fd s nulov\u00fdm PrintWriter!"}, - - { ER_SYSTEMID_UNKNOWN, - "Nezn\u00e1me SystemId"}, - - { ER_LOCATION_UNKNOWN, - "Nezn\u00e1me miesto v\u00fdskytu chyby"}, - - { ER_PREFIX_MUST_RESOLVE, - "Predpona sa mus\u00ed rozl\u00ed\u0161i\u0165 do n\u00e1zvov\u00e9ho priestoru: {0}"}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "createDocument() nie je podporovan\u00e9 XPathContext!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "Potomok atrib\u00fatu nem\u00e1 dokument vlastn\u00edka!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "Potomok atrib\u00fatu nem\u00e1 s\u00fa\u010das\u0165 dokumentu vlastn\u00edka!"}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "Upozornenie: nemo\u017eno vypusti\u0165 text pred elementom dokumentu! Ignorovanie..."}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "Nie je mo\u017en\u00e9 ma\u0165 viac, ne\u017e jeden kore\u0148 DOM!"}, - - { ER_ARG_LOCALNAME_NULL, - "Argument 'localName' je null"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "Lok\u00e1lny n\u00e1zov v QNAME by mal by\u0165 platn\u00fdm NCName"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "Predpona v QNAME by mala by\u0165 platn\u00fdm NCName"}, - - { "BAD_CODE", "Parameter na createMessage bol mimo ohrani\u010denia"}, - { "FORMAT_FAILED", "V\u00fdnimka po\u010das volania messageFormat"}, - { "line", "Riadok #"}, - { "column","St\u013apec #"}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "Trieda serializ\u00e1tora ''{0}'' neimplementuje org.xml.sax.ContentHandler."}, - - {ER_RESOURCE_COULD_NOT_FIND, - "Prostriedok [ {0} ] nemohol by\u0165 n\u00e1jden\u00fd.\n {1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "Prostriedok [ {0} ] sa nedal na\u010d\u00edta\u0165: {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Ve\u013ekos\u0165 vyrovn\u00e1vacej pam\u00e4te <=0" }, - - {ER_INVALID_UTF16_SURROGATE, - "Bolo zisten\u00e9 neplatn\u00e9 nahradenie UTF-16: {0} ?" }, - - {ER_OIERROR, - "chyba IO" }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "Nie je mo\u017en\u00e9 prida\u0165 atrib\u00fat {0} po uzloch potomka alebo pred vytvoren\u00edm elementu. Atrib\u00fat bude ignorovan\u00fd."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "N\u00e1zvov\u00fd priestor pre predponu ''{0}'' nebol deklarovan\u00fd." }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "Atrib\u00fat ''{0}'' je mimo elementu." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "Deklar\u00e1cia n\u00e1zvov\u00e9ho priestoru ''{0}''=''{1}'' je mimo elementu." }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "Nedalo sa na\u010d\u00edta\u0165 ''{0}'' (skontrolujte CLASSPATH), pou\u017e\u00edvaj\u00fa sa predvolen\u00e9 hodnoty"}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Nedal sa na\u010d\u00edta\u0165 s\u00fabor vlastnost\u00ed ''{0}'' pre v\u00fdstupn\u00fa met\u00f3du ''{1}'' (skontrolujte CLASSPATH)" } - - - }; - - /** - * Get the lookup table for error messages - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java deleted file mode 100644 index 417d3543bc5..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * 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.xml.internal.res; - - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_sv extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String ER_ILLEGAL_CHARACTER = "ER_ILLEGAL_CHARACTER"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** The lookup table for error messages. */ - private static final Object[][] contents = { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "Funktionen st\u00F6ds inte!"}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "Orsak kan inte skrivas \u00F6ver"}, - - { ER_NO_DEFAULT_IMPL, - "Hittade ingen standardimplementering "}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "ChunkedIntArray({0}) underst\u00F6ds f\u00F6r n\u00E4rvarande inte"}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "Offset st\u00F6rre \u00E4n plats"}, - - { ER_COROUTINE_NOT_AVAIL, - "Sidorutin \u00E4r inte tillg\u00E4nglig, id={0}"}, - - { ER_COROUTINE_CO_EXIT, - "CoroutineManager har tagit emot co_exit()-beg\u00E4ran"}, - - { ER_COJOINROUTINESET_FAILED, - "co_joinCoroutineSet() utf\u00F6rdes inte"}, - - { ER_COROUTINE_PARAM, - "Parameterfel f\u00F6r sidorutin ({0})"}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\nUNEXPECTED: Parsersvar {0} f\u00F6r doTerminate"}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "parse f\u00E5r inte anropas medan tolkning sker"}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Fel: typad iterator f\u00F6r axeln {0} har inte implementerats"}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Fel: iterator f\u00F6r axeln {0} har inte implementerats "}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "Iteratorklon underst\u00F6ds inte"}, - - { ER_UNKNOWN_AXIS_TYPE, - "Ok\u00E4nd axeltraverstyp: {0}"}, - - { ER_AXIS_NOT_SUPPORTED, - "Axeltravers underst\u00F6ds inte: {0}"}, - - { ER_NO_DTMIDS_AVAIL, - "Inga fler DTM-id:n \u00E4r tillg\u00E4ngliga"}, - - { ER_NOT_SUPPORTED, - "Underst\u00F6ds inte: {0}"}, - - { ER_NODE_NON_NULL, - "Nod m\u00E5ste vara icke-null f\u00F6r getDTMHandleFromNode"}, - - { ER_COULD_NOT_RESOLVE_NODE, - "Kunde inte matcha noden med en referens"}, - - { ER_STARTPARSE_WHILE_PARSING, - "startParse f\u00E5r inte anropas medan tolkning sker"}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "startParse beh\u00F6ver en SAXParser som \u00E4r icke-null"}, - - { ER_COULD_NOT_INIT_PARSER, - "kunde inte initiera parser med"}, - - { ER_EXCEPTION_CREATING_POOL, - "undantag skapar ny instans f\u00F6r pool"}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "S\u00F6kv\u00E4gen inneh\u00E5ller en ogiltig escape-sekvens"}, - - { ER_SCHEME_REQUIRED, - "Schema kr\u00E4vs!"}, - - { ER_NO_SCHEME_IN_URI, - "Schema saknas i URI: {0}"}, - - { ER_NO_SCHEME_INURI, - "Schema saknas i URI"}, - - { ER_PATH_INVALID_CHAR, - "S\u00F6kv\u00E4gen inneh\u00E5ller ett ogiltigt tecken: {0}"}, - - { ER_SCHEME_FROM_NULL_STRING, - "Kan inte st\u00E4lla in schema fr\u00E5n null-str\u00E4ng"}, - - { ER_SCHEME_NOT_CONFORMANT, - "Schemat \u00E4r inte likformigt."}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "V\u00E4rd \u00E4r inte en v\u00E4lformulerad adress"}, - - { ER_PORT_WHEN_HOST_NULL, - "Port kan inte st\u00E4llas in n\u00E4r v\u00E4rd \u00E4r null"}, - - { ER_INVALID_PORT, - "Ogiltigt portnummer"}, - - { ER_FRAG_FOR_GENERIC_URI, - "Fragment kan bara st\u00E4llas in f\u00F6r en allm\u00E4n URI"}, - - { ER_FRAG_WHEN_PATH_NULL, - "Fragment kan inte st\u00E4llas in n\u00E4r s\u00F6kv\u00E4g \u00E4r null"}, - - { ER_FRAG_INVALID_CHAR, - "Fragment inneh\u00E5ller ett ogiltigt tecken"}, - - { ER_PARSER_IN_USE, - "Parser anv\u00E4nds redan"}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "Kan inte \u00E4ndra {0} {1} medan tolkning sker"}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "Sj\u00E4lvorsakande inte till\u00E5ten"}, - - { ER_NO_USERINFO_IF_NO_HOST, - "Anv\u00E4ndarinfo f\u00E5r inte anges om v\u00E4rden inte \u00E4r angiven"}, - - { ER_NO_PORT_IF_NO_HOST, - "Port f\u00E5r inte anges om v\u00E4rden inte \u00E4r angiven"}, - - { ER_NO_QUERY_STRING_IN_PATH, - "Fr\u00E5gestr\u00E4ng kan inte anges i b\u00E5de s\u00F6kv\u00E4gen och fr\u00E5gestr\u00E4ngen"}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment kan inte anges i b\u00E5de s\u00F6kv\u00E4gen och fragmentet"}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Kan inte initiera URI med tomma parametrar"}, - - { ER_METHOD_NOT_SUPPORTED, - "Metoden st\u00F6ds \u00E4nnu inte "}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "IncrementalSAXSource_Filter kan f\u00F6r n\u00E4rvarande inte startas om"}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "XMLReader inte f\u00F6re startParse-beg\u00E4ran"}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "Axeltravers underst\u00F6ds inte: {0}"}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "ListingErrorHandler skapad med null PrintWriter!"}, - - { ER_SYSTEMID_UNKNOWN, - "SystemId ok\u00E4nt"}, - - { ER_LOCATION_UNKNOWN, - "Platsen f\u00F6r felet \u00E4r ok\u00E4nd"}, - - { ER_PREFIX_MUST_RESOLVE, - "Prefix m\u00E5ste matchas till en namnrymd: {0}"}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "createDocument() st\u00F6ds inte i XPathContext!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "Underordnat attribut har inget \u00E4gardokument!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "Underordnat attribut har inget \u00E4gardokumentelement!"}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "Varning: utdatatext kan inte skrivas ut f\u00F6re dokumentelement! Ignoreras..."}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "En DOM kan inte ha fler \u00E4n en rot!"}, - - { ER_ARG_LOCALNAME_NULL, - "Argumentet 'localName' \u00E4r null"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "Localname i QNAME b\u00F6r vara giltigt NCName"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "Prefix i QNAME b\u00F6r vara giltigt NCName"}, - - { ER_NAME_CANT_START_WITH_COLON, - "Namnet kan inte b\u00F6rja med kolon"}, - - { "BAD_CODE", "Parameter f\u00F6r createMessage ligger utanf\u00F6r gr\u00E4nsv\u00E4rdet"}, - { "FORMAT_FAILED", "Undantag utl\u00F6st vid messageFormat-anrop"}, - { "line", "Rad nr"}, - { "column","Kolumn nr"}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "Serializerklassen ''{0}'' implementerar inte org.xml.sax.ContentHandler."}, - - {ER_RESOURCE_COULD_NOT_FIND, - "Resursen [ {0} ] kunde inte h\u00E4mtas.\n {1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "Resursen [ {0} ] kunde inte laddas: {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Buffertstorlek <=0" }, - - {ER_INVALID_UTF16_SURROGATE, - "Ogiltigt UTF-16-surrogat uppt\u00E4ckt: {0} ?" }, - - {ER_OIERROR, - "IO-fel" }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "Kan inte l\u00E4gga till attributet {0} efter underordnade noder eller innan ett element har skapats. Attributet ignoreras."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "Namnrymd f\u00F6r prefix ''{0}'' har inte deklarerats." }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "Attributet ''{0}'' finns utanf\u00F6r elementet." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "Namnrymdsdeklarationen ''{0}''=''{1}'' finns utanf\u00F6r element." }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "Kunde inte ladda ''{0}'' (kontrollera CLASSPATH), anv\u00E4nder nu enbart standardv\u00E4rden"}, - - { ER_ILLEGAL_CHARACTER, - "F\u00F6rs\u00F6k att skriva utdatatecken med integralv\u00E4rdet {0} som inte \u00E4r representerat i angiven utdatakodning av {1}."}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Kunde inte ladda egenskapsfilen ''{0}'' f\u00F6r utdatametoden ''{1}'' (kontrollera CLASSPATH)" } - - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - - protected Object[][] getContents() { - return contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_tr.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_tr.java deleted file mode 100644 index 12a64e74b91..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_tr.java +++ /dev/null @@ -1,442 +0,0 @@ -/* - * 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.xml.internal.res; - - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_tr extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - private static final Object[][] _contents = new Object[][] { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "\u0130\u015flev desteklenmiyor!"}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "Nedenin \u00fczerine yaz\u0131lamaz"}, - - { ER_NO_DEFAULT_IMPL, - "Varsay\u0131lan uygulama bulunamad\u0131"}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "ChunkedIntArray({0}) \u015fu an desteklenmiyor"}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "G\u00f6reli konum yuvadan b\u00fcy\u00fck"}, - - { ER_COROUTINE_NOT_AVAIL, - "Coroutine kullan\u0131lam\u0131yor, id={0}"}, - - { ER_COROUTINE_CO_EXIT, - "CoroutineManager co_exit() iste\u011fi ald\u0131"}, - - { ER_COJOINROUTINESET_FAILED, - "co_joinCoroutineSet() ba\u015far\u0131s\u0131z oldu"}, - - { ER_COROUTINE_PARAM, - "Coroutine de\u011fi\u015ftirgesi hatas\u0131 ({0})"}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\nBEKLENMEYEN: Parser doTerminate yan\u0131t\u0131 {0}"}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "Ayr\u0131\u015ft\u0131rma s\u0131ras\u0131nda parse \u00e7a\u011fr\u0131lamaz"}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Hata: {0} ekseni i\u00e7in tip atanm\u0131\u015f yineleyici ger\u00e7ekle\u015ftirilmedi"}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "Hata: {0} ekseni i\u00e7in yineleyici ger\u00e7ekle\u015ftirilmedi"}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "Yineleyici e\u015fkopyas\u0131 desteklenmiyor"}, - - { ER_UNKNOWN_AXIS_TYPE, - "Bilinmeyen eksen dola\u015fma tipi: {0}"}, - - { ER_AXIS_NOT_SUPPORTED, - "Eksen dola\u015f\u0131c\u0131 desteklenmiyor: {0}"}, - - { ER_NO_DTMIDS_AVAIL, - "Kullan\u0131labilecek ba\u015fka DTM tan\u0131t\u0131c\u0131s\u0131 yok"}, - - { ER_NOT_SUPPORTED, - "Desteklenmiyor: {0}"}, - - { ER_NODE_NON_NULL, - "getDTMHandleFromNode i\u00e7in d\u00fc\u011f\u00fcm bo\u015f de\u011ferli olmamal\u0131d\u0131r"}, - - { ER_COULD_NOT_RESOLVE_NODE, - "D\u00fc\u011f\u00fcm tan\u0131t\u0131c\u0131 de\u011fere \u00e7\u00f6z\u00fclemedi"}, - - { ER_STARTPARSE_WHILE_PARSING, - "Ayr\u0131\u015ft\u0131rma s\u0131ras\u0131nda startParse \u00e7a\u011fr\u0131lamaz"}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "startParse i\u00e7in bo\u015f de\u011ferli olmayan SAXParser gerekiyor"}, - - { ER_COULD_NOT_INIT_PARSER, - "Ayr\u0131\u015ft\u0131r\u0131c\u0131 bununla kullan\u0131ma haz\u0131rlanamad\u0131"}, - - { ER_EXCEPTION_CREATING_POOL, - "Havuz i\u00e7in yeni \u00f6rnek yarat\u0131l\u0131rken kural d\u0131\u015f\u0131 durum"}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Yol ge\u00e7ersiz ka\u00e7\u0131\u015f dizisi i\u00e7eriyor"}, - - { ER_SCHEME_REQUIRED, - "\u015eema gerekli!"}, - - { ER_NO_SCHEME_IN_URI, - "URI i\u00e7inde \u015fema bulunamad\u0131: {0}"}, - - { ER_NO_SCHEME_INURI, - "URI i\u00e7inde \u015fema bulunamad\u0131"}, - - { ER_PATH_INVALID_CHAR, - "Yol ge\u00e7ersiz karakter i\u00e7eriyor: {0}"}, - - { ER_SCHEME_FROM_NULL_STRING, - "Bo\u015f de\u011ferli dizgiden \u015fema tan\u0131mlanamaz"}, - - { ER_SCHEME_NOT_CONFORMANT, - "\u015eema uyumlu de\u011fil."}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "Anasistem do\u011fru bi\u00e7imli bir adres de\u011fil"}, - - { ER_PORT_WHEN_HOST_NULL, - "Anasistem bo\u015f de\u011ferliyken kap\u0131 tan\u0131mlanamaz"}, - - { ER_INVALID_PORT, - "Kap\u0131 numaras\u0131 ge\u00e7ersiz"}, - - { ER_FRAG_FOR_GENERIC_URI, - "Par\u00e7a yaln\u0131zca soysal URI i\u00e7in tan\u0131mlanabilir"}, - - { ER_FRAG_WHEN_PATH_NULL, - "Yol bo\u015f de\u011ferliyken par\u00e7a tan\u0131mlanamaz"}, - - { ER_FRAG_INVALID_CHAR, - "Par\u00e7a ge\u00e7ersiz karakter i\u00e7eriyor"}, - - { ER_PARSER_IN_USE, - "Ayr\u0131\u015ft\u0131r\u0131c\u0131 kullan\u0131mda"}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "Ayr\u0131\u015ft\u0131rma s\u0131ras\u0131nda {0} {1} de\u011fi\u015ftirilemez"}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "\u00d6znedenselli\u011fe izin verilmez"}, - - { ER_NO_USERINFO_IF_NO_HOST, - "Anasistem belirtilmediyse kullan\u0131c\u0131 bilgisi belirtilemez"}, - - { ER_NO_PORT_IF_NO_HOST, - "Anasistem belirtilmediyse kap\u0131 belirtilemez"}, - - { ER_NO_QUERY_STRING_IN_PATH, - "Yol ve sorgu dizgisinde sorgu dizgisi belirtilemez"}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "Par\u00e7a hem yolda, hem de par\u00e7ada belirtilemez"}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Bo\u015f de\u011fi\u015ftirgelerle URI kullan\u0131ma haz\u0131rlanamaz"}, - - { ER_METHOD_NOT_SUPPORTED, - "Y\u00f6ntem hen\u00fcz desteklenmiyor"}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "IncrementalSAXSource_Filter \u015fu an yeniden ba\u015flat\u0131labilir durumda de\u011fil"}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "XMLReader, startParse iste\u011finden \u00f6nce olmaz"}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "Eksen dola\u015f\u0131c\u0131 desteklenmiyor: {0}"}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "ListingErrorHandler bo\u015f de\u011ferli PrintWriter ile yarat\u0131ld\u0131!"}, - - { ER_SYSTEMID_UNKNOWN, - "SystemId bilinmiyor"}, - - { ER_LOCATION_UNKNOWN, - "Hata yeri bilinmiyor"}, - - { ER_PREFIX_MUST_RESOLVE, - "\u00d6nek bir ad alan\u0131na \u00e7\u00f6z\u00fclmelidir: {0}"}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "XPathContext i\u00e7inde createDocument() desteklenmiyor!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "\u00d6zniteli\u011fin alt \u00f6\u011fesinin iye belgesi yok!"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "\u00d6zniteli\u011fin alt \u00f6\u011fesinin iye belge \u00f6\u011fesi yok!"}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "Uyar\u0131: Belge \u00f6\u011fesinden \u00f6nce metin \u00e7\u0131k\u0131\u015f\u0131 olamaz! Yoksay\u0131l\u0131yor..."}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "DOM \u00fczerinde birden fazla k\u00f6k olamaz!"}, - - { ER_ARG_LOCALNAME_NULL, - "'localName' ba\u011f\u0131ms\u0131z de\u011fi\u015ftirgesi bo\u015f de\u011ferli"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "QNAME i\u00e7indeki yerel ad (localname) ge\u00e7erli bir NCName olmal\u0131d\u0131r"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "QNAME i\u00e7indeki \u00f6nek ge\u00e7erli bir NCName olmal\u0131d\u0131r"}, - - { "BAD_CODE", "createMessage i\u00e7in kullan\u0131lan de\u011fi\u015ftirge s\u0131n\u0131rlar\u0131n d\u0131\u015f\u0131nda"}, - { "FORMAT_FAILED", "messageFormat \u00e7a\u011fr\u0131s\u0131 s\u0131ras\u0131nda kural d\u0131\u015f\u0131 durum yay\u0131nland\u0131"}, - { "line", "Sat\u0131r #"}, - { "column","Kolon #"}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "Diziselle\u015ftirici s\u0131n\u0131f\u0131 ''{0}'' org.xml.sax.ContentHandler i\u015flevini uygulam\u0131yor."}, - - {ER_RESOURCE_COULD_NOT_FIND, - "Kaynak [ {0} ] bulunamad\u0131.\n {1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "Kaynak [ {0} ] y\u00fckleyemedi: {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Arabellek b\u00fcy\u00fckl\u00fc\u011f\u00fc <=0" }, - - {ER_INVALID_UTF16_SURROGATE, - "UTF-16 yerine kullan\u0131lan de\u011fer ge\u00e7ersiz: {0} ?" }, - - {ER_OIERROR, - "G\u00c7 hatas\u0131" }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "Alt d\u00fc\u011f\u00fcmlerden sonra ya da bir \u00f6\u011fe \u00fcretilmeden \u00f6nce {0} \u00f6zniteli\u011fi eklenemez. \u00d6znitelik yoksay\u0131lacak."}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "''{0}'' \u00f6nekine ili\u015fkin ad alan\u0131 bildirilmedi." }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "''{0}'' \u00f6zniteli\u011fi \u00f6\u011fenin d\u0131\u015f\u0131nda." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "''{0}''=''{1}'' ad alan\u0131 bildirimi \u00f6\u011fenin d\u0131\u015f\u0131nda." }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "''{0}'' y\u00fcklenemedi (CLASSPATH de\u011fi\u015fkeninizi inceleyin), yaln\u0131zca varsay\u0131lanlar kullan\u0131l\u0131yor"}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "''{1}'' \u00e7\u0131k\u0131\u015f y\u00f6ntemi i\u00e7in ''{0}'' \u00f6zellik dosyas\u0131 y\u00fcklenemedi (CLASSPATH de\u011fi\u015fkenini inceleyin)" } - - - }; - - /** - * Get the lookup table for error messages - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_HK.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_HK.java deleted file mode 100644 index b495ca3d6ab..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_HK.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.xml.internal.res; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_zh_HK extends XMLErrorResources_zh_TW -{ - - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java deleted file mode 100644 index d08c2b284c6..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * 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.xml.internal.res; - - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a String constant. And you need - * to enter key, value pair as part of the contents - * array. You also need to update MAX_CODE for error strings - * and MAX_WARNING for warnings ( Needed for only information - * purpose ) - */ -public class XMLErrorResources_zh_TW extends ListResourceBundle -{ - -/* - * This file contains error and warning messages related to Xalan Error - * Handling. - * - * General notes to translators: - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - */ - - /** Maximum error messages, this is needed to keep track of the number of messages. */ - public static final int MAX_CODE = 61; - - /** Maximum warnings, this is needed to keep track of the number of warnings. */ - public static final int MAX_WARNING = 0; - - /** Maximum misc strings. */ - public static final int MAX_OTHERS = 4; - - /** Maximum total warnings and error messages. */ - public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; - - - /* - * Message keys - */ - public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; - public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE"; - public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL"; - public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED"; - public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT"; - public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL"; - public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT"; - public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED"; - public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM"; - public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS"; - public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING"; - public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED"; - public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED"; - public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE"; - public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED"; - public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL"; - public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; - public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL"; - public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE"; - public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING"; - public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER"; - public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER"; - public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE"; - public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING"; - public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED"; - public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED"; - public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE"; - public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE"; - public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED"; - public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER"; - public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN"; - public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT"; - public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT"; - public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC"; - public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT"; - public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL"; - public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID"; - public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID"; - public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON"; - - // Message keys used by the serializer - public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTIRBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = "ER_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String ER_ILLEGAL_CHARACTER = "ER_ILLEGAL_CHARACTER"; - - /* - * Now fill in the message text. - * Then fill in the message text for that message code in the - * array. Use the new error code as the index into the array. - */ - - // Error messages... - - /** The lookup table for error messages. */ - private static final Object[][] contents = { - - /** Error message ID that has a null message, but takes in a single object. */ - {"ER0000" , "{0}" }, - - { ER_FUNCTION_NOT_SUPPORTED, - "\u4E0D\u652F\u63F4\u51FD\u6578\uFF01"}, - - { ER_CANNOT_OVERWRITE_CAUSE, - "\u7121\u6CD5\u8986\u5BEB\u539F\u56E0"}, - - { ER_NO_DEFAULT_IMPL, - "\u627E\u4E0D\u5230\u9810\u8A2D\u7684\u5BE6\u884C"}, - - { ER_CHUNKEDINTARRAY_NOT_SUPPORTED, - "\u76EE\u524D\u4E0D\u652F\u63F4 ChunkedIntArray({0})"}, - - { ER_OFFSET_BIGGER_THAN_SLOT, - "\u4F4D\u79FB\u5927\u65BC\u4F4D\u7F6E"}, - - { ER_COROUTINE_NOT_AVAIL, - "\u6C92\u6709\u53EF\u7528\u7684\u5171\u540C\u5E38\u5F0F\uFF0Cid={0}"}, - - { ER_COROUTINE_CO_EXIT, - "CoroutineManager \u6536\u5230 co_exit() \u8981\u6C42"}, - - { ER_COJOINROUTINESET_FAILED, - "co_joinCoroutineSet() \u5931\u6557"}, - - { ER_COROUTINE_PARAM, - "\u5171\u540C\u5E38\u5F0F\u53C3\u6578\u932F\u8AA4 ({0})"}, - - { ER_PARSER_DOTERMINATE_ANSWERS, - "\n\u672A\u9810\u671F: \u5256\u6790\u5668 doTerminate \u7B54\u8986 {0}"}, - - { ER_NO_PARSE_CALL_WHILE_PARSING, - "\u5256\u6790\u6642\u53EF\u80FD\u672A\u547C\u53EB parse"}, - - { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED, - "\u932F\u8AA4: \u672A\u5BE6\u884C\u8EF8 {0} \u7684\u985E\u578B\u91CD\u8907\u7A0B\u5F0F"}, - - { ER_ITERATOR_AXIS_NOT_IMPLEMENTED, - "\u932F\u8AA4: \u672A\u5BE6\u884C\u8EF8 {0} \u7684\u91CD\u8907\u7A0B\u5F0F"}, - - { ER_ITERATOR_CLONE_NOT_SUPPORTED, - "\u4E0D\u652F\u63F4\u91CD\u8907\u7A0B\u5F0F\u8907\u88FD"}, - - { ER_UNKNOWN_AXIS_TYPE, - "\u4E0D\u660E\u7684\u8EF8\u5468\u904A\u985E\u578B: {0}"}, - - { ER_AXIS_NOT_SUPPORTED, - "\u4E0D\u652F\u63F4\u8EF8\u5468\u904A\u7A0B\u5F0F: {0}"}, - - { ER_NO_DTMIDS_AVAIL, - "\u4E0D\u518D\u6709\u53EF\u7528\u7684 DTM ID"}, - - { ER_NOT_SUPPORTED, - "\u4E0D\u652F\u63F4: {0}"}, - - { ER_NODE_NON_NULL, - "\u7BC0\u9EDE\u5FC5\u9808\u662F\u975E\u7A7A\u503C\u7684 getDTMHandleFromNode"}, - - { ER_COULD_NOT_RESOLVE_NODE, - "\u7121\u6CD5\u89E3\u6790\u7BC0\u9EDE\u70BA\u63A7\u5236\u4EE3\u78BC"}, - - { ER_STARTPARSE_WHILE_PARSING, - "\u5256\u6790\u6642\u53EF\u80FD\u672A\u547C\u53EB startParse"}, - - { ER_STARTPARSE_NEEDS_SAXPARSER, - "startParse \u9700\u8981\u975E\u7A7A\u503C SAXParser"}, - - { ER_COULD_NOT_INIT_PARSER, - "\u7121\u6CD5\u8D77\u59CB\u5256\u6790\u5668"}, - - { ER_EXCEPTION_CREATING_POOL, - "\u5EFA\u7ACB\u96C6\u5340\u7684\u65B0\u57F7\u884C\u8655\u7406\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1"}, - - { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "\u8DEF\u5F91\u5305\u542B\u7121\u6548\u7684\u9041\u96E2\u5E8F\u5217"}, - - { ER_SCHEME_REQUIRED, - "\u914D\u7F6E\u662F\u5FC5\u8981\u9805\u76EE\uFF01"}, - - { ER_NO_SCHEME_IN_URI, - "\u5728 URI \u4E2D\u627E\u4E0D\u5230\u914D\u7F6E: {0}"}, - - { ER_NO_SCHEME_INURI, - "\u5728 URI \u627E\u4E0D\u5230\u914D\u7F6E"}, - - { ER_PATH_INVALID_CHAR, - "\u8DEF\u5F91\u5305\u542B\u7121\u6548\u7684\u5B57\u5143: {0}"}, - - { ER_SCHEME_FROM_NULL_STRING, - "\u7121\u6CD5\u5F9E\u7A7A\u503C\u5B57\u4E32\u8A2D\u5B9A\u914D\u7F6E"}, - - { ER_SCHEME_NOT_CONFORMANT, - "\u914D\u7F6E\u4E0D\u4E00\u81F4\u3002"}, - - { ER_HOST_ADDRESS_NOT_WELLFORMED, - "\u4E3B\u6A5F\u6C92\u6709\u5B8C\u6574\u7684\u4F4D\u5740"}, - - { ER_PORT_WHEN_HOST_NULL, - "\u4E3B\u6A5F\u70BA\u7A7A\u503C\u6642\uFF0C\u7121\u6CD5\u8A2D\u5B9A\u9023\u63A5\u57E0"}, - - { ER_INVALID_PORT, - "\u7121\u6548\u7684\u9023\u63A5\u57E0\u865F\u78BC"}, - - { ER_FRAG_FOR_GENERIC_URI, - "\u53EA\u80FD\u5C0D\u4E00\u822C URI \u8A2D\u5B9A\u7247\u6BB5"}, - - { ER_FRAG_WHEN_PATH_NULL, - "\u8DEF\u5F91\u70BA\u7A7A\u503C\u6642\uFF0C\u7121\u6CD5\u8A2D\u5B9A\u7247\u6BB5"}, - - { ER_FRAG_INVALID_CHAR, - "\u7247\u6BB5\u5305\u542B\u7121\u6548\u7684\u5B57\u5143"}, - - { ER_PARSER_IN_USE, - "\u5256\u6790\u5668\u4F7F\u7528\u4E2D"}, - - { ER_CANNOT_CHANGE_WHILE_PARSING, - "\u5256\u6790\u6642\u7121\u6CD5\u8B8A\u66F4 {0} {1}"}, - - { ER_SELF_CAUSATION_NOT_PERMITTED, - "\u4E0D\u5141\u8A31\u81EA\u884C\u5F15\u767C"}, - - { ER_NO_USERINFO_IF_NO_HOST, - "\u5982\u679C\u6C92\u6709\u6307\u5B9A\u4E3B\u6A5F\uFF0C\u4E0D\u53EF\u6307\u5B9A Userinfo"}, - - { ER_NO_PORT_IF_NO_HOST, - "\u5982\u679C\u6C92\u6709\u6307\u5B9A\u4E3B\u6A5F\uFF0C\u4E0D\u53EF\u6307\u5B9A\u9023\u63A5\u57E0"}, - - { ER_NO_QUERY_STRING_IN_PATH, - "\u5728\u8DEF\u5F91\u53CA\u67E5\u8A62\u5B57\u4E32\u4E2D\u4E0D\u53EF\u6307\u5B9A\u67E5\u8A62\u5B57\u4E32"}, - - { ER_NO_FRAGMENT_STRING_IN_PATH, - "\u8DEF\u5F91\u548C\u7247\u6BB5\u4E0D\u80FD\u540C\u6642\u6307\u5B9A\u7247\u6BB5"}, - - { ER_CANNOT_INIT_URI_EMPTY_PARMS, - "\u7121\u6CD5\u4EE5\u7A7A\u767D\u53C3\u6578\u8D77\u59CB\u8A2D\u5B9A URI"}, - - { ER_METHOD_NOT_SUPPORTED, - "\u5C1A\u4E0D\u652F\u63F4\u65B9\u6CD5"}, - - { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, - "IncrementalSAXSource_Filter \u76EE\u524D\u7121\u6CD5\u91CD\u65B0\u555F\u52D5"}, - - { ER_XMLRDR_NOT_BEFORE_STARTPARSE, - "XMLReader \u4E0D\u80FD\u5728 startParse \u8981\u6C42\u4E4B\u524D"}, - - { ER_AXIS_TRAVERSER_NOT_SUPPORTED, - "\u4E0D\u652F\u63F4\u8EF8\u5468\u904A\u7A0B\u5F0F: {0}"}, - - { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER, - "\u4F7F\u7528\u7A7A\u503C PrintWriter \u5EFA\u7ACB ListingErrorHandler\uFF01"}, - - { ER_SYSTEMID_UNKNOWN, - "\u4E0D\u660E\u7684 SystemId"}, - - { ER_LOCATION_UNKNOWN, - "\u4E0D\u660E\u7684\u932F\u8AA4\u4F4D\u7F6E"}, - - { ER_PREFIX_MUST_RESOLVE, - "\u524D\u7F6E\u78BC\u5FC5\u9808\u89E3\u6790\u70BA\u547D\u540D\u7A7A\u9593: {0}"}, - - { ER_CREATEDOCUMENT_NOT_SUPPORTED, - "XPathContext \u4E2D\u4E0D\u652F\u63F4 createDocument()\uFF01"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT, - "\u5C6C\u6027\u5B50\u9805\u4E0D\u5177\u6709\u64C1\u6709\u8005\u6587\u4EF6\uFF01"}, - - { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT, - "\u5C6C\u6027\u5B50\u9805\u4E0D\u5177\u6709\u64C1\u6709\u8005\u6587\u4EF6\u5143\u7D20\uFF01"}, - - { ER_CANT_OUTPUT_TEXT_BEFORE_DOC, - "\u8B66\u544A: \u7121\u6CD5\u5728\u6587\u4EF6\u5143\u7D20\u4E4B\u524D\u8F38\u51FA\u6587\u5B57\uFF01\u6B63\u5728\u5FFD\u7565..."}, - - { ER_CANT_HAVE_MORE_THAN_ONE_ROOT, - "DOM \u7684\u6839\u4E0D\u80FD\u8D85\u904E\u4E00\u500B\uFF01"}, - - { ER_ARG_LOCALNAME_NULL, - "\u5F15\u6578 'localName' \u70BA\u7A7A\u503C"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The localname is the portion after the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_LOCALNAME_INVALID, - "QNAME \u4E2D\u7684 Localname \u61C9\u70BA\u6709\u6548\u7684 NCName"}, - - // Note to translators: A QNAME has the syntactic form [NCName:]NCName - // The prefix is the portion before the optional colon; the message indicates - // that there is a problem with that part of the QNAME. - { ER_ARG_PREFIX_INVALID, - "QNAME \u4E2D\u7684\u524D\u7F6E\u78BC\u61C9\u70BA\u6709\u6548\u7684 NCName"}, - - { ER_NAME_CANT_START_WITH_COLON, - "\u540D\u7A31\u4E0D\u80FD\u4EE5\u5192\u865F\u70BA\u958B\u982D"}, - - { "BAD_CODE", "createMessage \u7684\u53C3\u6578\u8D85\u51FA\u7BC4\u570D"}, - { "FORMAT_FAILED", "messageFormat \u547C\u53EB\u671F\u9593\u767C\u751F\u7570\u5E38\u72C0\u6CC1"}, - { "line", "\u884C\u865F"}, - { "column","\u8CC7\u6599\u6B04\u7DE8\u865F"}, - - {ER_SERIALIZER_NOT_CONTENTHANDLER, - "serializer \u985E\u5225 ''{0}'' \u4E0D\u5BE6\u884C org.xml.sax.ContentHandler\u3002"}, - - {ER_RESOURCE_COULD_NOT_FIND, - "\u627E\u4E0D\u5230\u8CC7\u6E90 [ {0} ]\u3002\n{1}" }, - - {ER_RESOURCE_COULD_NOT_LOAD, - "\u7121\u6CD5\u8F09\u5165\u8CC7\u6E90 [ {0} ]: {1} \n {2} \t {3}" }, - - {ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\u7DE9\u885D\u5340\u5927\u5C0F <=0" }, - - {ER_INVALID_UTF16_SURROGATE, - "\u5075\u6E2C\u5230\u7121\u6548\u7684 UTF-16 \u4EE3\u7406: {0}\uFF1F" }, - - {ER_OIERROR, - "IO \u932F\u8AA4" }, - - {ER_ILLEGAL_ATTRIBUTE_POSITION, - "\u5728\u7522\u751F\u5B50\u9805\u7BC0\u9EDE\u4E4B\u5F8C\uFF0C\u6216\u5728\u7522\u751F\u5143\u7D20\u4E4B\u524D\uFF0C\u4E0D\u53EF\u65B0\u589E\u5C6C\u6027 {0}\u3002\u5C6C\u6027\u6703\u88AB\u5FFD\u7565\u3002"}, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - {ER_NAMESPACE_PREFIX, - "\u5B57\u9996 ''{0}'' \u7684\u547D\u540D\u7A7A\u9593\u5C1A\u672A\u5BA3\u544A\u3002" }, - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - {ER_STRAY_ATTRIBUTE, - "\u5C6C\u6027 ''{0}'' \u5728\u5143\u7D20\u4E4B\u5916\u3002" }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - {ER_STRAY_NAMESPACE, - "\u547D\u540D\u7A7A\u9593\u5BA3\u544A ''{0}''=''{1}'' \u8D85\u51FA\u5143\u7D20\u5916\u3002" }, - - {ER_COULD_NOT_LOAD_RESOURCE, - "\u7121\u6CD5\u8F09\u5165 ''{0}'' (\u6AA2\u67E5 CLASSPATH)\uFF0C\u76EE\u524D\u53EA\u4F7F\u7528\u9810\u8A2D\u503C"}, - - { ER_ILLEGAL_CHARACTER, - "\u5617\u8A66\u8F38\u51FA\u6574\u6578\u503C {0} \u7684\u5B57\u5143\uFF0C\u4F46\u662F\u5B83\u4E0D\u662F\u4EE5\u6307\u5B9A\u7684 {1} \u8F38\u51FA\u7DE8\u78BC\u5448\u73FE\u3002"}, - - {ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "\u7121\u6CD5\u8F09\u5165\u8F38\u51FA\u65B9\u6CD5 ''{1}'' \u7684\u5C6C\u6027\u6A94 ''{0}'' (\u6AA2\u67E5 CLASSPATH)" } - - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - - protected Object[][] getContents() { - return contents; - } - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ca.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ca.java deleted file mode 100644 index 5dd866b8bbb..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ca.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 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. - */ -/* - * $Id: SerializerMessages_ca.java,v 1.1.4.1 2005/09/08 11:03:11 suresh_emailid Exp $ - */ - -package com.sun.org.apache.xml.internal.serializer.utils; - -import java.util.ListResourceBundle; - -public class SerializerMessages_ca extends ListResourceBundle { - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "The message key ''{0}'' is not in the message class ''{1}''"}, - - { MsgKey.BAD_MSGFORMAT, - "The format of message ''{0}'' in message class ''{1}'' failed."}, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "The serializer class ''{0}'' does not implement org.xml.sax.ContentHandler."}, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "The resource [ {0} ] could not be found.\n {1}"}, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "The resource [ {0} ] could not load: {1} \n {2} \n {3}"}, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Buffer size <=0"}, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Invalid UTF-16 surrogate detected: {0} ?"}, - - { MsgKey.ER_OIERROR, - "IO error"}, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Cannot add attribute {0} after child nodes or before an element is produced. Attribute will be ignored."}, - - { MsgKey.ER_NAMESPACE_PREFIX, - "Namespace for prefix ''{0}'' has not been declared."}, - - { MsgKey.ER_STRAY_ATTRIBUTE, - "Attribute ''{0}'' outside of element."}, - - { MsgKey.ER_STRAY_NAMESPACE, - "Namespace declaration ''{0}''=''{1}'' outside of element."}, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Could not load ''{0}'' (check CLASSPATH), now using just the defaults"}, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Attempt to output character of integral value {0} that is not represented in specified output encoding of {1}."}, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Could not load the propery file ''{0}'' for output method ''{1}'' (check CLASSPATH)"}, - - { MsgKey.ER_INVALID_PORT, - "Invalid port number"}, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Port cannot be set when host is null"}, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Host is not a well formed address"}, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "The scheme is not conformant."}, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Cannot set scheme from null string"}, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Path contains invalid escape sequence"}, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Path contains invalid character: {0}"}, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Fragment contains invalid character"}, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Fragment cannot be set when path is null"}, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment can only be set for a generic URI"}, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "No scheme found in URI"}, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Cannot initialize URI with empty parameters"}, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment cannot be specified in both the path and fragment"}, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "Query string cannot be specified in path and query string"}, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Port may not be specified if host is not specified"}, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Userinfo may not be specified if host is not specified"}, - - { MsgKey.ER_SCHEME_REQUIRED, - "Scheme is required!"}, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "L''objecte de propietats passat a SerializerFactory no t\u00e9 cap propietat ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Av\u00eds: el temps d''execuci\u00f3 de Java no d\u00f3na suport a la codificaci\u00f3 ''{0}''." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "El par\u00e0metre ''{0}'' no es reconeix."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "El par\u00e0metre ''{0}'' es reconeix per\u00f2 el valor sol\u00b7licitat no es pot establir."}, - - {MsgKey.ER_STRING_TOO_LONG, - "La cadena resultant \u00e9s massa llarga per cabre en una DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "El tipus de valor per a aquest nom de par\u00e0metre \u00e9s incompatible amb el tipus de valor esperat."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "La destinaci\u00f3 de sortida per a les dades que s'ha d'escriure era nul\u00b7la."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "S'ha trobat una codificaci\u00f3 no suportada."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "El node no s'ha pogut serialitzat."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "La secci\u00f3 CDATA cont\u00e9 un o m\u00e9s marcadors d'acabament ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "No s'ha pogut crear cap inst\u00e0ncia per comprovar si t\u00e9 un format correcte o no. El par\u00e0metre del tipus ben format es va establir en cert, per\u00f2 la comprovaci\u00f3 de format no s'ha pogut realitzar." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "El node ''{0}'' cont\u00e9 car\u00e0cters XML no v\u00e0lids." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x{0}) en el comentari." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x{0}) en les dades d''instrucci\u00f3 de proc\u00e9s." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x''{0})'' en els continguts de la CDATASection." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x''{0})'' en el contingut de dades de car\u00e0cter del node." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "S''han trobat car\u00e0cters XML no v\u00e0lids al node {0} anomenat ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "La cadena \"--\" no est\u00e0 permesa dins dels comentaris." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "El valor d''atribut \"{1}\" associat amb un tipus d''element \"{0}\" no pot contenir el car\u00e0cter ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "La refer\u00e8ncia de l''entitat no analitzada \"&{0};\" no est\u00e0 permesa." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "La refer\u00e8ncia externa de l''entitat \"&{0};\" no est\u00e0 permesa en un valor d''atribut." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "El prefix \"{0}\" no es pot vincular a l''espai de noms \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "El nom local de l''element \"{0}\" \u00e9s nul." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "El nom local d''atr \"{0}\" \u00e9s nul." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "El text de recanvi del node de l''entitat \"{0}\" cont\u00e9 un node d''element \"{1}\" amb un prefix de no enlla\u00e7at \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "El text de recanvi del node de l''entitat \"{0}\" cont\u00e9 un node d''atribut \"{1}\" amb un prefix de no enlla\u00e7at \"{2}\"." - }, - - }; - return contents; - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_cs.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_cs.java deleted file mode 100644 index ef7c3236b1c..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_cs.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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. - */ -/* - * $Id: SerializerMessages_cs.java,v 1.1.4.1 2005/09/08 11:03:12 suresh_emailid Exp $ - */ - -package com.sun.org.apache.xml.internal.serializer.utils; - -import java.util.ListResourceBundle; - -public class SerializerMessages_cs extends ListResourceBundle { - public Object[][] getContents() { - Object[][] contents = new Object[][] { - // BAD_MSGKEY needs translation - // BAD_MSGFORMAT needs translation - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "T\u0159\u00edda serializace ''{0}'' neimplementuje org.xml.sax.ContentHandler."}, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "Nelze naj\u00edt zdroj [ {0} ].\n {1}"}, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "Nelze zav\u00e9st zdroj [ {0} ]: {1} \n {2} \n {3}"}, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Velikost vyrovn\u00e1vac\u00ed pam\u011bti <=0"}, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Byla zji\u0161t\u011bna neplatn\u00e1 n\u00e1hrada UTF-16: {0} ?"}, - - { MsgKey.ER_OIERROR, - "Chyba vstupu/v\u00fdstupu"}, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Nelze p\u0159idat atribut {0} po uzlech potomk\u016f ani p\u0159ed t\u00edm, ne\u017e je vytvo\u0159en prvek. Atribut bude ignorov\u00e1n."}, - - { MsgKey.ER_NAMESPACE_PREFIX, - "Obor n\u00e1zv\u016f pro p\u0159edponu ''{0}'' nebyl deklarov\u00e1n."}, - - // ER_STRAY_ATTRIBUTE needs translation - { MsgKey.ER_STRAY_NAMESPACE, - "Deklarace oboru n\u00e1zv\u016f ''{0}''=''{1}'' je vn\u011b prvku."}, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Nelze zav\u00e9st ''{0}'' (zkontrolujte prom\u011bnnou CLASSPATH), proto se pou\u017e\u00edvaj\u00ed pouze v\u00fdchoz\u00ed hodnoty"}, - - // ER_ILLEGAL_CHARACTER needs translation - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Nelze na\u010d\u00edst soubor vlastnost\u00ed ''{0}'' pro v\u00fdstupn\u00ed metodu ''{1}'' (zkontrolujte prom\u011bnnou CLASSPATH)."}, - - { MsgKey.ER_INVALID_PORT, - "Neplatn\u00e9 \u010d\u00edslo portu."}, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "M\u00e1-li hostitel hodnotu null, nelze nastavit port."}, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Adresa hostitele m\u00e1 nespr\u00e1vn\u00fd form\u00e1t."}, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Sch\u00e9ma nevyhovuje."}, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Nelze nastavit sch\u00e9ma \u0159et\u011bzce s hodnotou null."}, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Cesta obsahuje neplatnou escape sekvenci"}, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Cesta obsahuje neplatn\u00fd znak: {0}"}, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Fragment obsahuje neplatn\u00fd znak."}, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "M\u00e1-li cesta hodnotu null, nelze nastavit fragment."}, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment lze nastavit jen u generick\u00e9ho URI."}, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "V URI nebylo nalezeno \u017e\u00e1dn\u00e9 sch\u00e9ma: {0}"}, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "URI nelze inicializovat s pr\u00e1zdn\u00fdmi parametry."}, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment nelze ur\u010dit z\u00e1rove\u0148 v cest\u011b i ve fragmentu."}, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "V \u0159et\u011bzci cesty a dotazu nelze zadat \u0159et\u011bzec dotazu."}, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Nen\u00ed-li ur\u010den hostitel, nelze zadat port."}, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Nen\u00ed-li ur\u010den hostitel, nelze zadat \u00fadaje o u\u017eivateli."}, - - { MsgKey.ER_SCHEME_REQUIRED, - "Je vy\u017eadov\u00e1no sch\u00e9ma!"}, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "Objekt vlastnost\u00ed p\u0159edan\u00fd faktorii SerializerFactory neobsahuje vlastnost ''{0}''. " }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Varov\u00e1n\u00ed: K\u00f3dov\u00e1n\u00ed ''{0}'' nen\u00ed v b\u011bhov\u00e9m prost\u0159ed\u00ed Java podporov\u00e1no." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Parametr ''{0}'' nebyl rozpozn\u00e1n."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Parametr ''{0}'' byl rozpozn\u00e1n, ale nelze nastavit po\u017eadovanou hodnotu."}, - - {MsgKey.ER_STRING_TOO_LONG, - "V\u00fdsledn\u00fd \u0159et\u011bzec je p\u0159\u00edli\u0161 dlouh\u00fd pro \u0159et\u011bzec DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Typ hodnoty pro tento n\u00e1zev parametru nen\u00ed kompatibiln\u00ed s o\u010dek\u00e1van\u00fdm typem hodnoty."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "C\u00edlov\u00e9 um\u00edst\u011bn\u00ed v\u00fdstupu pro data ur\u010den\u00e1 k z\u00e1pisu je rovno hodnot\u011b Null. "}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Bylo nalezeno nepodporovan\u00e9 k\u00f3dov\u00e1n\u00ed."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Nelze prov\u00e9st serializaci uzlu. "}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "Sekce CDATA obsahuje jednu nebo v\u00edce ukon\u010dovac\u00edch zna\u010dek ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Nelze vytvo\u0159it instanci modulu pro kontrolu spr\u00e1vn\u00e9ho utvo\u0159en\u00ed. Parametr spr\u00e1vn\u00e9ho utvo\u0159en\u00ed byl nastaven na hodnotu true, nepoda\u0159ilo se v\u0161ak zkontrolovat spr\u00e1vnost utvo\u0159en\u00ed. " - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "Uzel ''{0}'' obsahuje neplatn\u00e9 znaky XML. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "V pozn\u00e1mce byl zji\u0161t\u011bn neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "V datech instrukce zpracov\u00e1n\u00ed byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "V odd\u00edlu CDATASection byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "V obsahu znakov\u00fdch dat uzlu byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "V objektu {0} s n\u00e1zvem ''{1}'' byl nalezen neplatn\u00fd znak XML. " - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "V pozn\u00e1mk\u00e1ch nen\u00ed povolen \u0159et\u011bzec \"--\"." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "Hodnota atributu \"{1}\" souvisej\u00edc\u00edho s typem prvku \"{0}\" nesm\u00ed obsahovat znak ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "Odkaz na neanalyzovanou entitu \"&{0};\" nen\u00ed povolen." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "Extern\u00ed odkaz na entitu \"&{0};\" nen\u00ed v hodnot\u011b atributu povolen." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "P\u0159edpona \"{0}\" nesm\u00ed b\u00fdt v\u00e1zan\u00e1 k oboru n\u00e1zv\u016f \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Lok\u00e1ln\u00ed n\u00e1zev prvku \"{0}\" m\u00e1 hodnotu Null. " - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Lok\u00e1ln\u00ed n\u00e1zev atributu \"{0}\" m\u00e1 hodnotu Null. " - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "Nov\u00fd text uzlu entity \"{0}\" obsahuje uzel prvku \"{1}\" s nesv\u00e1zanou p\u0159edponou \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "Nov\u00fd text uzlu entity \"{0}\" obsahuje uzel atributu \"{1}\" s nesv\u00e1zanou p\u0159edponou \"{2}\". " - }, - - }; - return contents; - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java deleted file mode 100644 index e8775a39925..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_es.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.xml.internal.serializer.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

    - * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

    - * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in com.sun.org.apache.xml.internal.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_es extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "La clave de mensaje ''{0}'' no est\u00E1 en la clase de mensaje ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Fallo de formato del mensaje ''{0}'' en la clase de mensaje ''{1}''." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "La clase de serializador ''{0}'' no implanta org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "No se ha encontrado el recurso [ {0} ].\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "No se ha podido cargar el recurso [ {0} ]: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Tama\u00F1o de buffer menor o igual que 0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "\u00BFSe ha detectado un sustituto UTF-16 no v\u00E1lido: {0}?" }, - - { MsgKey.ER_OIERROR, - "Error de E/S" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "No se puede agregar el atributo {0} despu\u00E9s de nodos secundarios o antes de que se produzca un elemento. Se ignorar\u00E1 el atributo." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "No se ha declarado el espacio de nombres para el prefijo ''{0}''." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "El atributo ''{0}'' est\u00E1 fuera del elemento." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Declaraci\u00F3n del espacio de nombres ''{0}''=''{1}'' fuera del elemento." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "No se ha podido cargar ''{0}'' (compruebe la CLASSPATH), ahora s\u00F3lo se est\u00E1n utilizando los valores por defecto" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Intento de realizar la salida del car\u00E1cter del valor integral {0}, que no est\u00E1 representado en la codificaci\u00F3n de salida de {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "No se ha podido cargar el archivo de propiedades ''{0}'' para el m\u00E9todo de salida ''{1}'' (compruebe la CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "N\u00FAmero de puerto no v\u00E1lido" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "No se puede definir el puerto si el host es nulo" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "El formato de la direcci\u00F3n de host no es correcto" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "El esquema no es v\u00E1lido." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "No se puede definir un esquema a partir de una cadena nula" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "La ruta de acceso contiene una secuencia de escape no v\u00E1lida" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "La ruta de acceso contiene un car\u00E1cter no v\u00E1lido: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "El fragmento contiene un car\u00E1cter no v\u00E1lido" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "No se puede definir el fragmento si la ruta de acceso es nula" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "S\u00F3lo se puede definir el fragmento para un URI gen\u00E9rico" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "No se ha encontrado un esquema en el URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "No se puede inicializar el URI con par\u00E1metros vac\u00EDos" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "No se puede especificar el fragmento en la ruta de acceso y en el fragmento" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "No se puede especificar la cadena de consulta en la ruta de acceso y en la cadena de consulta" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "No se puede especificar el puerto si no se ha especificado el host" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "No se puede especificar la informaci\u00F3n de usuario si no se ha especificado el host" }, - - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Advertencia: es necesario que la versi\u00F3n del documento de salida sea ''{0}''. Esta versi\u00F3n de XML no est\u00E1 soportada. La versi\u00F3n del documento de salida ser\u00E1 ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Se necesita un esquema." }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "El objeto de propiedades transferido a SerializerFactory no tiene una propiedad ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Advertencia: el tiempo de ejecuci\u00F3n de Java no soporta la codificaci\u00F3n ''{0}''." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "No se reconoce el par\u00E1metro ''{0}''."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Se reconoce el par\u00E1metro ''{0}'' pero no se puede definir el valor solicitado."}, - - {MsgKey.ER_STRING_TOO_LONG, - "La cadena resultante es demasiado larga para que quepa en una cadena DOM: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "El tipo de valor para este nombre de par\u00E1metro no es compatible con el tipo de valor esperado. "}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "El destino de salida en el que se deb\u00EDan escribir los datos era nulo."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Se ha encontrado una codificaci\u00F3n no soportada."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "El nodo no se ha podido serializar."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "La secci\u00F3n CDATA contiene uno o m\u00E1s marcadores de terminaci\u00F3n ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "No se ha podido crear una instancia del comprobador de formato correcto. El par\u00E1metro de formato correcto se ha definido en true pero no se puede realizar la comprobaci\u00F3n de formato correcto." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "El nodo ''{0}'' contiene caracteres XML no v\u00E1lidos." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en el comentario." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en los datos de la instrucci\u00F3n de procesamiento." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en el contenido de la secci\u00F3n CDATA." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en los datos de caracteres del nodo." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "Se ha encontrado un car\u00E1cter XML no v\u00E1lido en el nodo {0} denominado ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "La cadena \"--\" no est\u00E1 permitida en los comentarios." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "El valor del atributo \"{1}\" asociado a un tipo de elemento \"{0}\" no debe contener el car\u00E1cter ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "La referencia de entidad no analizada \"&{0};\" no est\u00E1 permitida." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "La referencia de entidad externa \"&{0};\" no est\u00E1 permitida en un valor de atributo." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "El prefijo \"{0}\" no se puede enlazar al espacio de nombres \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "El nombre local del elemento \"{0}\" es nulo." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "El nombre local del atributo \"{0}\" es nulo." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "El texto de sustituci\u00F3n del nodo de entidad \"{0}\" contiene un nodo de elemento \"{1}\"con un prefijo no enlazado \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "El texto de sustituci\u00F3n del nodo de entidad \"{0}\" contiene un nodo de atributo \"{1}\"con un prefijo no enlazado \"{2}\"." - }, - - { MsgKey.ER_WRITING_INTERNAL_SUBSET, - "Se ha producido un error al escribir el subjuego interno." - }, - - }; - - return contents; - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java deleted file mode 100644 index 0b17dd3f41b..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_fr.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.xml.internal.serializer.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

    - * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

    - * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in com.sun.org.apache.xml.internal.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_fr extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "La cl\u00E9 de message ''{0}'' ne figure pas dans la classe de messages ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Echec du format de message ''{0}'' dans la classe de messages ''{1}''." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "La classe de serializer ''{0}'' n''impl\u00E9mente pas org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "La ressource [ {0} ] est introuvable.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "La ressource [ {0} ] n''a pas pu charger : {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Taille du tampon <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Substitut UTF-16 non valide d\u00E9tect\u00E9 : {0} ?" }, - - { MsgKey.ER_OIERROR, - "Erreur d'E/S" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Impossible d''ajouter l''attribut {0} apr\u00E8s des noeuds enfant ou avant la production d''un \u00E9l\u00E9ment. L''attribut est ignor\u00E9." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "L''espace de noms du pr\u00E9fixe ''{0}'' n''a pas \u00E9t\u00E9 d\u00E9clar\u00E9." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Attribut ''{0}'' en dehors de l''\u00E9l\u00E9ment." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "La d\u00E9claration d''espace de noms ''{0}''=''{1}'' est \u00E0 l''ext\u00E9rieur de l''\u00E9l\u00E9ment." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Impossible de charger ''{0}'' (v\u00E9rifier CLASSPATH), les valeurs par d\u00E9faut sont donc employ\u00E9es" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Tentative de sortie d''un caract\u00E8re avec une valeur enti\u00E8re {0}, non repr\u00E9sent\u00E9 dans l''encodage de sortie sp\u00E9cifi\u00E9 pour {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Impossible de charger le fichier de propri\u00E9t\u00E9s ''{0}'' pour la m\u00E9thode de sortie ''{1}'' (v\u00E9rifier CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "Num\u00E9ro de port non valide" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Impossible de d\u00E9finir le port quand l'h\u00F4te est NULL" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Le format de l'adresse de l'h\u00F4te n'est pas correct" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Le mod\u00E8le n'est pas conforme." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Impossible de d\u00E9finir le mod\u00E8le \u00E0 partir de la cha\u00EEne NULL" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Le chemin d'acc\u00E8s contient une s\u00E9quence d'\u00E9chappement non valide" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Le chemin contient un caract\u00E8re non valide : {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Le fragment contient un caract\u00E8re non valide" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Impossible de d\u00E9finir le fragment quand le chemin d'acc\u00E8s est NULL" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Le fragment ne peut \u00EAtre d\u00E9fini que pour un URI g\u00E9n\u00E9rique" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Mod\u00E8le introuvable dans l'URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Impossible d'initialiser l'URI avec des param\u00E8tres vides" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Le fragment ne doit pas \u00EAtre indiqu\u00E9 \u00E0 la fois dans le chemin et dans le fragment" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "La cha\u00EEne de requ\u00EAte ne doit pas figurer dans un chemin et une cha\u00EEne de requ\u00EAte" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Le port peut ne pas \u00EAtre sp\u00E9cifi\u00E9 si l'h\u00F4te ne l'est pas" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Userinfo peut ne pas \u00EAtre sp\u00E9cifi\u00E9 si l'h\u00F4te ne l'est pas" }, - - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Avertissement : la version du document de sortie doit \u00EAtre ''{0}''. Cette version XML n''est pas prise en charge. La version du document de sortie sera ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Mod\u00E8le obligatoire." }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "L''objet de propri\u00E9t\u00E9s transmis \u00E0 SerializerFactory ne comporte aucune propri\u00E9t\u00E9 ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Avertissement : l''encodage ''{0}'' n''est pas pris en charge par l''ex\u00E9cution Java." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Le param\u00E8tre ''{0}'' n''est pas reconnu."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Le param\u00E8tre ''{0}'' est reconnu mais la valeur demand\u00E9e ne peut pas \u00EAtre d\u00E9finie."}, - - {MsgKey.ER_STRING_TOO_LONG, - "La cha\u00EEne obtenue est trop longue pour tenir dans un \u00E9l\u00E9ment DOMString : ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Le type de valeur pour ce nom de param\u00E8tre n'est pas compatible avec le type de valeur attendu. "}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "La destination de sortie dans laquelle \u00E9crire les donn\u00E9es est NULL."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Un encodage non pris en charge a \u00E9t\u00E9 d\u00E9tect\u00E9."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Le noeud n'a pas pu \u00EAtre s\u00E9rialis\u00E9."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "La section CDATA contient des marqueurs de fin ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Une instance du v\u00E9rificateur de format correct n'a pas pu \u00EAtre cr\u00E9\u00E9e. Le param\u00E8tre de format correct a \u00E9t\u00E9 d\u00E9fini sur True mais la v\u00E9rification de format correct n'a pas pu \u00EAtre r\u00E9alis\u00E9e." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "Le noeud ''{0}'' contient des caract\u00E8res XML non valides." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans le commentaire." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans les donn\u00E9es d''instruction de traitement." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans le contenu de la section CDATA." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans le contenu des donn\u00E9es alphanum\u00E9riques du noeud." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "Un caract\u00E8re XML non valide a \u00E9t\u00E9 d\u00E9tect\u00E9 dans le noeud {0} nomm\u00E9 ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "La cha\u00EEne \"--\" n'est pas autoris\u00E9e dans les commentaires." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "La valeur de l''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\" ne doit pas contenir le caract\u00E8re ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "La r\u00E9f\u00E9rence d''entit\u00E9 non analys\u00E9e \"&{0};\" n''est pas autoris\u00E9e." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "La r\u00E9f\u00E9rence d''entit\u00E9 externe \"&{0};\" n''est pas autoris\u00E9e dans une valeur d''attribut." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "Le pr\u00E9fixe \"{0}\" ne peut pas \u00EAtre li\u00E9 \u00E0 l''espace de noms \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Le nom local de l''\u00E9l\u00E9ment \"{0}\" est NULL." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Le nom local de l''attribut \"{0}\" est NULL." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "Le texte de remplacement du noeud d''entit\u00E9 \"{0}\" contient un noeud d''\u00E9l\u00E9ment \"{1}\" avec un pr\u00E9fixe non li\u00E9 \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "Le texte de remplacement du noeud d''entit\u00E9 \"{0}\" contient un noeud d''attribut \"{1}\" avec un pr\u00E9fixe non li\u00E9 \"{2}\"." - }, - - { MsgKey.ER_WRITING_INTERNAL_SUBSET, - "Une erreur s'est produite lors de l'\u00E9criture du sous-ensemble interne." - }, - - }; - - return contents; - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java deleted file mode 100644 index 8dd11fd9ef9..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_it.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.xml.internal.serializer.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

    - * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

    - * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in com.sun.org.apache.xml.internal.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_it extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "La chiave di messaggio ''{0}'' non si trova nella classe messaggio ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Formato di messaggio ''{0}'' in classe messaggio ''{1}'' non riuscito." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "La classe serializzatore ''{0}'' non implementa org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "Risorsa [ {0} ] non trovata.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "Impossibile caricare la risorsa [ {0} ]: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Dimensione buffer <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Rilevato surrogato UTF-16 non valido: {0}?" }, - - { MsgKey.ER_OIERROR, - "Errore di I/O" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Impossibile aggiungere l''attributo {0} dopo i nodi figlio o prima che sia prodotto un elemento. L''attributo verr\u00E0 ignorato." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "Lo spazio di nomi per il prefisso ''{0}'' non \u00E8 stato dichiarato." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Attributo ''{0}'' al di fuori dell''elemento." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Dichiarazione dello spazio di nomi ''{0}''=''{1}'' al di fuori dell''elemento." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Impossibile caricare ''{0}'' (verificare CLASSPATH); verranno utilizzati i valori predefiniti" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Tentativo di eseguire l''output di un carattere di valore integrale {0} non rappresentato nella codifica di output {1} specificata." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Impossibile caricare il file delle propriet\u00E0 ''{0}'' per il metodo di emissione ''{1}'' (verificare CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "Numero di porta non valido" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "La porta non pu\u00F2 essere impostata se l'host \u00E8 nullo" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Host non \u00E8 un indirizzo corretto" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Lo schema non \u00E8 conforme." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Impossibile impostare lo schema da una stringa nulla" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Il percorso contiene sequenza di escape non valida" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Il percorso contiene un carattere non valido: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Il frammento contiene un carattere non valido" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Il frammento non pu\u00F2 essere impostato se il percorso \u00E8 nullo" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Il frammento pu\u00F2 essere impostato solo per un URI generico" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Nessuno schema trovato nell'URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Impossibile inizializzare l'URI con i parametri vuoti" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Il frammento non pu\u00F2 essere specificato sia nel percorso che nel frammento" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "La stringa di query non pu\u00F2 essere specificata nella stringa di percorso e query." }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "La porta non pu\u00F2 essere specificata se l'host non \u00E8 specificato" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Userinfo non pu\u00F2 essere specificato se l'host non \u00E8 specificato" }, - - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Avvertenza: la versione del documento di output deve essere ''{0}''. Questa versione di XML non \u00E8 supportata. La versione del documento di output sar\u00E0 ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Lo schema \u00E8 obbligatorio." }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "L''oggetto Properties passato a SerializerFactory non dispone di una propriet\u00E0 ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Avvertenza: la codifica ''{0}'' non \u00E8 supportata da Java Runtime." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Il parametro {0} non \u00E8 riconosciuto."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Il parametro ''{0}'' \u00E8 stato riconosciuto, ma non \u00E8 possibile impostare il valore richiesto."}, - - {MsgKey.ER_STRING_TOO_LONG, - "La stringa risultante \u00E8 troppo lunga per adattarsi in DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Il tipo di valore per questo nome parametro non \u00E8 compatibile con il tipo di valore previsto. "}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "La destinazione di output per i dati da scrivere \u00E8 nulla."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "\u00C8 stata rilevata una codifica non supportata."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Impossibile serializzare il nodo."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "La sezione CDATA contiene uno o pi\u00F9 indicatori di fine ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Impossibile creare un'istanza dello strumento di controllo della correttezza del formato. Il parametro con formato valido \u00E8 impostato su true, ma non \u00E8 possibile eseguire il controllo della correttezza del formato." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "Il nodo ''{0}'' contiene caratteri XML non validi." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "\u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nel commento." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "\u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nei dati dell''istruzione di elaborazione." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "\u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nei contenuti della sezione CDATA." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "\u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nel contenuto dei dati carattere del nodo." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "\u00C8 stato trovato un carattere o caratteri XML non validi nel nodo {0} denominato ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "La stringa \"--\" non \u00E8 consentita nei commenti." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "Il valore dell''attributo \"{1}\" associato a un tipo di elemento \"{0}\" non deve essere contenere il carattere ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "Il riferimento di entit\u00E0 non analizzata \"&{0};\" non \u00E8 consentito." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "Il riferimento di entit\u00E0 esterna \"&{0};\" non \u00E8 consentito in un valore di attributo." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "Impossibile associare il prefisso \"{0}\" allo spazio di nomi \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Il nome locale dell''elemento \"{0}\" \u00E8 nullo." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Il nome locale dell''attributo \"{0}\" \u00E8 nullo." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "Il testo di sostituzione del nodo entit\u00E0 \"{0}\" contiene un nodo elemento \"{1}\" con un prefisso non associato \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "Il testo di sostituzione del nodo entit\u00E0 \"{0}\" contiene un nodo attributo \"{1}\" con un prefisso non associato \"{2}\"." - }, - - { MsgKey.ER_WRITING_INTERNAL_SUBSET, - "Si \u00E8 verificato un errore durante la scrittura del subset interno." - }, - - }; - - return contents; - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java deleted file mode 100644 index a9fd4229cb7..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_ko.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.xml.internal.serializer.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

    - * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

    - * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in com.sun.org.apache.xml.internal.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_ko extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "\uBA54\uC2DC\uC9C0 \uD0A4 ''{0}''\uC774(\uAC00) \uBA54\uC2DC\uC9C0 \uD074\uB798\uC2A4 ''{1}''\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.BAD_MSGFORMAT, - "\uBA54\uC2DC\uC9C0 \uD074\uB798\uC2A4 ''{1}''\uC5D0\uC11C ''{0}'' \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "Serializer \uD074\uB798\uC2A4 ''{0}''\uC774(\uAC00) org.xml.sax.ContentHandler\uB97C \uAD6C\uD604\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "[{0}] \uB9AC\uC18C\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "[{0}] \uB9AC\uC18C\uC2A4\uAC00 \uB2E4\uC74C\uC744 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC74C: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\uBC84\uD37C \uD06C\uAE30 <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "\uBD80\uC801\uD569\uD55C UTF-16 \uB300\uB9AC \uC694\uC18C\uAC00 \uAC10\uC9C0\uB428: {0}" }, - - { MsgKey.ER_OIERROR, - "IO \uC624\uB958" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "\uD558\uC704 \uB178\uB4DC\uAC00 \uC0DD\uC131\uB41C \uD6C4 \uB610\uB294 \uC694\uC18C\uAC00 \uC0DD\uC131\uB418\uAE30 \uC804\uC5D0 {0} \uC18D\uC131\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC18D\uC131\uC774 \uBB34\uC2DC\uB429\uB2C8\uB2E4." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "''{0}'' \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "''{0}'' \uC18D\uC131\uC774 \uC694\uC18C\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "\uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC120\uC5B8 ''{0}''=''{1}''\uC774(\uAC00) \uC694\uC18C\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "{0}\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. CLASSPATH\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \uD604\uC7AC \uAE30\uBCF8\uAC12\uB9CC \uC0AC\uC6A9\uD558\uB294 \uC911\uC785\uB2C8\uB2E4." }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "{1}\uC758 \uC9C0\uC815\uB41C \uCD9C\uB825 \uC778\uCF54\uB529\uC5D0\uC11C \uD45C\uC2DC\uB418\uC9C0 \uC54A\uB294 \uC815\uC218 \uAC12 {0}\uC758 \uBB38\uC790\uB97C \uCD9C\uB825\uD558\uB824\uACE0 \uC2DC\uB3C4\uD588\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "\uCD9C\uB825 \uBA54\uC18C\uB4DC ''{1}''\uC5D0 \uB300\uD55C \uC18D\uC131 \uD30C\uC77C ''{0}''\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. CLASSPATH\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624." }, - - { MsgKey.ER_INVALID_PORT, - "\uD3EC\uD2B8 \uBC88\uD638\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4." }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "\uD638\uC2A4\uD2B8\uAC00 \uB110\uC77C \uACBD\uC6B0 \uD3EC\uD2B8\uB97C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "\uD638\uC2A4\uD2B8\uAC00 \uC644\uC804\uD55C \uC8FC\uC18C\uAC00 \uC544\uB2D9\uB2C8\uB2E4." }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "\uCCB4\uACC4\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "\uB110 \uBB38\uC790\uC5F4\uC5D0\uC11C \uCCB4\uACC4\uB97C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "\uACBD\uB85C\uC5D0 \uBD80\uC801\uD569\uD55C \uC774\uC2A4\uCF00\uC774\uD504 \uC2DC\uD000\uC2A4\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "\uACBD\uB85C\uC5D0 \uBD80\uC801\uD569\uD55C \uBB38\uC790\uAC00 \uD3EC\uD568\uB428: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "\uBD80\uBD84\uC5D0 \uBD80\uC801\uD569\uD55C \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "\uACBD\uB85C\uAC00 \uB110\uC77C \uACBD\uC6B0 \uBD80\uBD84\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "\uC77C\uBC18 URI\uC5D0 \uB300\uD574\uC11C\uB9CC \uBD80\uBD84\uC744 \uC124\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "URI\uC5D0\uC11C \uCCB4\uACC4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "\uBE48 \uB9E4\uAC1C\uBCC0\uC218\uB85C URI\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "\uACBD\uB85C\uC640 \uBD80\uBD84\uC5D0 \uBAA8\uB450 \uBD80\uBD84\uC744 \uC9C0\uC815\uD560 \uC218\uB294 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "\uACBD\uB85C \uBC0F \uC9C8\uC758 \uBB38\uC790\uC5F4\uC5D0 \uC9C8\uC758 \uBB38\uC790\uC5F4\uC744 \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "\uD638\uC2A4\uD2B8\uB97C \uC9C0\uC815\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0\uC5D0\uB294 \uD3EC\uD2B8\uB97C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "\uD638\uC2A4\uD2B8\uB97C \uC9C0\uC815\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0\uC5D0\uB294 Userinfo\uB97C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "\uACBD\uACE0: \uCD9C\uB825 \uBB38\uC11C\uC758 \uBC84\uC804\uC774 ''{0}''\uC774(\uAC00) \uB418\uB3C4\uB85D \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4. \uC774 \uBC84\uC804\uC758 XML\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uCD9C\uB825 \uBB38\uC11C\uC758 \uBC84\uC804\uC740 ''1.0''\uC774 \uB429\uB2C8\uB2E4." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "\uCCB4\uACC4\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "SerializerFactory\uC5D0 \uC804\uB2EC\uB41C Properties \uAC1D\uCCB4\uC5D0 ''{0}'' \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "\uACBD\uACE0: \uC778\uCF54\uB529 ''{0}''\uC740(\uB294) Java \uB7F0\uD0C0\uC784\uC5D0 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "''{0}'' \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "''{0}'' \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC778\uC2DD\uB418\uC5C8\uC9C0\uB9CC \uC694\uCCAD\uB41C \uAC12\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - {MsgKey.ER_STRING_TOO_LONG, - "\uACB0\uACFC \uBB38\uC790\uC5F4\uC774 \uB108\uBB34 \uCEE4\uC11C DOMString\uC5D0 \uB9DE\uC9C0 \uC54A\uC74C: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "\uC774 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC5D0 \uB300\uD55C \uAC12 \uC720\uD615\uC774 \uD544\uC694\uD55C \uAC12 \uC720\uD615\uACFC \uD638\uD658\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "\uB370\uC774\uD130\uB97C \uC4F8 \uCD9C\uB825 \uB300\uC0C1\uC774 \uB110\uC785\uB2C8\uB2E4."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC778\uCF54\uB529\uC774 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "\uB178\uB4DC\uB97C \uC9C1\uB82C\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "CDATA \uC139\uC158\uC5D0 \uD558\uB098 \uC774\uC0C1\uC758 \uC885\uB8CC \uD45C\uC2DC\uC790 ']]>'\uAC00 \uC788\uC2B5\uB2C8\uB2E4."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Well-Formedness \uAC80\uC0AC\uAE30\uC758 \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. well-formed \uB9E4\uAC1C\uBCC0\uC218\uAC00 true\uB85C \uC124\uC815\uB418\uC5C8\uC9C0\uB9CC well-formedness \uAC80\uC0AC\uB97C \uC218\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "''{0}'' \uB178\uB4DC\uC5D0 \uBD80\uC801\uD569\uD55C XML \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "\uC8FC\uC11D\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "\uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 instructiondata \uCC98\uB9AC\uC5D0\uC11C \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "\uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 CDATASection\uC758 \uCF58\uD150\uCE20\uC5D0\uC11C \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "\uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uB178\uB4DC\uC758 \uBB38\uC790 \uB370\uC774\uD130 \uCF58\uD150\uCE20\uC5D0\uC11C \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "\uBD80\uC801\uD569\uD55C XML \uBB38\uC790\uAC00 \uC774\uB984\uC774 ''{1}''\uC778 {0} \uB178\uB4DC\uC5D0\uC11C \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "\uC8FC\uC11D\uC5D0\uC11C\uB294 \"--\" \uBB38\uC790\uC5F4\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "\uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \"{1}\" \uC18D\uC131\uC758 \uAC12\uC5D0\uB294 ''<'' \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "\uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \"&{0};\"\uC740(\uB294) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "\uC18D\uC131\uAC12\uC5D0\uC11C\uB294 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \"&{0};\"\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "\"{0}\" \uC811\uB450\uC5B4\uB97C \"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uBC14\uC778\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "\"{0}\" \uC694\uC18C\uC758 \uB85C\uCEEC \uC774\uB984\uC774 \uB110\uC785\uB2C8\uB2E4." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "\"{0}\" \uC18D\uC131\uC758 \uB85C\uCEEC \uC774\uB984\uC774 \uB110\uC785\uB2C8\uB2E4." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "\uC5D4\uD2F0\uD2F0 \uB178\uB4DC \"{0}\"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC740 \uC811\uB450\uC5B4 \"{2}\"\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB294 \uC694\uC18C \uB178\uB4DC \"{1}\"\uC774(\uAC00) \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "\uC5D4\uD2F0\uD2F0 \uB178\uB4DC \"{0}\"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC740 \uC811\uB450\uC5B4 \"{2}\"\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB294 \uC18D\uC131 \uB178\uB4DC \"{1}\"\uC774(\uAC00) \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4." - }, - - { MsgKey.ER_WRITING_INTERNAL_SUBSET, - "\uB0B4\uBD80 \uBD80\uBD84 \uC9D1\uD569\uC744 \uC4F0\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4." - }, - - }; - - return contents; - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_pt_BR.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_pt_BR.java deleted file mode 100644 index 264facaf952..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_pt_BR.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.xml.internal.serializer.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

    - * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

    - * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in com.sun.org.apache.xml.internal.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_pt_BR extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "A chave de mensagem ''{0}'' n\u00E3o est\u00E1 na classe de mensagem ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Houve falha no formato da mensagem ''{0}'' na classe de mensagem ''{1}''." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "A classe ''{0}'' do serializador n\u00E3o implementa org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "N\u00E3o foi poss\u00EDvel encontrar o recurso [ {0} ].\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "O recurso [ {0} ] n\u00E3o foi carregado: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Tamanho do buffer <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Foi detectado um substituto de UTF-16 inv\u00E1lido: {0} ?" }, - - { MsgKey.ER_OIERROR, - "Erro de E/S" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "N\u00E3o \u00E9 poss\u00EDvel adicionar o atributo {0} depois dos n\u00F3s filhos ou antes que um elemento seja produzido. O atributo ser\u00E1 ignorado." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "O namespace do prefixo ''{0}'' n\u00E3o foi declarado." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Atributo ''{0}'' fora do elemento." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Declara\u00E7\u00E3o de namespace ''{0}''=''{1}'' fora do elemento." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "N\u00E3o foi poss\u00EDvel carregar ''{0}'' (verificar CLASSPATH); usando agora apenas os padr\u00F5es" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Tentativa de exibir um caractere de valor integral {0} que n\u00E3o est\u00E1 representado na codifica\u00E7\u00E3o de sa\u00EDda especificada de {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "N\u00E3o foi poss\u00EDvel carregar o arquivo de propriedade ''{0}'' para o m\u00E9todo de sa\u00EDda ''{1}'' (verificar CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "N\u00FAmero de porta inv\u00E1lido" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "A porta n\u00E3o pode ser definida quando o host \u00E9 nulo" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "O host n\u00E3o \u00E9 um endere\u00E7o correto" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "O esquema n\u00E3o \u00E9 compat\u00EDvel." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "N\u00E3o \u00E9 poss\u00EDvel definir o esquema de uma string nula" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "O caminho cont\u00E9m uma sequ\u00EAncia inv\u00E1lida de caracteres de escape" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "O caminho cont\u00E9m um caractere inv\u00E1lido: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "O fragmento cont\u00E9m um caractere inv\u00E1lido" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "O fragmento n\u00E3o pode ser definido quando o caminho \u00E9 nulo" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "O fragmento s\u00F3 pode ser definido para um URI gen\u00E9rico" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Nenhum esquema encontrado no URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "N\u00E3o \u00E9 poss\u00EDvel inicializar o URI com par\u00E2metros vazios" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "O fragmento n\u00E3o pode ser especificado no caminho nem no fragmento" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "A string de consulta n\u00E3o pode ser especificada no caminho nem na string de consulta" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "A porta n\u00E3o pode ser especificada se o host n\u00E3o tiver sido especificado" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "As informa\u00E7\u00F5es do usu\u00E1rio n\u00E3o podem ser especificadas se o host n\u00E3o tiver sido especificado" }, - - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Advert\u00EAncia: a vers\u00E3o do documento de sa\u00EDda deve ser obrigatoriamente ''{0}''. Esta vers\u00E3o do XML n\u00E3o \u00E9 suportada. A vers\u00E3o do documento de sa\u00EDda ser\u00E1 ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "O esquema \u00E9 obrigat\u00F3rio!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "O objeto Properties especificado para a SerializerFactory n\u00E3o tem uma propriedade ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Advert\u00EAncia: a codifica\u00E7\u00E3o ''{0}'' n\u00E3o \u00E9 suportada pelo Java runtime." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "O par\u00E2metro ''{0}'' n\u00E3o \u00E9 reconhecido."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "O par\u00E2metro ''{0}'' \u00E9 reconhecido, mas o valor solicitado n\u00E3o pode ser definido."}, - - {MsgKey.ER_STRING_TOO_LONG, - "A string resultante \u00E9 muito longa para se ajustar a uma DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "O tipo de valor do nome deste par\u00E2metro \u00E9 incompat\u00EDvel com o tipo de valor esperado."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "O destino da sa\u00EDda dos dados a serem gravados era nulo."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Uma codifica\u00E7\u00E3o n\u00E3o suportada foi encontrada."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "N\u00E3o foi poss\u00EDvel serializar o n\u00F3."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "A Se\u00E7\u00E3o CDATA cont\u00E9m um ou mais marcadores de t\u00E9rmino ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "N\u00E3o foi poss\u00EDvel criar uma inst\u00E2ncia do verificador de Formato Correto. O par\u00E2metro formatado corretamente foi definido como verdadeiro, mas a verifica\u00E7\u00E3o de formato correto n\u00E3o pode ser executada." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "O n\u00F3 ''{0}'' cont\u00E9m caracteres XML inv\u00E1lidos." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "Um caractere XML inv\u00E1lido (Unicode: 0x{0}) foi encontrado no coment\u00E1rio." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "Um caractere XML inv\u00E1lido (Unicode: 0x{0}) foi encontrado nos dados da instru\u00E7\u00E3o de processamento." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "Um caractere XML inv\u00E1lido (Unicode: 0x {0}) foi encontrado no conte\u00FAdo da Se\u00E7\u00E3o CDATA." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "Um caractere XML inv\u00E1lido (Unicode: 0x {0}) foi encontrado no conte\u00FAdo dos dados de caracteres do n\u00F3." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "Um ou mais caracteres XML inv\u00E1lidos foram encontrados no n\u00F3 {0} chamado ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "A string \"--\" n\u00E3o \u00E9 permitida nos coment\u00E1rios." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "O valor do atributo \"{1}\" associado a um tipo de elemento \"{0}\" n\u00E3o deve conter o caractere ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "A refer\u00EAncia da entidade n\u00E3o submetida a parsing \"&{0};\" n\u00E3o \u00E9 permitida." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "A refer\u00EAncia da entidade externa \"&{0};\" n\u00E3o \u00E9 permitida em um valor do atributo." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "O prefixo \"{0}\" n\u00E3o pode ser vinculado ao namespace \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "O nome local do elemento \"{0}\" \u00E9 nulo." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "O nome local do atributo \"{0}\" \u00E9 nulo." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "O texto de substitui\u00E7\u00E3o do n\u00F3 \"{0}\" de entidade cont\u00E9m um n\u00F3 \"{1}\" de elemento com um prefixo desvinculado \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "O texto de substitui\u00E7\u00E3o do n\u00F3 \"{0}\" de entidade cont\u00E9m um n\u00F3 \"{1}\" de atributo com um prefixo desvinculado \"{2}\"." - }, - - { MsgKey.ER_WRITING_INTERNAL_SUBSET, - "Ocorreu um erro ao gravar o subconjunto interno." - }, - - }; - - return contents; - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_sv.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_sv.java deleted file mode 100644 index 25d70ef664c..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_sv.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.xml.internal.serializer.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

    - * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

    - * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in com.sun.org.apache.xml.internal.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_sv extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "Meddelandenyckeln ''{0}'' \u00E4r inte i meddelandeklassen ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Formatet p\u00E5 meddelandet ''{0}'' i meddelandeklassen ''{1}'' underk\u00E4ndes." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "Serializerklassen ''{0}'' implementerar inte org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "Resursen [ {0} ] kunde inte h\u00E4mtas.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "Resursen [ {0} ] kunde inte laddas: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Buffertstorlek <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Ogiltigt UTF-16-surrogat uppt\u00E4ckt: {0} ?" }, - - { MsgKey.ER_OIERROR, - "IO-fel" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Kan inte l\u00E4gga till attributet {0} efter underordnade noder eller innan ett element har skapats. Attributet ignoreras." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "Namnrymd f\u00F6r prefix ''{0}'' har inte deklarerats." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Attributet ''{0}'' finns utanf\u00F6r elementet." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Namnrymdsdeklarationen ''{0}''=''{1}'' finns utanf\u00F6r element." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Kunde inte ladda ''{0}'' (kontrollera CLASSPATH), anv\u00E4nder nu enbart standardv\u00E4rden" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "F\u00F6rs\u00F6k att skriva utdatatecken med integralv\u00E4rdet {0} som inte \u00E4r representerat i angiven utdatakodning av {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Kunde inte ladda egenskapsfilen ''{0}'' f\u00F6r utdatametoden ''{1}'' (kontrollera CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "Ogiltigt portnummer" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Port kan inte st\u00E4llas in n\u00E4r v\u00E4rd \u00E4r null" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "V\u00E4rd \u00E4r inte en v\u00E4lformulerad adress" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Schemat \u00E4r inte likformigt." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Kan inte st\u00E4lla in schema fr\u00E5n null-str\u00E4ng" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "S\u00F6kv\u00E4gen inneh\u00E5ller en ogiltig escape-sekvens" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "S\u00F6kv\u00E4gen inneh\u00E5ller ett ogiltigt tecken: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Fragment inneh\u00E5ller ett ogiltigt tecken" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Fragment kan inte st\u00E4llas in n\u00E4r s\u00F6kv\u00E4g \u00E4r null" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment kan bara st\u00E4llas in f\u00F6r en allm\u00E4n URI" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Schema saknas i URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Kan inte initiera URI med tomma parametrar" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment kan inte anges i b\u00E5de s\u00F6kv\u00E4gen och fragmentet" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "Fr\u00E5gestr\u00E4ng kan inte anges i b\u00E5de s\u00F6kv\u00E4gen och fr\u00E5gestr\u00E4ngen" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Port f\u00E5r inte anges om v\u00E4rden inte \u00E4r angiven" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Anv\u00E4ndarinfo f\u00E5r inte anges om v\u00E4rden inte \u00E4r angiven" }, - - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Varning: Versionen av utdatadokumentet som beg\u00E4rts \u00E4r ''{0}''. Den h\u00E4r versionen av XML st\u00F6ds inte. Versionen av utdatadokumentet kommer att vara ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Schema kr\u00E4vs!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "Egenskapsobjektet som \u00F6verf\u00F6rts till SerializerFactory har ingen ''{0}''-egenskap." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Varning: Kodningen ''{0}'' st\u00F6ds inte av Java runtime." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Parametern ''{0}'' k\u00E4nns inte igen."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Parametern ''{0}'' k\u00E4nns igen men det beg\u00E4rda v\u00E4rdet kan inte anges."}, - - {MsgKey.ER_STRING_TOO_LONG, - "Resultatstr\u00E4ngen \u00E4r f\u00F6r l\u00E5ng och ryms inte i DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "V\u00E4rdetypen f\u00F6r detta parameternamn \u00E4r inkompatibelt med f\u00F6rv\u00E4ntad v\u00E4rdetyp. "}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "Den utdatadestination som data ska skrivas till var null."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "En kodning som inte st\u00F6ds har p\u00E5tr\u00E4ffats."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Noden kunde inte serialiseras."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "CDATA-sektionen inneh\u00E5ller en eller flera avslutningsmark\u00F6rer (']]>')."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "En instans av Well-Formedness-kontrollen kunde inte skapas. Parametern well-formed har angetts till sant men Well-Formedness-kontrollen kan inte utf\u00F6ras." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "Noden ''{0}'' inneh\u00E5ller ogiltiga XML-tecken." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i kommentaren." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i bearbetningsinstruktionsdata." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i inneh\u00E5llet i CDATASection." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i teckendatainneh\u00E5llet f\u00F6r noden." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "Ett ogiltigt XML-tecken/ogiltiga XML-tecken hittades i {0}-noden med namnet ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "Str\u00E4ngen \"--\" \u00E4r inte till\u00E5ten inom kommentarer." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "Attributv\u00E4rdet \"{1}\" som associeras med elementtyp \"{0}\" f\u00E5r inte inneh\u00E5lla n\u00E5got ''<''-tecken." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "Den otolkade enhetsreferensen \"&{0};\" \u00E4r inte till\u00E5ten." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "Den externa enhetsreferensen \"&{0};\" till\u00E5ts inte i ett attributv\u00E4rde." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "Prefixet \"{0}\" kan inte bindas till namnrymden \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Det lokala namnet p\u00E5 elementet \"{0}\" \u00E4r null." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Det lokala namnet p\u00E5 attributet \"{0}\" \u00E4r null." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "Ers\u00E4ttningstexten f\u00F6r enhetsnoden \"{0}\" inneh\u00E5ller elementnoden \"{1}\" med ett obundet prefix, \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "Ers\u00E4ttningstexten f\u00F6r enhetsnoden \"{0}\" inneh\u00E5ller attributnoden \"{1}\" med ett obundet prefix, \"{2}\"." - }, - - { MsgKey.ER_WRITING_INTERNAL_SUBSET, - "Ett fel intr\u00E4ffade vid skrivning till den interna delm\u00E4ngden." - }, - - }; - - return contents; - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java deleted file mode 100644 index 03ef6849a25..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages_zh_TW.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.xml.internal.serializer.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

    - * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

    - * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in com.sun.org.apache.xml.internal.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_zh_TW extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "\u8A0A\u606F\u7D22\u5F15\u9375 ''{0}'' \u7684\u8A0A\u606F\u985E\u5225\u4E0D\u662F ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "\u8A0A\u606F\u985E\u5225 ''{1}'' \u4E2D\u7684\u8A0A\u606F ''{0}'' \u683C\u5F0F\u4E0D\u6B63\u78BA\u3002" }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "serializer \u985E\u5225 ''{0}'' \u4E0D\u5BE6\u884C org.xml.sax.ContentHandler\u3002" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "\u627E\u4E0D\u5230\u8CC7\u6E90 [ {0} ]\u3002\n{1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "\u7121\u6CD5\u8F09\u5165\u8CC7\u6E90 [ {0} ]: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\u7DE9\u885D\u5340\u5927\u5C0F <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "\u5075\u6E2C\u5230\u7121\u6548\u7684 UTF-16 \u4EE3\u7406: {0}\uFF1F" }, - - { MsgKey.ER_OIERROR, - "IO \u932F\u8AA4" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "\u5728\u7522\u751F\u5B50\u9805\u7BC0\u9EDE\u4E4B\u5F8C\uFF0C\u6216\u5728\u7522\u751F\u5143\u7D20\u4E4B\u524D\uFF0C\u4E0D\u53EF\u65B0\u589E\u5C6C\u6027 {0}\u3002\u5C6C\u6027\u6703\u88AB\u5FFD\u7565\u3002" }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "\u5B57\u9996 ''{0}'' \u7684\u547D\u540D\u7A7A\u9593\u5C1A\u672A\u5BA3\u544A\u3002" }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "\u5C6C\u6027 ''{0}'' \u5728\u5143\u7D20\u4E4B\u5916\u3002" }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "\u547D\u540D\u7A7A\u9593\u5BA3\u544A ''{0}''=''{1}'' \u8D85\u51FA\u5143\u7D20\u5916\u3002" }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "\u7121\u6CD5\u8F09\u5165 ''{0}'' (\u6AA2\u67E5 CLASSPATH)\uFF0C\u76EE\u524D\u53EA\u4F7F\u7528\u9810\u8A2D\u503C" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "\u5617\u8A66\u8F38\u51FA\u6574\u6578\u503C {0} \u7684\u5B57\u5143\uFF0C\u4F46\u662F\u5B83\u4E0D\u662F\u4EE5\u6307\u5B9A\u7684 {1} \u8F38\u51FA\u7DE8\u78BC\u5448\u73FE\u3002" }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "\u7121\u6CD5\u8F09\u5165\u8F38\u51FA\u65B9\u6CD5 ''{1}'' \u7684\u5C6C\u6027\u6A94 ''{0}'' (\u6AA2\u67E5 CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "\u7121\u6548\u7684\u9023\u63A5\u57E0\u865F\u78BC" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "\u4E3B\u6A5F\u70BA\u7A7A\u503C\u6642\uFF0C\u7121\u6CD5\u8A2D\u5B9A\u9023\u63A5\u57E0" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "\u4E3B\u6A5F\u6C92\u6709\u5B8C\u6574\u7684\u4F4D\u5740" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "\u914D\u7F6E\u4E0D\u4E00\u81F4\u3002" }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "\u7121\u6CD5\u5F9E\u7A7A\u503C\u5B57\u4E32\u8A2D\u5B9A\u914D\u7F6E" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "\u8DEF\u5F91\u5305\u542B\u7121\u6548\u7684\u9041\u96E2\u5E8F\u5217" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "\u8DEF\u5F91\u5305\u542B\u7121\u6548\u7684\u5B57\u5143: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "\u7247\u6BB5\u5305\u542B\u7121\u6548\u7684\u5B57\u5143" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "\u8DEF\u5F91\u70BA\u7A7A\u503C\u6642\uFF0C\u7121\u6CD5\u8A2D\u5B9A\u7247\u6BB5" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "\u53EA\u80FD\u5C0D\u4E00\u822C URI \u8A2D\u5B9A\u7247\u6BB5" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "\u5728 URI \u627E\u4E0D\u5230\u914D\u7F6E" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "\u7121\u6CD5\u4EE5\u7A7A\u767D\u53C3\u6578\u8D77\u59CB\u8A2D\u5B9A URI" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "\u8DEF\u5F91\u548C\u7247\u6BB5\u4E0D\u80FD\u540C\u6642\u6307\u5B9A\u7247\u6BB5" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "\u5728\u8DEF\u5F91\u53CA\u67E5\u8A62\u5B57\u4E32\u4E2D\u4E0D\u53EF\u6307\u5B9A\u67E5\u8A62\u5B57\u4E32" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "\u5982\u679C\u6C92\u6709\u6307\u5B9A\u4E3B\u6A5F\uFF0C\u4E0D\u53EF\u6307\u5B9A\u9023\u63A5\u57E0" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "\u5982\u679C\u6C92\u6709\u6307\u5B9A\u4E3B\u6A5F\uFF0C\u4E0D\u53EF\u6307\u5B9A Userinfo" }, - - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "\u8B66\u544A: \u8981\u6C42\u7684\u8F38\u51FA\u6587\u4EF6\u7248\u672C\u70BA ''{0}''\u3002\u4E0D\u652F\u63F4\u6B64\u7248\u672C\u7684 XML\u3002\u8F38\u51FA\u6587\u4EF6\u7684\u7248\u672C\u5C07\u6703\u662F ''1.0''\u3002" }, - - { MsgKey.ER_SCHEME_REQUIRED, - "\u914D\u7F6E\u662F\u5FC5\u8981\u9805\u76EE\uFF01" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "\u50B3\u905E\u7D66 SerializerFactory \u7684 Properties \u7269\u4EF6\u6C92\u6709 ''{0}'' \u5C6C\u6027\u3002" }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "\u8B66\u544A: Java Runtime \u4E0D\u652F\u63F4\u7DE8\u78BC ''{0}''\u3002" }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "\u7121\u6CD5\u8FA8\u8B58\u53C3\u6578 ''{0}''\u3002"}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "\u53EF\u8FA8\u8B58\u53C3\u6578 ''{0}''\uFF0C\u4F46\u7121\u6CD5\u8A2D\u5B9A\u8981\u6C42\u7684\u503C\u3002"}, - - {MsgKey.ER_STRING_TOO_LONG, - "\u7D50\u679C\u5B57\u4E32\u592A\u9577\uFF0C\u7121\u6CD5\u7D0D\u5165 DOMString: ''{0}''\u3002"}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "\u6B64\u53C3\u6578\u540D\u7A31\u7684\u503C\u985E\u578B\u8207\u9810\u671F\u7684\u503C\u985E\u578B\u4E0D\u76F8\u5BB9\u3002"}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "\u4F9B\u5BEB\u5165\u8CC7\u6599\u7684\u8F38\u51FA\u76EE\u7684\u5730\u70BA\u7A7A\u503C\u3002"}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "\u767C\u73FE\u4E0D\u652F\u63F4\u7684\u7DE8\u78BC\u3002"}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "\u7121\u6CD5\u5E8F\u5217\u5316\u6B64\u7BC0\u9EDE\u3002"}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "CDATA \u6BB5\u843D\u5305\u542B\u4E00\u6216\u591A\u500B\u7D42\u6B62\u6A19\u8A18 ']]>'\u3002"}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "\u7121\u6CD5\u5EFA\u7ACB Well-Formedness \u6AA2\u67E5\u7A0B\u5F0F\u57F7\u884C\u8655\u7406\u3002well-formed \u53C3\u6578\u8A2D\u70BA true\uFF0C\u4F46\u7121\u6CD5\u57F7\u884C well-formedness \u6AA2\u67E5\u3002" - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "\u7BC0\u9EDE ''{0}'' \u5305\u542B\u7121\u6548\u7684 XML \u5B57\u5143\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "\u5728\u8A3B\u89E3\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "\u5728\u8655\u7406\u7684\u6307\u793A\u8CC7\u6599\u4E2D\u767C\u73FE\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "\u5728 CDATASection \u7684\u5167\u5BB9\u4E2D\u767C\u73FE\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "\u5728\u7BC0\u9EDE\u7684\u5B57\u5143\u8CC7\u6599\u5167\u5BB9\u4E2D\u767C\u73FE\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "\u5728\u540D\u7A31\u70BA ''{1}'' \u7684 {0} \u7BC0\u9EDE\u4E2D\u767C\u73FE\u7121\u6548\u7684 XML \u5B57\u5143\u3002" - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "\u8A3B\u89E3\u4E0D\u5141\u8A31\u5B57\u4E32 \"--\"\u3002" - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "\u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u4E4B\u5C6C\u6027 \"{1}\" \u7684\u503C\u4E0D\u53EF\u5305\u542B ''<'' \u5B57\u5143\u3002" - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "\u4E0D\u5141\u8A31\u672A\u5256\u6790\u7684\u5BE6\u9AD4\u53C3\u7167 \"&{0};\"\u3002" - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "\u5C6C\u6027\u503C\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u5BE6\u9AD4 \"&{0};\"\u3002" - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "\u7121\u6CD5\u5C07\u524D\u7F6E\u78BC \"{0}\" \u9023\u7D50\u81F3\u547D\u540D\u7A7A\u9593 \"{1}\"\u3002" - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "\u5143\u7D20 \"{0}\" \u7684\u5340\u57DF\u540D\u7A31\u70BA\u7A7A\u503C\u3002" - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "\u5C6C\u6027 \"{0}\" \u7684\u5340\u57DF\u540D\u7A31\u70BA\u7A7A\u503C\u3002" - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "\u5BE6\u9AD4\u7BC0\u9EDE \"{0}\" \u7684\u53D6\u4EE3\u6587\u5B57\u5305\u542B\u5177\u6709\u672A\u9023\u7D50\u524D\u7F6E\u78BC \"{2}\" \u7684\u5143\u7D20\u7BC0\u9EDE \"{1}\"\u3002" - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "\u5BE6\u9AD4\u7BC0\u9EDE \"{0}\" \u7684\u53D6\u4EE3\u6587\u5B57\u5305\u542B\u5177\u6709\u672A\u9023\u7D50\u524D\u7F6E\u78BC \"{2}\" \u7684\u5C6C\u6027\u7BC0\u9EDE \"{1}\"\u3002" - }, - - { MsgKey.ER_WRITING_INTERNAL_SUBSET, - "\u5BEB\u5165\u5167\u90E8\u5B50\u96C6\u6642\u767C\u751F\u932F\u8AA4\u3002" - }, - - }; - - return contents; - } -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java index e3f25731e6d..d6ac228b982 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java @@ -34,6 +34,8 @@ import javax.xml.xpath.XPathVariableResolver; 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 @@ import org.xml.sax.InputSource; * 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 @@ public class XPathExpressionImpl extends XPathImplUtil implements XPathExpressio * 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 @@ public class XPathExpressionImpl extends XPathImplUtil implements XPathExpressio 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 @@ public class XPathExpressionImpl extends XPathImplUtil implements XPathExpressio 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 --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java index c2faf90ce2e..f62a290557d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java @@ -51,7 +51,7 @@ import org.xml.sax.InputSource; * 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 @@ public class XPathImpl extends XPathImplUtil implements javax.xml.xpath.XPath { // 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 --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java deleted file mode 100644 index 859983ca6dd..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java +++ /dev/null @@ -1,938 +0,0 @@ -/* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xpath.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a Static string constant for the - * Key and update the contents array with Key, Value pair - * Also you need to update the count of messages(MAX_CODE)or - * the count of warnings(MAX_WARNING) [ Information purpose only] - * @xsl.usage advanced - * @LastModified: Nov 2024 - */ -public class XPATHErrorResources_es extends ListResourceBundle -{ - -/* - * General notes to translators: - * - * This file contains error and warning messages related to XPath Error - * Handling. - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 8) The context node is the node in the document with respect to which an - * XPath expression is being evaluated. - * - * 9) An iterator is an object that traverses nodes in the tree, one at a time. - * - * 10) NCName is an XML term used to describe a name that does not contain a - * colon (a "no-colon name"). - * - * 11) QName is an XML term meaning "qualified name". - */ - - /* - * static variables - */ - public static final String ERROR0000 = "ERROR0000"; - public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH = - "ER_CURRENT_NOT_ALLOWED_IN_MATCH"; - public static final String ER_CURRENT_TAKES_NO_ARGS = - "ER_CURRENT_TAKES_NO_ARGS"; - public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED"; - public static final String ER_CONTEXT_CAN_NOT_BE_NULL = "ER_CONTEXT_CAN_NOT_BE_NULL"; - public static final String ER_CONTEXT_HAS_NO_OWNERDOC = - "ER_CONTEXT_HAS_NO_OWNERDOC"; - public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS = - "ER_LOCALNAME_HAS_TOO_MANY_ARGS"; - public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS = - "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS"; - public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS = - "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS"; - public static final String ER_NUMBER_HAS_TOO_MANY_ARGS = - "ER_NUMBER_HAS_TOO_MANY_ARGS"; - public static final String ER_NAME_HAS_TOO_MANY_ARGS = - "ER_NAME_HAS_TOO_MANY_ARGS"; - public static final String ER_STRING_HAS_TOO_MANY_ARGS = - "ER_STRING_HAS_TOO_MANY_ARGS"; - public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS = - "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS"; - public static final String ER_TRANSLATE_TAKES_3_ARGS = - "ER_TRANSLATE_TAKES_3_ARGS"; - public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG = - "ER_UNPARSEDENTITYURI_TAKES_1_ARG"; - public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED = - "ER_NAMESPACEAXIS_NOT_IMPLEMENTED"; - public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS"; - public static final String ER_UNKNOWN_MATCH_OPERATION = - "ER_UNKNOWN_MATCH_OPERATION"; - public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH"; - public static final String ER_CANT_CONVERT_TO_NUMBER = - "ER_CANT_CONVERT_TO_NUMBER"; - public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER = - "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER"; - public static final String ER_CANT_CONVERT_TO_NODELIST = - "ER_CANT_CONVERT_TO_NODELIST"; - public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST = - "ER_CANT_CONVERT_TO_MUTABLENODELIST"; - public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE"; - public static final String ER_EXPECTED_MATCH_PATTERN = - "ER_EXPECTED_MATCH_PATTERN"; - public static final String ER_COULDNOT_GET_VAR_NAMED = - "ER_COULDNOT_GET_VAR_NAMED"; - public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE"; - public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS"; - public static final String ER_EXPECTED_DOUBLE_QUOTE = - "ER_EXPECTED_DOUBLE_QUOTE"; - public static final String ER_EXPECTED_SINGLE_QUOTE = - "ER_EXPECTED_SINGLE_QUOTE"; - public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION"; - public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND"; - public static final String ER_INCORRECT_PROGRAMMER_ASSERTION = - "ER_INCORRECT_PROGRAMMER_ASSERTION"; - public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL = - "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL"; - public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG = - "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG"; - public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG = - "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG"; - public static final String ER_PREDICATE_ILLEGAL_SYNTAX = - "ER_PREDICATE_ILLEGAL_SYNTAX"; - public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME"; - public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE"; - public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = - "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED"; - public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER = - "ER_COULDNOT_BE_FORMATTED_TO_NUMBER"; - public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON = - "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON"; - public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP = - "ER_DIDNOT_FIND_XPATH_SELECT_EXP"; - public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH = - "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH"; - public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED"; - public static final String ER_ILLEGAL_VARIABLE_REFERENCE = - "ER_ILLEGAL_VARIABLE_REFERENCE"; - public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED"; - public static final String ER_KEY_HAS_TOO_MANY_ARGS = - "ER_KEY_HAS_TOO_MANY_ARGS"; - public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG"; - public static final String ER_COULDNOT_FIND_FUNCTION = - "ER_COULDNOT_FIND_FUNCTION"; - public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING"; - public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING = - "ER_PROBLEM_IN_DTM_NEXTSIBLING"; - public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL = - "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL"; - public static final String ER_SETDOMFACTORY_NOT_SUPPORTED = - "ER_SETDOMFACTORY_NOT_SUPPORTED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED"; - public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED"; -public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = - "ER_IGNORABLE_WHITESPACE_NOT_HANDLED"; - public static final String ER_DTM_CANNOT_HANDLE_NODES = - "ER_DTM_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_CANNOT_HANDLE_NODES = - "ER_XERCES_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_PARSE_ERROR_DETAILS = - "ER_XERCES_PARSE_ERROR_DETAILS"; - public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL"; - public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT"; - public static final String ER_FUNCTION_TOKEN_NOT_FOUND = - "ER_FUNCTION_TOKEN_NOT_FOUND"; - public static final String ER_CANNOT_DEAL_XPATH_TYPE = - "ER_CANNOT_DEAL_XPATH_TYPE"; - public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE"; - public static final String ER_NODESETDTM_NOT_MUTABLE = - "ER_NODESETDTM_NOT_MUTABLE"; - /** Variable not resolvable: */ - public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE"; - /** Null error handler */ - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - /** Programmer's assertion: unknown opcode */ - public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE = - "ER_PROG_ASSERT_UNKNOWN_OPCODE"; - /** 0 or 1 */ - public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE"; - /** rtf() not supported by XRTreeFragSelectWrapper */ - public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** asNodeIterator() not supported by XRTreeFragSelectWrapper */ - public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** fsb() not supported for XStringForChars */ - public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS = - "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS"; - /** Could not find variable with the name of */ - public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR"; - /** XStringForChars can not take a string for an argument */ - public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING = - "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING"; - /** The FastStringBuffer argument can not be null */ - public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL = - "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL"; - /** 2 or 3 */ - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - /** Variable accessed before it is bound! */ - public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND = - "ER_VARIABLE_ACCESSED_BEFORE_BIND"; - /** XStringForFSB can not take a string for an argument! */ - public static final String ER_FSB_CANNOT_TAKE_STRING = - "ER_FSB_CANNOT_TAKE_STRING"; - /** Error! Setting the root of a walker to null! */ - public static final String ER_SETTING_WALKER_ROOT_TO_NULL = - "ER_SETTING_WALKER_ROOT_TO_NULL"; - /** This NodeSetDTM can not iterate to a previous node! */ - public static final String ER_NODESETDTM_CANNOT_ITERATE = - "ER_NODESETDTM_CANNOT_ITERATE"; - /** This NodeSet can not iterate to a previous node! */ - public static final String ER_NODESET_CANNOT_ITERATE = - "ER_NODESET_CANNOT_ITERATE"; - /** This NodeSetDTM can not do indexing or counting functions! */ - public static final String ER_NODESETDTM_CANNOT_INDEX = - "ER_NODESETDTM_CANNOT_INDEX"; - /** This NodeSet can not do indexing or counting functions! */ - public static final String ER_NODESET_CANNOT_INDEX = - "ER_NODESET_CANNOT_INDEX"; - /** Can not call setShouldCacheNodes after nextNode has been called! */ - public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE = - "ER_CANNOT_CALL_SETSHOULDCACHENODE"; - /** {0} only allows {1} arguments */ - public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS"; - /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */ - public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP"; - /** Problem with RelativeLocationPath */ - public static final String ER_EXPECTED_REL_LOC_PATH = - "ER_EXPECTED_REL_LOC_PATH"; - /** Problem with LocationPath */ - public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH"; - public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR = - "ER_EXPECTED_LOC_PATH_AT_END_EXPR"; - /** Problem with Step */ - public static final String ER_EXPECTED_LOC_STEP = "ER_EXPECTED_LOC_STEP"; - /** Problem with NodeTest */ - public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST"; - /** Expected step pattern */ - public static final String ER_EXPECTED_STEP_PATTERN = - "ER_EXPECTED_STEP_PATTERN"; - /** Expected relative path pattern */ - public static final String ER_EXPECTED_REL_PATH_PATTERN = - "ER_EXPECTED_REL_PATH_PATTERN"; - /** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */ - public static final String ER_CANT_CONVERT_TO_BOOLEAN = - "ER_CANT_CONVERT_TO_BOOLEAN"; - /** Field ER_CANT_CONVERT_TO_SINGLENODE */ - public static final String ER_CANT_CONVERT_TO_SINGLENODE = - "ER_CANT_CONVERT_TO_SINGLENODE"; - /** Field ER_CANT_GET_SNAPSHOT_LENGTH */ - public static final String ER_CANT_GET_SNAPSHOT_LENGTH = - "ER_CANT_GET_SNAPSHOT_LENGTH"; - /** Field ER_NON_ITERATOR_TYPE */ - public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE"; - /** Field ER_DOC_MUTATED */ - public static final String ER_DOC_MUTATED = "ER_DOC_MUTATED"; - public static final String ER_INVALID_XPATH_TYPE = "ER_INVALID_XPATH_TYPE"; - public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT"; - public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES"; - public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER"; - public static final String ER_CANT_CONVERT_TO_STRING = - "ER_CANT_CONVERT_TO_STRING"; - public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE"; - public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT"; - /* Note to translators: The XPath expression cannot be evaluated with respect - * to this type of node. - */ - /** Field ER_WRONG_NODETYPE */ - public static final String ER_WRONG_NODETYPE = "ER_WRONG_NODETYPE"; - public static final String ER_XPATH_ERROR = "ER_XPATH_ERROR"; - - //BEGIN: Keys needed for exception messages of JAXP 1.3 XPath API implementation - public static final String ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED = "ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED"; - public static final String ER_RESOLVE_VARIABLE_RETURNS_NULL = "ER_RESOLVE_VARIABLE_RETURNS_NULL"; - public static final String ER_UNSUPPORTED_RETURN_TYPE = "ER_UNSUPPORTED_RETURN_TYPE"; - public static final String ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL = "ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL"; - public static final String ER_ARG_CANNOT_BE_NULL = "ER_ARG_CANNOT_BE_NULL"; - - public static final String ER_OBJECT_MODEL_NULL = "ER_OBJECT_MODEL_NULL"; - public static final String ER_OBJECT_MODEL_EMPTY = "ER_OBJECT_MODEL_EMPTY"; - public static final String ER_FEATURE_NAME_NULL = "ER_FEATURE_NAME_NULL"; - public static final String ER_FEATURE_UNKNOWN = "ER_FEATURE_UNKNOWN"; - public static final String ER_GETTING_NULL_FEATURE = "ER_GETTING_NULL_FEATURE"; - public static final String ER_GETTING_UNKNOWN_FEATURE = "ER_GETTING_UNKNOWN_FEATURE"; - public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE"; - public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER"; - public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER"; - //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation - - public static final String WG_LOCALE_NAME_NOT_HANDLED = - "WG_LOCALE_NAME_NOT_HANDLED"; - public static final String WG_PROPERTY_NOT_SUPPORTED = - "WG_PROPERTY_NOT_SUPPORTED"; - public static final String WG_DONT_DO_ANYTHING_WITH_NS = - "WG_DONT_DO_ANYTHING_WITH_NS"; - public static final String WG_QUO_NO_LONGER_DEFINED = - "WG_QUO_NO_LONGER_DEFINED"; - public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = - "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST"; - public static final String WG_FUNCTION_TOKEN_NOT_FOUND = - "WG_FUNCTION_TOKEN_NOT_FOUND"; - public static final String WG_COULDNOT_FIND_FUNCTION = - "WG_COULDNOT_FIND_FUNCTION"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED = - "WG_EXPAND_ENTITIES_NOT_SUPPORTED"; - public static final String WG_ILLEGAL_VARIABLE_REFERENCE = - "WG_ILLEGAL_VARIABLE_REFERENCE"; - public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING"; - - /** detach() not supported by XRTreeFragSelectWrapper */ - public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** num() not supported by XRTreeFragSelectWrapper */ - public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** xstr() not supported by XRTreeFragSelectWrapper */ - public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** str() not supported by XRTreeFragSelectWrapper */ - public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - - // Error messages... - - private static final Object[][] _contents = new Object[][]{ - - { "ERROR0000" , "{0}" }, - - { ER_CURRENT_NOT_ALLOWED_IN_MATCH, "La funci\u00F3n current() no est\u00E1 permitida en un patr\u00F3n de coincidencia." }, - - { ER_CURRENT_TAKES_NO_ARGS, "La funci\u00F3n current() no acepta argumentos." }, - - { ER_DOCUMENT_REPLACED, - "La implantaci\u00F3n de la funci\u00F3n document() se ha sustituido por com.sun.org.apache.xalan.internal.xslt.FuncDocument!"}, - - { ER_CONTEXT_CAN_NOT_BE_NULL, - "El contexto no puede ser nulo si la operaci\u00F3n depende del contexto."}, - - { ER_CONTEXT_HAS_NO_OWNERDOC, - "El contexto no tiene un documento de propietario."}, - - { ER_LOCALNAME_HAS_TOO_MANY_ARGS, - "local-name() tiene demasiados argumentos."}, - - { ER_NAMESPACEURI_HAS_TOO_MANY_ARGS, - "namespace-uri() tiene demasiados argumentos."}, - - { ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS, - "normalize-space() tiene demasiados argumentos."}, - - { ER_NUMBER_HAS_TOO_MANY_ARGS, - "number() tiene demasiados argumentos."}, - - { ER_NAME_HAS_TOO_MANY_ARGS, - "name() tiene demasiados argumentos."}, - - { ER_STRING_HAS_TOO_MANY_ARGS, - "string() tiene demasiados argumentos."}, - - { ER_STRINGLENGTH_HAS_TOO_MANY_ARGS, - "string-length() tiene demasiados argumentos."}, - - { ER_TRANSLATE_TAKES_3_ARGS, - "La funci\u00F3n translate() necesita tres argumentos."}, - - { ER_UNPARSEDENTITYURI_TAKES_1_ARG, - "La funci\u00F3n unparsed-entity-uri necesita un argumento."}, - - { ER_NAMESPACEAXIS_NOT_IMPLEMENTED, - "El eje de espacio de nombres no se ha implantado a\u00FAn."}, - - { ER_UNKNOWN_AXIS, - "eje desconocido: {0}"}, - - { ER_UNKNOWN_MATCH_OPERATION, - "Operaci\u00F3n de coincidencia desconocida."}, - - { ER_INCORRECT_ARG_LENGTH, - "La longitud del argumento de la prueba del nodo processing-instruction() es incorrecta."}, - - { ER_CANT_CONVERT_TO_NUMBER, - "No se puede convertir {0} en un n\u00FAmero"}, - - { ER_CANT_CONVERT_TO_NODELIST, - "No se puede convertir {0} en una lista de nodos."}, - - { ER_CANT_CONVERT_TO_MUTABLENODELIST, - "No se puede convertir {0} en un DTM de juego de nodos."}, - - { ER_CANT_CONVERT_TO_TYPE, - "No se puede convertir {0} en el n\u00FAmero de tipo {1}"}, - - { ER_EXPECTED_MATCH_PATTERN, - "Patr\u00F3n de coincidencia esperado en getMatchScore."}, - - { ER_COULDNOT_GET_VAR_NAMED, - "No se ha encontrado la variable llamada {0}"}, - - { ER_UNKNOWN_OPCODE, - "ERROR. C\u00F3digo de operaci\u00F3n desconocido: {0}"}, - - { ER_EXTRA_ILLEGAL_TOKENS, - "Tokens no permitidos adicionales: {0}"}, - - { ER_EXPECTED_DOUBLE_QUOTE, - "literal con comillas incorrectas... se esperaban comillas dobles"}, - - { ER_EXPECTED_SINGLE_QUOTE, - "literal con comillas incorrectas... se esperaban comillas simples"}, - - { ER_EMPTY_EXPRESSION, - "Expresi\u00F3n vac\u00EDa"}, - - { ER_EXPECTED_BUT_FOUND, - "Se esperaba {0} pero se ha encontrado: {1}"}, - - { ER_INCORRECT_PROGRAMMER_ASSERTION, - "La afirmaci\u00F3n del programador es incorrecta - {0}"}, - - { ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL, - "El argumento boolean(...) ya no es opcional con el borrador de XPath 19990709."}, - - { ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG, - "Se han encontrado ',' pero no va seguido de ning\u00FAn argumento"}, - - { ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG, - "Se han encontrado ',' pero no le sigue ning\u00FAn argumento"}, - - { ER_PREDICATE_ILLEGAL_SYNTAX, - "'..[predicate]' o '.[predicate]' es una sintaxis no v\u00E1lida. Utilice 'self::node()[predicate]' en su lugar."}, - - { ER_ILLEGAL_AXIS_NAME, - "nombre de eje no permitido: {0}"}, - - { ER_UNKNOWN_NODETYPE, - "Tipo de nodo desconocido: {0}"}, - - { ER_PATTERN_LITERAL_NEEDS_BE_QUOTED, - "El patr\u00F3n literal ({0}) debe incluirse entre comillas"}, - - { ER_COULDNOT_BE_FORMATTED_TO_NUMBER, - "{0} no se ha podido formatear en un n\u00FAmero."}, - - { ER_COULDNOT_CREATE_XMLPROCESSORLIAISON, - "No se ha podido crear el enlace TransformerFactory XML: {0}"}, - - { ER_DIDNOT_FIND_XPATH_SELECT_EXP, - "Error. No se ha encontrado la expresi\u00F3n de selecci\u00F3n xpath (-select)."}, - - { ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, - "ERROR. No se ha encontrado ENDOP despu\u00E9s de OP_LOCATIONPATH"}, - - { ER_ERROR_OCCURED, - "Se ha producido un error."}, - - { ER_ILLEGAL_VARIABLE_REFERENCE, - "La referencia de variable proporcionada para la variable est\u00E1 fuera de contexto o no tiene definici\u00F3n. Nombre = {0}"}, - - { ER_AXES_NOT_ALLOWED, - "S\u00F3lo los ejes child:: y attribute:: est\u00E1n permitidos en los patrones de coincidencia. Ejes incorrectos = {0}"}, - - { ER_KEY_HAS_TOO_MANY_ARGS, - "key() tiene un n\u00FAmero incorrecto de argumentos."}, - - { ER_COUNT_TAKES_1_ARG, - "La funci\u00F3n count necesita un argumento."}, - - { ER_COULDNOT_FIND_FUNCTION, - "No se ha encontrado la funci\u00F3n: {0}"}, - - { ER_UNSUPPORTED_ENCODING, - "Codificaci\u00F3n no soportada: {0}"}, - - { ER_PROBLEM_IN_DTM_NEXTSIBLING, - "Se ha producido un problema en DTM en getNextSibling... intentando la recuperaci\u00F3n"}, - - { ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL, - "Error de programador: no se puede escribir en EmptyNodeList."}, - - { ER_SETDOMFACTORY_NOT_SUPPORTED, - "setDOMFactory no est\u00E1 soportado por XPathContext."}, - - { ER_PREFIX_MUST_RESOLVE, - "El prefijo se debe resolver en un espacio de nombres: {0}"}, - - { ER_PARSE_NOT_SUPPORTED, - "El an\u00E1lisis (origen de InputSource) no est\u00E1 soportado en XPathContext. No se puede abrir {0}"}, - - { ER_SAX_API_NOT_HANDLED, - "Los caracteres de API SAX (char ch[]... no los gestiona el DTM."}, - - { ER_IGNORABLE_WHITESPACE_NOT_HANDLED, - "ignorableWhitespace(char ch[]... no gestionado por DTM."}, - - { ER_DTM_CANNOT_HANDLE_NODES, - "DTMLiaison no puede gestionar los nodos de tipo {0}"}, - - { ER_XERCES_CANNOT_HANDLE_NODES, - "DOM2Helper no puede gestionar los nodos de tipo {0}"}, - - { ER_XERCES_PARSE_ERROR_DETAILS, - "Error de DOM2Helper.parse: identificador de sistema - {0} l\u00EDnea - {1}"}, - - { ER_XERCES_PARSE_ERROR, - "Error de DOM2Helper.parse"}, - - { ER_INVALID_UTF16_SURROGATE, - "\u00BFSe ha detectado un sustituto UTF-16 no v\u00E1lido: {0}?"}, - - { ER_OIERROR, - "Error de ES"}, - - { ER_CANNOT_CREATE_URL, - "No se puede crear la URL para: {0}"}, - - { ER_XPATH_READOBJECT, - "En XPath.readObject: {0}"}, - - { ER_FUNCTION_TOKEN_NOT_FOUND, - "No se ha encontrado el token de funci\u00F3n."}, - - { ER_CANNOT_DEAL_XPATH_TYPE, - "No se puede negociar con el tipo de XPath: {0}"}, - - { ER_NODESET_NOT_MUTABLE, - "Este juego de nodos no es modificable"}, - - { ER_NODESETDTM_NOT_MUTABLE, - "Este DTM de juego de nodos no es modificable"}, - - { ER_VAR_NOT_RESOLVABLE, - "La variable no se puede resolver: {0}"}, - - { ER_NULL_ERROR_HANDLER, - "Manejador de errores nulo"}, - - { ER_PROG_ASSERT_UNKNOWN_OPCODE, - "Afirmaci\u00F3n del programador: c\u00F3digo de operaci\u00F3n desconocido: {0}"}, - - { ER_ZERO_OR_ONE, - "0 o 1"}, - - { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "rtf() no soportado por XRTreeFragSelectWrapper"}, - - { ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "asNodeIterator() no soportado por XRTreeFragSelectWrapper"}, - - /** detach() not supported by XRTreeFragSelectWrapper */ - { ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "detach() no soportado por XRTreeFragSelectWrapper"}, - - /** num() not supported by XRTreeFragSelectWrapper */ - { ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "num() no soportado por XRTreeFragSelectWrapper"}, - - /** xstr() not supported by XRTreeFragSelectWrapper */ - { ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "xstr() no soportado por XRTreeFragSelectWrapper"}, - - /** str() not supported by XRTreeFragSelectWrapper */ - { ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "str() no soportado por XRTreeFragSelectWrapper"}, - - { ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS, - "fsb() no soportado para XStringForChars"}, - - { ER_COULD_NOT_FIND_VAR, - "No se ha encontrado la variable con el nombre de {0}"}, - - { ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING, - "XStringForChars no puede utilizar una cadena para un argumento"}, - - { ER_FASTSTRINGBUFFER_CANNOT_BE_NULL, - "El argumento FastStringBuffer no puede ser nulo"}, - - { ER_TWO_OR_THREE, - "2 o 3"}, - - { ER_VARIABLE_ACCESSED_BEFORE_BIND, - "Se ha accedido a la variable antes de que se haya enlazado."}, - - { ER_FSB_CANNOT_TAKE_STRING, - "XStringForFSB no puede utilizar una cadena para un argumento."}, - - { ER_SETTING_WALKER_ROOT_TO_NULL, - "\n Error. Definici\u00F3n de una ra\u00EDz de un walker como nula."}, - - { ER_NODESETDTM_CANNOT_ITERATE, - "Este DTM de juego de nodos no puede iterarse en un nodo anterior."}, - - { ER_NODESET_CANNOT_ITERATE, - "Este juego de nodos no se puede iterar en un nodo anterior."}, - - { ER_NODESETDTM_CANNOT_INDEX, - "Este DTM de juego de nodos no puede realizar funciones de indexaci\u00F3n o recuento."}, - - { ER_NODESET_CANNOT_INDEX, - "Este juego de nodos no puede realizar funciones de indexaci\u00F3n o recuento."}, - - { ER_CANNOT_CALL_SETSHOULDCACHENODE, - "No se puede llamar a setShouldCacheNodes despu\u00E9s de haber llamado a nextNode."}, - - { ER_ONLY_ALLOWS, - "{0} s\u00F3lo permite {1} argumentos"}, - - { ER_UNKNOWN_STEP, - "Afirmaci\u00F3n del programador en getNextStepPos: tipo de paso desconocido: {0}"}, - - //Note to translators: A relative location path is a form of XPath expression. - // The message indicates that such an expression was expected following the - // characters '/' or '//', but was not found. - { ER_EXPECTED_REL_LOC_PATH, - "Se esperaba una ruta de acceso de ubicaci\u00F3n relativa despu\u00E9s del token '/' o '//'."}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such an expression was expected,but - // the characters specified by the substitution text were encountered instead. - { ER_EXPECTED_LOC_PATH, - "Se esperaba una ruta de acceso de ubicaci\u00F3n, pero se ha encontrado el siguiente token: {0}"}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such a subexpression was expected, - // but no more characters were found in the expression. - { ER_EXPECTED_LOC_PATH_AT_END_EXPR, - "Se esperaba una ruta de acceso de ubicaci\u00F3n, pero se ha encontrado el final de la expresi\u00F3n XPath en su lugar."}, - - // Note to translators: A location step is part of an XPath expression. - // The message indicates that syntactically such an expression was expected - // following the specified characters. - { ER_EXPECTED_LOC_STEP, - "Se esperaba un paso de ubicaci\u00F3n despu\u00E9s del token '/' o '//'."}, - - // Note to translators: A node test is part of an XPath expression that is - // used to test for particular kinds of nodes. In this case, a node test that - // consists of an NCName followed by a colon and an asterisk or that consists - // of a QName was expected, but was not found. - { ER_EXPECTED_NODE_TEST, - "Se esperaba una prueba de nodo que coincidiera con el NCName:* o QName."}, - - // Note to translators: A step pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but the specified character was found in the expression instead. - { ER_EXPECTED_STEP_PATTERN, - "Se esperaba un patr\u00F3n de paso, pero se ha encontrado '/'."}, - - // Note to translators: A relative path pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but was not found. - { ER_EXPECTED_REL_PATH_PATTERN, - "Se esperaba un patr\u00F3n de ruta de acceso relativa."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type boolean. - { ER_CANT_CONVERT_TO_BOOLEAN, - "El valor de XPathResult de la expresi\u00F3n XPath ''{0}'' tiene un valor de XPathResultType de {1} que no se puede convertir en un valor booleano."}, - - // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and - // FIRST_ORDERED_NODE_TYPE. - { ER_CANT_CONVERT_TO_SINGLENODE, - "El valor de XPathResult de la expresi\u00F3n XPath ''{0}'' tiene un valor de XPathResultType de {1} que no se puede convertir a un nodo \u00FAnico. El m\u00E9todo getSingleNodeValue se aplica s\u00F3lo a los tipos ANY_UNORDERED_NODE_TYPE y FIRST_ORDERED_NODE_TYPE."}, - - // Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and - // ORDERED_NODE_SNAPSHOT_TYPE. - { ER_CANT_GET_SNAPSHOT_LENGTH, - "No se puede llamar al m\u00E9todo getSnapshotLength en la expresi\u00F3n XPathResult de XPath ''{0}'' porque el valor de su XPathResultType es {1}. Este m\u00E9todo se aplica s\u00F3lo a los tipos UNORDERED_NODE_SNAPSHOT_TYPE y ORDERED_NODE_SNAPSHOT_TYPE."}, - - { ER_NON_ITERATOR_TYPE, - "No se puede llamar al m\u00E9todo iterateNext en el XPathResult de la expresi\u00F3n XPath ''{0}'' porque el valor de su XPathResultType es {1}. Este m\u00E9todo se aplica s\u00F3lo a los tipos UNORDERED_NODE_ITERATOR_TYPE y ORDERED_NODE_ITERATOR_TYPE."}, - - // Note to translators: This message indicates that the document being operated - // upon changed, so the iterator object that was being used to traverse the - // document has now become invalid. - { ER_DOC_MUTATED, - "Documento mutado debido a que se ha devuelto el resultado. El iterador no es v\u00E1lido."}, - - { ER_INVALID_XPATH_TYPE, - "Argumento de tipo XPath no v\u00E1lido: {0}"}, - - { ER_EMPTY_XPATH_RESULT, - "Objeto de resultado XPath vac\u00EDo"}, - - { ER_INCOMPATIBLE_TYPES, - "El valor de XPathResult de la expresi\u00F3n XPath ''{0}'' tiene un valor de XPathResultType de {1} que no se puede forzar en el XPathResultType especificado de {2}."}, - - { ER_NULL_RESOLVER, - "No se ha podido resolver el prefijo con el sistema de resoluci\u00F3n de prefijos nulo."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type string. - { ER_CANT_CONVERT_TO_STRING, - "El valor de XPathResult de la expresi\u00F3n XPath ''{0}'' tiene un valor de XPathResultType de {1} que no se puede convertir en una cadena."}, - - // Note to translators: Do not translate snapshotItem, - // UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE. - { ER_NON_SNAPSHOT_TYPE, - "No se puede llamar al m\u00E9todo snapshotItem en la expresi\u00F3n XPathResult de XPath ''{0}'' porque el valor de su XPathResultType es {1}. Este m\u00E9todo se aplica s\u00F3lo a los tipos UNORDERED_NODE_SNAPSHOT_TYPE y ORDERED_NODE_SNAPSHOT_TYPE."}, - - // Note to translators: XPathEvaluator is a Java interface name. An - // XPathEvaluator is created with respect to a particular XML document, and in - // this case the expression represented by this object was being evaluated with - // respect to a context node from a different document. - { ER_WRONG_DOCUMENT, - "El nodo de contexto no pertenece al documento que est\u00E1 enlazado a este XPathEvaluator."}, - - // Note to translators: The XPath expression cannot be evaluated with respect - // to this type of node. - { ER_WRONG_NODETYPE, - "El tipo de nodo de contexto no est\u00E1 soportado."}, - - { ER_XPATH_ERROR, - "Error desconocido en XPath."}, - - { ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER, - "El valor de XPathResult de la expresi\u00F3n XPath ''{0}'' tiene un valor de XPathResultType de {1} que no se puede convertir en un n\u00FAmero"}, - - //BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - /** Field ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED */ - - { ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED, - "Funci\u00F3n de extensi\u00F3n: no se puede llamar a ''{0}'' cuando la funci\u00F3n XMLConstants.FEATURE_SECURE_PROCESSING est\u00E1 definida en true."}, - - /** Field ER_RESOLVE_VARIABLE_RETURNS_NULL */ - - { ER_RESOLVE_VARIABLE_RETURNS_NULL, - "resolveVariable para la variable {0} devuelve un valor nulo"}, - - /** Field ER_UNSUPPORTED_RETURN_TYPE */ - - { ER_UNSUPPORTED_RETURN_TYPE, - "Tipo de retorno no soportado: {0}"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "El tipo de origen y/o retorno no puede ser nulo"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "El tipo de origen y/o retorno no puede ser nulo"}, - - /** Field ER_ARG_CANNOT_BE_NULL */ - - { ER_ARG_CANNOT_BE_NULL, - "El argumento {0} no puede ser nulo"}, - - /** Field ER_OBJECT_MODEL_NULL */ - - { ER_OBJECT_MODEL_NULL, - "{0}#isObjectModelSupported( Cadena objectModel ) no se puede llamar con objectModel == null"}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_OBJECT_MODEL_EMPTY, - "{0}#isObjectModelSupported( Cadena objectModel ) no se puede llamar con objectModel == \"\""}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_FEATURE_NAME_NULL, - "Intentando definir una funci\u00F3n con un nombre nulo: {0}#setFeature( null, {1})"}, - - /** Field ER_FEATURE_UNKNOWN */ - - { ER_FEATURE_UNKNOWN, - "Intentando definir la funci\u00F3n desconocida \"{0}\":{1}#setFeature({0},{2})"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_NULL_FEATURE, - "Intentando obtener una funci\u00F3n con un nombre nulo: {0}#getFeature(null)"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_UNKNOWN_FEATURE, - "Intentando obtener la funci\u00F3n desconocida \"{0}\":{1}#getFeature({0})"}, - - {ER_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: no se puede definir la funci\u00F3n en false cuando est\u00E1 presente el gestor de seguridad: {1}#setFeature({0},{2})"}, - - /** Field ER_NULL_XPATH_FUNCTION_RESOLVER */ - - { ER_NULL_XPATH_FUNCTION_RESOLVER, - "Se est\u00E1 intentando definir un valor de XPathFunctionResolver nulo:{0}#setXPathFunctionResolver(null)"}, - - /** Field ER_NULL_XPATH_VARIABLE_RESOLVER */ - - { ER_NULL_XPATH_VARIABLE_RESOLVER, - "Se est\u00E1 intentando definir un valor XPathVariableResolver nulo:{0}#setXPathVariableResolver(null)"}, - - //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - // Warnings... - - { WG_LOCALE_NAME_NOT_HANDLED, - "El nombre de la configuraci\u00F3n regional en la funci\u00F3n format-number no se ha manejado a\u00FAn."}, - - { WG_PROPERTY_NOT_SUPPORTED, - "Propiedad XSL no soportada: {0}"}, - - { WG_DONT_DO_ANYTHING_WITH_NS, - "No realice ninguna acci\u00F3n con el espacio de nombres {0} en la propiedad: {1}"}, - - { WG_QUO_NO_LONGER_DEFINED, - "Sintaxis anterior: quo(...) ya no se define en XPath."}, - - { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST, - "XPath necesita un objeto derivado para implantar una prueba de nodo."}, - - { WG_FUNCTION_TOKEN_NOT_FOUND, - "No se ha encontrado el token de funci\u00F3n."}, - - { WG_COULDNOT_FIND_FUNCTION, - "No se ha encontrado la funci\u00F3n: {0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "No se puede crear la URL desde: {0}"}, - - { WG_EXPAND_ENTITIES_NOT_SUPPORTED, - "Opci\u00F3n -E no soportada para el analizador DTM"}, - - { WG_ILLEGAL_VARIABLE_REFERENCE, - "La referencia de variable proporcionada para la variable est\u00E1 fuera de contexto o no tiene definici\u00F3n. Nombre = {0}"}, - - { WG_UNSUPPORTED_ENCODING, - "Codificaci\u00F3n no soportada: {0}"}, - - - - // Other miscellaneous text used inside the code... - { "ui_language", "es"}, - { "help_language", "es"}, - { "language", "es"}, - { "BAD_CODE", "El par\u00E1metro para crear un mensaje est\u00E1 fuera de los l\u00EDmites"}, - { "FORMAT_FAILED", "Se ha emitido una excepci\u00F3n durante la llamada a messageFormat"}, - { "version", ">>>>>>> Versi\u00F3n Xalan "}, - { "version2", "<<<<<<<"}, - { "yes", "s\u00ED"}, - { "line", "N\u00BA de L\u00EDnea"}, - { "column", "N\u00BA de Columna"}, - { "xsldone", "XSLProcessor: listo"}, - { "xpath_option", "Opciones de xpath: "}, - { "optionIN", " [-in inputXMLURL]"}, - { "optionSelect", " [-select expresi\u00F3n xpath]"}, - { "optionMatch", " [-match patr\u00F3n de coincidencia (para diagn\u00F3sticos de coincidencia)]"}, - { "optionAnyExpr", "O s\u00F3lo una expresi\u00F3n xpath realizar\u00E1 un volcado de diagn\u00F3stico"}, - { "noParsermsg1", "El proceso XSL no se ha realizado correctamente."}, - { "noParsermsg2", "** No se ha encontrado el analizador **"}, - { "noParsermsg3", "Compruebe la classpath."}, - { "noParsermsg4", "Si no tiene un analizador XML de IBM para Java, puede descargarlo de"}, - { "noParsermsg5", "AlphaWorks de IBM: http://www.alphaworks.ibm.com/formula/xml"}, - { "gtone", ">1" }, - { "zero", "0" }, - { "one", "1" }, - { "two" , "2" }, - { "three", "3" } - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - - - // ================= INFRASTRUCTURE ====================== - - /** Field BAD_CODE */ - public static final String BAD_CODE = "BAD_CODE"; - - /** Field FORMAT_FAILED */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - /** Field ERROR_RESOURCES */ - public static final String ERROR_RESOURCES = - "com.sun.org.apache.xpath.internal.res.XPATHErrorResources"; - - /** Field ERROR_STRING */ - public static final String ERROR_STRING = "#error"; - - /** Field ERROR_HEADER */ - public static final String ERROR_HEADER = "Error: "; - - /** Field WARNING_HEADER */ - public static final String WARNING_HEADER = "Warning: "; - - /** Field XSL_HEADER */ - public static final String XSL_HEADER = "XSL "; - - /** Field XML_HEADER */ - public static final String XML_HEADER = "XML "; - - /** Field QUERY_HEADER */ - public static final String QUERY_HEADER = "PATTERN "; - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java deleted file mode 100644 index d9ddcf8212a..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java +++ /dev/null @@ -1,938 +0,0 @@ -/* - * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xpath.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a Static string constant for the - * Key and update the contents array with Key, Value pair - * Also you need to update the count of messages(MAX_CODE)or - * the count of warnings(MAX_WARNING) [ Information purpose only] - * @xsl.usage advanced - * @LastModified: Nov 2024 - */ -public class XPATHErrorResources_fr extends ListResourceBundle -{ - -/* - * General notes to translators: - * - * This file contains error and warning messages related to XPath Error - * Handling. - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 8) The context node is the node in the document with respect to which an - * XPath expression is being evaluated. - * - * 9) An iterator is an object that traverses nodes in the tree, one at a time. - * - * 10) NCName is an XML term used to describe a name that does not contain a - * colon (a "no-colon name"). - * - * 11) QName is an XML term meaning "qualified name". - */ - - /* - * static variables - */ - public static final String ERROR0000 = "ERROR0000"; - public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH = - "ER_CURRENT_NOT_ALLOWED_IN_MATCH"; - public static final String ER_CURRENT_TAKES_NO_ARGS = - "ER_CURRENT_TAKES_NO_ARGS"; - public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED"; - public static final String ER_CONTEXT_CAN_NOT_BE_NULL = "ER_CONTEXT_CAN_NOT_BE_NULL"; - public static final String ER_CONTEXT_HAS_NO_OWNERDOC = - "ER_CONTEXT_HAS_NO_OWNERDOC"; - public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS = - "ER_LOCALNAME_HAS_TOO_MANY_ARGS"; - public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS = - "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS"; - public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS = - "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS"; - public static final String ER_NUMBER_HAS_TOO_MANY_ARGS = - "ER_NUMBER_HAS_TOO_MANY_ARGS"; - public static final String ER_NAME_HAS_TOO_MANY_ARGS = - "ER_NAME_HAS_TOO_MANY_ARGS"; - public static final String ER_STRING_HAS_TOO_MANY_ARGS = - "ER_STRING_HAS_TOO_MANY_ARGS"; - public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS = - "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS"; - public static final String ER_TRANSLATE_TAKES_3_ARGS = - "ER_TRANSLATE_TAKES_3_ARGS"; - public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG = - "ER_UNPARSEDENTITYURI_TAKES_1_ARG"; - public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED = - "ER_NAMESPACEAXIS_NOT_IMPLEMENTED"; - public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS"; - public static final String ER_UNKNOWN_MATCH_OPERATION = - "ER_UNKNOWN_MATCH_OPERATION"; - public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH"; - public static final String ER_CANT_CONVERT_TO_NUMBER = - "ER_CANT_CONVERT_TO_NUMBER"; - public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER = - "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER"; - public static final String ER_CANT_CONVERT_TO_NODELIST = - "ER_CANT_CONVERT_TO_NODELIST"; - public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST = - "ER_CANT_CONVERT_TO_MUTABLENODELIST"; - public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE"; - public static final String ER_EXPECTED_MATCH_PATTERN = - "ER_EXPECTED_MATCH_PATTERN"; - public static final String ER_COULDNOT_GET_VAR_NAMED = - "ER_COULDNOT_GET_VAR_NAMED"; - public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE"; - public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS"; - public static final String ER_EXPECTED_DOUBLE_QUOTE = - "ER_EXPECTED_DOUBLE_QUOTE"; - public static final String ER_EXPECTED_SINGLE_QUOTE = - "ER_EXPECTED_SINGLE_QUOTE"; - public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION"; - public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND"; - public static final String ER_INCORRECT_PROGRAMMER_ASSERTION = - "ER_INCORRECT_PROGRAMMER_ASSERTION"; - public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL = - "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL"; - public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG = - "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG"; - public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG = - "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG"; - public static final String ER_PREDICATE_ILLEGAL_SYNTAX = - "ER_PREDICATE_ILLEGAL_SYNTAX"; - public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME"; - public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE"; - public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = - "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED"; - public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER = - "ER_COULDNOT_BE_FORMATTED_TO_NUMBER"; - public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON = - "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON"; - public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP = - "ER_DIDNOT_FIND_XPATH_SELECT_EXP"; - public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH = - "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH"; - public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED"; - public static final String ER_ILLEGAL_VARIABLE_REFERENCE = - "ER_ILLEGAL_VARIABLE_REFERENCE"; - public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED"; - public static final String ER_KEY_HAS_TOO_MANY_ARGS = - "ER_KEY_HAS_TOO_MANY_ARGS"; - public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG"; - public static final String ER_COULDNOT_FIND_FUNCTION = - "ER_COULDNOT_FIND_FUNCTION"; - public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING"; - public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING = - "ER_PROBLEM_IN_DTM_NEXTSIBLING"; - public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL = - "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL"; - public static final String ER_SETDOMFACTORY_NOT_SUPPORTED = - "ER_SETDOMFACTORY_NOT_SUPPORTED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED"; - public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED"; -public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = - "ER_IGNORABLE_WHITESPACE_NOT_HANDLED"; - public static final String ER_DTM_CANNOT_HANDLE_NODES = - "ER_DTM_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_CANNOT_HANDLE_NODES = - "ER_XERCES_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_PARSE_ERROR_DETAILS = - "ER_XERCES_PARSE_ERROR_DETAILS"; - public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL"; - public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT"; - public static final String ER_FUNCTION_TOKEN_NOT_FOUND = - "ER_FUNCTION_TOKEN_NOT_FOUND"; - public static final String ER_CANNOT_DEAL_XPATH_TYPE = - "ER_CANNOT_DEAL_XPATH_TYPE"; - public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE"; - public static final String ER_NODESETDTM_NOT_MUTABLE = - "ER_NODESETDTM_NOT_MUTABLE"; - /** Variable not resolvable: */ - public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE"; - /** Null error handler */ - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - /** Programmer's assertion: unknown opcode */ - public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE = - "ER_PROG_ASSERT_UNKNOWN_OPCODE"; - /** 0 or 1 */ - public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE"; - /** rtf() not supported by XRTreeFragSelectWrapper */ - public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** asNodeIterator() not supported by XRTreeFragSelectWrapper */ - public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** fsb() not supported for XStringForChars */ - public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS = - "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS"; - /** Could not find variable with the name of */ - public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR"; - /** XStringForChars can not take a string for an argument */ - public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING = - "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING"; - /** The FastStringBuffer argument can not be null */ - public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL = - "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL"; - /** 2 or 3 */ - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - /** Variable accessed before it is bound! */ - public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND = - "ER_VARIABLE_ACCESSED_BEFORE_BIND"; - /** XStringForFSB can not take a string for an argument! */ - public static final String ER_FSB_CANNOT_TAKE_STRING = - "ER_FSB_CANNOT_TAKE_STRING"; - /** Error! Setting the root of a walker to null! */ - public static final String ER_SETTING_WALKER_ROOT_TO_NULL = - "ER_SETTING_WALKER_ROOT_TO_NULL"; - /** This NodeSetDTM can not iterate to a previous node! */ - public static final String ER_NODESETDTM_CANNOT_ITERATE = - "ER_NODESETDTM_CANNOT_ITERATE"; - /** This NodeSet can not iterate to a previous node! */ - public static final String ER_NODESET_CANNOT_ITERATE = - "ER_NODESET_CANNOT_ITERATE"; - /** This NodeSetDTM can not do indexing or counting functions! */ - public static final String ER_NODESETDTM_CANNOT_INDEX = - "ER_NODESETDTM_CANNOT_INDEX"; - /** This NodeSet can not do indexing or counting functions! */ - public static final String ER_NODESET_CANNOT_INDEX = - "ER_NODESET_CANNOT_INDEX"; - /** Can not call setShouldCacheNodes after nextNode has been called! */ - public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE = - "ER_CANNOT_CALL_SETSHOULDCACHENODE"; - /** {0} only allows {1} arguments */ - public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS"; - /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */ - public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP"; - /** Problem with RelativeLocationPath */ - public static final String ER_EXPECTED_REL_LOC_PATH = - "ER_EXPECTED_REL_LOC_PATH"; - /** Problem with LocationPath */ - public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH"; - public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR = - "ER_EXPECTED_LOC_PATH_AT_END_EXPR"; - /** Problem with Step */ - public static final String ER_EXPECTED_LOC_STEP = "ER_EXPECTED_LOC_STEP"; - /** Problem with NodeTest */ - public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST"; - /** Expected step pattern */ - public static final String ER_EXPECTED_STEP_PATTERN = - "ER_EXPECTED_STEP_PATTERN"; - /** Expected relative path pattern */ - public static final String ER_EXPECTED_REL_PATH_PATTERN = - "ER_EXPECTED_REL_PATH_PATTERN"; - /** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */ - public static final String ER_CANT_CONVERT_TO_BOOLEAN = - "ER_CANT_CONVERT_TO_BOOLEAN"; - /** Field ER_CANT_CONVERT_TO_SINGLENODE */ - public static final String ER_CANT_CONVERT_TO_SINGLENODE = - "ER_CANT_CONVERT_TO_SINGLENODE"; - /** Field ER_CANT_GET_SNAPSHOT_LENGTH */ - public static final String ER_CANT_GET_SNAPSHOT_LENGTH = - "ER_CANT_GET_SNAPSHOT_LENGTH"; - /** Field ER_NON_ITERATOR_TYPE */ - public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE"; - /** Field ER_DOC_MUTATED */ - public static final String ER_DOC_MUTATED = "ER_DOC_MUTATED"; - public static final String ER_INVALID_XPATH_TYPE = "ER_INVALID_XPATH_TYPE"; - public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT"; - public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES"; - public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER"; - public static final String ER_CANT_CONVERT_TO_STRING = - "ER_CANT_CONVERT_TO_STRING"; - public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE"; - public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT"; - /* Note to translators: The XPath expression cannot be evaluated with respect - * to this type of node. - */ - /** Field ER_WRONG_NODETYPE */ - public static final String ER_WRONG_NODETYPE = "ER_WRONG_NODETYPE"; - public static final String ER_XPATH_ERROR = "ER_XPATH_ERROR"; - - //BEGIN: Keys needed for exception messages of JAXP 1.3 XPath API implementation - public static final String ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED = "ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED"; - public static final String ER_RESOLVE_VARIABLE_RETURNS_NULL = "ER_RESOLVE_VARIABLE_RETURNS_NULL"; - public static final String ER_UNSUPPORTED_RETURN_TYPE = "ER_UNSUPPORTED_RETURN_TYPE"; - public static final String ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL = "ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL"; - public static final String ER_ARG_CANNOT_BE_NULL = "ER_ARG_CANNOT_BE_NULL"; - - public static final String ER_OBJECT_MODEL_NULL = "ER_OBJECT_MODEL_NULL"; - public static final String ER_OBJECT_MODEL_EMPTY = "ER_OBJECT_MODEL_EMPTY"; - public static final String ER_FEATURE_NAME_NULL = "ER_FEATURE_NAME_NULL"; - public static final String ER_FEATURE_UNKNOWN = "ER_FEATURE_UNKNOWN"; - public static final String ER_GETTING_NULL_FEATURE = "ER_GETTING_NULL_FEATURE"; - public static final String ER_GETTING_UNKNOWN_FEATURE = "ER_GETTING_UNKNOWN_FEATURE"; - public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE"; - public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER"; - public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER"; - //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation - - public static final String WG_LOCALE_NAME_NOT_HANDLED = - "WG_LOCALE_NAME_NOT_HANDLED"; - public static final String WG_PROPERTY_NOT_SUPPORTED = - "WG_PROPERTY_NOT_SUPPORTED"; - public static final String WG_DONT_DO_ANYTHING_WITH_NS = - "WG_DONT_DO_ANYTHING_WITH_NS"; - public static final String WG_QUO_NO_LONGER_DEFINED = - "WG_QUO_NO_LONGER_DEFINED"; - public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = - "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST"; - public static final String WG_FUNCTION_TOKEN_NOT_FOUND = - "WG_FUNCTION_TOKEN_NOT_FOUND"; - public static final String WG_COULDNOT_FIND_FUNCTION = - "WG_COULDNOT_FIND_FUNCTION"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED = - "WG_EXPAND_ENTITIES_NOT_SUPPORTED"; - public static final String WG_ILLEGAL_VARIABLE_REFERENCE = - "WG_ILLEGAL_VARIABLE_REFERENCE"; - public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING"; - - /** detach() not supported by XRTreeFragSelectWrapper */ - public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** num() not supported by XRTreeFragSelectWrapper */ - public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** xstr() not supported by XRTreeFragSelectWrapper */ - public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** str() not supported by XRTreeFragSelectWrapper */ - public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - - // Error messages... - - private static final Object[][] _contents = new Object[][]{ - - { "ERROR0000" , "{0}" }, - - { ER_CURRENT_NOT_ALLOWED_IN_MATCH, "La fonction current() n'est pas autoris\u00E9e dans un mod\u00E8le de recherche." }, - - { ER_CURRENT_TAKES_NO_ARGS, "La fonction current() n'accepte pas d'argument." }, - - { ER_DOCUMENT_REPLACED, - "L'impl\u00E9mentation de la fonction document() a \u00E9t\u00E9 remplac\u00E9e par com.sun.org.apache.xalan.internal.xslt.FuncDocument."}, - - { ER_CONTEXT_CAN_NOT_BE_NULL, - "Le contexte ne peut pas \u00EAtre NULL lorsque l'op\u00E9ration en d\u00E9pend."}, - - { ER_CONTEXT_HAS_NO_OWNERDOC, - "le contexte ne poss\u00E8de pas de document propri\u00E9taire."}, - - { ER_LOCALNAME_HAS_TOO_MANY_ARGS, - "local-name() poss\u00E8de trop d'arguments."}, - - { ER_NAMESPACEURI_HAS_TOO_MANY_ARGS, - "namespace-uri() poss\u00E8de trop d'arguments."}, - - { ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS, - "normalize-space() poss\u00E8de trop d'arguments."}, - - { ER_NUMBER_HAS_TOO_MANY_ARGS, - "number() poss\u00E8de trop d'arguments."}, - - { ER_NAME_HAS_TOO_MANY_ARGS, - "name() poss\u00E8de trop d'arguments."}, - - { ER_STRING_HAS_TOO_MANY_ARGS, - "string() poss\u00E8de trop d'arguments."}, - - { ER_STRINGLENGTH_HAS_TOO_MANY_ARGS, - "string-length() poss\u00E8de trop d'arguments."}, - - { ER_TRANSLATE_TAKES_3_ARGS, - "La fonction translate() accepte trois arguments."}, - - { ER_UNPARSEDENTITYURI_TAKES_1_ARG, - "Un argument doit \u00EAtre fourni \u00E0 la fonction unparsed-entity-uri."}, - - { ER_NAMESPACEAXIS_NOT_IMPLEMENTED, - "l'axe de l'espace de noms n'est pas impl\u00E9ment\u00E9."}, - - { ER_UNKNOWN_AXIS, - "axe inconnu : {0}"}, - - { ER_UNKNOWN_MATCH_OPERATION, - "op\u00E9ration de correspondance inconnue."}, - - { ER_INCORRECT_ARG_LENGTH, - "La longueur d'argument du test du noeud processing-instruction() n'est pas correcte."}, - - { ER_CANT_CONVERT_TO_NUMBER, - "Impossible de convertir {0} en nombre"}, - - { ER_CANT_CONVERT_TO_NODELIST, - "Impossible de convertir {0} en NodeList."}, - - { ER_CANT_CONVERT_TO_MUTABLENODELIST, - "Impossible de convertir {0} en NodeSetDTM."}, - - { ER_CANT_CONVERT_TO_TYPE, - "Impossible de convertir {0} en type#{1}"}, - - { ER_EXPECTED_MATCH_PATTERN, - "Mod\u00E8le de recherche attendu dans getMatchScore."}, - - { ER_COULDNOT_GET_VAR_NAMED, - "Impossible d''obtenir la variable nomm\u00E9e {0}"}, - - { ER_UNKNOWN_OPCODE, - "ERREUR. Code d''op\u00E9ration inconnu : {0}"}, - - { ER_EXTRA_ILLEGAL_TOKENS, - "Jetons non admis suppl\u00E9mentaires : {0}"}, - - { ER_EXPECTED_DOUBLE_QUOTE, - "Erreur de guillemets dans un litt\u00E9ral... Guillemets obligatoires."}, - - { ER_EXPECTED_SINGLE_QUOTE, - "Erreur d'apostrophe dans un litt\u00E9ral... Apostrophe obligatoire."}, - - { ER_EMPTY_EXPRESSION, - "Expression vide."}, - - { ER_EXPECTED_BUT_FOUND, - "Valeur attendue : {0}, mais {1} a \u00E9t\u00E9 trouv\u00E9"}, - - { ER_INCORRECT_PROGRAMMER_ASSERTION, - "Assertion de programmeur incorrecte. - {0}"}, - - { ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL, - "L'argument boolean(...) n'est plus facultatif avec le brouillon (draft) XPath 19990709."}, - - { ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG, - "Caract\u00E8re ',' trouv\u00E9 sans argument le pr\u00E9c\u00E9dant."}, - - { ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG, - "Caract\u00E8re ',' trouv\u00E9 sans argument le suivant."}, - - { ER_PREDICATE_ILLEGAL_SYNTAX, - "Syntaxe '..[predicate]' ou '.[predicate]' non admise. Utilisez 'self::node()[predicate]' \u00E0 la place."}, - - { ER_ILLEGAL_AXIS_NAME, - "nom d''axe non admis : {0}"}, - - { ER_UNKNOWN_NODETYPE, - "Type de noeud inconnu : {0}"}, - - { ER_PATTERN_LITERAL_NEEDS_BE_QUOTED, - "Le litt\u00E9ral de mod\u00E8le ({0}) doit figurer entre guillemets."}, - - { ER_COULDNOT_BE_FORMATTED_TO_NUMBER, - "Impossible de formater {0} en nombre."}, - - { ER_COULDNOT_CREATE_XMLPROCESSORLIAISON, - "Impossible de cr\u00E9er la liaison XML TransformerFactory : {0}"}, - - { ER_DIDNOT_FIND_XPATH_SELECT_EXP, - "Erreur. Expression de s\u00E9lection XPath (-select) introuvable."}, - - { ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, - "ERREUR. ENDOP introuvable apr\u00E8s OP_LOCATIONPATH"}, - - { ER_ERROR_OCCURED, - "Une erreur est survenue."}, - - { ER_ILLEGAL_VARIABLE_REFERENCE, - "L''\u00E9l\u00E9ment VariableReference indiqu\u00E9 pour la variable est hors contexte ou sans d\u00E9finition. Nom = {0}"}, - - { ER_AXES_NOT_ALLOWED, - "Seuls les axes child:: et attribute:: sont autoris\u00E9s dans des mod\u00E8les de recherche. Axes en cause = {0}"}, - - { ER_KEY_HAS_TOO_MANY_ARGS, - "key() poss\u00E8de un nombre incorrect d'arguments."}, - - { ER_COUNT_TAKES_1_ARG, - "Un seul argument doit \u00EAtre fourni \u00E0 la fonction de d\u00E9compte."}, - - { ER_COULDNOT_FIND_FUNCTION, - "Impossible de trouver la fonction : {0}"}, - - { ER_UNSUPPORTED_ENCODING, - "Encodage non pris en charge : {0}"}, - - { ER_PROBLEM_IN_DTM_NEXTSIBLING, - "Une erreur est survenue dans le DTM de getNextSibling... Tentative de r\u00E9cup\u00E9ration"}, - - { ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL, - "Erreur de programmeur : \u00E9criture impossible dans EmptyNodeList."}, - - { ER_SETDOMFACTORY_NOT_SUPPORTED, - "SetDOMFactory n'est pas pris en charge par XPathContext."}, - - { ER_PREFIX_MUST_RESOLVE, - "Le pr\u00E9fixe doit produire un espace de noms : {0}"}, - - { ER_PARSE_NOT_SUPPORTED, - "analyse (source InputSource) non prise en charge dans XPathContext. Impossible d''ouvrir {0}"}, - - { ER_SAX_API_NOT_HANDLED, - "Caract\u00E8res (char ch[]...) de l'API SAX non pris en charge par le DTM."}, - - { ER_IGNORABLE_WHITESPACE_NOT_HANDLED, - "ignorableWhitespace(char ch[]... non pris en charge par le DTM."}, - - { ER_DTM_CANNOT_HANDLE_NODES, - "DTMLiaison ne prend pas en charge les noeuds de type {0}"}, - - { ER_XERCES_CANNOT_HANDLE_NODES, - "DOM2Helper ne prend pas en charge les noeuds de type {0}"}, - - { ER_XERCES_PARSE_ERROR_DETAILS, - "Erreur de DOM2Helper.parse : SystemID - {0} ligne - {1}"}, - - { ER_XERCES_PARSE_ERROR, - "Erreur de DOM2Helper.parse"}, - - { ER_INVALID_UTF16_SURROGATE, - "Substitut UTF-16 non valide d\u00E9tect\u00E9 : {0} ?"}, - - { ER_OIERROR, - "Erreur d'E/S"}, - - { ER_CANNOT_CREATE_URL, - "Impossible de cr\u00E9er une URL pour : {0}"}, - - { ER_XPATH_READOBJECT, - "Dans XPath.readObject : {0}"}, - - { ER_FUNCTION_TOKEN_NOT_FOUND, - "jeton de fonction introuvable."}, - - { ER_CANNOT_DEAL_XPATH_TYPE, - "Impossible de traiter le type XPath : {0}"}, - - { ER_NODESET_NOT_MUTABLE, - "NodeSet non mutable"}, - - { ER_NODESETDTM_NOT_MUTABLE, - "NodeSetDTM non mutable"}, - - { ER_VAR_NOT_RESOLVABLE, - "Impossible de r\u00E9soudre la variable : {0}"}, - - { ER_NULL_ERROR_HANDLER, - "Gestionnaire d'erreurs NULL"}, - - { ER_PROG_ASSERT_UNKNOWN_OPCODE, - "Assertion de programmeur : code d''op\u00E9ration inconnu : {0}"}, - - { ER_ZERO_OR_ONE, - "0 ou 1"}, - - { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "rtf() non pris en charge par XRTreeFragSelectWrapper"}, - - { ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "asNodeIterator() non pris en charge par XRTreeFragSelectWrapper"}, - - /** detach() not supported by XRTreeFragSelectWrapper */ - { ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "detach() non pris en charge par XRTreeFragSelectWrapper"}, - - /** num() not supported by XRTreeFragSelectWrapper */ - { ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "num() non pris en charge par XRTreeFragSelectWrapper"}, - - /** xstr() not supported by XRTreeFragSelectWrapper */ - { ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "xstr() non pris en charge par XRTreeFragSelectWrapper"}, - - /** str() not supported by XRTreeFragSelectWrapper */ - { ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "str() non pris en charge par XRTreeFragSelectWrapper"}, - - { ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS, - "fsb() non pris en charge pour XStringForChars"}, - - { ER_COULD_NOT_FIND_VAR, - "Impossible de trouver la variable portant le nom {0}"}, - - { ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING, - "XStringForChars n'accepte pas de cha\u00EEne comme argument"}, - - { ER_FASTSTRINGBUFFER_CANNOT_BE_NULL, - "L'argument FastStringBuffer ne doit pas \u00EAtre NULL"}, - - { ER_TWO_OR_THREE, - "2 ou 3"}, - - { ER_VARIABLE_ACCESSED_BEFORE_BIND, - "L'acc\u00E8s \u00E0 la variable a pr\u00E9c\u00E9d\u00E9 la liaison de celle-ci."}, - - { ER_FSB_CANNOT_TAKE_STRING, - "XStringForFSB n'accepte pas de cha\u00EEne comme argument."}, - - { ER_SETTING_WALKER_ROOT_TO_NULL, - "\n Erreur. D\u00E9finition de la racine d'un composant d'exploration sur NULL."}, - - { ER_NODESETDTM_CANNOT_ITERATE, - "Ce NodeSetDTM ne permet pas d'it\u00E9ration vers un noeud pr\u00E9c\u00E9dent."}, - - { ER_NODESET_CANNOT_ITERATE, - "Ce NodeSet ne permet pas d'it\u00E9ration vers un noeud pr\u00E9c\u00E9dent."}, - - { ER_NODESETDTM_CANNOT_INDEX, - "Ce NodeSetDTM ne peut pas utiliser de fonctions d'indexation ou de d\u00E9compte."}, - - { ER_NODESET_CANNOT_INDEX, - "Ce NodeSet ne peut pas utiliser de fonctions d'indexation ou de d\u00E9compte."}, - - { ER_CANNOT_CALL_SETSHOULDCACHENODE, - "Impossible d'appeler setShouldCacheNodes apr\u00E8s nextNode."}, - - { ER_ONLY_ALLOWS, - "{0} accepte uniquement {1} arguments"}, - - { ER_UNKNOWN_STEP, - "Assertion du programmeur dans getNextStepPos : stepType inconnu : {0}"}, - - //Note to translators: A relative location path is a form of XPath expression. - // The message indicates that such an expression was expected following the - // characters '/' or '//', but was not found. - { ER_EXPECTED_REL_LOC_PATH, - "Un chemin d'acc\u00E8s relatif \u00E9tait attendu apr\u00E8s le jeton '/' ou '//'."}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such an expression was expected,but - // the characters specified by the substitution text were encountered instead. - { ER_EXPECTED_LOC_PATH, - "Un chemin d''acc\u00E8s \u00E9tait attendu, mais le jeton suivant a \u00E9t\u00E9 d\u00E9tect\u00E9 : {0}"}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such a subexpression was expected, - // but no more characters were found in the expression. - { ER_EXPECTED_LOC_PATH_AT_END_EXPR, - "Un chemin d'acc\u00E8s \u00E9tait attendu, mais la fin de l'expression XPath a \u00E9t\u00E9 d\u00E9tect\u00E9e \u00E0 la place."}, - - // Note to translators: A location step is part of an XPath expression. - // The message indicates that syntactically such an expression was expected - // following the specified characters. - { ER_EXPECTED_LOC_STEP, - "Une \u00E9tape d'emplacement \u00E9tait attendue apr\u00E8s le jeton '/' ou '//'."}, - - // Note to translators: A node test is part of an XPath expression that is - // used to test for particular kinds of nodes. In this case, a node test that - // consists of an NCName followed by a colon and an asterisk or that consists - // of a QName was expected, but was not found. - { ER_EXPECTED_NODE_TEST, - "Un test de noeud correspondant \u00E0 NCName:* ou QName \u00E9tait attendu."}, - - // Note to translators: A step pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but the specified character was found in the expression instead. - { ER_EXPECTED_STEP_PATTERN, - "Un mod\u00E8le d'\u00E9tape \u00E9tait attendu, mais '/' a \u00E9t\u00E9 d\u00E9tect\u00E9."}, - - // Note to translators: A relative path pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but was not found. - { ER_EXPECTED_REL_PATH_PATTERN, - "Un mod\u00E8le de chemin relatif \u00E9tait attendu."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type boolean. - { ER_CANT_CONVERT_TO_BOOLEAN, - "L''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' comporte un \u00E9l\u00E9ment XPathResultType de {1} qui ne peut pas \u00EAtre converti en valeur bool\u00E9enne."}, - - // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and - // FIRST_ORDERED_NODE_TYPE. - { ER_CANT_CONVERT_TO_SINGLENODE, - "L''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' comporte un \u00E9l\u00E9ment XPathResultType de {1} qui ne peut pas \u00EAtre converti en noeud unique. La m\u00E9thode getSingleNodeValue est applicable uniquement aux types ANY_UNORDERED_NODE_TYPE et FIRST_ORDERED_NODE_TYPE."}, - - // Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and - // ORDERED_NODE_SNAPSHOT_TYPE. - { ER_CANT_GET_SNAPSHOT_LENGTH, - "La m\u00E9thode getSnapshotLength ne peut pas \u00EAtre appel\u00E9e sur l''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' car son \u00E9l\u00E9ment XPathResultType est {1}. Cette m\u00E9thode est applicable uniquement aux types UNORDERED_NODE_SNAPSHOT_TYPE et ORDERED_NODE_SNAPSHOT_TYPE."}, - - { ER_NON_ITERATOR_TYPE, - "La m\u00E9thode iterateNext ne peut pas \u00EAtre appel\u00E9e sur l''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' car son \u00E9l\u00E9ment XPathResultType est {1}. Cette m\u00E9thode est applicable uniquement aux types UNORDERED_NODE_ITERATOR_TYPE et ORDERED_NODE_ITERATOR_TYPE."}, - - // Note to translators: This message indicates that the document being operated - // upon changed, so the iterator object that was being used to traverse the - // document has now become invalid. - { ER_DOC_MUTATED, - "Mutation du document suite au renvoi du r\u00E9sultat. L'it\u00E9rateur est incorrect."}, - - { ER_INVALID_XPATH_TYPE, - "Argument de type XPath incorrect : {0}"}, - - { ER_EMPTY_XPATH_RESULT, - "Objet de r\u00E9sultat XPath vide"}, - - { ER_INCOMPATIBLE_TYPES, - "L''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' comporte un \u00E9l\u00E9ment XPathResultType de {1} qui ne peut pas \u00EAtre forc\u00E9 dans l''\u00E9l\u00E9ment XPathResultType de {2} indiqu\u00E9."}, - - { ER_NULL_RESOLVER, - "Impossible de r\u00E9soudre le pr\u00E9fixe avec un r\u00E9solveur de pr\u00E9fixe NULL."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type string. - { ER_CANT_CONVERT_TO_STRING, - "L''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' comporte un \u00E9l\u00E9ment XPathResultType de {1} qui ne peut pas \u00EAtre converti en cha\u00EEne."}, - - // Note to translators: Do not translate snapshotItem, - // UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE. - { ER_NON_SNAPSHOT_TYPE, - "La m\u00E9thode snapshotItem ne peut pas \u00EAtre appel\u00E9e sur l''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' car son \u00E9l\u00E9ment XPathResultType est {1}. Cette m\u00E9thode est applicable uniquement aux types UNORDERED_NODE_SNAPSHOT_TYPE et ORDERED_NODE_SNAPSHOT_TYPE."}, - - // Note to translators: XPathEvaluator is a Java interface name. An - // XPathEvaluator is created with respect to a particular XML document, and in - // this case the expression represented by this object was being evaluated with - // respect to a context node from a different document. - { ER_WRONG_DOCUMENT, - "Le noeud de contexte n'appartient pas au document li\u00E9 \u00E0 ce XPathEvaluator."}, - - // Note to translators: The XPath expression cannot be evaluated with respect - // to this type of node. - { ER_WRONG_NODETYPE, - "Le type de noeud de contexte n'est pas pris en charge."}, - - { ER_XPATH_ERROR, - "Erreur inconnue d\u00E9tect\u00E9e dans XPath."}, - - { ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER, - "L''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' comporte un \u00E9l\u00E9ment XPathResultType de {1} qui ne peut pas \u00EAtre converti en nombre"}, - - //BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - /** Field ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED */ - - { ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED, - "La fonction d''extension ''{0}'' ne peut pas \u00EAtre appel\u00E9e lorsque la fonctionnalit\u00E9 XMLConstants.FEATURE_SECURE_PROCESSING est d\u00E9finie sur True."}, - - /** Field ER_RESOLVE_VARIABLE_RETURNS_NULL */ - - { ER_RESOLVE_VARIABLE_RETURNS_NULL, - "resolveVariable pour la variable {0} renvoie la valeur NULL"}, - - /** Field ER_UNSUPPORTED_RETURN_TYPE */ - - { ER_UNSUPPORTED_RETURN_TYPE, - "Type de retour non pris en charge : {0}"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "Le type de source et/ou de retour ne peut pas \u00EAtre NULL"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "Le type de source et/ou de retour ne peut pas \u00EAtre NULL"}, - - /** Field ER_ARG_CANNOT_BE_NULL */ - - { ER_ARG_CANNOT_BE_NULL, - "L''argument {0} ne doit pas \u00EAtre NULL"}, - - /** Field ER_OBJECT_MODEL_NULL */ - - { ER_OBJECT_MODEL_NULL, - "{0}#isObjectModelSupported(String objectModel) ne peut pas \u00EAtre appel\u00E9 avec objectModel == null"}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_OBJECT_MODEL_EMPTY, - "{0}#isObjectModelSupported(String objectModel) ne peut pas \u00EAtre appel\u00E9 avec objectModel == \"\""}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_FEATURE_NAME_NULL, - "Tentative de d\u00E9finition d''une fonctionnalit\u00E9 portant un nom NULL : {0}#setFeature(null, {1})"}, - - /** Field ER_FEATURE_UNKNOWN */ - - { ER_FEATURE_UNKNOWN, - "Tentative de d\u00E9finition de la fonctionnalit\u00E9 inconnue \"{0}\" : {1}#setFeature({0},{2})"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_NULL_FEATURE, - "Tentative d''obtention d''une fonctionnalit\u00E9 portant un nom NULL : {0}#getFeature(null)"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_UNKNOWN_FEATURE, - "Tentative d''obtention de la fonctionnalit\u00E9 inconnue \"{0}\" : {1}#getFeature({0})"}, - - {ER_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING : impossible de d\u00E9finir la fonctionnalit\u00E9 sur False en pr\u00E9sence du gestionnaire de s\u00E9curit\u00E9 : {1}#setFeature({0},{2})"}, - - /** Field ER_NULL_XPATH_FUNCTION_RESOLVER */ - - { ER_NULL_XPATH_FUNCTION_RESOLVER, - "Tentative de d\u00E9finition d''un \u00E9l\u00E9ment XPathFunctionResolver NULL : {0}#setXPathFunctionResolver(null)"}, - - /** Field ER_NULL_XPATH_VARIABLE_RESOLVER */ - - { ER_NULL_XPATH_VARIABLE_RESOLVER, - "Tentative de d\u00E9finition d''un \u00E9l\u00E9ment XPathVariableResolver NULL : {0}#setXPathVariableResolver(null)"}, - - //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - // Warnings... - - { WG_LOCALE_NAME_NOT_HANDLED, - "le nom d'environnement local de la fonction format-number n'est pas encore pris en charge."}, - - { WG_PROPERTY_NOT_SUPPORTED, - "Propri\u00E9t\u00E9 XSL non prise en charge : {0}"}, - - { WG_DONT_DO_ANYTHING_WITH_NS, - "Espace de noms {0} inexploitable dans la propri\u00E9t\u00E9 : {1}"}, - - { WG_QUO_NO_LONGER_DEFINED, - "L'ancienne syntaxe quo(...) n'est plus d\u00E9finie dans XPath."}, - - { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST, - "XPath requiert un objet d\u00E9riv\u00E9 pour impl\u00E9menter nodeTest."}, - - { WG_FUNCTION_TOKEN_NOT_FOUND, - "jeton de fonction introuvable."}, - - { WG_COULDNOT_FIND_FUNCTION, - "Impossible de trouver la fonction : {0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "Impossible de cr\u00E9er l''URL \u00E0 partir de : {0}"}, - - { WG_EXPAND_ENTITIES_NOT_SUPPORTED, - "L'option -E n'est pas prise en charge pour l'analyseur DTM"}, - - { WG_ILLEGAL_VARIABLE_REFERENCE, - "L''\u00E9l\u00E9ment VariableReference indiqu\u00E9 pour la variable est hors contexte ou sans d\u00E9finition. Nom = {0}"}, - - { WG_UNSUPPORTED_ENCODING, - "Encodage non pris en charge : {0}"}, - - - - // Other miscellaneous text used inside the code... - { "ui_language", "fr"}, - { "help_language", "fr"}, - { "language", "fr"}, - { "BAD_CODE", "Le param\u00E8tre de createMessage est hors limites"}, - { "FORMAT_FAILED", "Exception g\u00E9n\u00E9r\u00E9e lors de l'appel de messageFormat"}, - { "version", ">>>>>>> Version de Xalan "}, - { "version2", "<<<<<<<"}, - { "yes", "oui"}, - { "line", "Ligne n\u00B0"}, - { "column", "Colonne n\u00B0"}, - { "xsldone", "XSLProcessor : termin\u00E9"}, - { "xpath_option", "options xpath : "}, - { "optionIN", " [-in inputXMLURL]"}, - { "optionSelect", " [-select xpath expression]"}, - { "optionMatch", " [-match match pattern (pour les diagnostics de correspondance)]"}, - { "optionAnyExpr", "Ou seulement une expression XPath g\u00E9n\u00E9rera un fichier dump de diagnostic"}, - { "noParsermsg1", "Echec du processus XSL."}, - { "noParsermsg2", "** Analyseur introuvable **"}, - { "noParsermsg3", "V\u00E9rifiez votre variable d'environnement CLASSPATH."}, - { "noParsermsg4", "Si vous ne disposez pas de l'analyseur XML pour Java d'IBM, vous pouvez le t\u00E9l\u00E9charger sur le site"}, - { "noParsermsg5", "AlphaWorks d'IBM : http://www.alphaworks.ibm.com/formula/xml"}, - { "gtone", ">1" }, - { "zero", "0" }, - { "one", "1" }, - { "two" , "2" }, - { "three", "3" } - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - - - // ================= INFRASTRUCTURE ====================== - - /** Field BAD_CODE */ - public static final String BAD_CODE = "BAD_CODE"; - - /** Field FORMAT_FAILED */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - /** Field ERROR_RESOURCES */ - public static final String ERROR_RESOURCES = - "com.sun.org.apache.xpath.internal.res.XPATHErrorResources"; - - /** Field ERROR_STRING */ - public static final String ERROR_STRING = "#error"; - - /** Field ERROR_HEADER */ - public static final String ERROR_HEADER = "Error: "; - - /** Field WARNING_HEADER */ - public static final String WARNING_HEADER = "Warning: "; - - /** Field XSL_HEADER */ - public static final String XSL_HEADER = "XSL "; - - /** Field XML_HEADER */ - public static final String XML_HEADER = "XML "; - - /** Field QUERY_HEADER */ - public static final String QUERY_HEADER = "PATTERN "; - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java deleted file mode 100644 index ad730f9894f..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java +++ /dev/null @@ -1,938 +0,0 @@ -/* - * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xpath.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a Static string constant for the - * Key and update the contents array with Key, Value pair - * Also you need to update the count of messages(MAX_CODE)or - * the count of warnings(MAX_WARNING) [ Information purpose only] - * @xsl.usage advanced - * @LastModified: Nov 2024 - */ -public class XPATHErrorResources_it extends ListResourceBundle -{ - -/* - * General notes to translators: - * - * This file contains error and warning messages related to XPath Error - * Handling. - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 8) The context node is the node in the document with respect to which an - * XPath expression is being evaluated. - * - * 9) An iterator is an object that traverses nodes in the tree, one at a time. - * - * 10) NCName is an XML term used to describe a name that does not contain a - * colon (a "no-colon name"). - * - * 11) QName is an XML term meaning "qualified name". - */ - - /* - * static variables - */ - public static final String ERROR0000 = "ERROR0000"; - public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH = - "ER_CURRENT_NOT_ALLOWED_IN_MATCH"; - public static final String ER_CURRENT_TAKES_NO_ARGS = - "ER_CURRENT_TAKES_NO_ARGS"; - public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED"; - public static final String ER_CONTEXT_CAN_NOT_BE_NULL = "ER_CONTEXT_CAN_NOT_BE_NULL"; - public static final String ER_CONTEXT_HAS_NO_OWNERDOC = - "ER_CONTEXT_HAS_NO_OWNERDOC"; - public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS = - "ER_LOCALNAME_HAS_TOO_MANY_ARGS"; - public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS = - "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS"; - public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS = - "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS"; - public static final String ER_NUMBER_HAS_TOO_MANY_ARGS = - "ER_NUMBER_HAS_TOO_MANY_ARGS"; - public static final String ER_NAME_HAS_TOO_MANY_ARGS = - "ER_NAME_HAS_TOO_MANY_ARGS"; - public static final String ER_STRING_HAS_TOO_MANY_ARGS = - "ER_STRING_HAS_TOO_MANY_ARGS"; - public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS = - "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS"; - public static final String ER_TRANSLATE_TAKES_3_ARGS = - "ER_TRANSLATE_TAKES_3_ARGS"; - public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG = - "ER_UNPARSEDENTITYURI_TAKES_1_ARG"; - public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED = - "ER_NAMESPACEAXIS_NOT_IMPLEMENTED"; - public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS"; - public static final String ER_UNKNOWN_MATCH_OPERATION = - "ER_UNKNOWN_MATCH_OPERATION"; - public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH"; - public static final String ER_CANT_CONVERT_TO_NUMBER = - "ER_CANT_CONVERT_TO_NUMBER"; - public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER = - "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER"; - public static final String ER_CANT_CONVERT_TO_NODELIST = - "ER_CANT_CONVERT_TO_NODELIST"; - public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST = - "ER_CANT_CONVERT_TO_MUTABLENODELIST"; - public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE"; - public static final String ER_EXPECTED_MATCH_PATTERN = - "ER_EXPECTED_MATCH_PATTERN"; - public static final String ER_COULDNOT_GET_VAR_NAMED = - "ER_COULDNOT_GET_VAR_NAMED"; - public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE"; - public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS"; - public static final String ER_EXPECTED_DOUBLE_QUOTE = - "ER_EXPECTED_DOUBLE_QUOTE"; - public static final String ER_EXPECTED_SINGLE_QUOTE = - "ER_EXPECTED_SINGLE_QUOTE"; - public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION"; - public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND"; - public static final String ER_INCORRECT_PROGRAMMER_ASSERTION = - "ER_INCORRECT_PROGRAMMER_ASSERTION"; - public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL = - "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL"; - public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG = - "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG"; - public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG = - "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG"; - public static final String ER_PREDICATE_ILLEGAL_SYNTAX = - "ER_PREDICATE_ILLEGAL_SYNTAX"; - public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME"; - public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE"; - public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = - "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED"; - public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER = - "ER_COULDNOT_BE_FORMATTED_TO_NUMBER"; - public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON = - "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON"; - public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP = - "ER_DIDNOT_FIND_XPATH_SELECT_EXP"; - public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH = - "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH"; - public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED"; - public static final String ER_ILLEGAL_VARIABLE_REFERENCE = - "ER_ILLEGAL_VARIABLE_REFERENCE"; - public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED"; - public static final String ER_KEY_HAS_TOO_MANY_ARGS = - "ER_KEY_HAS_TOO_MANY_ARGS"; - public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG"; - public static final String ER_COULDNOT_FIND_FUNCTION = - "ER_COULDNOT_FIND_FUNCTION"; - public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING"; - public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING = - "ER_PROBLEM_IN_DTM_NEXTSIBLING"; - public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL = - "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL"; - public static final String ER_SETDOMFACTORY_NOT_SUPPORTED = - "ER_SETDOMFACTORY_NOT_SUPPORTED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED"; - public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED"; -public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = - "ER_IGNORABLE_WHITESPACE_NOT_HANDLED"; - public static final String ER_DTM_CANNOT_HANDLE_NODES = - "ER_DTM_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_CANNOT_HANDLE_NODES = - "ER_XERCES_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_PARSE_ERROR_DETAILS = - "ER_XERCES_PARSE_ERROR_DETAILS"; - public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL"; - public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT"; - public static final String ER_FUNCTION_TOKEN_NOT_FOUND = - "ER_FUNCTION_TOKEN_NOT_FOUND"; - public static final String ER_CANNOT_DEAL_XPATH_TYPE = - "ER_CANNOT_DEAL_XPATH_TYPE"; - public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE"; - public static final String ER_NODESETDTM_NOT_MUTABLE = - "ER_NODESETDTM_NOT_MUTABLE"; - /** Variable not resolvable: */ - public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE"; - /** Null error handler */ - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - /** Programmer's assertion: unknown opcode */ - public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE = - "ER_PROG_ASSERT_UNKNOWN_OPCODE"; - /** 0 or 1 */ - public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE"; - /** rtf() not supported by XRTreeFragSelectWrapper */ - public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** asNodeIterator() not supported by XRTreeFragSelectWrapper */ - public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** fsb() not supported for XStringForChars */ - public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS = - "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS"; - /** Could not find variable with the name of */ - public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR"; - /** XStringForChars can not take a string for an argument */ - public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING = - "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING"; - /** The FastStringBuffer argument can not be null */ - public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL = - "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL"; - /** 2 or 3 */ - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - /** Variable accessed before it is bound! */ - public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND = - "ER_VARIABLE_ACCESSED_BEFORE_BIND"; - /** XStringForFSB can not take a string for an argument! */ - public static final String ER_FSB_CANNOT_TAKE_STRING = - "ER_FSB_CANNOT_TAKE_STRING"; - /** Error! Setting the root of a walker to null! */ - public static final String ER_SETTING_WALKER_ROOT_TO_NULL = - "ER_SETTING_WALKER_ROOT_TO_NULL"; - /** This NodeSetDTM can not iterate to a previous node! */ - public static final String ER_NODESETDTM_CANNOT_ITERATE = - "ER_NODESETDTM_CANNOT_ITERATE"; - /** This NodeSet can not iterate to a previous node! */ - public static final String ER_NODESET_CANNOT_ITERATE = - "ER_NODESET_CANNOT_ITERATE"; - /** This NodeSetDTM can not do indexing or counting functions! */ - public static final String ER_NODESETDTM_CANNOT_INDEX = - "ER_NODESETDTM_CANNOT_INDEX"; - /** This NodeSet can not do indexing or counting functions! */ - public static final String ER_NODESET_CANNOT_INDEX = - "ER_NODESET_CANNOT_INDEX"; - /** Can not call setShouldCacheNodes after nextNode has been called! */ - public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE = - "ER_CANNOT_CALL_SETSHOULDCACHENODE"; - /** {0} only allows {1} arguments */ - public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS"; - /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */ - public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP"; - /** Problem with RelativeLocationPath */ - public static final String ER_EXPECTED_REL_LOC_PATH = - "ER_EXPECTED_REL_LOC_PATH"; - /** Problem with LocationPath */ - public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH"; - public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR = - "ER_EXPECTED_LOC_PATH_AT_END_EXPR"; - /** Problem with Step */ - public static final String ER_EXPECTED_LOC_STEP = "ER_EXPECTED_LOC_STEP"; - /** Problem with NodeTest */ - public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST"; - /** Expected step pattern */ - public static final String ER_EXPECTED_STEP_PATTERN = - "ER_EXPECTED_STEP_PATTERN"; - /** Expected relative path pattern */ - public static final String ER_EXPECTED_REL_PATH_PATTERN = - "ER_EXPECTED_REL_PATH_PATTERN"; - /** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */ - public static final String ER_CANT_CONVERT_TO_BOOLEAN = - "ER_CANT_CONVERT_TO_BOOLEAN"; - /** Field ER_CANT_CONVERT_TO_SINGLENODE */ - public static final String ER_CANT_CONVERT_TO_SINGLENODE = - "ER_CANT_CONVERT_TO_SINGLENODE"; - /** Field ER_CANT_GET_SNAPSHOT_LENGTH */ - public static final String ER_CANT_GET_SNAPSHOT_LENGTH = - "ER_CANT_GET_SNAPSHOT_LENGTH"; - /** Field ER_NON_ITERATOR_TYPE */ - public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE"; - /** Field ER_DOC_MUTATED */ - public static final String ER_DOC_MUTATED = "ER_DOC_MUTATED"; - public static final String ER_INVALID_XPATH_TYPE = "ER_INVALID_XPATH_TYPE"; - public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT"; - public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES"; - public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER"; - public static final String ER_CANT_CONVERT_TO_STRING = - "ER_CANT_CONVERT_TO_STRING"; - public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE"; - public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT"; - /* Note to translators: The XPath expression cannot be evaluated with respect - * to this type of node. - */ - /** Field ER_WRONG_NODETYPE */ - public static final String ER_WRONG_NODETYPE = "ER_WRONG_NODETYPE"; - public static final String ER_XPATH_ERROR = "ER_XPATH_ERROR"; - - //BEGIN: Keys needed for exception messages of JAXP 1.3 XPath API implementation - public static final String ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED = "ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED"; - public static final String ER_RESOLVE_VARIABLE_RETURNS_NULL = "ER_RESOLVE_VARIABLE_RETURNS_NULL"; - public static final String ER_UNSUPPORTED_RETURN_TYPE = "ER_UNSUPPORTED_RETURN_TYPE"; - public static final String ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL = "ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL"; - public static final String ER_ARG_CANNOT_BE_NULL = "ER_ARG_CANNOT_BE_NULL"; - - public static final String ER_OBJECT_MODEL_NULL = "ER_OBJECT_MODEL_NULL"; - public static final String ER_OBJECT_MODEL_EMPTY = "ER_OBJECT_MODEL_EMPTY"; - public static final String ER_FEATURE_NAME_NULL = "ER_FEATURE_NAME_NULL"; - public static final String ER_FEATURE_UNKNOWN = "ER_FEATURE_UNKNOWN"; - public static final String ER_GETTING_NULL_FEATURE = "ER_GETTING_NULL_FEATURE"; - public static final String ER_GETTING_UNKNOWN_FEATURE = "ER_GETTING_UNKNOWN_FEATURE"; - public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE"; - public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER"; - public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER"; - //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation - - public static final String WG_LOCALE_NAME_NOT_HANDLED = - "WG_LOCALE_NAME_NOT_HANDLED"; - public static final String WG_PROPERTY_NOT_SUPPORTED = - "WG_PROPERTY_NOT_SUPPORTED"; - public static final String WG_DONT_DO_ANYTHING_WITH_NS = - "WG_DONT_DO_ANYTHING_WITH_NS"; - public static final String WG_QUO_NO_LONGER_DEFINED = - "WG_QUO_NO_LONGER_DEFINED"; - public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = - "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST"; - public static final String WG_FUNCTION_TOKEN_NOT_FOUND = - "WG_FUNCTION_TOKEN_NOT_FOUND"; - public static final String WG_COULDNOT_FIND_FUNCTION = - "WG_COULDNOT_FIND_FUNCTION"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED = - "WG_EXPAND_ENTITIES_NOT_SUPPORTED"; - public static final String WG_ILLEGAL_VARIABLE_REFERENCE = - "WG_ILLEGAL_VARIABLE_REFERENCE"; - public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING"; - - /** detach() not supported by XRTreeFragSelectWrapper */ - public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** num() not supported by XRTreeFragSelectWrapper */ - public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** xstr() not supported by XRTreeFragSelectWrapper */ - public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** str() not supported by XRTreeFragSelectWrapper */ - public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - - // Error messages... - - private static final Object[][] _contents = new Object[][]{ - - { "ERROR0000" , "{0}" }, - - { ER_CURRENT_NOT_ALLOWED_IN_MATCH, "La funzione current() non \u00E8 consentita in un pattern di corrispondenza." }, - - { ER_CURRENT_TAKES_NO_ARGS, "La funzione current() non accetta argomenti." }, - - { ER_DOCUMENT_REPLACED, - "L'implementazione della funzione document() \u00E8 stata sostituita da com.sun.org.apache.xalan.internal.xslt.FuncDocument."}, - - { ER_CONTEXT_CAN_NOT_BE_NULL, - "Il contesto non pu\u00F2 essere nullo quando l'operazione dipende dal contesto."}, - - { ER_CONTEXT_HAS_NO_OWNERDOC, - "il contesto non dispone di un documento proprietario."}, - - { ER_LOCALNAME_HAS_TOO_MANY_ARGS, - "local-name() contiene troppi argomenti."}, - - { ER_NAMESPACEURI_HAS_TOO_MANY_ARGS, - "namespace-uri() contiene troppi argomenti."}, - - { ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS, - "normalize-space() contiene troppi argomenti."}, - - { ER_NUMBER_HAS_TOO_MANY_ARGS, - "number() contiene troppi argomenti."}, - - { ER_NAME_HAS_TOO_MANY_ARGS, - "name() contiene troppi argomenti."}, - - { ER_STRING_HAS_TOO_MANY_ARGS, - "string() contiene troppi argomenti."}, - - { ER_STRINGLENGTH_HAS_TOO_MANY_ARGS, - "string-length() contiene troppi argomenti."}, - - { ER_TRANSLATE_TAKES_3_ARGS, - "La funzione translate() ha tre argomenti."}, - - { ER_UNPARSEDENTITYURI_TAKES_1_ARG, - "La funzione unparsed-entity-uri deve avere un solo argomento."}, - - { ER_NAMESPACEAXIS_NOT_IMPLEMENTED, - "l'asse dello spazio di nomi non \u00E8 ancora implementato."}, - - { ER_UNKNOWN_AXIS, - "asse sconosciuto: {0}"}, - - { ER_UNKNOWN_MATCH_OPERATION, - "operazione di corrispondenza sconosciuta."}, - - { ER_INCORRECT_ARG_LENGTH, - "La lunghezza degli argomenti del testo del nodo processing-instruction() \u00E8 errata."}, - - { ER_CANT_CONVERT_TO_NUMBER, - "Impossibile convertire {0} in un numero"}, - - { ER_CANT_CONVERT_TO_NODELIST, - "Impossibile convertire {0} in NodeList."}, - - { ER_CANT_CONVERT_TO_MUTABLENODELIST, - "Impossibile convertire {0} in NodeSetDTM."}, - - { ER_CANT_CONVERT_TO_TYPE, - "Impossibile convertire {0} in type#{1}"}, - - { ER_EXPECTED_MATCH_PATTERN, - "\u00C8 previsto un pattern di corrispondenza in getMatchScore."}, - - { ER_COULDNOT_GET_VAR_NAMED, - "Impossibile recuperare la variabile denominata {0}"}, - - { ER_UNKNOWN_OPCODE, - "ERRORE. Codice di operazione sconosciuto: {0}"}, - - { ER_EXTRA_ILLEGAL_TOKENS, - "Esistono altri token non validi: {0}"}, - - { ER_EXPECTED_DOUBLE_QUOTE, - "valore non tra apici... sono previste le virgolette."}, - - { ER_EXPECTED_SINGLE_QUOTE, - "valore non tra apici... \u00E8 previsto un apice."}, - - { ER_EMPTY_EXPRESSION, - "Espressione vuota."}, - - { ER_EXPECTED_BUT_FOUND, - "Previsto {0}, trovato {1}."}, - - { ER_INCORRECT_PROGRAMMER_ASSERTION, - "L''asserzione del programmatore \u00E8 errata - {0}"}, - - { ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL, - "L'argomento boolean(...) non \u00E8 pi\u00F9 facoltativo nella bozza XPath 19990709."}, - - { ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG, - "\u00C8 stata trovata la virgola (','), ma non l'argomento che la precede."}, - - { ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG, - "\u00C8 stata trovata la virgola (','), ma non l'argomento che la segue."}, - - { ER_PREDICATE_ILLEGAL_SYNTAX, - "'..[predicate]' o '.[predicate]' \u00E8 una sintassi non valida. Utilizzare 'self::node()[predicate]'."}, - - { ER_ILLEGAL_AXIS_NAME, - "nome asse non valido: {0}"}, - - { ER_UNKNOWN_NODETYPE, - "Tipo di nodo sconosciuto: {0}"}, - - { ER_PATTERN_LITERAL_NEEDS_BE_QUOTED, - "Il valore del pattern ({0}) deve essere compreso tra apici."}, - - { ER_COULDNOT_BE_FORMATTED_TO_NUMBER, - "Impossibile formattare {0} in un numero."}, - - { ER_COULDNOT_CREATE_XMLPROCESSORLIAISON, - "Impossibile creare la relazione TransformerFactory XML {0}"}, - - { ER_DIDNOT_FIND_XPATH_SELECT_EXP, - "Errore. L'espressione di selezione dell'xpath (-select) non \u00E8 stata trovata."}, - - { ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, - "ERRORE. Impossibile trovare ENDOP dopo OP_LOCATIONPATH."}, - - { ER_ERROR_OCCURED, - "Si \u00E8 verificato un errore."}, - - { ER_ILLEGAL_VARIABLE_REFERENCE, - "Il valore di VariableReference specificato per la variabile \u00E8 fuori contesto o senza definizione. Nome = {0}"}, - - { ER_AXES_NOT_ALLOWED, - "Solo gli assi child:: e attribute:: sono consentiti nei pattern di corrispondenza. Assi errati = {0}"}, - - { ER_KEY_HAS_TOO_MANY_ARGS, - "key() contiene un numero di argomenti errato."}, - - { ER_COUNT_TAKES_1_ARG, - "La funzione count deve avere un solo argomento."}, - - { ER_COULDNOT_FIND_FUNCTION, - "Impossibile trovare la funzione {0}"}, - - { ER_UNSUPPORTED_ENCODING, - "Codifica non supportata: {0}"}, - - { ER_PROBLEM_IN_DTM_NEXTSIBLING, - "Si \u00E8 verificato un problema in DTM in getNextSibling... Tentativo di recupero in corso."}, - - { ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL, - "Errore del programmatore: impossibile scrivere EmptyNodeList."}, - - { ER_SETDOMFACTORY_NOT_SUPPORTED, - "setDOMFactory non supportato da XPathContext"}, - - { ER_PREFIX_MUST_RESOLVE, - "Il prefisso deve essere risolto in uno spazio di nomi: {0}"}, - - { ER_PARSE_NOT_SUPPORTED, - "analisi (origine InputSource) non supportata in XPathContext. Impossibile aprire {0}."}, - - { ER_SAX_API_NOT_HANDLED, - "Caratteri API SAX (char ch[]... non gestiti da DTM."}, - - { ER_IGNORABLE_WHITESPACE_NOT_HANDLED, - "ignorableWhitespace(char ch[]... non gestito da DTM."}, - - { ER_DTM_CANNOT_HANDLE_NODES, - "DTMLiaison non pu\u00F2 gestire i nodi di tipo {0}"}, - - { ER_XERCES_CANNOT_HANDLE_NODES, - "DOM2Helper non pu\u00F2 gestire i nodi di tipo {0}"}, - - { ER_XERCES_PARSE_ERROR_DETAILS, - "Errore DOM2Helper.parse: SystemID - {0} Riga - {1}"}, - - { ER_XERCES_PARSE_ERROR, - "Errore DOM2Helper.parse"}, - - { ER_INVALID_UTF16_SURROGATE, - "Rilevato surrogato UTF-16 non valido: {0}?"}, - - { ER_OIERROR, - "Errore IO"}, - - { ER_CANNOT_CREATE_URL, - "Impossibile creare l''URL per {0}"}, - - { ER_XPATH_READOBJECT, - "In XPath.readObject: {0}"}, - - { ER_FUNCTION_TOKEN_NOT_FOUND, - "token di funzione non trovato."}, - - { ER_CANNOT_DEAL_XPATH_TYPE, - "Impossibile utilizzare il tipo XPath: {0}"}, - - { ER_NODESET_NOT_MUTABLE, - "Impossibile modificare questo NodeSet"}, - - { ER_NODESETDTM_NOT_MUTABLE, - "Impossibile modificare questo NodeSetDTM"}, - - { ER_VAR_NOT_RESOLVABLE, - "Impossibile risolvere la variabile: {0}"}, - - { ER_NULL_ERROR_HANDLER, - "Handler degli errori nullo"}, - - { ER_PROG_ASSERT_UNKNOWN_OPCODE, - "Asserzione del programmatore: opcode {0} sconosciuto"}, - - { ER_ZERO_OR_ONE, - "0 o 1"}, - - { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "rtf() non supportato da XRTreeFragSelectWrapper"}, - - { ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "asNodeIterator() non supportato da XRTreeFragSelectWrapper"}, - - /** detach() not supported by XRTreeFragSelectWrapper */ - { ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "detach() non supportato da XRTreeFragSelectWrapper"}, - - /** num() not supported by XRTreeFragSelectWrapper */ - { ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "num() non supportato da XRTreeFragSelectWrapper"}, - - /** xstr() not supported by XRTreeFragSelectWrapper */ - { ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "xstr() non supportato da XRTreeFragSelectWrapper"}, - - /** str() not supported by XRTreeFragSelectWrapper */ - { ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "str() non supportato da XRTreeFragSelectWrapper"}, - - { ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS, - "fsb() non supportato per XStringForChars"}, - - { ER_COULD_NOT_FIND_VAR, - "Impossibile trovare la variabile con nome {0}"}, - - { ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING, - "XStringForChars non pu\u00F2 avere una stringa per un argomento"}, - - { ER_FASTSTRINGBUFFER_CANNOT_BE_NULL, - "L'argomento FastStringBuffer non pu\u00F2 essere nullo"}, - - { ER_TWO_OR_THREE, - "2 o 3"}, - - { ER_VARIABLE_ACCESSED_BEFORE_BIND, - "Accesso alla variabile eseguito prima che fosse associata."}, - - { ER_FSB_CANNOT_TAKE_STRING, - "XStringForFSB non pu\u00F2 avere una stringa per un argomento"}, - - { ER_SETTING_WALKER_ROOT_TO_NULL, - "\n !!!! Errore. Si sta impostando radice di un walker su un valore nullo."}, - - { ER_NODESETDTM_CANNOT_ITERATE, - "Questo NodeSetDTM non pu\u00F2 eseguire un'iterazione a un nodo precedente."}, - - { ER_NODESET_CANNOT_ITERATE, - "Questo NodeSet non pu\u00F2 eseguire un'iterazione a un nodo precedente."}, - - { ER_NODESETDTM_CANNOT_INDEX, - "Questo NodeSetDTM non pu\u00F2 eseguire l'indicizzazione o il conteggio delle funzioni."}, - - { ER_NODESET_CANNOT_INDEX, - "Questo NodeSet non pu\u00F2 eseguire l'indicizzazione o il conteggio delle funzioni."}, - - { ER_CANNOT_CALL_SETSHOULDCACHENODE, - "Impossibile richiamare setShouldCacheNodes dopo aver richiamato nextNode."}, - - { ER_ONLY_ALLOWS, - "{0} consente solo {1} argomenti"}, - - { ER_UNKNOWN_STEP, - "Asserzione del programmatore in getNextStepPos: stepType {0} sconosciuto"}, - - //Note to translators: A relative location path is a form of XPath expression. - // The message indicates that such an expression was expected following the - // characters '/' or '//', but was not found. - { ER_EXPECTED_REL_LOC_PATH, - "\u00C8 previsto un percorso di posizione relativa dopo il token '/' o '//'."}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such an expression was expected,but - // the characters specified by the substitution text were encountered instead. - { ER_EXPECTED_LOC_PATH, - "\u00C8 previsto un percorso di posizione, ma \u00E8 stato trovato il seguente token: {0}"}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such a subexpression was expected, - // but no more characters were found in the expression. - { ER_EXPECTED_LOC_PATH_AT_END_EXPR, - "\u00C8 previsto un percorso di posizione, ma \u00E8 stata trovata la fine dell'espressione XPath."}, - - // Note to translators: A location step is part of an XPath expression. - // The message indicates that syntactically such an expression was expected - // following the specified characters. - { ER_EXPECTED_LOC_STEP, - "\u00C8 previsto un passo di posizione dopo il token '/' o '//'."}, - - // Note to translators: A node test is part of an XPath expression that is - // used to test for particular kinds of nodes. In this case, a node test that - // consists of an NCName followed by a colon and an asterisk or that consists - // of a QName was expected, but was not found. - { ER_EXPECTED_NODE_TEST, - "\u00C8 previsto un test del nodo che corrisponda a NCName:* o a QName."}, - - // Note to translators: A step pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but the specified character was found in the expression instead. - { ER_EXPECTED_STEP_PATTERN, - "\u00C8 previsto un pattern di passo, ma \u00E8 stato trovato '/'."}, - - // Note to translators: A relative path pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but was not found. - { ER_EXPECTED_REL_PATH_PATTERN, - "\u00C8 previsto un pattern di percorso relativo."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type boolean. - { ER_CANT_CONVERT_TO_BOOLEAN, - "XPathResult dell''espressione XPath ''{0}'' a un valore di XPathResultType pari a {1} che non pu\u00F2 essere convertito in un valore booleano."}, - - // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and - // FIRST_ORDERED_NODE_TYPE. - { ER_CANT_CONVERT_TO_SINGLENODE, - "XPathResult dell''espressione XPath ''{0}'' a un valore di XPathResultType pari a {1} che non pu\u00F2 essere convertito in un nodo singolo. Il metodo getSingleNodeValue \u00E8 valido solo per i tipi ANY_UNORDERED_NODE_TYPE e FIRST_ORDERED_NODE_TYPE."}, - - // Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and - // ORDERED_NODE_SNAPSHOT_TYPE. - { ER_CANT_GET_SNAPSHOT_LENGTH, - "Impossibile richiamare il metodo getSnapshotLength nell''XPathResult dell''espressione XPath ''{0}'' poich\u00E9 il valore di XPathResultType \u00E8 {1}. Questo metodo \u00E8 valido solo per i tipi UNORDERED_NODE_SNAPSHOT_TYPE e ORDERED_NODE_SNAPSHOT_TYPE."}, - - { ER_NON_ITERATOR_TYPE, - "Impossibile richiamare il metodo iterateNext nell''XPathResult dell''espressione XPath ''{0}'' poich\u00E9 il valore di XPathResultType \u00E8 {1}. Questo metodo \u00E8 valido solo per i tipi UNORDERED_NODE_ITERATOR_TYPE e ORDERED_NODE_ITERATOR_TYPE."}, - - // Note to translators: This message indicates that the document being operated - // upon changed, so the iterator object that was being used to traverse the - // document has now become invalid. - { ER_DOC_MUTATED, - "Il documento \u00E8 cambiato da quando \u00E8 stato restituito l'ultimo risultato. L'iteratore non \u00E8 valido."}, - - { ER_INVALID_XPATH_TYPE, - "Tipo di argomento XPath non valido: {0}"}, - - { ER_EMPTY_XPATH_RESULT, - "Oggetto risultati XPath vuoto"}, - - { ER_INCOMPATIBLE_TYPES, - "XPathResult dell''espressione XPath ''{0}'' a un valore di XPathResultType pari a {1} che non pu\u00F2 essere convertito forzatamente nel valore XPathResultType {2}."}, - - { ER_NULL_RESOLVER, - "Impossibile risolvere il prefisso con un resolver di prefissi nullo."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type string. - { ER_CANT_CONVERT_TO_STRING, - "XPathResult dell''espressione XPath ''{0}'' a un valore di XPathResultType pari a {1} che non pu\u00F2 essere convertito in una stringa."}, - - // Note to translators: Do not translate snapshotItem, - // UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE. - { ER_NON_SNAPSHOT_TYPE, - "Impossibile richiamare il metodo snapshotItem nell''XPathResult dell''espressione XPath ''{0}'' poich\u00E9 il valore di XPathResultType \u00E8 {1}. Questo metodo \u00E8 valido solo per i tipi UNORDERED_NODE_SNAPSHOT_TYPE e ORDERED_NODE_SNAPSHOT_TYPE."}, - - // Note to translators: XPathEvaluator is a Java interface name. An - // XPathEvaluator is created with respect to a particular XML document, and in - // this case the expression represented by this object was being evaluated with - // respect to a context node from a different document. - { ER_WRONG_DOCUMENT, - "Il nodo di contesto non appartiene al documento associato a questo XPathEvaluator."}, - - // Note to translators: The XPath expression cannot be evaluated with respect - // to this type of node. - { ER_WRONG_NODETYPE, - "Il tipo di nodo di contesto non \u00E8 supportato."}, - - { ER_XPATH_ERROR, - "Errore sconosciuto nell'XPath."}, - - { ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER, - "XPathResult dell''espressione XPath ''{0}'' a un valore di XPathResultType pari a {1} che non pu\u00F2 essere convertito in un numero."}, - - //BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - /** Field ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED */ - - { ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED, - "Impossibile richiamare la funzione di estensione ''{0}'' se la funzione XMLConstants.FEATURE_SECURE_PROCESSING \u00E8 impostata su true."}, - - /** Field ER_RESOLVE_VARIABLE_RETURNS_NULL */ - - { ER_RESOLVE_VARIABLE_RETURNS_NULL, - "resolveVariable per la variabile {0} ha restituito un valore nullo"}, - - /** Field ER_UNSUPPORTED_RETURN_TYPE */ - - { ER_UNSUPPORTED_RETURN_TYPE, - "Tipo restituito non supportato: {0}"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "Il tipo di origine e/o restituito non pu\u00F2 essere nullo"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "Il tipo di origine e/o restituito non pu\u00F2 essere nullo"}, - - /** Field ER_ARG_CANNOT_BE_NULL */ - - { ER_ARG_CANNOT_BE_NULL, - "L''argomento {0} non pu\u00F2 essere nullo"}, - - /** Field ER_OBJECT_MODEL_NULL */ - - { ER_OBJECT_MODEL_NULL, - "{0}#isObjectModelSupported( String objectModel ) non pu\u00F2 essere richiamato se objectModel == null"}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_OBJECT_MODEL_EMPTY, - "{0}#isObjectModelSupported( String objectModel ) non pu\u00F2 essere richiamato se objectModel == \"\""}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_FEATURE_NAME_NULL, - "Tentativo di impostare una funzione con nome nullo: {0}#setFeature( null, {1})"}, - - /** Field ER_FEATURE_UNKNOWN */ - - { ER_FEATURE_UNKNOWN, - "Tentativo di impostare la funzione sconosciuta \"{0}\":{1}#setFeature({0},{2})"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_NULL_FEATURE, - "Tentativo di recuperare una funzione con nome nullo: {0}#getFeature(null)"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_UNKNOWN_FEATURE, - "Tentativo di recuperare la funzione sconosciuta \"{0}\":{1}#getFeature({0})"}, - - {ER_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: impossibile impostare la funzione su false se \u00E8 presente Security Manager: {1}#setFeature({0},{2})"}, - - /** Field ER_NULL_XPATH_FUNCTION_RESOLVER */ - - { ER_NULL_XPATH_FUNCTION_RESOLVER, - "Tentativo di impostare un valore nullo per XPathFunctionResolver:{0}#setXPathFunctionResolver(null)"}, - - /** Field ER_NULL_XPATH_VARIABLE_RESOLVER */ - - { ER_NULL_XPATH_VARIABLE_RESOLVER, - "Tentativo di impostare un valore nullo per XPathVariableResolver:{0}#setXPathVariableResolver(null)"}, - - //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - // Warnings... - - { WG_LOCALE_NAME_NOT_HANDLED, - "il nome di impostazioni nazionali nella funzione format-number non \u00E8 ancora gestito."}, - - { WG_PROPERTY_NOT_SUPPORTED, - "Propriet\u00E0 XSL non supportata: {0}"}, - - { WG_DONT_DO_ANYTHING_WITH_NS, - "Non effettuare alcuna operazione sullo spazio di nomi {0} nella propriet\u00E0: {1}"}, - - { WG_QUO_NO_LONGER_DEFINED, - "Sintassi obsoleta: quo(...) non \u00E8 pi\u00F9 definito nell'XPath."}, - - { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST, - "L'XPath richiede un oggetto derivato che implementi nodeTest."}, - - { WG_FUNCTION_TOKEN_NOT_FOUND, - "token di funzione non trovato."}, - - { WG_COULDNOT_FIND_FUNCTION, - "Impossibile trovare la funzione {0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "Impossibile creare un URL da {0}"}, - - { WG_EXPAND_ENTITIES_NOT_SUPPORTED, - "Opzione -E non supportata per il parser DTM"}, - - { WG_ILLEGAL_VARIABLE_REFERENCE, - "Il valore di VariableReference specificato per la variabile \u00E8 fuori contesto o senza definizione. Nome = {0}"}, - - { WG_UNSUPPORTED_ENCODING, - "Codifica non supportata: {0}"}, - - - - // Other miscellaneous text used inside the code... - { "ui_language", "it"}, - { "help_language", "it"}, - { "language", "it"}, - { "BAD_CODE", "Parametro per createMessage fuori limite"}, - { "FORMAT_FAILED", "Eccezione durante la chiamata messageFormat"}, - { "version", ">>>>>>> Versione Xalan "}, - { "version2", "<<<<<<<"}, - { "yes", "s\u00EC"}, - { "line", "N. riga"}, - { "column", "N. colonna"}, - { "xsldone", "XSLProcessor: operazione completata"}, - { "xpath_option", "opzioni xpath: "}, - { "optionIN", " [-in inputXMLURL]"}, - { "optionSelect", " [-select xpath expression]"}, - { "optionMatch", " [-match match pattern (per la diagnostica delle corrispondenze)]"}, - { "optionAnyExpr", "In alternativa, un'espressione xpath eseguir\u00E0 il dump della diagnostica."}, - { "noParsermsg1", "Processo XSL non riuscito."}, - { "noParsermsg2", "** Impossibile trovare il parser **"}, - { "noParsermsg3", "Controllare il classpath."}, - { "noParsermsg4", "Se non \u00E8 disponibile un parser XML di IBM per Java, \u00E8 possibile scaricarlo da"}, - { "noParsermsg5", "AlphaWorks di IBM: http://www.alphaworks.ibm.com/formula/xml"}, - { "gtone", ">1" }, - { "zero", "0" }, - { "one", "1" }, - { "two" , "2" }, - { "three", "3" } - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - - - // ================= INFRASTRUCTURE ====================== - - /** Field BAD_CODE */ - public static final String BAD_CODE = "BAD_CODE"; - - /** Field FORMAT_FAILED */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - /** Field ERROR_RESOURCES */ - public static final String ERROR_RESOURCES = - "com.sun.org.apache.xpath.internal.res.XPATHErrorResources"; - - /** Field ERROR_STRING */ - public static final String ERROR_STRING = "#error"; - - /** Field ERROR_HEADER */ - public static final String ERROR_HEADER = "Error: "; - - /** Field WARNING_HEADER */ - public static final String WARNING_HEADER = "Warning: "; - - /** Field XSL_HEADER */ - public static final String XSL_HEADER = "XSL "; - - /** Field XML_HEADER */ - public static final String XML_HEADER = "XML "; - - /** Field QUERY_HEADER */ - public static final String QUERY_HEADER = "PATTERN "; - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java deleted file mode 100644 index 01e0f4062ed..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java +++ /dev/null @@ -1,938 +0,0 @@ -/* - * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xpath.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a Static string constant for the - * Key and update the contents array with Key, Value pair - * Also you need to update the count of messages(MAX_CODE)or - * the count of warnings(MAX_WARNING) [ Information purpose only] - * @xsl.usage advanced - * @LastModified: Nov 2024 - */ -public class XPATHErrorResources_ko extends ListResourceBundle -{ - -/* - * General notes to translators: - * - * This file contains error and warning messages related to XPath Error - * Handling. - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 8) The context node is the node in the document with respect to which an - * XPath expression is being evaluated. - * - * 9) An iterator is an object that traverses nodes in the tree, one at a time. - * - * 10) NCName is an XML term used to describe a name that does not contain a - * colon (a "no-colon name"). - * - * 11) QName is an XML term meaning "qualified name". - */ - - /* - * static variables - */ - public static final String ERROR0000 = "ERROR0000"; - public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH = - "ER_CURRENT_NOT_ALLOWED_IN_MATCH"; - public static final String ER_CURRENT_TAKES_NO_ARGS = - "ER_CURRENT_TAKES_NO_ARGS"; - public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED"; - public static final String ER_CONTEXT_CAN_NOT_BE_NULL = "ER_CONTEXT_CAN_NOT_BE_NULL"; - public static final String ER_CONTEXT_HAS_NO_OWNERDOC = - "ER_CONTEXT_HAS_NO_OWNERDOC"; - public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS = - "ER_LOCALNAME_HAS_TOO_MANY_ARGS"; - public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS = - "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS"; - public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS = - "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS"; - public static final String ER_NUMBER_HAS_TOO_MANY_ARGS = - "ER_NUMBER_HAS_TOO_MANY_ARGS"; - public static final String ER_NAME_HAS_TOO_MANY_ARGS = - "ER_NAME_HAS_TOO_MANY_ARGS"; - public static final String ER_STRING_HAS_TOO_MANY_ARGS = - "ER_STRING_HAS_TOO_MANY_ARGS"; - public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS = - "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS"; - public static final String ER_TRANSLATE_TAKES_3_ARGS = - "ER_TRANSLATE_TAKES_3_ARGS"; - public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG = - "ER_UNPARSEDENTITYURI_TAKES_1_ARG"; - public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED = - "ER_NAMESPACEAXIS_NOT_IMPLEMENTED"; - public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS"; - public static final String ER_UNKNOWN_MATCH_OPERATION = - "ER_UNKNOWN_MATCH_OPERATION"; - public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH"; - public static final String ER_CANT_CONVERT_TO_NUMBER = - "ER_CANT_CONVERT_TO_NUMBER"; - public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER = - "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER"; - public static final String ER_CANT_CONVERT_TO_NODELIST = - "ER_CANT_CONVERT_TO_NODELIST"; - public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST = - "ER_CANT_CONVERT_TO_MUTABLENODELIST"; - public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE"; - public static final String ER_EXPECTED_MATCH_PATTERN = - "ER_EXPECTED_MATCH_PATTERN"; - public static final String ER_COULDNOT_GET_VAR_NAMED = - "ER_COULDNOT_GET_VAR_NAMED"; - public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE"; - public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS"; - public static final String ER_EXPECTED_DOUBLE_QUOTE = - "ER_EXPECTED_DOUBLE_QUOTE"; - public static final String ER_EXPECTED_SINGLE_QUOTE = - "ER_EXPECTED_SINGLE_QUOTE"; - public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION"; - public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND"; - public static final String ER_INCORRECT_PROGRAMMER_ASSERTION = - "ER_INCORRECT_PROGRAMMER_ASSERTION"; - public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL = - "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL"; - public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG = - "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG"; - public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG = - "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG"; - public static final String ER_PREDICATE_ILLEGAL_SYNTAX = - "ER_PREDICATE_ILLEGAL_SYNTAX"; - public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME"; - public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE"; - public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = - "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED"; - public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER = - "ER_COULDNOT_BE_FORMATTED_TO_NUMBER"; - public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON = - "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON"; - public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP = - "ER_DIDNOT_FIND_XPATH_SELECT_EXP"; - public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH = - "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH"; - public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED"; - public static final String ER_ILLEGAL_VARIABLE_REFERENCE = - "ER_ILLEGAL_VARIABLE_REFERENCE"; - public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED"; - public static final String ER_KEY_HAS_TOO_MANY_ARGS = - "ER_KEY_HAS_TOO_MANY_ARGS"; - public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG"; - public static final String ER_COULDNOT_FIND_FUNCTION = - "ER_COULDNOT_FIND_FUNCTION"; - public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING"; - public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING = - "ER_PROBLEM_IN_DTM_NEXTSIBLING"; - public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL = - "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL"; - public static final String ER_SETDOMFACTORY_NOT_SUPPORTED = - "ER_SETDOMFACTORY_NOT_SUPPORTED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED"; - public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED"; -public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = - "ER_IGNORABLE_WHITESPACE_NOT_HANDLED"; - public static final String ER_DTM_CANNOT_HANDLE_NODES = - "ER_DTM_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_CANNOT_HANDLE_NODES = - "ER_XERCES_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_PARSE_ERROR_DETAILS = - "ER_XERCES_PARSE_ERROR_DETAILS"; - public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL"; - public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT"; - public static final String ER_FUNCTION_TOKEN_NOT_FOUND = - "ER_FUNCTION_TOKEN_NOT_FOUND"; - public static final String ER_CANNOT_DEAL_XPATH_TYPE = - "ER_CANNOT_DEAL_XPATH_TYPE"; - public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE"; - public static final String ER_NODESETDTM_NOT_MUTABLE = - "ER_NODESETDTM_NOT_MUTABLE"; - /** Variable not resolvable: */ - public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE"; - /** Null error handler */ - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - /** Programmer's assertion: unknown opcode */ - public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE = - "ER_PROG_ASSERT_UNKNOWN_OPCODE"; - /** 0 or 1 */ - public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE"; - /** rtf() not supported by XRTreeFragSelectWrapper */ - public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** asNodeIterator() not supported by XRTreeFragSelectWrapper */ - public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** fsb() not supported for XStringForChars */ - public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS = - "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS"; - /** Could not find variable with the name of */ - public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR"; - /** XStringForChars can not take a string for an argument */ - public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING = - "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING"; - /** The FastStringBuffer argument can not be null */ - public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL = - "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL"; - /** 2 or 3 */ - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - /** Variable accessed before it is bound! */ - public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND = - "ER_VARIABLE_ACCESSED_BEFORE_BIND"; - /** XStringForFSB can not take a string for an argument! */ - public static final String ER_FSB_CANNOT_TAKE_STRING = - "ER_FSB_CANNOT_TAKE_STRING"; - /** Error! Setting the root of a walker to null! */ - public static final String ER_SETTING_WALKER_ROOT_TO_NULL = - "ER_SETTING_WALKER_ROOT_TO_NULL"; - /** This NodeSetDTM can not iterate to a previous node! */ - public static final String ER_NODESETDTM_CANNOT_ITERATE = - "ER_NODESETDTM_CANNOT_ITERATE"; - /** This NodeSet can not iterate to a previous node! */ - public static final String ER_NODESET_CANNOT_ITERATE = - "ER_NODESET_CANNOT_ITERATE"; - /** This NodeSetDTM can not do indexing or counting functions! */ - public static final String ER_NODESETDTM_CANNOT_INDEX = - "ER_NODESETDTM_CANNOT_INDEX"; - /** This NodeSet can not do indexing or counting functions! */ - public static final String ER_NODESET_CANNOT_INDEX = - "ER_NODESET_CANNOT_INDEX"; - /** Can not call setShouldCacheNodes after nextNode has been called! */ - public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE = - "ER_CANNOT_CALL_SETSHOULDCACHENODE"; - /** {0} only allows {1} arguments */ - public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS"; - /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */ - public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP"; - /** Problem with RelativeLocationPath */ - public static final String ER_EXPECTED_REL_LOC_PATH = - "ER_EXPECTED_REL_LOC_PATH"; - /** Problem with LocationPath */ - public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH"; - public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR = - "ER_EXPECTED_LOC_PATH_AT_END_EXPR"; - /** Problem with Step */ - public static final String ER_EXPECTED_LOC_STEP = "ER_EXPECTED_LOC_STEP"; - /** Problem with NodeTest */ - public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST"; - /** Expected step pattern */ - public static final String ER_EXPECTED_STEP_PATTERN = - "ER_EXPECTED_STEP_PATTERN"; - /** Expected relative path pattern */ - public static final String ER_EXPECTED_REL_PATH_PATTERN = - "ER_EXPECTED_REL_PATH_PATTERN"; - /** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */ - public static final String ER_CANT_CONVERT_TO_BOOLEAN = - "ER_CANT_CONVERT_TO_BOOLEAN"; - /** Field ER_CANT_CONVERT_TO_SINGLENODE */ - public static final String ER_CANT_CONVERT_TO_SINGLENODE = - "ER_CANT_CONVERT_TO_SINGLENODE"; - /** Field ER_CANT_GET_SNAPSHOT_LENGTH */ - public static final String ER_CANT_GET_SNAPSHOT_LENGTH = - "ER_CANT_GET_SNAPSHOT_LENGTH"; - /** Field ER_NON_ITERATOR_TYPE */ - public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE"; - /** Field ER_DOC_MUTATED */ - public static final String ER_DOC_MUTATED = "ER_DOC_MUTATED"; - public static final String ER_INVALID_XPATH_TYPE = "ER_INVALID_XPATH_TYPE"; - public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT"; - public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES"; - public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER"; - public static final String ER_CANT_CONVERT_TO_STRING = - "ER_CANT_CONVERT_TO_STRING"; - public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE"; - public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT"; - /* Note to translators: The XPath expression cannot be evaluated with respect - * to this type of node. - */ - /** Field ER_WRONG_NODETYPE */ - public static final String ER_WRONG_NODETYPE = "ER_WRONG_NODETYPE"; - public static final String ER_XPATH_ERROR = "ER_XPATH_ERROR"; - - //BEGIN: Keys needed for exception messages of JAXP 1.3 XPath API implementation - public static final String ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED = "ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED"; - public static final String ER_RESOLVE_VARIABLE_RETURNS_NULL = "ER_RESOLVE_VARIABLE_RETURNS_NULL"; - public static final String ER_UNSUPPORTED_RETURN_TYPE = "ER_UNSUPPORTED_RETURN_TYPE"; - public static final String ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL = "ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL"; - public static final String ER_ARG_CANNOT_BE_NULL = "ER_ARG_CANNOT_BE_NULL"; - - public static final String ER_OBJECT_MODEL_NULL = "ER_OBJECT_MODEL_NULL"; - public static final String ER_OBJECT_MODEL_EMPTY = "ER_OBJECT_MODEL_EMPTY"; - public static final String ER_FEATURE_NAME_NULL = "ER_FEATURE_NAME_NULL"; - public static final String ER_FEATURE_UNKNOWN = "ER_FEATURE_UNKNOWN"; - public static final String ER_GETTING_NULL_FEATURE = "ER_GETTING_NULL_FEATURE"; - public static final String ER_GETTING_UNKNOWN_FEATURE = "ER_GETTING_UNKNOWN_FEATURE"; - public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE"; - public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER"; - public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER"; - //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation - - public static final String WG_LOCALE_NAME_NOT_HANDLED = - "WG_LOCALE_NAME_NOT_HANDLED"; - public static final String WG_PROPERTY_NOT_SUPPORTED = - "WG_PROPERTY_NOT_SUPPORTED"; - public static final String WG_DONT_DO_ANYTHING_WITH_NS = - "WG_DONT_DO_ANYTHING_WITH_NS"; - public static final String WG_QUO_NO_LONGER_DEFINED = - "WG_QUO_NO_LONGER_DEFINED"; - public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = - "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST"; - public static final String WG_FUNCTION_TOKEN_NOT_FOUND = - "WG_FUNCTION_TOKEN_NOT_FOUND"; - public static final String WG_COULDNOT_FIND_FUNCTION = - "WG_COULDNOT_FIND_FUNCTION"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED = - "WG_EXPAND_ENTITIES_NOT_SUPPORTED"; - public static final String WG_ILLEGAL_VARIABLE_REFERENCE = - "WG_ILLEGAL_VARIABLE_REFERENCE"; - public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING"; - - /** detach() not supported by XRTreeFragSelectWrapper */ - public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** num() not supported by XRTreeFragSelectWrapper */ - public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** xstr() not supported by XRTreeFragSelectWrapper */ - public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** str() not supported by XRTreeFragSelectWrapper */ - public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - - // Error messages... - - private static final Object[][] _contents = new Object[][]{ - - { "ERROR0000" , "{0}" }, - - { ER_CURRENT_NOT_ALLOWED_IN_MATCH, "\uC77C\uCE58 \uD328\uD134\uC5D0\uC11C\uB294 current() \uD568\uC218\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!" }, - - { ER_CURRENT_TAKES_NO_ARGS, "current() \uD568\uC218\uC5D0\uB294 \uC778\uC218\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!" }, - - { ER_DOCUMENT_REPLACED, - "document() \uD568\uC218 \uAD6C\uD604\uC774 com.sun.org.apache.xalan.internal.xslt.FuncDocument\uB85C \uB300\uCCB4\uB418\uC5C8\uC2B5\uB2C8\uB2E4!"}, - - { ER_CONTEXT_CAN_NOT_BE_NULL, - "\uC791\uC5C5\uC774 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0 \uC885\uC18D\uC801\uC77C \uB54C \uCEE8\uD14D\uC2A4\uD2B8\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_CONTEXT_HAS_NO_OWNERDOC, - "\uCEE8\uD14D\uC2A4\uD2B8\uC5D0 \uC18C\uC720\uC790 \uBB38\uC11C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_LOCALNAME_HAS_TOO_MANY_ARGS, - "local-name()\uC5D0 \uC778\uC218\uAC00 \uB108\uBB34 \uB9CE\uC2B5\uB2C8\uB2E4."}, - - { ER_NAMESPACEURI_HAS_TOO_MANY_ARGS, - "namespace-uri()\uC5D0 \uC778\uC218\uAC00 \uB108\uBB34 \uB9CE\uC2B5\uB2C8\uB2E4."}, - - { ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS, - "normalize-space()\uC5D0 \uC778\uC218\uAC00 \uB108\uBB34 \uB9CE\uC2B5\uB2C8\uB2E4."}, - - { ER_NUMBER_HAS_TOO_MANY_ARGS, - "number()\uC5D0 \uC778\uC218\uAC00 \uB108\uBB34 \uB9CE\uC2B5\uB2C8\uB2E4."}, - - { ER_NAME_HAS_TOO_MANY_ARGS, - "name()\uC5D0 \uC778\uC218\uAC00 \uB108\uBB34 \uB9CE\uC2B5\uB2C8\uB2E4."}, - - { ER_STRING_HAS_TOO_MANY_ARGS, - "string()\uC5D0 \uC778\uC218\uAC00 \uB108\uBB34 \uB9CE\uC2B5\uB2C8\uB2E4."}, - - { ER_STRINGLENGTH_HAS_TOO_MANY_ARGS, - "string-length()\uC5D0 \uC778\uC218\uAC00 \uB108\uBB34 \uB9CE\uC2B5\uB2C8\uB2E4."}, - - { ER_TRANSLATE_TAKES_3_ARGS, - "translate() \uD568\uC218\uC5D0 \uC138 \uAC1C\uC758 \uC778\uC218\uAC00 \uC0AC\uC6A9\uB429\uB2C8\uB2E4!"}, - - { ER_UNPARSEDENTITYURI_TAKES_1_ARG, - "unparsed-entity-uri \uD568\uC218\uC5D0\uB294 \uD55C \uAC1C\uC758 \uC778\uC218\uAC00 \uC0AC\uC6A9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4!"}, - - { ER_NAMESPACEAXIS_NOT_IMPLEMENTED, - "\uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uCD95\uC774 \uC544\uC9C1 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4!"}, - - { ER_UNKNOWN_AXIS, - "\uC54C \uC218 \uC5C6\uB294 \uCD95: {0}"}, - - { ER_UNKNOWN_MATCH_OPERATION, - "\uC54C \uC218 \uC5C6\uB294 \uC77C\uCE58 \uC791\uC5C5\uC785\uB2C8\uB2E4!"}, - - { ER_INCORRECT_ARG_LENGTH, - "processing-instruction() \uB178\uB4DC \uD14C\uC2A4\uD2B8\uC758 \uC778\uC218 \uAE38\uC774\uAC00 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - { ER_CANT_CONVERT_TO_NUMBER, - "{0}\uC744(\uB97C) \uC22B\uC790\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_CANT_CONVERT_TO_NODELIST, - "{0}\uC744(\uB97C) NodeList\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_CANT_CONVERT_TO_MUTABLENODELIST, - "{0}\uC744(\uB97C) NodeSetDTM\uC73C\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_CANT_CONVERT_TO_TYPE, - "{0}\uC744(\uB97C) type#{1}(\uC73C)\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_EXPECTED_MATCH_PATTERN, - "getMatchScore\uC5D0 \uC77C\uCE58 \uD328\uD134\uC774 \uD544\uC694\uD569\uB2C8\uB2E4!"}, - - { ER_COULDNOT_GET_VAR_NAMED, - "\uC774\uB984\uC774 {0}\uC778 \uBCC0\uC218\uB97C \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_UNKNOWN_OPCODE, - "\uC624\uB958! \uC54C \uC218 \uC5C6\uB294 \uC791\uC5C5 \uCF54\uB4DC: {0}"}, - - { ER_EXTRA_ILLEGAL_TOKENS, - "\uC798\uBABB\uB41C \uCD94\uAC00 \uD1A0\uD070: {0}"}, - - { ER_EXPECTED_DOUBLE_QUOTE, - "\uB9AC\uD130\uB7F4\uC758 \uB530\uC634\uD45C\uAC00 \uC798\uBABB \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uD070 \uB530\uC634\uD45C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4!"}, - - { ER_EXPECTED_SINGLE_QUOTE, - "\uB9AC\uD130\uB7F4\uC758 \uB530\uC634\uD45C\uAC00 \uC798\uBABB \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC791\uC740 \uB530\uC634\uD45C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4!"}, - - { ER_EMPTY_EXPRESSION, - "\uD45C\uD604\uC2DD\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4!"}, - - { ER_EXPECTED_BUT_FOUND, - "{0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - { ER_INCORRECT_PROGRAMMER_ASSERTION, - "\uD504\uB85C\uADF8\uB798\uBA38 \uAC80\uC99D\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC74C - {0}"}, - - { ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL, - "19990709 XPath \uCD08\uC548\uC5D0\uC11C\uB294 boolean(...) \uC778\uC218\uAC00 \uB354 \uC774\uC0C1 \uC120\uD0DD\uC801 \uC778\uC218\uAC00 \uC544\uB2D9\uB2C8\uB2E4."}, - - { ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG, - "','\uB97C \uCC3E\uC558\uC9C0\uB9CC \uC120\uD589 \uC778\uC218\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG, - "','\uB97C \uCC3E\uC558\uC9C0\uB9CC \uD6C4\uD589 \uC778\uC218\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_PREDICATE_ILLEGAL_SYNTAX, - "'..[predicate]' \uB610\uB294 '.[predicate]'\uB294 \uC798\uBABB\uB41C \uAD6C\uBB38\uC785\uB2C8\uB2E4. \uB300\uC2E0 'self::node()[predicate]'\uB97C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."}, - - { ER_ILLEGAL_AXIS_NAME, - "\uC798\uBABB\uB41C \uCD95 \uC774\uB984: {0}"}, - - { ER_UNKNOWN_NODETYPE, - "\uC54C \uC218 \uC5C6\uB294 nodetype: {0}"}, - - { ER_PATTERN_LITERAL_NEEDS_BE_QUOTED, - "\uD328\uD134 \uB9AC\uD130\uB7F4({0})\uC5D0 \uB530\uC634\uD45C\uB97C \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4!"}, - - { ER_COULDNOT_BE_FORMATTED_TO_NUMBER, - "{0}\uC758 \uD615\uC2DD\uC744 \uC22B\uC790\uB85C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_COULDNOT_CREATE_XMLPROCESSORLIAISON, - "XML TransformerFactory \uC5F0\uACB0\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_DIDNOT_FIND_XPATH_SELECT_EXP, - "\uC624\uB958: xpath select \uD45C\uD604\uC2DD(-select)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, - "\uC624\uB958! OP_LOCATIONPATH \uB4A4\uC5D0\uC11C ENDOP\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_ERROR_OCCURED, - "\uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4!"}, - - { ER_ILLEGAL_VARIABLE_REFERENCE, - "\uBCC0\uC218\uC5D0 \uB300\uD574 \uC81C\uACF5\uB41C VariableReference\uAC00 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C \uBC97\uC5B4\uB098\uAC70\uB098 \uC815\uC758\uB97C \uD3EC\uD568\uD558\uC9C0 \uC5C6\uC2B5\uB2C8\uB2E4! \uC774\uB984 = {0}"}, - - { ER_AXES_NOT_ALLOWED, - "\uC77C\uCE58 \uD328\uD134\uC5D0\uC11C\uB294 child:: \uBC0F attribute:: \uCD95\uB9CC \uD5C8\uC6A9\uB429\uB2C8\uB2E4! \uC798\uBABB\uB41C \uCD95 = {0}"}, - - { ER_KEY_HAS_TOO_MANY_ARGS, - "key()\uC5D0 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uC218\uC758 \uC778\uC218\uAC00 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_COUNT_TAKES_1_ARG, - "count \uD568\uC218\uC5D0\uB294 \uD55C \uAC1C\uC758 \uC778\uC218\uAC00 \uC0AC\uC6A9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4!"}, - - { ER_COULDNOT_FIND_FUNCTION, - "\uD568\uC218\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_UNSUPPORTED_ENCODING, - "\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC778\uCF54\uB529: {0}"}, - - { ER_PROBLEM_IN_DTM_NEXTSIBLING, - "DTM\uC5D0\uC11C getNextSibling\uC5D0 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uBCF5\uAD6C\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911"}, - - { ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL, - "\uD504\uB85C\uADF8\uB798\uBA38 \uC624\uB958: EmptyNodeList\uC5D0 \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_SETDOMFACTORY_NOT_SUPPORTED, - "XPathContext\uC5D0\uC11C\uB294 setDOMFactory\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"}, - - { ER_PREFIX_MUST_RESOLVE, - "\uC811\uB450\uC5B4\uB294 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB85C \uBD84\uC11D\uB418\uC5B4\uC57C \uD568: {0}"}, - - { ER_PARSE_NOT_SUPPORTED, - "XPathContext\uC5D0\uC11C\uB294 parse(InputSource \uC18C\uC2A4)\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4! {0}\uC744(\uB97C) \uC5F4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_SAX_API_NOT_HANDLED, - "DTM\uC774 SAX API \uBB38\uC790(char ch[]...\uB97C \uCC98\uB9AC\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4!"}, - - { ER_IGNORABLE_WHITESPACE_NOT_HANDLED, - "DTM\uC774 ignorableWhitespace(char ch[]...\uB97C \uCC98\uB9AC\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4!"}, - - { ER_DTM_CANNOT_HANDLE_NODES, - "DTMLiaison\uC740 {0} \uC720\uD615\uC758 \uB178\uB4DC\uB97C \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_XERCES_CANNOT_HANDLE_NODES, - "DOM2Helper\uB294 {0} \uC720\uD615\uC758 \uB178\uB4DC\uB97C \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_XERCES_PARSE_ERROR_DETAILS, - "DOM2Helper.parse \uC624\uB958: SystemID - {0} \uD589 - {1}"}, - - { ER_XERCES_PARSE_ERROR, - "DOM2Helper.parse \uC624\uB958"}, - - { ER_INVALID_UTF16_SURROGATE, - "\uBD80\uC801\uD569\uD55C UTF-16 \uB300\uB9AC \uC694\uC18C\uAC00 \uAC10\uC9C0\uB428: {0}"}, - - { ER_OIERROR, - "IO \uC624\uB958"}, - - { ER_CANNOT_CREATE_URL, - "{0}\uC5D0 \uB300\uD55C URL\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_XPATH_READOBJECT, - "XPath.readObject\uC5D0 \uC624\uB958 \uBC1C\uC0DD: {0}"}, - - { ER_FUNCTION_TOKEN_NOT_FOUND, - "\uD568\uC218 \uD1A0\uD070\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_CANNOT_DEAL_XPATH_TYPE, - "XPath \uC720\uD615\uC744 \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_NODESET_NOT_MUTABLE, - "\uC774 NodeSet\uB294 \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_NODESETDTM_NOT_MUTABLE, - "\uC774 NodeSetDTM\uC740 \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_VAR_NOT_RESOLVABLE, - "\uBCC0\uC218\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC74C: {0}"}, - - { ER_NULL_ERROR_HANDLER, - "\uB110 \uC624\uB958 \uCC98\uB9AC\uAE30"}, - - { ER_PROG_ASSERT_UNKNOWN_OPCODE, - "\uD504\uB85C\uADF8\uB798\uBA38 \uAC80\uC99D: \uC54C \uC218 \uC5C6\uB294 opcode: {0}"}, - - { ER_ZERO_OR_ONE, - "0 \uB610\uB294 1"}, - - { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper\uB294 rtf()\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper\uB294 asNodeIterator()\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /** detach() not supported by XRTreeFragSelectWrapper */ - { ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper\uB294 detach()\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /** num() not supported by XRTreeFragSelectWrapper */ - { ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper\uB294 num()\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /** xstr() not supported by XRTreeFragSelectWrapper */ - { ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper\uB294 xstr()\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - /** str() not supported by XRTreeFragSelectWrapper */ - { ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper\uB294 str()\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS, - "fsb()\uB294 XStringForChars\uC5D0 \uB300\uD574 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_COULD_NOT_FIND_VAR, - "\uC774\uB984\uC774 {0}\uC778 \uBCC0\uC218\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING, - "XStringForChars\uB294 \uC778\uC218\uC5D0 \uBB38\uC790\uC5F4\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_FASTSTRINGBUFFER_CANNOT_BE_NULL, - "FastStringBuffer \uC778\uC218\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { ER_TWO_OR_THREE, - "2 \uB610\uB294 3"}, - - { ER_VARIABLE_ACCESSED_BEFORE_BIND, - "\uBCC0\uC218\uAC00 \uBC14\uC778\uB4DC\uB418\uAE30 \uC804\uC5D0 \uBCC0\uC218\uC5D0 \uC561\uC138\uC2A4\uB418\uC5C8\uC2B5\uB2C8\uB2E4!"}, - - { ER_FSB_CANNOT_TAKE_STRING, - "XStringForFSB\uB294 \uC778\uC218\uC5D0 \uBB38\uC790\uC5F4\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_SETTING_WALKER_ROOT_TO_NULL, - "\n !!!! \uC624\uB958! \uC6CC\uCEE4\uC758 \uB8E8\uD2B8\uB97C null\uB85C \uC124\uC815\uD558\uB294 \uC911\uC785\uB2C8\uB2E4!"}, - - { ER_NODESETDTM_CANNOT_ITERATE, - "\uC774 NodeSetDTM\uC740 \uC774\uC804 \uB178\uB4DC\uB97C \uBC18\uBCF5\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_NODESET_CANNOT_ITERATE, - "\uC774 NodeSet\uB294 \uC774\uC804 \uB178\uB4DC\uB97C \uBC18\uBCF5\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_NODESETDTM_CANNOT_INDEX, - "\uC774 NodeSetDTM\uC740 \uD568\uC218\uB97C \uC778\uB371\uC2A4\uD654\uD558\uAC70\uB098 \uC9D1\uACC4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_NODESET_CANNOT_INDEX, - "\uC774 NodeSet\uB294 \uD568\uC218\uB97C \uC778\uB371\uC2A4\uD654\uD558\uAC70\uB098 \uC9D1\uACC4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_CANNOT_CALL_SETSHOULDCACHENODE, - "nextNode\uAC00 \uD638\uCD9C\uB41C \uD6C4\uC5D0\uB294 setShouldCacheNodes\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"}, - - { ER_ONLY_ALLOWS, - "{0}\uC740(\uB294) {1}\uAC1C\uC758 \uC778\uC218\uB9CC \uD5C8\uC6A9\uD569\uB2C8\uB2E4."}, - - { ER_UNKNOWN_STEP, - "getNextStepPos\uC5D0 \uD504\uB85C\uADF8\uB798\uBA38 \uAC80\uC99D\uC774 \uC788\uC74C: \uC54C \uC218 \uC5C6\uB294 stepType: {0}"}, - - //Note to translators: A relative location path is a form of XPath expression. - // The message indicates that such an expression was expected following the - // characters '/' or '//', but was not found. - { ER_EXPECTED_REL_LOC_PATH, - "'/' \uB610\uB294 '//' \uD1A0\uD070 \uB4A4\uC5D0 \uC0C1\uB300 \uC704\uCE58 \uACBD\uB85C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such an expression was expected,but - // the characters specified by the substitution text were encountered instead. - { ER_EXPECTED_LOC_PATH, - "\uC704\uCE58 \uACBD\uB85C\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC {0} \uD1A0\uD070\uC774 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such a subexpression was expected, - // but no more characters were found in the expression. - { ER_EXPECTED_LOC_PATH_AT_END_EXPR, - "\uC704\uCE58 \uACBD\uB85C\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC XPath \uD45C\uD604\uC2DD \uB05D\uC774 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - // Note to translators: A location step is part of an XPath expression. - // The message indicates that syntactically such an expression was expected - // following the specified characters. - { ER_EXPECTED_LOC_STEP, - "'/' \uB610\uB294 '//' \uD1A0\uD070 \uB4A4\uC5D0 \uC704\uCE58 \uB2E8\uACC4\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."}, - - // Note to translators: A node test is part of an XPath expression that is - // used to test for particular kinds of nodes. In this case, a node test that - // consists of an NCName followed by a colon and an asterisk or that consists - // of a QName was expected, but was not found. - { ER_EXPECTED_NODE_TEST, - "NCName:* \uB610\uB294 QName\uACFC \uC77C\uCE58\uD558\uB294 \uB178\uB4DC \uD14C\uC2A4\uD2B8\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."}, - - // Note to translators: A step pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but the specified character was found in the expression instead. - { ER_EXPECTED_STEP_PATTERN, - "\uB2E8\uACC4 \uD328\uD134\uC774 \uD544\uC694\uD558\uC9C0\uB9CC '/'\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, - - // Note to translators: A relative path pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but was not found. - { ER_EXPECTED_REL_PATH_PATTERN, - "\uC0C1\uB300 \uACBD\uB85C \uD328\uD134\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type boolean. - { ER_CANT_CONVERT_TO_BOOLEAN, - "XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC758 XPathResultType\uC774 \uBD80\uC6B8\uB85C \uBCC0\uD658\uB420 \uC218 \uC5C6\uB294 {1}\uC785\uB2C8\uB2E4."}, - - // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and - // FIRST_ORDERED_NODE_TYPE. - { ER_CANT_CONVERT_TO_SINGLENODE, - "XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC758 XPathResultType\uC774 \uB2E8\uC77C \uB178\uB4DC\uB85C \uBCC0\uD658\uB420 \uC218 \uC5C6\uB294 {1}\uC785\uB2C8\uB2E4. getSingleNodeValue \uBA54\uC18C\uB4DC\uB294 ANY_UNORDERED_NODE_TYPE \uBC0F FIRST_ORDERED_NODE_TYPE \uC720\uD615\uC5D0\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."}, - - // Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and - // ORDERED_NODE_SNAPSHOT_TYPE. - { ER_CANT_GET_SNAPSHOT_LENGTH, - "XPathResultType\uC774 {1}\uC774\uBBC0\uB85C getSnapshotLength \uBA54\uC18C\uB4DC\uB294 XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC5D0\uC11C \uD638\uCD9C\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774 \uBA54\uC18C\uB4DC\uB294 UNORDERED_NODE_SNAPSHOT_TYPE \uBC0F ORDERED_NODE_SNAPSHOT_TYPE \uC720\uD615\uC5D0\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."}, - - { ER_NON_ITERATOR_TYPE, - "XPathResultType\uC774 {1}\uC774\uBBC0\uB85C iterateNext \uBA54\uC18C\uB4DC\uB294 XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC5D0\uC11C \uD638\uCD9C\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774 \uBA54\uC18C\uB4DC\uB294 UNORDERED_NODE_ITERATOR_TYPE \uBC0F ORDERED_NODE_ITERATOR_TYPE \uC720\uD615\uC5D0\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."}, - - // Note to translators: This message indicates that the document being operated - // upon changed, so the iterator object that was being used to traverse the - // document has now become invalid. - { ER_DOC_MUTATED, - "\uACB0\uACFC\uAC00 \uBC18\uD658\uB41C \uD6C4 \uBB38\uC11C\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC774\uD130\uB808\uC774\uD130\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4."}, - - { ER_INVALID_XPATH_TYPE, - "\uBD80\uC801\uD569\uD55C XPath \uC720\uD615 \uC778\uC218: {0}"}, - - { ER_EMPTY_XPATH_RESULT, - "XPath \uACB0\uACFC \uAC1D\uCCB4\uAC00 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."}, - - { ER_INCOMPATIBLE_TYPES, - "XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC758 XPathResultType\uC774 \uC9C0\uC815\uB41C XPathResultType {2}(\uC73C)\uB85C \uAC15\uC81C \uBCC0\uD658\uB420 \uC218 \uC5C6\uB294 {1}\uC785\uB2C8\uB2E4."}, - - { ER_NULL_RESOLVER, - "\uB110 \uC811\uB450\uC5B4 \uBD84\uC11D\uAE30\uB85C \uC811\uB450\uC5B4\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type string. - { ER_CANT_CONVERT_TO_STRING, - "XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC758 XPathResultType\uC774 \uBB38\uC790\uC5F4\uB85C \uBCC0\uD658\uB420 \uC218 \uC5C6\uB294 {1}\uC785\uB2C8\uB2E4."}, - - // Note to translators: Do not translate snapshotItem, - // UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE. - { ER_NON_SNAPSHOT_TYPE, - "XPathResultType\uC774 {1}\uC774\uBBC0\uB85C snapshotItem \uBA54\uC18C\uB4DC\uB294 XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC5D0\uC11C \uD638\uCD9C\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774 \uBA54\uC18C\uB4DC\uB294 UNORDERED_NODE_SNAPSHOT_TYPE \uBC0F ORDERED_NODE_SNAPSHOT_TYPE \uC720\uD615\uC5D0\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."}, - - // Note to translators: XPathEvaluator is a Java interface name. An - // XPathEvaluator is created with respect to a particular XML document, and in - // this case the expression represented by this object was being evaluated with - // respect to a context node from a different document. - { ER_WRONG_DOCUMENT, - "\uCEE8\uD14D\uC2A4\uD2B8 \uB178\uB4DC\uAC00 \uC774 XPathEvaluator\uC5D0 \uBC14\uC778\uB4DC\uB41C \uBB38\uC11C\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - // Note to translators: The XPath expression cannot be evaluated with respect - // to this type of node. - { ER_WRONG_NODETYPE, - "\uCEE8\uD14D\uC2A4\uD2B8 \uB178\uB4DC \uC720\uD615\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { ER_XPATH_ERROR, - "XPath\uC5D0 \uC54C \uC218 \uC5C6\uB294 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."}, - - { ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER, - "XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC758 XPathResultType\uC774 \uC22B\uC790\uB85C \uBCC0\uD658\uB420 \uC218 \uC5C6\uB294 {1}\uC785\uB2C8\uB2E4."}, - - //BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - /** Field ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED */ - - { ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED, - "XMLConstants.FEATURE_SECURE_PROCESSING \uAE30\uB2A5\uC774 true\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 \uD655\uC7A5 \uD568\uC218 ''{0}''\uC744(\uB97C) \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /** Field ER_RESOLVE_VARIABLE_RETURNS_NULL */ - - { ER_RESOLVE_VARIABLE_RETURNS_NULL, - "{0} \uBCC0\uC218\uC5D0 \uB300\uD55C resolveVariable\uC774 \uB110\uC744 \uBC18\uD658\uD569\uB2C8\uB2E4."}, - - /** Field ER_UNSUPPORTED_RETURN_TYPE */ - - { ER_UNSUPPORTED_RETURN_TYPE, - "\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uBC18\uD658 \uC720\uD615: {0}"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "\uC18C\uC2A4 \uBC0F/\uB610\uB294 \uBC18\uD658 \uC720\uD615\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "\uC18C\uC2A4 \uBC0F/\uB610\uB294 \uBC18\uD658 \uC720\uD615\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /** Field ER_ARG_CANNOT_BE_NULL */ - - { ER_ARG_CANNOT_BE_NULL, - "{0} \uC778\uC218\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /** Field ER_OBJECT_MODEL_NULL */ - - { ER_OBJECT_MODEL_NULL, - "objectModel == null\uB85C {0}#isObjectModelSupported(String objectModel)\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_OBJECT_MODEL_EMPTY, - "objectModel == \"\"\uB85C {0}#isObjectModelSupported(String objectModel)\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_FEATURE_NAME_NULL, - "\uB110 \uC774\uB984\uC73C\uB85C \uAE30\uB2A5\uC744 \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911: {0}#setFeature(null, {1})"}, - - /** Field ER_FEATURE_UNKNOWN */ - - { ER_FEATURE_UNKNOWN, - "\uC54C \uC218 \uC5C6\uB294 \uAE30\uB2A5 \"{0}\"\uC744(\uB97C) \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911: {1}#setFeature({0},{2})"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_NULL_FEATURE, - "\uB110 \uC774\uB984\uC73C\uB85C \uAE30\uB2A5\uC744 \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911: {0}#getFeature(null)"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_UNKNOWN_FEATURE, - "\uC54C \uC218 \uC5C6\uB294 \uAE30\uB2A5 \"{0}\"\uC744(\uB97C) \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911: {1}#getFeature({0})"}, - - {ER_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: \uBCF4\uC548 \uAD00\uB9AC\uC790\uAC00 \uC788\uC744 \uACBD\uC6B0 \uAE30\uB2A5\uC744 false\uB85C \uC124\uC815\uD560 \uC218 \uC5C6\uC74C: {1}#setFeature({0},{2})"}, - - /** Field ER_NULL_XPATH_FUNCTION_RESOLVER */ - - { ER_NULL_XPATH_FUNCTION_RESOLVER, - "\uB110 XPathFunctionResolver\uB97C \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911: {0}#setXPathFunctionResolver(null)"}, - - /** Field ER_NULL_XPATH_VARIABLE_RESOLVER */ - - { ER_NULL_XPATH_VARIABLE_RESOLVER, - "\uB110 XPathVariableResolver\uB97C \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911: {0}#setXPathVariableResolver(null)"}, - - //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - // Warnings... - - { WG_LOCALE_NAME_NOT_HANDLED, - "format-number \uD568\uC218\uC758 \uB85C\uCF00\uC77C \uC774\uB984\uC774 \uC544\uC9C1 \uCC98\uB9AC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4!"}, - - { WG_PROPERTY_NOT_SUPPORTED, - "XSL \uC18D\uC131\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C: {0}"}, - - { WG_DONT_DO_ANYTHING_WITH_NS, - "\uC18D\uC131\uC758 {0} \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uB300\uD574 \uD604\uC7AC \uC5B4\uB5A4 \uC791\uC5C5\uB3C4 \uC218\uD589\uD558\uC9C0 \uC54A\uC544\uC57C \uD568: {1}"}, - - { WG_QUO_NO_LONGER_DEFINED, - "\uC774\uC804 \uAD6C\uBB38: quo(...)\uAC00 XPath\uC5D0 \uB354 \uC774\uC0C1 \uC815\uC758\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST, - "nodeTest\uB97C \uAD6C\uD604\uD558\uB824\uBA74 XPath\uC5D0 \uD30C\uC0DD \uAC1D\uCCB4\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4!"}, - - { WG_FUNCTION_TOKEN_NOT_FOUND, - "\uD568\uC218 \uD1A0\uD070\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { WG_COULDNOT_FIND_FUNCTION, - "\uD568\uC218\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "{0}\uC5D0\uC11C URL\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, - - { WG_EXPAND_ENTITIES_NOT_SUPPORTED, - "DTM \uAD6C\uBB38 \uBD84\uC11D\uAE30\uC5D0 \uB300\uD574\uC11C\uB294 -E \uC635\uC158\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}, - - { WG_ILLEGAL_VARIABLE_REFERENCE, - "\uBCC0\uC218\uC5D0 \uB300\uD574 \uC81C\uACF5\uB41C VariableReference\uAC00 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C \uBC97\uC5B4\uB098\uAC70\uB098 \uC815\uC758\uB97C \uD3EC\uD568\uD558\uC9C0 \uC5C6\uC2B5\uB2C8\uB2E4! \uC774\uB984 = {0}"}, - - { WG_UNSUPPORTED_ENCODING, - "\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC778\uCF54\uB529: {0}"}, - - - - // Other miscellaneous text used inside the code... - { "ui_language", "ko"}, - { "help_language", "ko"}, - { "language", "ko"}, - { "BAD_CODE", "createMessage\uC5D0 \uB300\uD55C \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uBC94\uC704\uB97C \uBC97\uC5B4\uB0AC\uC2B5\uB2C8\uB2E4."}, - { "FORMAT_FAILED", "messageFormat \uD638\uCD9C \uC911 \uC608\uC678\uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."}, - { "version", ">>>>>>> Xalan \uBC84\uC804 "}, - { "version2", "<<<<<<<"}, - { "yes", "\uC608"}, - { "line", "\uD589 \uBC88\uD638"}, - { "column", "\uC5F4 \uBC88\uD638"}, - { "xsldone", "XSLProcessor: \uC644\uB8CC"}, - { "xpath_option", "XPath \uC635\uC158: "}, - { "optionIN", " [-in inputXMLURL]"}, - { "optionSelect", " [-select XPath \uD45C\uD604\uC2DD]"}, - { "optionMatch", " [-match \uC77C\uCE58 \uD328\uD134(\uC77C\uCE58 \uC9C4\uB2E8\uC758 \uACBD\uC6B0)]"}, - { "optionAnyExpr", "\uB610\uB294 XPath \uD45C\uD604\uC2DD\uC774 \uC9C4\uB2E8 \uB364\uD504\uB97C \uC218\uD589\uD569\uB2C8\uB2E4."}, - { "noParsermsg1", "XSL \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}, - { "noParsermsg2", "** \uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"}, - { "noParsermsg3", "\uD074\uB798\uC2A4 \uACBD\uB85C\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624."}, - { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}, - { "noParsermsg5", "IBM AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, - { "gtone", ">1" }, - { "zero", "0" }, - { "one", "1" }, - { "two" , "2" }, - { "three", "3" } - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - - - // ================= INFRASTRUCTURE ====================== - - /** Field BAD_CODE */ - public static final String BAD_CODE = "BAD_CODE"; - - /** Field FORMAT_FAILED */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - /** Field ERROR_RESOURCES */ - public static final String ERROR_RESOURCES = - "com.sun.org.apache.xpath.internal.res.XPATHErrorResources"; - - /** Field ERROR_STRING */ - public static final String ERROR_STRING = "#error"; - - /** Field ERROR_HEADER */ - public static final String ERROR_HEADER = "Error: "; - - /** Field WARNING_HEADER */ - public static final String WARNING_HEADER = "Warning: "; - - /** Field XSL_HEADER */ - public static final String XSL_HEADER = "XSL "; - - /** Field XML_HEADER */ - public static final String XML_HEADER = "XML "; - - /** Field QUERY_HEADER */ - public static final String QUERY_HEADER = "PATTERN "; - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java deleted file mode 100644 index ee9e50cf644..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java +++ /dev/null @@ -1,938 +0,0 @@ -/* - * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xpath.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a Static string constant for the - * Key and update the contents array with Key, Value pair - * Also you need to update the count of messages(MAX_CODE)or - * the count of warnings(MAX_WARNING) [ Information purpose only] - * @xsl.usage advanced - * @LastModified: Nov 2024 - */ -public class XPATHErrorResources_pt_BR extends ListResourceBundle -{ - -/* - * General notes to translators: - * - * This file contains error and warning messages related to XPath Error - * Handling. - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 8) The context node is the node in the document with respect to which an - * XPath expression is being evaluated. - * - * 9) An iterator is an object that traverses nodes in the tree, one at a time. - * - * 10) NCName is an XML term used to describe a name that does not contain a - * colon (a "no-colon name"). - * - * 11) QName is an XML term meaning "qualified name". - */ - - /* - * static variables - */ - public static final String ERROR0000 = "ERROR0000"; - public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH = - "ER_CURRENT_NOT_ALLOWED_IN_MATCH"; - public static final String ER_CURRENT_TAKES_NO_ARGS = - "ER_CURRENT_TAKES_NO_ARGS"; - public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED"; - public static final String ER_CONTEXT_CAN_NOT_BE_NULL = "ER_CONTEXT_CAN_NOT_BE_NULL"; - public static final String ER_CONTEXT_HAS_NO_OWNERDOC = - "ER_CONTEXT_HAS_NO_OWNERDOC"; - public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS = - "ER_LOCALNAME_HAS_TOO_MANY_ARGS"; - public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS = - "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS"; - public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS = - "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS"; - public static final String ER_NUMBER_HAS_TOO_MANY_ARGS = - "ER_NUMBER_HAS_TOO_MANY_ARGS"; - public static final String ER_NAME_HAS_TOO_MANY_ARGS = - "ER_NAME_HAS_TOO_MANY_ARGS"; - public static final String ER_STRING_HAS_TOO_MANY_ARGS = - "ER_STRING_HAS_TOO_MANY_ARGS"; - public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS = - "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS"; - public static final String ER_TRANSLATE_TAKES_3_ARGS = - "ER_TRANSLATE_TAKES_3_ARGS"; - public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG = - "ER_UNPARSEDENTITYURI_TAKES_1_ARG"; - public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED = - "ER_NAMESPACEAXIS_NOT_IMPLEMENTED"; - public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS"; - public static final String ER_UNKNOWN_MATCH_OPERATION = - "ER_UNKNOWN_MATCH_OPERATION"; - public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH"; - public static final String ER_CANT_CONVERT_TO_NUMBER = - "ER_CANT_CONVERT_TO_NUMBER"; - public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER = - "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER"; - public static final String ER_CANT_CONVERT_TO_NODELIST = - "ER_CANT_CONVERT_TO_NODELIST"; - public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST = - "ER_CANT_CONVERT_TO_MUTABLENODELIST"; - public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE"; - public static final String ER_EXPECTED_MATCH_PATTERN = - "ER_EXPECTED_MATCH_PATTERN"; - public static final String ER_COULDNOT_GET_VAR_NAMED = - "ER_COULDNOT_GET_VAR_NAMED"; - public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE"; - public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS"; - public static final String ER_EXPECTED_DOUBLE_QUOTE = - "ER_EXPECTED_DOUBLE_QUOTE"; - public static final String ER_EXPECTED_SINGLE_QUOTE = - "ER_EXPECTED_SINGLE_QUOTE"; - public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION"; - public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND"; - public static final String ER_INCORRECT_PROGRAMMER_ASSERTION = - "ER_INCORRECT_PROGRAMMER_ASSERTION"; - public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL = - "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL"; - public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG = - "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG"; - public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG = - "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG"; - public static final String ER_PREDICATE_ILLEGAL_SYNTAX = - "ER_PREDICATE_ILLEGAL_SYNTAX"; - public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME"; - public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE"; - public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = - "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED"; - public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER = - "ER_COULDNOT_BE_FORMATTED_TO_NUMBER"; - public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON = - "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON"; - public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP = - "ER_DIDNOT_FIND_XPATH_SELECT_EXP"; - public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH = - "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH"; - public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED"; - public static final String ER_ILLEGAL_VARIABLE_REFERENCE = - "ER_ILLEGAL_VARIABLE_REFERENCE"; - public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED"; - public static final String ER_KEY_HAS_TOO_MANY_ARGS = - "ER_KEY_HAS_TOO_MANY_ARGS"; - public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG"; - public static final String ER_COULDNOT_FIND_FUNCTION = - "ER_COULDNOT_FIND_FUNCTION"; - public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING"; - public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING = - "ER_PROBLEM_IN_DTM_NEXTSIBLING"; - public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL = - "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL"; - public static final String ER_SETDOMFACTORY_NOT_SUPPORTED = - "ER_SETDOMFACTORY_NOT_SUPPORTED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED"; - public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED"; -public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = - "ER_IGNORABLE_WHITESPACE_NOT_HANDLED"; - public static final String ER_DTM_CANNOT_HANDLE_NODES = - "ER_DTM_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_CANNOT_HANDLE_NODES = - "ER_XERCES_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_PARSE_ERROR_DETAILS = - "ER_XERCES_PARSE_ERROR_DETAILS"; - public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL"; - public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT"; - public static final String ER_FUNCTION_TOKEN_NOT_FOUND = - "ER_FUNCTION_TOKEN_NOT_FOUND"; - public static final String ER_CANNOT_DEAL_XPATH_TYPE = - "ER_CANNOT_DEAL_XPATH_TYPE"; - public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE"; - public static final String ER_NODESETDTM_NOT_MUTABLE = - "ER_NODESETDTM_NOT_MUTABLE"; - /** Variable not resolvable: */ - public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE"; - /** Null error handler */ - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - /** Programmer's assertion: unknown opcode */ - public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE = - "ER_PROG_ASSERT_UNKNOWN_OPCODE"; - /** 0 or 1 */ - public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE"; - /** rtf() not supported by XRTreeFragSelectWrapper */ - public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** asNodeIterator() not supported by XRTreeFragSelectWrapper */ - public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** fsb() not supported for XStringForChars */ - public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS = - "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS"; - /** Could not find variable with the name of */ - public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR"; - /** XStringForChars can not take a string for an argument */ - public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING = - "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING"; - /** The FastStringBuffer argument can not be null */ - public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL = - "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL"; - /** 2 or 3 */ - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - /** Variable accessed before it is bound! */ - public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND = - "ER_VARIABLE_ACCESSED_BEFORE_BIND"; - /** XStringForFSB can not take a string for an argument! */ - public static final String ER_FSB_CANNOT_TAKE_STRING = - "ER_FSB_CANNOT_TAKE_STRING"; - /** Error! Setting the root of a walker to null! */ - public static final String ER_SETTING_WALKER_ROOT_TO_NULL = - "ER_SETTING_WALKER_ROOT_TO_NULL"; - /** This NodeSetDTM can not iterate to a previous node! */ - public static final String ER_NODESETDTM_CANNOT_ITERATE = - "ER_NODESETDTM_CANNOT_ITERATE"; - /** This NodeSet can not iterate to a previous node! */ - public static final String ER_NODESET_CANNOT_ITERATE = - "ER_NODESET_CANNOT_ITERATE"; - /** This NodeSetDTM can not do indexing or counting functions! */ - public static final String ER_NODESETDTM_CANNOT_INDEX = - "ER_NODESETDTM_CANNOT_INDEX"; - /** This NodeSet can not do indexing or counting functions! */ - public static final String ER_NODESET_CANNOT_INDEX = - "ER_NODESET_CANNOT_INDEX"; - /** Can not call setShouldCacheNodes after nextNode has been called! */ - public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE = - "ER_CANNOT_CALL_SETSHOULDCACHENODE"; - /** {0} only allows {1} arguments */ - public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS"; - /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */ - public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP"; - /** Problem with RelativeLocationPath */ - public static final String ER_EXPECTED_REL_LOC_PATH = - "ER_EXPECTED_REL_LOC_PATH"; - /** Problem with LocationPath */ - public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH"; - public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR = - "ER_EXPECTED_LOC_PATH_AT_END_EXPR"; - /** Problem with Step */ - public static final String ER_EXPECTED_LOC_STEP = "ER_EXPECTED_LOC_STEP"; - /** Problem with NodeTest */ - public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST"; - /** Expected step pattern */ - public static final String ER_EXPECTED_STEP_PATTERN = - "ER_EXPECTED_STEP_PATTERN"; - /** Expected relative path pattern */ - public static final String ER_EXPECTED_REL_PATH_PATTERN = - "ER_EXPECTED_REL_PATH_PATTERN"; - /** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */ - public static final String ER_CANT_CONVERT_TO_BOOLEAN = - "ER_CANT_CONVERT_TO_BOOLEAN"; - /** Field ER_CANT_CONVERT_TO_SINGLENODE */ - public static final String ER_CANT_CONVERT_TO_SINGLENODE = - "ER_CANT_CONVERT_TO_SINGLENODE"; - /** Field ER_CANT_GET_SNAPSHOT_LENGTH */ - public static final String ER_CANT_GET_SNAPSHOT_LENGTH = - "ER_CANT_GET_SNAPSHOT_LENGTH"; - /** Field ER_NON_ITERATOR_TYPE */ - public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE"; - /** Field ER_DOC_MUTATED */ - public static final String ER_DOC_MUTATED = "ER_DOC_MUTATED"; - public static final String ER_INVALID_XPATH_TYPE = "ER_INVALID_XPATH_TYPE"; - public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT"; - public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES"; - public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER"; - public static final String ER_CANT_CONVERT_TO_STRING = - "ER_CANT_CONVERT_TO_STRING"; - public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE"; - public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT"; - /* Note to translators: The XPath expression cannot be evaluated with respect - * to this type of node. - */ - /** Field ER_WRONG_NODETYPE */ - public static final String ER_WRONG_NODETYPE = "ER_WRONG_NODETYPE"; - public static final String ER_XPATH_ERROR = "ER_XPATH_ERROR"; - - //BEGIN: Keys needed for exception messages of JAXP 1.3 XPath API implementation - public static final String ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED = "ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED"; - public static final String ER_RESOLVE_VARIABLE_RETURNS_NULL = "ER_RESOLVE_VARIABLE_RETURNS_NULL"; - public static final String ER_UNSUPPORTED_RETURN_TYPE = "ER_UNSUPPORTED_RETURN_TYPE"; - public static final String ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL = "ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL"; - public static final String ER_ARG_CANNOT_BE_NULL = "ER_ARG_CANNOT_BE_NULL"; - - public static final String ER_OBJECT_MODEL_NULL = "ER_OBJECT_MODEL_NULL"; - public static final String ER_OBJECT_MODEL_EMPTY = "ER_OBJECT_MODEL_EMPTY"; - public static final String ER_FEATURE_NAME_NULL = "ER_FEATURE_NAME_NULL"; - public static final String ER_FEATURE_UNKNOWN = "ER_FEATURE_UNKNOWN"; - public static final String ER_GETTING_NULL_FEATURE = "ER_GETTING_NULL_FEATURE"; - public static final String ER_GETTING_UNKNOWN_FEATURE = "ER_GETTING_UNKNOWN_FEATURE"; - public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE"; - public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER"; - public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER"; - //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation - - public static final String WG_LOCALE_NAME_NOT_HANDLED = - "WG_LOCALE_NAME_NOT_HANDLED"; - public static final String WG_PROPERTY_NOT_SUPPORTED = - "WG_PROPERTY_NOT_SUPPORTED"; - public static final String WG_DONT_DO_ANYTHING_WITH_NS = - "WG_DONT_DO_ANYTHING_WITH_NS"; - public static final String WG_QUO_NO_LONGER_DEFINED = - "WG_QUO_NO_LONGER_DEFINED"; - public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = - "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST"; - public static final String WG_FUNCTION_TOKEN_NOT_FOUND = - "WG_FUNCTION_TOKEN_NOT_FOUND"; - public static final String WG_COULDNOT_FIND_FUNCTION = - "WG_COULDNOT_FIND_FUNCTION"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED = - "WG_EXPAND_ENTITIES_NOT_SUPPORTED"; - public static final String WG_ILLEGAL_VARIABLE_REFERENCE = - "WG_ILLEGAL_VARIABLE_REFERENCE"; - public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING"; - - /** detach() not supported by XRTreeFragSelectWrapper */ - public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** num() not supported by XRTreeFragSelectWrapper */ - public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** xstr() not supported by XRTreeFragSelectWrapper */ - public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** str() not supported by XRTreeFragSelectWrapper */ - public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - - // Error messages... - - private static final Object[][] _contents = new Object[][]{ - - { "ERROR0000" , "{0}" }, - - { ER_CURRENT_NOT_ALLOWED_IN_MATCH, "A fun\u00E7\u00E3o current() n\u00E3o \u00E9 permitida em um padr\u00E3o de correspond\u00EAncia!" }, - - { ER_CURRENT_TAKES_NO_ARGS, "A fun\u00E7\u00E3o current() n\u00E3o aceita argumentos!" }, - - { ER_DOCUMENT_REPLACED, - "a implementa\u00E7\u00E3o da fun\u00E7\u00E3o document() foi substitu\u00EDda por com.sun.org.apache.xalan.internal.xslt.FuncDocument!"}, - - { ER_CONTEXT_CAN_NOT_BE_NULL, - "O contexto n\u00E3o pode ser nulo porque a opera\u00E7\u00E3o \u00E9 dependente de contexto."}, - - { ER_CONTEXT_HAS_NO_OWNERDOC, - "o contexto n\u00E3o tem um documento de propriet\u00E1rio!"}, - - { ER_LOCALNAME_HAS_TOO_MANY_ARGS, - "local-name() tem muitos argumentos."}, - - { ER_NAMESPACEURI_HAS_TOO_MANY_ARGS, - "namespace-uri() tem muitos argumentos."}, - - { ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS, - "normalize-space() tem muitos argumentos."}, - - { ER_NUMBER_HAS_TOO_MANY_ARGS, - "number() tem muitos argumentos."}, - - { ER_NAME_HAS_TOO_MANY_ARGS, - "name() tem muitos argumentos."}, - - { ER_STRING_HAS_TOO_MANY_ARGS, - "string() tem muitos argumentos."}, - - { ER_STRINGLENGTH_HAS_TOO_MANY_ARGS, - "string-length() tem muitos argumentos."}, - - { ER_TRANSLATE_TAKES_3_ARGS, - "A fun\u00E7\u00E3o translate() tem tr\u00EAs argumentos!"}, - - { ER_UNPARSEDENTITYURI_TAKES_1_ARG, - "A fun\u00E7\u00E3o unparsed-entity-uri deve ter um argumento!"}, - - { ER_NAMESPACEAXIS_NOT_IMPLEMENTED, - "o eixo do namespace ainda n\u00E3o foi implementado!"}, - - { ER_UNKNOWN_AXIS, - "eixo desconhecido: {0}"}, - - { ER_UNKNOWN_MATCH_OPERATION, - "Opera\u00E7\u00E3o correspondente desconhecida!"}, - - { ER_INCORRECT_ARG_LENGTH, - "O tamanho do argumento do teste de n\u00F3 de processing-instruction() est\u00E1 incorreto!"}, - - { ER_CANT_CONVERT_TO_NUMBER, - "N\u00E3o \u00E9 poss\u00EDvel converter {0} em um n\u00FAmero"}, - - { ER_CANT_CONVERT_TO_NODELIST, - "N\u00E3o \u00E9 poss\u00EDvel converter {0} em uma NodeList!"}, - - { ER_CANT_CONVERT_TO_MUTABLENODELIST, - "N\u00E3o \u00E9 poss\u00EDvel converter {0} em um NodeSetDTM!"}, - - { ER_CANT_CONVERT_TO_TYPE, - "N\u00E3o \u00E9 poss\u00EDvel converter {0} em um tipo n\u00BA{1}"}, - - { ER_EXPECTED_MATCH_PATTERN, - "Padr\u00E3o de correspond\u00EAncia esperado em getMatchScore!"}, - - { ER_COULDNOT_GET_VAR_NAMED, - "N\u00E3o foi poss\u00EDvel obter a vari\u00E1vel com o nome {0}"}, - - { ER_UNKNOWN_OPCODE, - "ERRO! C\u00F3digo da opera\u00E7\u00E3o desconhecido: {0}"}, - - { ER_EXTRA_ILLEGAL_TOKENS, - "Tokens inv\u00E1lidos extras: {0}"}, - - { ER_EXPECTED_DOUBLE_QUOTE, - "literal com aspas incorretas... esperava-se aspas duplas!"}, - - { ER_EXPECTED_SINGLE_QUOTE, - "literal com aspas incorretas... esperava-se aspas simples!"}, - - { ER_EMPTY_EXPRESSION, - "Express\u00E3o vazia!"}, - - { ER_EXPECTED_BUT_FOUND, - "Esperava {0}, mas encontrou: {1}"}, - - { ER_INCORRECT_PROGRAMMER_ASSERTION, - "Asser\u00E7\u00E3o do programador incorreta! - {0}"}, - - { ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL, - "O argumento boolean(...) n\u00E3o \u00E9 mais opcional com o rascunho XPath 19990709."}, - - { ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG, - "Encontrou ',' mas sem um argumento precedente!"}, - - { ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG, - "Encontrou ',' mas sem o argumento a seguir!"}, - - { ER_PREDICATE_ILLEGAL_SYNTAX, - "'..[predicate]' ou '.[predicate]' \u00E9 uma sintaxe inv\u00E1lida. Use 'self::node()[predicate]'."}, - - { ER_ILLEGAL_AXIS_NAME, - "nome do eixo inv\u00E1lido: {0}"}, - - { ER_UNKNOWN_NODETYPE, - "Tipo de n\u00F3 desconhecido: {0}"}, - - { ER_PATTERN_LITERAL_NEEDS_BE_QUOTED, - "A literal padr\u00E3o ({0}) precisa estar entre aspas!"}, - - { ER_COULDNOT_BE_FORMATTED_TO_NUMBER, - "n\u00E3o foi poss\u00EDvel formatar {0} como um n\u00FAmero!"}, - - { ER_COULDNOT_CREATE_XMLPROCESSORLIAISON, - "N\u00E3o foi poss\u00EDvel criar a Liga\u00E7\u00E3o TransformerFactory XML: {0}"}, - - { ER_DIDNOT_FIND_XPATH_SELECT_EXP, - "Erro! N\u00E3o foi poss\u00EDvel localizar a express\u00E3o de sele\u00E7\u00E3o xpath (-select)."}, - - { ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, - "ERRO! N\u00E3o foi poss\u00EDvel localizar ENDOP ap\u00F3s OP_LOCATIONPATH"}, - - { ER_ERROR_OCCURED, - "Ocorreu um erro!"}, - - { ER_ILLEGAL_VARIABLE_REFERENCE, - "VariableReference fornecida para a vari\u00E1vel fora do contexto ou sem defini\u00E7\u00E3o! Nome = {0}"}, - - { ER_AXES_NOT_ALLOWED, - "Somente eixos filho:: e atributo:: s\u00E3o permitidos nos padr\u00F5es de correspond\u00EAncia! Eixos incorretos = {0}"}, - - { ER_KEY_HAS_TOO_MANY_ARGS, - "key() tem um n\u00FAmero incorreto de argumentos."}, - - { ER_COUNT_TAKES_1_ARG, - "A fun\u00E7\u00E3o count deve ter um argumento!"}, - - { ER_COULDNOT_FIND_FUNCTION, - "N\u00E3o foi poss\u00EDvel localizar a fun\u00E7\u00E3o: {0}"}, - - { ER_UNSUPPORTED_ENCODING, - "Codifica\u00E7\u00E3o n\u00E3o suportada: {0}"}, - - { ER_PROBLEM_IN_DTM_NEXTSIBLING, - "Ocorreu um problema no DTM em getNextSibling... tentando recuperar"}, - - { ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL, - "Erro do programador: EmptyNodeList n\u00E3o pode ser gravado."}, - - { ER_SETDOMFACTORY_NOT_SUPPORTED, - "setDOMFactory n\u00E3o suportado por XPathContext!"}, - - { ER_PREFIX_MUST_RESOLVE, - "O prefixo deve ser resolvido para um namespace: {0}"}, - - { ER_PARSE_NOT_SUPPORTED, - "parsing (InputSource source) n\u00E3o suportado em XPathContext! N\u00E3o \u00E9 poss\u00EDvel abrir {0}"}, - - { ER_SAX_API_NOT_HANDLED, - "Caracteres SAX API(char ch[]... n\u00E3o tratados por DTM!"}, - - { ER_IGNORABLE_WHITESPACE_NOT_HANDLED, - "ignorableWhitespace(char ch[]... n\u00E3o tratado pelo DTM!"}, - - { ER_DTM_CANNOT_HANDLE_NODES, - "DTMLiaison n\u00E3o pode tratar n\u00F3s do tipo {0}"}, - - { ER_XERCES_CANNOT_HANDLE_NODES, - "DOM2Helper n\u00E3o pode tratar n\u00F3s do tipo {0}"}, - - { ER_XERCES_PARSE_ERROR_DETAILS, - "Erro de DOM2Helper.parse: SystemID - {0} linha - {1}"}, - - { ER_XERCES_PARSE_ERROR, - "Erro de DOM2Helper.parse"}, - - { ER_INVALID_UTF16_SURROGATE, - "Foi detectado um substituto de UTF-16 inv\u00E1lido: {0} ?"}, - - { ER_OIERROR, - "Erro de E/S"}, - - { ER_CANNOT_CREATE_URL, - "N\u00E3o \u00E9 poss\u00EDvel criar o url para: {0}"}, - - { ER_XPATH_READOBJECT, - "No XPath.readObject: {0}"}, - - { ER_FUNCTION_TOKEN_NOT_FOUND, - "token da fun\u00E7\u00E3o n\u00E3o encontrado."}, - - { ER_CANNOT_DEAL_XPATH_TYPE, - "N\u00E3o \u00E9 poss\u00EDvel lidar com o tipo de XPath: {0}"}, - - { ER_NODESET_NOT_MUTABLE, - "Este NodeSet n\u00E3o \u00E9 mut\u00E1vel"}, - - { ER_NODESETDTM_NOT_MUTABLE, - "Este NodeSetDTM n\u00E3o \u00E9 mut\u00E1vel"}, - - { ER_VAR_NOT_RESOLVABLE, - "Vari\u00E1vel n\u00E3o resolv\u00EDvel: {0}"}, - - { ER_NULL_ERROR_HANDLER, - "Handler de erro nulo"}, - - { ER_PROG_ASSERT_UNKNOWN_OPCODE, - "Asser\u00E7\u00E3o do programador: opcode desconhecido: {0}"}, - - { ER_ZERO_OR_ONE, - "0 ou 1"}, - - { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "rtf() n\u00E3o suportado por XRTreeFragSelectWrapper"}, - - { ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "asNodeIterator() n\u00E3o suportado por XRTreeFragSelectWrapper"}, - - /** detach() not supported by XRTreeFragSelectWrapper */ - { ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "detach() n\u00E3o suportado por XRTreeFragSelectWrapper"}, - - /** num() not supported by XRTreeFragSelectWrapper */ - { ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "num() n\u00E3o suportado por XRTreeFragSelectWrapper"}, - - /** xstr() not supported by XRTreeFragSelectWrapper */ - { ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "xstr() n\u00E3o suportado por XRTreeFragSelectWrapper"}, - - /** str() not supported by XRTreeFragSelectWrapper */ - { ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "str() n\u00E3o suportado por XRTreeFragSelectWrapper"}, - - { ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS, - "fsb() n\u00E3o suportado para XStringForChars"}, - - { ER_COULD_NOT_FIND_VAR, - "N\u00E3o foi poss\u00EDvel localizar a vari\u00E1vel com o nome {0}"}, - - { ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING, - "XStringForChars n\u00E3o pode ter uma string para um argumento"}, - - { ER_FASTSTRINGBUFFER_CANNOT_BE_NULL, - "O argumento FastStringBuffer n\u00E3o pode ser nulo"}, - - { ER_TWO_OR_THREE, - "2 ou 3"}, - - { ER_VARIABLE_ACCESSED_BEFORE_BIND, - "Vari\u00E1vel acessada antes de ser associada!"}, - - { ER_FSB_CANNOT_TAKE_STRING, - "XStringForFSB n\u00E3o pode obter uma string para um argumento!"}, - - { ER_SETTING_WALKER_ROOT_TO_NULL, - "\n !!!! Erro! Definindo a raiz de um walker como nula!!!"}, - - { ER_NODESETDTM_CANNOT_ITERATE, - "Este NodeSetDTM n\u00E3o pode fazer itera\u00E7\u00F5es para um n\u00F3 anterior!"}, - - { ER_NODESET_CANNOT_ITERATE, - "Este NodeSet n\u00E3o pode fazer itera\u00E7\u00F5es para um n\u00F3 anterior!"}, - - { ER_NODESETDTM_CANNOT_INDEX, - "Este NodeSetDTM n\u00E3o pode executar as fun\u00E7\u00F5es de indexa\u00E7\u00E3o ou de contagem!"}, - - { ER_NODESET_CANNOT_INDEX, - "Este NodeSet n\u00E3o pode executar as fun\u00E7\u00F5es de indexa\u00E7\u00E3o ou de contagem!"}, - - { ER_CANNOT_CALL_SETSHOULDCACHENODE, - "N\u00E3o \u00E9 poss\u00EDvel chamar setShouldCacheNodes depois de nextNode ter sido chamado!"}, - - { ER_ONLY_ALLOWS, - "{0} s\u00F3 permite {1} argumentos"}, - - { ER_UNKNOWN_STEP, - "Asser\u00E7\u00E3o do programador em getNextStepPos: stepType desconhecido: {0}"}, - - //Note to translators: A relative location path is a form of XPath expression. - // The message indicates that such an expression was expected following the - // characters '/' or '//', but was not found. - { ER_EXPECTED_REL_LOC_PATH, - "Esperava-se um caminho de localiza\u00E7\u00E3o relativo, mas o seguinte token foi encontrado: '/' ou '//'."}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such an expression was expected,but - // the characters specified by the substitution text were encountered instead. - { ER_EXPECTED_LOC_PATH, - "Esperava-se um caminho de localiza\u00E7\u00E3o, mas o seguinte token foi encontrado: {0}"}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such a subexpression was expected, - // but no more characters were found in the expression. - { ER_EXPECTED_LOC_PATH_AT_END_EXPR, - "Esperava-se um caminho de localiza\u00E7\u00E3o, mas, em vez disso, o fim da express\u00E3o XPath foi encontrado."}, - - // Note to translators: A location step is part of an XPath expression. - // The message indicates that syntactically such an expression was expected - // following the specified characters. - { ER_EXPECTED_LOC_STEP, - "Esperava-se uma etapa de localiza\u00E7\u00E3o seguinte ao token '/' ou '//'."}, - - // Note to translators: A node test is part of an XPath expression that is - // used to test for particular kinds of nodes. In this case, a node test that - // consists of an NCName followed by a colon and an asterisk or that consists - // of a QName was expected, but was not found. - { ER_EXPECTED_NODE_TEST, - "Esperava-se um teste de n\u00F3 que corresponde a NCName:* ou QName."}, - - // Note to translators: A step pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but the specified character was found in the expression instead. - { ER_EXPECTED_STEP_PATTERN, - "Esperava-se um padr\u00E3o da etapa, mas '/' foi encontrado."}, - - // Note to translators: A relative path pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but was not found. - { ER_EXPECTED_REL_PATH_PATTERN, - "Esperava-se um padr\u00E3o de caminho relativo."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type boolean. - { ER_CANT_CONVERT_TO_BOOLEAN, - "O XPathResult da express\u00E3o de XPath ''{0}'' tem um XPathResultType de {1} que n\u00E3o pode ser convertido em um booliano."}, - - // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and - // FIRST_ORDERED_NODE_TYPE. - { ER_CANT_CONVERT_TO_SINGLENODE, - "O XPathResult da express\u00E3o de XPath ''{0}'' tem um XPathResultType de {1} que n\u00E3o pode ser convertido em um n\u00F3 simples. O m\u00E9todo getSingleNodeValue aplica-se somente aos tipos ANY_UNORDERED_NODE_TYPE e FIRST_ORDERED_NODE_TYPE."}, - - // Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and - // ORDERED_NODE_SNAPSHOT_TYPE. - { ER_CANT_GET_SNAPSHOT_LENGTH, - "O m\u00E9todo getSnapshotLength n\u00E3o pode ser chamado no XPathResult da express\u00E3o XPath ''{0}'' porque seu XPathResultType \u00E9 {1}. Este m\u00E9todo se aplica somente a tipos UNORDERED_NODE_SNAPSHOT_TYPE e ORDERED_NODE_SNAPSHOT_TYPE."}, - - { ER_NON_ITERATOR_TYPE, - "O m\u00E9todo iterateNext n\u00E3o pode ser chamado no XPathResult da express\u00E3o XPath ''{0}'' porque seu XPathResultType \u00E9 {1}. Este m\u00E9todo se aplica somente a tipos UNORDERED_NODE_ITERATOR_TYPE e ORDERED_NODE_ITERATOR_TYPE."}, - - // Note to translators: This message indicates that the document being operated - // upon changed, so the iterator object that was being used to traverse the - // document has now become invalid. - { ER_DOC_MUTATED, - "Documento alterado desde que o resultado foi devolvido. O iterador \u00E9 inv\u00E1lido."}, - - { ER_INVALID_XPATH_TYPE, - "Argumento de tipo XPath inv\u00E1lido: {0}"}, - - { ER_EMPTY_XPATH_RESULT, - "Objeto de resultado de XPath vazio"}, - - { ER_INCOMPATIBLE_TYPES, - "O XPathResult da express\u00E3o XPath ''{0}'' tem um XPathResultType {1} que n\u00E3o pode estar delimitado no XPathResultType especificado {2}."}, - - { ER_NULL_RESOLVER, - "N\u00E3o \u00E9 poss\u00EDvel resolver o prefixo com solucionador de prefixo nulo."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type string. - { ER_CANT_CONVERT_TO_STRING, - "O XPathResult da express\u00E3o XPath ''{0}'' tem um XPathResultType {1} que n\u00E3o pode ser convertido em string."}, - - // Note to translators: Do not translate snapshotItem, - // UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE. - { ER_NON_SNAPSHOT_TYPE, - "O m\u00E9todo snapshotItem n\u00E3o pode ser chamado no XPathResult da express\u00E3o XPath ''{0}'' porque seu XPathResultType \u00E9 {1}. Este m\u00E9todo se aplica somente a tipos UNORDERED_NODE_SNAPSHOT_TYPE e ORDERED_NODE_SNAPSHOT_TYPE."}, - - // Note to translators: XPathEvaluator is a Java interface name. An - // XPathEvaluator is created with respect to a particular XML document, and in - // this case the expression represented by this object was being evaluated with - // respect to a context node from a different document. - { ER_WRONG_DOCUMENT, - "O n\u00F3 de contexto n\u00E3o pertence ao documento que est\u00E1 vinculado a este XPathEvaluator."}, - - // Note to translators: The XPath expression cannot be evaluated with respect - // to this type of node. - { ER_WRONG_NODETYPE, - "O tipo do n\u00F3 de contexto n\u00E3o \u00E9 suportado."}, - - { ER_XPATH_ERROR, - "Erro desconhecido no XPath."}, - - { ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER, - "O XPathResult da express\u00E3o XPath ''{0}'' tem um XPathResultType {1} que n\u00E3o pode ser convertido em n\u00FAmero."}, - - //BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - /** Field ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED */ - - { ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED, - "Fun\u00E7\u00E3o de extens\u00E3o: ''{0}'' n\u00E3o pode ser chamado quando o recurso XMLConstants.FEATURE_SECURE_PROCESSING estiver definido como verdadeiro."}, - - /** Field ER_RESOLVE_VARIABLE_RETURNS_NULL */ - - { ER_RESOLVE_VARIABLE_RETURNS_NULL, - "resolveVariable da vari\u00E1vel {0} retornando nulo"}, - - /** Field ER_UNSUPPORTED_RETURN_TYPE */ - - { ER_UNSUPPORTED_RETURN_TYPE, - "Tipo de Retorno N\u00E3o Suportado : {0}"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "O Tipo de Origem e/ou Retorno n\u00E3o pode ser nulo"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "O Tipo de Origem e/ou Retorno n\u00E3o pode ser nulo"}, - - /** Field ER_ARG_CANNOT_BE_NULL */ - - { ER_ARG_CANNOT_BE_NULL, - "O argumento {0} n\u00E3o pode ser nulo"}, - - /** Field ER_OBJECT_MODEL_NULL */ - - { ER_OBJECT_MODEL_NULL, - "{0}#isObjectModelSupported( String objectModel ) n\u00E3o pode ser chamado com objectModel == null"}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_OBJECT_MODEL_EMPTY, - "{0}#isObjectModelSupported( String objectModel ) n\u00E3o pode ser chamado com objectModel == \"\""}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_FEATURE_NAME_NULL, - "Tentativa de definir um recurso com um nome nulo: {0}#setFeature( null, {1})"}, - - /** Field ER_FEATURE_UNKNOWN */ - - { ER_FEATURE_UNKNOWN, - "Tentativa de definir o recurso desconhecido \"{0}\":{1}#setFeature({0},{2})"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_NULL_FEATURE, - "Tentativa de obter um recurso com um nome nulo: {0}#getFeature(null)"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_UNKNOWN_FEATURE, - "Tentativa de obter o recurso desconhecido \"{0}\":{1}#getFeature({0})"}, - - {ER_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: N\u00E3o \u00E9 poss\u00EDvel definir o recurso como falso quando o gerenciador de seguran\u00E7a est\u00E1 presente: {1}#setFeature({0},{2})"}, - - /** Field ER_NULL_XPATH_FUNCTION_RESOLVER */ - - { ER_NULL_XPATH_FUNCTION_RESOLVER, - "Tentativa de definir um XPathFunctionResolver nulo:{0}#setXPathFunctionResolver(null)"}, - - /** Field ER_NULL_XPATH_VARIABLE_RESOLVER */ - - { ER_NULL_XPATH_VARIABLE_RESOLVER, - "Tentativa de definir um XPathVariableResolver nulo:{0}#setXPathVariableResolver(null)"}, - - //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - // Warnings... - - { WG_LOCALE_NAME_NOT_HANDLED, - "nome das configura\u00E7\u00F5es regionais na fun\u00E7\u00E3o format-number ainda n\u00E3o tratado!"}, - - { WG_PROPERTY_NOT_SUPPORTED, - "Propriedade XSL n\u00E3o suportada: {0}"}, - - { WG_DONT_DO_ANYTHING_WITH_NS, - "Nenhuma a\u00E7\u00E3o a ser tomada com o namespace {0} na propriedade: {1}"}, - - { WG_QUO_NO_LONGER_DEFINED, - "Sintaxe antiga: quo(...) n\u00E3o est\u00E1 mais definido no XPath."}, - - { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST, - "XPath requer um objeto derivado para implementar nodeTest!"}, - - { WG_FUNCTION_TOKEN_NOT_FOUND, - "token da fun\u00E7\u00E3o n\u00E3o encontrado."}, - - { WG_COULDNOT_FIND_FUNCTION, - "N\u00E3o foi poss\u00EDvel localizar a fun\u00E7\u00E3o: {0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "N\u00E3o \u00E9 poss\u00EDvel criar o URL de: {0}"}, - - { WG_EXPAND_ENTITIES_NOT_SUPPORTED, - "Op\u00E7\u00E3o -E n\u00E3o suportada para o parser DTM"}, - - { WG_ILLEGAL_VARIABLE_REFERENCE, - "VariableReference fornecida para a vari\u00E1vel fora do contexto ou sem defini\u00E7\u00E3o! Nome = {0}"}, - - { WG_UNSUPPORTED_ENCODING, - "Codifica\u00E7\u00E3o n\u00E3o suportada: {0}"}, - - - - // Other miscellaneous text used inside the code... - { "ui_language", "pt-BR"}, - { "help_language", "pt-BR"}, - { "language", "pt-BR"}, - { "BAD_CODE", "O par\u00E2metro para createMessage estava fora dos limites"}, - { "FORMAT_FAILED", "Exce\u00E7\u00E3o gerada durante a chamada messageFormat"}, - { "version", ">>>>>>> Vers\u00E3o do Xalan "}, - { "version2", "<<<<<<<"}, - { "yes", "sim"}, - { "line", "N\u00B0 da Linha"}, - { "column", "N\u00B0 da Coluna"}, - { "xsldone", "XSLProcessor: conclu\u00EDdo"}, - { "xpath_option", "op\u00E7\u00F5es de xpath: "}, - { "optionIN", " [-in inputXMLURL]"}, - { "optionSelect", " [-select xpath expression]"}, - { "optionMatch", " [-match match pattern (para diagn\u00F3sticos correspondentes)]"}, - { "optionAnyExpr", "Ou apenas uma express\u00E3o xpath far\u00E1 uma elimina\u00E7\u00E3o de diagn\u00F3sticos"}, - { "noParsermsg1", "Processo XSL malsucedido."}, - { "noParsermsg2", "** N\u00E3o foi poss\u00EDvel localizar o parser **"}, - { "noParsermsg3", "Verifique seu classpath."}, - { "noParsermsg4", "Se voc\u00EA n\u00E3o tiver um Parser XML da IBM para Java, poder\u00E1 fazer download dele em"}, - { "noParsermsg5", "AlphaWorks da IBM: http://www.alphaworks.ibm.com/formula/xml"}, - { "gtone", ">1" }, - { "zero", "0" }, - { "one", "1" }, - { "two" , "2" }, - { "three", "3" } - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - - - // ================= INFRASTRUCTURE ====================== - - /** Field BAD_CODE */ - public static final String BAD_CODE = "BAD_CODE"; - - /** Field FORMAT_FAILED */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - /** Field ERROR_RESOURCES */ - public static final String ERROR_RESOURCES = - "com.sun.org.apache.xpath.internal.res.XPATHErrorResources"; - - /** Field ERROR_STRING */ - public static final String ERROR_STRING = "#error"; - - /** Field ERROR_HEADER */ - public static final String ERROR_HEADER = "Error: "; - - /** Field WARNING_HEADER */ - public static final String WARNING_HEADER = "Warning: "; - - /** Field XSL_HEADER */ - public static final String XSL_HEADER = "XSL "; - - /** Field XML_HEADER */ - public static final String XML_HEADER = "XML "; - - /** Field QUERY_HEADER */ - public static final String QUERY_HEADER = "PATTERN "; - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java deleted file mode 100644 index c0acf167b9d..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java +++ /dev/null @@ -1,938 +0,0 @@ -/* - * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xpath.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a Static string constant for the - * Key and update the contents array with Key, Value pair - * Also you need to update the count of messages(MAX_CODE)or - * the count of warnings(MAX_WARNING) [ Information purpose only] - * @xsl.usage advanced - * @LastModified: Nov 2024 - */ -public class XPATHErrorResources_sv extends ListResourceBundle -{ - -/* - * General notes to translators: - * - * This file contains error and warning messages related to XPath Error - * Handling. - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 8) The context node is the node in the document with respect to which an - * XPath expression is being evaluated. - * - * 9) An iterator is an object that traverses nodes in the tree, one at a time. - * - * 10) NCName is an XML term used to describe a name that does not contain a - * colon (a "no-colon name"). - * - * 11) QName is an XML term meaning "qualified name". - */ - - /* - * static variables - */ - public static final String ERROR0000 = "ERROR0000"; - public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH = - "ER_CURRENT_NOT_ALLOWED_IN_MATCH"; - public static final String ER_CURRENT_TAKES_NO_ARGS = - "ER_CURRENT_TAKES_NO_ARGS"; - public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED"; - public static final String ER_CONTEXT_CAN_NOT_BE_NULL = "ER_CONTEXT_CAN_NOT_BE_NULL"; - public static final String ER_CONTEXT_HAS_NO_OWNERDOC = - "ER_CONTEXT_HAS_NO_OWNERDOC"; - public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS = - "ER_LOCALNAME_HAS_TOO_MANY_ARGS"; - public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS = - "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS"; - public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS = - "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS"; - public static final String ER_NUMBER_HAS_TOO_MANY_ARGS = - "ER_NUMBER_HAS_TOO_MANY_ARGS"; - public static final String ER_NAME_HAS_TOO_MANY_ARGS = - "ER_NAME_HAS_TOO_MANY_ARGS"; - public static final String ER_STRING_HAS_TOO_MANY_ARGS = - "ER_STRING_HAS_TOO_MANY_ARGS"; - public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS = - "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS"; - public static final String ER_TRANSLATE_TAKES_3_ARGS = - "ER_TRANSLATE_TAKES_3_ARGS"; - public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG = - "ER_UNPARSEDENTITYURI_TAKES_1_ARG"; - public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED = - "ER_NAMESPACEAXIS_NOT_IMPLEMENTED"; - public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS"; - public static final String ER_UNKNOWN_MATCH_OPERATION = - "ER_UNKNOWN_MATCH_OPERATION"; - public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH"; - public static final String ER_CANT_CONVERT_TO_NUMBER = - "ER_CANT_CONVERT_TO_NUMBER"; - public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER = - "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER"; - public static final String ER_CANT_CONVERT_TO_NODELIST = - "ER_CANT_CONVERT_TO_NODELIST"; - public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST = - "ER_CANT_CONVERT_TO_MUTABLENODELIST"; - public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE"; - public static final String ER_EXPECTED_MATCH_PATTERN = - "ER_EXPECTED_MATCH_PATTERN"; - public static final String ER_COULDNOT_GET_VAR_NAMED = - "ER_COULDNOT_GET_VAR_NAMED"; - public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE"; - public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS"; - public static final String ER_EXPECTED_DOUBLE_QUOTE = - "ER_EXPECTED_DOUBLE_QUOTE"; - public static final String ER_EXPECTED_SINGLE_QUOTE = - "ER_EXPECTED_SINGLE_QUOTE"; - public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION"; - public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND"; - public static final String ER_INCORRECT_PROGRAMMER_ASSERTION = - "ER_INCORRECT_PROGRAMMER_ASSERTION"; - public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL = - "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL"; - public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG = - "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG"; - public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG = - "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG"; - public static final String ER_PREDICATE_ILLEGAL_SYNTAX = - "ER_PREDICATE_ILLEGAL_SYNTAX"; - public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME"; - public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE"; - public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = - "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED"; - public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER = - "ER_COULDNOT_BE_FORMATTED_TO_NUMBER"; - public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON = - "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON"; - public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP = - "ER_DIDNOT_FIND_XPATH_SELECT_EXP"; - public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH = - "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH"; - public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED"; - public static final String ER_ILLEGAL_VARIABLE_REFERENCE = - "ER_ILLEGAL_VARIABLE_REFERENCE"; - public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED"; - public static final String ER_KEY_HAS_TOO_MANY_ARGS = - "ER_KEY_HAS_TOO_MANY_ARGS"; - public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG"; - public static final String ER_COULDNOT_FIND_FUNCTION = - "ER_COULDNOT_FIND_FUNCTION"; - public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING"; - public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING = - "ER_PROBLEM_IN_DTM_NEXTSIBLING"; - public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL = - "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL"; - public static final String ER_SETDOMFACTORY_NOT_SUPPORTED = - "ER_SETDOMFACTORY_NOT_SUPPORTED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED"; - public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED"; -public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = - "ER_IGNORABLE_WHITESPACE_NOT_HANDLED"; - public static final String ER_DTM_CANNOT_HANDLE_NODES = - "ER_DTM_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_CANNOT_HANDLE_NODES = - "ER_XERCES_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_PARSE_ERROR_DETAILS = - "ER_XERCES_PARSE_ERROR_DETAILS"; - public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL"; - public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT"; - public static final String ER_FUNCTION_TOKEN_NOT_FOUND = - "ER_FUNCTION_TOKEN_NOT_FOUND"; - public static final String ER_CANNOT_DEAL_XPATH_TYPE = - "ER_CANNOT_DEAL_XPATH_TYPE"; - public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE"; - public static final String ER_NODESETDTM_NOT_MUTABLE = - "ER_NODESETDTM_NOT_MUTABLE"; - /** Variable not resolvable: */ - public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE"; - /** Null error handler */ - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - /** Programmer's assertion: unknown opcode */ - public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE = - "ER_PROG_ASSERT_UNKNOWN_OPCODE"; - /** 0 or 1 */ - public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE"; - /** rtf() not supported by XRTreeFragSelectWrapper */ - public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** asNodeIterator() not supported by XRTreeFragSelectWrapper */ - public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** fsb() not supported for XStringForChars */ - public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS = - "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS"; - /** Could not find variable with the name of */ - public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR"; - /** XStringForChars can not take a string for an argument */ - public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING = - "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING"; - /** The FastStringBuffer argument can not be null */ - public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL = - "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL"; - /** 2 or 3 */ - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - /** Variable accessed before it is bound! */ - public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND = - "ER_VARIABLE_ACCESSED_BEFORE_BIND"; - /** XStringForFSB can not take a string for an argument! */ - public static final String ER_FSB_CANNOT_TAKE_STRING = - "ER_FSB_CANNOT_TAKE_STRING"; - /** Error! Setting the root of a walker to null! */ - public static final String ER_SETTING_WALKER_ROOT_TO_NULL = - "ER_SETTING_WALKER_ROOT_TO_NULL"; - /** This NodeSetDTM can not iterate to a previous node! */ - public static final String ER_NODESETDTM_CANNOT_ITERATE = - "ER_NODESETDTM_CANNOT_ITERATE"; - /** This NodeSet can not iterate to a previous node! */ - public static final String ER_NODESET_CANNOT_ITERATE = - "ER_NODESET_CANNOT_ITERATE"; - /** This NodeSetDTM can not do indexing or counting functions! */ - public static final String ER_NODESETDTM_CANNOT_INDEX = - "ER_NODESETDTM_CANNOT_INDEX"; - /** This NodeSet can not do indexing or counting functions! */ - public static final String ER_NODESET_CANNOT_INDEX = - "ER_NODESET_CANNOT_INDEX"; - /** Can not call setShouldCacheNodes after nextNode has been called! */ - public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE = - "ER_CANNOT_CALL_SETSHOULDCACHENODE"; - /** {0} only allows {1} arguments */ - public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS"; - /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */ - public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP"; - /** Problem with RelativeLocationPath */ - public static final String ER_EXPECTED_REL_LOC_PATH = - "ER_EXPECTED_REL_LOC_PATH"; - /** Problem with LocationPath */ - public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH"; - public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR = - "ER_EXPECTED_LOC_PATH_AT_END_EXPR"; - /** Problem with Step */ - public static final String ER_EXPECTED_LOC_STEP = "ER_EXPECTED_LOC_STEP"; - /** Problem with NodeTest */ - public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST"; - /** Expected step pattern */ - public static final String ER_EXPECTED_STEP_PATTERN = - "ER_EXPECTED_STEP_PATTERN"; - /** Expected relative path pattern */ - public static final String ER_EXPECTED_REL_PATH_PATTERN = - "ER_EXPECTED_REL_PATH_PATTERN"; - /** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */ - public static final String ER_CANT_CONVERT_TO_BOOLEAN = - "ER_CANT_CONVERT_TO_BOOLEAN"; - /** Field ER_CANT_CONVERT_TO_SINGLENODE */ - public static final String ER_CANT_CONVERT_TO_SINGLENODE = - "ER_CANT_CONVERT_TO_SINGLENODE"; - /** Field ER_CANT_GET_SNAPSHOT_LENGTH */ - public static final String ER_CANT_GET_SNAPSHOT_LENGTH = - "ER_CANT_GET_SNAPSHOT_LENGTH"; - /** Field ER_NON_ITERATOR_TYPE */ - public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE"; - /** Field ER_DOC_MUTATED */ - public static final String ER_DOC_MUTATED = "ER_DOC_MUTATED"; - public static final String ER_INVALID_XPATH_TYPE = "ER_INVALID_XPATH_TYPE"; - public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT"; - public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES"; - public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER"; - public static final String ER_CANT_CONVERT_TO_STRING = - "ER_CANT_CONVERT_TO_STRING"; - public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE"; - public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT"; - /* Note to translators: The XPath expression cannot be evaluated with respect - * to this type of node. - */ - /** Field ER_WRONG_NODETYPE */ - public static final String ER_WRONG_NODETYPE = "ER_WRONG_NODETYPE"; - public static final String ER_XPATH_ERROR = "ER_XPATH_ERROR"; - - //BEGIN: Keys needed for exception messages of JAXP 1.3 XPath API implementation - public static final String ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED = "ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED"; - public static final String ER_RESOLVE_VARIABLE_RETURNS_NULL = "ER_RESOLVE_VARIABLE_RETURNS_NULL"; - public static final String ER_UNSUPPORTED_RETURN_TYPE = "ER_UNSUPPORTED_RETURN_TYPE"; - public static final String ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL = "ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL"; - public static final String ER_ARG_CANNOT_BE_NULL = "ER_ARG_CANNOT_BE_NULL"; - - public static final String ER_OBJECT_MODEL_NULL = "ER_OBJECT_MODEL_NULL"; - public static final String ER_OBJECT_MODEL_EMPTY = "ER_OBJECT_MODEL_EMPTY"; - public static final String ER_FEATURE_NAME_NULL = "ER_FEATURE_NAME_NULL"; - public static final String ER_FEATURE_UNKNOWN = "ER_FEATURE_UNKNOWN"; - public static final String ER_GETTING_NULL_FEATURE = "ER_GETTING_NULL_FEATURE"; - public static final String ER_GETTING_UNKNOWN_FEATURE = "ER_GETTING_UNKNOWN_FEATURE"; - public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE"; - public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER"; - public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER"; - //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation - - public static final String WG_LOCALE_NAME_NOT_HANDLED = - "WG_LOCALE_NAME_NOT_HANDLED"; - public static final String WG_PROPERTY_NOT_SUPPORTED = - "WG_PROPERTY_NOT_SUPPORTED"; - public static final String WG_DONT_DO_ANYTHING_WITH_NS = - "WG_DONT_DO_ANYTHING_WITH_NS"; - public static final String WG_QUO_NO_LONGER_DEFINED = - "WG_QUO_NO_LONGER_DEFINED"; - public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = - "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST"; - public static final String WG_FUNCTION_TOKEN_NOT_FOUND = - "WG_FUNCTION_TOKEN_NOT_FOUND"; - public static final String WG_COULDNOT_FIND_FUNCTION = - "WG_COULDNOT_FIND_FUNCTION"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED = - "WG_EXPAND_ENTITIES_NOT_SUPPORTED"; - public static final String WG_ILLEGAL_VARIABLE_REFERENCE = - "WG_ILLEGAL_VARIABLE_REFERENCE"; - public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING"; - - /** detach() not supported by XRTreeFragSelectWrapper */ - public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** num() not supported by XRTreeFragSelectWrapper */ - public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** xstr() not supported by XRTreeFragSelectWrapper */ - public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** str() not supported by XRTreeFragSelectWrapper */ - public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - - // Error messages... - - private static final Object[][] _contents = new Object[][]{ - - { "ERROR0000" , "{0}" }, - - { ER_CURRENT_NOT_ALLOWED_IN_MATCH, "Funktionen current() \u00E4r inte till\u00E5ten i ett matchningsm\u00F6nster!" }, - - { ER_CURRENT_TAKES_NO_ARGS, "Funktionen current() tar inte emot argument!" }, - - { ER_DOCUMENT_REPLACED, - "Implementeringen av funktionen document() har inte ersatts av com.sun.org.apache.xalan.internal.xslt.FuncDocument!"}, - - { ER_CONTEXT_CAN_NOT_BE_NULL, - "Kontexten kan inte vara null n\u00E4r \u00E5tg\u00E4rden \u00E4r kontextberoende."}, - - { ER_CONTEXT_HAS_NO_OWNERDOC, - "context har inget \u00E4gardokument!"}, - - { ER_LOCALNAME_HAS_TOO_MANY_ARGS, - "local-name() har f\u00F6r m\u00E5nga argument."}, - - { ER_NAMESPACEURI_HAS_TOO_MANY_ARGS, - "namespace-uri() har f\u00F6r m\u00E5nga argument."}, - - { ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS, - "normalize-space() har f\u00F6r m\u00E5nga argument."}, - - { ER_NUMBER_HAS_TOO_MANY_ARGS, - "number() har f\u00F6r m\u00E5nga argument."}, - - { ER_NAME_HAS_TOO_MANY_ARGS, - "name() har f\u00F6r m\u00E5nga argument."}, - - { ER_STRING_HAS_TOO_MANY_ARGS, - "string() har f\u00F6r m\u00E5nga argument."}, - - { ER_STRINGLENGTH_HAS_TOO_MANY_ARGS, - "string-length() har f\u00F6r m\u00E5nga argument."}, - - { ER_TRANSLATE_TAKES_3_ARGS, - "Funktionen translate() tar emot tre argument!"}, - - { ER_UNPARSEDENTITYURI_TAKES_1_ARG, - "Funktionen unparsed-entity-uri borde ta emot ett argument!"}, - - { ER_NAMESPACEAXIS_NOT_IMPLEMENTED, - "namnrymdsaxeln \u00E4r inte implementerad \u00E4n!"}, - - { ER_UNKNOWN_AXIS, - "ok\u00E4nd axel: {0}"}, - - { ER_UNKNOWN_MATCH_OPERATION, - "ok\u00E4nd matchnings\u00E5tg\u00E4rd!"}, - - { ER_INCORRECT_ARG_LENGTH, - "Felaktig argumentl\u00E4ngd p\u00E5 nodtest f\u00F6r processing-instruction()!"}, - - { ER_CANT_CONVERT_TO_NUMBER, - "Kan inte konvertera {0} till ett tal"}, - - { ER_CANT_CONVERT_TO_NODELIST, - "Kan inte konvertera {0} till NodeList!"}, - - { ER_CANT_CONVERT_TO_MUTABLENODELIST, - "Kan inte konvertera {0} till NodeSetDTM!"}, - - { ER_CANT_CONVERT_TO_TYPE, - "Kan inte konvertera {0} till type#{1}"}, - - { ER_EXPECTED_MATCH_PATTERN, - "F\u00F6rv\u00E4ntat matchningsm\u00F6nster i getMatchScore!"}, - - { ER_COULDNOT_GET_VAR_NAMED, - "Kunde inte h\u00E4mta variabeln {0}"}, - - { ER_UNKNOWN_OPCODE, - "FEL! Ok\u00E4nd op-kod: {0}"}, - - { ER_EXTRA_ILLEGAL_TOKENS, - "Extra otill\u00E5tna tecken: {0}"}, - - { ER_EXPECTED_DOUBLE_QUOTE, - "Litteral omges av fel sorts citattecken... dubbla citattecken f\u00F6rv\u00E4ntade!"}, - - { ER_EXPECTED_SINGLE_QUOTE, - "Litteral omges av fel sorts citattecken... enkla citattecken f\u00F6rv\u00E4ntade!"}, - - { ER_EMPTY_EXPRESSION, - "Tomt uttryck!"}, - - { ER_EXPECTED_BUT_FOUND, - "F\u00F6rv\u00E4ntade {0}, men hittade: {1}"}, - - { ER_INCORRECT_PROGRAMMER_ASSERTION, - "Programmerarens utsaga \u00E4r inte korrekt! - {0}"}, - - { ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL, - "Argumentet boolean(...) \u00E4r inte l\u00E4ngre valfritt med 19990709 XPath-utkast."}, - - { ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG, - "Hittade ',' utan f\u00F6reg\u00E5ende argument!"}, - - { ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG, - "Hittade ',' utan efterf\u00F6ljande argument!"}, - - { ER_PREDICATE_ILLEGAL_SYNTAX, - "'..[predikat]' eller '.[predikat]' \u00E4r otill\u00E5ten syntax. Anv\u00E4nd 'self::node()[predikat]' ist\u00E4llet."}, - - { ER_ILLEGAL_AXIS_NAME, - "otill\u00E5tet axelnamn: {0}"}, - - { ER_UNKNOWN_NODETYPE, - "Ok\u00E4nd nodtyp: {0}"}, - - { ER_PATTERN_LITERAL_NEEDS_BE_QUOTED, - "M\u00F6nsterlitteralen ({0}) m\u00E5ste omges av citattecken!"}, - - { ER_COULDNOT_BE_FORMATTED_TO_NUMBER, - "{0} kunde inte formateras till ett tal!"}, - - { ER_COULDNOT_CREATE_XMLPROCESSORLIAISON, - "Kunde inte skapa XML TransformerFactory Liaison: {0}"}, - - { ER_DIDNOT_FIND_XPATH_SELECT_EXP, - "Fel! Hittade inte xpath select-uttryck (-select)."}, - - { ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, - "FEL! Hittade inte ENDOP efter OP_LOCATIONPATH"}, - - { ER_ERROR_OCCURED, - "Ett fel har intr\u00E4ffat!"}, - - { ER_ILLEGAL_VARIABLE_REFERENCE, - "VariableReference angiven f\u00F6r variabel som \u00E4r utanf\u00F6r kontext eller som saknar definition! Namn = {0}"}, - - { ER_AXES_NOT_ALLOWED, - "Endast underordnade:: och attribut::-axlar \u00E4r till\u00E5tna i matchningsm\u00F6nster! Regelvidriga axlar = {0}"}, - - { ER_KEY_HAS_TOO_MANY_ARGS, - "key() har felaktigt antal argument."}, - - { ER_COUNT_TAKES_1_ARG, - "Funktionen count borde ta emot ett argument!"}, - - { ER_COULDNOT_FIND_FUNCTION, - "Hittade inte funktionen: {0}"}, - - { ER_UNSUPPORTED_ENCODING, - "Kodning utan st\u00F6d: {0}"}, - - { ER_PROBLEM_IN_DTM_NEXTSIBLING, - "Problem intr\u00E4ffade i DTM i getNextSibling... f\u00F6rs\u00F6ker \u00E5terskapa"}, - - { ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL, - "Programmerarfel: kan inte skriva till EmptyNodeList."}, - - { ER_SETDOMFACTORY_NOT_SUPPORTED, - "setDOMFactory st\u00F6ds inte i XPathContext!"}, - - { ER_PREFIX_MUST_RESOLVE, - "Prefix m\u00E5ste matchas till en namnrymd: {0}"}, - - { ER_PARSE_NOT_SUPPORTED, - "tolkning (InputSource-k\u00E4lla) st\u00F6ds inte i XPathContext! Kan inte \u00F6ppna {0}"}, - - { ER_SAX_API_NOT_HANDLED, - "SAX API-tecken(char ch[]... hanteras inte av DTM!"}, - - { ER_IGNORABLE_WHITESPACE_NOT_HANDLED, - "ignorableWhitespace(char ch[]... hanteras inte av DTM!"}, - - { ER_DTM_CANNOT_HANDLE_NODES, - "DTMLiaison kan inte hantera noder av typ {0}"}, - - { ER_XERCES_CANNOT_HANDLE_NODES, - "DOM2Helper kan inte hantera noder av typ {0}"}, - - { ER_XERCES_PARSE_ERROR_DETAILS, - "Fel i DOM2Helper.parse: SystemID - {0} rad - {1}"}, - - { ER_XERCES_PARSE_ERROR, - "Fel i DOM2Helper.parse"}, - - { ER_INVALID_UTF16_SURROGATE, - "Ogiltigt UTF-16-surrogat uppt\u00E4ckt: {0} ?"}, - - { ER_OIERROR, - "IO-fel"}, - - { ER_CANNOT_CREATE_URL, - "Kan inte skapa URL f\u00F6r: {0}"}, - - { ER_XPATH_READOBJECT, - "I XPath.readObject: {0}"}, - - { ER_FUNCTION_TOKEN_NOT_FOUND, - "funktionstecken hittades inte."}, - - { ER_CANNOT_DEAL_XPATH_TYPE, - "Kan inte hantera XPath-typ: {0}"}, - - { ER_NODESET_NOT_MUTABLE, - "Detta NodeSet \u00E4r of\u00F6r\u00E4nderligt"}, - - { ER_NODESETDTM_NOT_MUTABLE, - "Detta NodeSetDTM \u00E4r of\u00F6r\u00E4nderligt"}, - - { ER_VAR_NOT_RESOLVABLE, - "Variabeln kan inte matchas: {0}"}, - - { ER_NULL_ERROR_HANDLER, - "Felhanterare med v\u00E4rde null"}, - - { ER_PROG_ASSERT_UNKNOWN_OPCODE, - "Programmerarens utsaga: ok\u00E4nd op-kod: {0}"}, - - { ER_ZERO_OR_ONE, - "0 eller 1"}, - - { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "rtf() st\u00F6ds inte av XRTreeFragSelectWrapper"}, - - { ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "asNodeIterator() st\u00F6ds inte av XRTreeFragSelectWrapper"}, - - /** detach() not supported by XRTreeFragSelectWrapper */ - { ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "detach() st\u00F6ds inte av XRTreeFragSelectWrapper"}, - - /** num() not supported by XRTreeFragSelectWrapper */ - { ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "num() st\u00F6ds inte av XRTreeFragSelectWrapper"}, - - /** xstr() not supported by XRTreeFragSelectWrapper */ - { ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "xstr() st\u00F6ds inte av XRTreeFragSelectWrapper"}, - - /** str() not supported by XRTreeFragSelectWrapper */ - { ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "str() st\u00F6ds inte av XRTreeFragSelectWrapper"}, - - { ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS, - "fsb() st\u00F6ds inte f\u00F6r XStringForChars"}, - - { ER_COULD_NOT_FIND_VAR, - "Hittade inte variabel med namnet {0}"}, - - { ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING, - "XStringForChars kan inte ta emot en str\u00E4ng f\u00F6r argument"}, - - { ER_FASTSTRINGBUFFER_CANNOT_BE_NULL, - "FastStringBuffer-argumentet f\u00E5r inte vara null"}, - - { ER_TWO_OR_THREE, - "2 eller 3"}, - - { ER_VARIABLE_ACCESSED_BEFORE_BIND, - "\u00C5tkomst till variabel innan den \u00E4r bunden!"}, - - { ER_FSB_CANNOT_TAKE_STRING, - "XStringForFSB kan inte ta emot en str\u00E4ng f\u00F6r argument!"}, - - { ER_SETTING_WALKER_ROOT_TO_NULL, - "\n !!!! Fel! Anger roten f\u00F6r en ''walker'' som null!!!"}, - - { ER_NODESETDTM_CANNOT_ITERATE, - "Detta NodeSetDTM kan inte iterera till en tidigare nod!"}, - - { ER_NODESET_CANNOT_ITERATE, - "Detta NodeSet kan inte iterera till en tidigare nod!"}, - - { ER_NODESETDTM_CANNOT_INDEX, - "Detta NodeSetDTM kan inte utf\u00F6ra funktioner som indexerar eller r\u00E4knar!"}, - - { ER_NODESET_CANNOT_INDEX, - "Detta NodeSet kan inte utf\u00F6ra funktioner som indexerar eller r\u00E4knar!"}, - - { ER_CANNOT_CALL_SETSHOULDCACHENODE, - "Kan inte anropa setShouldCacheNodes efter anropat nextNode!"}, - - { ER_ONLY_ALLOWS, - "{0} till\u00E5ter endast {1} argument"}, - - { ER_UNKNOWN_STEP, - "Programmerarens utsaga i getNextStepPos: ok\u00E4nt stepType: {0}"}, - - //Note to translators: A relative location path is a form of XPath expression. - // The message indicates that such an expression was expected following the - // characters '/' or '//', but was not found. - { ER_EXPECTED_REL_LOC_PATH, - "En relativ s\u00F6kv\u00E4g f\u00F6rv\u00E4ntades efter tecknet '/' eller '//'."}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such an expression was expected,but - // the characters specified by the substitution text were encountered instead. - { ER_EXPECTED_LOC_PATH, - "En s\u00F6kv\u00E4g f\u00F6rv\u00E4ntades, men f\u00F6ljande tecken p\u00E5tr\u00E4ffades: {0}"}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such a subexpression was expected, - // but no more characters were found in the expression. - { ER_EXPECTED_LOC_PATH_AT_END_EXPR, - "En s\u00F6kv\u00E4g f\u00F6rv\u00E4ntades, men slutet av XPath-uttrycket hittades ist\u00E4llet."}, - - // Note to translators: A location step is part of an XPath expression. - // The message indicates that syntactically such an expression was expected - // following the specified characters. - { ER_EXPECTED_LOC_STEP, - "Ett platssteg f\u00F6rv\u00E4ntades efter tecknet '/' eller '//'."}, - - // Note to translators: A node test is part of an XPath expression that is - // used to test for particular kinds of nodes. In this case, a node test that - // consists of an NCName followed by a colon and an asterisk or that consists - // of a QName was expected, but was not found. - { ER_EXPECTED_NODE_TEST, - "Ett nodtest som matchar antingen NCName:* eller QName f\u00F6rv\u00E4ntades."}, - - // Note to translators: A step pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but the specified character was found in the expression instead. - { ER_EXPECTED_STEP_PATTERN, - "Ett stegm\u00F6nster f\u00F6rv\u00E4ntades, men '/' p\u00E5tr\u00E4ffades."}, - - // Note to translators: A relative path pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but was not found. - { ER_EXPECTED_REL_PATH_PATTERN, - "Ett m\u00F6nster f\u00F6r relativ s\u00F6kv\u00E4g f\u00F6rv\u00E4ntades."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type boolean. - { ER_CANT_CONVERT_TO_BOOLEAN, - "XPathResult i XPath-uttrycket ''{0}'' inneh\u00E5ller XPathResultType {1} som inte kan konverteras till booleskt v\u00E4rde."}, - - // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and - // FIRST_ORDERED_NODE_TYPE. - { ER_CANT_CONVERT_TO_SINGLENODE, - "XPathResult i XPath-uttrycket ''{0}'' inneh\u00E5ller XPathResultType {1} som inte kan konverteras till enskild nod. Metoden getSingleNodeValue anv\u00E4nds endast till typ ANY_UNORDERED_NODE_TYPE och FIRST_ORDERED_NODE_TYPE."}, - - // Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and - // ORDERED_NODE_SNAPSHOT_TYPE. - { ER_CANT_GET_SNAPSHOT_LENGTH, - "Metoden getSnapshotLength kan inte anropas vid XPathResult fr\u00E5n XPath-uttrycket ''{0}'' eftersom XPathResultType \u00E4r {1}. Metoden anv\u00E4nds endast till typ UNORDERED_NODE_SNAPSHOT_TYPE och ORDERED_NODE_SNAPSHOT_TYPE."}, - - { ER_NON_ITERATOR_TYPE, - "Metoden iterateNext kan inte anropas vid XPathResult fr\u00E5n XPath-uttrycket ''{0}'' eftersom XPathResultType \u00E4r {1}. Metoden anv\u00E4nds endast till typ UNORDERED_NODE_ITERATOR_TYPE och ORDERED_NODE_ITERATOR_TYPE."}, - - // Note to translators: This message indicates that the document being operated - // upon changed, so the iterator object that was being used to traverse the - // document has now become invalid. - { ER_DOC_MUTATED, - "Dokumentet har muterats sedan resultatet genererades. Iteratorn \u00E4r ogiltig."}, - - { ER_INVALID_XPATH_TYPE, - "Ogiltigt XPath-typargument: {0}"}, - - { ER_EMPTY_XPATH_RESULT, - "Tomt XPath-resultatobjekt"}, - - { ER_INCOMPATIBLE_TYPES, - "XPathResult i XPath-uttrycket ''{0}'' inneh\u00E5ller XPathResultType {1} som inte kan tvingas till angiven XPathResultType {2}."}, - - { ER_NULL_RESOLVER, - "Kan inte matcha prefix med prefixmatchning som \u00E4r null."}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type string. - { ER_CANT_CONVERT_TO_STRING, - "XPathResult i XPath-uttrycket ''{0}'' inneh\u00E5ller XPathResultType {1} som inte kan konverteras till en str\u00E4ng."}, - - // Note to translators: Do not translate snapshotItem, - // UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE. - { ER_NON_SNAPSHOT_TYPE, - "Metoden snapshotItem kan inte anropas vid XPathResult fr\u00E5n XPath-uttrycket ''{0}'' eftersom XPathResultType \u00E4r {1}. Metoden anv\u00E4nds endast till typ UNORDERED_NODE_SNAPSHOT_TYPE och ORDERED_NODE_SNAPSHOT_TYPE."}, - - // Note to translators: XPathEvaluator is a Java interface name. An - // XPathEvaluator is created with respect to a particular XML document, and in - // this case the expression represented by this object was being evaluated with - // respect to a context node from a different document. - { ER_WRONG_DOCUMENT, - "Kontextnoden tillh\u00F6r inte dokumentet som \u00E4r bundet till denna XPathEvaluator."}, - - // Note to translators: The XPath expression cannot be evaluated with respect - // to this type of node. - { ER_WRONG_NODETYPE, - "Kontextnodtypen st\u00F6ds inte."}, - - { ER_XPATH_ERROR, - "Ok\u00E4nt fel i XPath."}, - - { ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER, - "XPathResult i XPath-uttrycket ''{0}'' inneh\u00E5ller XPathResultType {1} som inte kan konverteras till ett tal."}, - - //BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - /** Field ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED */ - - { ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED, - "Till\u00E4ggsfunktion: ''{0}'' kan inte anropas om funktionen XMLConstants.FEATURE_SECURE_PROCESSING anges som true."}, - - /** Field ER_RESOLVE_VARIABLE_RETURNS_NULL */ - - { ER_RESOLVE_VARIABLE_RETURNS_NULL, - "resolveVariable f\u00F6r variabeln {0} returnerar null"}, - - /** Field ER_UNSUPPORTED_RETURN_TYPE */ - - { ER_UNSUPPORTED_RETURN_TYPE, - "Det finns inget st\u00F6d f\u00F6r returtypen: {0}"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "K\u00E4lla och/eller returtyp f\u00E5r inte vara null"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "K\u00E4lla och/eller returtyp f\u00E5r inte vara null"}, - - /** Field ER_ARG_CANNOT_BE_NULL */ - - { ER_ARG_CANNOT_BE_NULL, - "Argumentet {0} kan inte vara null"}, - - /** Field ER_OBJECT_MODEL_NULL */ - - { ER_OBJECT_MODEL_NULL, - "{0}#isObjectModelSupported( String objectModel ) kan inte anropas med objectModel == null"}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_OBJECT_MODEL_EMPTY, - "{0}#isObjectModelSupported( String objectModel ) kan inte anropas med objectModel == \"\""}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_FEATURE_NAME_NULL, - "F\u00F6rs\u00F6ker ange en funktion med null-namn: {0}#setFeature( null, {1})"}, - - /** Field ER_FEATURE_UNKNOWN */ - - { ER_FEATURE_UNKNOWN, - "F\u00F6rs\u00F6ker ange en ok\u00E4nd funktion \"{0}\":{1}#setFeature({0},{2})"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_NULL_FEATURE, - "F\u00F6rs\u00F6ker h\u00E4mta en funktion med null-namn: {0}#getFeature(null)"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_UNKNOWN_FEATURE, - "F\u00F6rs\u00F6ker h\u00E4mta en ok\u00E4nd funktion \"{0}\":{1}#getFeature({0})"}, - - {ER_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: Kan inte ange funktionen som false om s\u00E4kerhetshanteraren anv\u00E4nds: {1}#setFeature({0},{2})"}, - - /** Field ER_NULL_XPATH_FUNCTION_RESOLVER */ - - { ER_NULL_XPATH_FUNCTION_RESOLVER, - "F\u00F6rs\u00F6ker ange nullv\u00E4rde f\u00F6r XPathFunctionResolver:{0}#setXPathFunctionResolver(null)"}, - - /** Field ER_NULL_XPATH_VARIABLE_RESOLVER */ - - { ER_NULL_XPATH_VARIABLE_RESOLVER, - "F\u00F6rs\u00F6ker ange nullv\u00E4rde f\u00F6r XPathVariableResolver:{0}#setXPathVariableResolver(null)"}, - - //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - // Warnings... - - { WG_LOCALE_NAME_NOT_HANDLED, - "spr\u00E5kkonventionsnamnet i funktionen format-number har \u00E4nnu inte hanterats!"}, - - { WG_PROPERTY_NOT_SUPPORTED, - "XSL-egenskapen st\u00F6ds inte: {0}"}, - - { WG_DONT_DO_ANYTHING_WITH_NS, - "G\u00F6r f\u00F6r n\u00E4rvarande inte n\u00E5gonting med namnrymden {0} i egenskap: {1}"}, - - { WG_QUO_NO_LONGER_DEFINED, - "Gammal syntax: quo(...) definieras inte l\u00E4ngre i XPath."}, - - { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST, - "XPath beh\u00F6ver ett h\u00E4rledningsobjekt f\u00F6r att implementera nodeTest!"}, - - { WG_FUNCTION_TOKEN_NOT_FOUND, - "funktionstecken hittades inte."}, - - { WG_COULDNOT_FIND_FUNCTION, - "Hittade inte funktionen: {0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "Kan inte skapa URL fr\u00E5n: {0}"}, - - { WG_EXPAND_ENTITIES_NOT_SUPPORTED, - "Alternativet -E st\u00F6ds inte i DTM-parser"}, - - { WG_ILLEGAL_VARIABLE_REFERENCE, - "VariableReference angiven f\u00F6r variabel som \u00E4r utanf\u00F6r kontext eller som saknar definition! Namn = {0}"}, - - { WG_UNSUPPORTED_ENCODING, - "Kodning utan st\u00F6d: {0}"}, - - - - // Other miscellaneous text used inside the code... - { "ui_language", "en"}, - { "help_language", "en"}, - { "language", "en"}, - { "BAD_CODE", "Parameter f\u00F6r createMessage ligger utanf\u00F6r gr\u00E4nsv\u00E4rdet"}, - { "FORMAT_FAILED", "Undantag utl\u00F6st vid messageFormat-anrop"}, - { "version", ">>>>>>> Xalan version "}, - { "version2", "<<<<<<<"}, - { "yes", "ja"}, - { "line", "Rad nr"}, - { "column", "Kolumn nr"}, - { "xsldone", "XSLProcessor: utf\u00F6rd"}, - { "xpath_option", "xpath-alternativ: "}, - { "optionIN", " [-in inputXMLURL]"}, - { "optionSelect", " [-select xpath-uttryck]"}, - { "optionMatch", " [-match matchningsm\u00F6nster (f\u00F6r matchningsdiagnostik)]"}, - { "optionAnyExpr", "Eller bara ett xpath-uttryck skapar en diagnostikdump"}, - { "noParsermsg1", "XSL-processen utf\u00F6rdes inte."}, - { "noParsermsg2", "** Hittade inte parser **"}, - { "noParsermsg3", "Kontrollera klass\u00F6kv\u00E4gen."}, - { "noParsermsg4", "Om du inte har IBMs XML Parser f\u00F6r Java kan du ladda ned den fr\u00E5n"}, - { "noParsermsg5", "IBMs AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, - { "gtone", ">1" }, - { "zero", "0" }, - { "one", "1" }, - { "two" , "2" }, - { "three", "3" } - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - - - // ================= INFRASTRUCTURE ====================== - - /** Field BAD_CODE */ - public static final String BAD_CODE = "BAD_CODE"; - - /** Field FORMAT_FAILED */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - /** Field ERROR_RESOURCES */ - public static final String ERROR_RESOURCES = - "com.sun.org.apache.xpath.internal.res.XPATHErrorResources"; - - /** Field ERROR_STRING */ - public static final String ERROR_STRING = "#error"; - - /** Field ERROR_HEADER */ - public static final String ERROR_HEADER = "Error: "; - - /** Field WARNING_HEADER */ - public static final String WARNING_HEADER = "Warning: "; - - /** Field XSL_HEADER */ - public static final String XSL_HEADER = "XSL "; - - /** Field XML_HEADER */ - public static final String XML_HEADER = "XML "; - - /** Field QUERY_HEADER */ - public static final String QUERY_HEADER = "PATTERN "; - -} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java deleted file mode 100644 index edfb20a0920..00000000000 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java +++ /dev/null @@ -1,938 +0,0 @@ -/* - * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. - */ -/* - * 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.xpath.internal.res; - -import java.util.ListResourceBundle; - -/** - * Set up error messages. - * We build a two dimensional array of message keys and - * message strings. In order to add a new message here, - * you need to first add a Static string constant for the - * Key and update the contents array with Key, Value pair - * Also you need to update the count of messages(MAX_CODE)or - * the count of warnings(MAX_WARNING) [ Information purpose only] - * @xsl.usage advanced - * @LastModified: Nov 2024 - */ -public class XPATHErrorResources_zh_TW extends ListResourceBundle -{ - -/* - * General notes to translators: - * - * This file contains error and warning messages related to XPath Error - * Handling. - * - * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of - * components. - * XSLT is an acronym for "XML Stylesheet Language: Transformations". - * XSLTC is an acronym for XSLT Compiler. - * - * 2) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - * - * 3) A template is a component of a stylesheet that is used to match a - * particular portion of an input document and specifies the form of the - * corresponding portion of the output document. - * - * 4) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 5) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * 6) "Translet" is an invented term that describes the class file that - * results from compiling an XML stylesheet into a Java class. - * - * 7) XPath is a specification that describes a notation for identifying - * nodes in a tree-structured representation of an XML document. An - * instance of that notation is referred to as an XPath expression. - * - * 8) The context node is the node in the document with respect to which an - * XPath expression is being evaluated. - * - * 9) An iterator is an object that traverses nodes in the tree, one at a time. - * - * 10) NCName is an XML term used to describe a name that does not contain a - * colon (a "no-colon name"). - * - * 11) QName is an XML term meaning "qualified name". - */ - - /* - * static variables - */ - public static final String ERROR0000 = "ERROR0000"; - public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH = - "ER_CURRENT_NOT_ALLOWED_IN_MATCH"; - public static final String ER_CURRENT_TAKES_NO_ARGS = - "ER_CURRENT_TAKES_NO_ARGS"; - public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED"; - public static final String ER_CONTEXT_CAN_NOT_BE_NULL = "ER_CONTEXT_CAN_NOT_BE_NULL"; - public static final String ER_CONTEXT_HAS_NO_OWNERDOC = - "ER_CONTEXT_HAS_NO_OWNERDOC"; - public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS = - "ER_LOCALNAME_HAS_TOO_MANY_ARGS"; - public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS = - "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS"; - public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS = - "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS"; - public static final String ER_NUMBER_HAS_TOO_MANY_ARGS = - "ER_NUMBER_HAS_TOO_MANY_ARGS"; - public static final String ER_NAME_HAS_TOO_MANY_ARGS = - "ER_NAME_HAS_TOO_MANY_ARGS"; - public static final String ER_STRING_HAS_TOO_MANY_ARGS = - "ER_STRING_HAS_TOO_MANY_ARGS"; - public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS = - "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS"; - public static final String ER_TRANSLATE_TAKES_3_ARGS = - "ER_TRANSLATE_TAKES_3_ARGS"; - public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG = - "ER_UNPARSEDENTITYURI_TAKES_1_ARG"; - public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED = - "ER_NAMESPACEAXIS_NOT_IMPLEMENTED"; - public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS"; - public static final String ER_UNKNOWN_MATCH_OPERATION = - "ER_UNKNOWN_MATCH_OPERATION"; - public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH"; - public static final String ER_CANT_CONVERT_TO_NUMBER = - "ER_CANT_CONVERT_TO_NUMBER"; - public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER = - "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER"; - public static final String ER_CANT_CONVERT_TO_NODELIST = - "ER_CANT_CONVERT_TO_NODELIST"; - public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST = - "ER_CANT_CONVERT_TO_MUTABLENODELIST"; - public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE"; - public static final String ER_EXPECTED_MATCH_PATTERN = - "ER_EXPECTED_MATCH_PATTERN"; - public static final String ER_COULDNOT_GET_VAR_NAMED = - "ER_COULDNOT_GET_VAR_NAMED"; - public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE"; - public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS"; - public static final String ER_EXPECTED_DOUBLE_QUOTE = - "ER_EXPECTED_DOUBLE_QUOTE"; - public static final String ER_EXPECTED_SINGLE_QUOTE = - "ER_EXPECTED_SINGLE_QUOTE"; - public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION"; - public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND"; - public static final String ER_INCORRECT_PROGRAMMER_ASSERTION = - "ER_INCORRECT_PROGRAMMER_ASSERTION"; - public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL = - "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL"; - public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG = - "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG"; - public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG = - "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG"; - public static final String ER_PREDICATE_ILLEGAL_SYNTAX = - "ER_PREDICATE_ILLEGAL_SYNTAX"; - public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME"; - public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE"; - public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = - "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED"; - public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER = - "ER_COULDNOT_BE_FORMATTED_TO_NUMBER"; - public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON = - "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON"; - public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP = - "ER_DIDNOT_FIND_XPATH_SELECT_EXP"; - public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH = - "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH"; - public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED"; - public static final String ER_ILLEGAL_VARIABLE_REFERENCE = - "ER_ILLEGAL_VARIABLE_REFERENCE"; - public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED"; - public static final String ER_KEY_HAS_TOO_MANY_ARGS = - "ER_KEY_HAS_TOO_MANY_ARGS"; - public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG"; - public static final String ER_COULDNOT_FIND_FUNCTION = - "ER_COULDNOT_FIND_FUNCTION"; - public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING"; - public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING = - "ER_PROBLEM_IN_DTM_NEXTSIBLING"; - public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL = - "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL"; - public static final String ER_SETDOMFACTORY_NOT_SUPPORTED = - "ER_SETDOMFACTORY_NOT_SUPPORTED"; - public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; - public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED"; - public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED"; -public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED = - "ER_IGNORABLE_WHITESPACE_NOT_HANDLED"; - public static final String ER_DTM_CANNOT_HANDLE_NODES = - "ER_DTM_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_CANNOT_HANDLE_NODES = - "ER_XERCES_CANNOT_HANDLE_NODES"; - public static final String ER_XERCES_PARSE_ERROR_DETAILS = - "ER_XERCES_PARSE_ERROR_DETAILS"; - public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL"; - public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT"; - public static final String ER_FUNCTION_TOKEN_NOT_FOUND = - "ER_FUNCTION_TOKEN_NOT_FOUND"; - public static final String ER_CANNOT_DEAL_XPATH_TYPE = - "ER_CANNOT_DEAL_XPATH_TYPE"; - public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE"; - public static final String ER_NODESETDTM_NOT_MUTABLE = - "ER_NODESETDTM_NOT_MUTABLE"; - /** Variable not resolvable: */ - public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE"; - /** Null error handler */ - public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; - /** Programmer's assertion: unknown opcode */ - public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE = - "ER_PROG_ASSERT_UNKNOWN_OPCODE"; - /** 0 or 1 */ - public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE"; - /** rtf() not supported by XRTreeFragSelectWrapper */ - public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** asNodeIterator() not supported by XRTreeFragSelectWrapper */ - public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** fsb() not supported for XStringForChars */ - public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS = - "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS"; - /** Could not find variable with the name of */ - public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR"; - /** XStringForChars can not take a string for an argument */ - public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING = - "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING"; - /** The FastStringBuffer argument can not be null */ - public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL = - "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL"; - /** 2 or 3 */ - public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; - /** Variable accessed before it is bound! */ - public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND = - "ER_VARIABLE_ACCESSED_BEFORE_BIND"; - /** XStringForFSB can not take a string for an argument! */ - public static final String ER_FSB_CANNOT_TAKE_STRING = - "ER_FSB_CANNOT_TAKE_STRING"; - /** Error! Setting the root of a walker to null! */ - public static final String ER_SETTING_WALKER_ROOT_TO_NULL = - "ER_SETTING_WALKER_ROOT_TO_NULL"; - /** This NodeSetDTM can not iterate to a previous node! */ - public static final String ER_NODESETDTM_CANNOT_ITERATE = - "ER_NODESETDTM_CANNOT_ITERATE"; - /** This NodeSet can not iterate to a previous node! */ - public static final String ER_NODESET_CANNOT_ITERATE = - "ER_NODESET_CANNOT_ITERATE"; - /** This NodeSetDTM can not do indexing or counting functions! */ - public static final String ER_NODESETDTM_CANNOT_INDEX = - "ER_NODESETDTM_CANNOT_INDEX"; - /** This NodeSet can not do indexing or counting functions! */ - public static final String ER_NODESET_CANNOT_INDEX = - "ER_NODESET_CANNOT_INDEX"; - /** Can not call setShouldCacheNodes after nextNode has been called! */ - public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE = - "ER_CANNOT_CALL_SETSHOULDCACHENODE"; - /** {0} only allows {1} arguments */ - public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS"; - /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */ - public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP"; - /** Problem with RelativeLocationPath */ - public static final String ER_EXPECTED_REL_LOC_PATH = - "ER_EXPECTED_REL_LOC_PATH"; - /** Problem with LocationPath */ - public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH"; - public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR = - "ER_EXPECTED_LOC_PATH_AT_END_EXPR"; - /** Problem with Step */ - public static final String ER_EXPECTED_LOC_STEP = "ER_EXPECTED_LOC_STEP"; - /** Problem with NodeTest */ - public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST"; - /** Expected step pattern */ - public static final String ER_EXPECTED_STEP_PATTERN = - "ER_EXPECTED_STEP_PATTERN"; - /** Expected relative path pattern */ - public static final String ER_EXPECTED_REL_PATH_PATTERN = - "ER_EXPECTED_REL_PATH_PATTERN"; - /** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */ - public static final String ER_CANT_CONVERT_TO_BOOLEAN = - "ER_CANT_CONVERT_TO_BOOLEAN"; - /** Field ER_CANT_CONVERT_TO_SINGLENODE */ - public static final String ER_CANT_CONVERT_TO_SINGLENODE = - "ER_CANT_CONVERT_TO_SINGLENODE"; - /** Field ER_CANT_GET_SNAPSHOT_LENGTH */ - public static final String ER_CANT_GET_SNAPSHOT_LENGTH = - "ER_CANT_GET_SNAPSHOT_LENGTH"; - /** Field ER_NON_ITERATOR_TYPE */ - public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE"; - /** Field ER_DOC_MUTATED */ - public static final String ER_DOC_MUTATED = "ER_DOC_MUTATED"; - public static final String ER_INVALID_XPATH_TYPE = "ER_INVALID_XPATH_TYPE"; - public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT"; - public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES"; - public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER"; - public static final String ER_CANT_CONVERT_TO_STRING = - "ER_CANT_CONVERT_TO_STRING"; - public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE"; - public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT"; - /* Note to translators: The XPath expression cannot be evaluated with respect - * to this type of node. - */ - /** Field ER_WRONG_NODETYPE */ - public static final String ER_WRONG_NODETYPE = "ER_WRONG_NODETYPE"; - public static final String ER_XPATH_ERROR = "ER_XPATH_ERROR"; - - //BEGIN: Keys needed for exception messages of JAXP 1.3 XPath API implementation - public static final String ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED = "ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED"; - public static final String ER_RESOLVE_VARIABLE_RETURNS_NULL = "ER_RESOLVE_VARIABLE_RETURNS_NULL"; - public static final String ER_UNSUPPORTED_RETURN_TYPE = "ER_UNSUPPORTED_RETURN_TYPE"; - public static final String ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL = "ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL"; - public static final String ER_ARG_CANNOT_BE_NULL = "ER_ARG_CANNOT_BE_NULL"; - - public static final String ER_OBJECT_MODEL_NULL = "ER_OBJECT_MODEL_NULL"; - public static final String ER_OBJECT_MODEL_EMPTY = "ER_OBJECT_MODEL_EMPTY"; - public static final String ER_FEATURE_NAME_NULL = "ER_FEATURE_NAME_NULL"; - public static final String ER_FEATURE_UNKNOWN = "ER_FEATURE_UNKNOWN"; - public static final String ER_GETTING_NULL_FEATURE = "ER_GETTING_NULL_FEATURE"; - public static final String ER_GETTING_UNKNOWN_FEATURE = "ER_GETTING_UNKNOWN_FEATURE"; - public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE"; - public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER"; - public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER"; - //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation - - public static final String WG_LOCALE_NAME_NOT_HANDLED = - "WG_LOCALE_NAME_NOT_HANDLED"; - public static final String WG_PROPERTY_NOT_SUPPORTED = - "WG_PROPERTY_NOT_SUPPORTED"; - public static final String WG_DONT_DO_ANYTHING_WITH_NS = - "WG_DONT_DO_ANYTHING_WITH_NS"; - public static final String WG_QUO_NO_LONGER_DEFINED = - "WG_QUO_NO_LONGER_DEFINED"; - public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = - "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST"; - public static final String WG_FUNCTION_TOKEN_NOT_FOUND = - "WG_FUNCTION_TOKEN_NOT_FOUND"; - public static final String WG_COULDNOT_FIND_FUNCTION = - "WG_COULDNOT_FIND_FUNCTION"; - public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; - public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED = - "WG_EXPAND_ENTITIES_NOT_SUPPORTED"; - public static final String WG_ILLEGAL_VARIABLE_REFERENCE = - "WG_ILLEGAL_VARIABLE_REFERENCE"; - public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING"; - - /** detach() not supported by XRTreeFragSelectWrapper */ - public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** num() not supported by XRTreeFragSelectWrapper */ - public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** xstr() not supported by XRTreeFragSelectWrapper */ - public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - /** str() not supported by XRTreeFragSelectWrapper */ - public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = - "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER"; - - // Error messages... - - private static final Object[][] _contents = new Object[][]{ - - { "ERROR0000" , "{0}" }, - - { ER_CURRENT_NOT_ALLOWED_IN_MATCH, "\u914D\u5C0D\u6A23\u5F0F\u4E2D\u4E0D\u5141\u8A31 current() \u51FD\u6578\uFF01" }, - - { ER_CURRENT_TAKES_NO_ARGS, "current() \u51FD\u6578\u4E0D\u63A5\u53D7\u5F15\u6578\uFF01" }, - - { ER_DOCUMENT_REPLACED, - "document() \u51FD\u6578\u5BE6\u884C\u5DF2\u7531 com.sun.org.apache.xalan.internal.xslt.FuncDocument \u53D6\u4EE3\u3002"}, - - { ER_CONTEXT_CAN_NOT_BE_NULL, - "\u5982\u679C\u4F5C\u696D\u8207\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u76F8\u4F9D\uFF0C\u5247\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u4E0D\u53EF\u4EE5\u662F\u7A7A\u503C\u3002"}, - - { ER_CONTEXT_HAS_NO_OWNERDOC, - "\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u4E0D\u5177\u6709\u64C1\u6709\u8005\u6587\u4EF6\uFF01"}, - - { ER_LOCALNAME_HAS_TOO_MANY_ARGS, - "local-name() \u5177\u6709\u904E\u591A\u7684\u5F15\u6578\u3002"}, - - { ER_NAMESPACEURI_HAS_TOO_MANY_ARGS, - "namespace-uri() \u5177\u6709\u904E\u591A\u7684\u5F15\u6578\u3002"}, - - { ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS, - "normalize-space() \u5177\u6709\u904E\u591A\u7684\u5F15\u6578\u3002"}, - - { ER_NUMBER_HAS_TOO_MANY_ARGS, - "number() \u5177\u6709\u904E\u591A\u7684\u5F15\u6578\u3002"}, - - { ER_NAME_HAS_TOO_MANY_ARGS, - "name() \u5177\u6709\u904E\u591A\u7684\u5F15\u6578\u3002"}, - - { ER_STRING_HAS_TOO_MANY_ARGS, - "string() \u5177\u6709\u904E\u591A\u7684\u5F15\u6578\u3002"}, - - { ER_STRINGLENGTH_HAS_TOO_MANY_ARGS, - "string-length() \u5177\u6709\u904E\u591A\u7684\u5F15\u6578\u3002"}, - - { ER_TRANSLATE_TAKES_3_ARGS, - "translate() \u51FD\u6578\u63A5\u53D7\u4E09\u500B\u5F15\u6578\uFF01"}, - - { ER_UNPARSEDENTITYURI_TAKES_1_ARG, - "unparsed-entity-uri \u51FD\u6578\u61C9\u63A5\u53D7\u4E00\u500B\u5F15\u6578\uFF01"}, - - { ER_NAMESPACEAXIS_NOT_IMPLEMENTED, - "\u5C1A\u672A\u5BE6\u884C\u547D\u540D\u7A7A\u9593\u8EF8\uFF01"}, - - { ER_UNKNOWN_AXIS, - "\u4E0D\u660E\u7684\u8EF8: {0}"}, - - { ER_UNKNOWN_MATCH_OPERATION, - "\u4E0D\u660E\u7684\u914D\u5C0D\u4F5C\u696D\uFF01"}, - - { ER_INCORRECT_ARG_LENGTH, - "processing-instruction() \u7BC0\u9EDE\u7684\u5F15\u6578\u9577\u5EA6\u4E0D\u6B63\u78BA\uFF01"}, - - { ER_CANT_CONVERT_TO_NUMBER, - "\u7121\u6CD5\u8F49\u63DB {0} \u70BA\u6578\u5B57"}, - - { ER_CANT_CONVERT_TO_NODELIST, - "\u7121\u6CD5\u8F49\u63DB {0} \u70BA NodeList\uFF01"}, - - { ER_CANT_CONVERT_TO_MUTABLENODELIST, - "\u7121\u6CD5\u8F49\u63DB {0} \u70BA NodeSetDTM\uFF01"}, - - { ER_CANT_CONVERT_TO_TYPE, - "\u7121\u6CD5\u8F49\u63DB {0} \u70BA type#{1}"}, - - { ER_EXPECTED_MATCH_PATTERN, - "\u5728 getMatchScore \u4E2D\u9810\u671F\u914D\u5C0D\u6A23\u5F0F"}, - - { ER_COULDNOT_GET_VAR_NAMED, - "\u7121\u6CD5\u53D6\u5F97\u540D\u7A31\u70BA {0} \u7684\u8B8A\u6578"}, - - { ER_UNKNOWN_OPCODE, - "\u932F\u8AA4\uFF01\u4E0D\u660E\u7684\u4F5C\u696D\u4EE3\u78BC: {0}"}, - - { ER_EXTRA_ILLEGAL_TOKENS, - "\u984D\u5916\u7684\u7121\u6548\u8A18\u865F: {0}"}, - - { ER_EXPECTED_DOUBLE_QUOTE, - "\u5F15\u865F\u932F\u8AA4\u7684\u6587\u5B57... \u9810\u671F\u96D9\u5F15\u865F\uFF01"}, - - { ER_EXPECTED_SINGLE_QUOTE, - "\u5F15\u865F\u932F\u8AA4\u7684\u6587\u5B57... \u9810\u671F\u55AE\u5F15\u865F\uFF01"}, - - { ER_EMPTY_EXPRESSION, - "\u7A7A\u767D\u8868\u793A\u5F0F\uFF01"}, - - { ER_EXPECTED_BUT_FOUND, - "\u9810\u671F {0}\uFF0C\u4F46\u627E\u5230: {1}"}, - - { ER_INCORRECT_PROGRAMMER_ASSERTION, - "\u7A0B\u5F0F\u8A2D\u8A08\u4EBA\u54E1\u5BA3\u544A\u4E0D\u6B63\u78BA\uFF01- {0}"}, - - { ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL, - "\u6839\u64DA 19990709 XPath \u8349\u6848\uFF0Cboolean(...) \u4E0D\u518D\u662F\u9078\u64C7\u6027\u5F15\u6578\u3002"}, - - { ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG, - "\u627E\u5230 ',' \u4F46\u6C92\u6709\u5148\u524D\u7684\u5F15\u6578\uFF01"}, - - { ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG, - "\u627E\u5230 ',' \u4F46\u6C92\u6709\u5F8C\u7E8C\u7684\u5F15\u6578\uFF01"}, - - { ER_PREDICATE_ILLEGAL_SYNTAX, - "'..[predicate]' \u6216 '.[predicate]' \u662F\u7121\u6548\u7684\u8A9E\u6CD5\u3002\u8ACB\u6539\u7528 'self::node()[predicate]'\u3002"}, - - { ER_ILLEGAL_AXIS_NAME, - "\u7121\u6548\u7684\u8EF8\u540D\u7A31: {0}"}, - - { ER_UNKNOWN_NODETYPE, - "\u4E0D\u660E\u7684 nodetype: {0}"}, - - { ER_PATTERN_LITERAL_NEEDS_BE_QUOTED, - "\u6A23\u5F0F\u6587\u5B57 ({0}) \u9700\u8981\u52A0\u4E0A\u5F15\u865F\uFF01"}, - - { ER_COULDNOT_BE_FORMATTED_TO_NUMBER, - "{0} \u7121\u6CD5\u683C\u5F0F\u5316\u70BA\u6578\u5B57\uFF01"}, - - { ER_COULDNOT_CREATE_XMLPROCESSORLIAISON, - "\u7121\u6CD5\u5EFA\u7ACB XML TransformerFactory Liaison: {0}"}, - - { ER_DIDNOT_FIND_XPATH_SELECT_EXP, - "\u932F\u8AA4\uFF01\u627E\u4E0D\u5230 xpath \u9078\u53D6\u8868\u793A\u5F0F (-select)\u3002"}, - - { ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH, - "\u932F\u8AA4\uFF01\u5728 OP_LOCATIONPATH \u4E4B\u5F8C\u627E\u4E0D\u5230 ENDOP"}, - - { ER_ERROR_OCCURED, - "\u767C\u751F\u932F\u8AA4\uFF01"}, - - { ER_ILLEGAL_VARIABLE_REFERENCE, - "\u70BA\u8B8A\u6578\u6307\u5B9A\u7684 VariableReference \u8D85\u51FA\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u6216\u6C92\u6709\u5B9A\u7FA9\uFF01\u540D\u7A31 = {0}"}, - - { ER_AXES_NOT_ALLOWED, - "\u914D\u5C0D\u6A23\u5F0F\u4E2D\u50C5\u5141\u8A31 child:: \u8207 attribute:: \u8EF8\uFF01\u9055\u53CD\u7684\u8EF8 = {0}"}, - - { ER_KEY_HAS_TOO_MANY_ARGS, - "key() \u5177\u6709\u4E0D\u6B63\u78BA\u7684\u5F15\u6578\u6578\u76EE\u3002"}, - - { ER_COUNT_TAKES_1_ARG, - "count \u51FD\u6578\u61C9\u63A5\u53D7\u4E00\u500B\u5F15\u6578\uFF01"}, - - { ER_COULDNOT_FIND_FUNCTION, - "\u627E\u4E0D\u5230\u51FD\u6578: {0}"}, - - { ER_UNSUPPORTED_ENCODING, - "\u4E0D\u652F\u63F4\u7684\u7DE8\u78BC: {0}"}, - - { ER_PROBLEM_IN_DTM_NEXTSIBLING, - "\u5728 getNextSibling \u7684 DTM \u4E2D\u767C\u751F\u554F\u984C... \u6B63\u5728\u5617\u8A66\u5FA9\u539F"}, - - { ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL, - "\u7A0B\u5F0F\u8A2D\u8A08\u4EBA\u54E1\u932F\u8AA4: \u7121\u6CD5\u5BEB\u5165 EmptyNodeList\u3002"}, - - { ER_SETDOMFACTORY_NOT_SUPPORTED, - "XPathContext \u4E0D\u652F\u63F4 setDOMFactory\uFF01"}, - - { ER_PREFIX_MUST_RESOLVE, - "\u524D\u7F6E\u78BC\u5FC5\u9808\u89E3\u6790\u70BA\u547D\u540D\u7A7A\u9593: {0}"}, - - { ER_PARSE_NOT_SUPPORTED, - "XPathContext \u4E2D\u4E0D\u652F\u63F4 parse (InputSource \u4F86\u6E90)\u3002\u7121\u6CD5\u958B\u555F {0}"}, - - { ER_SAX_API_NOT_HANDLED, - "SAX API characters(char ch[]... \u4E26\u975E\u7531 DTM \u8655\u7406\uFF01"}, - - { ER_IGNORABLE_WHITESPACE_NOT_HANDLED, - "ignorableWhitespace(char ch[]... \u4E26\u975E\u7531 DTM \u8655\u7406\uFF01"}, - - { ER_DTM_CANNOT_HANDLE_NODES, - "DTMLiaison \u7121\u6CD5\u8655\u7406\u985E\u578B {0} \u7684\u63A7\u5236\u4EE3\u78BC\u7BC0\u9EDE"}, - - { ER_XERCES_CANNOT_HANDLE_NODES, - "DOM2Helper \u7121\u6CD5\u8655\u7406\u985E\u578B {0} \u7684\u63A7\u5236\u4EE3\u78BC\u7BC0\u9EDE"}, - - { ER_XERCES_PARSE_ERROR_DETAILS, - "DOM2Helper.parse \u932F\u8AA4: SystemID - {0} \u884C - {1}"}, - - { ER_XERCES_PARSE_ERROR, - "DOM2Helper.parse \u932F\u8AA4"}, - - { ER_INVALID_UTF16_SURROGATE, - "\u5075\u6E2C\u5230\u7121\u6548\u7684 UTF-16 \u4EE3\u7406: {0}\uFF1F"}, - - { ER_OIERROR, - "IO \u932F\u8AA4"}, - - { ER_CANNOT_CREATE_URL, - "\u7121\u6CD5\u70BA {0} \u5EFA\u7ACB url"}, - - { ER_XPATH_READOBJECT, - "\u5728 XPath.readObject \u4E2D: {0}"}, - - { ER_FUNCTION_TOKEN_NOT_FOUND, - "\u627E\u4E0D\u5230\u51FD\u6578\u8A18\u865F\u3002"}, - - { ER_CANNOT_DEAL_XPATH_TYPE, - "\u7121\u6CD5\u8655\u7406 XPath \u985E\u578B: {0}"}, - - { ER_NODESET_NOT_MUTABLE, - "\u6B64 NodeSet \u4E0D\u53EF\u8B8A\u66F4"}, - - { ER_NODESETDTM_NOT_MUTABLE, - "\u6B64 NodeSetDTM \u4E0D\u53EF\u8B8A\u66F4"}, - - { ER_VAR_NOT_RESOLVABLE, - "\u8B8A\u6578\u7121\u6CD5\u89E3\u6790: {0}"}, - - { ER_NULL_ERROR_HANDLER, - "\u7A7A\u503C\u932F\u8AA4\u8655\u7406\u7A0B\u5F0F"}, - - { ER_PROG_ASSERT_UNKNOWN_OPCODE, - "\u7A0B\u5F0F\u8A2D\u8A08\u4EBA\u54E1\u5BA3\u544A: \u4E0D\u660E\u7684 opcode: {0}"}, - - { ER_ZERO_OR_ONE, - "0 \u6216 1"}, - - { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 rtf()"}, - - { ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 asNodeIterator()"}, - - /** detach() not supported by XRTreeFragSelectWrapper */ - { ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 detach()"}, - - /** num() not supported by XRTreeFragSelectWrapper */ - { ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 num()"}, - - /** xstr() not supported by XRTreeFragSelectWrapper */ - { ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 xstr()"}, - - /** str() not supported by XRTreeFragSelectWrapper */ - { ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER, - "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 str()"}, - - { ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS, - "XStringForChars \u4E0D\u652F\u63F4 fsb()"}, - - { ER_COULD_NOT_FIND_VAR, - "\u627E\u4E0D\u5230\u540D\u7A31\u70BA {0} \u7684\u8B8A\u6578"}, - - { ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING, - "XStringForChars \u7121\u6CD5\u63A5\u53D7\u5B57\u4E32\u4F5C\u70BA\u5F15\u6578"}, - - { ER_FASTSTRINGBUFFER_CANNOT_BE_NULL, - "FastStringBuffer \u5F15\u6578\u4E0D\u53EF\u70BA\u7A7A\u503C"}, - - { ER_TWO_OR_THREE, - "2 \u6216 3"}, - - { ER_VARIABLE_ACCESSED_BEFORE_BIND, - "\u8B8A\u6578\u9023\u7D50\u4E4B\u524D\u4FBF\u9032\u884C\u5B58\u53D6\uFF01"}, - - { ER_FSB_CANNOT_TAKE_STRING, - "XStringForFSB \u7121\u6CD5\u63A5\u53D7\u5B57\u4E32\u4F5C\u70BA\u5F15\u6578\uFF01"}, - - { ER_SETTING_WALKER_ROOT_TO_NULL, - "\n \u932F\u8AA4\uFF01\u5C07\u8490\u96C6\u7A0B\u5F0F\u7684\u6839\u8A2D\u5B9A\u70BA\u7A7A\u503C\uFF01"}, - - { ER_NODESETDTM_CANNOT_ITERATE, - "\u6B64 NodeSetDTM \u7121\u6CD5\u91CD\u8907\u5148\u524D\u7684\u7BC0\u9EDE\uFF01"}, - - { ER_NODESET_CANNOT_ITERATE, - "\u6B64 NodeSet \u7121\u6CD5\u91CD\u8907\u5148\u524D\u7684\u7BC0\u9EDE\uFF01"}, - - { ER_NODESETDTM_CANNOT_INDEX, - "\u6B64 NodeSetDTM \u7121\u6CD5\u57F7\u884C\u88FD\u4F5C\u7D22\u5F15\u6216\u8A08\u6578\u529F\u80FD\uFF01"}, - - { ER_NODESET_CANNOT_INDEX, - "\u6B64 NodeSet \u7121\u6CD5\u57F7\u884C\u88FD\u4F5C\u7D22\u5F15\u6216\u8A08\u6578\u529F\u80FD\uFF01"}, - - { ER_CANNOT_CALL_SETSHOULDCACHENODE, - "\u547C\u53EB nextNode \u4E4B\u5F8C\uFF0C\u7121\u6CD5\u547C\u53EB setShouldCacheNodes\uFF01"}, - - { ER_ONLY_ALLOWS, - "{0} \u50C5\u5141\u8A31 {1} \u500B\u5F15\u6578"}, - - { ER_UNKNOWN_STEP, - "\u5728 getNextStepPos \u4E2D\u7A0B\u5F0F\u8A2D\u8A08\u4EBA\u54E1\u7684\u5BA3\u544A: \u4E0D\u660E\u7684 stepType: {0}"}, - - //Note to translators: A relative location path is a form of XPath expression. - // The message indicates that such an expression was expected following the - // characters '/' or '//', but was not found. - { ER_EXPECTED_REL_LOC_PATH, - "'/' \u6216 '//' \u8A18\u865F\u4E4B\u5F8C\uFF0C\u9810\u671F\u76F8\u5C0D\u4F4D\u7F6E\u8DEF\u5F91\u3002"}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such an expression was expected,but - // the characters specified by the substitution text were encountered instead. - { ER_EXPECTED_LOC_PATH, - "\u9810\u671F\u4F4D\u7F6E\u8DEF\u5F91\uFF0C\u4F46\u51FA\u73FE\u4E0B\u5217\u8A18\u865F: {0}"}, - - // Note to translators: A location path is a form of XPath expression. - // The message indicates that syntactically such a subexpression was expected, - // but no more characters were found in the expression. - { ER_EXPECTED_LOC_PATH_AT_END_EXPR, - "\u9810\u671F\u4F4D\u7F6E\u8DEF\u5F91\uFF0C\u4F46\u51FA\u73FE XPath \u8868\u793A\u5F0F\u7684\u7D50\u5C3E\u3002"}, - - // Note to translators: A location step is part of an XPath expression. - // The message indicates that syntactically such an expression was expected - // following the specified characters. - { ER_EXPECTED_LOC_STEP, - "'/' \u6216 '//' \u8A18\u865F\u4E4B\u5F8C\uFF0C\u9810\u671F\u4F4D\u7F6E\u6B65\u9A5F\u3002"}, - - // Note to translators: A node test is part of an XPath expression that is - // used to test for particular kinds of nodes. In this case, a node test that - // consists of an NCName followed by a colon and an asterisk or that consists - // of a QName was expected, but was not found. - { ER_EXPECTED_NODE_TEST, - "\u9810\u671F\u7B26\u5408 NCName:* \u6216 QName \u7684\u7BC0\u9EDE\u6E2C\u8A66\u3002"}, - - // Note to translators: A step pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but the specified character was found in the expression instead. - { ER_EXPECTED_STEP_PATTERN, - "\u9810\u671F\u6B65\u9A5F\u6A23\u5F0F\uFF0C\u4F46\u51FA\u73FE '/'\u3002"}, - - // Note to translators: A relative path pattern is part of an XPath expression. - // The message indicates that syntactically such an expression was expected, - // but was not found. - { ER_EXPECTED_REL_PATH_PATTERN, - "\u9810\u671F\u76F8\u5C0D\u8DEF\u5F91\u6A23\u5F0F\u3002"}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type boolean. - { ER_CANT_CONVERT_TO_BOOLEAN, - "XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709 XPathResultType \u7684 {1}\uFF0C\u5B83\u7121\u6CD5\u8F49\u63DB\u70BA\u5E03\u6797\u503C\u3002"}, - - // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and - // FIRST_ORDERED_NODE_TYPE. - { ER_CANT_CONVERT_TO_SINGLENODE, - "XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709 XPathResultType \u7684 {1}\uFF0C\u5B83\u7121\u6CD5\u8F49\u63DB\u70BA\u55AE\u4E00\u7BC0\u9EDE\u3002\u65B9\u6CD5 getSingleNodeValue \u50C5\u9069\u7528\u65BC\u985E\u578B ANY_UNORDERED_NODE_TYPE \u8207 FIRST_ORDERED_NODE_TYPE\u3002"}, - - // Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and - // ORDERED_NODE_SNAPSHOT_TYPE. - { ER_CANT_GET_SNAPSHOT_LENGTH, - "\u7121\u6CD5\u5728 XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u4E0A\u547C\u53EB\u65B9\u6CD5 getSnapshotLength\uFF0C\u56E0\u70BA\u5B83\u7684 XPathResultType \u662F {1}\u3002\u6B64\u65B9\u6CD5\u50C5\u9069\u7528\u65BC\u985E\u578B UNORDERED_NODE_SNAPSHOT_TYPE \u8207 ORDERED_NODE_SNAPSHOT_TYPE\u3002"}, - - { ER_NON_ITERATOR_TYPE, - "\u7121\u6CD5\u5728 XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u4E0A\u547C\u53EB\u65B9\u6CD5 iterateNext\uFF0C\u56E0\u70BA\u5B83\u7684 XPathResultType \u662F {1}\u3002\u6B64\u65B9\u6CD5\u50C5\u9069\u7528\u65BC\u985E\u578B UNORDERED_NODE_ITERATOR_TYPE \u8207 ORDERED_NODE_ITERATOR_TYPE\u3002"}, - - // Note to translators: This message indicates that the document being operated - // upon changed, so the iterator object that was being used to traverse the - // document has now become invalid. - { ER_DOC_MUTATED, - "\u7D50\u679C\u50B3\u56DE\u5F8C\u6587\u4EF6\u5DF2\u8B8A\u66F4\u3002\u91CD\u8907\u7A0B\u5F0F\u7121\u6548\u3002"}, - - { ER_INVALID_XPATH_TYPE, - "\u7121\u6548\u7684 XPath \u985E\u578B\u5F15\u6578: {0}"}, - - { ER_EMPTY_XPATH_RESULT, - "\u7A7A\u767D\u7684 XPath \u7D50\u679C\u7269\u4EF6"}, - - { ER_INCOMPATIBLE_TYPES, - "XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709 XPathResultType \u7684 {1}\uFF0C\u5B83\u7121\u6CD5\u5F37\u5236\u8F49\u6210 {2} \u6307\u5B9A\u7684 XPathResultType\u3002"}, - - { ER_NULL_RESOLVER, - "\u7121\u6CD5\u4EE5\u7A7A\u503C\u524D\u7F6E\u78BC\u89E3\u6790\u5668\u4F86\u89E3\u6790\u524D\u7F6E\u78BC\u3002"}, - - // Note to translators: The substitution text is the name of a data type. The - // message indicates that a value of a particular type could not be converted - // to a value of type string. - { ER_CANT_CONVERT_TO_STRING, - "XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709 XPathResultType \u7684 {1}\uFF0C\u5B83\u7121\u6CD5\u8F49\u63DB\u70BA\u5B57\u4E32\u3002"}, - - // Note to translators: Do not translate snapshotItem, - // UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE. - { ER_NON_SNAPSHOT_TYPE, - "\u7121\u6CD5\u5728 XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u4E0A\u547C\u53EB\u65B9\u6CD5 snapshotItem\uFF0C\u56E0\u70BA\u5B83\u7684 XPathResultType \u662F {1}\u3002\u6B64\u65B9\u6CD5\u50C5\u9069\u7528\u65BC\u985E\u578B UNORDERED_NODE_SNAPSHOT_TYPE \u8207 ORDERED_NODE_SNAPSHOT_TYPE\u3002"}, - - // Note to translators: XPathEvaluator is a Java interface name. An - // XPathEvaluator is created with respect to a particular XML document, and in - // this case the expression represented by this object was being evaluated with - // respect to a context node from a different document. - { ER_WRONG_DOCUMENT, - "\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u7BC0\u9EDE\u4E0D\u5C6C\u65BC\u9023\u7D50\u81F3\u6B64 XPathEvaluator \u7684\u6587\u4EF6\u3002"}, - - // Note to translators: The XPath expression cannot be evaluated with respect - // to this type of node. - { ER_WRONG_NODETYPE, - "\u4E0D\u652F\u63F4\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u7BC0\u9EDE\u985E\u578B\u3002"}, - - { ER_XPATH_ERROR, - "XPath \u767C\u751F\u4E0D\u660E\u7684\u932F\u8AA4\u3002"}, - - { ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER, - "XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709 XPathResultType \u7684 {1}\uFF0C\u5B83\u7121\u6CD5\u8F49\u63DB\u70BA\u6578\u5B57\u3002"}, - - //BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - /** Field ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED */ - - { ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED, - "\u7576 XMLConstants.FEATURE_SECURE_PROCESSING \u529F\u80FD\u8A2D\u70BA\u771F\u6642\uFF0C\u7121\u6CD5\u547C\u53EB\u64F4\u5145\u51FD\u6578: ''{0}''\u3002"}, - - /** Field ER_RESOLVE_VARIABLE_RETURNS_NULL */ - - { ER_RESOLVE_VARIABLE_RETURNS_NULL, - "\u8B8A\u6578 {0} \u7684 resolveVariable \u50B3\u56DE\u7A7A\u503C"}, - - /** Field ER_UNSUPPORTED_RETURN_TYPE */ - - { ER_UNSUPPORTED_RETURN_TYPE, - "\u4E0D\u652F\u63F4\u7684\u50B3\u56DE\u985E\u578B: {0}"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "\u4F86\u6E90\u548C (\u6216) \u50B3\u56DE\u985E\u578B\u4E0D\u53EF\u70BA\u7A7A\u503C"}, - - /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */ - - { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL, - "\u4F86\u6E90\u548C (\u6216) \u50B3\u56DE\u985E\u578B\u4E0D\u53EF\u70BA\u7A7A\u503C"}, - - /** Field ER_ARG_CANNOT_BE_NULL */ - - { ER_ARG_CANNOT_BE_NULL, - "{0} \u5F15\u6578\u4E0D\u53EF\u70BA\u7A7A\u503C"}, - - /** Field ER_OBJECT_MODEL_NULL */ - - { ER_OBJECT_MODEL_NULL, - "{0}#isObjectModelSupported( String objectModel ) \u7121\u6CD5\u4F7F\u7528 objectModel == null \u4F86\u547C\u53EB"}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_OBJECT_MODEL_EMPTY, - "{0}#isObjectModelSupported( String objectModel ) \u7121\u6CD5\u4F7F\u7528 objectModel == \"\" \u4F86\u547C\u53EB"}, - - /** Field ER_OBJECT_MODEL_EMPTY */ - - { ER_FEATURE_NAME_NULL, - "\u5617\u8A66\u4EE5\u7A7A\u503C\u540D\u7A31\u8A2D\u5B9A\u529F\u80FD: {0}#setFeature( null, {1})"}, - - /** Field ER_FEATURE_UNKNOWN */ - - { ER_FEATURE_UNKNOWN, - "\u5617\u8A66\u8A2D\u5B9A\u4E0D\u660E\u7684\u529F\u80FD \"{0}\":{1}#setFeature({0},{2})"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_NULL_FEATURE, - "\u5617\u8A66\u4EE5\u7A7A\u503C\u540D\u7A31\u53D6\u5F97\u529F\u80FD: {0}#getFeature(null)"}, - - /** Field ER_GETTING_NULL_FEATURE */ - - { ER_GETTING_UNKNOWN_FEATURE, - "\u5617\u8A66\u53D6\u5F97\u4E0D\u660E\u7684\u529F\u80FD \"{0}\":{1}#getFeature({0})"}, - - {ER_SECUREPROCESSING_FEATURE, - "FEATURE_SECURE_PROCESSING: \u5B89\u5168\u7BA1\u7406\u7A0B\u5F0F\u5B58\u5728\u6642\uFF0C\u7121\u6CD5\u5C07\u529F\u80FD\u8A2D\u70BA\u507D: {1}#setFeature({0},{2})"}, - - /** Field ER_NULL_XPATH_FUNCTION_RESOLVER */ - - { ER_NULL_XPATH_FUNCTION_RESOLVER, - "\u5617\u8A66\u8A2D\u5B9A\u7A7A\u503C XPathFunctionResolver:{0}#setXPathFunctionResolver(null)"}, - - /** Field ER_NULL_XPATH_VARIABLE_RESOLVER */ - - { ER_NULL_XPATH_VARIABLE_RESOLVER, - "\u5617\u8A66\u8A2D\u5B9A\u7A7A\u503C XPathVariableResolver:{0}#setXPathVariableResolver(null)"}, - - //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation - - // Warnings... - - { WG_LOCALE_NAME_NOT_HANDLED, - "\u5C1A\u672A\u8655\u7406 format-number \u51FD\u6578\u4E2D\u7684\u5730\u5340\u8A2D\u5B9A\u540D\u7A31\uFF01"}, - - { WG_PROPERTY_NOT_SUPPORTED, - "\u4E0D\u652F\u63F4 XSL \u5C6C\u6027: {0}"}, - - { WG_DONT_DO_ANYTHING_WITH_NS, - "\u76EE\u524D\u4E0D\u6703\u8655\u7406\u5C6C\u6027\u4E2D\u7684\u547D\u540D\u7A7A\u9593 {0}: {1}"}, - - { WG_QUO_NO_LONGER_DEFINED, - "\u820A\u8A9E\u6CD5: XPath \u4E2D\u4E0D\u518D\u5B9A\u7FA9 quo(...)\u3002"}, - - { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST, - "XPath \u9700\u8981\u884D\u751F\u7684\u7269\u4EF6\u4F86\u5BE6\u884C nodeTest\uFF01"}, - - { WG_FUNCTION_TOKEN_NOT_FOUND, - "\u627E\u4E0D\u5230\u51FD\u6578\u8A18\u865F\u3002"}, - - { WG_COULDNOT_FIND_FUNCTION, - "\u627E\u4E0D\u5230\u51FD\u6578: {0}"}, - - { WG_CANNOT_MAKE_URL_FROM, - "\u7121\u6CD5\u5F9E {0} \u5EFA\u7ACB URL"}, - - { WG_EXPAND_ENTITIES_NOT_SUPPORTED, - "DTM \u5256\u6790\u5668\u4E0D\u652F\u63F4 -E \u9078\u9805"}, - - { WG_ILLEGAL_VARIABLE_REFERENCE, - "\u70BA\u8B8A\u6578\u6307\u5B9A\u7684 VariableReference \u8D85\u51FA\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u6216\u6C92\u6709\u5B9A\u7FA9\uFF01\u540D\u7A31 = {0}"}, - - { WG_UNSUPPORTED_ENCODING, - "\u4E0D\u652F\u63F4\u7684\u7DE8\u78BC: {0}"}, - - - - // Other miscellaneous text used inside the code... - { "ui_language", "tw"}, - { "help_language", "tw"}, - { "language", "tw"}, - { "BAD_CODE", "createMessage \u7684\u53C3\u6578\u8D85\u51FA\u7BC4\u570D"}, - { "FORMAT_FAILED", "messageFormat \u547C\u53EB\u671F\u9593\u767C\u751F\u7570\u5E38\u72C0\u6CC1"}, - { "version", ">>>>>>> Xalan \u7248\u672C "}, - { "version2", "<<<<<<<"}, - { "yes", "\u662F"}, - { "line", "\u884C\u865F"}, - { "column", "\u8CC7\u6599\u6B04\u7DE8\u865F"}, - { "xsldone", "XSLProcessor: \u5B8C\u6210"}, - { "xpath_option", "xpath \u9078\u9805: "}, - { "optionIN", " [-in inputXMLURL]"}, - { "optionSelect", " [-select xpath \u8868\u793A\u5F0F]"}, - { "optionMatch", " [-match \u914D\u5C0D\u6A23\u5F0F (\u91DD\u5C0D\u914D\u5C0D\u8A3A\u65B7)]"}, - { "optionAnyExpr", "\u6216\u8005\uFF0C\u53EA\u6709 xpath \u8868\u793A\u5F0F\u6642\u5C07\u9032\u884C\u8A3A\u65B7\u50BE\u5370"}, - { "noParsermsg1", "XSL \u8655\u7406\u4F5C\u696D\u5931\u6557\u3002"}, - { "noParsermsg2", "** \u627E\u4E0D\u5230\u5256\u6790\u5668 **"}, - { "noParsermsg3", "\u8ACB\u6AA2\u67E5\u985E\u5225\u8DEF\u5F91\u3002"}, - { "noParsermsg4", "\u82E5\u7121 IBM \u7684 XML Parser for Java\uFF0C\u53EF\u4E0B\u8F09\u81EA"}, - { "noParsermsg5", "IBM \u7684 AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, - { "gtone", ">1" }, - { "zero", "0" }, - { "one", "1" }, - { "two" , "2" }, - { "three", "3" } - - }; - - /** - * Get the association list. - * - * @return The association list. - */ - public Object[][] getContents() - { - return _contents; - } - - - // ================= INFRASTRUCTURE ====================== - - /** Field BAD_CODE */ - public static final String BAD_CODE = "BAD_CODE"; - - /** Field FORMAT_FAILED */ - public static final String FORMAT_FAILED = "FORMAT_FAILED"; - - /** Field ERROR_RESOURCES */ - public static final String ERROR_RESOURCES = - "com.sun.org.apache.xpath.internal.res.XPATHErrorResources"; - - /** Field ERROR_STRING */ - public static final String ERROR_STRING = "#error"; - - /** Field ERROR_HEADER */ - public static final String ERROR_HEADER = "Error: "; - - /** Field WARNING_HEADER */ - public static final String WARNING_HEADER = "Warning: "; - - /** Field XSL_HEADER */ - public static final String XSL_HEADER = "XSL "; - - /** Field XML_HEADER */ - public static final String XML_HEADER = "XML "; - - /** Field QUERY_HEADER */ - public static final String QUERY_HEADER = "PATTERN "; - -} diff --git a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties deleted file mode 100644 index e7a1b256b79..00000000000 --- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. - -# General errors -BadMessageKey = JAXP09000001: No se ha encontrado el mensaje de error que corresponde a la clave de mensaje. -FormatFailed = JAXP09000002: Se ha producido un error interno al formatear el siguiente mensaje:\n -OtherError = JAXP09000003: Error inesperado. - -# Implementation restriction -CircularReference = JAXP09010001: No está permitida la referencia circular: ''{0}''. - -# Input or configuration errors -# Technical term, do not translate: catalog -InvalidCatalog = JAXP09020001: El elemento de documento de un catálogo debe ser "catalog". -InvalidEntryType = JAXP09020002: El tipo de entrada ''{0}'' no es válido. -UriNotAbsolute = JAXP09020003: El URI especificado ''{0}'' no es absoluto. -UriNotValidUrl = JAXP09020004: El URI especificado ''{0}'' no es una URL válida. -InvalidArgument = JAXP09020005: El argumento especificado ''{0}'' (sensible a mayúsculas y minúsculas) para ''{1}'' no es válido. -NullArgument = JAXP09020006: El argumento ''{0}'' no puede ser nulo. -InvalidPath = JAXP09020007: La ruta ''{0}'' no es válida. - - -# Parsing errors -ParserConf = JAXP09030001: Error inesperado al configurar el analizador SAX. -# Technical term, do not translate: catalog -ParsingFailed = JAXP09030002: Fallo al analizar el archivo de catálogo. -# Technical term, do not translate: catalog -NoCatalogFound = JAXP09030003: No se ha especificado ningún catálogo. - - -# Resolving errors -NoMatchFound = JAXP09040001: No se ha encontrado ninguna coincidencia para publicId ''{0}'' y systemId ''{1}''. -# Technical term, do not translate: href, base -NoMatchURIFound = JAXP09040002: No se ha encontrado ninguna coincidencia para href ''{0}'' y base ''{1}''. -# Technical term, do not translate: href, base -FailedCreatingURI = JAXP09040003: No se puede crear el URI con href ''{0}'' y base ''{1}''. - diff --git a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties deleted file mode 100644 index 41fd7bde97a..00000000000 --- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. - -# General errors -BadMessageKey = JAXP09000001 : Le message d'erreur correspondant à la clé de message est introuvable. -FormatFailed = JAXP09000002 : Une erreur interne est survenue lors du formatage du message suivant :\n -OtherError = JAXP09000003 : Erreur inattendue. - -# Implementation restriction -CircularReference = JAXP09010001 : La référence circulaire n''est pas autorisée : ''{0}''. - -# Input or configuration errors -# Technical term, do not translate: catalog -InvalidCatalog = JAXP09020001 : L'élément de document d'un catalogue doit être CATALOG. -InvalidEntryType = JAXP09020002 : Le type d''entrée ''{0}'' n''est pas valide. -UriNotAbsolute = JAXP09020003 : L''URI indiqué ''{0}'' n''est pas absolu. -UriNotValidUrl = JAXP09020004 : L''URI indiqué ''{0}'' n''est pas une URL valide. -InvalidArgument = JAXP09020005 : L''argument indiqué ''{0}'' (respect maj./min.) pour ''{1}'' n''est pas valide. -NullArgument = JAXP09020006 : L''argument ''{0}'' ne peut pas être NULL. -InvalidPath = JAXP09020007 : Le chemin ''{0}'' n''est pas valide. - - -# Parsing errors -ParserConf = JAXP09030001 : Erreur inattendue lors de la configuration d'un analyseur SAX. -# Technical term, do not translate: catalog -ParsingFailed = JAXP09030002 : Echec de l'analyse du fichier CATALOG. -# Technical term, do not translate: catalog -NoCatalogFound = JAXP09030003 : Aucun CATALOG n'est indiqué. - - -# Resolving errors -NoMatchFound = JAXP09040001 : Aucune correspondance trouvée pour publicId ''{0}'' et systemId ''{1}''. -# Technical term, do not translate: href, base -NoMatchURIFound = JAXP09040002 : Aucune correspondance trouvée pour l''élément href ''{0}'' et la base ''{1}''. -# Technical term, do not translate: href, base -FailedCreatingURI = JAXP09040003 : Impossible de construire l''URI à l''aide de l''élément href ''{0}'' et de la base ''{1}''. - diff --git a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties deleted file mode 100644 index 73caa4e2fef..00000000000 --- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. - -# General errors -BadMessageKey = JAXP09000001: impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. -FormatFailed = JAXP09000002: si è verificato un errore interno durante la formattazione del seguente messaggio:\n -OtherError = JAXP09000003: errore imprevisto. - -# Implementation restriction -CircularReference = JAXP09010001: il riferimento circolare non è consentito: ''{0}''. - -# Input or configuration errors -# Technical term, do not translate: catalog -InvalidCatalog = JAXP09020001: l'elemento documento di un catalogo deve essere "catalog". -InvalidEntryType = JAXP09020002: il tipo di voce ''{0}'' non è valido. -UriNotAbsolute = JAXP09020003: l''URI specificato ''{0}'' non è assoluto. -UriNotValidUrl = JAXP09020004: l''URI specificato ''{0}'' non è valido. -InvalidArgument = JAXP09020005: l''argomento specificato ''{0}'' (con distinzione tra maiuscole e minuscole) per ''{1}'' non è valido. -NullArgument = JAXP09020006: l''argomento ''{0}'' non può essere nullo. -InvalidPath = JAXP09020007: il percorso ''{0}'' non è valido. - - -# Parsing errors -ParserConf = JAXP09030001: errore imprevisto durante la configurazione di un parser SAX. -# Technical term, do not translate: catalog -ParsingFailed = JAXP09030002: analisi del file catalogo non riuscita. -# Technical term, do not translate: catalog -NoCatalogFound = JAXP09030003: nessun catalogo specificato. - - -# Resolving errors -NoMatchFound = JAXP09040001: nessuna corrispondenza trovata per publicId ''{0}'' e systemId ''{1}''. -# Technical term, do not translate: href, base -NoMatchURIFound = JAXP09040002: nessuna corrispondenza trovata per href ''{0}'' e base ''{1}''. -# Technical term, do not translate: href, base -FailedCreatingURI = JAXP09040003: impossibile creare l''URI utilizzando href ''{0}'' e base ''{1}''. - diff --git a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties deleted file mode 100644 index 9b6c354f104..00000000000 --- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. - -# General errors -BadMessageKey = JAXP09000001: 메시지 키에 해당하는 오류 메시지를 찾을 수 없습니다. -FormatFailed = JAXP09000002: 다음 메시지의 형식을 지정하는 중 내부 오류가 발생했습니다.\n -OtherError = JAXP09000003: 예상치 않은 오류입니다. - -# Implementation restriction -CircularReference = JAXP09010001: 순환 참조가 허용되지 않음: ''{0}''. - -# Input or configuration errors -# Technical term, do not translate: catalog -InvalidCatalog = JAXP09020001: Catalog의 문서 요소는 catalog여야 합니다. -InvalidEntryType = JAXP09020002: 항목 유형 ''{0}''이(가) 부적합합니다. -UriNotAbsolute = JAXP09020003: 지정된 URI ''{0}''이(가) 절대 경로가 아닙니다. -UriNotValidUrl = JAXP09020004: 지정된 URI ''{0}''이(가) 부적합한 URL입니다. -InvalidArgument = JAXP09020005: ''{1}''에 대해 지정된 인수 ''{0}''(대소문자 구분)이(가) 부적합합니다. -NullArgument = JAXP09020006: ''{0}'' 인수는 널일 수 없습니다. -InvalidPath = JAXP09020007: ''{0}'' 경로가 부적합합니다. - - -# Parsing errors -ParserConf = JAXP09030001: SAX 구문분석기를 구성하는 중 예상치 않은 오류가 발생했습니다. -# Technical term, do not translate: catalog -ParsingFailed = JAXP09030002: Catalog 파일의 구문분석을 실패했습니다. -# Technical term, do not translate: catalog -NoCatalogFound = JAXP09030003: 지정된 catalog가 없습니다. - - -# Resolving errors -NoMatchFound = JAXP09040001: publicId ''{0}'', systemId ''{1}''에 대한 일치 항목을 찾을 수 없습니다. -# Technical term, do not translate: href, base -NoMatchURIFound = JAXP09040002: href ''{0}'', base ''{1}''에 대한 일치 항목을 찾을 수 없습니다. -# Technical term, do not translate: href, base -FailedCreatingURI = JAXP09040003: href ''{0}'', base ''{1}''을(를) 사용하여 URI를 구성할 수 없습니다. - diff --git a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties deleted file mode 100644 index 11d63f0b2c1..00000000000 --- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. - -# General errors -BadMessageKey = JAXP09000001: Não foi possível encontrar a mensagem de erro correspondente à chave da mensagem. -FormatFailed = JAXP09000002: Ocorreu um erro interno ao formatar a mensagem a seguir:\n -OtherError = JAXP09000003: Erro inesperado. - -# Implementation restriction -CircularReference = JAXP09010001: A referência circular não é permitida: ''{0}''. - -# Input or configuration errors -# Technical term, do not translate: catalog -InvalidCatalog = JAXP09020001: O elemento de documento de um catálogo deve ser "catalog". -InvalidEntryType = JAXP09020002: O tipo de entrada "{0}" não é válido. -UriNotAbsolute = JAXP09020003: O URI especificado ''{0}'' não é absoluto. -UriNotValidUrl = JAXP09020004: O URI especificado ''{0}'' não é um URL válido. -InvalidArgument = JAXP09020005: O argumento especificado ''{0}'' (distingue maiúsculas de minúsculas) para ''{1}'' não é válido. -NullArgument = JAXP09020006: O argumento ''{0}'' não pode ser nulo. -InvalidPath = JAXP09020007: O caminho ''{0}'' é inválido. - - -# Parsing errors -ParserConf = JAXP09030001: Erro inesperado ao configurar um parser SAX. -# Technical term, do not translate: catalog -ParsingFailed = JAXP09030002: Falha ao fazer parsing do arquivo de catálogo. -# Technical term, do not translate: catalog -NoCatalogFound = JAXP09030003: Nenhum catálogo foi especificado. - - -# Resolving errors -NoMatchFound = JAXP09040001: Nenhuma correspondência foi encontrada para publicId ''{0}'' e systemId ''{1}''. -# Technical term, do not translate: href, base -NoMatchURIFound = JAXP09040002: Nenhuma correspondência foi encontrada para href ''{0}'' e base ''{1}''. -# Technical term, do not translate: href, base -FailedCreatingURI = JAXP09040003: Não é possível construir o URI usando href ''{0}'' e base ''{1}''. - diff --git a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties deleted file mode 100644 index 37f04866994..00000000000 --- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. - -# General errors -BadMessageKey = JAXP09000001: Det felmeddelande som motsvarar meddelandenyckeln kan inte hittas. -FormatFailed = JAXP09000002: Ett internt fel inträffade vid formatering av följande meddelande:\n -OtherError = JAXP09000003: Oväntat fel. - -# Implementation restriction -CircularReference = JAXP09010001: Cirkelreferens är inte tillåten: ''{0}''. - -# Input or configuration errors -# Technical term, do not translate: catalog -InvalidCatalog = JAXP09020001: Dokumentelementet för en katalog måste vara "catalog". -InvalidEntryType = JAXP09020002: Posttypen ''{0}'' är inte giltig. -UriNotAbsolute = JAXP09020003: Den angivna URI:n, ''{0}'', är inte absolut. -UriNotValidUrl = JAXP09020004: Den angivna URI:n, ''{0}'', är inte en giltig URL. -InvalidArgument = JAXP09020005: Det angivna argumentet, ''{0}'' (skiftlägeskänsligt), för ''{1}'' är inte giltigt. -NullArgument = JAXP09020006: Argumentet ''{0}'' kan inte vara null. -InvalidPath = JAXP09020007: Sökvägen ''{0}'' är ogiltig. - - -# Parsing errors -ParserConf = JAXP09030001: Oväntat fel vid konfiguration av en SAX-parser. -# Technical term, do not translate: catalog -ParsingFailed = JAXP09030002: Kunde inte tolka filen katalog. -# Technical term, do not translate: catalog -NoCatalogFound = JAXP09030003: Ingen katalog har angetts. - - -# Resolving errors -NoMatchFound = JAXP09040001: Ingen matchning hittades för publicId = ''{0}'' och systemId = ''{1}''. -# Technical term, do not translate: href, base -NoMatchURIFound = JAXP09040002: Ingen matchning hittades för href = ''{0}'' och bas = ''{1}''. -# Technical term, do not translate: href, base -FailedCreatingURI = JAXP09040003: Kan inte skapa URI med href = ''{0}'' och bas = ''{1}''. - diff --git a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties b/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties deleted file mode 100644 index 5a0c399bac0..00000000000 --- a/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute 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. - -# General errors -BadMessageKey = JAXP09000001: 找不到相對應於此訊息索引鍵的錯誤訊息。 -FormatFailed = JAXP09000002: 格式化下列訊息時發生內部錯誤:\n -OtherError = JAXP09000003: 未預期的錯誤。 - -# Implementation restriction -CircularReference = JAXP09010001: 不允許循環參照: ''{0}''。 - -# Input or configuration errors -# Technical term, do not translate: catalog -InvalidCatalog = JAXP09020001: catalog 的文件元素必須是 catalog。 -InvalidEntryType = JAXP09020002: 項目類型 ''{0}'' 無效。 -UriNotAbsolute = JAXP09020003: 指定的 URI ''{0}'' 不是絕對路徑。 -UriNotValidUrl = JAXP09020004: 指定的 URI ''{0}'' 不是有效的 URL。 -InvalidArgument = JAXP09020005: 為 ''{1}'' 指定的引數 ''{0}'' (有大小寫之分) 無效。 -NullArgument = JAXP09020006: 引數''{0}'' 不可為空值。 -InvalidPath = JAXP09020007: 路徑 ''{0}'' 無效。 - - -# Parsing errors -ParserConf = JAXP09030001: 設定 SAX 剖析器時發生未預期的錯誤。 -# Technical term, do not translate: catalog -ParsingFailed = JAXP09030002: 無法剖析 catalog 檔案。 -# Technical term, do not translate: catalog -NoCatalogFound = JAXP09030003: 未指定 Catalog。 - - -# Resolving errors -NoMatchFound = JAXP09040001: 找不到符合 publicId ''{0}'' 和 systemId ''{1}'' 的項目。 -# Technical term, do not translate: href, base -NoMatchURIFound = JAXP09040002: 找不到符合 href ''{0}'' 和基礎 ''{1}'' 的項目。 -# Technical term, do not translate: href, base -FailedCreatingURI = JAXP09040003: 無法使用 href ''{0}'' 和基礎 ''{1}'' 建構 URI。 - diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java index a81210dd997..1ebb494d6cf 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java @@ -25,14 +25,14 @@ package com.sun.tools.javac.code; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.EnumSet; import java.util.LinkedHashMap; import java.util.List; -import java.util.Map; import java.util.Optional; +import java.util.SequencedMap; +import java.util.SequencedSet; import java.util.Set; import java.util.stream.Stream; @@ -119,9 +119,6 @@ public class Lint { // The symbol of the declaration this instance was created for, or null for the root instance private Symbol symbol; - // LintCategory lookup by option string - private static final Map map = new LinkedHashMap<>(40); - // Instantiate the root instance @SuppressWarnings("this-escape") protected Lint(Context context) { @@ -210,7 +207,7 @@ public class Lint { *

    * This category is not supported by {@code @SuppressWarnings}. */ - CLASSFILE("classfile", false, false), + CLASSFILE("classfile", Property.NO_ANNOTATION_SUPPRESSION), /** * Warn about "dangling" documentation comments, @@ -227,7 +224,7 @@ public class Lint { * Warn about items which are documented with an {@code @deprecated} JavaDoc * comment, but which do not have {@code @Deprecated} annotation. */ - DEP_ANN("dep-ann", true, true), + DEP_ANN("dep-ann", Property.ENABLED_BY_DEFAULT), /** * Warn about division by constant integer 0. @@ -257,7 +254,7 @@ public class Lint { /** * Warn about uses of @ValueBased classes where an identity class is expected. */ - IDENTITY("identity", true, true, "synchronization"), + IDENTITY(List.of("identity", "synchronization"), Property.ENABLED_BY_DEFAULT), /** * Warn about use of incubating modules. @@ -265,7 +262,7 @@ public class Lint { *

    * This category is not supported by {@code @SuppressWarnings}. */ - INCUBATING("incubating", false, true), + INCUBATING("incubating", Property.NO_ANNOTATION_SUPPRESSION, Property.ENABLED_BY_DEFAULT), /** * Warn about compiler possible lossy conversions. @@ -280,12 +277,12 @@ public class Lint { /** * Warn about module system related issues. */ - MODULE("module", true, true), + MODULE("module", Property.ENABLED_BY_DEFAULT), /** * Warn about issues regarding module opens. */ - OPENS("opens", true, true), + OPENS("opens", Property.ENABLED_BY_DEFAULT), /** * Warn about issues relating to use of command line options. @@ -293,7 +290,7 @@ public class Lint { *

    * This category is not supported by {@code @SuppressWarnings}. */ - OPTIONS("options", false, false), + OPTIONS("options", Property.NO_ANNOTATION_SUPPRESSION), /** * Warn when any output file is written to more than once. @@ -301,7 +298,7 @@ public class Lint { *

    * This category is not supported by {@code @SuppressWarnings}. */ - OUTPUT_FILE_CLASH("output-file-clash", false, false), + OUTPUT_FILE_CLASH("output-file-clash", Property.NO_ANNOTATION_SUPPRESSION), /** * Warn about issues regarding method overloads. @@ -319,7 +316,7 @@ public class Lint { *

    * This category is not supported by {@code @SuppressWarnings}. */ - PATH("path", false, false), + PATH("path", Property.NO_ANNOTATION_SUPPRESSION), /** * Warn about issues regarding annotation processing. @@ -327,7 +324,7 @@ public class Lint { *

    * This category is not supported by {@code @SuppressWarnings}. */ - PROCESSING("processing", false, false), + PROCESSING("processing", Property.NO_ANNOTATION_SUPPRESSION), /** * Warn about unchecked operations on raw types. @@ -337,7 +334,7 @@ public class Lint { /** * Warn about use of deprecated-for-removal items. */ - REMOVAL("removal", true, true), + REMOVAL("removal", Property.ENABLED_BY_DEFAULT), /** * Warn about use of automatic modules in the requires clauses. @@ -347,7 +344,7 @@ public class Lint { /** * Warn about automatic modules in requires transitive. */ - REQUIRES_TRANSITIVE_AUTOMATIC("requires-transitive-automatic", true, true), + REQUIRES_TRANSITIVE_AUTOMATIC("requires-transitive-automatic", Property.ENABLED_BY_DEFAULT), /** * Warn about Serializable classes that do not provide a serial version ID. @@ -362,7 +359,7 @@ public class Lint { /** * Warn about unnecessary uses of the strictfp modifier */ - STRICTFP("strictfp", true, true), + STRICTFP("strictfp", Property.ENABLED_BY_DEFAULT), /** * Warn about recognized {@code @SuppressWarnings} lint categories that don't actually suppress any warnings. @@ -397,28 +394,38 @@ public class Lint { /** * Warn about use of preview features. */ - PREVIEW("preview", true, true), + PREVIEW("preview", Property.ENABLED_BY_DEFAULT), /** * Warn about use of restricted methods. */ RESTRICTED("restricted"); - LintCategory(String option) { - this(option, true, false); + enum Property { NO_ANNOTATION_SUPPRESSION, ENABLED_BY_DEFAULT } + + LintCategory(String option, Property... properties) { + this(List.of(option), properties); } - LintCategory(String option, boolean annotationSuppression, boolean enabledByDefault, String... aliases) { - this.option = option; - this.annotationSuppression = annotationSuppression; - this.enabledByDefault = enabledByDefault; - ArrayList optionList = new ArrayList<>(1 + aliases.length); - optionList.add(option); - Collections.addAll(optionList, aliases); - this.optionList = Collections.unmodifiableList(optionList); - this.optionList.forEach(ident -> map.put(ident, this)); + LintCategory(List options, Property... properties) { + this.option = options.getFirst(); + this.optionList = options; + Set propertySet = properties.length == 0 ? Set.of() : EnumSet.copyOf(Arrays.asList(properties)); + this.annotationSuppression = !propertySet.contains(Property.NO_ANNOTATION_SUPPRESSION); + this.enabledByDefault = propertySet.contains(Property.ENABLED_BY_DEFAULT); } + private static final SequencedMap lookup = createLookup(); + + private static SequencedMap createLookup() { + var map = new LinkedHashMap(); + for (var category : values()) { + category.optionList.forEach(id -> map.put(id, category)); + } + return Collections.unmodifiableSequencedMap(map); + } + + /** * Get the {@link LintCategory} having the given command line option. * @@ -426,14 +433,14 @@ public class Lint { * @return corresponding {@link LintCategory}, or empty if none exists */ public static Optional get(String option) { - return Optional.ofNullable(map.get(option)); + return Optional.ofNullable(lookup.get(option)); } /** * Get all lint category option strings and aliases. */ - public static Set options() { - return Collections.unmodifiableSet(map.keySet()); + public static SequencedSet options() { + return lookup.sequencedKeySet(); } public static EnumSet newEmptySet() { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java index acd8a35a894..4950b6f2cbd 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java @@ -33,6 +33,8 @@ import com.sun.tools.javac.code.Symbol.*; import com.sun.tools.javac.code.Type.*; import com.sun.tools.javac.util.List; import com.sun.tools.javac.util.ListBuffer; +import com.sun.tools.javac.util.Name; +import com.sun.tools.javac.util.Pair; import static com.sun.tools.javac.code.BoundKind.*; import static com.sun.tools.javac.code.Flags.*; @@ -151,13 +153,13 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi @Override public String visitCapturedType(CapturedType t, Locale locale) { if (seenCaptured.contains(t)) - return printAnnotations(t) + + return printAnnotations(t, locale) + localize(locale, "compiler.misc.type.captureof.1", capturedVarId(t, locale)); else { try { seenCaptured = seenCaptured.prepend(t); - return printAnnotations(t) + + return printAnnotations(t, locale) + localize(locale, "compiler.misc.type.captureof", capturedVarId(t, locale), visit(t.wildcard, locale)); @@ -170,16 +172,16 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi @Override public String visitForAll(ForAll t, Locale locale) { - return printAnnotations(t) + "<" + visitTypes(t.tvars, locale) + + return printAnnotations(t, locale) + "<" + visitTypes(t.tvars, locale) + ">" + visit(t.qtype, locale); } @Override public String visitUndetVar(UndetVar t, Locale locale) { if (t.getInst() != null) { - return printAnnotations(t) + visit(t.getInst(), locale); + return printAnnotations(t, locale) + visit(t.getInst(), locale); } else { - return printAnnotations(t) + visit(t.qtype, locale) + "?"; + return printAnnotations(t, locale) + visit(t.qtype, locale) + "?"; } } @@ -191,11 +193,11 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi return res.toString(); } - private String printAnnotations(Type t) { - return printAnnotations(t, false); + private String printAnnotations(Type t, Locale locale) { + return printAnnotations(t, false, locale); } - private String printAnnotations(Type t, boolean prefix) { + private String printAnnotations(Type t, boolean prefix, Locale locale) { if (printingMethodArgs) { return ""; } @@ -204,13 +206,38 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi if (!annos.isEmpty()) { if (prefix) sb.append(' '); for (Attribute.TypeCompound anno : annos) { - sb.append(anno); + sb.append(printAnnotation(anno, locale)); sb.append(' '); } } return sb.toString(); } + public String printAnnotation(Attribute.Compound a, Locale locale) { + StringBuilder sb = new StringBuilder(); + sb.append("@"); + sb.append(visit(a.type, locale)); + int len = a.values.length(); + if (len > 0) { + sb.append('('); + boolean first = true; + for (Pair value : a.values) { + if (!first) + sb.append(", "); + first = false; + + Name name = value.fst.name; + if (len > 1 || name != name.table.names.value) { + sb.append(name); + sb.append('='); + } + sb.append(value.snd); + } + sb.append(')'); + } + return sb.toString(); + } + private void printBaseElementType(Type t, StringBuilder sb, Locale locale) { Type arrel = t; while (arrel.hasTag(TypeTag.ARRAY)) { @@ -222,7 +249,7 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi private void printBrackets(Type t, StringBuilder sb, Locale locale) { Type arrel = t; while (arrel.hasTag(TypeTag.ARRAY)) { - sb.append(printAnnotations(arrel, true)); + sb.append(printAnnotations(arrel, true, locale)); sb.append("[]"); arrel = ((ArrayType) arrel).elemtype; } @@ -234,10 +261,10 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi if (t.getEnclosingType().hasTag(CLASS) && t.tsym.owner.kind == TYP) { buf.append(visit(t.getEnclosingType(), locale)); buf.append('.'); - buf.append(printAnnotations(t)); + buf.append(printAnnotations(t, locale)); buf.append(className(t, false, locale)); } else { - buf.append(printAnnotations(t)); + buf.append(printAnnotations(t, locale)); buf.append(className(t, true, locale)); } if (t.getTypeArguments().nonEmpty()) { @@ -264,7 +291,7 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi StringBuilder s = new StringBuilder(); s.append(t.kind); if (t.kind != UNBOUND) { - s.append(printAnnotations(t)); + s.append(printAnnotations(t, locale)); s.append(visit(t.type, locale)); } return s.toString(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java index 452d15ed219..caa081505b6 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java @@ -705,7 +705,7 @@ public class TypeAnnotations { @Override public Type visitType(Type t, List s) { - return t.annotatedType(s); + return t.hasTag(TypeTag.VOID) ? t : t.annotatedType(s); } }; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java index 9b78a02170c..a44b2f96867 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022, 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 @@ -565,7 +565,7 @@ public class ArgumentAttr extends JCTree.Visitor { Type lambdaType = targetInfo.descriptor; Type currentTarget = targetInfo.target; //check compatibility - checkLambdaCompatible(lambdaType, resultInfo); + checkLambdaCompatible(lambdaType, currentTarget, resultInfo); return currentTarget; } catch (FunctionDescriptorLookupError ex) { resultInfo.checkContext.report(null, ex.getDiagnostic()); @@ -574,7 +574,7 @@ public class ArgumentAttr extends JCTree.Visitor { } /** Check lambda against given target result */ - private void checkLambdaCompatible(Type descriptor, ResultInfo resultInfo) { + private void checkLambdaCompatible(Type descriptor, Type target, ResultInfo resultInfo) { CheckContext checkContext = resultInfo.checkContext; ResultInfo bodyResultInfo = attr.lambdaBodyResult(speculativeTree, descriptor, resultInfo); switch (speculativeTree.getBodyKind()) { @@ -588,7 +588,7 @@ public class ArgumentAttr extends JCTree.Visitor { break; } - attr.checkLambdaCompatible(speculativeTree, descriptor, checkContext); + attr.checkLambdaCompatible(speculativeTree, descriptor, target.tsym, checkContext); } /** diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java index 0fcda2c6a0f..21a456a0cc8 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java @@ -1342,9 +1342,9 @@ public class Attr extends JCTree.Visitor { private void doQueueScanTreeAndTypeAnnotateForVarInit(JCVariableDecl tree, Env env) { if (tree.init != null && - (tree.mods.flags & Flags.FIELD_INIT_TYPE_ANNOTATIONS_QUEUED) == 0 && + (tree.sym.flags_field & Flags.FIELD_INIT_TYPE_ANNOTATIONS_QUEUED) == 0 && env.info.scope.owner.kind != MTH && env.info.scope.owner.kind != VAR) { - tree.mods.flags |= Flags.FIELD_INIT_TYPE_ANNOTATIONS_QUEUED; + tree.sym.flags_field |= Flags.FIELD_INIT_TYPE_ANNOTATIONS_QUEUED; // Field initializer expression need to be entered. annotate.queueScanTreeAndTypeAnnotate(tree.init, env, tree.sym); annotate.flush(); @@ -3241,7 +3241,7 @@ public class Attr extends JCTree.Visitor { attribStats(that.params, localEnv); if (arityMismatch) { - resultInfo.checkContext.report(that, diags.fragment(Fragments.IncompatibleArgTypesInLambda)); + resultInfo.checkContext.report(that, diags.fragment(Fragments.WrongNumberArgsInLambda(currentTarget.tsym))); result = that.type = types.createErrorType(currentTarget); return; } @@ -3274,7 +3274,7 @@ public class Attr extends JCTree.Visitor { flow.analyzeLambda(env, that, make, isSpeculativeRound); that.type = currentTarget; //avoids recovery at this stage - checkLambdaCompatible(that, lambdaType, resultInfo.checkContext); + checkLambdaCompatible(that, lambdaType, currentTarget.tsym, resultInfo.checkContext); if (!isSpeculativeRound) { //add thrown types as bounds to the thrown types free variables if needed: @@ -3550,7 +3550,7 @@ public class Attr extends JCTree.Visitor { * (i) parameter types must be identical to those of the target descriptor; (ii) return * types must be compatible with the return type of the expected descriptor. */ - void checkLambdaCompatible(JCLambda tree, Type descriptor, CheckContext checkContext) { + void checkLambdaCompatible(JCLambda tree, Type descriptor, TypeSymbol target, CheckContext checkContext) { Type returnType = checkContext.inferenceContext().asUndetVar(descriptor.getReturnType()); //return values have already been checked - but if lambda has no return @@ -3567,7 +3567,9 @@ public class Attr extends JCTree.Visitor { List argTypes = checkContext.inferenceContext().asUndetVars(descriptor.getParameterTypes()); if (!types.isSameTypes(argTypes, TreeInfo.types(tree.params))) { - checkContext.report(tree, diags.fragment(Fragments.IncompatibleArgTypesInLambda)); + checkContext.report(tree, diags.fragment(argTypes.size() != tree.params.size() + ? Fragments.WrongNumberArgsInLambda(target) + : Fragments.IncompatibleArgTypesInLambda(argTypes, TreeInfo.types(tree.params)))); } } @@ -5271,7 +5273,7 @@ public class Attr extends JCTree.Visitor { public void visitAnnotatedType(JCAnnotatedType tree) { attribAnnotationTypes(tree.annotations, env); Type underlyingType = attribTree(tree.underlyingType, env, resultInfo); - if (underlyingType.getTag() == PACKAGE) { + if (underlyingType.getTag() == PACKAGE || underlyingType.getTag() == VOID) { result = tree.type = underlyingType; } else { Type annotatedType = underlyingType.preannotatedType(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java index 9d3a7f6ab89..5cf5268665f 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java @@ -898,7 +898,7 @@ public class Check { } else if (!hasTrustMeAnno && varargElemType != null && !types.isReifiable(varargElemType)) { - warnUnchecked(tree.params.head.pos(), LintWarnings.UncheckedVarargsNonReifiableType(varargElemType)); + warnUnchecked(tree.params.last().pos(), LintWarnings.UncheckedVarargsNonReifiableType(varargElemType)); } } //where @@ -3698,10 +3698,11 @@ public class Check { log.warning(pos, LintWarnings.MissingDeprecatedAnnotation); } // Note: @Deprecated has no effect on local variables, parameters and package decls. - if (lint.isActive(LintCategory.DEPRECATION) && !s.isDeprecatableViaAnnotation()) { - if (!syms.deprecatedType.isErroneous() && s.attribute(syms.deprecatedType.tsym) != null) { - log.warning(pos, LintWarnings.DeprecatedAnnotationHasNoEffect(Kinds.kindName(s))); - } + if (lint.isActive(LintCategory.DEPRECATION) && !s.isDeprecatableViaAnnotation() && + (s.flags() & RECORD) == 0 && + !syms.deprecatedType.isErroneous() && + s.attribute(syms.deprecatedType.tsym) != null) { + log.warning(pos, LintWarnings.DeprecatedAnnotationHasNoEffect(Kinds.kindName(s))); } } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java index d16bbf2a2ee..89422ac4671 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java @@ -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 @@ -427,7 +427,7 @@ public class DeferredAttr extends JCTree.Visitor { ListBuffer stats = new ListBuffer<>(); stats.addAll(that.params); if (that.getBodyKind() == JCLambda.BodyKind.EXPRESSION) { - stats.add(make.Return((JCExpression)that.body)); + stats.add(make.at(that.pos).Return((JCExpression)that.body)); } else { stats.add((JCBlock)that.body); } @@ -444,7 +444,7 @@ public class DeferredAttr extends JCTree.Visitor { if (lambdaBody.hasTag(Tag.RETURN)) { lambdaBody = ((JCReturn)lambdaBody).expr; } - JCLambda speculativeLambda = make.Lambda(args, lambdaBody); + JCLambda speculativeLambda = make.at(that.pos).Lambda(args, lambdaBody); attr.preFlow(speculativeLambda); flow.analyzeLambda(env, speculativeLambda, make, false); return speculativeLambda; @@ -845,7 +845,7 @@ public class DeferredAttr extends JCTree.Visitor { if (descriptorType.getParameterTypes().length() != tree.params.length()) { checkContext.report(tree, - diags.fragment(Fragments.IncompatibleArgTypesInLambda)); + diags.fragment(Fragments.WrongNumberArgsInLambda(pt.tsym))); } Type currentReturnType = descriptorType.getReturnType(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java index 2a0bab1e330..a099d634073 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java @@ -223,15 +223,31 @@ public class ExhaustivenessComputer { private boolean checkCovered(Type seltype, Iterable patterns) { for (Type seltypeComponent : components(seltype)) { - for (PatternDescription pd : patterns) { - if(isBpCovered(seltypeComponent, pd)) { - return true; - } + if (isCoveredBy(seltypeComponent, patterns)) { + return true; } } return false; } + private boolean isCoveredBy(Type seltype, Iterable patterns) { + for (PatternDescription pd : patterns) { + if(isBpCovered(seltype, pd)) { + return true; + } + if (seltype.tsym.isSealed() && seltype.tsym.isAbstract()) { + boolean allDirectPermittedSubtypesPermitted = + directPermittedSubTypes(seltype) + .map(csym -> instantiatePatternType(seltype, csym)) + .allMatch(currentPermitted -> isCoveredBy(currentPermitted, patterns)); + + return allDirectPermittedSubtypesPermitted; + } + } + + return false; + } + private List components(Type seltype) { return switch (seltype.getTag()) { case CLASS -> { @@ -244,10 +260,10 @@ public class ExhaustivenessComputer { } yield List.nil(); } - yield List.of(types.erasure(seltype)); + yield List.of(seltype); } case TYPEVAR -> components(((TypeVar) seltype).getUpperBound()); - default -> List.of(types.erasure(seltype)); + default -> List.of(seltype); }; } @@ -371,6 +387,14 @@ public class ExhaustivenessComputer { } } + private Stream directPermittedSubTypes(Type type) { + List permitted = ((ClassSymbol) type.tsym).getPermittedSubclasses(); + + return permitted.stream() + .map(permittedType -> permittedType.tsym) + .filter(isApplicableSubtypePredicate(type)); + } + private Set leafPermittedSubTypes(TypeSymbol root, Predicate accept) { Set permitted = new HashSet<>(); List permittedSubtypesClosure = baseClasses(root); @@ -877,11 +901,8 @@ public class ExhaustivenessComputer { if (toExpand instanceof BindingPattern bp) { if (bp.type.tsym.isSealed()) { //try to replace binding patterns for sealed types with all their immediate permitted applicable types: - List permitted = ((ClassSymbol) bp.type.tsym).getPermittedSubclasses(); Set applicableDirectPermittedPatterns = - permitted.stream() - .map(type -> type.tsym) - .filter(isApplicableSubtypePredicate(targetType)) + directPermittedSubTypes(bp.type) .map(csym -> new BindingPattern(types.erasure(csym.type))) .collect(Collectors.toCollection(LinkedHashSet::new)); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java index f5e9bfcd7a8..6021dbd7057 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -635,7 +635,7 @@ public class Infer { //in the functional interface descriptors) List descParameterTypes = types.findDescriptorType(formalInterface).getParameterTypes(); if (descParameterTypes.size() != paramTypes.size()) { - checkContext.report(pos, diags.fragment(Fragments.IncompatibleArgTypesInLambda)); + checkContext.report(pos, diags.fragment(Fragments.WrongNumberArgsInLambda(funcInterface.tsym))); return types.createErrorType(funcInterface); } for (Type p : descParameterTypes) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java index d88180bb15c..692ccefa69e 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -2355,9 +2355,12 @@ public class Resolve { for (Symbol s : scope.getSymbolsByName(name)) { Symbol sym = loadClass(env, s.flatName(), recoveryLoadClass); if (bestSoFar.kind == TYP && sym.kind == TYP && - bestSoFar != sym) + bestSoFar != sym) { return new AmbiguityError(bestSoFar, sym); - else + } else if (env.toplevel.namedImportScope == scope && + (sym == typeNotFound || (sym.kind == ERR && s.kind == ERR))) { + bestSoFar = bestOf(bestSoFar, new UnresolvableGobalSymbolError(s)); + } else bestSoFar = bestOf(bestSoFar, sym); } return bestSoFar; @@ -4154,6 +4157,31 @@ public class Resolve { List typeargtypes); } + class UnresolvableGobalSymbolError extends InvalidSymbolError { + + UnresolvableGobalSymbolError(Symbol sym) { + super(HIDDEN, sym, "unresolvable class error"); + this.name = sym.name; + } + + @Override + JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind, + DiagnosticPosition pos, + Symbol location, + Type site, + Name name, + List argtypes, + List typeargtypes) { + //the error should have already been reported, ignore: + return null; + } + + @Override + public Symbol access(Name name, TypeSymbol location) { + return sym; + } + } + /** * This class is the root class of all resolution errors caused by * an invalid symbol being found during resolution. diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java index 11774c313e3..29a9bf3c8cb 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java @@ -244,16 +244,7 @@ public class TransPatterns extends TreeTranslator { JCExpression translatedExpr = translate(tree.expr); Symbol exprSym = TreeInfo.symbol(translatedExpr); - if (exprSym != null && - exprSym.kind == Kind.VAR && - exprSym.owner.kind.matches(Kinds.KindSelector.VAL_MTH)) { - currentValue = (VarSymbol) exprSym; - } else { - currentValue = new VarSymbol(Flags.FINAL | Flags.SYNTHETIC, - names.fromString("patt" + variableIndex++ + target.syntheticNameChar() + "temp"), - tempType, - currentMethodSym); - } + currentValue = generateTempOrReuse(exprSym, tempType); Type principalType = types.erasure(TreeInfo.primaryPatternType((pattern))); JCExpression resultExpression = (JCExpression) this.translate(pattern); @@ -283,6 +274,27 @@ public class TransPatterns extends TreeTranslator { } } + // Reuse a non-constant local or parameter for the type test expression; + // otherwise synthesize a temp, since constant locals may not have bytecode local slots. + private VarSymbol generateTempOrReuse(Symbol exprSym, Type tempType) { + VarSymbol exprVar = exprSym != null && + exprSym.kind == Kind.VAR && + exprSym.owner.kind.matches(Kinds.KindSelector.VAL_MTH) + ? (VarSymbol) exprSym + : null; + if (exprVar != null && exprVar.getConstValue() == null) { + return exprVar; + } + VarSymbol temp = new VarSymbol(Flags.FINAL | Flags.SYNTHETIC, + names.fromString("patt" + variableIndex++ + target.syntheticNameChar() + "temp"), + tempType, + currentMethodSym); + if (exprVar != null) { + temp.setData(exprVar.getConstantValue()); + } + return temp; + } + @Override public void visitAnyPattern(JCTree.JCAnyPattern that) { result = make.Literal(true); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java index 8648b929a04..251c0e381c0 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java @@ -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. * 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,8 +568,7 @@ public class TypeEnter implements Completer { * scope to add to. */ private void importNamed(DiagnosticPosition pos, final Symbol tsym, Env env, JCImport imp) { - if (tsym.kind == TYP) - imp.importScope = env.toplevel.namedImportScope.importType(tsym.owner.members(), tsym.owner.members(), tsym); + imp.importScope = env.toplevel.namedImportScope.importType(tsym.owner.members(), tsym.owner.members(), tsym); } } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java index 269d2f5de62..56dfd395aed 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java @@ -440,7 +440,7 @@ public class JavaCompiler { options.isSet(G_CUSTOM, "lines"); devVerbose = options.isSet("dev"); processPcks = options.isSet("process.packages"); - werrorAny = options.isSet(WERROR) || options.isSet(WERROR_CUSTOM, Option.LINT_CUSTOM_ALL); + werrorNonLint = options.isSet(WERROR) || options.isSet(WERROR_CUSTOM, Option.LINT_CUSTOM_ALL); werrorLint = options.getLintCategoriesOf(WERROR, LintCategory::newEmptySet); verboseCompilePolicy = options.isSet("verboseCompilePolicy"); @@ -510,9 +510,9 @@ public class JavaCompiler { */ protected boolean processPcks; - /** Switch: treat any kind of warning (lint or non-lint) as an error. + /** Switch: treat non-lint warnings as errors. Set by either "-Werror" or "-Werror:all". */ - protected boolean werrorAny; + protected boolean werrorNonLint; /** Switch: treat lint warnings in the specified {@link LintCategory}s as errors. */ @@ -583,7 +583,7 @@ public class JavaCompiler { public int errorCount() { log.reportOutstandingWarnings(); if (log.nerrors == 0 && log.nwarnings > 0 && - (werrorAny || werrorLint.clone().removeAll(log.lintWarnings))) { + ((werrorNonLint && log.nonLintWarnings > 0) || werrorLint.clone().removeAll(log.lintWarnings))) { log.error(Errors.WarningsAndWerror); } return log.nerrors; @@ -593,7 +593,7 @@ public class JavaCompiler { * Should warnings in the given lint category be treated as errors due to a {@code -Werror} flag? */ public boolean isWerror(LintCategory lc) { - return werrorAny || werrorLint.contains(lc); + return werrorLint.contains(lc); } protected final Queue stopIfError(CompileState cs, Queue queue) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java index f0c71818872..803451a0222 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java @@ -3433,9 +3433,17 @@ public class JavacParser implements Parser { case GT: typeDepth--; if (typeDepth == 0 && !peekToken(lookahead, DOT)) { - return peekToken(lookahead, LAX_IDENTIFIER) || - peekToken(lookahead, tk -> tk == LPAREN) ? PatternResult.PATTERN - : PatternResult.EXPRESSION; + if (peekToken(lookahead, LAX_IDENTIFIER) || + peekToken(lookahead, tk -> tk == LPAREN)) { + return PatternResult.PATTERN; + } + else if (peekToken(lookahead, LBRACKET) || + peekToken(lookahead, MONKEYS_AT)) { + break; + } + else { + return PatternResult.EXPRESSION; + } } else if (typeDepth < 0) return PatternResult.EXPRESSION; break; case MONKEYS_AT: diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties index edc35cf2805..57b4dac77bf 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -996,8 +996,15 @@ compiler.err.lambda.body.neither.value.nor.void.compatible=\ compiler.err.incompatible.thrown.types.in.mref=\ incompatible thrown types {0} in functional expression +# 0: list of type or message segment, 1: list of type or message segment compiler.misc.incompatible.arg.types.in.lambda=\ - incompatible parameter types in lambda expression + incompatible parameter types in lambda expression\n\ + required: {0}\n\ + found: {1} + +# 0: symbol +compiler.misc.wrong.number.args.in.lambda=\ + wrong number of parameters in lambda expression for functional interface {0} compiler.misc.incompatible.arg.types.in.mref=\ incompatible parameter types in method reference diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/Pretty.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/Pretty.java index c22dfd61637..f48bcaa8b7d 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/Pretty.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/Pretty.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ package com.sun.tools.javac.tree; import java.io.*; -import java.util.stream.Collectors; +import java.util.Optional; import com.sun.source.tree.MemberReferenceTree.ReferenceMode; import com.sun.source.tree.ModuleTree.ModuleKind; @@ -75,6 +75,10 @@ public class Pretty extends JCTree.Visitor { */ Name enclClassName; + /** The enclosing class flags. + */ + long enclClassFlags; + /** A table mapping trees to their documentation comments * (can be null) */ @@ -314,6 +318,22 @@ public class Pretty extends JCTree.Visitor { } } + /** Print record components. + */ + public void printRecordComponents(List stats) throws IOException { + print('('); + boolean first = true; + for (List l = stats; l.nonEmpty(); l = l.tail) { + if (isRecordComponent(l.head)) { + if (!first) { + print(", "); + } + printStat(l.head); + first = false; + } + } + print(')'); + } /** Print a block. */ public void printBlock(List stats) throws IOException { @@ -347,7 +367,25 @@ public class Pretty extends JCTree.Visitor { print(';'); println(); for (List l = stats; l.nonEmpty(); l = l.tail) { - if (!isEnumerator(l.head)) { + if (!isEnumerator(l.head) && (!sourceOutput || !isGeneratedDefaultConstructor(l.head))) { + align(); + printStat(l.head); + println(); + } + } + undent(); + align(); + print('}'); + } + + /** Print a block. + */ + public void printRecordBody(List stats) throws IOException { + print('{'); + println(); + indent(); + for (List l = stats; l.nonEmpty(); l = l.tail) { + if (!isRecordComponent(l.head) && (!sourceOutput || !isGeneratedDefaultConstructor(l.head))) { align(); printStat(l.head); println(); @@ -363,6 +401,21 @@ public class Pretty extends JCTree.Visitor { return t.hasTag(VARDEF) && (((JCVariableDecl) t).mods.flags & ENUM) != 0; } + /** Is the given tree a record component? */ + boolean isRecordComponent(JCTree t) { + return t.hasTag(VARDEF) && (((JCVariableDecl) t).mods.flags & RECORD) != 0; + } + + /** Is the given tree a compact record constructor? */ + boolean isCompactRecordConstructor(JCTree t) { + return t.hasTag(METHODDEF) && (((JCMethodDecl) t).mods.flags & COMPACT_RECORD_CONSTRUCTOR) != 0; + } + + /** Is the given tree a generated default constructor? */ + boolean isGeneratedDefaultConstructor(JCTree t) { + return t.hasTag(METHODDEF) && (((JCMethodDecl) t).mods.flags & GENERATEDCONSTR) != 0; + } + /** Print unit consisting of package clause and import statements in toplevel, * followed by class definition. if class definition == null, * print all definitions in toplevel. @@ -566,6 +619,8 @@ public class Pretty extends JCTree.Visitor { printFlags(tree.mods.flags & ~INTERFACE); Name enclClassNamePrev = enclClassName; enclClassName = tree.name; + long enclClassFlagsPrev = enclClassFlags; + enclClassFlags = tree.mods.flags; if ((tree.mods.flags & INTERFACE) != 0) { print("interface "); print(tree.name); @@ -581,10 +636,15 @@ public class Pretty extends JCTree.Visitor { } else { if ((tree.mods.flags & ENUM) != 0) print("enum "); + else if ((tree.mods.flags & RECORD) != 0) + print("record "); else print("class "); print(tree.name); printTypeParameters(tree.typarams); + if ((tree.mods.flags & RECORD) != 0) { + printRecordComponents(tree.defs); + } if (tree.extending != null) { print(" extends "); printExpr(tree.extending); @@ -601,10 +661,13 @@ public class Pretty extends JCTree.Visitor { print(' '); if ((tree.mods.flags & ENUM) != 0) { printEnumBody(tree.defs); + } else if ((tree.mods.flags & RECORD) != 0) { + printRecordBody(tree.defs); } else { printBlock(tree.defs); } enclClassName = enclClassNamePrev; + enclClassFlags = enclClassFlagsPrev; } catch (IOException e) { throw new UncheckedIOException(e); } @@ -627,26 +690,41 @@ public class Pretty extends JCTree.Visitor { print(' '); print(tree.name); } - print('('); - if (tree.recvparam!=null) { - printExpr(tree.recvparam); - if (tree.params.size() > 0) { - print(", "); + if (!isCompactRecordConstructor(tree)) { + print('('); + if (tree.recvparam!=null) { + printExpr(tree.recvparam); + if (tree.params.size() > 0) { + print(", "); + } + } + printExprs(tree.params); + print(')'); + if (tree.thrown.nonEmpty()) { + print(" throws "); + printExprs(tree.thrown); + } + if (tree.defaultValue != null) { + print(" default "); + printExpr(tree.defaultValue); } - } - printExprs(tree.params); - print(')'); - if (tree.thrown.nonEmpty()) { - print(" throws "); - printExprs(tree.thrown); - } - if (tree.defaultValue != null) { - print(" default "); - printExpr(tree.defaultValue); } if (tree.body != null) { print(' '); - printStat(tree.body); + if (tree.name == tree.name.table.names.init && + ((enclClassFlags & ENUM) != 0 || + (enclClassFlags & RECORD) != 0)) { + ListBuffer buf = new ListBuffer<>(); + for (List l = tree.body.stats; l.nonEmpty(); l = l.tail) { + // Filter out super constructor calls + if (!TreeInfo.isSuperCall(l.head)) { + buf.append(l.head); + } + } + printBlock(buf.toList()); + } else { + printStat(tree.body); + } } else { print(';'); } @@ -662,6 +740,7 @@ public class Pretty extends JCTree.Visitor { } printDocComment(tree); if ((tree.mods.flags & ENUM) != 0) { + printAnnotations(tree.mods.annotations); print("/*public static final*/ "); print(tree.name); if (tree.init != null) { @@ -676,7 +755,13 @@ public class Pretty extends JCTree.Visitor { } if (init.def != null && init.def.defs != null) { print(' '); - printBlock(init.def.defs); + ListBuffer buf = new ListBuffer<>(); + for (List l = init.def.defs; l.nonEmpty(); l = l.tail) { + if (!isGeneratedDefaultConstructor(l.head)) { + buf.append(l.head); + } + } + printBlock(buf.toList()); } return; }else { @@ -707,6 +792,11 @@ public class Pretty extends JCTree.Visitor { printExpr(tree.init); print(" */"); } + } else if ((tree.mods.flags & RECORD) != 0) { + printTypeAnnotations(tree.mods.annotations); + printExpr(tree.vartype); + print(' '); + print(tree.name); } else { printExpr(tree.mods); if ((tree.mods.flags & VARARGS) != 0) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java index 7fa2889c7d2..03657fb3876 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java @@ -41,6 +41,7 @@ import com.sun.tools.javac.api.DiagnosticFormatter.Configuration.DiagnosticPart; import com.sun.tools.javac.api.DiagnosticFormatter.Configuration.MultilineLimit; import com.sun.tools.javac.api.DiagnosticFormatter.PositionKind; import com.sun.tools.javac.api.Formattable; +import com.sun.tools.javac.code.Attribute; import com.sun.tools.javac.code.Lint.LintCategory; import com.sun.tools.javac.code.Printer; import com.sun.tools.javac.code.Source; @@ -230,6 +231,9 @@ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter return messages.getLocalizedString(l, "compiler.misc.tree.tag." + StringUtils.toLowerCase(tag.name())); } + else if (arg instanceof Attribute.Compound compound) { + return printer.printAnnotation(compound, l); + } else { return String.valueOf(arg); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java index 83f9b7d247a..bb5a78040ed 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java @@ -591,6 +591,10 @@ public class Log extends AbstractLog { */ public int nwarnings = 0; + /** The total number of non-lint warnings encountered so far. + */ + public int nonLintWarnings = 0; + /** Tracks whether any warnings have been encountered in each {@link LintCategory}. */ public final EnumSet lintWarnings = LintCategory.newEmptySet(); @@ -921,6 +925,7 @@ public class Log extends AbstractLog { lintWarnings.clear(); nerrors = 0; nwarnings = 0; + nonLintWarnings = 0; nsuppressederrors = 0; nsuppressedwarns = 0; while (diagnosticHandler.prev != null) @@ -1024,7 +1029,7 @@ public class Log extends AbstractLog { nwarnings++; Optional.of(diag) .map(JCDiagnostic::getLintCategory) - .ifPresent(lintWarnings::add); + .ifPresentOrElse(lintWarnings::add, () -> nonLintWarnings++); break; case ERROR: nerrors++; @@ -1164,6 +1169,7 @@ public class Log extends AbstractLog { } prompt(); nwarnings++; + nonLintWarnings++; warnWriter.flush(); } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/aarch64/LinuxAARCH64CFrame.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/aarch64/LinuxAARCH64CFrame.java index c55aca2155c..5e8995464e6 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/aarch64/LinuxAARCH64CFrame.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/aarch64/LinuxAARCH64CFrame.java @@ -109,6 +109,17 @@ public final class LinuxAARCH64CFrame extends DwarfCFrame { }; } + private JavaThread getJavaThreadFromThreadProxy(ThreadProxy tp) { + Threads threads = VM.getVM().getThreads(); + for (int i = 0; i < threads.getNumberOfThreads(); i++) { + var jthread = threads.getJavaThreadAt(i); + if (tp.equals(jthread.getThreadProxy())) { + return jthread; + } + } + throw new DebuggerException("JavaThread not found"); + } + @Override public CFrame sender(ThreadProxy thread, Address senderSP, Address senderFP, Address senderPC) { if (linuxDbg().isSignalTrampoline(pc())) { @@ -131,15 +142,25 @@ public final class LinuxAARCH64CFrame extends DwarfCFrame { CodeCache cc = VM.getVM().getCodeCache(); CodeBlob currentBlob = cc.findBlobUnsafe(pc()); - // This case is different from HotSpot. See JDK-8371194 for details. - if (currentBlob != null && (currentBlob.isContinuationStub() || currentBlob.isNativeMethod())) { - // Use FP since it should always be valid for these cases. - // TODO: These should be walked as Frames not CFrames. - senderSP = fp().addOffsetTo(2 * VM.getVM().getAddressSize()); - } else { - CodeBlob codeBlob = cc.findBlobUnsafe(senderPC); - boolean useCodeBlob = codeBlob != null && codeBlob.getFrameSize() > 0; - senderSP = useCodeBlob ? senderFP.addOffsetTo((2 * VM.getVM().getAddressSize()) - codeBlob.getFrameSize()) : getSenderSP(null); + // This case is different from HotSpot. See JDK-8371194 and JDK-8382548 for details. + if (currentBlob == null) { // current frame is native + senderSP = getSenderSP(null); + } else { // current frame is Java + if (currentBlob.isContinuationStub()) { + var jthread = getJavaThreadFromThreadProxy(thread); + var contEntry = Continuation.getContinuationEntryForSP(jthread, sp()); + senderSP = contEntry.getEntrySP(); + senderFP = contEntry.getEntryFP(); + senderPC = contEntry.getEntryPC(); + } else if (currentBlob.getFrameSize() == 0) { + senderSP = fp().addOffsetTo(2 * VM.getVM().getAddressSize()); + } else { + // Calculate sender SP and FP without FP + // because we cannot believe FP if PreserveFramePointer is disabled. + senderSP = sp().addOffsetTo(currentBlob.getFrameSize()); + senderFP = senderSP.getAddressAt(-2 * VM.getVM().getAddressSize()); + senderPC = senderSP.getAddressAt(- VM.getVM().getAddressSize()); + } } } if (senderSP == null) { diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java index 1e061568bc4..d661eb0eb2c 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -401,7 +401,11 @@ public class Bytecodes { public static boolean isZeroConst (int code) { return (code == _aconst_null || code == _iconst_0 || code == _fconst_0 || code == _dconst_0); } - public static boolean isFieldCode (int code) { return (_getstatic <= code && code <= _putfield); } + public static boolean isFieldCode (int code) { + return (_getstatic <= code && code <= _putfield) || + (_fast_agetfield <= code && code <= _fast_sputfield) || + (_nofast_getfield <= code && code <= _nofast_putfield); + } static int flags (int code, boolean is_wide) { assert code == (code & 0xff) : "must be a byte"; diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/AbstractVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/AbstractVector.java index ea8112cc2ae..4efd0d24af9 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/AbstractVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/AbstractVector.java @@ -184,7 +184,7 @@ abstract sealed class AbstractVector extends Vector } @ForceInline - protected static VectorShuffle normalizeSubLanesForSpecies(AbstractSpecies targetSpecies, int subLanesPerSrc) { + static VectorShuffle normalizeSubLanesForSpecies(AbstractSpecies targetSpecies, int subLanesPerSrc) { final int lanes = targetSpecies.laneCount(); if ((lanes % subLanesPerSrc) != 0) { @@ -205,7 +205,7 @@ abstract sealed class AbstractVector extends Vector } @ForceInline - protected final int subLanesToSwap(AbstractSpecies srcSpecies) { + final int subLanesToSwap(AbstractSpecies srcSpecies) { if (java.nio.ByteOrder.nativeOrder() != ByteOrder.BIG_ENDIAN) { return -1; } @@ -388,14 +388,14 @@ abstract sealed class AbstractVector extends Vector AbstractSpecies rsp = (AbstractSpecies) toSpecies; AbstractSpecies vsp = vspecies(); if (part == 0) { - // Works the same for in-place, expand, or contract. + // Works the same for in-place, selection (truncation) and insertion (padding) return convert0('X', rsp); } else { int origin = shapeChangeOrigin(vsp, rsp, false, part); //System.out.println("*** origin = "+origin+", part = "+part+", reinterpret"); - if (part > 0) { // Expansion: slice first then cast. + if (part > 0) { // Selection (truncation): slice first then cast. return slice(origin).convert0('X', rsp); - } else { // Contraction: cast first then unslice. + } else { // Insertion (padding): cast first then unslice. return rsp.zero().slice(rsp.laneCount() - origin, convert0('X', rsp)); } @@ -421,7 +421,7 @@ abstract sealed class AbstractVector extends Vector AbstractSpecies vsp = vspecies(); char kind = c.kind(); switch (kind) { - case 'C': // Regular cast conversion, known to the JIT. + case 'C': // Regular cast conversion. break; case 'I': // Identity conversion => reinterpret. assert(c.sizeChangeLog2() == 0); @@ -444,14 +444,14 @@ abstract sealed class AbstractVector extends Vector vsp.check(c.domain()); // apply dynamic check to conv rsp.check(c.range()); // apply dynamic check to conv if (part == 0) { - // Works the same for in-place, expand, or contract. + // Works the same for in-place, selection (truncation) and insertion (padding) return convert0(kind, rsp); } else { int origin = shapeChangeOrigin(vsp, rsp, true, part); //System.out.println("*** origin = "+origin+", part = "+part+", lanewise"); - if (part > 0) { // Expansion: slice first then cast. + if (part > 0) { // Selection (truncation): slice first then cast. return slice(origin).convert0(kind, rsp); - } else { // Contraction: cast first then unslice. + } else { // Insertion (padding): cast first then unslice. return rsp.zero().slice(rsp.laneCount() - origin, convert0(kind, rsp)); } @@ -461,15 +461,15 @@ abstract sealed class AbstractVector extends Vector /** * Check a part number and return it multiplied by the appropriate * block factor to yield the origin of the operand block, as a - * lane number. For expansions the origin is reckoned in the - * domain vector, since the domain vector has too much information - * and must be sliced. For contractions the origin is reckoned in - * the range vector, since the range vector has too many lanes and - * the result must be unsliced at the same position as the inverse - * expansion. If the conversion is lanewise, then lane sizes may - * be changing as well. This affects the logical size of the - * result, and so the domain size is multiplied or divided by the - * lane size change. + * lane number. For selection (truncation) the origin is reckoned + * in the domain vector, since the domain vector has too much + * information and must be sliced. For insertion (padding) the + * origin is reckoned in the range vector, since the range vector + * has too many lanes and the result must be unsliced at the same + * position as the inverse selection. If the conversion is lanewise, + * then lane sizes may be changing as well. This affects the logical + * size of the result, and so the domain size is multiplied or + * divided by the lane size change. */ /*package-private*/ @ForceInline @@ -478,38 +478,65 @@ abstract sealed class AbstractVector extends Vector AbstractSpecies rsp, boolean lanewise, int part) { + // domain / input: X -> ETYPE + // logical result: f(X) -> FTYPE + // range / physical output: Y -> FTYPE int domSizeLog2 = dsp.vectorShape.vectorBitSizeLog2; int phySizeLog2 = rsp.vectorShape.vectorBitSizeLog2; + // Logical expansion ratio = ML + // lanewise=true (logical lanewise conversion) + // -> ML = phyElementSize / domElementSize + // lanewise=false (reinterpret) + // -> ML = 1 int laneChangeLog2 = 0; if (lanewise) { laneChangeLog2 = (rsp.laneType.elementSizeLog2 - dsp.laneType.elementSizeLog2); } + // ML = |f(X)| / |X| + // -> |f(X)| = |X| * ML int resSizeLog2 = domSizeLog2 + laneChangeLog2; - // resSizeLog2 = 0 => 1-lane vector shrinking to 1-byte lane-size - // resSizeLog2 < 0 => small vector shrinking by more than a lane-size + // resSizeLog2 = 0 => logical result only has a single byte + // e.g. cast L64 (1-element long) to B8 (1-element byte) + // resSizeLog2 < 0 => logical result has less than a byte -> impossible! + // currently, all vectors start with at least 8 bytes, + // and we can contract by at most a factor of 8. assert(resSizeLog2 >= 0); - // Expansion ratio: expansionLog2 = resSizeLog2 - phySizeLog2; if (!partInRange(resSizeLog2, phySizeLog2, part)) { // fall through... } else if (resSizeLog2 > phySizeLog2) { - // Expansion by M means we must slice a block from the domain. - // What is that block size? It is 1/M of the domain. - // Let's compute the log2 of that block size, as 's'. - //s = (dsp.laneCountLog2() - expansionLog2); - //s = ((domSizeLog2 - dsp.laneType.elementSizeLog2) - expansionLog2); - //s = (domSizeLog2 - expansionLog2 - dsp.laneType.elementSizeLog2); + // Selection (truncation). + // Output selection ratio: + // MS = |f(X)| / |Y| + // + // We must slice one of MS blocks from the domain. + // The block has L lanes: + // L = X.length / MS + // = (|X| / |ETYPE|) / MS + // = (|X| / |ETYPE|) / (|f(X)| / |Y|) + // = |Y| / (|f(X)| / |X|) / |ETYPE| + // = |Y| / ML / |ETYPE| + // + // origin = part * L + // int s = phySizeLog2 - laneChangeLog2 - dsp.laneType.elementSizeLog2; // Scale the part number by the input block size, in input lanes. if ((s & 31) == s) // sanity check return part << s; } else { - // Contraction by M means we must drop a block into the range. - // What is that block size? It is 1/M of the range. - // Let's compute the log2 of that block size, as 's'. - //s = (rsp.laneCountLog2() + expansionLog2); - //s = ((phySizeLog2 - rsp.laneType.elementSizeLog2) + expansionLog2); - //s = (phySizeLog2 + expansionLog2 - rsp.laneType.elementSizeLog2); + // Insertion (padding). + // Output expansion ratio: + // MO = |Y| / |f(X)| + // + // We must drop the logical result into one of MO blocks of the range. + // The block has L lanes: + // L = Y.length / MO + // = (|Y| / |FTYPE|) / MO + // = (|Y| / |FTYPE|) / (|Y| / |f(X)|) + // = |f(X)| / |FTYPE| + // + // origin = -part * L + // int s = resSizeLog2 - rsp.laneType.elementSizeLog2; // Scale the part number by the output block size, in output lanes. if ((s & 31) == s) // sanity check @@ -537,37 +564,89 @@ abstract sealed class AbstractVector extends Vector } private static boolean partInRangeSlow(int resSizeLog2, int phySizeLog2, int part) { - if (resSizeLog2 > phySizeLog2) { // expansion - int limit = 1 << (resSizeLog2 - phySizeLog2); - return part >= 0 && part < limit; - } else if (resSizeLog2 < phySizeLog2) { // contraction - int limit = 1 << (phySizeLog2 - resSizeLog2); - return part > -limit && part <= 0; - } else { + int limit = partLimit(resSizeLog2, phySizeLog2); + if (limit > 0) { // selection (output is truncation of logical result) + return 0 <= part && part < limit; + } else if (limit < 0) { // insertion (output is logical result with padding) + return limit < part && part <= 0; + } else { // in-place return (part == 0); } } + private static int partLimit(int resSizeLog2, int phySizeLog2) { + if (resSizeLog2 > phySizeLog2) { // selection (truncation) + return 1 << (resSizeLog2 - phySizeLog2); + } else if (resSizeLog2 < phySizeLog2) { // insertion (padding) + return -1 << (phySizeLog2 - resSizeLog2); + } else { // in-place + return 0; + } + } + private static ArrayIndexOutOfBoundsException wrongPart(AbstractSpecies dsp, AbstractSpecies rsp, boolean lanewise, int part) { - String laneChange = ""; - String converting = "converting"; - int dsize = dsp.elementSize(), rsize = rsp.elementSize(); - if (!lanewise) { - converting = "reinterpreting"; - } else if (dsize < rsize) { - laneChange = String.format(" (lanes are expanding by %d)", - rsize / dsize); - } else if (dsize > rsize) { - laneChange = String.format(" (lanes are contracting by %d)", - dsize / rsize); + // domain / input: X -> ETYPE + // logical result: f(X) -> FTYPE + // range / physical output: Y -> FTYPE + int domSizeLog2 = dsp.vectorShape.vectorBitSizeLog2; + int phySizeLog2 = rsp.vectorShape.vectorBitSizeLog2; + + // ------------------- Logical Expansion ---------------- + int laneChangeLog2 = 0; + String logicalOp = null; + if (lanewise) { + // Logical lanewise conversion + // ML = |FTYPE| / |ETYPE| = phyElementSize / domElementSize + laneChangeLog2 = (rsp.laneType.elementSizeLog2 - + dsp.laneType.elementSizeLog2); + if (laneChangeLog2 > 0) { + String ML = String.format("%d", 1 << laneChangeLog2); + logicalOp = String.format("conversion lanewise expanding by ML=%s", ML); + } else if (laneChangeLog2 < 0) { + String ML = String.format("1/%d", 1 << -laneChangeLog2); + logicalOp = String.format("conversion lanewise contracting by ML=%s", ML); + } else { + logicalOp = "conversion lanewise in-place (ML=1)"; + } + } else { + // Logical reinterpret + laneChangeLog2 = 0; + logicalOp = "reinterpreting (ML=1)"; } - String msg = String.format("bad part number %d %s %s -> %s%s", - part, converting, dsp, rsp, laneChange); + + // ------------------- Physical Expansion ---------------- + String physicalOp = null; + if (domSizeLog2 < phySizeLog2) { + String MP = String.format("%d", 1 << (phySizeLog2 - domSizeLog2)); + physicalOp = String.format("expansion by MP=%s", MP); + } else if (phySizeLog2 < domSizeLog2) { + String MP = String.format("1/%d", 1 << (domSizeLog2 - phySizeLog2)); + physicalOp = String.format("contraction by MP=%s", MP); + } else { + physicalOp = "shape-invariant (MP=1)"; + } + + // ---------- Output Expansion (Select/Insert) ------------ + int limit = partLimit(domSizeLog2 + laneChangeLog2, phySizeLog2); + String outputOp = null; + String partRange = null; + if (limit < -1) { + outputOp = String.format("output insertion with MO=%d", -limit); + partRange = String.format("in [%d..0]", limit+1); + } else if (limit > 1) { + outputOp = String.format("output selection with MS=%d", limit); + partRange = String.format("in [0..%d]", limit-1); + } else { + outputOp = "output in-place (MO=MS=1)"; + partRange = "0"; + } + String msg = String.format("bad part number %d should be %s, %s; logical: %s; physical: %s; %s -> %s.", + part, partRange, outputOp, logicalOp, physicalOp, dsp, rsp); return new ArrayIndexOutOfBoundsException(msg); } diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java index 7231ada3273..2d770a723ad 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java @@ -2369,6 +2369,9 @@ public abstract sealed class ByteVector extends AbstractVector ByteVector that = (ByteVector) w; that.check(this); Objects.checkIndex(origin, length() + 1); + if ((-2 & part) != 0) { + throw wrongPartForSlice(part); + } ByteVector iotaVector = (ByteVector) iotaShuffle().toBitsVector(); ByteVector filter = broadcast((byte)origin); VectorMask blendMask = iotaVector.compare((part == 0) ? VectorOperators.GE : VectorOperators.LT, filter); diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java index 6f9b5e53ead..62a9ad1d317 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java @@ -2223,6 +2223,9 @@ public abstract sealed class DoubleVector extends AbstractVector DoubleVector that = (DoubleVector) w; that.check(this); Objects.checkIndex(origin, length() + 1); + if ((-2 & part) != 0) { + throw wrongPartForSlice(part); + } LongVector iotaVector = (LongVector) iotaShuffle().toBitsVector(); LongVector filter = LongVector.broadcast((LongVector.LongSpecies) vspecies().asIntegral(), (long)origin); VectorMask blendMask = iotaVector.compare((part == 0) ? VectorOperators.GE : VectorOperators.LT, filter).cast(vspecies()); diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/FloatVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/FloatVector.java index cdf2532e4d9..78c9ee7a570 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/FloatVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/FloatVector.java @@ -2235,6 +2235,9 @@ public abstract sealed class FloatVector extends AbstractVector FloatVector that = (FloatVector) w; that.check(this); Objects.checkIndex(origin, length() + 1); + if ((-2 & part) != 0) { + throw wrongPartForSlice(part); + } IntVector iotaVector = (IntVector) iotaShuffle().toBitsVector(); IntVector filter = IntVector.broadcast((IntVector.IntSpecies) vspecies().asIntegral(), (int)origin); VectorMask blendMask = iotaVector.compare((part == 0) ? VectorOperators.GE : VectorOperators.LT, filter).cast(vspecies()); diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java index 37b7e3eeae4..f1218112be5 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java @@ -2354,6 +2354,9 @@ public abstract sealed class IntVector extends AbstractVector IntVector that = (IntVector) w; that.check(this); Objects.checkIndex(origin, length() + 1); + if ((-2 & part) != 0) { + throw wrongPartForSlice(part); + } IntVector iotaVector = (IntVector) iotaShuffle().toBitsVector(); IntVector filter = broadcast((int)origin); VectorMask blendMask = iotaVector.compare((part == 0) ? VectorOperators.GE : VectorOperators.LT, filter); diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java index 36300cf892b..7682616b984 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java @@ -2220,6 +2220,9 @@ public abstract sealed class LongVector extends AbstractVector LongVector that = (LongVector) w; that.check(this); Objects.checkIndex(origin, length() + 1); + if ((-2 & part) != 0) { + throw wrongPartForSlice(part); + } LongVector iotaVector = (LongVector) iotaShuffle().toBitsVector(); LongVector filter = broadcast((long)origin); VectorMask blendMask = iotaVector.compare((part == 0) ? VectorOperators.GE : VectorOperators.LT, filter); diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java index 21bc80a12bc..a9184d1faa9 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java @@ -2370,6 +2370,9 @@ public abstract sealed class ShortVector extends AbstractVector ShortVector that = (ShortVector) w; that.check(this); Objects.checkIndex(origin, length() + 1); + if ((-2 & part) != 0) { + throw wrongPartForSlice(part); + } ShortVector iotaVector = (ShortVector) iotaShuffle().toBitsVector(); ShortVector filter = broadcast((short)origin); VectorMask blendMask = iotaVector.compare((part == 0) ? VectorOperators.GE : VectorOperators.LT, filter); diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Vector.java b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Vector.java index 85b3bbca269..4e064e0af37 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Vector.java +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Vector.java @@ -91,7 +91,7 @@ import java.util.Arrays; * * Other lane-wise operations, such as the {@code min} operator, are defined as a * partially serviced (not a full-service) named operation, where a corresponding - * method on {@code Vector} and/or a subclass provide some but all possible + * method on {@code Vector} and/or a subclass provide some but not all possible * overloadings and overrides (commonly the unmasked variant with scalar-broadcast * overloadings). * @@ -255,6 +255,8 @@ import java.util.Arrays; * the resulting expansions and contractions are handled explicitly * with * special conventions. + * These special conventions also apply to shape-changing + * methods, which may change {@code VLENGTH} as well as {@code VSHAPE}. * *

    Vector operations can be grouped into various categories and * their behavior can be generally specified in terms of underlying @@ -365,7 +367,7 @@ import java.util.Arrays; *

    Unlike other lane-wise operations, conversions can change lane * type, from the input (domain) type to the output (range) type. The * lane size may change along with the type. In order to manage the - * size changes, lane-wise conversion methods can product partial + * size changes, lane-wise conversion methods can produce partial * results, under the control of a {@code part} parameter, which * is explained elsewhere. * (Following the example above, the second group of converted lane @@ -383,15 +385,15 @@ import java.util.Arrays; * int part = ...; // 0 or 1 * VectorShape VSHAPE = a.shape(); * double[] arlogical = new double[VLENGTH]; - * for (int i = 0; i < limit; i++) { + * for (int i = 0; i < a.length(); i++) { * int e = a.lane(i); * arlogical[i] = (double) e; * } * VectorSpecies rs = VSHAPE.withLanes(double.class); - * int M = Double.BITS / Integer.BITS; // expansion factor - * int offset = part * (VLENGTH / M); + * int ML = Double.BITS / Integer.BITS; // 2x logical expansion + * assert rs.length() == VLENGTH / ML; // output has 2x fewer lanes + * int offset = part * rs.length(); * DoubleVector r = DoubleVector.fromArray(rs, arlogical, offset); - * assert r.length() == VLENGTH / M; * } *

  • * @@ -812,193 +814,260 @@ import java.util.Arrays; * Shape-invariance means that {@code VSHAPE} is constant for typical * computations. Keeping the same shape throughout a computation * helps ensure that scarce vector resources are efficiently used. + * * (On some hardware platforms shape changes could cause unwanted * effects like extra data movement instructions, round trips through * memory, or pipeline bubbles.) * - *

    Tension between these principles arises when an operation + *

    Tension between the above principles arises when an operation * produces a logical result that is too large for the - * required output {@code VSHAPE}. In other cases, when a logical + * required physical output {@code VSHAPE}, so a part of the logical + * result must be selected to deliver into the physical output. + * In such cases it is an open question of which part to select. + * In other cases, when a logical * result is smaller than the capacity of the output {@code VSHAPE}, - * the positioning of the logical result is open to question, since + * the whole logical result must be inserted into a part + * of the physical output. + * In this case the insertion position is open to question, since * the physical output vector must contain a mix of logical result and * padding. + * It might seem preferable if the Vector API would work at a higher + * level, picking new shapes on the fly as it keeps {@code VLENGTH} + * constant, but this would be a less portable design. * - *

    In the first case, of a too-large logical result being crammed - * into a too-small output {@code VSHAPE}, we say that data has - * expanded. In other words, an expansion operation - * has caused the output shape to overflow. Symmetrically, in the - * second case of a small logical result fitting into a roomy output - * {@code VSHAPE}, the data has contracted, and the - * contraction operation has required the output shape to pad - * itself with extra zero lanes. + *

    (Some platforms do support a rich variety of vector shapes, and + * can also natively express logical expansions and contractions of + * lanewise data, transparently adjusting vector shapes on the fly. + * But not all platforms have enough shapes to pull this off well. + * And in extreme cases a shape change is physically impossible, + * because the logical result would be just too large or too small to + * be matched by any available vector shape. So the Vector API + * only changes shapes in a method documented as shape-changing, and + * the user must supply the new shape explicitly.) * - *

    In both cases we can speak of a parameter {@code M} which - * measures the expansion ratio or contraction ratio - * between the logical result size (in bits) and the bit-size of the - * actual output shape. When vector shapes are changed, and lane - * sizes are not, {@code M} is just the integral ratio of the output - * shape to the logical result. (With the possible exception of - * the {@linkplain VectorShape#S_Max_BIT maximum shape}, all vector - * sizes are powers of two, and so the ratio {@code M} is always - * an integer. In the hypothetical case of a non-integral ratio, - * the value {@code M} would be rounded up to the next integer, - * and then the same general considerations would apply.) + *

    In a nutshell, we would prefer to keep both {@code VSHAPE} and + * {@code VLENGTH} constant in a block of vector code, but size + * changes sometimes require compromises. Here are some + * definitions to help navigate the complexity of such compromises: * - *

    If the logical result is larger than the physical output shape, - * such a shape change must inevitably drop result lanes (all but - * {@code 1/M} of the logical result). If the logical size is smaller - * than the output, the shape change must introduce zero-filled lanes - * of padding (all but {@code 1/M} of the physical output). The first - * case, with dropped lanes, is an expansion, while the second, with - * padding lanes added, is a contraction. + *

    • The input shape of a vector operation is the + * shape of the input vector {@code X} which receives the method call. + * Any other vector arguments have the same input shape. * - *

      Similarly, consider a lane-wise conversion operation which - * leaves the shape invariant but changes the lane size by a ratio of - * {@code M}. If the logical result is larger than the output (or - * input), this conversion must reduce the {@code VLENGTH} lanes of the - * output by {@code M}, dropping all but {@code 1/M} of the logical - * result lanes. As before, the dropping of lanes is the hallmark of - * an expansion. A lane-wise operation which contracts lane size by a - * ratio of {@code M} must increase the {@code VLENGTH} by the same - * factor {@code M}, filling the extra lanes with a zero padding - * value; because padding must be added this is a contraction. + *

    • The physical output shape of a vector operation + * is the shape of the output, the vector {@code Y} produced + * by the method call. It is usually the same as the input shape, + * but may differ in the case of a shape-changing method. + * (Note: We are talking about the "physics" of an object-oriented + * API here, a computational structure which is easily compiled to + * various kinds of hardware, but not itself a hardware specification. + * The Vector API does not guarantee that a 128-bit vector shape + * will always be represented by a 128-bit hardware register, + * although it is a good guess that the compiler will do this. + * The truly physical hardware registers are invisible here.) * - *

      It is also possible (though somewhat confusing) to change both - * lane size and container size in one operation which performs both - * lane conversion and reshaping. If this is done, the same - * rules apply, but the logical result size is the product of the - * input size times any expansion or contraction ratio from the lane - * change size. + *

    • The logical result {@code f(X)} of a vector + * operation is the mathematical result of applying the operation + * {@code f} to the input vector {@code X} without regard to output shape. + * For a lane-wise + * operation, the logical output is simply the logical concatenation + * of the lane-wise results, using the result type. In general this + * logical result may overflow or underflow the capacity of any given + * output shape. There might not be an available output shape which + * could store the logical result. * - *

      For completeness, we can also speak of in-place - * operations for the frequent case when resizing does not occur. - * With an in-place operation, the data is simply copied from logical - * output to its physical container with no truncation or padding. - * The ratio parameter {@code M} in this case is unity. + *

    • The logical expansion ratio {@code ML} of a + * vector operation is the bit-size ratio {@code |f(X)|/|X|} of the + * logical result to the input shape. It may be an integer or the + * reciprocal of an integer, respectively depending on whether the logical + * operation is expanding or contracting. * - *

      Note that the classification of contraction vs. expansion - * depends on the relative sizes of the logical result and the - * physical output container. The size of the input container may be - * larger or smaller than either of the other two values, without - * changing the classification. For example, a conversion from a - * 128-bit shape to a 256-bit shape will be a contraction in many - * cases, but it would be an expansion if it were combined with a - * conversion from {@code byte} to {@code long}, since in that case - * the logical result would be 1024 bits in size. This example also - * illustrates that a logical result does not need to correspond to - * any particular platform-supported vector shape. + *

    • Given an output vector {@code Y}, + * the physical expansion ratio {@code MP} of a + * vector operation is the bit-size ratio {@code |Y|/|X|} of physical + * output shape to the original input shape. It measures the net + * shape change without regard to the logical operation. In the case + * of a bitwise reinterpretation method, it is the only ratio of + * interest. * - *

      Although lane-wise masked operations can be viewed as producing - * partial operations, they are not classified (in this API) as - * expansions or contractions. A masked load from an array surely - * produces a partial vector, but there is no meaningful "logical - * output vector" that this partial result was contracted from. + *

    • The output expansion ratio {@code MO} is the net + * bit-size ratio {@code MO=MP/ML=|Y|/|f(X)|}, measuring the size of + * the physical output shape relative to the logical result. * - *

      Some care is required with these terms, because it is the - * data, not the container size, that is expanding - * or contracting, relative to the size of its output container. - * Thus, resizing a 128-bit input into 512-bit vector has the effect - * of a contraction. Though the 128 bits of payload hasn't - * changed in size, we can say it "looks smaller" in its new 512-bit - * home, and this will capture the practical details of the situation. + *

    • The output selection ratio {@code MS} is the + * reciprocal of the output expansion ratio: {@code MS=1/MO=ML/MP}. * - *

      If a vector method might expand its data, it accepts an extra - * {@code int} parameter called {@code part}, or the "part number". - * The part number must be in the range {@code [0..M-1]}, where - * {@code M} is the expansion ratio. The part number selects one - * of {@code M} contiguous disjoint equally-sized blocks of lanes - * from the logical result and fills the physical output vector - * with this block of lanes. + *

    • An in-place operation ({@code MO=MS=1}) occurs + * when the logical result and the physical output shape are the same + * size. When this happens, the logical and output expansion ratios + * are also identical ({@code ML=MP}). The logical result is simply + * copied into the physical output with no truncation or padding. + * An in-place lanewise operation leaves {@code VLENGTH} unchanged. + * An in-place operation does not have to be shape-invariant, as the + * input shape may differ from the logical and output shape. * - *

      Specifically, the lanes selected from the logical result of an - * expansion are numbered in the range {@code [R..R+L-1]}, where - * {@code L} is the {@code VLENGTH} of the physical output vector, and - * the origin of the block, {@code R}, is {@code part*L}. + *

    • Selection ({@code MS>1}, {@code MO<1}) occurs + * when the physical output shape, the shape of vector {@code Y}, is smaller than the logical + * result {@code f(X)}. One of {@code MS} distinct parts from + * {@code f(X)} is selected and copied to {@code Y}. + * The rest of {@code f(X)} is lost. + * The {@code part} number in the range {@code [0..MS-1]} + * selects lanes {@code [R..R+L-1]} of {@code f(X)}, where + * {@code L=VLENGTH(f(X))/MS=VLENGTH(Y)} and {@code R=part*L}. + * If the user wants all parts of {@code f(X)}, the operation + * has to be repeated {@code MS} times, with a different + * part each time. * - *

      A similar convention applies to any vector method that might - * contract its data. Such a method also accepts an extra part number - * parameter (again called {@code part}) which steers the contracted - * data lanes one of {@code M} contiguous disjoint equally-sized - * blocks of lanes in the physical output vector. The remaining lanes - * are filled with zero, or as specified by the method. + *

    • Insertion ({@code MO>1}, {@code MS<1}) occurs + * when the physical output shape, the shape of vector {@code Y}, is larger than the logical + * result {@code f(X)}. {@code f(X)} is copied to one of {@code MO} + * distinct parts in {@code Y}. + * The rest of {@code Y} is padded with zero bits. + * The {@code part} number in the range {@code [-MO+1..0]} + * chooses lanes {@code [R..R+L-1]} of {@code Y}, where + * {@code L=VLENGTH(f(X))=VLENGTH(Y)/MO} and {@code R=|part|*L}. + * If the user wants a fully populated output vector, the operation + * has to be repeated on {@code MO} input vectors, selecting a + * different part of the output for insertion each time, and + * using the {@linkplain VectorOperators#XOR bitwise XOR} + * (or {@link VectorOperators#FIRST_NONZERO FIRST_NONZERO} + * for floating point) to combine the outputs. + *
    * - *

    Specifically, the data is steered into the lanes numbered in the - * range {@code [R..R+L-1]}, where {@code L} is the {@code VLENGTH} of - * the logical result vector, and the origin of the block, {@code R}, - * is again a multiple of {@code L} selected by the part number, - * specifically {@code |part|*L}. + *

    Examples (more in the table further below): + *

      + *
    • Conversion {@code int[4]:128 -> float[4]:128}: + * invariant lane size (lanewise in-place, {@code ML=1}), + * shape-invariant ({@code MP=1}). + * The conversion is length-invariant, so + * no selection or insertion (in-place, {@code MO=MS=1}). * - *

      In the case of a contraction, the part number must be in the - * non-positive range {@code [-M+1..0]}. This convention is adopted - * because some methods can perform both expansions and contractions, - * in a data-dependent manner, and the extra sign on the part number - * serves as an error check. If vector method takes a part number and - * is invoked to perform an in-place operation (neither contracting - * nor expanding), the {@code part} parameter must be exactly zero. + *

    • Conversion {@code byte[16]:128 -> long[2]:128}: + * expanding lane size ({@code ML=8}), + * shape-invariant ({@code MP=1}). + * We must select one of {@code MS=ML/MP=8} parts from the + * logical result {@code long[16]:1024}, + * with {@code part} in range {@code [0..7]}. + * + *
    • Conversion {@code long[2]:128 -> byte[16]:128}: + * contracting lane size ({@code ML=1/8}), + * shape-invariant ({@code MP=1}). + * We must insert the logical result {@code byte[2]:16} into + * one of {@code MO=MP/ML=8} parts of the output, + * with {@code part} in range {@code [-7..0]}. + * + *
    • Conversion {@code float[2]:64 -> double[2]:128}: + * expanding lane size ({@code ML=2}), + * expanding shape ({@code MP=2}). + * Since the expansion of lane size and shape is balanced, + * we have no selection or insertion (in-place, {@code MO=MS=1}). + * + *
    • Conversion {@code byte[32]:256 -> long[2]:128}: + * expanding lane size ({@code ML=8}), + * contracting shape ({@code MP=1/2}). + * We must select one of {@code MS=ML/MP=16} parts from the + * logical result {@code long[32]:2048}, + * with {@code part} in range {@code [0..15]}. + * + *
    + * + * For conversions, one might be tempted to use in-place operations + * where the logical and physical expansion ratios are equal {@code ML=MP}, + * and no selection or insertion is required ({@code part=0}). Such code + * tends to be easier to read, since there is no changes to {@code VLENGTH}. + * However, some platforms only support one or two shapes + * (e.g. aarch64 NEON only supports 64 and 128 bit vectors), + * and so the code must be organized so that the physical expansion + * ratio does not change much. If the shapes cannot change, but lane + * sizes do change, then the code must perform selection or insertion + * (e.g. conversion {@code byte[16]:128 -> long[2]:128} and + * {@code long[2]:128 -> byte[16]:128}). + * To achieve portable code, one has to consider consistently using + * shape-invariant conversions, so one never leaves the preferred + * shape. + * + *

    The convention of positive part numbers for selection + * ({@code [0..MS-1]}) and non-positive part numbers for insertion + * ({@code [-MO+1..0]}) is adopted because some methods can perform + * both expansions and contractions, in a data-dependent manner, and + * the extra sign on the part number serves as an error check. If a + * vector method takes a part number and an invocation of it requires + * neither insertion (with padding) nor selection, the {@code part} + * parameter must be exactly zero. * Part numbers outside the allowed ranges will elicit an indexing - * exception. Note that in all cases a zero part number is valid, and - * corresponds to an operation which preserves as many lanes as - * possible from the beginning of the logical result, and places them - * into the beginning of the physical output container. This is - * often a desirable default, so a part number of zero is safe - * in all cases and useful in most cases. + * exception, with a message reporting which part numbers were legal. + * A zero part number is always valid and selects or inserts the leading block. * *

    The various resizing operations of this API contract or expand * their data as follows: - *

      * + *
        + *
      • Lanewise Conversion: + * Lanewise convert {@code X} with element type {@code ETYPE} to + * {@code f(X)} with element type {@code FTYPE}, according to the + * indicated {@linkplain VectorOperators.Conversion conversion}. + * The logical expansion ratio of the vector corresponds to the + * expansion ratio of the individual elements ({@code ML = |FTYPE| / |ETYPE|}). + * A lanewise conversion operator may be classified as (respectively) + * in-place, expanding, or contracting, depending on whether the bit-size + * of {@code ETYPE} is (respectively) equal to, less than, or greater + * than the bit-size of {@code FTYPE}. + * + *
          *
        • * {@link Vector#convert(VectorOperators.Conversion,int) Vector.convert()} - * will expand (respectively, contract) its operand by ratio - * {@code M} if the - * {@linkplain #elementSize() element size} of its output is - * larger (respectively, smaller) by a factor of {@code M}. - * If the element sizes of input and output are the same, - * then {@code convert()} is an in-place operation. - * + * is shape-invariant, and thus preferred for portable code. + * Since there is no shape change {@code MP=1}, {@code MO=1/ML}, and {@code MS=ML}. + * Lanewise expansion leads to corresponding selection and + * lanewise contraction to corresponsing insertion. *
        • * {@link Vector#convertShape(VectorOperators.Conversion,VectorSpecies,int) Vector.convertShape()} - * will expand (respectively, contract) its operand by ratio - * {@code M} if the bit-size of its logical result is - * larger (respectively, smaller) than the bit-size of its - * output shape. - * The size of the logical result is defined as the - * {@linkplain #elementSize() element size} of the output, - * times the {@code VLENGTH} of its input. - * - * Depending on the ratio of the changed lane sizes, the logical size - * may be (in various cases) either larger or smaller than the input - * vector, independently of whether the operation is an expansion - * or contraction. - * + * allows for a change in shape. One can freely combine lanewise + * expansion or contraction with output insertion or selection. + * If the lanewise expansion and shape expansion are balanced, + * the operation is always in-place ({@code ML=MP} and {@code MO=1}). + * Some platforms may not be able to implement all combinations + * efficiently, especially when shape sizes are limited. *
        • - * Since {@link Vector#castShape(VectorSpecies,int) Vector.castShape()} - * is a convenience method for {@code convertShape()}, its classification - * as an expansion or contraction is the same as for {@code convertShape()}. + * {@link Vector#castShape(VectorSpecies,int) Vector.castShape()} + * is a convenience method for {@code convertShape()} and can also + * freely combine lanewise expansion or contraction with output + * insertion or selection. + *
        * + *
      • Bitwise Reinterpretation: + * {@code f(X)} is the bitwise image of {@code X} of the same shape, + * only the lane boundaries are redrawn from {@code ETYPE} + * to {@code FTYPE}. + * Therefore the logical expansion ratio is always unity {@code ML=1}. + * If the shape changes, the ratio {@code MP} may vary from unity. + * + *
          + *
        • + * {@link Vector#reinterpretAsBytes() Vector.reinterpretAsBytes()} + * and related are shape-invariant ({@code MP=1}). Hence the operation + * is always in-place ({@code MO=MS=1}), implicitly {@code part=0}. *
        • * {@link Vector#reinterpretShape(VectorSpecies,int) Vector.reinterpretShape()} - * is an expansion (respectively, contraction) by ratio {@code M} if the - * {@linkplain #bitSize() vector bit-size} of its input is - * crammed into a smaller (respectively, dropped into a larger) - * output container by a factor of {@code M}. - * Otherwise, it is an in-place operation. - * - * Since this method is a reinterpretation cast that can erase and - * redraw lane boundaries as well as modify shape, the input vector's - * lane size and lane count are irrelevant to its classification as - * expanding or contracting. + * allows for change in shape. + * The net output expansion ratio {@code MO=MP} determines whether + * the operation is in-place {@code MO=MP=1} or whether insertion (with padding) + * or selection are required. + *
        * *
      • * The {@link #unslice(int,Vector,int) unslice()} methods expand - * by a ratio of {@code M=2}, because the single input slice is + * their logical output + * by a ratio of {@code ML=2}, because the single input slice is * positioned and inserted somewhere within two consecutive background * vectors. The part number selects the first or second background * vector, as updated by the inserted slice. + * Since this operation is shape-invariant, + * {@code MP=1} and {@code MS=ML/MP=2}. * Note that the corresponding * {@link #slice(int,Vector) slice()} methods, although inverse - * to the {@code unslice()} methods, do not contract their data + * to the {@code unslice()} methods, do not form a distinct + * intermediate logical output, so {@code ML=MP=1} * and thus require no part number. This is because * {@code slice()} delivers a slice of exactly {@code VLENGTH} * lanes extracted from two input vectors. @@ -1009,13 +1078,724 @@ import java.util.Arrays; * expanding or contracting operation is performed, to query the * limiting value on a part parameter for a proposed expansion * or contraction. The value returned from {@code partLimit()} is - * positive for expansions, negative for contractions, and zero for + * positive when {@code MS>1}, negative when {@code MO>1}, and zero for * in-place operations. Its absolute value is the parameter {@code - * M}, and so it serves as an exclusive limit on valid part number - * arguments for the relevant methods. Thus, for expansions, the - * {@code partLimit()} value {@code M} is the exclusive upper limit - * for part numbers, while for contractions the {@code partLimit()} - * value {@code -M} is the exclusive lower limit. + * max(MS,MO)}, and so it serves as an exclusive limit on valid part number + * arguments for the relevant methods. Thus, for selections, the + * {@code partLimit()} value {@code MS} is the exclusive upper limit + * for part numbers, while for insertions the {@code partLimit()} + * value {@code -MO} is the exclusive lower limit. + * + *

        + * Below is a table with some examples of expansions and contractions. + * The first few rows represent the identity operations, which + * serve as a reference point only. The resulting bytes are + * visualized using ASCII characters. Capital letters ({@code ABC}) are + * bytes, always leading (low-order) bytes in multi-byte lanes. + * Underlines ({@code _}) stand for zero bytes, generated by output padding. + * Equals signs ({@code =}) stand for higher-order bytes corresponding to + * the capital letter to the left. Minus signs ({@code -}) stand for the + * sign extension bytes corresponding to the capital letter or equal sign + * to the left. Parentheses show where a regrouping of lane bytes has occurred. + * The {@code S/I} column indicates if the operation requires insertion + * (I) or selection (S), otherwise it is in-place. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
        Expansion and Contraction Examples
        input
        species
        operationlogical
        result
        MLMPMOMSS/Ipartoutput
        species
        resulting
        bytes
        byte[16]:128identitybyte[16]:1281111byte[16]:128ABCDEFGH IJKLMNOP
        short[8]:128identityshort[8]:1281111short[8]:128A=B=C=D= E=F=G=H=
        int[4]:128identityint[4]:1281111int[4]:128A===B=== C===D===
        long[2]:128identitylong[2]:1281111long[2]:128A======= B=======
        byte[8]: 64identitybyte[8]: 641111byte[8]: 64ABCDEFGH
        short[4]: 64identityshort[4]: 641111short[4]: 64A=B=C=D=
        int[2]: 64identityint[2]: 641111int[2]: 64A===B===
        long[1]: 64identitylong[1]: 641111long[1]: 64A=======
        long[2]:128convert(L2S)short[2]: 321/4141/4Ishort[8]:128A=B=____ ________
        long[2]:128convert(L2S)short[2]: 321/4141/4I-1 short[8]:128____A=B= ________
        long[2]:128convert(L2S)short[2]: 321/4141/4I-2 short[8]:128________ A=B=____
        long[2]:128convert(L2S)short[2]: 321/4141/4I-3 short[8]:128________ ____A=B=
        short[8]:128convert(Z_E_S2L)long[8]:512411/44Slong[2]:128A=______ B=______
        short[8]:128convert(Z_E_S2L)long[8]:512411/44Slong[2]:128C=______ D=______
        short[8]:128convert(Z_E_S2L)long[8]:512411/44Slong[2]:128E=______ F=______
        short[8]:128convert(Z_E_S2L)long[8]:512411/44Slong[2]:128G=______ H=______
        short[8]:128convert(S2L)long[8]:512411/44Slong[2]:128A=------ B=------
        short[8]:128convert(S2L)long[8]:512411/44Slong[2]:128C=------ D=------
        short[8]:128convert(S2L)long[8]:512411/44Slong[2]:128E=------ F=------
        short[8]:128convert(S2L)long[8]:512411/44Slong[2]:128G=------ H=------
        short[4]: 64convert(S2B)byte[4]: 321/2121/2Ibyte[8]: 64ABCD____
        short[4]: 64convert(S2B)byte[4]: 321/2121/2I-1 byte[8]: 64____ABCD
        byte[8]: 64convert(B2S)short[8]:128211/22Sshort[4]: 64A-B-C-D-
        byte[8]: 64convert(B2S)short[8]:128211/22Sshort[4]: 64E-F-G-H-
        byte[8]: 64convert(Z_E_B2S)short[8]:128211/22Sshort[4]: 64A_B_C_D_
        byte[8]: 64convert(Z_E_B2S)short[8]:128211/22Sshort[4]: 64E_F_G_H_
        byte[8]: 64convert(Z_E_B2I)int[8]:256411/44Sint[2]: 64A___B___
        byte[8]: 64convert(Z_E_B2I)int[8]:256411/44Sint[2]: 64G___H___
        byte[8]: 64convert(Z_E_B2L)long[8]:512811/88Slong[1]: 64A_______
        byte[8]: 64convert(Z_E_B2L)long[8]:512811/88Slong[1]: 64H_______
        long[1]: 64convert(L2I)int[1]: 321/2121/2Iint[2]: 64A===____
        long[1]: 64convert(L2I)int[1]: 321/2121/2I-1 int[2]: 64____A===
        int[2]: 64convert(I2S)short[2]: 321/2121/2Ishort[4]: 64A=B=____
        int[2]: 64convert(I2S)short[2]: 321/2121/2I-1 short[4]: 64____A=B=
        long[1]: 64convert(L2S)short[1]: 161/4141/4Ishort[4]: 64A=______
        long[1]: 64convert(L2S)short[1]: 161/4141/4I-3 short[4]: 64______A=
        long[1]: 64convert(L2B)byte[1]:  81/8181/8Ibyte[8]: 64A_______
        long[1]: 64convert(L2B)byte[8]: 641/8181/8I-1 byte[8]: 64_A______
        long[1]: 64convert(L2B)byte[8]: 641/8181/8I-6 byte[8]: 64______A_
        long[1]: 64convert(L2B)byte[8]: 641/8181/8I-7 byte[8]: 64_______A
        short[4]: 64convert(S2B)byte[4]: 321/2121/2Ibyte[8]: 64ABCD____
        short[4]: 64convert(S2B)byte[4]: 321/2121/2I-1 byte[8]: 64____ABCD
        byte[16]:128reinterpretShape()byte[16]:12811/21/22Sbyte[8]: 64ABCDEFGH
        byte[16]:128reinterpretShape()byte[16]:12811/21/22Sbyte[8]: 64IJKLMNOP
        byte[8]: 64reinterpretShape()byte[8]: 641221/2Ibyte[16]:128ABCDEFGH ________
        byte[8]: 64reinterpretShape()byte[8]: 641221/2I-1 byte[16]:128________ ABCDEFGH
        byte[8]: 64reinterpretShape()short[4]: 641111short[4]: 64(AB)(CD)(EF)(GH)
        byte[8]: 64reinterpretShape()int[2]: 641111int[2]: 64(ABCD)(EFGH)
        byte[8]: 64reinterpretShape()long[1]: 641111long[1]: 64(ABCDEFGH)
        byte[8]: 64unslice(5,V0)byte[8]: 6411/21/22Sbyte[16]: 64_____ABC
        byte[8]: 64unslice(5,V0)byte[8]: 6411/21/22Sbyte[16]: 64DEFGH___
        byte[8]: 64x.unslice(5,x)byte[8]: 6411/21/22Sbyte[16]: 64DEFGHABC
        * *

        Moving data across lane boundaries

        * The cross-lane methods which do not redraw lanes or change species @@ -2926,40 +3706,36 @@ public abstract sealed class Vector extends jdk.internal.vm.vector.VectorSupp * element type {@code F}, reinterpreting the bytes of this * vector without performing any value conversions. * - *

        Depending on the selected species, this operation may - * either expand or contract - * its logical result, in which case a non-zero {@code part} - * number can further control the selection and steering of the - * logical result into the physical output vector. - * - *

        - * The underlying bits of this vector are copied to the resulting - * vector without modification, but those bits, before copying, - * may be truncated if this vector's bit-size is greater than - * desired vector's bit size, or filled with zero bits if this - * vector's bit-size is less than desired vector's bit-size. + *

        Has a logical result which is simply the bitwise image + * of the input, regardless of lane types and lane boundaries. + * If the input and output shapes are the same this is an + * in-place operation, and the output has the same underlying + * bits as the input, and {@code part=0}. * *

        If the old and new species have different shape, this is a * shape-changing operation, and may have special - * implementation costs. + * implementation costs. A change in shape leads to + * selection or insertion, + * which can be steered by the {@code part} number. * *

        The method behaves as if this vector is stored into a byte - * array using little-endian byte ordering and then the desired vector is loaded from the same byte - * array using the same ordering. + * array using little-endian byte ordering and then the desired + * vector is loaded from the same byte array using the same ordering. * *

        The following pseudocode illustrates the behavior: *

        {@code
              * int domSize = this.byteSize();
              * int ranSize = species.vectorByteSize();
        -     * int M = (domSize > ranSize ? domSize / ranSize : ranSize / domSize);
        -     * assert Math.abs(part) < M;
        -     * assert (part == 0) || (part > 0) == (domSize > ranSize);
              * MemorySegment ms = MemorySegment.ofArray(new byte[Math.max(domSize, ranSize)]);
        -     * if (domSize > ranSize) {  // expansion
        +     * if (domSize > ranSize) {  // selection (output shape smaller)
        +     *     int MS = domSize / ranSize;
        +     *     assert 0 <= part && part < MS
              *     this.intoMemorySegment(ms, 0, ByteOrder.native());
              *     int origin = part * ranSize;
              *     return species.fromMemorySegment(ms, origin, ByteOrder.native());
        -     * } else {  // contraction or size-invariant
        +     * } else {  // in-place (shape-invariant) or insertion (output shape larger)
        +     *     int MO = ranSize / domSize
        +     *     assert (-MO) < part && part <= 0
              *     int origin = (-part) * domSize;
              *     this.intoMemorySegment(ms, origin, ByteOrder.native());
              *     return species.fromMemorySegment(ms, 0, ByteOrder.native());
        @@ -2976,9 +3752,15 @@ public abstract sealed class Vector extends jdk.internal.vm.vector.VectorSupp
              *
              * @param species the desired vector species
              * @param part the part number
        -     *        of the result, or zero if neither expanding nor contracting
        +     *        of the result (zero if the operation is shape-invariant)
              * @param  the boxed element type of the species
              * @return a vector transformed, by shape and element type, from this vector
        +     * @throws ArrayIndexOutOfBoundsException unless {@code part} is zero,
        +     *         or else there is selection ({@code MS>1}) and {@code part}
        +     *         is in range {@code [0..MS-1]}
        +     *         or else there is insertion ({@code MO>1}) and {@code part}
        +     *         is in range {@code [-MO+1..0]}.
        +     *
              * @see Vector#convertShape(VectorOperators.Conversion,VectorSpecies,int)
              * @see Vector#castShape(VectorSpecies,int)
              * @see VectorSpecies#partLimit(VectorSpecies,boolean)
        @@ -3133,14 +3915,31 @@ public abstract sealed class Vector extends jdk.internal.vm.vector.VectorSupp
              * to a new lane type (called {@code FTYPE} here) according to the
              * indicated {@linkplain VectorOperators.Conversion conversion}.
              *
        -     * This is a lane-wise shape-invariant operation which copies
        -     * {@code ETYPE} values from the input vector to corresponding
        -     * {@code FTYPE} values in the result.  Depending on the selected
        -     * conversion, this operation may either
        -     * expand or contract its
        -     * logical result, in which case a non-zero {@code part} number
        -     * can further control the selection and steering of the logical
        -     * result into the physical output vector.
        +     * This is a lane-wise operation which copies {@code ETYPE} values
        +     * from the input vector to corresponding {@code FTYPE} values in
        +     * the result.
        +     *
        +     * 

        This method is a restricted version of the more general + * but less frequently used shape-changing method + * {@link #convertShape(VectorOperators.Conversion,VectorSpecies,int) + * convertShape()}. + * The result of this method is the same as the expression + * {@code this.convertShape(conv, rsp, part)}, + * where the output species is + * {@code rsp=this.species().withLanes(FTYPE.class)}. + * + *

        As a combined effect of shape-invariance and lane size changes, + * the input and output species may have different lane counts, causing + * expansion or contraction, and + * require selection or insertion. + * Conceptually, the input is lane-wise converted into a logical + * result that contains all converted elements, leading to a + * logical expansion ratio {@code ML = |FTYPE|/|ETYPE|}. + * The result is then copied to the output, which may either be + * an exact fit (in-place), too small (requires selection), or + * too large (requires insertion). + * + *

        Logical: Lane-wise Conversion

        * *

        Each specific conversion is described by a conversion * constant in the class {@link VectorOperators}. Each conversion @@ -3151,12 +3950,12 @@ public abstract sealed class Vector extends jdk.internal.vm.vector.VectorSupp * vector, while the range type determines the lane type of the * output vectors. * - *

        A conversion operator may be classified as (respectively) + *

        A lanewise conversion operator may be classified as (respectively) * in-place, expanding, or contracting, depending on whether the - * bit-size of its domain type is (respectively) equal, less than, + * bit-size of its domain type is (respectively) equal to, less than, * or greater than the bit-size of its range type. * - *

        Independently, conversion operations can also be classified + *

        Independently, lanewise conversion operations can also be classified * as reinterpreting or value-transforming, depending on whether * the conversion copies representation bits unchanged, or changes * the representation bits in order to retain (part or all of) @@ -3184,81 +3983,81 @@ public abstract sealed class Vector extends jdk.internal.vm.vector.VectorSupp * Converting the bit-pattern of a {@code NaN} may discard bits * from the {@code NaN}'s significand. * - *

        This classification is important, because, unless otherwise - * documented, conversion operations never change vector - * shape, regardless of how they may change lane sizes. + *

        Shape-invariance can lead to Selection or Insertion

        * - * Therefore, an expanding conversion cannot store all of its - * results in its output vector, because the output vector has fewer - * lanes of larger size, in order to have the same overall bit-size as - * its input. + *

        This classification of the lanewise operators as in-place, + * expanding and contracting is important, because, unless otherwise + * documented, conversion operations never change vector shape, + * regardless of how they may change lane sizes. + *

        To manage the details of these + * expansions and contractions, + * a {@code part} parameter selects partial results from expansions, + * or steers insertion of the results of contractions into the output. + * For shape-invariant conversions ({@code MP=1}), we have the + * following cases: * - * Likewise, a contracting conversion must store its relatively small - * results into a subset of the lanes of the output vector, defaulting - * the unused lanes to zero. + *

          + *
        • Lanewise in-place conversion operator ({@code |ETYPE|=|FTYPE|}): + * The input, logical result and output have the same number of + * lanes and size in bits ({@code ML=MP=1}). The logical result + * fits the output exactly, and we always have {@code part=0}. + * + *

          All conversions are delivered in one output vector, without + * wasting lanes. + * + *

        • Lanewise expanding conversion operator ({@code |ETYPE|<|FTYPE|}): + * The logical expansion {@code ML=|FTYPE|/|ETYPE|>1} means the + * logical result is {@code MS=ML} times larger than the output. + * + *

          The {@code part} number in range {@code [0..MS-1]} selects + * one of the {@code MS} distinct blocks of {@code VLENGTH/MS} + * logical result lanes starting at the origin lane at + * {@code part*VLENGTH/MS}. This selected block is copied to the + * output and fills it exactly. + * The rest of the logical result is lost. + * + *

          A group of such output vectors, with {@code MS} disjoint + * selections of logical results, can (manually) represent the + * complete logical result of the conversion. + * + *

        • Lanewise contracting conversion operator ({@code |ETYPE|>|FTYPE|}): + * The logical contraction {@code ML=|FTYPE|/|ETYPE|<1} means the + * output is {@code MO=1/ML} times larger than the logical result. + * + *

          The {@code part} number in range {@code [-(MO-1)..0]} inserts + * all {@code VLENGTH} lanes from the logical result into the output + * located at the origin lane {@code -part*VLENGTH}. There + * is a total of {@code VLENGTH*MO} output lanes, and those not + * holding converted input values are filled with zero padding. + * + *

          A group of such output vectors, with logical result parts + * steered to {@code MO} disjoint blocks, can be (manually) reassembled + * using the {@linkplain VectorOperators#XOR bitwise XOR} or (for floating + * point) the {@link VectorOperators#FIRST_NONZERO FIRST_NONZERO} + * operator. + *

        * *

        As an example, a conversion from {@code byte} to {@code long} - * ({@code M=8}) will discard 87.5% of the input values in order to + * (logical expansion ratio {@code ML=8}) + * will discard 87.5% of the input values in order to + * select and * convert the remaining 12.5% into the roomy {@code long} lanes of * the output vector. The inverse conversion will convert back all * the large results, but will waste 87.5% of the lanes in the output - * vector. - * - * In-place conversions ({@code M=1}) deliver all of - * their results in one output vector, without wasting lanes. - * - *

        To manage the details of these - * expansions and contractions, - * a non-zero {@code part} parameter selects partial results from - * expansions, or steers the results of contractions into - * corresponding locations, as follows: - * - *

          - *
        • expanding by {@code M}: {@code part} must be in the range - * {@code [0..M-1]}, and selects the block of {@code VLENGTH/M} input - * lanes starting at the origin lane at {@code part*VLENGTH/M}. - - *

          The {@code VLENGTH/M} output lanes represent a partial - * slice of the whole logical result of the conversion, filling - * the entire physical output vector. - * - *

        • contracting by {@code M}: {@code part} must be in the range - * {@code [-M+1..0]}, and steers all {@code VLENGTH} input lanes into - * the output located at the origin lane {@code -part*VLENGTH}. - * There is a total of {@code VLENGTH*M} output lanes, and those not - * holding converted input values are filled with zeroes. - * - *

          A group of such output vectors, with logical result parts - * steered to disjoint blocks, can be reassembled using the - * {@linkplain VectorOperators#OR bitwise or} or (for floating - * point) the {@link VectorOperators#FIRST_NONZERO FIRST_NONZERO} - * operator. - * - *

        • in-place ({@code M=1}): {@code part} must be zero. - * Both vectors have the same {@code VLENGTH}. The result is - * always positioned at the origin lane of zero. - * - *
        - * - *

        This method is a restricted version of the more general - * but less frequently used shape-changing method - * {@link #convertShape(VectorOperators.Conversion,VectorSpecies,int) - * convertShape()}. - * The result of this method is the same as the expression - * {@code this.convertShape(conv, rsp, this.broadcast(part))}, - * where the output species is - * {@code rsp=this.species().withLanes(FTYPE.class)}. + * vector, padding excess lanes with zero bits. * * @param conv the desired scalar conversion to apply lane-wise * @param part the part number - * of the result, or zero if neither expanding nor contracting + * of the result, or zero if in-place * @param the boxed element type of the species * @return a vector converted by shape and element type from this vector * @throws ArrayIndexOutOfBoundsException unless {@code part} is zero, - * or else the expansion ratio is {@code M} and - * {@code part} is positive and less than {@code M}, - * or else the contraction ratio is {@code M} and - * {@code part} is negative and greater {@code -M} + * or else the lanewise conversion is an expansion leading to + * an output selection ratio {@code MS} and {@code part} is in + * range {@code [0..MS-1]} + * or else the lanewise conversion is a contraction leading to + * an output insertion ratio {@code MO} and {@code part} is in + * range {@code [-MO+1..0]}. * * @see VectorOperators#I2L * @see VectorOperators.Conversion#ofCast(Class,Class) @@ -3290,14 +4089,34 @@ public abstract sealed class Vector extends jdk.internal.vm.vector.VectorSupp * *

        As a combined effect of shape changes and lane size changes, * the input and output species may have different lane counts, causing - * expansion or contraction. - * In this case a non-zero {@code part} parameter selects - * partial results from an expanded logical result, or steers - * the results of a contracted logical result into a physical - * output vector of the required output species. + * expansion or contraction, and + * require selection or insertion. + * Conceptually, the input is lane-wise converted into a logical + * result that contains all converted elements, leading to a + * logical expansion ratio {@code ML = |FTYPE|/|ETYPE|}. + * The result is then copied to the output, which may either be + * an exact fit (in-place), too small (requires selection), or + * too large (requires insertion). + * + *

          + *
        • Exact fit (in-place): the expansion or contraction of the + * physical shape matches the expansion or contraction of the + * elements ({@code MP=ML}). We must have {@code part=0}. + *
        • Logical result is {@code MS>1} times larger than the + * output shape (selection): The {@code part} number in range + * {@code [0..MS-1]} determines which of the {@code MS} + * distinct parts from the logical result is selected for the output. + * The rest of the logical result is lost. + *
        • Output shape is {@code MO>1} times larger than the + * logical result (insertion): The {@code part} number in range + * {@code [-(MO-1)..0]} determines to which of the {@code MO} + * distinct positions of the output the logical result is inserted. + * The rest of the output is padded with zero bits. + *
        * *

        The following pseudocode illustrates the behavior of this - * method for in-place, expanding, and contracting conversions. + * method for in-place conversions, and those with selection or + * insertion. * (This pseudocode also applies to the shape-invariant method, * but with shape restrictions on the output species.) * Note that only one of the three code paths is relevant to any @@ -3316,17 +4135,17 @@ public abstract sealed class Vector extends jdk.internal.vm.vector.VectorSupp * logical[i] = scalar_conversion_op(a.lane(i)); * } * FTYPE[] physical; - * if (domlen == ranlen) { // in-place + * if (domlen == ranlen) { // MS=MO=1 => in-place * assert part == 0; //else AIOOBE * physical = logical; - * } else if (domlen > ranlen) { // expanding - * int M = domlen / ranlen; - * assert 0 <= part && part < M; //else AIOOBE + * } else if (domlen > ranlen) { // MS>1 => selection + * int MS = domlen / ranlen; + * assert 0 <= part && part < MS; //else AIOOBE * int origin = part * ranlen; * physical = Arrays.copyOfRange(logical, origin, origin + ranlen); - * } else { // (domlen < ranlen) // contracting - * int M = ranlen / domlen; - * assert 0 >= part && part > -M; //else AIOOBE + * } else { // (domlen < ranlen) // MO>1 => insertion, padding + * int MO = ranlen / domlen; + * assert 0 >= part && part > -MO; //else AIOOBE * int origin = -part * domlen; * System.arraycopy(logical, 0, physical, origin, domlen); * } @@ -3336,9 +4155,15 @@ public abstract sealed class Vector extends jdk.internal.vm.vector.VectorSupp * @param conv the desired scalar conversion to apply lane-wise * @param rsp the desired output species * @param part the part number - * of the result, or zero if neither expanding nor contracting + * of the result, or zero if in-place * @param the boxed element type of the output species * @return a vector converted by element type from this vector + * @throws ArrayIndexOutOfBoundsException unless {@code part} is zero, + * or else there is selection ({@code MS>1}) and {@code part} + * is in range {@code [0..MS-1]} + * or else there is insertion ({@code MO>1}) and {@code part} + * is in range {@code [-MO+1..0]}. + * * @see #convert(VectorOperators.Conversion,int) * @see #castShape(VectorSpecies,int) * @see #reinterpretShape(VectorSpecies,int) diff --git a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template index b3c5bfac302..74d6ce45db0 100644 --- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template +++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template @@ -2792,6 +2792,9 @@ public abstract sealed class $abstractvectortype$ extends AbstractVector<$Boxtyp $abstractvectortype$ that = ($abstractvectortype$) w; that.check(this); Objects.checkIndex(origin, length() + 1); + if ((-2 & part) != 0) { + throw wrongPartForSlice(part); + } $Bitstype$Vector iotaVector = ($Bitstype$Vector) iotaShuffle().toBitsVector(); #if[FP] $Bitstype$Vector filter = $Bitstype$Vector.broadcast(($Bitstype$Vector.$Bitstype$Species) vspecies().asIntegral(), ($bitstype$)origin); diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/JavaTypeProfile.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/JavaTypeProfile.java index 8827017df6d..5ee9db58cfe 100644 --- a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/JavaTypeProfile.java +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/JavaTypeProfile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2019, 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 @@ -147,7 +147,7 @@ public final class JavaTypeProfile extends AbstractJavaProfile - * Only the {@linkplain Modifier#fieldModifiers() field flags} specified in the JVM + * Only the {@linkplain Location#FIELD field flags} specified in the JVM * specification will be included in the returned mask. */ @Override diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/ResolvedJavaMethod.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/ResolvedJavaMethod.java index dcd80170ba9..75ca31ce8b3 100644 --- a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/ResolvedJavaMethod.java +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/ResolvedJavaMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -305,9 +305,9 @@ public interface ResolvedJavaMethod extends JavaMethod, InvokeTarget, ModifiersP typename = typename.replaceFirst("\\[\\]$", "..."); } - final StringBuilder sb = new StringBuilder(Modifier.toString(getModifiers())); - if (sb.length() != 0) { - sb.append(' '); + final StringBuilder sb = new StringBuilder(); + if (Modifier.isFinal(getModifiers())) { + sb.append("final "); } return sb.append(typename).append(' ').append(getName()).toString(); } diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties deleted file mode 100644 index 0e392cf9b7e..00000000000 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (c) 1999, 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. 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. -# - -error.multiple.main.operations=No se puede especificar más de una opción '-cuxtid' -error.cant.open=no se puede abrir: {0} -error.illegal.option=Opción no permitida: {0} -error.unrecognized.option=opción no reconocida: {0} -error.missing.arg=la opción {0} necesita un argumento -error.bad.file.arg=Error al analizar los argumentos de archivo -error.bad.option=Se debe especificar una de las opciones -{ctxuid}. -error.bad.cflag=El indicador 'c' necesita la especificación de archivos de manifiesto o de entrada. -error.bad.uflag=El indicador 'u' necesita la especificación de archivos de manifiesto, de entrada o indicador 'e'. -error.bad.eflag=El indicador 'e' y el manifiesto con el atributo 'Main-Class' no pueden especificarse \na la vez. -error.bad.dflag=La opción '-d, --describe-module' no requiere especificar archivos de entrada -error.bad.reason=Motivo erróneo: {0}, debe ser en desuso, en desuso para eliminación o incubando -error.nosuch.fileordir={0} : no existe tal archivo o directorio -error.write.file=Error al escribir un archivo jar existente -error.create.dir={0} : no se ha podido crear el directorio -error.incorrect.length=longitud incorrecta al procesar: {0} -error.create.tempfile=No se ha podido crear el archivo temporal -error.hash.dep=Aplicando hash a las dependencias del módulo {0}, no se ha encontrado el módulo {1} en la ruta del módulo -error.module.options.without.info=Uno de --module-version o -hash-modules sin module-info.class -error.no.operative.descriptor=No hay ningún descriptor operativo para la versión: {0} -error.no.root.descriptor=No hay ningún descriptor de módulo de raíz, especifique --release -error.unable.derive.automodule=No se ha podido derivar el descriptor de módulo para: {0} -error.unexpected.module-info=Descriptor de módulo inesperado {0} -error.module.descriptor.not.found=No se ha encontrado el descriptor de módulo -error.invalid.versioned.module.attribute=Atributo de descriptor de módulo no válido {0} -error.missing.provider=No se ha encontrado el proveedor de servicios: {0} -error.release.value.notnumber=versión {0} no válida -error.release.value.toosmall=versión {0} no válida, debe ser >= 9 -error.release.unexpected.versioned.entry=Entrada versionada inesperada {0} para la versión {1} -error.validator.jarfile.exception=no puede validar {0}: {1} -error.validator.jarfile.invalid=se ha suprimido el archivo jar de varias versiones {0} no válido -error.validator.bad.entry.name=nombre de entrada con formato incorrecto, {0} -error.validator.version.notnumber=el nombre de entrada {0} no tiene un número de versión -error.validator.entryname.tooshort=el nombre de entrada {0} es demasiado corto, no es un directorio -error.validator.isolated.nested.class=la entrada {0} es una clase anidada aislada -error.validator.new.public.class=la entrada {0} contiene una nueva clase pública que no está en las entradas de base -error.validator.incompatible.class.version=la entrada {0} tiene una versión de clase no compatible con una versión anterior -error.validator.different.api=la entrada {0} contiene una clase con una api diferente de la versión anterior -error.validator.names.mismatch=la entrada {0} contiene una clase con un nombre interno {1}, los nombres no coinciden -error.validator.info.name.notequal=module-info.class en un directorio con versión contiene un nombre incorrecto -error.validator.info.requires.transitive=module-info.class en un directorio con versiones contiene "requires transitive" adicionales -error.validator.info.requires.added=module-info.class en un directorio con versión contiene "requires" adicionales -error.validator.info.requires.dropped=module-info.class en un directorio con versiones contiene "requires" que faltan -error.validator.info.exports.notequal=module-info.class en un directorio con versiones contiene "exports" diferentes -error.validator.info.opens.notequal=module-info.class en un directorio con versiones contiene "opens" diferentes -error.validator.info.provides.notequal=module-info.class en un directorio con versiones contiene "provides" diferentes -error.validator.info.version.notequal={0}: module-info.class en un directorio con versiones contiene una "version" diferente -error.validator.info.manclass.notequal={0}: module-info.class en un directorio con versiones contiene una "main-class" diferente -warn.validator.identical.entry=Advertencia: la entrada {0} contiene una clase idéntica a una entrada que ya está en el archivo jar -warn.validator.resources.with.same.name=Advertencia: la entrada {0} tiene varios recursos con el mismo nombre -warn.validator.concealed.public.class=Advertencia: la entrada {0} es una clase pública\nen un paquete oculto. Colocar este archivo jar en la ruta de clase tendrá como resultado\ninterfaces públicas no compatibles -warn.release.unexpected.versioned.entry=entrada versionada inesperada {0} -out.added.manifest=manifiesto agregado -out.added.module-info=module-info agregado: {0} -out.automodule=No se ha encontrado ningún descriptor de módulo. Módulo automático derivado. -out.update.manifest=manifiesto actualizado -out.update.module-info=module-info actualizado: {0} -out.ignore.entry=ignorando entrada {0} -out.adding=agregando: {0} -out.deflated=(desinflado {0}%) -out.stored=(almacenado 0%) -out.create=\ creado: {0} -out.extracted=extraído: {0} -out.inflated=\ inflado: {0} -out.size=(entrada = {0}) (salida = {1}) - -usage.compat=Interfaz de compatibilidad:\nSintaxis: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files] ...Opciones: \n -c crear nuevo archivo\n -t mostrar la tabla de contenido del archivo\n -x extraer el archivo mencionado (o todos) del archivo\n -u actualizar archivo existente\n -v generar salida detallada de los datos de salida estándar\n -f especificar nombre del archivo de almacenamiento\n -m incluir información de manifiesto del archivo de manifiesto especificado n -n realizar la normalización Pack200 después de crear un archivo nuevo\n -e especificar punto de entrada de la aplicación para la aplicación autónoma \n que se incluye dentro de un archivo jar ejecutable\n -0 solo almacenar; no utilizar compresión ZIP\n -P conservar componentes iniciales '/' (ruta absoluta) y ".." (directorio principal) en los nombres de archivo\n -M no crear un archivo de manifiesto para las entradas\n -i generar información de índice para los archivos jar especificados\n -C cambiar al directorio especificado e incluir el archivo siguiente\nSi algún archivo es un directorio, se procesará de forma recurrente. \nEl nombre del archivo de manifiesto, el nombre del archivo de almacenamiento y el nombre del punto de entrada se\n especifican en el mismo orden que los indicadores 'm', 'f' y 'e'. \n\nEjemplo 1: para archivar archivos de dos clases en un archivo llamado classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nEjemplo 2: utilice un archivo de manifiesto existente 'mymanifest' y archive todos los\n archivos del directorio foo/ en 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n - -main.usage.summary=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] archivos] ... -main.usage.summary.try=Intente `jar --help' para obtener más información. - -main.help.preopt=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar crea un archivo para las clases y recursos, y puede manipular o\nrestaurar clases individuales o recursos de un archivo.\n\n Ejemplos:\n # Crear un archivo denominado classes.jar con dos archivos de clase:\n jar --create --file classes.jar Foo.class Bar.class\n # Crear un archivo con un manifiesto existente, con todos los archivos en foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crear un archivo jar modular, donde el descriptor de módulo está en\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Actualizar un jar no modular existente en un jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Crear un archivo jar de varias versiones y colocar algunos archivos en el directorio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPara acortar o simplificar el comando jar, puede especificar argumentos en un archivo\nde texto separado y transmitirlos al comando jar con el símbolo de arroba (@) como prefijo.\n\n Ejemplos:\n # Leer opciones adicionales y mostrar los archivos de clases del archivo classes.list\n jar --create --file my.jar @classes.list\n -main.help.opt.main=\ Modo de operación principal:\n -main.help.opt.main.create=\ -c, --create Crear el archivo -main.help.opt.main.generate-index=\ -i, --generate-index=FILE Generar información de índice para los archivos jar\n especificados -main.help.opt.main.list=\ -t, --list Mostrar la tabla de contenido del archivo -main.help.opt.main.update=\ -u, --update Actualizar un archivo jar existente -main.help.opt.main.extract=\ -x, --extract Extraer determinados (o todos) los archivos del archivo -main.help.opt.main.describe-module=\ -d, --describe-module Imprimir el descriptor de módulo, o un nombre de módulo automático -main.help.opt.any=\ Modificadores de operación válidos en cualquier modo:\n\n -C DIR Cambiar al directorio especificado e incluir el\n siguiente archivo -main.help.opt.any.file=\ -f, --file=FILE El nombre del archivo. Si se omite, se usa stdin o\n stdout en función de la operación\n --release VERSION Se colocan todos los archivos siguientes en un directorio con versión\n del archivo jar (es decir, META-INF/versions/VERSION/) -main.help.opt.any.verbose=\ -v, --verbose Generar salida verbose en salida estándar -main.help.opt.create=\ Modificadores de operación válidos solo en el modo de creación:\n -main.help.opt.create.update=\ Modificadores de operación válidos solo en el modo de creación y de actualización:\n -main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Punto de entrada de la aplicación para aplicaciones\n autónomas agrupadas en un archivo jar modular o\n ejecutable -main.help.opt.create.update.manifest=\ -m, --manifest=FILE Incluir la información de manifiesto del archivo\n de manifiesto proporcionado -main.help.opt.create.update.no-manifest=\ -M, --no-manifest No crear ningún archivo de manifiesto para las entradas -main.help.opt.create.update.module-version=\ --module-version=VERSION Versión del módulo, si se va a crear un archivo jar modular\n o actualizar un archivo jar no modular -main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Calcular y registrar los hash de módulos\n que coinciden con el patrón proporcionado y que dependen\n directa o indirectamente de la creación de un archivo jar modular\n o de la actualización de un archivo jar no modular -main.help.opt.create.update.module-path=\ -p, --module-path Ubicación de la dependencia de módulo para generar\n el hash -main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Excluir del conjunto de módulos raíz por defecto -main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Indicación para que una herramienta emita una advertencia si el módulo\n se ha resuelto. En desuso, en desuso para eliminación\n o incubando -main.help.opt.create.update.index=\ Modificadores de operación válidos solo en el modo de creación, actualización y generación de índice:\n -main.help.opt.create.update.index.no-compress=\ -0, --no-compress Solo almacenar; no usar compresión ZIP -main.help.opt.other=\ Otras opciones:\n -main.help.opt.other.help=\ -h, --help[:compat] Utilice este valor, u opcionalmente la compatibilidad, ayuda -main.help.opt.other.help-extra=\ --help-extra Prestar ayuda en las opciones adicionales -main.help.opt.other.version=\ --version Imprimir versión del programa -main.help.postopt=\ Un archivo es un jar modular si el descriptor de módulo, 'module-info.class', está\n en la raíz de los directorios proporcionados o en la raíz del archivo jar.\n Las siguientes operaciones solo son válidas si se va a crear un archivo jar modular\n o se va a actualizar un jar existente no modular: '--module-version',\n '--hash-modules' y '--module-path'.\n\n Los argumentos obligatorios u opcionales en las opciones largas también son obligatorios u opcionales\n en cualquiera de las opciones cortas. diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties deleted file mode 100644 index cc1886eb18c..00000000000 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (c) 1999, 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. 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. -# - -error.multiple.main.operations=Vous ne pouvez pas indiquer plus d'une option '-cuxtid' -error.cant.open=impossible d''ouvrir : {0} -error.illegal.option=Option non admise : {0} -error.unrecognized.option=option non reconnue : {0} -error.missing.arg=l''option {0} exige un argument -error.bad.file.arg=Erreur lors de l'analyse des arguments de fichier -error.bad.option=Une des options -{ctxuid} doit être spécifiée. -error.bad.cflag=L'indicateur c requiert la spécification d'un fichier manifeste ou d'un fichier d'entrée. -error.bad.uflag=L'indicateur u requiert la spécification d'un fichier manifeste, d'un fichier d'entrée ou d'un indicateur e. -error.bad.eflag=L'indicateur e et le fichier manifeste portant l'attribut Main-Class ne peuvent pas être spécifiés \nensemble. -error.bad.dflag=L'option '-d, --describe-module' ne requiert la spécification d'aucun fichier d'entrée -error.bad.reason=raison incorrecte : {0}, la valeur doit être deprecated, deprecated-for-removal ou incubating -error.nosuch.fileordir={0} : fichier ou répertoire introuvable -error.write.file=Erreur lors de l'écriture d'un fichier JAR existant -error.create.dir={0} : impossible de créer le répertoire -error.incorrect.length=longueur incorrecte lors du traitement de : {0} -error.create.tempfile=Impossible de créer un fichier temporaire -error.hash.dep=Hachage des dépendances du module {0}, module {1} introuvable sur le chemin de modules -error.module.options.without.info=Une des options --module-version ou --hash-modules sans module-info.class -error.no.operative.descriptor=Aucun descripteur opérationnel pour la version : {0} -error.no.root.descriptor=Aucun descripteur de module racine, indiquer --release -error.unable.derive.automodule=Impossible de dériver le descripteur de module pour : {0} -error.unexpected.module-info=Descripteur de module {0} inattendu -error.module.descriptor.not.found=Descripteur de module introuvable -error.invalid.versioned.module.attribute=Attribut de descripteur de module non valide {0} -error.missing.provider=Fournisseur de services introuvable : {0} -error.release.value.notnumber=version {0} non valide -error.release.value.toosmall=version {0} non valide : elle doit être supérieure ou égale à 9 -error.release.unexpected.versioned.entry=entrée avec numéro de version {0} inattendue pour la version {1} -error.validator.jarfile.exception=Impossible de valider {0} : {1} -error.validator.jarfile.invalid=fichier JAR multiversion non valide {0} supprimé -error.validator.bad.entry.name=nom d''entrée au format incorrect, {0} -error.validator.version.notnumber=le nom d''entrée : {0} n''a pas de numéro de version -error.validator.entryname.tooshort=le nom d''entrée : {0} est trop court et n''est pas un répertoire -error.validator.isolated.nested.class=l''entrée : {0} est une classe isolée imbriquée -error.validator.new.public.class=l''entrée : {0} contient une nouvelle classe publique introuvable dans les entrées de base -error.validator.incompatible.class.version=l''entrée : {0} a une version de classe non compatible avec une version antérieure -error.validator.different.api=l''entrée : {0} contient une classe avec une API différente de la version antérieure -error.validator.names.mismatch=l''entrée : {0} contient une classe avec le nom interne {1}, les noms ne concordent pas -error.validator.info.name.notequal=module-info.class dans un répertoire avec numéro de version contient un nom incorrect -error.validator.info.requires.transitive=module-info.class dans un répertoire avec numéro de version contient un mot-clé "requires transitive" supplémentaire -error.validator.info.requires.added=module-info.class dans un répertoire avec numéro de version contient des mots-clés "requires" supplémentaires -error.validator.info.requires.dropped=module-info.class dans un répertoire avec numéro de version contient des mots-clés "requires" manquants -error.validator.info.exports.notequal=module-info.class dans un répertoire avec numéro de version contient des mots-clés "exports" différents -error.validator.info.opens.notequal=module-info.class dans un répertoire avec numéro de version contient des mots-clés "opens" différents -error.validator.info.provides.notequal=module-info.class dans un répertoire avec numéro de version contient des mots-clés "provides" différents -error.validator.info.version.notequal={0} : module-info.class dans un répertoire avec numéro de version contient des mots-clés "version" différents -error.validator.info.manclass.notequal={0} : module-info.class dans un répertoire avec numéro de version contient des mots-clés "main-class" différents -warn.validator.identical.entry=Avertissement : l''entrée {0} contient une classe\nidentique à une entrée qui se trouve déjà dans le fichier JAR -warn.validator.resources.with.same.name=Avertissement : entrée {0}, plusieurs ressources du même nom -warn.validator.concealed.public.class=Avertissement : l''entrée {0} est une classe publique\ndans un package dissimulé, le placement de ce fichier JAR sur le\nchemin de classe générera des interfaces publiques incompatibles -warn.release.unexpected.versioned.entry=entrée avec numéro de version {0} inattendue -out.added.manifest=manifeste ajouté -out.added.module-info=module-info ajouté : {0} -out.automodule=Descripteur de module introuvable. Module automatique dérivé. -out.update.manifest=manifeste mis à jour -out.update.module-info=module-info mis à jour : {0} -out.ignore.entry=entrée {0} ignorée -out.adding=ajout : {0} -out.deflated=(compression : {0} %) -out.stored=(stockage : 0 %) -out.create=\ créé : {0} -out.extracted=extrait : {0} -out.inflated=\ décompressé : {0} -out.size=(entrée = {0}) (sortie = {1}) - -usage.compat=Interface de compatibilité :\nSyntaxe : jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\nOptions :\n -c crée une archive\n -t affiche la table des matières de l'archive\n -x extrait des fichiers nommés (ou tous les fichiers) de l'archive\n -u met à jour l'archive existante\n -v génère une sortie en mode verbose d'une sortie standard\n -f spécifie le nom de fichier d'archive\n -m inclut les informations de manifeste à partir du fichier manifeste spécifié\n -n effectue une normalisation Pack200 après la création d'une archive\n -e spécifie le point d'entrée d'une application en mode autonome \n intégrée à un fichier JAR exécutable\n -0 stockage uniquement, pas de compression ZIP\n -P préserve les signes de début '/' (chemin absolu) et ".." (répertoire parent) dans les noms de fichier\n -M ne crée pas de fichier manifeste pour les entrées\n -i génère les informations d'index des fichiers JAR spécifiés\n -C passe au répertoire spécifié et inclut le fichier suivant\nSi l'un des fichiers est un répertoire, celui-ci est traité récursivement.\nLes noms du fichier manifeste, du fichier d'archive et du point d'entrée sont\nspécifiés dans le même ordre que celui des indicateurs m, f et e.\n\nExemple 1 : pour archiver deux fichiers de classe dans une archive intitulée classes.jar : \n jar cvf classes.jar Foo.class Bar.class \nExemple 2 : pour utiliser un fichier manifeste existant 'mymanifest', puis archiver tous les\n fichiers du répertoire foo/ dans 'classes.jar' : \n jar cvfm classes.jar mymanifest -C foo/ .\n - -main.usage.summary=Syntaxe : jar [OPTION...] [ [--release VERSION] [-C dir] files] ... -main.usage.summary.try=Pour plus d'informations, essayez 'jar --help'. - -main.help.preopt=Syntaxe : jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar crée une archive pour les classes et les ressources, et peut manipuler ou\nrestaurer les classes ou ressources individuelles à partir d'une archive.\n\n Exemples :\n # Création d'une archive nommée classes.jar composée de deux fichiers de classe :\n jar --create --file classes.jar Foo.class Bar.class\n # Création d'une archive à l'aide d'un manifeste existant, avec tous les fichiers dans foo/ :\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Création d'une archive JAR modulaire, où le descripteur de module est situé dans\n # classes/module-info.class :\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Mise à jour d'un fichier JAR non modulaire existant vers un fichier JAR modulaire :\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Crée un fichier JAR multiversion en plaçant certains fichiers dans le répertoire META-INF/versions/9 :\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPour raccourcir ou simplifier la commande JAR, vous pouvez spécifier des arguments dans un\nfichier texte distinct et le transmettre à la commande JAR avec le signe arobase (@) en tant que préfixe.\n\n Exemples :\n # Options de lecture supplémentaires et liste des fichiers de classe à partir du fichier classes.list\n jar --create --file my.jar @classes.list\n -main.help.opt.main=\ Mode d'exploitation principal :\n -main.help.opt.main.create=\ -c, --create Crée l'archive -main.help.opt.main.generate-index=\ -i, --generate-index=FILE Génère des informations d'index pour les archives JAR\n indiquées -main.help.opt.main.list=\ -t, --list Affiche la table des matières de l'archive -main.help.opt.main.update=\ -u, --update Met à jour une archive JAR existante -main.help.opt.main.extract=\ -x, --extract Extrait des fichiers nommés (ou tous les fichiers) de l'archive -main.help.opt.main.describe-module=\ -d, --describe-module afficher le descripteur de module ou le nom de module automatique -main.help.opt.any=\ Modificateurs d'opération valides pour tous les modes :\n\n -C DIR Passe au répertoire spécifié et inclut le\n fichier suivant -main.help.opt.any.file=\ -f, --file=FILE Nom du fichier d'archive. Lorsqu'il est omis, stdin ou\n stdout est utilisé en fonction de l'opération\n --release VERSION Place tous les fichiers suivants dans un répertoire avec numéro de version\n du fichier JAR (à savoir META-INF/versions/VERSION/) -main.help.opt.any.verbose=\ -v, --verbose Génère une sortie en mode verbose d'une sortie standard -main.help.opt.create=\ Modificateurs d'opération valides uniquement en mode create :\n -main.help.opt.create.update=\ Modificateurs d'opération valides uniquement en modes create et update :\n -main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Point d'entrée d'une application en mode autonome\n intégrée à une archive JAR modulaire\n ou exécutable -main.help.opt.create.update.manifest=\ -m, --manifest=FILE Inclut les informations de manifeste du fichier\n manifeste donné -main.help.opt.create.update.no-manifest=\ -M, --no-manifest Ne crée pas de fichier manifeste pour les entrées -main.help.opt.create.update.module-version=\ --module-version=VERSION Version de module lors de la création d'un fichier JAR\n modulaire ou de la mise à jour d'un fichier JAR non modulaire -main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Calcule et enregistre les hachages des modules \n mis en correspondance d'après le modèle donné et dépendant\n directement ou indirectement d'un fichier JAR modulaire\n en cours de création ou d'un fichier JAR non modulaire en cours de mise à jour -main.help.opt.create.update.module-path=\ -p, --module-path Emplacement de la dépendance de module pour la génération\n du hachage -main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Exclure de l'ensemble racine de modules par défaut -main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Indication en fonction de laquelle un outil émet un avertissement si le module\n est résolu. La valeur doit être deprecated, deprecated-for-removal,\n ou incubating -main.help.opt.create.update.index=\ Modificateurs d'opération valides uniquement en modes create, update et generate-index :\n -main.help.opt.create.update.index.no-compress=\ -0, --no-compress Stocke uniquement ; n'utilise pas de compression ZIP -main.help.opt.other=\ Autres options :\n -main.help.opt.other.help=\ -h, --help[:compat] Affiche l'aide ou éventuellement la compatibilité -main.help.opt.other.help-extra=\ --help-extra Affiche l'aide sur les options supplémentaires -main.help.opt.other.version=\ --version Imprime la version de programme -main.help.postopt=\ Une archive est un fichier JAR modulaire si un descripteur de module, 'module-info.class', se\n trouve dans la racine des répertoires donnés ou dans la racine de l'archive JAR\n elle-même. Les opérations suivantes sont valides uniquement lors de la création d'un fichier JAR modulaire\n ou de la mise à jour d'un fichier JAR non modulaire existant : '--module-version',\n '--hash-modules' et '--module-path'.\n\n Les arguments obligatoires ou facultatifs pour les options longues sont également obligatoires ou facultatifs\n pour toute option courte correspondante. diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties deleted file mode 100644 index 4d70d1a8835..00000000000 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (c) 1999, 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. 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. -# - -error.multiple.main.operations=Impossibile specificare più di un'opzione '-cuxtid' -error.cant.open=impossibile aprire: {0} -error.illegal.option=Opzione non valida: {0} -error.unrecognized.option=opzione non riconosciuta: {0} -error.missing.arg=l''opzione {0} richiede un argomento -error.bad.file.arg=Errore durante l'analisi degli argomenti del file -error.bad.option=È necessario specificare una delle opzioni -{ctxuid}. -error.bad.cflag=Per il flag 'c' è necessario specificare file manifest o di input. -error.bad.uflag=Per il flag 'u' è necessario specificare il flag 'e' oppure file manifest o di input. -error.bad.eflag=Il flag 'e' e il manifest con l'attributo 'Main-Class' non possono essere specificati\ninsieme. -error.bad.dflag=Per l'opzione '-d, --describe-module' non è necessario specificare alcun file di input -error.bad.reason=Motivo non valido: {0}. Deve essere deprecated, deprecated-for-removal o incubating -error.nosuch.fileordir={0} : file o directory inesistente -error.write.file=Errore durante la scrittura del file jar esistente -error.create.dir={0} : impossibile creare la directory -error.incorrect.length=lunghezza non valida durante l''elaborazione: {0} -error.create.tempfile=Impossibile creare il file temporaneo. -error.hash.dep={0} dipendenze del modulo di hashing. Impossibile trovare il modulo {1} nel percorso del modulo -error.module.options.without.info=Una delle opzioni --module-version o --hash-modules non contiene module-info.class -error.no.operative.descriptor=Nessun descrittore operativo per la release: {0} -error.no.root.descriptor=Nessun descrittore di modulo radice, specificare --release -error.unable.derive.automodule=Impossibile derivare il descrittore di modulo per: {0} -error.unexpected.module-info=Descrittore di modulo {0} imprevisto -error.module.descriptor.not.found=Descrittore di modulo non trovato -error.invalid.versioned.module.attribute=Attributo descrittore del modulo {0} non valido. -error.missing.provider=Provider di servizi non trovato: {0} -error.release.value.notnumber=release {0} non valida -error.release.value.toosmall=la release {0} non è valida: deve essere >= 9 -error.release.unexpected.versioned.entry=voce con controllo delle versioni non prevista {0} per la release {1} -error.validator.jarfile.exception=impossibile convalidare {0}: {1} -error.validator.jarfile.invalid=file jar {0} con più release non valido eliminato -error.validator.bad.entry.name=nome di voce {0} con formato non valido -error.validator.version.notnumber=il nome di voce {0} non dispone di un numero di versione -error.validator.entryname.tooshort=nome di voce {0} troppo breve. Non è una directory -error.validator.isolated.nested.class=la voce {0} è una classe nidificata isolata -error.validator.new.public.class=la voce {0} contiene una nuova classe pubblica non trovata nelle voci di base -error.validator.incompatible.class.version=la voce {0} ha una versione incompatibile con una versione precedente -error.validator.different.api=la voce {0} contiene una classe con un''API diversa dalla versione precedente -error.validator.names.mismatch=la voce {0} contiene una classe con nome interno {1}. I nomi non corrispondono -error.validator.info.name.notequal=module-info.class in una directory con controllo delle versioni contiene un nome errato -error.validator.info.requires.transitive=module-info.class in una directory con controllo delle versioni contiene valori "requires transitive" aggiuntivi -error.validator.info.requires.added=module-info.class in una directory con controllo delle versioni contiene valori "requires" aggiuntivi -error.validator.info.requires.dropped=module-info.class in una directory con controllo delle versioni contiene valori "requires" mancanti -error.validator.info.exports.notequal=module-info.class in una directory con controllo delle versioni contiene "exports" differenti -error.validator.info.opens.notequal=module-info.class in una directory con controllo delle versioni contiene valori "opens" differenti -error.validator.info.provides.notequal=module-info.class in una directory con controllo delle versioni contiene valori "provides" differenti -error.validator.info.version.notequal={0}: module-info.class in una directory con controllo delle versioni contiene valori "version" differenti -error.validator.info.manclass.notequal={0}: module-info.class in una directory con controllo delle versioni contiene valori "main-class" differenti -warn.validator.identical.entry=Avvertenza: la voce {0} contiene una classe\nidentica a una voce già presente nel file jar -warn.validator.resources.with.same.name=Avvertenza: voce {0}. Più risorse con lo stesso nome -warn.validator.concealed.public.class=Avvertenza: la voce {0} è una classe pubblica\nin un package nascosto. Il posizionamento di questo file jar nel classpath\ngenererà interfacce pubbliche incompatibili -warn.release.unexpected.versioned.entry=voce con controllo delle versioni non prevista {0} -out.added.manifest=aggiunto manifest -out.added.module-info=aggiunto module-info: {0} -out.automodule=Nessun descrittore di modulo trovato. Derivato modulo automatico. -out.update.manifest=aggiornato manifest -out.update.module-info=aggiornato module-info: {0} -out.ignore.entry=la voce {0} sarà ignorata -out.adding=aggiunta in corso di: {0} -out.deflated=(compresso {0}%) -out.stored=(memorizzato 0%) -out.create=\ creato: {0} -out.extracted=estratto: {0} -out.inflated=\ decompresso: {0} -out.size=(in = {0}) (out = {1}) - -usage.compat=Interfaccia di compatibilità:\nUso: jar {ctxui}[vfmn0PMe] [file-jar] [file-manifest] [punto di ingresso] [-C dir] file] ...\nOpzioni:\n -c crea un nuovo archivio\n -t visualizza l'indice dell'archivio\n -x estrae i file con nome (o tutti i file) dall'archivio\n -u aggiorna l'archivio esistente\n -v genera output commentato dall'output standard\n -f specifica il nome file dell'archivio\n -m include informazioni manifest dal file manifest specificato\n -n esegue la normalizzazione Pack200 dopo la creazione di un nuovo archivio\n -e specifica il punto di ingresso per l'applicazione stand-alone \n inclusa nel file jar eseguibile\n -0 solo memorizzazione; senza compressione ZIP\n -P conserva i componenti iniziali '/' (percorso assoluto) e \\"..\\" (directory padre) dai nomi file\n -M consente di non creare un file manifest per le voci\n -i genera informazioni sull'indice per i file jar specificati\n -C imposta la directory specificata e include il file seguente\nSe un file è una directory, verrà elaborato in modo ricorsivo.\nIl nome del file manifest, del file di archivio e del punto di ingresso devono\nessere specificati nello stesso ordine dei flag 'm', 'f' ed 'e'.\n\nEsempio 1: archiviazione di due file di classe in un archivio con il nome classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nEsempio 2: utilizzo del file manifest esistente 'mymanifest' e archiviazione di tutti i\n file della directory foo/ in 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n - -main.usage.summary=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] file] ... -main.usage.summary.try=Utilizzare 'jar --help' per ulteriori informazioni. - -main.help.preopt=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] file] ...\nIl file jar crea un archivio per le classi e le risorse e può manipolare o\nripristinare le singole classi o risorse da un archivio.\n\n Esempi:\n # Crea un archivio denominato classes.jar con due file di classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Crea un archivio mediante un file manifest esistente, con tutti i file in foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crea un archivio jar modulare, in cui il descrittore di modulo si trova in\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Aggiorna un file jar non modulare esistente in un file jar modulare:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Crea un file jar per più release, posizionando alcuni file nella directory META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPer abbreviare o semplificare il comando jar, è possibile specificare gli argomenti in un file\ndi testo distinto e passarlo al comando jar con il segno @ come prefisso.\n\n Esempi:\n # Legge le opzioni aggiuntive e la lista di file di classe dal file classes.list\n jar --create --file my.jar @classes.list\n -main.help.opt.main=\ Modalità di funzionamento principale:\n -main.help.opt.main.create=\ -c, --create Crea l'archivio -main.help.opt.main.generate-index=\ -i, --generate-index=FILE Genera le informazioni sull'indice per gli archivi\n jar specificati -main.help.opt.main.list=\ -t, --list Visualizza l'indice dell'archivio -main.help.opt.main.update=\ -u, --update Aggiorna un archivio jar esistente -main.help.opt.main.extract=\ -x, --extract Estrae i file con nome (o tutti i file) dall'archivio -main.help.opt.main.describe-module=\ -d, --describe-module Visualizza il descrittore di modulo o il nome modulo automatico -main.help.opt.any=\ Modificatori di funzionamento validi in qualsiasi modalità:\n\n -C DIR Passa alla directory specificata e include il\n file seguente -main.help.opt.any.file=\ -f, --file=FILE Il nome file dell'archivio. Se omesso, viene usato stdin o\n stdout in base all'operazione\n --release VERSION Posiziona tutti i file successivi in una directory con controllo delle versioni\n del file jar (ad esempio, META-INF/versions/VERSION/) -main.help.opt.any.verbose=\ -v, --verbose Genera l'output descrittivo nell'output standard -main.help.opt.create=\ Modificatori di funzionamento validi solo nella modalità di creazione:\n -main.help.opt.create.update=\ Modificatori di funzionamento validi solo nella modalità di creazione e aggiornamento:\n -main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Punto di ingresso per le applicazioni\n stand-alone incluse nell'archivio jar modulare o\n eseguibile -main.help.opt.create.update.manifest=\ -m, --manifest=FILE Include le informazioni sul file manifest dal file\n manifest specificato -main.help.opt.create.update.no-manifest=\ -M, --no-manifest Non crea un file manifest per le voci -main.help.opt.create.update.module-version=\ --module-version=VERSION Versione del modulo utilizzata durante la creazione di un file\n jar modulare o l'aggiornamento di un file jar non modulare -main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Calcola e registra gli hash dei moduli \n corrispondenti in base al pattern specificato e dipendenti\n in modo diretto o indiretto dalla creazione di un file jar modulare\n o dall'aggiornamento di un file jar non modulare -main.help.opt.create.update.module-path=\ -p, --module-path Posizione della dipendenza del modulo per la generazione\n dell'hash -main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Esclude dal set radice predefinito dei moduli -main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Suggerimento per uno strumento per l'emissione di un'avvertenza se il modulo\n viene risolto. Può essere deprecated, deprecated-for-removal\n o incubating -main.help.opt.create.update.index=\ Modificatori di funzionamento validi solo nella modalità di creazione, aggiornamento e di generazione dell'indice:\n -main.help.opt.create.update.index.no-compress=\ -0, --no-compress Solo per la memorizzazione. Non utilizza alcuna compressione ZIP -main.help.opt.other=\ Altre opzioni:\n -main.help.opt.other.help=\ -h, --help[:compat] Fornisce questa Guida o facoltativamente la Guida sulla compatibilità -main.help.opt.other.help-extra=\ --help-extra Fornisce la Guida per le opzioni non standard -main.help.opt.other.version=\ --version Stampa la versione del programma -main.help.postopt=\ Un archivio è un file jar modulare se un descrittore di modulo, 'module-info.class', si trova\n nella directory radice delle directory specificate o nella radice dell'archivio jar\n stesso. Le operazioni seguenti sono valide solo durante la creazione di un file jar modulare\n o l'aggiornamento di un file jar non modulare esistente: '--module-version',\n '--hash-modules' e '--module-path'.\n\n Gli argomenti obbligatori o facoltativi per le opzioni lunghe sono obbligatori\n o facoltativi anche per le opzioni brevi corrispondenti. diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties deleted file mode 100644 index 22fb3d99f8d..00000000000 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (c) 1999, 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. 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. -# - -error.multiple.main.operations='-cuxtid' 옵션을 여러 개 지정할 수 없습니다. -error.cant.open=열 수 없음: {0} -error.illegal.option=잘못된 옵션: {0} -error.unrecognized.option=인식할 수 없는 옵션: {0} -error.missing.arg={0} 옵션에 인수가 필요합니다. -error.bad.file.arg=파일 인수 구문을 분석하는 중 오류가 발생했습니다. -error.bad.option=-{ctxuid} 옵션 중 하나를 지정해야 합니다. -error.bad.cflag='c' 플래그를 사용하려면 Manifest 또는 입력 파일을 지정해야 합니다! -error.bad.uflag='u' 플래그를 사용하려면 Manifest, 'e' 플래그 또는 입력 파일을 지정해야 합니다! -error.bad.eflag='e' 플래그 및 Manifest를 'Main-Class' 속성과 함께 지정할 수\n없습니다! -error.bad.dflag='-d, --describe-module' 옵션에는 입력 파일을 지정할 필요가 없습니다. -error.bad.reason=잘못된 원인: {0}은(는) deprecated, deprecated-for-removal 또는 incubating 중 하나여야 합니다. -error.nosuch.fileordir={0}: 해당 파일 또는 디렉토리가 없습니다. -error.write.file=기존 jar 파일에 쓰는 중 오류가 발생했습니다. -error.create.dir={0}: 디렉토리를 생성할 수 없습니다. -error.incorrect.length=처리 중 올바르지 않은 길이가 발견됨: {0} -error.create.tempfile=임시 파일을 생성할 수 없습니다. -error.hash.dep=모듈 {0} 종속성을 해시하는 중 모듈 경로에서 {1} 모듈을 찾을 수 없습니다. -error.module.options.without.info=module-info.class 없이 --module-version 또는 --hash-modules 중 하나 -error.no.operative.descriptor=릴리스에 대한 작동 기술자 없음: {0} -error.no.root.descriptor=루트 모듈 기술자가 없습니다. --release를 지정하십시오. -error.unable.derive.automodule=모듈 기술자를 파생할 수 없음: {0} -error.unexpected.module-info=예상치 않은 모듈 기술자 {0} -error.module.descriptor.not.found=모듈 기술자를 찾을 수 없음 -error.invalid.versioned.module.attribute=부적합한 모듈 기술자 속성 {0} -error.missing.provider=서비스 제공자를 찾을 수 없음: {0} -error.release.value.notnumber=릴리스 {0}이(가) 부적합함 -error.release.value.toosmall=릴리스 {0}이(가) 부적합함. 9 이상이어야 합니다. -error.release.unexpected.versioned.entry={1} 릴리스에 대해 예상치 않은 버전이 지정된 항목 {0} -error.validator.jarfile.exception={0}을(를) 검증할 수 없음: {1} -error.validator.jarfile.invalid=부적합한 다중 릴리스 jar 파일 {0}이(가) 삭제되었습니다. -error.validator.bad.entry.name=항목 이름 형식이 잘못됨, {0} -error.validator.version.notnumber=항목 이름 {0}에 버전 번호가 없습니다. -error.validator.entryname.tooshort=항목 이름 {0}이(가) 너무 짧고 디렉토리가 아닙니다. -error.validator.isolated.nested.class={0} 항목은 분리된 중첩 클래스입니다. -error.validator.new.public.class={0} 항목에 기본 항목에서 찾을 수 없는 새로운 공용 클래스가 있습니다. -error.validator.incompatible.class.version={0} 항목에 이전 버전과 호환되지 않는 클래스 버전이 있습니다. -error.validator.different.api={0} 항목에 이전 버전과 다른 api를 가진 클래스가 있습니다. -error.validator.names.mismatch={0} 항목에 내부 이름 {1}을(를) 가진 클래스가 있지만 이름이 일치하지 않습니다. -error.validator.info.name.notequal=버전 지정된 디렉토리의 module-info.class에 잘못된 이름이 포함됨 -error.validator.info.requires.transitive=버전 지정된 디렉토리의 module-info.class에 추가 "requires transitive" 항목이 포함됨 -error.validator.info.requires.added=버전 지정된 디렉토리의 module-info.class에 추가 "requires" 항목이 포함됨 -error.validator.info.requires.dropped=버전 지정된 디렉토리의 module-info.class에 누락된 "requires" 항목이 포함됨 -error.validator.info.exports.notequal=버전 지정된 디렉토리의 module-info.class에 다른 "exports" 항목이 포함됨 -error.validator.info.opens.notequal=버전 지정된 디렉토리의 module-info.class에 다른 "opens" 항목이 포함됨 -error.validator.info.provides.notequal=버전 지정된 디렉토리의 module-info.class에 다른 "provides" 항목이 포함됨 -error.validator.info.version.notequal={0}: 버전이 지정된 디렉토리의 module-info.class에 다른 "version" 항목이 포함됨 -error.validator.info.manclass.notequal={0}: 버전이 지정된 디렉토리의 module-info.class에 다른 "main-class" 항목이 포함됨 -warn.validator.identical.entry=경고: {0} 항목에 이미 jar에 있는 항목과\n동일한 클래스가 있습니다. -warn.validator.resources.with.same.name=경고: {0} 항목에 동일한 이름의 여러 리소스가 있습니다. -warn.validator.concealed.public.class=경고: {0} 항목은 숨겨진 패키지에 있는\n공용 클래스입니다. 이 jar을 클래스 경로에 배치하면\n공용 인터페이스가 호환되지 않습니다. -warn.release.unexpected.versioned.entry=예상치 않은 버전이 지정된 항목 {0}입니다. -out.added.manifest=Manifest를 추가함 -out.added.module-info=추가된 모듈 정보: {0} -out.automodule=모듈 기술자를 찾을 수 없습니다. 자동 모듈을 파생했습니다. -out.update.manifest=Manifest를 업데이트함 -out.update.module-info=업데이트된 모듈 정보: {0} -out.ignore.entry={0} 항목을 무시하는 중 -out.adding=추가하는 중: {0} -out.deflated=({0}%를 감소함) -out.stored=(0%를 저장함) -out.create=\ 생성됨: {0} -out.extracted=추출됨: {0} -out.inflated=\ 증가됨: {0} -out.size=(입력 = {0}) (출력 = {1}) - -usage.compat=호환성 인터페이스:\n사용법: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n옵션:\n -c 새 아카이브를 생성합니다.\n -t 아카이브에 대한 목차를 나열합니다.\n -x 명명된(또는 모든) 파일을 아카이브에서 추출합니다.\n -u 기존 아카이브를 업데이트합니다.\n -v 표준 출력에 상세 정보 출력을 생성합니다.\n -f 아카이브 파일 이름을 지정합니다.\n -m 지정된 Manifest 파일의 Manifest 정보를 포함합니다.\n -n 새 아카이브를 생성한 후 Pack200 정규화를 수행합니다.\n -e jar 실행 파일에 번들로 제공된 독립형 애플리케이션의 \n 애플리케이션 시작 지점을 지정합니다.\n -0 저장 전용이며 ZIP 압축을 사용하지 않습니다.\n -P 파일 이름에서 선행 '/'(절대 경로) 및 ".."(상위 디렉토리) 구성요소를 유지합니다.\n -M 항목에 대해 Manifest 파일을 생성하지 않습니다.\n -i 지정된 jar 파일에 대한 인덱스 정보를 생성합니다.\n -C 지정된 디렉토리로 변경하고 다음 파일을 포함합니다.\n특정 파일이 디렉토리일 경우 순환적으로 처리됩니다.\nManifest 파일 이름, 아카이브 파일 이름 및 시작 지점 이름은\n'm', 'f' 및 'e' 플래그와 동일한 순서로 지정됩니다.\n\n예 1: classes.jar라는 아카이브에 두 클래스 파일을 아카이브하는 방법: \n jar cvf classes.jar Foo.class Bar.class \n예 2: 기존 Manifest 파일 'mymanifest'를 사용하여\n foo/ 디렉토리의 모든 파일을 'classes.jar'로 아카이브하는 방법: \n jar cvfm classes.jar mymanifest -C foo/ .\n - -main.usage.summary=사용법: jar [OPTION...] [ [--release VERSION] [-C dir] files] ... -main.usage.summary.try=자세한 내용을 보려면 'jar --help'를 실행하십시오. - -main.help.preopt=사용법: jar [OPTION...] [ [--release VERSION] [-C dir] 파일] ...\njar는 클래스 및 리소스에 대한 아카이브를 생성합니다. 아카이브에서\n개별 클래스나 리소스를 조작하거나 복원할 수 있습니다.\n\n 예제:\n # 두 클래스 파일을 사용하여 classes.jar라는 아카이브 생성:\n jar --create --file classes.jar Foo.class Bar.class\n # 기존 Manifest를 사용하여 모든 파일이 foo/에 포함된 아카이브 생성:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # 모듈 기술자가 classes/module-info.class에 위치한\n # 모듈형 jar 아카이브 생성:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # 기존 비모듈 jar를 모듈형 jar로 업데이트:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # 일부 파일이 META-INF/versions/9 디렉토리에 위치한 다중 릴리스 jar 생성:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\njar 명령을 짧게 만들거나 단순화하려면 별도의 텍스트 파일에 인수를 지정하고\nat 기호(@)를 접두어로 사용하여 jar 명령에 전달할 수 있습니다.\n\n 예제:\n # classes.list 파일에서 추가 옵션 및 클래스 파일 목록 읽기\n jar --create --file my.jar @classes.list\n -main.help.opt.main=\ 기본 작업 모드:\n -main.help.opt.main.create=\ -c, --create 아카이브를 생성합니다. -main.help.opt.main.generate-index=\ -i, --generate-index=FILE 지정된 jar 아카이브에 대한 인덱스 정보를\n 생성합니다. -main.help.opt.main.list=\ -t, --list 아카이브에 대한 목차를 나열합니다. -main.help.opt.main.update=\ -u, --update 기존 jar 아카이브를 업데이트합니다. -main.help.opt.main.extract=\ -x, --extract 명명된(또는 모든) 파일을 아카이브에서 추출합니다. -main.help.opt.main.describe-module=\ -d, --describe-module 모듈 기술자 또는 자동 모듈 이름을 인쇄합니다. -main.help.opt.any=\ 모든 모드에서 적합한 작업 수정자:\n\n -C DIR 지정된 디렉토리로 변경하고 다음 파일을\n 포함합니다. -main.help.opt.any.file=\ -f, --file=FILE 아카이브 파일 이름입니다. 생략할 경우 작업에 따라 \n stdin 또는 stdout이 사용됩니다.\n --release VERSION 다음 모든 파일을 버전 지정된 jar 디렉토리\n (예: META-INF/versions/VERSION/)에 배치합니다. -main.help.opt.any.verbose=\ -v, --verbose 표준 출력에 상세 정보 출력을 생성합니다. -main.help.opt.create=\ 생성 모드에서만 적합한 작업 수정자:\n -main.help.opt.create.update=\ 생성 및 업데이트 모드에서만 적합한 작업 수정자:\n -main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME 모듈형 또는 실행형 jar 아카이브에 번들로\n 제공된 독립형 애플리케이션의 애플리케이션\n 시작 지점입니다. -main.help.opt.create.update.manifest=\ -m, --manifest=FILE 지정된 Manifest 파일의 Manifest 정보를\n 포함합니다. -main.help.opt.create.update.no-manifest=\ -M, --no-manifest 항목에 대해 Manifest 파일을 생성하지 않습니다. -main.help.opt.create.update.module-version=\ --module-version=VERSION 모듈형 jar를 생성하거나 비모듈 jar를\n 업데이트할 때 모듈 버전입니다. -main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN 생성 중인 모듈형 jar 또는 업데이트 중인 비모듈 jar에 \n 직접 또는 간접적으로 의존하고 주어진 패턴과 일치하는\n 모듈의 해시를 컴퓨트하고\n 기록합니다. -main.help.opt.create.update.module-path=\ -p, --module-path 해시를 생성하기 위한 모듈 종속성의\n 위치입니다. -main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default 모듈의 기본 루트 집합에서 제외합니다. -main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved 모듈이 해결된 경우 경고를 실행할 툴에 대한\n 힌트로, deprecated, deprecated-for-removal,\n 또는 incubating 중 하나입니다. -main.help.opt.create.update.index=\ 생성, 업데이트 및 generate-index 모드에서만 적합한 작업 수정자:\n -main.help.opt.create.update.index.no-compress=\ -0, --no-compress 저장 전용이며 ZIP 압축을 사용하지 않습니다. -main.help.opt.other=\ 기타 옵션:\n -main.help.opt.other.help=\ -h, --help[:compat] 이 도움말(또는 선택적으로 호환성)을 제공합니다. -main.help.opt.other.help-extra=\ --help-extra 추가 옵션에 대한 도움말을 제공합니다. -main.help.opt.other.version=\ --version 프로그램 버전을 인쇄합니다. -main.help.postopt=\ 아카이브는 모듈 기술자 'module-info.class'가 주어진 디렉토리의\n 루트 또는 jar 아카이브 자체의 루트에 위치한 경우 모듈형 jar입니다.\n 다음 작업은 모듈형 jar를 생성하거나 기존 비모듈 jar를\n 업데이트할 때만 적합합니다. '--module-version',\n '--hash-modules' 및 '--module-path'.\n\n long 옵션의 필수 또는 선택적 인수는 해당하는 short 옵션에 대해서도\n 필수 또는 선택적입니다. diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties deleted file mode 100644 index a306a064afe..00000000000 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (c) 1999, 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. 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. -# - -error.multiple.main.operations=Você não pode especificar mais de um opção '-cuxtid' -error.cant.open=não é possível abrir: {0} -error.illegal.option=Opção inválida: {0} -error.unrecognized.option=opção não reconhecida : {0} -error.missing.arg=a opção {0} exige um argumento -error.bad.file.arg=Erro ao fazer parsing dos argumentos de arquivo -error.bad.option=Uma das opções -{ctxuid} deve ser especificada. -error.bad.cflag=flag 'c' requer que os arquivos de manifesto ou entrada sejam especificados! -error.bad.uflag=o flag 'u' requer que arquivos de manifesto, o flag 'e' ou arquivos de entrada sejam especificados! -error.bad.eflag=o flag 'e' e manifesto com o atributo 'Main-Class' não podem ser especificados \njuntos! -error.bad.dflag=A opção '-d, --describe-module' não exige a especificação de arquivos de entrada -error.bad.reason=motivo incorreto: {0}, deve ser deprecated, deprecated-for-removal ou incubating -error.nosuch.fileordir={0} : não há tal arquivo ou diretório -error.write.file=Erro ao gravar o arquivo jar existente -error.create.dir={0} : não foi possível criar o diretório -error.incorrect.length=largura incorreta durante o processamento: {0} -error.create.tempfile=Não foi possível criar um arquivo temporário -error.hash.dep=Módulo de hashing com {0} dependências. Não é possível localizar o módulo {1} no caminho do módulo -error.module.options.without.info=Um dentre --module-version ou --hash-modules está sem module-info.class -error.no.operative.descriptor=Nenhum descritor de operação para a release: {0} -error.no.root.descriptor=Nenhum descritor do módulo-raiz, especifique --release -error.unable.derive.automodule=Não é possível obter o descritor do módulo para: {0} -error.unexpected.module-info=Descritor de módulo inesperado {0} -error.module.descriptor.not.found=Descritor de módulo não encontrado -error.invalid.versioned.module.attribute=Atributo {0} de descritor de módulo inválido -error.missing.provider=Prestador de serviços não encontrado: {0} -error.release.value.notnumber=release {0} não válida -error.release.value.toosmall=release {0} não válida; deve ser >= 9 -error.release.unexpected.versioned.entry=entrada {0} com controle de versão inesperada para a release {1} -error.validator.jarfile.exception=não é possível validar {0}: {1} -error.validator.jarfile.invalid=arquivo jar {0} multi-release inválido excluído -error.validator.bad.entry.name=nome de entrada incorreto, {0} -error.validator.version.notnumber=o nome de entrada {0} não tem um número de versão -error.validator.entryname.tooshort=nome de entrada {0} muito pequeno, não é um diretório -error.validator.isolated.nested.class=a entrada {0} é uma classe aninhada isolada -error.validator.new.public.class=a entrada {0} contém uma nova classe pública não encontrada nas entradas de base -error.validator.incompatible.class.version=a entrada {0} tem uma versão de classe incompatível com uma versão anterior -error.validator.different.api=a entrada {0} contém uma classe com api diferente da versão anterior -error.validator.names.mismatch=a entrada {0} contém uma classe com o nome interno {1}; os nomes não correspondem -error.validator.info.name.notequal=module-info.class em um diretório com controle de versão contém nome incorreto -error.validator.info.requires.transitive=module-info.class em um diretório com controle de versão contém "requires transitive" adicional -error.validator.info.requires.added=module-info.class em um diretório com controle de versão contém "requires" adicional -error.validator.info.requires.dropped=module-info.class em um diretório com controle de versão falta "requires" -error.validator.info.exports.notequal=module-info.class em um diretório com controle de versão contém "exports" diferente -error.validator.info.opens.notequal=module-info.class em um diretório com controle de versão contém "opens" diferente -error.validator.info.provides.notequal=module-info.class em um diretório com controle de versão contém "provides" diferente -error.validator.info.version.notequal={0}: module-info.class em um diretório com controle de versão contém "version" diferente -error.validator.info.manclass.notequal={0}: module-info.class em um diretório com controle de versão contém "main-class" diferente -warn.validator.identical.entry=Advertência: a entrada {0} contém uma classe\nidêntica a uma que já está no jar -warn.validator.resources.with.same.name=Advertência: entrada {0}; diversos recursos com o mesmo nome -warn.validator.concealed.public.class=Advertência: a entrada {0} é uma classe pública\nem um pacote oculto; colocar esse jar no caminho de classe resultará\nem interfaces públicas incompatíveis -warn.release.unexpected.versioned.entry=entrada {0} com controle de versão inesperada -out.added.manifest=manifesto adicionado -out.added.module-info=module-info: {0} adicionado -out.automodule=Nenhum descritor de módulo encontrado. Módulo automático derivado. -out.update.manifest=manifesto atualizado -out.update.module-info=module-info: {0} atualizado -out.ignore.entry=ignorando entrada {0} -out.adding=adicionando: {0} -out.deflated=(compactado {0}%) -out.stored=(armazenado 0%) -out.create=\ criado: {0} -out.extracted=extraído: {0} -out.inflated=\ inflado: {0} -out.size=(entrada = {0}) (saída= {1}) - -usage.compat=Interface de Compatibilidade:\nUso: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] arquivos] ...\nOpções:\n -c cria novo arquivo compactado\n -t lista o sumário do arquivo compactado\n -x extrai arquivos com o nome (ou todos) do arquivo compactado\n -u atualiza o arquivo compactado existente\n -v gera saída detalhada na saída padrão\n -f especifica o nome do arquivo compactado\n -m inclui as informações do manifesto do arquivo de manifesto especificado\n -n executa a normalização Pack200 após a criação de um novo arquivo compactado\n -e especifica o ponto de entrada da aplicativo para aplicativo stand-alone \n empacotada em um arquivo jar executável\n -0 armazena somente; não usa compactação ZIP\n -P preserva os componentes '/' inicial (caminho absoluto) e ".." (diretório pai) nos nomes dos arquivos\n -M não cria um arquivo de manifesto para as entradas\n -i gera informações de índice para os arquivos jar especificados\n -C passa para o diretório especificado e inclui o arquivo a seguir\nSe um arquivo também for um diretório, ele será processado repetidamente.\nO nome do arquivo de manifesto, o nome do arquivo compactado e o nome do ponto de entrada são\nespecificados na mesma ordem dos flags 'm', 'f' e 'e'.\n\nExemplo 1: para arquivar dois arquivos de classe em um arquivo compactado denominado classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nExemplo 2: use um arquivo de manifesto existente 'mymanifest' e arquive todos os\n arquivos no diretório foo/ em 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n - -main.usage.summary=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] files] ... -main.usage.summary.try=Tente `jar --ajuda' para obter mais informações. - -main.help.preopt=Uso: arquivos [OPTION...] [ [--release VERSION] [-C dir] jar]...\njar cria um arquivo compactado para classes e recursos, e pode manipular ou\nrestaurar classes ou recursos individuais de um arquivo compactado.\n\n Exemplos:\n # Cria um arquivo compactado chamado classes.jar com dois arquivos de classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Cria um arquivo compactado usando um manifesto existente, com todos os arquivos em foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Cria um arquivo compactado jar modular, em que o descritor do módulo se localiza em\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Atualiza um arquivo jar não modular existente para um jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Cria um arquivo jar de várias releases, colocando alguns arquivos no diretório META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPara reduzir ou simplificar o comando jar, você pode especificar argumentos em um arquivo de texto separado\ne especificá-lo no comando jar com o sinal de arroba (@) como um prefixo.\n\n Exemplos:\n # Lê opções adicionais e lista os arquivos de classe do arquivo classes.list\n jar --create --file my.jar @classes.list\n -main.help.opt.main=\ Modo de operação principal:\n -main.help.opt.main.create=\ -c, --create Cria o arquivo compactado -main.help.opt.main.generate-index=\ -i, --generate-index=FILE Gera informações de índice para os arquivos compactados jar \n especificados -main.help.opt.main.list=\ -t, --list Lista o conteúdo do arquivo compactado -main.help.opt.main.update=\ -u, --update Atualiza um arquivo compactado jar existente -main.help.opt.main.extract=\ -x, --extract Extrai arquivos nomeados (ou todos) do arquivo compactado -main.help.opt.main.describe-module=\ -d, --describe-module Imprime o descritor do módulo ou nome do módulo automático -main.help.opt.any=\ Modificadores de operação válidos em qualquer modo:\n\n -C DIR Altera para o diretório especificado e inclui o\n seguinte arquivo: -main.help.opt.any.file=\ -f, --file=FILE O nome do arquivo compactado. Quando omitido, stdin ou\n stdout será usado com base na operação\n --release VERSION Coloca todos os arquivos a seguir em um diretório com controle de versão\n do arquivo jar (i.e. META-INF/versions/VERSION/) -main.help.opt.any.verbose=\ -v, --verbose Gera saída detalhada na saída padrão -main.help.opt.create=\ Modificadores de operação válidos somente no modo de criação:\n -main.help.opt.create.update=\ Modificadores de operação válidos somente no modo de criação e atualização:\n -main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME O ponto de entrada do aplicativo para aplicativos\n stand-alone empacotados em um arquivo compactado jar modular\n ou executável -main.help.opt.create.update.manifest=\ -m, --manifest=FILE Inclui as informações de manifesto provenientes do arquivo de\n manifesto em questão -main.help.opt.create.update.no-manifest=\ -M, --no-manifest Não cria um arquivo de manifesto para as entradas -main.help.opt.create.update.module-version=\ --module-version=VERSION A versão do módulo, ao criar um arquivo jar\n modular, ou atualizar um arquivo jar não modular -main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Calcula e registra os hashes dos módulos\n correlacionado pelo padrão fornecido e do qual depende\n direta ou indiretamente em um arquivo jar modular que está sendo\n criado ou em um arquivo jar não modular que está sendo atualizado -main.help.opt.create.update.module-path=\ -p, --module-path Local de dependência de módulo para gerar\n o hash -main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Excluir do conjunto de módulos raiz padrão -main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Dica para que uma ferramenta emita uma advertência se o módulo\n for resolvido. Um destes: deprecated, deprecated-for-removal,\n ou incubating -main.help.opt.create.update.index=\ Modificadores de operação válidos somente no modo de criação, atualização e geração de índice:\n -main.help.opt.create.update.index.no-compress=\ -0, --no-compress Somente armazenamento; não use compactação ZIP -main.help.opt.other=\ Outras opções:\n -main.help.opt.other.help=\ -h, --help[:compat] Fornece esta ajuda ou, opcionalmente, a ajuda de compatibilidade -main.help.opt.other.help-extra=\ --help-extra Fornecer ajuda sobre opções extras -main.help.opt.other.version=\ --version Imprime a versão do programa -main.help.postopt=\ Arquivo compactado será um arquivo jar modular se um descritor de módulo, 'module-info.class', estiver\n localizado na raiz dos diretórios em questão ou na raiz do próprio arquivo compactado\n jar. As seguintes operações só são válidas ao criar um jar modular\n ou atualizar um jar não modular existente: '--module-version',\n '--hash-modules' e '--module-path'.\n\n Argumentos obrigatórios ou opcionais para opções longas também são obrigatórios ou opcionais\n para quaisquer opções curtas correspondentes. diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties deleted file mode 100644 index d42d77d5dc7..00000000000 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (c) 1999, 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. 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. -# - -error.multiple.main.operations=Du kan inte ange flera alternativ av typen '-cuxtid' -error.cant.open=kan inte öppna: {0} -error.illegal.option=Otillåtet alternativ: {0} -error.unrecognized.option=okänt alternativ: {0} -error.missing.arg=alternativet {0} kräver ett argument -error.bad.file.arg=Fel vid tolkning av filargument -error.bad.option=Ett av alternativen -{ctxuid} måste anges. -error.bad.cflag=för c-flaggan måste manifest- eller indatafiler anges. -error.bad.uflag=för u-flaggan måste manifest-, e-flagg- eller indatafiler anges. -error.bad.eflag=e-flaggan och manifest med attributet Main-Class kan inte anges \ntillsammans. -error.bad.dflag=alternativet '-d, --describe-module' kräver att ingen indatafil anges -error.bad.reason=ogiltig orsak: {0} måste vara deprecated, deprecated-for-removal eller incubating -error.nosuch.fileordir={0} : det finns ingen sådan fil eller katalog -error.write.file=Ett fel inträffade vid skrivning till befintlig jar-fil. -error.create.dir={0} : kunde inte skapa någon katalog -error.incorrect.length=ogiltig längd vid bearbetning: {0} -error.create.tempfile=Kunde inte skapa en tillfällig fil -error.hash.dep={0}-beroenden för hashningsmodulen, kan inte hitta modulen {1} på modulsökvägen -error.module.options.without.info=--module-version eller --hash-modules utan module-info.class -error.no.operative.descriptor=Ingen operativ deskriptor för utgåvan: {0} -error.no.root.descriptor=Ingen rotmoduldeskriptor, ange --release -error.unable.derive.automodule=Kan inte härleda moduldeskriptor för: {0} -error.unexpected.module-info=Oväntad moduldeskriptor, {0} -error.module.descriptor.not.found=Moduldeskriptorn hittades inte -error.invalid.versioned.module.attribute=Ogiltigt attribut för moduldeskriptor, {0} -error.missing.provider=Tjänsteleverantören hittades inte: {0} -error.release.value.notnumber=utgåva {0} är inte giltig -error.release.value.toosmall=utgåva {0} är inte giltig, måste vara >= 9 -error.release.unexpected.versioned.entry=oväntad versionshanterad post, {0}, för utgåvan {1} -error.validator.jarfile.exception=kan inte validera {0}: {1} -error.validator.jarfile.invalid=ogiltig jar-fil för flera utgåvor, {0}, har tagits bort -error.validator.bad.entry.name=postnamnet {0} är felaktigt utformat -error.validator.version.notnumber=postnamnet {0} har inget versionsnummer -error.validator.entryname.tooshort=postnamnet {0} är för kort, inte en katalog -error.validator.isolated.nested.class=posten {0} är en isolerad kapslad klass -error.validator.new.public.class=posten {0} innehåller en ny allmän klass som inte kan hittas i basposterna -error.validator.incompatible.class.version=posten {0} har en klassversion som är inkompatibel med en tidigare version -error.validator.different.api=posten {0} innehåller en klass med ett annat api från en tidigare version -error.validator.names.mismatch=posten {0} innehåller en klass med det interna namnet {1}, namnen matchar inte -error.validator.info.name.notequal=module-info.class i en versionshanterad katalog innehåller ett felaktigt namn -error.validator.info.requires.transitive=module-info.class i en versionshanterad katalog innehåller fler "requires transitive" -error.validator.info.requires.added=module-info.class i en versionshanterad katalog innehåller fler "requires" -error.validator.info.requires.dropped=module-info.class i en versionshanterad katalog innehåller saknade "requires" -error.validator.info.exports.notequal=module-info.class i en versionshanterad katalog innehåller olika "exports" -error.validator.info.opens.notequal=module-info.class i en versionshanterad katalog innehåller olika "opens" -error.validator.info.provides.notequal=module-info.class i en versionshanterad katalog innehåller olika "provides" -error.validator.info.version.notequal={0}: module-info.class i en versionshanterad katalog innehåller olika "version" -error.validator.info.manclass.notequal={0}: module-info.class i en versionshanterad katalog innehåller olika "main-class" -warn.validator.identical.entry=Varning: posten {0} innehåller en klass som\när identisk med en post som redan finns i jar-filen -warn.validator.resources.with.same.name=Varning: posten {0}, flera resurser med samma namn -warn.validator.concealed.public.class=Varning: posten {0} är en allmän klass\ni ett dolt paket. Om du placerar den här jar-filen på klassökvägen leder\ndet till inkompatibla allmänna gränssnitt -warn.release.unexpected.versioned.entry=oväntad versionshanterad post, {0} -out.added.manifest=tillagt manifestfil -out.added.module-info=lade till module-info: {0} -out.automodule=Ingen moduldeskriptor hittades. Härledd automatisk modul. -out.update.manifest=uppdaterat manifest -out.update.module-info=uppdaterade module-info: {0} -out.ignore.entry=ignorerar posten {0} -out.adding=lägger till: {0} -out.deflated=({0}% packat) -out.stored=(0% lagrat) -out.create=\ skapad: {0} -out.extracted=extraherat: {0} -out.inflated=\ uppackat: {0} -out.size=(in = {0}) (ut = {1}) - -usage.compat=Kompatibilitetsgränssnitt:\nSyntax: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\nAlternativ:\n -c skapa nytt arkiv\n -t lista innehållsförteckning för arkiv\n -x extrahera namngivna (eller alla) filer från arkivet\n -u uppdatera befintligt arkiv\n -v generera utförliga utdata till standardutdata\n -f ange namnet på arkivfilen\n -m inkludera manifestinformation från den angivna manifestfilen\n -n utför Pack200-normalisering när ett nytt arkiv har skapats\n -e ange applikationsingångspunkt för fristående applikation \n som medföljer i en jar-programfil\n -0 lagra endast, använd inte ZIP-komprimering\n -P behåll komponenter för inledande '/' (absolut sökväg) och ".." (överordnad katalog) från filnamn\n -M skapa inte en manifestfil för posterna\n -i generera indexinformation för de angivna jar-filerna\n -C ändra till den angivna katalogen och inkludera följande fil\nOm en fil är en katalog bearbetas den rekursivt.\nNamnen på manifestfilen, arkivfilen och ingångspunkten anges med samma\nordning som flaggorna 'm', 'f' och 'e'.\n\nExempel 1: arkivera två klassfiler i ett arkiv med namnet classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nExempel 2: använd den befintliga manifestfilen 'mymanifest' och arkivera alla\n filer i katalogen 'foo/' till 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n - -main.usage.summary=Syntax: jar [OPTION...] [ [--release VERSION] [-C dir] files] ... -main.usage.summary.try=Försök med 'jar --help' för mer information. - -main.help.preopt=Syntax: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar skapar ett arkiv för klasser och resurser, och kan ändra och återställa\nenskilda klasser och resurser från ett arkiv.\n\n Exempel:\n # Skapa ett arkiv med namnet classes.jar med två klassfiler:\n jar --create --file classes.jar Foo.class Bar.class\n # Skapa ett arkiv med ett befintligt manifest med alla filerna i 'foo/':\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Skapa ett modulärt jar-arkiv, där moduldeskriptorn finns i\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Uppdatera ett befintligt icke-modulärt jar-arkiv till ett modulärt jar-arkiv:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Skapa ett jar-arkiv för flera utgåvor och placera vissa av filerna i katalogen 'META-INF/versions/9':\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nOm du vill förkorta eller förenkla kommandot jar kan du ange argument i en separat\ntextfil och överföra den med tecknet '@' som prefix.\n\n Exempel:\n # Läs ytterligare alternativ och en lista över klassfiler från filen 'classes.list'\n jar --create --file my.jar @classes.list\n -main.help.opt.main=\ Huvudfunktionsläge:\n -main.help.opt.main.create=\ -c, --create Skapa arkivet -main.help.opt.main.generate-index=\ -i, --generate-index=FILE Generera indexinformation för de angivna jar-\n arkiven -main.help.opt.main.list=\ -t, --list Listar innehållsförteckningen för arkivet -main.help.opt.main.update=\ -u, --update Uppdatera ett befintligt jar-arkiv -main.help.opt.main.extract=\ -x, --extract Extrahera namngivna (eller alla) filer från arkivet -main.help.opt.main.describe-module=\ -d, --describe-module Skriv ut moduldeskriptorn eller det automatiska modulnamnet -main.help.opt.any=\ Åtgärdsmodifierare som är giltiga i alla lägen:\n\n -C DIR Ändra till den angivna katalogen och inkludera\n följande fil -main.help.opt.any.file=\ -f, --file=FILE Namnet på arkivfilen. När det utelämnas används stdin eller\n stdout beroende på åtgärden\n --release VERSION Placerar alla följande filer i en versionshanterad katalog\n i jar-filen (t.ex. META-INF/versions/VERSION/) -main.help.opt.any.verbose=\ -v, --verbose Generera utförliga utdata till standardutdata -main.help.opt.create=\ Åtgärdsmodifierare som endast är giltiga i läget create:\n -main.help.opt.create.update=\ Åtgärdsmodifierare som endast är giltiga i lägena create och update:\n -main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Applikationsingångspunkten för fristående\n applikationer paketerad i ett modulärt, eller körbart,\n jar-arkiv -main.help.opt.create.update.manifest=\ -m, --manifest=FILE Inkludera manifestinformationen från den angivna\n manifestfilen -main.help.opt.create.update.no-manifest=\ -M, --no-manifest Skapa inte en manifestfil för posterna -main.help.opt.create.update.module-version=\ --module-version=VERSION Modulversionen vid skapande av ett modulärt\n jar-arkiv eller vid uppdatering av ett icke-modulärt jar-arkiv -main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Beräkna och registrera hashningarna för moduler som\n matchar det angivna mönstret och som är direkt eller\n indirekt beroende av att ett modulärt jar-arkiv skapas\n eller att ett icke-modulärt jar-arkiv uppdateras -main.help.opt.create.update.module-path=\ -p, --module-path Plats för modulberoende för att generera\n hashningen -main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Exkludera från standardrotuppsättningen med moduler -main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Tips för ett verktyg för att utfärda en varning om modulen\n har lösts. deprecated, deprecated-for-removal,\n eller incubating -main.help.opt.create.update.index=\ Åtgärdsmodifierare som endast är giltiga i lägena create, update och generate-index:\n -main.help.opt.create.update.index.no-compress=\ -0, --no-compress Endast lagring, använd ingen ZIP-komprimering -main.help.opt.other=\ Övriga alternativ:\n -main.help.opt.other.help=\ -h, --help[:compat] Visa den här hjälpen eller kompatibilitetshjälpen (valfritt) -main.help.opt.other.help-extra=\ --help-extra Visa hjälp för extra alternativ -main.help.opt.other.version=\ --version Skriv ut programversion -main.help.postopt=\ Ett arkiv är ett modulärt jar-arkiv om en moduldeskriptor, 'module-info.class',\n finns i roten av de angivna katalogerna eller det angivna jar-arkivet.\n Följande åtgärder är endast giltiga vid skapande av ett modulärt jar-arkiv och\n vid uppdatering av ett befintligt icke-modulärt jar-arkiv: '--module-version',\n '--hash-modules' och '--module-path'.\n\n Obligatoriska och valfria alternativ för långa alternativ är även obligatoriska\n respektive valfria för alla motsvarande korta alternativ. diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties deleted file mode 100644 index 4dc23a09389..00000000000 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (c) 1999, 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. 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. -# - -error.multiple.main.operations=您不能指定多個 '-cuxtid' 選項 -error.cant.open=無法開啟: {0} -error.illegal.option=無效的選項: {0} -error.unrecognized.option=無法辨識的選項 : {0} -error.missing.arg=選項 {0} 需要一個引數 -error.bad.file.arg=剖析檔案引數時發生錯誤 -error.bad.option=必須指定 -{ctxuid} 的其中一個選項。 -error.bad.cflag='c' 旗標要求指定資訊清單或輸入檔案! -error.bad.uflag='u' 旗標要求指定資訊清單、'e' 旗標或輸入檔案! -error.bad.eflag=無法同時指定 'e' 旗標和具有 'Main-Class' 屬性的\n資訊清單! -error.bad.dflag='-d, --describe-module' 選項不需要指定輸入檔 -error.bad.reason=錯誤原因: {0},必須是 deprecated、deprecated-for-removal 或 incubating 其中之一 -error.nosuch.fileordir={0} : 沒有這類檔案或目錄 -error.write.file=寫入現有的 jar 檔案時發生錯誤 -error.create.dir={0} : 無法建立目錄 -error.incorrect.length=處理 {0} 時長度不正確 -error.create.tempfile=無法建立暫存檔案 -error.hash.dep=雜湊模組 {0} 相依性,在模組路徑上找不到模組 {1} -error.module.options.without.info=--module-version 或 --hash-modules 其中一個沒有 module-info.class -error.no.operative.descriptor=沒有以下版本的操作描述區: {0} -error.no.root.descriptor=沒有根模組描述區,請指定 --release -error.unable.derive.automodule=無法衍生 {0} 的模組描述區 -error.unexpected.module-info=未預期的模組描述區 {0} -error.module.descriptor.not.found=找不到模組描述區 -error.invalid.versioned.module.attribute=模組描述區屬性 {0} 無效 -error.missing.provider=找不到服務提供者: {0} -error.release.value.notnumber=版本 {0} 無效 -error.release.value.toosmall=版本 {0} 無效,必須大於等於 9 -error.release.unexpected.versioned.entry=版本 {1} 有未預期的啟動多版本功能項目 {0} -error.validator.jarfile.exception=無法驗證 {0}: {1} -error.validator.jarfile.invalid=已刪除無效的多重版本 jar 檔案 {0} -error.validator.bad.entry.name=項目名稱 {0} 的格式錯誤 -error.validator.version.notnumber=項目名稱 {0} 沒有版本編號 -error.validator.entryname.tooshort=項目名稱 {0} 太短,無法作為目錄 -error.validator.isolated.nested.class=項目 {0} 是已隔離的巢狀結構類別 -error.validator.new.public.class=項目 {0} 含有在基準項目中找不到的新公用類別 -error.validator.incompatible.class.version=項目 {0} 的類別版本與較舊版本不相容 -error.validator.different.api=項目 {0} 的某個類別含有與較舊版本不同的 API -error.validator.names.mismatch=項目 {0} 含有內部名稱為 {1} 的類別,名稱不相符 -error.validator.info.name.notequal=已啟動多版本功能目錄中的 module-info.class 包含不正確的名稱 -error.validator.info.requires.transitive=已啟動多版本功能目錄中的 module-info.class 包含額外的 "requires transitive" -error.validator.info.requires.added=已啟動多版本功能目錄中的 module-info.class 包含額外的 "requires" -error.validator.info.requires.dropped=已啟動多版本功能目錄中的 module-info.class 包含遺漏的 "requires" -error.validator.info.exports.notequal=已啟動多版本功能目錄中的 module-info.class 包含不同的 "exports" -error.validator.info.opens.notequal=已啟動多版本功能目錄中的 module-info.class 包含不同的 "opens" -error.validator.info.provides.notequal=已啟動多版本功能目錄中的 module-info.class 包含不同的 "provides" -error.validator.info.version.notequal={0}: 已啟動多版本功能目錄中的 module-info.class 包含不同的 "version" -error.validator.info.manclass.notequal={0}: 已啟動多版本功能目錄中的 module-info.class 包含不同的 "main-class" -warn.validator.identical.entry=警告: 項目 {0} 的某個類別\n與 jar 中的現有項目相同 -warn.validator.resources.with.same.name=警告: 項目 {0} 中的多個資源名稱相同 -warn.validator.concealed.public.class=警告: 項目 {0} 是隱藏套裝程式中的\n公用類別,若將此 jar 放在類別路徑上\n會造成公用介面不相容 -warn.release.unexpected.versioned.entry=未預期的啟動多版本功能項目 {0} -out.added.manifest=已新增資訊清單 -out.added.module-info=已新增 module-info: {0} -out.automodule=找不到模組描述區。已自動衍生模組。 -out.update.manifest=已更新資訊清單 -out.update.module-info=已更新 module-info: {0} -out.ignore.entry=忽略項目 {0} -out.adding=新增: {0} -out.deflated=(壓縮 {0}%) -out.stored=(儲存 0%) -out.create=\ 建立: {0} -out.extracted=擷取: {0} -out.inflated=\ 擴展: {0} -out.size=\ (讀={0})(寫={1}) - -usage.compat=相容性介面:\n用法: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files] ...\n選項:\n -c 建立新存檔\n -t 列出存檔的目錄\n -x 從存檔中擷取指定 (或全部) 的檔案\n -u 更新現有存檔\n -v 在標準輸出中產生詳細輸出\n -f 指定存檔檔案名稱\n -m 包含指定之資訊清單檔案中的資訊清單資訊\n -n 在建立新存檔之後執行 Pack200 正規化\n -e 為隨附於可執行 jar 檔案中的獨立應用程式 \n 指定應用程式進入點\n -0 僅儲存; 不使用 ZIP 壓縮方式\n -P 保留檔案名稱前面的 '/' (絕對路徑) 和 ".." (上層目錄) 元件\n -M 不為項目建立資訊清單檔案\n -i 為指定的 jar 檔案產生索引資訊\n -C 變更至指定的目錄並包含後面所列的檔案\n如果有任何檔案是目錄,則會對其進行遞迴處理。\n資訊清單檔案名稱、存檔檔案名稱以及進入點名稱\n的指定順序與指定 'm'、'f' 以及 'e' 旗標的順序相同。\n\n範例 1: 將兩個類別檔案存檔至名為 classes.jar 的存檔中: \n jar cvf classes.jar Foo.class Bar.class \n範例 2: 使用現有的資訊清單檔案 'mymanifest' 並將\n foo/ 目錄中的所有檔案存檔至 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/。\n - -main.usage.summary=用法: jar [OPTION...] [ [--release VERSION] [-C dir] files] ... -main.usage.summary.try=請使用 'jar --help' 以取得更多的資訊。 - -main.help.preopt=用法: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar 會建立一個類別和資源的存檔,而且可操控或\n從存檔回復個別類別或資源。\n\n 範例:\n # 建立一個名為 classes.jar 的存檔,其中含有兩個類別檔案:\n jar --create --file classes.jar Foo.class Bar.class\n # 使用現有的資訊清單加上 foo/ 中的所有檔案建立一個存檔:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # 建立一個模組化 jar 存檔,其中的模組描述區位於\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # 將現有的非模組化 jar 更新成模組化 jar:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # 建立多重版本的 jar,將部分檔案放置在 META-INF/versions/9 目錄中:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\n若要縮短或簡化 jar 命令,可以在個別文字檔中指定引數,\n然後使用 at 符號 (@) 作為前置碼,將其傳送至 jar 命令。\n\n 範例:\n # 從 classes.list 檔案讀取額外的選項和類別檔案清單\n jar --create --file my.jar @classes.list\n -main.help.opt.main=\ 主要作業模式:\n -main.help.opt.main.create=\ -c, --create 建立存檔 -main.help.opt.main.generate-index=\ -i, --generate-index=FILE 為指定的 jar 存檔產生索引\n 資訊 -main.help.opt.main.list=\ -t, --list 列出存檔的目錄 -main.help.opt.main.update=\ -u, --update 更新現有的 jar 存檔 -main.help.opt.main.extract=\ -x, --extract 從存檔中擷取指定 (或所有) 檔案 -main.help.opt.main.describe-module=\ -d, --describe-module 列印模組描述區或自動產生的模組名稱 -main.help.opt.any=\ 可在任何模式下使用的作業修飾條件:\n\n -C DIR 變更為指定目錄並包含\n 下列檔案 -main.help.opt.any.file=\ -f, --file=FILE 存檔檔案名稱。如果省略,會根據作業使用\n stdin 或 stdout\n --release VERSION 將所有下列檔案放置在 jar 的啟動多版本\n 功能目錄中 (例如 META-INF/versions/VERSION/) -main.help.opt.any.verbose=\ -v, --verbose 在標準輸出中產生詳細輸出 -main.help.opt.create=\ 只能在建立模式使用的作業修飾條件:\n -main.help.opt.create.update=\ 只能在建立和更新模式下使用的作業修飾條件:\n -main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME 隨附於模組化或可執行\n jar 存檔中獨立應用程式的\n 應用程式進入點 -main.help.opt.create.update.manifest=\ -m, --manifest=FILE 包含指定資訊清單檔案中的資訊清單\n 資訊 -main.help.opt.create.update.no-manifest=\ -M, --no-manifest 不為項目建立資訊清單檔案 -main.help.opt.create.update.module-version=\ --module-version=VERSION 建立模組化 jar 或更新非模組化 jar 時\n 使用的模組版本 -main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN 運算及記錄與指定樣式\n 相符的模組雜湊,這直接或間接地\n 相依於正在建立的模組化 jar 或正在\n 更新的非模組化 jar -main.help.opt.create.update.module-path=\ -p, --module-path 模組相依性的位置,用於產生\n 雜湊 -main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default 不包括預設的模組設定根目錄 -main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved 若模組已解析,則提示工具以發出警告。\n deprecated、deprecated-for-removal 或 incubating \n 其中之一 -main.help.opt.create.update.index=\ 只能在建立、更新及產生索引模式下使用的作業修飾條件:\n -main.help.opt.create.update.index.no-compress=\ -0, --no-compress 僅儲存; 不使用 ZIP 壓縮方式 -main.help.opt.other=\ 其他選項:\n -main.help.opt.other.help=\ -h, --help[:compat] 提供此說明或選擇性顯示相容性說明 -main.help.opt.other.help-extra=\ --help-extra 提供額外選項的說明 -main.help.opt.other.version=\ --version 列印程式版本 -main.help.postopt=\ 如果模組描述區 ('module-info.class') 位於指定目錄的根\n 或 jar 存檔本身的根,則存檔會是\n 模組化的 jar。下列作業只能在建立模組化 jar 或更新\n 現有非模組化 jar 時進行: '--module-version'、\n '--hash-modules' 和 '--module-path'。\n\n 長選項的強制性或選擇性引數也會是任何對應短選項的\n 強制性或選擇性引數。 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java index d6042431dbe..e9a667e003f 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java @@ -190,7 +190,6 @@ * and its members, supporting an option. * * {@snippet lang=java id="Example.java" : - * // @replace region=imports replacement=" // Note: imports deleted for clarity" * import com.sun.source.doctree.DocCommentTree; * import com.sun.source.util.DocTrees; * import jdk.javadoc.doclet.Doclet; @@ -207,12 +206,11 @@ * import java.util.List; * import java.util.Locale; * import java.util.Set; - * // @end - * * * public class Example implements Doclet { * private Reporter reporter; * private PrintWriter stdout; + * private String overviewFile; * * @Override * public void init(Locale locale, Reporter reporter) { @@ -221,51 +219,11 @@ * stdout = reporter.getStandardWriter(); * } * - * public void printElement(DocTrees trees, Element e) { - * DocCommentTree docCommentTree = trees.getDocCommentTree(e); - * if (docCommentTree != null) { - * stdout.println("Element (" + e.getKind() + ": " - * + e + ") has the following comments:"); - * stdout.println("Entire body: " + docCommentTree.getFullBody()); - * stdout.println("Block tags: " + docCommentTree.getBlockTags()); - * } - * } - * - * @Override - * public boolean run(DocletEnvironment docEnv) { - * reporter.print(Kind.NOTE, "overviewFile: " + overviewFile); - * - * // get the DocTrees utility class to access document comments - * DocTrees docTrees = docEnv.getDocTrees(); - * - * // location of an element in the same directory as overview.html - * try { - * Element e = ElementFilter.typesIn(docEnv.getSpecifiedElements()).iterator().next(); - * DocCommentTree docCommentTree - * = docTrees.getDocCommentTree(e, overviewFile); - * if (docCommentTree != null) { - * stdout.println("Overview html: " + docCommentTree.getFullBody()); - * } - * } catch (IOException missing) { - * reporter.print(Kind.ERROR, "No overview.html found."); - * } - * - * for (TypeElement t : ElementFilter.typesIn(docEnv.getIncludedElements())) { - * stdout.println(t.getKind() + ":" + t); - * for (Element e : t.getEnclosedElements()) { - * printElement(docTrees, e); - * } - * } - * return true; - * } - * * @Override * public String getName() { * return "Example"; * } * - * private String overviewFile; - * * @Override * public Set getSupportedOptions() { * Option[] options = { @@ -317,6 +275,44 @@ * // support the latest release * return SourceVersion.latest(); * } + * + * @Override + * public boolean run(DocletEnvironment docEnv) { + * reporter.print(Kind.NOTE, "overviewFile: " + overviewFile); + * + * // get the DocTrees utility class to access document comments + * DocTrees docTrees = docEnv.getDocTrees(); + * + * // location of an element in the same directory as overview.html + * try { + * Element e = ElementFilter.typesIn(docEnv.getSpecifiedElements()).iterator().next(); + * DocCommentTree docCommentTree + * = docTrees.getDocCommentTree(e, overviewFile); + * if (docCommentTree != null) { + * stdout.println("Overview html: " + docCommentTree.getFullBody()); + * } + * } catch (IOException missing) { + * reporter.print(Kind.ERROR, "No overview.html found."); + * } + * + * for (TypeElement t : ElementFilter.typesIn(docEnv.getIncludedElements())) { + * stdout.println(t.getKind() + ":" + t); + * for (Element e : t.getEnclosedElements()) { + * printElement(docTrees, e); + * } + * } + * return true; + * } + * + * private void printElement(DocTrees trees, Element e) { + * DocCommentTree docCommentTree = trees.getDocCommentTree(e); + * if (docCommentTree != null) { + * stdout.println("Element (" + e.getKind() + ": " + * + e + ") has the following comments:"); + * stdout.println("Entire body: " + docCommentTree.getFullBody()); + * stdout.println("Block tags: " + docCommentTree.getBlockTags()); + * } + * } * } * } * diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandler.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandler.java index 0851659946a..a61ccb21eb1 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandler.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandler.java @@ -169,8 +169,7 @@ public class DocFilesHandler { } } } else if (srcfile.isDirectory()) { - if (options.copyDocfileSubdirs() - && !configuration.shouldExcludeDocFileDir(srcfile.getName())) { + if (!configuration.shouldExcludeDocFileDir(srcfile.getName())) { DocPath dirDocPath = dstDocPath.resolve(srcfile.getName()); copyDirectory(srcfile, dirDocPath, first); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java index cde5b287e25..00473742584 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java @@ -402,17 +402,19 @@ public class Navigation { HtmlTree link = switch (elem) { case ModuleElement mdle -> links.createLink(pathToRoot.resolve( docPaths.moduleSummary(mdle)), - Text.of(mdle.getQualifiedName())); + Text.of(mdle.getQualifiedName()), + getTitle(elem)); case PackageElement pkg -> links.createLink(pathToRoot.resolve( docPaths.forPackage(pkg).resolve(DocPaths.PACKAGE_SUMMARY)), pkg.isUnnamed() ? configuration.contents.defaultPackageLabel - : Text.of(pkg.getQualifiedName())); + : Text.of(pkg.getQualifiedName()), + getTitle(elem)); // Breadcrumb navigation displays nested classes as separate links. // Enclosing classes may be undocumented, in which case we just display the class name. case TypeElement type -> (configuration.isGeneratedDoc(type) && !configuration.utils.isHidden(type)) - ? links.createLink(pathToRoot.resolve( - docPaths.forClass(type)), type.getSimpleName().toString()) + ? links.createLink(pathToRoot.resolve(docPaths.forClass(type)), + Text.of(type.getSimpleName().toString()), getTitle(elem)) : HtmlTree.SPAN(Text.of(type.getSimpleName().toString())); default -> throw new IllegalArgumentException(Objects.toString(elem)); }; @@ -422,6 +424,28 @@ public class Navigation { contents.add(link); } + private String getTitle(Element elem) { + return switch (elem) { + case ModuleElement moduleElement -> contents.moduleLabel + " " + moduleElement.getQualifiedName(); + case PackageElement packageElement -> packageElement.isUnnamed() + ? contents.defaultPackageLabel.toString() + : contents.packageLabel + " " + configuration.utils.getPackageName(packageElement); + case TypeElement typeElement -> { + String key = switch (typeElement.getKind()) { + case INTERFACE -> "doclet.Interface"; + case ENUM -> "doclet.Enum"; + case RECORD -> "doclet.RecordClass"; + case ANNOTATION_TYPE -> "doclet.AnnotationType"; + case CLASS -> "doclet.Class"; + default -> throw new IllegalStateException(typeElement.getKind() + " " + typeElement); + }; + yield configuration.getDocResources().getText(key) + " " + + configuration.utils.getSimpleName(typeElement); + } + default -> throw new IllegalArgumentException(Objects.toString(elem)); + }; + } + private void addPageElementLink(Content list) { Content link = switch (element) { case ModuleElement mdle -> links.createLink(pathToRoot.resolve( @@ -526,8 +550,10 @@ public class Navigation { private void addSearch(Content target) { var resources = configuration.getDocResources(); + var placeholder = resources.getText("doclet.search_placeholder"); var inputText = HtmlTree.INPUT(HtmlAttr.InputType.TEXT, HtmlIds.SEARCH_INPUT) - .put(HtmlAttr.PLACEHOLDER, resources.getText("doclet.search_placeholder")) + .put(HtmlAttr.TITLE, placeholder) + .put(HtmlAttr.PLACEHOLDER, placeholder) .put(HtmlAttr.ARIA_LABEL, resources.getText("doclet.search_in_documentation")) .put(HtmlAttr.AUTOCOMPLETE, "off") .put(HtmlAttr.SPELLCHECK, "false"); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableOfContents.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableOfContents.java index fab81914dbd..dfcb1c60234 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableOfContents.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableOfContents.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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 @@ -103,9 +103,11 @@ public class TableOfContents { .put(HtmlAttr.ARIA_LABEL, writer.resources.getText("doclet.table_of_contents")); var header = HtmlTree.DIV(HtmlStyles.tocHeader, writer.contents.contentsHeading); if (hasFilterInput) { + var filterLabel = writer.resources.getText("doclet.filter_label"); header.add(Entity.NO_BREAK_SPACE) .add(HtmlTree.INPUT(HtmlAttr.InputType.TEXT, HtmlStyles.filterInput) - .put(HtmlAttr.PLACEHOLDER, writer.resources.getText("doclet.filter_label")) + .put(HtmlAttr.TITLE, filterLabel) + .put(HtmlAttr.PLACEHOLDER, filterLabel) .put(HtmlAttr.ARIA_LABEL, writer.resources.getText("doclet.filter_table_of_contents")) .put(HtmlAttr.AUTOCOMPLETE, "off") .put(HtmlAttr.SPELLCHECK, "false")) diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties index 1aba5c9862b..0bde58f3e49 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties @@ -521,8 +521,8 @@ doclet.usage.author.description=\ Include @author paragraphs doclet.usage.docfilessubdirs.description=\ - Enables deep copying of 'doc-files' directories. Subdirectories and all\n\ - contents are recursively copied to the destination + The -docfilessubdirs option is no longer required and\n\ + may be removed in a future release. doclet.usage.splitindex.description=\ Split index into one file per letter @@ -598,7 +598,8 @@ doclet.usage.excludedocfilessubdir.parameters=\ ,,... doclet.usage.excludedocfilessubdir.description=\ Exclude any 'doc-files' subdirectories with given name.\n\ - ':' can also be used anywhere in the argument as a separator. + Use '*' to exclude all subdirectories. ':' can also be used\n\ + anywhere in the argument as a separator. doclet.usage.group.parameters=\ ,... @@ -788,5 +789,10 @@ doclet.footer_specified=\ The -footer option is no longer supported and will be ignored.\n\ It may be removed in a future release. +# L10N: do not localize the option name -docfilessubdirs +doclet.docfilessubdirs_specified=\ + Note: The -docfilessubdirs option is no longer required and\n\ + may be removed in a future release. + doclet.selectModule=\ Select the module to search in. diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java index f10bd27d35c..ae72912d8d2 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java @@ -407,7 +407,7 @@ public abstract class BaseConfiguration { */ public boolean shouldExcludeDocFileDir(String docfilesubdir) { Set excludedDocFileDirs = getOptions().excludedDocFileDirs(); - return excludedDocFileDirs.contains(docfilesubdir); + return excludedDocFileDirs.contains(docfilesubdir) || excludedDocFileDirs.contains("*"); } /** diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java index 8bace0530fc..8ea617491ef 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java @@ -57,8 +57,8 @@ import static javax.tools.Diagnostic.Kind.ERROR; * returned by {@link BaseOptions#getSupportedOptions()}. * *

        Some of the methods used to access the values of options - * have names that begin with a verb, such as {@link #copyDocfileSubdirs} - * or {@link #showVersion}. Unless otherwise stated, + * have names that begin with a verb, such as {@link #linkSource()} + * or {@link #showVersion()}. Unless otherwise stated, * these methods should all be taken as just accessing the value * of the associated option. */ @@ -72,12 +72,6 @@ public abstract class BaseOptions { */ private boolean allowScriptInComments = false; - /** - * Argument for command-line option {@code -docfilessubdirs}. - * True if we should recursively copy the doc-file subdirectories - */ - private boolean copyDocfileSubdirs = false; - /** * Argument for command-line option {@code --date}. * {@code null} if option not given. @@ -394,7 +388,7 @@ public abstract class BaseOptions { new Option(resources, "-docfilessubdirs") { @Override public boolean process(String opt, List args) { - copyDocfileSubdirs = true; + messages.notice("doclet.docfilessubdirs_specified"); return true; } }, @@ -762,14 +756,6 @@ public abstract class BaseOptions { return allowScriptInComments; } - /** - * Argument for command-line option {@code -docfilessubdirs}. - * True if we should recursively copy the doc-file subdirectories - */ - public boolean copyDocfileSubdirs() { - return copyDocfileSubdirs; - } - /** * Argument for command-line option {@code --date}. */ diff --git a/src/jdk.javadoc/share/man/javadoc.md b/src/jdk.javadoc/share/man/javadoc.md index 920b16f55b4..bd38b2f3ec3 100644 --- a/src/jdk.javadoc/share/man/javadoc.md +++ b/src/jdk.javadoc/share/man/javadoc.md @@ -485,10 +485,10 @@ The following options are provided by the standard doclet. ``` `-docfilessubdirs` -: Enables deep copying of `doc-files` directories. Subdirectories and all - contents are recursively copied to the destination. For example, the - directory `doc-files/example/images` and all of its contents are copied. - Use the [`-excludedocfilessubdir`](#option-excludedocfilessubdir) option to +: This option is no longer required and may be removed in a future release. + The `javadoc` tool now recursively copies subdirectories of `doc-files` + directories by default. Use the + [`-excludedocfilessubdir`](#option-excludedocfilessubdir) option to restrict the subdirectories to be copied. `-doctitle` *html-code* @@ -501,9 +501,9 @@ The following options are provided by the standard doclet. `javadoc -doctitle "My Library
        v1.0" com.mypackage`. `-excludedocfilessubdir` *name1*`,`*name2...* -: Excludes any subdirectories with the given names - when recursively copying `doc-files` subdirectories. - See [`-docfilessubdirs`](#option-docfilessubdirs). +: Excludes any subdirectories with the given names when recursively copying + `doc-files` subdirectories. You can use `*` to exclude all subdirectories + from being copied, but note that `*` must be quoted or escaped in the shell. For historical reasons, `:` can be used anywhere in the argument as a separator instead of `,`. diff --git a/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/Utils.java b/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/Utils.java index 01946219ab9..0b31e698184 100644 --- a/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/Utils.java +++ b/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/Utils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -123,7 +123,10 @@ public class Utils { if ((c = primitiveMap.get(className)) != null) { return c; } - return Class.forName(className); + if (editableTypes.contains(className)) { + return Class.forName(className); + } + return Object.class; // No need to load class. } /** @@ -216,7 +219,7 @@ public class Utils { className = className.substring(2, className.length() - 1); } else { try { - Class c = Class.forName(className); + Class c = Utils.getClass(className); className = c.getComponentType().getName(); } catch (ClassNotFoundException e) { // Should not happen diff --git a/src/jdk.jdeps/share/classes/com/sun/tools/javap/AttributeWriter.java b/src/jdk.jdeps/share/classes/com/sun/tools/javap/AttributeWriter.java index 8b7ac158639..6f7463a4498 100644 --- a/src/jdk.jdeps/share/classes/com/sun/tools/javap/AttributeWriter.java +++ b/src/jdk.jdeps/share/classes/com/sun/tools/javap/AttributeWriter.java @@ -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 @@ -221,7 +221,7 @@ public class AttributeWriter extends BasicWriter { for (var flag : maskToAccessFlagsReportUnknown(access_flags, AccessFlag.Location.INNER_CLASS, cffv)) { if (flag.sourceModifier() && (flag != AccessFlag.ABSTRACT || !info.has(AccessFlag.INTERFACE))) { - print(Modifier.toString(flag.mask()) + " "); + print(flag.name().toLowerCase(Locale.ROOT) + " "); } } if (info.innerName().isPresent()) { diff --git a/src/jdk.jdeps/share/classes/com/sun/tools/javap/ClassWriter.java b/src/jdk.jdeps/share/classes/com/sun/tools/javap/ClassWriter.java index c5c75d8848c..1067dd0d6cb 100644 --- a/src/jdk.jdeps/share/classes/com/sun/tools/javap/ClassWriter.java +++ b/src/jdk.jdeps/share/classes/com/sun/tools/javap/ClassWriter.java @@ -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 @@ -52,6 +52,7 @@ import java.util.Date; import java.util.EnumSet; import java.util.LinkedHashSet; import java.util.List; +import java.util.Locale; import java.util.Set; import static java.lang.classfile.ClassFile.*; @@ -434,8 +435,7 @@ public class ClassWriter extends BasicWriter { return; var flags = f.flags(); - writeModifiers(flagsReportUnknown(flags, cffv()).stream().filter(fl -> fl.sourceModifier()) - .map(fl -> Modifier.toString(fl.mask())).toList()); + writeModifiers(getModifiers(flagsReportUnknown(flags, cffv()))); print(() -> sigPrinter.print( f.findAttribute(Attributes.signature()) .map(SignatureAttribute::asTypeSignature) @@ -494,9 +494,7 @@ public class ClassWriter extends BasicWriter { int flags = m.flags().flagsMask(); - var modifiers = new ArrayList(); - for (var f : flagsReportUnknown(m.flags(), cffv())) - if (f.sourceModifier()) modifiers.add(Modifier.toString(f.mask())); + var modifiers = getModifiers(flagsReportUnknown(m.flags(), cffv())); String name = "???"; try { @@ -815,7 +813,7 @@ public class ClassWriter extends BasicWriter { private static Set getModifiers(Set flags) { Set s = new LinkedHashSet<>(); for (var f : flags) - if (f.sourceModifier()) s.add(Modifier.toString(f.mask())); + if (f.sourceModifier()) s.add(f == AccessFlag.STRICT ? "strictfp" : f.name().toLowerCase(Locale.ROOT)); return s; } diff --git a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java index 94d06363dd1..ca2fa7ff15f 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java @@ -989,7 +989,6 @@ public class TTY implements EventNotifier { // Old-style options (These should remain in place as long as // the standard VM accepts them) token.equals("-verify") || - token.equals("-verifyremote") || token.equals("-verbosegc")) { javaArgs = addArgument(javaArgs, token); diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/debugDispatch.c b/src/jdk.jdwp.agent/share/native/libjdwp/debugDispatch.c index 95adad790df..7f72ec9149f 100644 --- a/src/jdk.jdwp.agent/share/native/libjdwp/debugDispatch.c +++ b/src/jdk.jdwp.agent/share/native/libjdwp/debugDispatch.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -98,7 +98,7 @@ debugDispatch_getHandler(int cmdSetNum, int cmdNum, const char **cmdSetName_p, c *cmdSetName_p = ""; *cmdName_p = ""; - if (cmdSetNum > JDWP_HIGHEST_COMMAND_SET) { + if (cmdSetNum < 0 || cmdSetNum > JDWP_HIGHEST_COMMAND_SET) { return NULL; } @@ -108,7 +108,7 @@ debugDispatch_getHandler(int cmdSetNum, int cmdNum, const char **cmdSetName_p, c } *cmdSetName_p = cmd_set->cmd_set_name; - if (cmdNum > cmd_set->num_cmds) { + if (cmdNum < 1 || cmdNum > cmd_set->num_cmds) { *cmdName_p = ""; return NULL; } else { diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c b/src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c index e24fcd57156..c6d878fa8fd 100644 --- a/src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c +++ b/src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c @@ -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. * 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,8 +90,8 @@ get_time_stamp(char *tbuf, size_t ltbuf) static const char * file_basename(const char *file) { - char *p1; - char *p2; + const char* p1; + const char* p2; if ( file==NULL ) return "unknown"; diff --git a/src/jdk.jfr/share/classes/jdk/jfr/EventSettings.java b/src/jdk.jfr/share/classes/jdk/jfr/EventSettings.java index c9f24d9f903..a8de9592140 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/EventSettings.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/EventSettings.java @@ -151,8 +151,8 @@ public abstract class EventSettings { } @Override - public Recording newRecording(RecordingState state) { - return new Recording(state, Map.of()); + public Recording newRecording(Boolean register) { + return new Recording(register, Map.of()); } @Override diff --git a/src/jdk.jfr/share/classes/jdk/jfr/FlightRecorder.java b/src/jdk.jfr/share/classes/jdk/jfr/FlightRecorder.java index 6ea6f87f2af..1d6298be9bb 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/FlightRecorder.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/FlightRecorder.java @@ -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 @@ -99,8 +99,12 @@ public final class FlightRecorder { */ public Recording takeSnapshot() { Recording snapshot = new Recording(); - snapshot.setName("Snapshot"); - internal.fillWithRecordedData(snapshot.getInternal(), null); + snapshot.getInternal().setName("Snapshot", false); + synchronized (internal) { + if (!internal.isDestroyed()) { + internal.fillWithRecordedData(snapshot.getInternal(), null); + } + } return snapshot; } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/Period.java b/src/jdk.jfr/share/classes/jdk/jfr/Period.java index 97d4676e6a5..dcf673df8bc 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/Period.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/Period.java @@ -54,7 +54,7 @@ public @interface Period { /** * Returns the default setting value for a periodic setting. *

        - * String representation of a positive {@code Long} value followed by an empty + * String representation of a positive {@code long} value followed by an empty * space and one of the following units:
        *
        * {@code "ns"} (nanoseconds)
        diff --git a/src/jdk.jfr/share/classes/jdk/jfr/Recording.java b/src/jdk.jfr/share/classes/jdk/jfr/Recording.java index 8a3181307d2..466654180eb 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/Recording.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/Recording.java @@ -35,7 +35,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -import jdk.jfr.RecordingState; import jdk.jfr.internal.PlatformRecorder; import jdk.jfr.internal.PlatformRecording; import jdk.jfr.internal.Type; @@ -101,16 +100,16 @@ public final class Recording implements Closeable { * @since 11 */ public Recording(Map settings) { - this(RecordingState.NEW, settings); + this(null, settings); } // package private - Recording(RecordingState state, Map settings) { + Recording(Boolean register, Map settings) { Objects.requireNonNull(settings, "settings"); Map sanitized = Utils.sanitizeNullFreeStringMap(settings); PlatformRecorder r = FlightRecorder.getFlightRecorder().getInternal(); synchronized (r) { - this.internal = r.newRecording(state, sanitized); + this.internal = r.newRecording(register, sanitized); this.internal.setRecording(this); if (internal.getRecording() != this) { throw new InternalError("Internal recording not properly setup"); @@ -503,7 +502,7 @@ public final class Recording implements Closeable { */ public void setName(String name) { Objects.requireNonNull(name, "name"); - internal.setName(name); + internal.setName(name, true); } /** diff --git a/src/jdk.jfr/share/classes/jdk/jfr/Threshold.java b/src/jdk.jfr/share/classes/jdk/jfr/Threshold.java index 92c40823bbb..b980e765981 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/Threshold.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/Threshold.java @@ -50,7 +50,7 @@ public @interface Threshold { /** * The threshold (for example, {@code "20 ms"}). *

        - * A {@code String} representation of a positive {@code Long} value followed by an + * A {@code String} representation of a positive {@code long} value followed by an * empty space and one of the following units:
        *
        * {@code "ns"} (nanoseconds)
        diff --git a/src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java b/src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java index 5ec794bdf7c..22b08e04dc9 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java @@ -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 @@ -41,6 +41,7 @@ import jdk.jfr.EventSettings; import jdk.jfr.EventType; import jdk.jfr.Recording; import jdk.jfr.RecordingState; +import jdk.jfr.internal.PlatformRecorder; import jdk.jfr.internal.PlatformRecording; import jdk.jfr.internal.PrivateAccess; import jdk.jfr.internal.util.Utils; @@ -97,9 +98,9 @@ public final class RecordingStream implements AutoCloseable, EventStream { private RecordingStream(Map settings) { this.recording = new Recording(); this.creationTime = Instant.now(); - this.recording.setName("Recording Stream: " + creationTime); try { PlatformRecording pr = PrivateAccess.getInstance().getPlatformRecording(recording); + pr.setName("Recording Stream: " + creationTime, false); this.directoryStream = new EventDirectoryStream( null, pr, @@ -113,6 +114,12 @@ public final class RecordingStream implements AutoCloseable, EventStream { if (!settings.isEmpty()) { recording.setSettings(settings); } + PlatformRecorder recorder = PrivateAccess.getInstance().getPlatformRecorder(); + synchronized (recorder) { + if (recorder.isDestroyed()) { + close(); + } + } } private List configurations() { diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/Cutoff.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/Cutoff.java index a00a71b3531..cc1426025d0 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/Cutoff.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/Cutoff.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2020, 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,7 +55,7 @@ public @interface Cutoff { /** * Cutoff, for example {@code "20 ms"}. *

        - * String representation of a positive {@code Long} value followed by an empty + * String representation of a positive {@code long} value followed by an empty * space and one of the following units
        *
        * {@code "ns"} (nanoseconds)
        diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java index 260f2fed54d..a82eff239e6 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java @@ -67,6 +67,7 @@ public final class PlatformRecorder { private long recordingCounter = 0; private RepositoryChunk currentChunk; private boolean runPeriodicTask; + private boolean destroyed; public PlatformRecorder() throws Exception { repository = Repository.getRepository(); @@ -82,8 +83,18 @@ public final class PlatformRecorder { Runtime.getRuntime().addShutdownHook(shutdownHook); } - public synchronized PlatformRecording newRecording(RecordingState state, Map settings) { - return newRecording(state, settings, ++recordingCounter); + public synchronized PlatformRecording newRecording(Boolean register, Map settings) { + long id = ++recordingCounter; + if (register == null) { + if (isDestroyed()) { + PlatformRecording r = newRecording(false, settings, id); + r.setState(RecordingState.CLOSED); + return r; + } else { + return newRecording(true, settings, id); + } + } + return newRecording(register, settings, id); } // To be used internally when doing dumps. @@ -92,15 +103,15 @@ public final class PlatformRecorder { if(!Thread.holdsLock(this)) { throw new InternalError("Caller must have recorder lock"); } - return newRecording(RecordingState.NEW, new HashMap<>(), 0); + return newRecording(true, new HashMap<>(), 0); } - private synchronized PlatformRecording newRecording(RecordingState state, Map settings, long id) { + private synchronized PlatformRecording newRecording(boolean register, Map settings, long id) { PlatformRecording recording = new PlatformRecording(this, id); if (!settings.isEmpty()) { recording.setSettings(settings); } - if (state != RecordingState.CLOSED) { + if (register) { recordings.add(recording); } return recording; @@ -177,8 +188,13 @@ public final class PlatformRecorder { } } } - writeReports(); + destroyed = true; + // This will prevent further interaction with recordings after JFR has been destroyed. + for (PlatformRecording p : getRecordings()) { + p.setState(RecordingState.CLOSED); + } + recordings.clear(); JDKEvents.remove(); if (JVMSupport.hasJFR()) { @@ -190,11 +206,29 @@ public final class PlatformRecorder { repository.clear(); } + // Not synchronized. Caller must hold recorder lock to avoid races. + public boolean isDestroyed() { + if (!Thread.holdsLock(this)) { + throw new InternalError("Caller must have recorder lock"); + } + return destroyed; + } + private void writeReports() { for (PlatformRecording recording : getRecordings()) { if (recording.isToDisk() && recording.getState() == RecordingState.STOPPED) { for (Report report : recording.getReports()) { - report.print(recording.getStartTime(), recording.getStopTime()); + try { + report.print(recording.getStartTime(), recording.getStopTime()); + } catch (Exception e) { + StringBuilder message = new StringBuilder(); + message.append("Could not generate report-on-exit for view "); + message.append(report.name()); + message.append(" (recording "); + message.append(recording.getName()).append(":").append(recording.getId()); + message.append("). Unexpected error: ").append(e.toString()); + Logger.log(JFR, WARN, message.toString()); + } } } } @@ -547,15 +581,15 @@ public final class PlatformRecorder { } synchronized Recording newCopy(PlatformRecording r, boolean stop) { - PrivateAccess pr = PrivateAccess.getInstance(); - boolean closed = r.getState() == RecordingState.CLOSED; - Recording newRec = closed ? pr.newRecording(RecordingState.CLOSED) : new Recording(); - PlatformRecording copy = pr.getPlatformRecording(newRec); + PrivateAccess access = PrivateAccess.getInstance(); + boolean register = !isDestroyed() && r.getState() != RecordingState.CLOSED; + Recording newRec = access.newRecording(register); + PlatformRecording copy = access.getPlatformRecording(newRec); copy.setSettings(r.getSettings()); copy.setMaxAge(r.getMaxAge()); copy.setMaxSize(r.getMaxSize()); copy.setDumpOnExit(r.getDumpOnExit()); - copy.setName("Clone of " + r.getName()); + copy.setName("Clone of " + r.getName(), false); copy.setToDisk(r.isToDisk()); copy.setInternalDuration(r.getDuration()); copy.setStartTime(r.getStartTime()); diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java index 64454fc3cb4..92d60f5bdec 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java @@ -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 @@ -353,7 +353,7 @@ public final class PlatformRecording implements AutoCloseable { // Recording is RUNNING, create a clone PlatformRecording clone = recorder.newTemporaryRecording(); clone.setShouldWriteActiveRecordingEvent(false); - clone.setName(getName()); + clone.setName(getName(), false); clone.setToDisk(true); clone.setMaxAge(getMaxAge()); clone.setMaxSize(getMaxSize()); @@ -425,7 +425,7 @@ public final class PlatformRecording implements AutoCloseable { } } - void setState(RecordingState state) { + public void setState(RecordingState state) { synchronized (recorder) { this.state = state; } @@ -449,9 +449,11 @@ public final class PlatformRecording implements AutoCloseable { } } - public void setName(String name) { + public void setName(String name, boolean checkClosed) { synchronized (recorder) { - ensureNotClosed(); + if (checkClosed) { + ensureNotClosed(); + } this.name = name; } } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/PrivateAccess.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/PrivateAccess.java index 2297bf7bdde..b30e50ff4f3 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/PrivateAccess.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/PrivateAccess.java @@ -33,7 +33,6 @@ import jdk.jfr.Configuration; import jdk.jfr.EventSettings; import jdk.jfr.EventType; import jdk.jfr.Recording; -import jdk.jfr.RecordingState; import jdk.jfr.SettingDescriptor; import jdk.jfr.ValueDescriptor; import jdk.jfr.internal.management.EventSettingsModifier; @@ -97,7 +96,7 @@ public abstract class PrivateAccess { public abstract PlatformRecorder getPlatformRecorder(); - public abstract Recording newRecording(RecordingState state); + public abstract Recording newRecording(Boolean register); public abstract EventSettings newEventSettings(EventSettingsModifier esm); diff --git a/src/jdk.jfr/share/classes/jdk/jfr/package-info.java b/src/jdk.jfr/share/classes/jdk/jfr/package-info.java index 812525e0ff4..2ba7aa5db30 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/package-info.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/package-info.java @@ -119,7 +119,7 @@ * {@code enabled} * Specifies whether the event is recorded * {@code "true"} - * String representation of a {@code Boolean} ({@code "true"} or + * String representation of a {@code boolean} ({@code "true"} or * {@code "false"}) * {@code "true"}
        * {@code "false"} @@ -129,7 +129,7 @@ * Specifies the duration below which an event is not recorded * {@code "0"} (no limit) * {@code "0"} if no threshold is used, otherwise a string representation of - * a positive {@code Long} followed by a space and one of the following units: + * a positive {@code long} followed by a space and one of the following units: *

          *
        • {@code "ns"} (nanoseconds) *
        • {@code "us"} (microseconds) @@ -149,7 +149,7 @@ * periodic * {@code "everyChunk"} * {@code "everyChunk"}, if a periodic event should be emitted with every - * file rotation, otherwise a string representation of a positive {@code Long} + * file rotation, otherwise a string representation of a positive {@code long} * value followed by an empty space and one of the following units: *
            *
          • {@code "ns"} (nanoseconds) @@ -171,7 +171,7 @@ * Specifies whether the stack trace from the {@link Event#commit()} method * is recorded * {@code "true"} - * String representation of a {@code Boolean} ({@code "true"} or + * String representation of a {@code boolean} ({@code "true"} or * {@code "false"}) * {@code "true"},
            * {@code "false"} @@ -181,7 +181,7 @@ * Specifies the maximum rate of events per time unit. * {@code "off"} (no throttling) * - * "off", if events should not be throttled, otherwise a string representation of a positive {@code Long} value followed by forward slash ("/") and one of the following units: + * "off", if events should not be throttled, otherwise a string representation of a positive {@code long} value followed by forward slash ("/") and one of the following units: *
              *
            • {@code "ns"} (nanoseconds) *
            • {@code "us"} (microseconds) diff --git a/src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java b/src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java index 3f324ba1364..402f6047553 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2024, 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 @@ -298,7 +298,7 @@ class JImageTask { parent.getAbsolutePath()); } - if (!ImageResourcesTree.isTreeInfoResource(name)) { + if (location.getType() == ImageLocation.LocationType.RESOURCE) { Files.write(resource.toPath(), bytes); } } @@ -415,21 +415,18 @@ class JImageTask { continue; } - if (!ImageResourcesTree.isTreeInfoResource(name)) { + ImageLocation location = reader.findLocation(name); + if (location.getType() == ImageLocation.LocationType.RESOURCE) { if (moduleAction != null) { - int offset = name.indexOf('/', 1); - - String newModule = offset != -1 ? - name.substring(1, offset) : - ""; - + String newModule = location.getModule(); + if (newModule.isEmpty()) { + newModule = ""; + } if (!oldModule.equals(newModule)) { moduleAction.apply(reader, oldModule, newModule); oldModule = newModule; } } - - ImageLocation location = reader.findLocation(name); resourceAction.apply(reader, name, location); } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Archive.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Archive.java index c56346b6994..1cd8f5993d7 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Archive.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Archive.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 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 @@ -24,6 +24,7 @@ */ package jdk.tools.jlink.internal; +import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.nio.file.Path; @@ -34,7 +35,7 @@ import java.util.stream.Stream; * An Archive of all content, classes, resources, configuration files, and * other, for a module. */ -public interface Archive { +public interface Archive extends Closeable { /** * Entry is contained in an Archive @@ -59,11 +60,12 @@ public interface Archive { private final String path; /** - * Constructs an entry of the given archive - * @param archive archive - * @param path - * @param name an entry name that does not contain the module name - * @param type + * Constructs an entry of the given archive. + * + * @param archive the archive in which this entry exists. + * @param path the complete path of the entry, including the module. + * @param name an entry name relative to its containing module. + * @param type the entry type. */ public Entry(Archive archive, String path, String name, EntryType type) { this.archive = Objects.requireNonNull(archive); @@ -72,10 +74,6 @@ public interface Archive { this.type = Objects.requireNonNull(type); } - public final Archive archive() { - return archive; - } - public final EntryType type() { return type; } @@ -134,5 +132,6 @@ public interface Archive { /* * Close the archive */ + @Override void close() throws IOException; } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/BasicImageWriter.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/BasicImageWriter.java index ca576227692..67895dd1450 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/BasicImageWriter.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/BasicImageWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020, 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 @@ -36,21 +36,17 @@ import jdk.internal.jimage.ImageStringsReader; public final class BasicImageWriter { public static final String MODULES_IMAGE_NAME = "modules"; - private ByteOrder byteOrder; - private ImageStringsWriter strings; + private final ByteOrder byteOrder; + private final ImageStringsWriter strings; private int length; private int[] redirect; private ImageLocationWriter[] locations; - private List input; - private ImageStream headerStream; - private ImageStream redirectStream; - private ImageStream locationOffsetStream; - private ImageStream locationStream; - private ImageStream allIndexStream; - - public BasicImageWriter() { - this(ByteOrder.nativeOrder()); - } + private final List input; + private final ImageStream headerStream; + private final ImageStream redirectStream; + private final ImageStream locationOffsetStream; + private final ImageStream locationStream; + private final ImageStream allIndexStream; public BasicImageWriter(ByteOrder byteOrder) { this.byteOrder = Objects.requireNonNull(byteOrder); @@ -75,11 +71,15 @@ public final class BasicImageWriter { return strings.get(offset); } - public void addLocation(String fullname, long contentOffset, - long compressedSize, long uncompressedSize) { + public void addLocation( + String fullname, + long contentOffset, + long compressedSize, + long uncompressedSize, + int previewFlags) { ImageLocationWriter location = ImageLocationWriter.newLocation(fullname, strings, - contentOffset, compressedSize, uncompressedSize); + contentOffset, compressedSize, uncompressedSize, previewFlags); input.add(location); length++; } @@ -88,10 +88,6 @@ public final class BasicImageWriter { return locations; } - int getLocationsCount() { - return input.size(); - } - private void generatePerfectHash() { PerfectHashBuilder builder = new PerfectHashBuilder<>( @@ -174,16 +170,4 @@ public final class BasicImageWriter { return allIndexStream.toArray(); } - - ImageLocationWriter find(String key) { - int index = redirect[ImageStringsReader.hashCode(key) % length]; - - if (index < 0) { - index = -index - 1; - } else { - index = ImageStringsReader.hashCode(key, index) % length; - } - - return locations[index]; - } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageFileCreator.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageFileCreator.java index 9e05fe31aa9..b29a9de5212 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageFileCreator.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageFileCreator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2024, 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 @@ -49,6 +49,7 @@ import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; +import jdk.internal.jimage.ImageLocation; import jdk.tools.jlink.internal.Archive.Entry; import jdk.tools.jlink.internal.Archive.Entry.EntryType; import jdk.tools.jlink.internal.JRTArchive.ResourceFileEntry; @@ -227,31 +228,8 @@ public final class ImageFileCreator { DataOutputStream out, boolean generateRuntimeImage ) throws IOException { - ResourcePool resultResources; - try { - resultResources = pluginSupport.visitResources(allContent); - if (generateRuntimeImage) { - // Keep track of non-modules resources for linking from a run-time image - resultResources = addNonClassResourcesTrackFiles(resultResources, - writer); - // Generate the diff between the input resources from packaged - // modules in 'allContent' to the plugin- or otherwise - // generated-content in 'resultResources' - resultResources = addResourceDiffFiles(allContent.resourcePool(), - resultResources, - writer); - } - } catch (PluginException pe) { - if (JlinkTask.DEBUG) { - pe.printStackTrace(); - } - throw pe; - } catch (Exception ex) { - if (JlinkTask.DEBUG) { - ex.printStackTrace(); - } - throw new IOException(ex); - } + ResourcePool resultResources = + getResourcePool(allContent, writer, pluginSupport, generateRuntimeImage); Set duplicates = new HashSet<>(); long[] offset = new long[1]; @@ -282,8 +260,10 @@ public final class ImageFileCreator { offset[0] += onFileSize; return; } + int locFlags = ImageLocation.getPreviewFlags( + res.path(), p -> resultResources.findEntry(p).isPresent()); duplicates.add(path); - writer.addLocation(path, offset[0], compressedSize, uncompressedSize); + writer.addLocation(path, offset[0], compressedSize, uncompressedSize, locFlags); paths.add(path); offset[0] += onFileSize; } @@ -307,6 +287,40 @@ public final class ImageFileCreator { return resultResources; } + private static ResourcePool getResourcePool( + ResourcePoolManager allContent, + BasicImageWriter writer, + ImagePluginStack pluginSupport, + boolean generateRuntimeImage) + throws IOException { + ResourcePool resultResources; + try { + resultResources = pluginSupport.visitResources(allContent); + if (generateRuntimeImage) { + // Keep track of non-modules resources for linking from a run-time image + resultResources = addNonClassResourcesTrackFiles(resultResources, + writer); + // Generate the diff between the input resources from packaged + // modules in 'allContent' to the plugin- or otherwise + // generated-content in 'resultResources' + resultResources = addResourceDiffFiles(allContent.resourcePool(), + resultResources, + writer); + } + } catch (PluginException pe) { + if (JlinkTask.DEBUG) { + pe.printStackTrace(); + } + throw pe; + } catch (Exception ex) { + if (JlinkTask.DEBUG) { + ex.printStackTrace(); + } + throw new IOException(ex); + } + return resultResources; + } + /** * Support for creating a runtime suitable for linking from the run-time * image. @@ -558,62 +572,4 @@ public final class ImageFileCreator { resultResources.entries().forEach(resources::add); return resources; } - - /** - * Helper method that splits a Resource path onto 3 items: module, parent - * and resource name. - * - * @param path - * @return An array containing module, parent and name. - */ - public static String[] splitPath(String path) { - Objects.requireNonNull(path); - String noRoot = path.substring(1); - int pkgStart = noRoot.indexOf("/"); - String module = noRoot.substring(0, pkgStart); - List result = new ArrayList<>(); - result.add(module); - String pkg = noRoot.substring(pkgStart + 1); - String resName; - int pkgEnd = pkg.lastIndexOf("/"); - if (pkgEnd == -1) { // No package. - resName = pkg; - } else { - resName = pkg.substring(pkgEnd + 1); - } - - pkg = toPackage(pkg, false); - result.add(pkg); - result.add(resName); - - String[] array = new String[result.size()]; - return result.toArray(array); - } - - /** - * Returns the path of the resource. - */ - public static String resourceName(String path) { - Objects.requireNonNull(path); - String s = path.substring(1); - int index = s.indexOf("/"); - return s.substring(index + 1); - } - - public static String toPackage(String name) { - return toPackage(name, false); - } - - private static String toPackage(String name, boolean log) { - int index = name.lastIndexOf('/'); - if (index > 0) { - return name.substring(0, index).replace('/', '.'); - } else { - // ## unnamed package - if (log) { - System.err.format("Warning: %s in unnamed package%n", name); - } - return ""; - } - } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageLocationWriter.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageLocationWriter.java index f2c7f102027..18ee9c88103 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageLocationWriter.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageLocationWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2017, 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 @@ -53,9 +53,13 @@ public final class ImageLocationWriter extends ImageLocation { return addAttribute(kind, strings.add(value)); } - static ImageLocationWriter newLocation(String fullName, + static ImageLocationWriter newLocation( + String fullName, ImageStringsWriter strings, - long contentOffset, long compressedSize, long uncompressedSize) { + long contentOffset, + long compressedSize, + long uncompressedSize, + int previewFlags) { String moduleName = ""; String parentName = ""; String baseName; @@ -90,13 +94,14 @@ public final class ImageLocationWriter extends ImageLocation { } return new ImageLocationWriter(strings) - .addAttribute(ATTRIBUTE_MODULE, moduleName) - .addAttribute(ATTRIBUTE_PARENT, parentName) - .addAttribute(ATTRIBUTE_BASE, baseName) - .addAttribute(ATTRIBUTE_EXTENSION, extensionName) - .addAttribute(ATTRIBUTE_OFFSET, contentOffset) - .addAttribute(ATTRIBUTE_COMPRESSED, compressedSize) - .addAttribute(ATTRIBUTE_UNCOMPRESSED, uncompressedSize); + .addAttribute(ATTRIBUTE_MODULE, moduleName) + .addAttribute(ATTRIBUTE_PARENT, parentName) + .addAttribute(ATTRIBUTE_BASE, baseName) + .addAttribute(ATTRIBUTE_EXTENSION, extensionName) + .addAttribute(ATTRIBUTE_OFFSET, contentOffset) + .addAttribute(ATTRIBUTE_COMPRESSED, compressedSize) + .addAttribute(ATTRIBUTE_UNCOMPRESSED, uncompressedSize) + .addAttribute(ATTRIBUTE_PREVIEW_FLAGS, previewFlags); } @Override diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageResourcesTree.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageResourcesTree.java index 8a4288f0cfd..2f8143820ca 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageResourcesTree.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageResourcesTree.java @@ -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 @@ -24,33 +24,34 @@ */ package jdk.tools.jlink.internal; +import jdk.internal.jimage.ImageLocation; +import jdk.internal.jimage.ModuleLink; + import java.io.DataOutputStream; import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; +import java.util.Comparator; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.TreeMap; -import java.util.TreeSet; +import java.util.stream.Collectors; /** * A class to build a sorted tree of Resource paths as a tree of ImageLocation. - * */ // XXX Public only due to the JImageTask / JImageTask code duplication public final class ImageResourcesTree { - public static boolean isTreeInfoResource(String path) { - return path.startsWith("/packages") || path.startsWith("/modules"); - } - /** * Path item tree node. */ - private static class Node { + // Visible for testing only. + static class Node { private final String name; private final Map children = new TreeMap<>(); @@ -66,6 +67,14 @@ public final class ImageResourcesTree { } } + private void setLocation(ImageLocationWriter loc) { + // This *can* be called more than once, but only with the same instance. + if (this.loc != null && loc != this.loc) { + throw new IllegalStateException("Cannot add different locations: " + name); + } + this.loc = Objects.requireNonNull(loc); + } + public String getPath() { if (parent == null) { return "/"; @@ -95,215 +104,206 @@ public final class ImageResourcesTree { } } - private static final class ResourceNode extends Node { + // Visible for testing only. + static final class ResourceNode extends Node { public ResourceNode(String name, Node parent) { super(name, parent); } } - private static class PackageNode extends Node { - /** - * A reference to a package. Empty packages can be located inside one or - * more modules. A package with classes exist in only one module. - */ - static final class PackageReference { + /** + * A 2nd level package directory, {@code "/packages/"}. + * + *

              While package paths can exist within many modules, for each package + * there is at most one module in which that package has resources. + * + *

              For example, the package path {@code java/util} exists in both the + * {@code java.base} and {@code java.logging} modules. This means both + * {@code "/packages/java.util/java.base"} and + * {@code "/packages/java.util/java.logging"} will exist, but only + * {@code "java.base"} entry will be marked as having content. + * + *

              When processing module links in non-preview mode, entries marked + * as {@link ModuleLink#isPreviewOnly() preview-only} must be ignored. + * + *

              If all links in a package are preview-only, then the entire package is + * marked as preview-only, and must be ignored. + */ + // Visible for testing only. + static final class PackageNode extends Node { + private final List moduleLinks; - private final String name; - private final boolean isEmpty; - - PackageReference(String name, boolean isEmpty) { - this.name = Objects.requireNonNull(name); - this.isEmpty = isEmpty; - } - - @Override - public String toString() { - return name + "[empty:" + isEmpty + "]"; - } - } - - private final Map references = new TreeMap<>(); - - PackageNode(String name, Node parent) { + PackageNode(String name, List moduleLinks, Node parent) { super(name, parent); + if (moduleLinks.isEmpty()) { + throw new IllegalStateException("Package must be associated with modules: " + name); + } + if (moduleLinks.stream().filter(ModuleLink::hasResources).count() > 1) { + throw new IllegalStateException("Multiple modules contain non-empty package: " + name); + } + this.moduleLinks = Collections.unmodifiableList(moduleLinks); } - private void addReference(String name, boolean isEmpty) { - PackageReference ref = references.get(name); - if (ref == null || ref.isEmpty) { - references.put(name, new PackageReference(name, isEmpty)); - } + List getModuleLinks() { + return moduleLinks; } + } - private void validate() { - boolean exists = false; - for (PackageReference ref : references.values()) { - if (!ref.isEmpty) { - if (exists) { - throw new RuntimeException("Multiple modules to contain package " - + getName()); - } else { - exists = true; - } - } - } + // Not serialized, and never stored in any field of any class that is. + @SuppressWarnings("serial") + private static final class InvalidTreeException extends Exception { + public InvalidTreeException(Node badNode) { + super("Resources tree, invalid data structure, skipping: " + badNode.getPath()); } + // Exception only used for program flow, not debugging. + @Override + public Throwable fillInStackTrace() {return this;} } /** * Tree of nodes. */ - private static final class Tree { + // Visible for testing only. + static final class Tree { + private static final String PREVIEW_PREFIX = "META-INF/preview/"; private final Map directAccess = new HashMap<>(); private final List paths; private final Node root; - private Node modules; - private Node packages; + private Node packagesRoot; - private Tree(List paths) { - this.paths = paths; + // Visible for testing only. + Tree(List paths) { + this.paths = paths.stream().sorted(Comparator.reverseOrder()).toList(); + // Root node is not added to the directAccess map. root = new Node("", null); buildTree(); } private void buildTree() { - modules = new Node("modules", root); - directAccess.put(modules.getPath(), modules); + Node modulesRoot = new Node("modules", root); + directAccess.put(modulesRoot.getPath(), modulesRoot); + packagesRoot = new Node("packages", root); + directAccess.put(packagesRoot.getPath(), packagesRoot); - Map> moduleToPackage = new TreeMap<>(); - Map> packageToModule = new TreeMap<>(); - - for (String p : paths) { - if (!p.startsWith("/")) { - continue; - } - String[] split = p.split("/"); - // minimum length is 3 items: // - if (split.length < 3) { - System.err.println("Resources tree, invalid data structure, " - + "skipping " + p); - continue; - } - Node current = modules; - String module = null; - for (int i = 0; i < split.length; i++) { - // When a non terminal node is marked as being a resource, something is wrong. + // Map of dot-separated package names to module links (those in + // which the package appear). Links are merged after to ensure each + // module name appears only once, but temporarily a module may have + // several link entries per package (e.g. with-content, + // without-content, normal, preview-only etc..). + Map> packageToModules = new TreeMap<>(); + for (String fullPath : paths) { + try { + processPath(fullPath, modulesRoot, packageToModules); + } catch (InvalidTreeException ex) { // It has been observed some badly created jar file to contain - // invalid directory entry marled as not directory (see 8131762) - if (current instanceof ResourceNode) { - System.err.println("Resources tree, invalid data structure, " - + "skipping " + p); - continue; - } - String s = split[i]; - if (!s.isEmpty()) { - // First item, this is the module, simply add a new node to the - // tree. - if (module == null) { - module = s; - } - Node n = current.children.get(s); - if (n == null) { - if (i == split.length - 1) { // Leaf - n = new ResourceNode(s, current); - String pkg = toPackageName(n.parent); - //System.err.println("Adding a resource node. pkg " + pkg + ", name " + s); - if (pkg != null && !pkg.startsWith("META-INF")) { - Set pkgs = moduleToPackage.get(module); - if (pkgs == null) { - pkgs = new TreeSet<>(); - moduleToPackage.put(module, pkgs); - } - pkgs.add(pkg); - } - } else { // put only sub trees, no leaf - n = new Node(s, current); - directAccess.put(n.getPath(), n); - String pkg = toPackageName(n); - if (pkg != null && !pkg.startsWith("META-INF")) { - Set mods = packageToModule.get(pkg); - if (mods == null) { - mods = new TreeSet<>(); - packageToModule.put(pkg, mods); - } - mods.add(module); - } - } - } - current = n; - } - } - } - packages = new Node("packages", root); - directAccess.put(packages.getPath(), packages); - // The subset of package nodes that have some content. - // These packages exist only in a single module. - for (Map.Entry> entry : moduleToPackage.entrySet()) { - for (String pkg : entry.getValue()) { - PackageNode pkgNode = new PackageNode(pkg, packages); - pkgNode.addReference(entry.getKey(), false); - directAccess.put(pkgNode.getPath(), pkgNode); + // invalid directory entry marked as not directory (see 8131762). + System.err.println(ex.getMessage()); } } - // All packages - for (Map.Entry> entry : packageToModule.entrySet()) { - // Do we already have a package node? - PackageNode pkgNode = (PackageNode) packages.getChildren(entry.getKey()); - if (pkgNode == null) { - pkgNode = new PackageNode(entry.getKey(), packages); - } - for (String module : entry.getValue()) { - pkgNode.addReference(module, true); - } + // We've collected information for all "packages", including the root + // (empty) package and anything under "META-INF". However, these should + // not have entries in the "/packages" directory. + packageToModules.keySet().removeIf(p -> p.isEmpty() || p.equals("META-INF") || p.startsWith("META-INF.")); + packageToModules.forEach((pkgName, modLinks) -> { + // Merge multiple links for the same module. + List pkgModules = modLinks.stream() + .collect(Collectors.groupingBy(ModuleLink::name)) + .values().stream() + .map(links -> links.stream().reduce(ModuleLink::merge).orElseThrow()) + .sorted() + .toList(); + PackageNode pkgNode = new PackageNode(pkgName, pkgModules, packagesRoot); directAccess.put(pkgNode.getPath(), pkgNode); - } - // Validate that the packages are well formed. - for (Node n : packages.children.values()) { - ((PackageNode)n).validate(); - } - + }); } - public String toResourceName(Node node) { + private void processPath( + String fullPath, + Node modulesRoot, + Map> packageToModules) + throws InvalidTreeException { + // Paths are untrusted, so be careful about checking expected format. + if (!fullPath.startsWith("/") || fullPath.endsWith("/") || fullPath.contains("//")) { + return; + } + int modEnd = fullPath.indexOf('/', 1); + // Ensure non-empty module name with non-empty suffix. + if (modEnd <= 1) { + return; + } + String modName = fullPath.substring(1, modEnd); + String pkgPath = fullPath.substring(modEnd + 1); + + Node parentNode = getDirectoryNode(modName, modulesRoot); + boolean isPreviewPath = false; + if (pkgPath.startsWith(PREVIEW_PREFIX)) { + // For preview paths, process nodes relative to the preview directory. + pkgPath = pkgPath.substring(PREVIEW_PREFIX.length()); + Node metaInf = getDirectoryNode("META-INF", parentNode); + parentNode = getDirectoryNode("preview", metaInf); + isPreviewPath = true; + } + + int pathEnd = pkgPath.lastIndexOf('/'); + // From invariants tested above, this must now be well-formed. + String fullPkgName = (pathEnd == -1) ? "" : pkgPath.substring(0, pathEnd).replace('/', '.'); + String resourceName = pkgPath.substring(pathEnd + 1); + // Intermediate packages are marked "empty" (no resources). This might + // later be merged with a non-empty link for the same package. + ModuleLink emptyLink = ModuleLink.forEmptyPackage(modName, isPreviewPath); + + // Work down through empty packages to final resource. + for (int i = pkgEndIndex(fullPkgName, 0); i != -1; i = pkgEndIndex(fullPkgName, i)) { + // Due to invariants already checked, pkgName is non-empty. + String pkgName = fullPkgName.substring(0, i); + packageToModules.computeIfAbsent(pkgName, p -> new HashSet<>()).add(emptyLink); + String childNodeName = pkgName.substring(pkgName.lastIndexOf('.') + 1); + parentNode = getDirectoryNode(childNodeName, parentNode); + } + // Reached non-empty (leaf) package (could still be a duplicate). + Node resourceNode = parentNode.getChildren(resourceName); + if (resourceNode == null) { + ModuleLink resourceLink = ModuleLink.forPackage(modName, isPreviewPath); + packageToModules.computeIfAbsent(fullPkgName, p -> new HashSet<>()).add(resourceLink); + // Init adds new node to parent (don't add resources to directAccess). + new ResourceNode(resourceName, parentNode); + } else if (!(resourceNode instanceof ResourceNode)) { + throw new InvalidTreeException(resourceNode); + } + } + + private Node getDirectoryNode(String name, Node parent) throws InvalidTreeException { + Node child = parent.getChildren(name); + if (child == null) { + // Adds child to parent during init. + child = new Node(name, parent); + directAccess.put(child.getPath(), child); + } else if (child instanceof ResourceNode) { + throw new InvalidTreeException(child); + } + return child; + } + + // Helper to iterate package names up to, and including, the complete name. + private int pkgEndIndex(String s, int i) { + if (i >= 0 && i < s.length()) { + i = s.indexOf('.', i + 1); + return i != -1 ? i : s.length(); + } + return -1; + } + + private String toResourceName(Node node) { if (!node.children.isEmpty()) { throw new RuntimeException("Node is not a resource"); } return removeRadical(node); } - public String getModule(Node node) { - if (node.parent == null || node.getName().equals("modules") - || node.getName().startsWith("packages")) { - return null; - } - String path = removeRadical(node); - // "/xxx/..."; - path = path.substring(1); - int i = path.indexOf("/"); - if (i == -1) { - return path; - } else { - return path.substring(0, i); - } - } - - public String toPackageName(Node node) { - if (node.parent == null) { - return null; - } - String path = removeRadical(node.getPath(), "/modules/"); - String module = getModule(node); - if (path.equals(module)) { - return null; - } - String pkg = removeRadical(path, module + "/"); - return pkg.replace('/', '.'); - } - - public String removeRadical(Node node) { + private String removeRadical(Node node) { return removeRadical(node.getPath(), "/modules"); } @@ -339,9 +339,10 @@ public final class ImageResourcesTree { private int addLocations(Node current) { if (current instanceof PackageNode) { - PackageNode pkgNode = (PackageNode) current; - int size = pkgNode.references.size() * 8; - writer.addLocation(current.getPath(), offset, 0, size); + List links = ((PackageNode) current).getModuleLinks(); + // "/packages/" entries have 8-byte entries (flags+offset). + int size = links.size() * 8; + writer.addLocation(current.getPath(), offset, 0, size, ImageLocation.getPackageFlags(links)); offset += size; } else { int[] ret = new int[current.children.size()]; @@ -351,8 +352,10 @@ public final class ImageResourcesTree { i += 1; } if (current != tree.getRoot() && !(current instanceof ResourceNode)) { + int locFlags = ImageLocation.getPreviewFlags(current.getPath(), tree.directAccess::containsKey); + // Normal directory entries have 4-byte entries (offset only). int size = ret.length * 4; - writer.addLocation(current.getPath(), offset, 0, size); + writer.addLocation(current.getPath(), offset, 0, size, locFlags); offset += size; } } @@ -369,7 +372,7 @@ public final class ImageResourcesTree { for (Map.Entry entry : outLocations.entrySet()) { Node item = tree.getMap().get(entry.getKey()); if (item != null) { - item.loc = entry.getValue(); + item.setLocation(entry.getValue()); } } computeContent(tree.getRoot(), outLocations); @@ -378,18 +381,13 @@ public final class ImageResourcesTree { private int computeContent(Node current, Map outLocations) { if (current instanceof PackageNode) { - // /packages/ - PackageNode pkgNode = (PackageNode) current; - int size = pkgNode.references.size() * 8; - ByteBuffer buff = ByteBuffer.allocate(size); - buff.order(writer.getByteOrder()); - for (PackageNode.PackageReference mod : pkgNode.references.values()) { - buff.putInt(mod.isEmpty ? 1 : 0); - buff.putInt(writer.addString(mod.name)); - } - byte[] arr = buff.array(); - content.add(arr); - current.loc = outLocations.get(current.getPath()); + // "/packages/" entries have 8-byte entries (flags+offset). + List links = ((PackageNode) current).getModuleLinks(); + ByteBuffer byteBuffer = ByteBuffer.allocate(8 * links.size()); + byteBuffer.order(writer.getByteOrder()); + ModuleLink.write(links, byteBuffer.asIntBuffer(), writer::addString); + content.add(byteBuffer.array()); + current.setLocation(outLocations.get(current.getPath())); } else { int[] ret = new int[current.children.size()]; int i = 0; @@ -410,10 +408,10 @@ public final class ImageResourcesTree { if (current instanceof ResourceNode) { // A resource location, remove "/modules" String s = tree.toResourceName(current); - current.loc = outLocations.get(s); + current.setLocation(outLocations.get(s)); } else { // empty "/packages" or empty "/modules" paths - current.loc = outLocations.get(current.getPath()); + current.setLocation(outLocations.get(current.getPath())); } } if (current.loc == null && current != tree.getRoot()) { diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageStringsWriter.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageStringsWriter.java index 7ba9b7db72e..18794d46b94 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageStringsWriter.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageStringsWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 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 @@ -33,7 +33,6 @@ import jdk.internal.jimage.ImageStringsReader; class ImageStringsWriter implements ImageStrings { private static final int NOT_FOUND = -1; - static final int EMPTY_OFFSET = 0; private final HashMap stringToOffsetMap; private final ImageStream stream; @@ -42,16 +41,20 @@ class ImageStringsWriter implements ImageStrings { this.stringToOffsetMap = new HashMap<>(); this.stream = new ImageStream(); - // Reserve 0 offset for empty string. - int offset = addString(""); - if (offset != 0) { - throw new InternalError("Empty string not offset zero"); - } + // Frequently used/special strings for which the offset is useful. + // New strings can be reserved after existing strings without having to + // change the jimage file version, but any change to existing entries + // requires the jimage file version to be increased at the same time. + reserveString("", ImageStrings.EMPTY_STRING_OFFSET); + reserveString("class", ImageStrings.CLASS_STRING_OFFSET); + reserveString("modules", ImageStrings.MODULES_STRING_OFFSET); + reserveString("packages", ImageStrings.PACKAGES_STRING_OFFSET); + } - // Reserve 1 offset for frequently used ".class". - offset = addString("class"); - if (offset != 1) { - throw new InternalError("'class' string not offset one"); + private void reserveString(String value, int expectedOffset) { + int offset = addString(value); + if (offset != expectedOffset) { + throw new InternalError("Reserved string \"" + value + "\" not at expected offset " + expectedOffset + "[was " + offset + "]"); } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JRTArchive.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JRTArchive.java index aac220e5b94..284f1cf6c77 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JRTArchive.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JRTArchive.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2024, Red Hat, Inc. + * 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 @@ -32,7 +33,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.UncheckedIOException; import java.lang.module.ModuleFinder; -import java.lang.module.ModuleReference; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; @@ -51,6 +51,8 @@ import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; +import jdk.internal.jimage.ResourceEntries; +import jdk.internal.jimage.SystemImageReader; import jdk.internal.util.OperatingSystem; import jdk.tools.jlink.internal.Archive.Entry.EntryType; import jdk.tools.jlink.internal.runtimelink.ResourceDiff; @@ -63,10 +65,9 @@ import jdk.tools.jlink.plugin.ResourcePoolEntry.Type; * associated files from the filesystem of the JDK installation. */ public class JRTArchive implements Archive { - private final String module; private final Path path; - private final ModuleReference ref; + private final ResourceEntries imageResources; // The collection of files of this module private final List files = new ArrayList<>(); // Files not part of the lib/modules image of the JDK install. @@ -99,12 +100,11 @@ public class JRTArchive implements Archive { Set upgradeableFiles) { this.module = module; this.path = path; - this.ref = ModuleFinder.ofSystem() - .find(module) - .orElseThrow(() -> - new IllegalArgumentException( - "Module " + module + - " not part of the JDK install")); + ModuleFinder.ofSystem() + .find(module) + .orElseThrow(() -> new IllegalArgumentException( + "Module " + module + " not part of the JDK install")); + this.imageResources = SystemImageReader.getResourceEntries(); this.errorOnModifiedFile = errorOnModifiedFile; this.otherRes = readModuleResourceFile(module); this.resDiff = Objects.requireNonNull(perModDiff).stream() @@ -159,52 +159,35 @@ public class JRTArchive implements Archive { Objects.equals(path, other.path)); } + private boolean isNormalOrModifiedDiff(String name) { + ResourceDiff rd = resDiff.get(name); + // Filter all resources with a resource diff of kind MODIFIED. + // Note that REMOVED won't happen since in that case the module listing + // won't have the resource anyway. + // Note as well that filter removes files of kind ADDED. Those files are + // not in the packaged modules, so ought not to get returned from the + // pipeline. + return (rd == null || rd.getKind() == ResourceDiff.Kind.MODIFIED); + } + private void collectFiles() throws IOException { if (files.isEmpty()) { addNonClassResources(); + // Add classes/resources from the run-time image, // patched with the run-time image diff - files.addAll(ref.open().list() - .filter(i -> { - String lookupKey = String.format("/%s/%s", module, i); - ResourceDiff rd = resDiff.get(lookupKey); - // Filter all resources with a resource diff - // that are of kind MODIFIED. - // Note that REMOVED won't happen since in - // that case the module listing won't have - // the resource anyway. - // Note as well that filter removes files - // of kind ADDED. Those files are not in - // the packaged modules, so ought not to - // get returned from the pipeline. - return (rd == null || - rd.getKind() == ResourceDiff.Kind.MODIFIED); - }) - .map(s -> { - String lookupKey = String.format("/%s/%s", module, s); - return new JRTArchiveFile(JRTArchive.this, s, - EntryType.CLASS_OR_RESOURCE, - null /* hashOrTarget */, - false /* symlink */, - resDiff.get(lookupKey)); - }) - .toList()); + imageResources.getEntryNames(module) + .filter(this::isNormalOrModifiedDiff) + .sorted() + .map(name -> new JrtClassOrResource(this, name, resDiff.get(name))) + .forEach(files::add); + // Finally add all files only present in the resource diff // That is, removed items in the run-time image. files.addAll(resDiff.values().stream() - .filter(rd -> rd.getKind() == ResourceDiff.Kind.REMOVED) - .map(s -> { - int secondSlash = s.getName().indexOf("/", 1); - assert secondSlash != -1; - String pathWithoutModule = s.getName().substring(secondSlash + 1); - return new JRTArchiveFile(JRTArchive.this, - pathWithoutModule, - EntryType.CLASS_OR_RESOURCE, - null /* hashOrTarget */, - false /* symlink */, - s); - }) - .toList()); + .filter(rd -> rd.getKind() == ResourceDiff.Kind.REMOVED) + .map(rd -> new JrtClassOrResource(this, rd.getName(), rd)) + .toList()); } } @@ -234,15 +217,10 @@ public class JRTArchive implements Archive { } } - return new JRTArchiveFile(JRTArchive.this, - m.resPath, - toEntryType(m.resType), - m.hashOrTarget, - m.symlink, - /* diff only for resources */ - null); - }) - .toList()); + return new JrtOtherFile( + this, m.resPath, toEntryType(m.resType), m.hashOrTarget, m.symlink); + }) + .toList()); } } @@ -323,11 +301,11 @@ public class JRTArchive implements Archive { resPath); } - /** + /* * line: ||| * - * Take the integer before '|' convert it to a Type. The second - * token is an integer representing symlinks (or not). The third token is + * Take the integer before '|' convert it to a Type. The second token + * is an integer representing symlinks (or not). The third token is * a hash sum (sha512) of the file denoted by the fourth token (path). */ static ResourceFileEntry decodeFromString(String line) { @@ -437,47 +415,75 @@ public class JRTArchive implements Archive { Entry toEntry(); } - record JRTArchiveFile(Archive archive, - String resPath, - EntryType resType, - String sha, - boolean symlink, - ResourceDiff diff) implements JRTFile { + record JrtClassOrResource( + JRTArchive archive, + String resPath, + ResourceDiff diff) implements JRTFile { + @Override public Entry toEntry() { - return new Entry(archive, - String.format("/%s/%s", - archive.moduleName(), - resPath), - resPath, - resType) { + assert resPath.startsWith("/" + archive.moduleName() + "/"); + String resName = resPath.substring(archive.moduleName().length() + 2); + + // If the resource has a diff to the packaged modules, use the diff. + // Diffs of kind ADDED have been filtered out in collectFiles(); + if (diff != null) { + assert diff.getKind() != ResourceDiff.Kind.ADDED; + assert diff.getName().equals(resPath); + + return new Entry(archive, resPath, resName, EntryType.CLASS_OR_RESOURCE) { + @Override + public long size() { + return diff.getResourceBytes().length; + } + @Override + public InputStream stream() { + return new ByteArrayInputStream(diff.getResourceBytes()); + } + }; + } else { + return new Entry(archive, resPath, resName, EntryType.CLASS_OR_RESOURCE) { + @Override + public long size() { + return archive.imageResources.getSize(resPath); + } + + @Override + public InputStream stream() { + // Byte content could be cached in the entry if needed. + return new ByteArrayInputStream(archive.imageResources.getBytes(resPath)); + } + }; + } + } + } + + record JrtOtherFile( + JRTArchive archive, + String resPath, + EntryType resType, + String sha, + boolean symlink) implements JRTFile { + + // Read from the base JDK image, special casing + // symlinks, which have the link target in the + // hashOrTarget field. + Path targetPath() { + return BASE.resolve(symlink ? sha : resPath); + } + + public Entry toEntry() { + assert resType != EntryType.CLASS_OR_RESOURCE; + + return new Entry( + archive, + String.format("/%s/%s", archive.moduleName(), resPath), + resPath, + resType) { + @Override public long size() { try { - if (resType != EntryType.CLASS_OR_RESOURCE) { - // Read from the base JDK image, special casing - // symlinks, which have the link target in the - // hashOrTarget field - if (symlink) { - return Files.size(BASE.resolve(sha)); - } - return Files.size(BASE.resolve(resPath)); - } else { - if (diff != null) { - // If the resource has a diff to the - // packaged modules, use the diff. Diffs of kind - // ADDED have been filtered out in collectFiles(); - assert diff.getKind() != ResourceDiff.Kind.ADDED; - assert diff.getName().equals(String.format("/%s/%s", - archive.moduleName(), - resPath)); - return diff.getResourceBytes().length; - } - // Read from the module image. This works, because - // the underlying base path is a JrtPath with the - // JrtFileSystem underneath which is able to handle - // this size query. - return Files.size(archive.getPath().resolve(resPath)); - } + return Files.size(targetPath()); } catch (IOException e) { throw new UncheckedIOException(e); } @@ -485,28 +491,8 @@ public class JRTArchive implements Archive { @Override public InputStream stream() throws IOException { - if (resType != EntryType.CLASS_OR_RESOURCE) { - // Read from the base JDK image. - Path path = symlink ? BASE.resolve(sha) : BASE.resolve(resPath); - return Files.newInputStream(path); - } else { - // Read from the module image. Use the diff to the - // packaged modules if we have one. Diffs of kind - // ADDED have been filtered out in collectFiles(); - if (diff != null) { - assert diff.getKind() != ResourceDiff.Kind.ADDED; - assert diff.getName().equals(String.format("/%s/%s", - archive.moduleName(), - resPath)); - return new ByteArrayInputStream(diff.getResourceBytes()); - } - String module = archive.moduleName(); - ModuleReference mRef = ModuleFinder.ofSystem() - .find(module).orElseThrow(); - return mRef.open().open(resPath).orElseThrow(); - } + return Files.newInputStream(targetPath()); } - }; } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java index 3baae08eed6..45800be5272 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java @@ -373,21 +373,22 @@ public class JlinkTask { plugins = plugins == null ? new PluginsConfiguration() : plugins; // First create the image provider - ImageProvider imageProvider = - createImageProvider(config, - null, - IGNORE_SIGNING_DEFAULT, - false, - null, - false, - new OptionsValues(), - null); + try (ImageHelper imageProvider = + createImageProvider(config, + null, + IGNORE_SIGNING_DEFAULT, + false, + null, + false, + new OptionsValues(), + null)) { - // Then create the Plugin Stack - ImagePluginStack stack = ImagePluginConfiguration.parseConfiguration(plugins); + // Then create the Plugin Stack + ImagePluginStack stack = ImagePluginConfiguration.parseConfiguration(plugins); - //Ask the stack to proceed; - stack.operate(imageProvider); + // Ask the stack to proceed; + stack.operate(imageProvider); + } } // the token for "all modules on the module path" @@ -511,22 +512,24 @@ public class JlinkTask { } // First create the image provider - ImageHelper imageProvider = createImageProvider(config, - options.packagedModulesPath, - options.ignoreSigning, - options.bindServices, - options.endian, - options.verbose, - options, - log); + try (ImageHelper imageProvider = createImageProvider(config, + options.packagedModulesPath, + options.ignoreSigning, + options.bindServices, + options.endian, + options.verbose, + options, + log)) { + // Then create the Plugin Stack + ImagePluginStack stack = ImagePluginConfiguration.parseConfiguration( + taskHelper.getPluginsConfig( + options.output, + options.launchers, + imageProvider.targetPlatform)); - // Then create the Plugin Stack - ImagePluginStack stack = ImagePluginConfiguration.parseConfiguration( - taskHelper.getPluginsConfig(options.output, options.launchers, - imageProvider.targetPlatform)); - - //Ask the stack to proceed - stack.operate(imageProvider); + //Ask the stack to proceed + stack.operate(imageProvider); + } } /** @@ -1054,10 +1057,11 @@ public class JlinkTask { return sb.toString(); } - private static record ImageHelper(Set archives, - Platform targetPlatform, - Path packagedModulesPath, - boolean generateRuntimeImage) implements ImageProvider { + private record ImageHelper(Set archives, + Platform targetPlatform, + Path packagedModulesPath, + boolean generateRuntimeImage) + implements ImageProvider, AutoCloseable { @Override public ExecutableImage retrieve(ImagePluginStack stack) throws IOException { ExecutableImage image = ImageFileCreator.create(archives, @@ -1073,5 +1077,25 @@ public class JlinkTask { } return image; } + + @Override + public void close() throws IOException { + List thrown = null; + for (Archive archive : archives) { + try { + archive.close(); + } catch (IOException ex) { + if (thrown == null) { + thrown = new ArrayList<>(); + } + thrown.add(ex); + } + } + if (thrown != null) { + IOException ex = new IOException("Archives could not be closed", thrown.getFirst()); + thrown.subList(1, thrown.size()).forEach(ex::addSuppressed); + throw ex; + } + } } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolManager.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolManager.java index ba04b9db014..c49b8971e06 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolManager.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2025, 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 @@ -66,20 +66,8 @@ public class ResourcePoolManager { } } - /** - * Returns true if a resource is located in a named package. - */ - public static boolean isNamedPackageResource(String name) { - int index = name.lastIndexOf("/"); - if (index == -1) { - return false; - } else { - String pn = name.substring(0, index).replace('/', '.'); - return Checks.isPackageName(pn); - } - } - static class ResourcePoolModuleImpl implements ResourcePoolModule { + private static final String PREVIEW_PREFIX = "META-INF/preview/"; final Map moduleContent = new LinkedHashMap<>(); // lazily initialized @@ -132,16 +120,8 @@ public class ResourcePoolManager { public Set packages() { Set pkgs = new HashSet<>(); moduleContent.values().stream() - .filter(m -> m.type() == ResourcePoolEntry.Type.CLASS_OR_RESOURCE) - .forEach(res -> { - String name = ImageFileCreator.resourceName(res.path()); - if (isNamedPackageResource(name)) { - String pkg = ImageFileCreator.toPackage(name); - if (!pkg.isEmpty()) { - pkgs.add(pkg); - } - } - }); + .filter(m -> m.type() == ResourcePoolEntry.Type.CLASS_OR_RESOURCE) + .forEach(res -> inferPackageName(res).ifPresent(pkgs::add)); return pkgs; } @@ -159,6 +139,39 @@ public class ResourcePoolManager { public int entryCount() { return moduleContent.values().size(); } + + /** + * Returns a valid non-empty package name, inferred from a resource pool + * entry's path. + * + *

              If the resource pool entry is for a preview resource (i.e. with + * path {@code "/mod-name/META-INF/preview/pkg-path/resource-name"}) + * the package name is the non-preview name based on {@code "pkg-path"}. + * + * @return the inferred package name, or {@link Optional#empty() empty} + * if no name could be inferred. + */ + private static Optional inferPackageName(ResourcePoolEntry res) { + // Expect entry paths to be "/mod-name/pkg-path/resource-name", but + // may also get "/mod-name/META-INF/preview/pkg-path/resource-name" + String name = res.path(); + if (name.charAt(0) == '/') { + int pkgStart = name.indexOf('/', 1) + 1; + int pkgEnd = name.lastIndexOf('/'); + if (pkgStart > 0 && pkgEnd > pkgStart) { + String pkgPath = name.substring(pkgStart, pkgEnd); + // Handle preview paths by removing the prefix. + if (pkgPath.startsWith(PREVIEW_PREFIX)) { + pkgPath = pkgPath.substring(PREVIEW_PREFIX.length()); + } + String pkgName = pkgPath.replace('/', '.'); + if (Checks.isPackageName(pkgName)) { + return Optional.of(pkgName); + } + } + } + return Optional.empty(); + } } public class ResourcePoolImpl implements ResourcePool { diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/DesktopIntegration.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/DesktopIntegration.java index 523b6c4821c..fad901699c3 100644 --- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/DesktopIntegration.java +++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/DesktopIntegration.java @@ -430,7 +430,7 @@ final class DesktopIntegration extends ShellCustomAction { BufferedImage bi = ImageIO.read(path.toFile()); return Math.max(bi.getWidth(), bi.getHeight()); } catch (IOException e) { - Log.verbose(e); + Log.trace(e, "Failed to get dimensions of an image at [%s]", path); } return 0; } diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LibProvidersLookup.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LibProvidersLookup.java index 2dccc91cf8f..5b0c518a6bd 100644 --- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LibProvidersLookup.java +++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LibProvidersLookup.java @@ -66,16 +66,17 @@ public final class LibProvidersLookup { // Get the list of unique package names. List neededPackages = neededLibs.stream().map(libPath -> { try { - List packageNames = packageLookup.apply(libPath).filter( - Objects::nonNull).filter(Predicate.not(String::isBlank)).distinct().collect( - Collectors.toList()); - Log.verbose(String.format("%s is provided by %s", libPath, packageNames)); + List packageNames = packageLookup.apply(libPath) + .filter(Objects::nonNull) + .filter(Predicate.not(String::isBlank)) + .distinct() + .toList(); + Log.trace("%s is provided by %s", libPath, packageNames); return packageNames; } catch (IOException ex) { // Ignore and keep going - Log.verbose(ex); - List packageNames = Collections.emptyList(); - return packageNames; + Log.trace(ex, "Failed to get required packages for [%s]", libPath); + return List.of(); } }).flatMap(List::stream).sorted().distinct().toList(); @@ -83,10 +84,10 @@ public final class LibProvidersLookup { } private static List getNeededLibsForFile(Path path) throws IOException { - final var result = Executor.of(TOOL_LDD, path.toString()).saveOutput().execute(); + final var result = Executor.of(TOOL_LDD, path.toString()).quiet().saveOutput().execute(); if (result.getExitCode() != 0) { - // objdump failed. This is OK if the tool was applied to not a binary file + // ldd failed. This is OK if the tool was applied to not a binary file return Collections.emptyList(); } @@ -107,7 +108,7 @@ public final class LibProvidersLookup { try { libs = getNeededLibsForFile(path); } catch (IOException ex) { - Log.verbose(ex); + Log.trace(ex, "Failed to get required libraries for [%s]", path); libs = Collections.emptyList(); } return libs; diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxBundlingEnvironment.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxBundlingEnvironment.java index 724aeabb4b3..baf5e0bbbf0 100644 --- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxBundlingEnvironment.java +++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxBundlingEnvironment.java @@ -43,6 +43,8 @@ import jdk.jpackage.internal.model.BundlingOperationDescriptor; import jdk.jpackage.internal.model.LinuxPackage; import jdk.jpackage.internal.model.PackageType; import jdk.jpackage.internal.model.StandardPackageType; +import jdk.jpackage.internal.summary.SummaryAccumulator; +import jdk.jpackage.internal.summary.StandardProperty; import jdk.jpackage.internal.util.Result; public class LinuxBundlingEnvironment extends DefaultBundlingEnvironment { @@ -78,22 +80,26 @@ public class LinuxBundlingEnvironment extends DefaultBundlingEnvironment { private static void createDebPackage(Options options, LinuxDebSystemEnvironment sysEnv) { + var pkg = LinuxFromOptions.createLinuxDebPackage(options, sysEnv); + createNativePackage(options, - LinuxFromOptions.createLinuxDebPackage(options, sysEnv), + updateSummary(pkg, OptionUtils.summary(options), sysEnv), buildEnv()::create, LinuxBundlingEnvironment::buildPipeline, - (env, pkg, outputDir) -> { + (env, _, outputDir) -> { return new LinuxDebPackager(env, pkg, outputDir, sysEnv); }); } private static void createRpmPackage(Options options, LinuxRpmSystemEnvironment sysEnv) { + var pkg = LinuxFromOptions.createLinuxRpmPackage(options, sysEnv); + createNativePackage(options, - LinuxFromOptions.createLinuxRpmPackage(options, sysEnv), + updateSummary(pkg, OptionUtils.summary(options), sysEnv), buildEnv()::create, LinuxBundlingEnvironment::buildPipeline, - (env, pkg, outputDir) -> { + (env, _, outputDir) -> { return new LinuxRpmPackager(env, pkg, outputDir, sysEnv); }); } @@ -113,6 +119,14 @@ public class LinuxBundlingEnvironment extends DefaultBundlingEnvironment { return new BuildEnvFromOptions().predefinedAppImageLayout(APPLICATION_LAYOUT); } + private static T updateSummary( + T pkg, SummaryAccumulator summary, LinuxSystemEnvironment sysEnv) { + if (!LinuxSystemEnvironment.isWithRequiredPackagesSearch(sysEnv, pkg)) { + summary.put(StandardProperty.LINUX_DISABLE_REQUIRED_PACKAGES_SEARCH); + } + return pkg; + } + private static Result adjustPackageArch(LinuxSystemEnvironment sysEnv, StandardPackageType type) { Objects.requireNonNull(sysEnv); Objects.requireNonNull(type); diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebPackager.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebPackager.java index d46ec8865c8..65efd9fc4c6 100644 --- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebPackager.java +++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebPackager.java @@ -108,8 +108,9 @@ final class LinuxDebPackager extends LinuxPackager { Map actualValues = Executor.of(cmdline) .saveOutput(true) + .quiet() .executeExpectSuccess() - .getOutput().stream() + .stdout().stream() .map(line -> line.split(":\\s+", 2)) .collect(Collectors.toMap( components -> components[0], @@ -149,9 +150,7 @@ final class LinuxDebPackager extends LinuxPackager { List cmdline = new ArrayList<>(); Stream.of(sysEnv.fakeroot(), sysEnv.dpkgdeb()).map(Path::toString).forEach(cmdline::add); - if (Log.isVerbose()) { - cmdline.add("--verbose"); - } + cmdline.add("--verbose"); cmdline.addAll(List.of("-b", env.appImageDir().toString(), debFile.toAbsolutePath().toString())); // run dpkg @@ -276,8 +275,9 @@ final class LinuxDebPackager extends LinuxPackager { var debArch = sysEnv.packageArch().value(); Executor.of(sysEnv.dpkg().toString(), "-S", file.toString()) + .quiet() .saveOutput(true).executeExpectSuccess() - .getOutput().forEach(line -> { + .stdout().forEach(line -> { Matcher matcher = PACKAGE_NAME_REGEX.matcher(line); if (matcher.find()) { String name = matcher.group(1); diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxFromOptions.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxFromOptions.java index 1f954036431..7fd9fd80d7e 100644 --- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxFromOptions.java +++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxFromOptions.java @@ -46,8 +46,11 @@ import jdk.jpackage.internal.model.LinuxApplication; import jdk.jpackage.internal.model.LinuxDebPackage; import jdk.jpackage.internal.model.LinuxLauncher; import jdk.jpackage.internal.model.LinuxLauncherMixin; +import jdk.jpackage.internal.model.LinuxPackage; import jdk.jpackage.internal.model.LinuxRpmPackage; import jdk.jpackage.internal.model.StandardPackageType; +import jdk.jpackage.internal.summary.StandardProperty; +import jdk.jpackage.internal.summary.StandardWarning; final class LinuxFromOptions { @@ -84,7 +87,11 @@ final class LinuxFromOptions { LINUX_RPM_LICENSE_TYPE.ifPresentIn(options, pkgBuilder::licenseType); - return pkgBuilder.create(); + final var pkg = pkgBuilder.create(); + + updateSummary(options, pkg); + + return pkg; } static LinuxDebPackage createLinuxDebPackage(Options options, LinuxDebSystemEnvironment sysEnv) { @@ -99,9 +106,11 @@ final class LinuxFromOptions { // Show warning if license file is missing if (pkg.licenseFile().isEmpty()) { - Log.verbose(I18N.getString("message.debs-like-licenses")); + OptionUtils.summary(options).put(StandardWarning.LINUX_DEB_MISSING_LICENSE_FILE); } + updateSummary(options, pkg); + return pkg; } @@ -135,4 +144,9 @@ final class LinuxFromOptions { return version; } + + private static void updateSummary(Options options, LinuxPackage pkg) { + OptionUtils.summary(options).put(StandardProperty.VERSION, pkg.versionWithRelease()); + OptionUtils.summary(options).put(StandardProperty.LINUX_PACKAGE_NAME, pkg.packageName()); + } } diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackageArch.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackageArch.java index b1df92ae312..841007a0994 100644 --- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackageArch.java +++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackageArch.java @@ -47,7 +47,7 @@ record LinuxPackageArch(String value) { } private static Result deb() { - var exec = Executor.of("dpkg", "--print-architecture").saveOutput(true); + var exec = Executor.of("dpkg", "--print-architecture").quiet().saveOutput(true); return Result.of(exec::executeExpectSuccess, IOException.class) .flatMap(LinuxPackageArch::getStdoutFirstLine); } diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackager.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackager.java index 551e1ab1af6..63f35fd6a65 100644 --- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackager.java +++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackager.java @@ -24,9 +24,10 @@ */ package jdk.jpackage.internal; +import static jdk.jpackage.internal.LinuxSystemEnvironment.isWithRequiredPackagesSearch; + import java.io.IOException; import java.nio.file.Path; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -47,7 +48,7 @@ abstract class LinuxPackager implements Consumer implements Consumer neededLibPackages; if (withRequiredPackagesLookup) { neededLibPackages = findRequiredPackages(); + Log.trace("Runtime requires: %s", neededLibPackages); } else { neededLibPackages = Collections.emptyList(); - Log.info(I18N.getString("warning.foreign-app-image")); } + Log.trace("Features of the package require: %s", caPackages); + // Merge all package lists together. // Filter out empty names, sort and remove duplicates. - Stream.of(caPackages, neededLibPackages) + requiredPackages = Stream.of(caPackages, neededLibPackages) .flatMap(List::stream) .filter(Predicate.not(String::isEmpty)) - .sorted().distinct().forEach(requiredPackages::add); + .sorted().distinct().toList(); - Log.verbose(String.format("Required packages: %s", requiredPackages)); + Log.trace("Required packages: %s", requiredPackages); } private List findRequiredPackages() throws IOException { @@ -160,16 +163,16 @@ abstract class LinuxPackager implements Consumer errors; try { errors = findErrorsInOutputPackage(); - } catch (Exception ex) { + } catch (IOException ex) { // Ignore error as it is not critical. Just report it. - Log.verbose(ex); + Log.trace(ex); return; } for (var ex : errors) { - Log.verbose(ex.getLocalizedMessage()); + Log.progressWarning(ex); if (ex instanceof ConfigException cfgEx) { - Log.verbose(cfgEx.getAdvice()); + Log.progress(cfgEx.getAdvice()); } } } @@ -178,6 +181,6 @@ abstract class LinuxPackager implements Consumer requiredPackages = new ArrayList<>(); + private List requiredPackages; private final List customActions; } diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmPackager.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmPackager.java index 8c3e8125e9b..cc347b3b2c7 100644 --- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmPackager.java +++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmPackager.java @@ -95,7 +95,7 @@ final class LinuxRpmPackager extends LinuxPackager { return Executor.of(sysEnv.rpm().toString(), "-q", "--queryformat", "%{name}\\n", "-q", "--whatprovides", file.toString() - ).saveOutput(true).executeExpectSuccess().getOutput().stream(); + ).saveOutput(true).quiet().executeExpectSuccess().stdout().stream(); }); } @@ -119,7 +119,7 @@ final class LinuxRpmPackager extends LinuxPackager { "-qp", "--queryformat", properties.stream().map(e -> String.format("%%{%s}", e.name())).collect(joining("\\n")), outputPackageFile().toString() - ).saveOutput(true).executeExpectSuccess().getOutput(); + ).saveOutput(true).quiet().executeExpectSuccess().stdout(); for (int i = 0; i != properties.size(); i++) { Optional.ofNullable(properties.get(i).verifyValue(actualValues.get(i))).ifPresent(errors::add); diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxSystemEnvironment.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxSystemEnvironment.java index e347c58ae21..d58d3e8b40d 100644 --- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxSystemEnvironment.java +++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxSystemEnvironment.java @@ -27,8 +27,10 @@ package jdk.jpackage.internal; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.Optional; import java.util.function.Supplier; +import jdk.jpackage.internal.model.LinuxPackage; import jdk.jpackage.internal.model.PackageType; import jdk.jpackage.internal.model.StandardPackageType; import jdk.jpackage.internal.util.CompositeProxy; @@ -45,6 +47,11 @@ interface LinuxSystemEnvironment extends SystemEnvironment { }); } + static boolean isWithRequiredPackagesSearch(LinuxSystemEnvironment sysEnv, LinuxPackage pkg) { + Objects.requireNonNull(pkg); + return sysEnv.soLookupAvailable() && sysEnv.nativePackageType().equals(pkg.type()); + } + static Optional detectNativePackageType() { if (Internal.isDebian()) { return Optional.of(StandardPackageType.LINUX_DEB); @@ -89,7 +96,7 @@ interface LinuxSystemEnvironment extends SystemEnvironment { // we are just going to run "dpkg -s coreutils" and assume Debian // or derivative if no error is returned. try { - Executor.of("dpkg", "-s", "coreutils").executeExpectSuccess(); + Executor.of("dpkg", "-s", "coreutils").quiet().executeExpectSuccess(); return true; } catch (IOException e) { // just fall thru @@ -101,7 +108,7 @@ interface LinuxSystemEnvironment extends SystemEnvironment { // we are just going to run "rpm -q rpm" and assume RPM // or derivative if no error is returned. try { - Executor.of("rpm", "-q", "rpm").executeExpectSuccess(); + Executor.of("rpm", "-q", "rpm").quiet().executeExpectSuccess(); return true; } catch (IOException e) { // just fall thru diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/LinuxResources.properties b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/LinuxResources.properties index 1ab45d26a4c..dcdc96323ef 100644 --- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/LinuxResources.properties +++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/LinuxResources.properties @@ -36,6 +36,9 @@ resource.menu-icon=menu icon resource.rpm-spec-file=RPM spec file resource.systemd-unit-file=systemd unit file +summary.property.linux-package-name=Package name +summary.property.linux-required-packages-search=Required packages search + error.tool-not-found.advice=Please install required packages error.tool-old-version.advice=Please install required packages @@ -55,9 +58,6 @@ message.ldd-not-available=ldd command not found. Package dependencies will not b message.deb-ldd-not-available.advice=Install "libc-bin" DEB package to get ldd. message.rpm-ldd-not-available.advice=Install "glibc-common" RPM package to get ldd. -warning.foreign-app-image=Warning: app-image dir not generated by jpackage. -message.not-default-bundler-no-dependencies-lookup={0} is not the default package type. Package dependencies will not be generated. - error.unexpected-package-property=Expected value of "{0}" property is [{1}]. Actual value in output package is [{2}]. Looks like the value of "{0}" property is hardcoded in "{3}" file in the resource directory error.unexpected-package-property.advice=Use [{0}] pattern string instead of hard coded value [{1}] of {2} property in custom "{3}" file error.unexpected-default-package-property.advice=Don''t explicitly set value of "{0}" property in custom "{1}" file diff --git a/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c b/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c index 26d65f8061c..d346e241035 100644 --- a/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c +++ b/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022, 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 @@ -109,7 +109,7 @@ static PackageDesc* initPackageDesc(PackageDesc* desc, const char* str, #define POPEN_CALLBACK_USE 1 #define POPEN_CALLBACK_IGNORE 0 -typedef int (*popenCallbackType)(void*, const char*); +typedef int (*popenCallbackType)(void*, char*); static int popenCommand(const char* cmdlineFormat, const char* arg, popenCallbackType callback, void* callbackData) { @@ -220,13 +220,13 @@ static char* concat(const char *x, const char *y) { } -static int initRpmPackage(void* desc, const char* str) { +static int initRpmPackage(void* desc, char* str) { initPackageDesc((PackageDesc*)desc, str, PACKAGE_TYPE_RPM); return POPEN_CALLBACK_IGNORE; } -static int initDebPackage(void* desc, const char* str) { +static int initDebPackage(void* desc, char* str) { char* colonChrPos = strchr(str, ':'); if (colonChrPos) { *colonChrPos = 0; @@ -238,7 +238,7 @@ static int initDebPackage(void* desc, const char* str) { #define LAUNCHER_LIB_NAME "/libapplauncher.so" -static int findLauncherLib(void* launcherLibPath, const char* str) { +static int findLauncherLib(void* launcherLibPath, char* str) { char* buf = 0; const size_t strLen = strlen(str); const size_t launcherLibNameLen = strlen(LAUNCHER_LIB_NAME); diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/AppImageSigner.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/AppImageSigner.java index 188430511bb..ee75e8ee36c 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/AppImageSigner.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/AppImageSigner.java @@ -84,6 +84,14 @@ final class AppImageSigner { @Override public boolean test(Path path) { + var accepted = testInternal(path); + if (!accepted) { + Log.trace("Skip signing [%s]", path); + } + return accepted; + } + + private boolean testInternal(Path path) { if (!Files.isRegularFile(path) || otherExcludePaths.contains(path)) { return false; } @@ -139,7 +147,7 @@ final class AppImageSigner { if (Files.isDirectory(frameworkPath)) { try (var content = Files.list(frameworkPath)) { content.forEach(toConsumer(path -> { - codesigners.codesignDir().accept(path); + codesigners.codesignMacBundle().accept(path); })); } } @@ -167,14 +175,14 @@ final class AppImageSigner { private static IOException handleCodesignException(MacApplication app, CodesignException ex) { if (!app.contentDirSources().isEmpty()) { // Additional content may cause signing error. - Log.fatalError(I18N.getString("message.codesign.failed.reason.app.content")); + Log.progressWarning(I18N.getString("message.codesign.failed.reason.app.content")); } // Signing might not work without Xcode with command line // developer tools. Show user if Xcode is missing as possible // reason. if (!isXcodeDevToolsInstalled()) { - Log.fatalError(I18N.getString("message.codesign.failed.reason.xcode.tools")); + Log.progressWarning(I18N.getString("message.codesign.failed.reason.xcode.tools")); } return ex.getCause(); @@ -182,14 +190,14 @@ final class AppImageSigner { private static boolean isXcodeDevToolsInstalled() { return Result.of( - Executor.of("/usr/bin/xcrun", "--help").setQuiet(true)::executeExpectSuccess, + Executor.of("/usr/bin/xcrun", "--help").quiet()::executeExpectSuccess, IOException.class).hasValue(); } private static void unsign(Path path) throws IOException { // run quietly Executor.of("/usr/bin/codesign", "--remove-signature", path.toString()) - .setQuiet(true) + .quiet() .executeExpectSuccess(); } @@ -201,23 +209,27 @@ final class AppImageSigner { this.codesigners = Objects.requireNonNull(codesigners); } - private record Codesigners(Consumer codesignFile, Consumer codesignExecutableFile, Consumer codesignDir) implements Consumer { + private record Codesigners( + Consumer codesignFile, + Consumer codesignExecutableFile, + Consumer codesignMacBundle) implements Consumer { + Codesigners { Objects.requireNonNull(codesignFile); Objects.requireNonNull(codesignExecutableFile); - Objects.requireNonNull(codesignDir); + Objects.requireNonNull(codesignMacBundle); } @Override public void accept(Path path) { findCodesigner(path).orElseThrow(() -> { - return new IllegalArgumentException(String.format("No codesigner for %s path", PathUtils.normalizedAbsolutePathString(path))); + return new IllegalArgumentException(String.format("No codesigner for [%s]", PathUtils.normalizedAbsolutePathString(path))); }).accept(path); } private Optional> findCodesigner(Path path) { - if (Files.isDirectory(path)) { - return Optional.of(codesignDir); + if (MacBundle.fromPath(path).isPresent()) { + return Optional.of(codesignMacBundle); } else if (Files.isRegularFile(path)) { if (Files.isExecutable(path)) { return Optional.of(codesignExecutableFile); @@ -233,9 +245,9 @@ final class AppImageSigner { final var codesignExecutableFile = Codesign.build(signingCfg::toCodesignArgs).quiet(true).create().asConsumer(); final var codesignFile = Codesign.build(signingCfgWithoutEntitlements::toCodesignArgs).quiet(true).create().asConsumer(); - final var codesignDir = Codesign.build(signingCfg::toCodesignArgs).force(true).create().asConsumer(); + final var codesignMacBundle = Codesign.build(signingCfg::toCodesignArgs).force(true).create().asConsumer(); - return new Codesigners(codesignFile, codesignExecutableFile, codesignDir); + return new Codesigners(codesignFile, codesignExecutableFile, codesignMacBundle); } } diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/Codesign.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/Codesign.java index 984202bbfaf..154c8d01b81 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/Codesign.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/Codesign.java @@ -67,7 +67,7 @@ public final class Codesign { } return new Codesign(cmdline, quiet ? exec -> { - exec.setQuiet(true); + exec.quiet(); } : null); } diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/Keychain.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/Keychain.java index 8670eff2608..ddd5742b3ed 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/Keychain.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/Keychain.java @@ -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 @@ -72,7 +72,7 @@ record Keychain(String name) { // Get the current keychain list final List cmdOutput; try { - cmdOutput = Executor.of("/usr/bin/security", "list-keychains").saveOutput(true).executeExpectSuccess().getOutput(); + cmdOutput = Executor.of("/usr/bin/security", "list-keychains").quiet().saveOutput(true).executeExpectSuccess().stdout(); } catch (IOException ex) { throw I18N.buildException().message("message.keychain.error").cause(ex).create(KeychainException::new); } diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacApplicationBuilder.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacApplicationBuilder.java index d6b816ca75e..64420d30983 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacApplicationBuilder.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacApplicationBuilder.java @@ -25,11 +25,17 @@ package jdk.jpackage.internal; import static jdk.jpackage.internal.cli.StandardValidator.IS_VALID_MAC_BUNDLE_IDENTIFIER; +import static java.util.stream.Collectors.groupingBy; +import static java.util.stream.Collectors.mapping; +import static java.util.stream.Collectors.toList; import java.io.IOException; import java.io.UncheckedIOException; import java.nio.file.Files; import java.nio.file.Path; +import java.util.Collection; +import java.util.Comparator; +import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; @@ -45,6 +51,9 @@ import jdk.jpackage.internal.model.JPackageException; import jdk.jpackage.internal.model.Launcher; import jdk.jpackage.internal.model.MacApplication; import jdk.jpackage.internal.model.MacApplicationMixin; +import jdk.jpackage.internal.summary.StandardWarning; +import jdk.jpackage.internal.summary.StandardProperty; +import jdk.jpackage.internal.summary.SummaryAccumulator; import jdk.jpackage.internal.util.PListReader; import jdk.jpackage.internal.util.Result; import jdk.jpackage.internal.util.RootedPath; @@ -64,6 +73,7 @@ final class MacApplicationBuilder { appStore = other.appStore; externalInfoPlistFile = other.externalInfoPlistFile; signingBuilder = other.signingBuilder; + summary = other.summary; } MacApplicationBuilder icon(Path v) { @@ -101,6 +111,11 @@ final class MacApplicationBuilder { return this; } + MacApplicationBuilder summary(SummaryAccumulator v) { + summary = v; + return this; + } + Optional externalApplication() { return superBuilder.externalApplication(); } @@ -117,7 +132,9 @@ final class MacApplicationBuilder { var app = superBuilder.create(); validateAppVersion(app); - validateAppContentDirs(app); + summary().ifPresent(s -> { + validateAppContentDirs(s, app); + }); final var mixin = new MacApplicationMixin.Stub( validatedIcon(), @@ -127,7 +144,14 @@ final class MacApplicationBuilder { appStore, createSigningConfig()); - return MacApplication.create(app, mixin); + var macApp = MacApplication.create(app, mixin); + + summary().ifPresent(s -> { + s.put(StandardProperty.MAC_BUNDLE_IDENTIFIER, macApp.bundleIdentifier()); + s.put(StandardProperty.MAC_BUNDLE_NAME, macApp.bundleName()); + }); + + return macApp; } static MacApplication overrideAppImageLayout(MacApplication app, AppImageLayout appImageLayout) { @@ -149,18 +173,59 @@ final class MacApplicationBuilder { } } - private static void validateAppContentDirs(Application app) { - app.contentDirSources().stream().filter(rootedPath -> { + private static Stream appContentTopPaths(Application app) { + return app.contentDirSources().stream().filter(rootedPath -> { return rootedPath.branch().getNameCount() == 1; - }).map(RootedPath::fullPath).forEach(contentDir -> { + }).map(RootedPath::fullPath); + } + + private static void validateAppContentDirs(SummaryAccumulator summary, Application app) { + var warnings = appContentTopPaths(app) + .map(NonStandardAppContentWarning::createMapEntry) + .flatMap(Optional::stream) + .collect(groupingBy( + Map.Entry::getKey, + mapping(Map.Entry::getValue, toList()) + )).entrySet().stream() + .sorted(Comparator.comparing( + Map.Entry::getKey, + Comparator.comparing(Enum::ordinal) + )) + .map(Map.Entry::getValue) + .flatMap(Collection::stream) + .toList(); + if (!warnings.isEmpty()) { + summary.putMultiValue(StandardWarning.MAC_NON_STANDARD_APP_CONTENT, warnings); + } + } + + private enum NonStandardAppContentWarning { + NOT_DIRECTORY("warning.non-standard-app-content.not-dir"), + NON_STANDARD_DIRECTOTY_NAME("warning.non-standard-app-content.non-standard-dir-name"), + ; + + NonStandardAppContentWarning(String formatKey) { + this.formatKey = Objects.requireNonNull(formatKey); + } + + static Optional> createMapEntry(Path contentDir) { if (!Files.isDirectory(contentDir)) { - Log.info(I18N.format("warning.app.content.is.not.dir", - contentDir)); + return Optional.of(Map.entry(NOT_DIRECTORY, NOT_DIRECTORY.format(contentDir))); } else if (!CONTENTS_SUB_DIRS.contains(contentDir.getFileName())) { - Log.info(I18N.format("warning.non.standard.contents.sub.dir", - contentDir)); + return Optional.of(Map.entry( + NON_STANDARD_DIRECTOTY_NAME, + NON_STANDARD_DIRECTOTY_NAME.format(contentDir.getFileName(), contentDir) + )); + } else { + return Optional.empty(); } - }); + } + + private String format(Object... formatArgs) { + return I18N.format(formatKey, formatArgs); + } + + private final String formatKey; } private MacApplicationBuilder createCopyForExternalInfoPlistFile() { @@ -186,7 +251,10 @@ final class MacApplicationBuilder { } if (builder.superBuilder.version().isEmpty()) { - plist.findValue("CFBundleVersion").ifPresent(builder.superBuilder::version); + plist.findValue("CFBundleVersion").ifPresent(ver -> { + Log.trace("Derive bundle version [%s] from [%s] file", ver, externalInfoPlistFile); + builder.superBuilder.version(ver); + }); } }); @@ -227,9 +295,11 @@ final class MacApplicationBuilder { return appName; }); - if (value.length() > MAX_BUNDLE_NAME_LENGTH && (bundleName != null)) { - Log.error(I18N.format("message.bundle-name-too-long-warning", "--mac-package-name", value)); - } + summary().ifPresent(s -> { + if (value.length() > MAX_BUNDLE_NAME_LENGTH && (bundleName != null)) { + s.put(StandardWarning.MAC_BUNDLE_NAME_TOO_LONG, (Object)value); + } + }); return value; } @@ -261,7 +331,7 @@ final class MacApplicationBuilder { } } - Log.verbose(I18N.format("message.derived-bundle-identifier", derivedValue)); + Log.trace("Derived bundle identifier: %s", derivedValue); return derivedValue; }); } @@ -274,6 +344,10 @@ final class MacApplicationBuilder { return Optional.ofNullable(icon).map(LauncherBuilder::validateIcon); } + private Optional summary() { + return Optional.ofNullable(summary); + } + private record Defaults(String category) { } @@ -284,6 +358,7 @@ final class MacApplicationBuilder { private boolean appStore; private Path externalInfoPlistFile; private AppImageSigningConfigBuilder signingBuilder; + private SummaryAccumulator summary; private final ApplicationBuilder superBuilder; diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBundlingEnvironment.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBundlingEnvironment.java index 1e60d8490f0..fdbdca95d12 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBundlingEnvironment.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBundlingEnvironment.java @@ -35,8 +35,11 @@ import static jdk.jpackage.internal.cli.StandardOption.EXIT_AFTER_CONFIGURATION_ import java.util.Optional; import jdk.jpackage.internal.cli.Options; +import jdk.jpackage.internal.model.AppImageBundleType; import jdk.jpackage.internal.model.MacPackage; import jdk.jpackage.internal.model.Package; +import jdk.jpackage.internal.summary.StandardProperty; +import jdk.jpackage.internal.util.PathUtils; public class MacBundlingEnvironment extends DefaultBundlingEnvironment { @@ -75,6 +78,12 @@ public class MacBundlingEnvironment extends DefaultBundlingEnvironment { final var pkg = createSignAppImagePackage(app, env); + OptionUtils.summary(options).put(StandardProperty.MAC_SIGN_APP_IMAGE_OPERATION, + AppImageBundleType.MAC_APP_IMAGE.label(), + PathUtils.normalizedAbsolutePath(env.appImageDir())); + + OptionUtils.finalizeAndPrintSummary(options, pkg); + if (EXIT_AFTER_CONFIGURATION_PHASE.getFrom(options)) { return; } diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacCertificateUtils.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacCertificateUtils.java index 24a236ae15d..1b5ca43ea92 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacCertificateUtils.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacCertificateUtils.java @@ -54,7 +54,7 @@ public final class MacCertificateUtils { return toSupplier(() -> { final var output = Executor.of(args) - .setQuiet(true).saveOutput(true).executeExpectSuccess() + .quiet().saveOutput(true).executeExpectSuccess() .getOutput(); final byte[] pemCertificatesBuffer = output.stream() diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgPackager.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgPackager.java index 24474c88162..8ebfdd62cd7 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgPackager.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgPackager.java @@ -32,7 +32,6 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.LinkOption; import java.nio.file.Path; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -139,9 +138,7 @@ record MacDmgPackager(BuildEnv env, MacDmgPackage pkg, Path outputDir, private void prepareDMGSetupScript() throws IOException { Path dmgSetup = volumeScript(); - Log.verbose(MessageFormat.format( - I18N.getString("message.preparing-dmg-setup"), - dmgSetup.toAbsolutePath().toString())); + Log.progress(I18N.format("message.preparing-dmg-setup", dmgSetup.toAbsolutePath().toString())); // Prepare DMG setup script Map data = new HashMap<>(); @@ -202,10 +199,6 @@ record MacDmgPackager(BuildEnv env, MacDmgPackage pkg, Path outputDir, } } - private String hdiUtilVerbosityFlag() { - return env.verbose() ? "-verbose" : "-quiet"; - } - private void buildDMG() throws IOException { boolean copyAppImage = false; @@ -217,7 +210,7 @@ record MacDmgPackager(BuildEnv env, MacDmgPackage pkg, Path outputDir, Files.createDirectories(protoDMG.getParent()); Files.createDirectories(finalDMG.getParent()); - final String hdiUtilVerbosityFlag = hdiUtilVerbosityFlag(); + final String hdiUtilVerbosityFlag = "-verbose"; // create temp image try { @@ -229,7 +222,9 @@ record MacDmgPackager(BuildEnv env, MacDmgPackage pkg, Path outputDir, "-fs", "HFS+", "-format", "UDRW").executeExpectSuccess(); } catch (IOException ex) { - Log.verbose(ex); // Log exception + Log.trace(ex, "Failed to create a DMG from the entire app image"); + + Log.trace("Will create an empty DMG and fill it manually"); // Creating DMG from entire app image failed, so lets try to create empty // DMG and copy files manually. See JDK-8248059. @@ -285,7 +280,7 @@ record MacDmgPackager(BuildEnv env, MacDmgPackage pkg, Path outputDir, .timeout(3, TimeUnit.MINUTES) .executeExpectSuccess(); } catch (IOException ex) { - Log.verbose(ex); + Log.trace(ex, "Failed to set background image"); } // volume icon @@ -317,11 +312,10 @@ record MacDmgPackager(BuildEnv env, MacDmgPackage pkg, Path outputDir, normalizedAbsolutePathString(mountedVolume) ).executeExpectSuccess(); } catch (IOException ex) { - Log.error(ex.getMessage()); - Log.verbose("Cannot enable custom icon using SetFile utility"); + Log.trace(ex, "Failed to set custom icon"); } } else { - Log.verbose(I18N.getString("message.setfile.dmg")); + Log.progress(I18N.format("message.setfile.dmg")); } } finally { @@ -345,12 +339,7 @@ record MacDmgPackager(BuildEnv env, MacDmgPackage pkg, Path outputDir, .execute(); } - try { - //Delete the temporary image - Files.deleteIfExists(protoDMG); - } catch (IOException ex) { - // Don't care if fails - } + IOUtils.deleteIfExistsIgnoreError(protoDMG); } private void detachVolume() throws IOException { @@ -369,7 +358,7 @@ record MacDmgPackager(BuildEnv env, MacDmgPackage pkg, Path outputDir, } cmdline.addAll(List.of( - hdiUtilVerbosityFlag(), + "-verbose", normalizedAbsolutePathString(mountedVolume) )); @@ -392,7 +381,7 @@ record MacDmgPackager(BuildEnv env, MacDmgPackage pkg, Path outputDir, return hdiutil( "convert", normalizedAbsolutePathString(srcDmg), - hdiUtilVerbosityFlag(), + "-verbose", "-format", "UDZO", "-o", normalizedAbsolutePathString(finalDmg())); }; @@ -404,14 +393,17 @@ record MacDmgPackager(BuildEnv env, MacDmgPackage pkg, Path outputDir, .setAttemptTimeout(3, TimeUnit.SECONDS) .execute(); } catch (IOException ex) { - Log.verbose(ex); + Log.trace(ex, "Failed to convert an interim DMG into the output DMG"); + + Log.trace("Try to convert a copy of an interim DMG into the output DMG"); + // Something holds the file, try to convert a copy. Path copyDmg = protoCopyDmg(); Files.copy(protoDmg(), copyDmg); try { convert.apply(copyDmg).executeExpectSuccess(); } finally { - Files.deleteIfExists(copyDmg); + IOUtils.deleteIfExistsIgnoreError(copyDmg); } } } diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgSystemEnvironment.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgSystemEnvironment.java index 11cf94ca66d..a72ff61ef31 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgSystemEnvironment.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgSystemEnvironment.java @@ -70,11 +70,11 @@ record MacDmgSystemEnvironment(Path hdiutil, Path osascript, Optional setF return SETFILE_KNOWN_PATHS.stream().filter(setFilePath -> { // Validate SetFile, if Xcode is not installed it will run, but exit with error code return Result.of( - Executor.of(setFilePath.toString(), "-h").setQuiet(true)::executeExpectSuccess, + Executor.of(setFilePath.toString(), "-h").quiet()::executeExpectSuccess, IOException.class).hasValue(); }).findFirst().or(() -> { // generic find attempt - final var executor = Executor.of("/usr/bin/xcrun", "-find", "SetFile").setQuiet(true).saveFirstLineOfOutput(); + final var executor = Executor.of("/usr/bin/xcrun", "-find", "SetFile").quiet().saveFirstLineOfOutput(); return Result.of(executor::executeExpectSuccess, IOException.class).flatMap(execResult -> { return Result.of(() -> { diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacFromOptions.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacFromOptions.java index 2c247ed3989..e4a651ce916 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacFromOptions.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacFromOptions.java @@ -186,7 +186,7 @@ final class MacFromOptions { pkgSigningIdentityBuilder.ifPresent(pkgBuilder::signingBuilder); - return pkgBuilder.create(); + return pkgBuilder.summary(OptionUtils.summary(options)).create(); } private record ApplicationWithDetails(MacApplication app, Optional externalApp) { @@ -243,6 +243,8 @@ final class MacFromOptions { final var appBuilder = new MacApplicationBuilder(createApplicationBuilder(options)); + appBuilder.summary(OptionUtils.summary(options)); + if (OptionUtils.isRuntimeInstaller(options)) { // Predefined runtime image, if specified, can be a macOS bundle or regular directory. // Notify application builder with the path to the plist file in the predefined runtime image only if the file exists. @@ -344,6 +346,8 @@ final class MacFromOptions { .ifPresent(builder::predefinedAppImageSigned); } + builder.summary(OptionUtils.summary(options)); + return builder; } diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPackageBuilder.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPackageBuilder.java index 1049496146f..5478e5cef96 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPackageBuilder.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPackageBuilder.java @@ -29,9 +29,12 @@ import static jdk.jpackage.internal.MacPackagingPipeline.LayoutUtils.packagerLay import java.nio.file.Files; import java.util.Objects; +import java.util.Optional; import jdk.jpackage.internal.model.MacApplication; import jdk.jpackage.internal.model.MacPackage; import jdk.jpackage.internal.model.MacPackageMixin; +import jdk.jpackage.internal.summary.SummaryAccumulator; +import jdk.jpackage.internal.summary.StandardWarning; final class MacPackageBuilder { @@ -44,6 +47,11 @@ final class MacPackageBuilder { return this; } + MacPackageBuilder summary(SummaryAccumulator v) { + summary = v; + return this; + } + PackageBuilder pkgBuilder() { return pkgBuilder; } @@ -60,16 +68,22 @@ final class MacPackageBuilder { pkg = pkgBuilder.create(); var macPkg = MacPackage.create(pkg, new MacPackageMixin.Stub(pkg.predefinedAppImage().map(v -> predefinedAppImageSigned))); - validatePredefinedAppImage(macPkg); + summary().ifPresent(s -> { + validatePredefinedAppImage(s, macPkg); + }); return macPkg; } - private static void validatePredefinedAppImage(MacPackage pkg) { + private Optional summary() { + return Optional.ofNullable(summary); + } + + private static void validatePredefinedAppImage(SummaryAccumulator summary, MacPackage pkg) { if (pkg.predefinedAppImageSigned().orElse(false) && !pkg.isRuntimeInstaller()) { pkg.predefinedAppImage().ifPresent(predefinedAppImage -> { var thePackageFile = PackageFile.getPathInAppImage(APPLICATION_LAYOUT); if (!Files.exists(predefinedAppImage.resolve(thePackageFile))) { - Log.info(I18N.format("warning.per.user.app.image.signed", thePackageFile)); + summary.put(StandardWarning.MAC_SIGNED_PREDEFINED_APP_IMAGE_WITHOUT_PACKAGE_FILE, thePackageFile); } }); } @@ -77,4 +91,5 @@ final class MacPackageBuilder { private final PackageBuilder pkgBuilder; private boolean predefinedAppImageSigned; + private SummaryAccumulator summary; } diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPackagingPipeline.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPackagingPipeline.java index d75b7d0b9cd..25d97e15507 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPackagingPipeline.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPackagingPipeline.java @@ -291,7 +291,7 @@ final class MacPackagingPipeline { "--raw", "--assess", "--type", "exec", - bundle.root().toString()).setQuiet(true).saveOutput(true).binaryOutput()::execute).get(); + bundle.root().toString()).quiet().saveOutput(true).binaryOutput()::execute).get(); switch (result.getExitCode()) { case 0, 3 -> { @@ -445,7 +445,7 @@ final class MacPackagingPipeline { final var infoPlistFile = macBundleFromAppImageLayout(env.resolvedLayout()).orElseThrow().infoPlistFile(); - Log.verbose(I18N.format("message.preparing-info-plist", PathUtils.normalizedAbsolutePathString(infoPlistFile))); + Log.progress(I18N.format("message.preparing-info-plist", PathUtils.normalizedAbsolutePathString(infoPlistFile))); final String faXml = toSupplier(() -> { var buf = new StringWriter(); diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgPackageBuilder.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgPackageBuilder.java index 0a5cc09596f..9a4cc8136aa 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgPackageBuilder.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgPackageBuilder.java @@ -29,6 +29,8 @@ import java.util.Optional; import jdk.jpackage.internal.model.MacPkgPackage; import jdk.jpackage.internal.model.MacPkgPackageMixin; import jdk.jpackage.internal.model.PkgSigningConfig; +import jdk.jpackage.internal.summary.StandardWarning; +import jdk.jpackage.internal.summary.SummaryAccumulator; final class MacPkgPackageBuilder { @@ -41,9 +43,16 @@ final class MacPkgPackageBuilder { return this; } + MacPkgPackageBuilder summary(SummaryAccumulator v) { + summary = v; + return this; + } + MacPkgPackage create() { var pkg = MacPkgPackage.create(pkgBuilder.create(), new MacPkgPackageMixin.Stub(createSigningConfig())); - validatePredefinedAppImage(pkg); + summary().ifPresent(s -> { + validatePredefinedAppImage(s, pkg); + }); return pkg; } @@ -53,14 +62,19 @@ final class MacPkgPackageBuilder { }); } - private static void validatePredefinedAppImage(MacPkgPackage pkg) { + private Optional summary() { + return Optional.ofNullable(summary); + } + + private static void validatePredefinedAppImage(SummaryAccumulator summary, MacPkgPackage pkg) { if (!pkg.predefinedAppImageSigned().orElse(false) && pkg.sign()) { pkg.predefinedAppImage().ifPresent(predefinedAppImage -> { - Log.info(I18N.format("warning.unsigned.app.image", "pkg")); + summary.put(StandardWarning.MAC_SIGNED_PKG_WITH_UNSIGNED_PREDEFINED_APP_IMAGE); }); } } private final MacPackageBuilder pkgBuilder; private SigningIdentityBuilder signingBuilder; + private SummaryAccumulator summary; } diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgPackager.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgPackager.java index 369ab201611..b96e77d8960 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgPackager.java +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgPackager.java @@ -34,7 +34,6 @@ import java.net.URI; import java.net.URISyntaxException; import java.nio.file.Files; import java.nio.file.Path; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -216,6 +215,7 @@ record MacPkgPackager(BuildEnv env, MacPkgPackage pkg, Optional servic pipelineBuilder .task(PkgPackageTaskID.PREPARE_MAIN_SCRIPTS) .action(this::prepareMainScripts) + .logActionBegin("message.preparing-scripts") .addDependent(PackageTaskID.RUN_POST_IMAGE_USER_SCRIPT) .add() .task(PkgPackageTaskID.LOG_NO_MAIN_SCRIPTS) @@ -223,6 +223,7 @@ record MacPkgPackager(BuildEnv env, MacPkgPackage pkg, Optional servic .addDependent(PackageTaskID.RUN_POST_IMAGE_USER_SCRIPT) .add() .task(PkgPackageTaskID.CREATE_DISTRIBUTION_XML_FILE) + .logActionBegin("message.preparing-distribution-dist", distributionXmlFile()) .action(this::prepareDistributionXMLFile) .addDependent(PackageTaskID.RUN_POST_IMAGE_USER_SCRIPT) .add() @@ -350,7 +351,6 @@ record MacPkgPackager(BuildEnv env, MacPkgPackage pkg, Optional servic } private void prepareMainScripts() throws IOException { - Log.verbose(I18N.getString("message.preparing-scripts")); final var scriptsRoot = scriptsRoot().orElseThrow(); @@ -371,9 +371,6 @@ record MacPkgPackager(BuildEnv env, MacPkgPackage pkg, Optional servic private void prepareDistributionXMLFile() throws IOException { final var f = distributionXmlFile(); - Log.verbose(MessageFormat.format(I18N.getString( - "message.preparing-distribution-dist"), f.toAbsolutePath().toString())); - XmlUtils.createXml(f, xml -> { xml.writeStartElement("installer-gui-script"); xml.writeAttribute("minSpecVersion", "1"); diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties index f181bbf79af..2586769a74b 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties @@ -53,11 +53,14 @@ resource.pkg-background-image=pkg background image resource.pkg-pdf=project definition file resource.launchd-plist-file=launchd plist file -message.bundle-name-too-long-warning={0} is set to ''{1}'', which is longer than 16 characters. For a better Mac experience consider shortening it. +summary.property.mac-bundle-identifier=CFBundleIdentifier +summary.property.mac-bundle-name=CFBundleName +summary.property.mac-sign-app-image.format=Sign {0} in "{1}" directory + +warning.bundle-name-too-long-warning=Bundle name "{0}" is longer than 16 characters. For a better Mac experience consider shortening it. message.preparing-info-plist=Preparing Info.plist: {0}. message.icon-not-icns= The specified icon "{0}" is not an ICNS file and will not be used. The default icon will be used in it's place. message.keychain.error=Unable to get keychain list. -message.derived-bundle-identifier=Derived bundle identifier: {0} message.preparing-dmg-setup=Preparing dmg setup: {0}. message.preparing-scripts=Preparing package scripts. message.preparing-distribution-dist=Preparing distribution.dist: {0}. @@ -69,7 +72,8 @@ message.dmg.license.button.disagree=Disagree message.dmg.license.button.print=Print message.dmg.license.button.save=Save... message.dmg.license.message=If you agree with the terms of this license, press "Agree" to install the software. If you do not agree, press "Disagree". -warning.unsigned.app.image=Warning: Using unsigned app-image to build signed {0}. -warning.per.user.app.image.signed=Warning: Support for per-user configuration of the installed application will not be supported due to missing "{0}" in predefined signed application image. -warning.non.standard.contents.sub.dir=Warning: The file name of the directory "{0}" specified for the --app-content option is not a standard subdirectory name in the "Contents" directory of the application bundle. The result application bundle may fail code signing and/or notarization. -warning.app.content.is.not.dir=Warning: The value "{0}" of the --app-content option is not a directory. The result application bundle may fail code signing and/or notarization. \ No newline at end of file +warning.unsigned.app.image=Unsigned predefined application image with signed output package +warning.per.user.app.image.signed=Per-user configuration of the installed application will not be supported due to missing "{0}" file in the signed predefined application image +warning.non-standard-app-content=The value of --app-content option may result into failure signing and/or notarizing of the result application bundle +warning.non-standard-app-content.not-dir="{0}" is not a directory +warning.non-standard-app-content.non-standard-dir-name=The name "{0}" of directory "{1}" is not a standard subdirectory name in the "Contents" directory of a macOS bundle \ No newline at end of file diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ApplicationBuilder.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ApplicationBuilder.java index 0cca59f7c19..bb5f1a98a99 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ApplicationBuilder.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ApplicationBuilder.java @@ -192,7 +192,7 @@ final class ApplicationBuilder { derivedVersion = derivedVersion.map(v -> { var mappedVersion = derivedVersionNormalizer.apply(v); if (!mappedVersion.equals(v)) { - Log.verbose(I18N.format("message.version-normalized", mappedVersion, v)); + Log.trace("Normalize derived bundle version from [%s] to [%s]", v, mappedVersion); } return mappedVersion; }); @@ -205,10 +205,10 @@ final class ApplicationBuilder { if (appImageLayout instanceof RuntimeLayout && runtimeReleaseFile != null) { try { var releaseVersion = new RuntimeReleaseFile(runtimeReleaseFile).getJavaVersion().toString(); - Log.verbose(I18N.format("message.release-version", releaseVersion)); + Log.trace("Derive bundle version [%s] from [%s] file", releaseVersion, runtimeReleaseFile); return Optional.of(releaseVersion); } catch (Exception ex) { - Log.verbose(ex); + Log.trace(ex, "Failed to derive bundle version from [%s] file", runtimeReleaseFile); return Optional.empty(); } } else if (launchers != null) { @@ -218,7 +218,7 @@ final class ApplicationBuilder { .flatMap(modularStartupInfo -> { var moduleVersion = modularStartupInfo.moduleVersion(); moduleVersion.ifPresent(v -> { - Log.verbose(I18N.format("message.module-version", v, modularStartupInfo.moduleName())); + Log.trace("Derive bundle version [%s] from [%s] module", v, modularStartupInfo.moduleName()); }); return moduleVersion; }); diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnv.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnv.java index 527f747b229..5a793757d51 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnv.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnv.java @@ -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 @@ -42,13 +42,6 @@ interface BuildEnv { */ Path buildRoot(); - /** - * Returns true if the build should be verbose output. - * - * @return true if the build should be verbose output - */ - boolean verbose(); - /** * Returns the path of the resource directory or an empty {@link Optional} * instance if none is configured with the build. @@ -108,15 +101,25 @@ interface BuildEnv { return ((Internal.DefaultBuildEnv)env).copyWithAppImageLayout(appImageLayout); } - static BuildEnv create(Path buildRoot, Optional resourceDir, boolean verbose, - Class resourceLocator, AppImageLayout appImageLayout) { - return new Internal.DefaultBuildEnv(buildRoot, resourceDir, verbose, - resourceLocator, appImageLayout); + static BuildEnv create( + Path buildRoot, + Optional resourceDir, + Class resourceLocator, + AppImageLayout appImageLayout) { + + return new Internal.DefaultBuildEnv( + buildRoot, + resourceDir, + resourceLocator, + appImageLayout); } static final class Internal { - private record DefaultBuildEnv(Path buildRoot, Optional resourceDir, - boolean verbose, Class resourceLocator, + + private record DefaultBuildEnv( + Path buildRoot, + Optional resourceDir, + Class resourceLocator, AppImageLayout appImageLayout) implements BuildEnv { DefaultBuildEnv { @@ -131,7 +134,7 @@ interface BuildEnv { } DefaultBuildEnv copyWithAppImageLayout(AppImageLayout v) { - return new DefaultBuildEnv(buildRoot, resourceDir, verbose, resourceLocator, v); + return new DefaultBuildEnv(buildRoot, resourceDir, resourceLocator, v); } @Override diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnvBuilder.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnvBuilder.java index 17b805b8259..77354cb2c53 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnvBuilder.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnvBuilder.java @@ -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 @@ -48,13 +48,11 @@ final class BuildEnvBuilder { String.format("Root work directory [%s] should be empty or non existent", root)); } - return BuildEnv.create(root, Optional.ofNullable(resourceDir), verbose, - ResourceLocator.class, resolvedAppImageLayout()); - } - - BuildEnvBuilder verbose(boolean v) { - verbose = v; - return this; + return BuildEnv.create( + root, + Optional.ofNullable(resourceDir), + ResourceLocator.class, + resolvedAppImageLayout()); } BuildEnvBuilder resourceDir(Path v) { @@ -96,7 +94,6 @@ final class BuildEnvBuilder { private Path appImageDir; private AppImageLayout appImageLayout; private Path resourceDir; - private boolean verbose; private final Path root; } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnvFromOptions.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnvFromOptions.java index 8faabe97a3d..e418f957b41 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnvFromOptions.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BuildEnvFromOptions.java @@ -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 @@ -28,7 +28,6 @@ import static jdk.jpackage.internal.cli.StandardOption.PREDEFINED_APP_IMAGE; import static jdk.jpackage.internal.cli.StandardOption.PREDEFINED_RUNTIME_IMAGE; import static jdk.jpackage.internal.cli.StandardOption.RESOURCE_DIR; import static jdk.jpackage.internal.cli.StandardOption.TEMP_ROOT; -import static jdk.jpackage.internal.cli.StandardOption.VERBOSE; import java.nio.file.Path; import java.util.Objects; @@ -82,7 +81,6 @@ final class BuildEnvFromOptions { final var builder = new BuildEnvBuilder(TEMP_ROOT.getFrom(options)); RESOURCE_DIR.ifPresentIn(options, builder::resourceDir); - VERBOSE.ifPresentIn(options, builder::verbose); if (app.isRuntime()) { var path = PREDEFINED_RUNTIME_IMAGE.getFrom(options); diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DefaultBundlingEnvironment.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DefaultBundlingEnvironment.java index ae4b1005318..c924b4a9973 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DefaultBundlingEnvironment.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DefaultBundlingEnvironment.java @@ -130,13 +130,15 @@ class DefaultBundlingEnvironment implements CliBundlingEnvironment { Objects.requireNonNull(app); Objects.requireNonNull(pipelineBuilder); + OptionUtils.finalizeAndPrintSummary(options, app); + if (EXIT_AFTER_CONFIGURATION_PHASE.getFrom(options)) { return; } final var outputDir = PathUtils.normalizedAbsolutePath(OptionUtils.outputDir(options).resolve(app.appImageDirName())); - Log.verbose(I18N.getString("message.create-app-image")); + Log.progress(I18N.format("message.create-app-image")); IOUtils.writableOutputDir(outputDir.getParent()); @@ -150,7 +152,7 @@ class DefaultBundlingEnvironment implements CliBundlingEnvironment { pipelineBuilder.create().execute(BuildEnv.withAppImageDir(env, outputDir), app); - Log.verbose(I18N.getString("message.app-image-created")); + Log.progress(I18N.format("message.app-image-created")); } static void createNativePackage(Options options, @@ -175,6 +177,8 @@ class DefaultBundlingEnvironment implements CliBundlingEnvironment { Objects.requireNonNull(createPipelineBuilder); Objects.requireNonNull(pipelineBuilderMutatorFactory); + OptionUtils.finalizeAndPrintSummary(options, pkg); + if (EXIT_AFTER_CONFIGURATION_PHASE.getFrom(options)) { return; } @@ -203,6 +207,9 @@ class DefaultBundlingEnvironment implements CliBundlingEnvironment { @Override public void createBundle(BundlingOperationDescriptor op, Options cmdline) { final var bundler = getBundlerSupplier(op).get().orElseThrow(); + + cmdline = OptionUtils.addSummary(cmdline); + Optional permanentWorkDirectory = Optional.empty(); try (var tempDir = new TempDirectory(cmdline, Globals.instance().objectFactory())) { if (!tempDir.deleteOnClose()) { @@ -213,7 +220,7 @@ class DefaultBundlingEnvironment implements CliBundlingEnvironment { throw new UncheckedIOException(ex); } finally { permanentWorkDirectory.ifPresent(workDir -> { - Log.verbose(I18N.format("message.debug-working-directory", workDir.toAbsolutePath())); + Log.progress(I18N.format("message.debug-working-directory", workDir.toAbsolutePath())); }); } } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Executor.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Executor.java index f9ccec7e3bb..a2558819b8f 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Executor.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Executor.java @@ -24,11 +24,11 @@ */ package jdk.jpackage.internal; -import java.io.BufferedReader; +import static jdk.jpackage.internal.log.StandardLogger.COMMAND_LOGGER; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; -import java.io.StringReader; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; @@ -41,6 +41,7 @@ import java.util.concurrent.TimeUnit; import java.util.function.UnaryOperator; import java.util.spi.ToolProvider; import java.util.stream.Stream; +import jdk.jpackage.internal.log.CommandLogger; import jdk.jpackage.internal.model.ExecutableAttributesWithCapturedOutput; import jdk.jpackage.internal.util.CommandLineFormat; import jdk.jpackage.internal.util.CommandOutputControl; @@ -175,11 +176,15 @@ public final class Executor { return args; } - public Executor setQuiet(boolean v) { + public Executor quiet(boolean v) { quietCommand = v; return this; } + public Executor quiet() { + return quiet(true); + } + public Executor mapper(UnaryOperator v) { mapper = v; return this; @@ -212,8 +217,10 @@ public final class Executor { throw new IllegalStateException("No target to execute"); } - if (dumpOutput()) { - Log.verbose(String.format("Running %s", CommandLineFormat.DEFAULT.apply(List.of(commandLine().getFirst())))); + var logger = logger(); + + if (logger.enabled()) { + logger.beforeCommandExecuted(quietCommand, CommandLineFormat.DEFAULT.apply(commandLine())); } var printableOutputBuilder = new PrintableOutputBuilder(coc); @@ -229,8 +236,21 @@ public final class Executor { } var printableOutput = printableOutputBuilder.create(); - if (dumpOutput()) { - log(result, printableOutput); + + if (logger.enabled()) { + Optional pid; + if (result.execAttrs() instanceof ProcessAttributes attrs) { + pid = attrs.pid(); + } else { + pid = Optional.empty(); + } + + logger.afterCommandExecuted( + quietCommand, + result.execAttrs().printableCommandLine(), + pid, + result.exitCode(), + printableOutput); } return ExecutableAttributesWithCapturedOutput.augmentResultWithOutput(result, printableOutput); @@ -271,6 +291,10 @@ public final class Executor { } } + private CommandLogger logger() { + return Globals.instance().logger(COMMAND_LOGGER); + } + private ProcessBuilder copyProcessBuilder() { if (processBuilder == null) { throw new IllegalStateException(); @@ -285,47 +309,6 @@ public final class Executor { return copy; } - private boolean dumpOutput() { - return Log.isVerbose() && !quietCommand; - } - - private static void log(Result result, String printableOutput) throws IOException { - Objects.requireNonNull(result); - Objects.requireNonNull(printableOutput); - - Optional pid; - if (result.execAttrs() instanceof ProcessAttributes attrs) { - pid = attrs.pid(); - } else { - pid = Optional.empty(); - } - - var sb = new StringBuilder(); - sb.append("Command"); - pid.ifPresent(p -> { - sb.append(" [PID: ").append(p).append("]"); - }); - sb.append(":\n ").append(result.execAttrs().printableCommandLine()); - Log.verbose(sb.toString()); - - if (!printableOutput.isEmpty()) { - sb.delete(0, sb.length()); - sb.append("Output:"); - try (var lines = new BufferedReader(new StringReader(printableOutput)).lines()) { - lines.forEach(line -> { - sb.append("\n ").append(line); - }); - } - Log.verbose(sb.toString()); - } - - result.exitCode().ifPresentOrElse(exitCode -> { - Log.verbose("Returned: " + exitCode + "\n"); - }, () -> { - Log.verbose("Aborted: timed-out" + "\n"); - }); - } - private static final class PrintableOutputBuilder { PrintableOutputBuilder(CommandOutputControl coc) { diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Globals.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Globals.java index 2fc0046fad5..8755fa5fd08 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Globals.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Globals.java @@ -24,12 +24,14 @@ */ package jdk.jpackage.internal; -import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.function.Supplier; +import jdk.jpackage.internal.cli.OptionValue; +import jdk.jpackage.internal.cli.Options; +import jdk.jpackage.internal.log.Logger; public final class Globals { @@ -73,16 +75,14 @@ public final class Globals { return setProperty(EnvironmentProvider.class, v); } - Log.Logger logger() { - return logger; + public Globals logEnv(Options v) { + checkMutable(); + logEnv = Objects.requireNonNull(v); + return this; } - public void loggerOutputStreams(PrintWriter out, PrintWriter err) { - logger.setPrintWriter(out, err); - } - - public void loggerVerbose() { - logger.setVerbose(); + public T logger(OptionValue ov) { + return ov.getFrom(instance().logEnv); } public static int main(Supplier mainBody) { @@ -104,7 +104,7 @@ public final class Globals { } private ObjectFactory objectFactory = ObjectFactory.DEFAULT; - private final Log.Logger logger = new Log.Logger(); + private Options logEnv = Options.concat(); private final Map properties = new HashMap<>(); private static final ScopedValue INSTANCE = ScopedValue.newInstance(); diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/IOUtils.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/IOUtils.java index 08cf0c10982..af428b30768 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/IOUtils.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/IOUtils.java @@ -60,4 +60,13 @@ final class IOUtils { throw new JPackageException(I18N.format("error.cannot-write-to-output-dir", outdir.toAbsolutePath())); } } + + static void deleteIfExistsIgnoreError(Path path) { + try { + Files.deleteIfExists(path); + } catch (IOException ex) { + Log.trace(ex, "Failed to delete [%s]", path); + } + } } + diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Log.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Log.java index 5c27ef67500..bb28d39e52f 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Log.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Log.java @@ -25,103 +25,62 @@ package jdk.jpackage.internal; -import java.io.PrintWriter; -import java.text.SimpleDateFormat; -import java.util.Date; +import jdk.jpackage.internal.log.ProgressLogger; +import jdk.jpackage.internal.log.ResourceLogger; +import jdk.jpackage.internal.log.StandardLogger; +import jdk.jpackage.internal.log.TraceLogger; /** * Log * * General purpose logging mechanism. */ -public class Log { - public static class Logger { - private boolean verbose = false; - private PrintWriter out = null; - private PrintWriter err = null; +final class Log { - // verbose defaults to true unless environment variable JPACKAGE_DEBUG - // is set to true. - // Then it is only set to true by using --verbose jpackage option - - public Logger() { - verbose = ("true".equals(System.getenv("JPACKAGE_DEBUG"))); - } - - public void setVerbose() { - verbose = true; - } - - public boolean isVerbose() { - return verbose; - } - - public void setPrintWriter(PrintWriter out, PrintWriter err) { - this.out = out; - this.err = err; - } - - public void info(String msg) { - if (out != null) { - out.println(msg); - } - } - - public void fatalError(String msg) { - if (err != null) { - err.println(msg); - } - } - - public void error(String msg) { - msg = addTimestamp(msg); - if (err != null) { - err.println(msg); - } - } - - public void verbose(Throwable t) { - if (out != null && verbose) { - out.print(addTimestamp("")); - t.printStackTrace(out); - } - } - - public void verbose(String msg) { - msg = addTimestamp(msg); - if (out != null && verbose) { - out.println(msg); - } - } - - private String addTimestamp(String msg) { - SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.SSS"); - Date time = new Date(System.currentTimeMillis()); - return String.format("[%s] %s", sdf.format(time), msg); - } + private Log() { } - public static void info(String msg) { - Globals.instance().logger().info(msg); + static void trace(String format, Object... args) { + tracer().trace(format, args); } - public static void fatalError(String msg) { - Globals.instance().logger().fatalError(msg); + static void trace(Throwable t, String format, Object... args) { + tracer().trace(t, format, args); } - public static void error(String msg) { - Globals.instance().logger().error(msg); + static void trace(Throwable t) { + tracer().trace(t); } - public static boolean isVerbose() { - return Globals.instance().logger().isVerbose(); + static void useResource(String localizedMsg) { + resourceLogger().useResource(localizedMsg); } - public static void verbose(String msg) { - Globals.instance().logger().verbose(msg); + static void progress(String localizedMsg) { + progressLogger().progress(localizedMsg); } - public static void verbose(Throwable t) { - Globals.instance().logger().verbose(t); + static void progressWarning(Exception cause) { + progressLogger().progressWarning(cause); + } + + static void progressWarning(Exception cause, String localizedMsg) { + progressLogger().progressWarning(cause, localizedMsg); + } + + static void progressWarning(String localizedMsg) { + progressLogger().progressWarning(localizedMsg); + } + + private static TraceLogger tracer() { + return Globals.instance().logger(StandardLogger.TRACE_LOGGER); + } + + private static ProgressLogger progressLogger() { + return Globals.instance().logger(StandardLogger.PROGRESS_LOGGER); + } + + private static ResourceLogger resourceLogger() { + return Globals.instance().logger(StandardLogger.RESOURCE_LOGGER); } } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ModuleInfo.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ModuleInfo.java index 9555423db62..15aa418e458 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ModuleInfo.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ModuleInfo.java @@ -56,13 +56,14 @@ record ModuleInfo(String name, Optional version, Optional mainCl // is linked in the runtime by simply analyzing the data // of `release` file. + var releaseFilePath = RuntimeReleaseFile.releaseFilePathInRuntime(cookedRuntime); try { - var cookedRuntimeModules = RuntimeReleaseFile.loadFromRuntime(cookedRuntime).getModules(); + var cookedRuntimeModules = new RuntimeReleaseFile(releaseFilePath).getModules(); if (!cookedRuntimeModules.contains(moduleName)) { return Optional.empty(); } } catch (Exception ex) { - Log.verbose(ex); + Log.trace(ex, "Failed to read modules from [%s]", releaseFilePath); return Optional.empty(); } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/OptionUtils.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/OptionUtils.java index b39e67a9eb7..b665656cbf9 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/OptionUtils.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/OptionUtils.java @@ -30,11 +30,15 @@ import static jdk.jpackage.internal.cli.StandardOption.MAIN_JAR; import static jdk.jpackage.internal.cli.StandardOption.MODULE; import static jdk.jpackage.internal.cli.StandardOption.PREDEFINED_APP_IMAGE; import static jdk.jpackage.internal.cli.StandardOption.PREDEFINED_RUNTIME_IMAGE; +import static jdk.jpackage.internal.log.StandardLogger.SUMMARY_LOGGER; import java.nio.file.Path; import java.util.Objects; +import jdk.jpackage.internal.cli.OptionValue; import jdk.jpackage.internal.cli.Options; import jdk.jpackage.internal.cli.StandardBundlingOperation; +import jdk.jpackage.internal.model.BundleSpec; +import jdk.jpackage.internal.summary.Summary; final class OptionUtils { @@ -56,4 +60,21 @@ final class OptionUtils { static boolean isBundlingOperation(Options options, StandardBundlingOperation op) { return bundlingOperation(options).equals(Objects.requireNonNull(op)); } + + static Options addSummary(Options options) { + return options.copyWithDefaultValue(SUMMARY, Summary::new); + } + + static Summary summary(Options options) { + return SUMMARY.getFrom(options); + } + + static void finalizeAndPrintSummary(Options options, BundleSpec bundle) { + var summary = summary(options); + + summary.putStandardPropertiesIfAbsent(bundlingOperation(options), outputDir(options), bundle); + Globals.instance().logger(SUMMARY_LOGGER).summary(summary); + } + + private static final OptionValue

              SUMMARY = OptionValue.create(); } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/OverridableResource.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/OverridableResource.java index 73fc36d78ac..32a6f92ff60 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/OverridableResource.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/OverridableResource.java @@ -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 @@ -257,7 +257,7 @@ final class OverridableResource { private boolean useExternal(ResourceConsumer dest) throws IOException { boolean used = externalPath != null && Files.exists(externalPath); if (used && dest != null) { - Log.verbose(I18N.format("message.using-custom-resource-from-file", + Log.useResource(I18N.format("message.using-custom-resource-from-file", getPrintableCategory(), externalPath.toAbsolutePath().normalize())); @@ -284,7 +284,7 @@ final class OverridableResource { final Path logResourceName = Optional.ofNullable(logPublicName).orElse( resourceName).normalize(); - Log.verbose(I18N.format("message.using-custom-resource", + Log.useResource(I18N.format("message.using-custom-resource", getPrintableCategory(), logResourceName)); try (InputStream in = Files.newInputStream(customResource)) { @@ -304,7 +304,7 @@ final class OverridableResource { .orElseGet(() -> { return resourceName(dest); }); - Log.verbose(I18N.format("message.using-default-resource", + Log.useResource(I18N.format("message.using-default-resource", defaultName, getPrintableCategory(), resourceName)); try (InputStream in = defaultResourceGetter.apply(defaultName)) { @@ -321,7 +321,7 @@ final class OverridableResource { .orElseGet(() -> { return resourceName(dest); }); - Log.verbose(I18N.format("message.no-default-resource", + Log.useResource(I18N.format("message.no-default-resource", getPrintableCategory(), resourceName)); } } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/PackagingPipeline.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/PackagingPipeline.java index 315e3bce0f1..161fa6053b0 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/PackagingPipeline.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/PackagingPipeline.java @@ -378,21 +378,21 @@ final class PackagingPipeline { private TaskBuilder logAppImageAction(ActionRole role, String keyId, Function, Object[]> formatArgsSupplier) { Objects.requireNonNull(keyId); return appImageAction(role, (AppImageBuildEnv env) -> { - Log.verbose(I18N.format(keyId, formatArgsSupplier.apply(env))); + Log.progress(I18N.format(keyId, formatArgsSupplier.apply(env))); }); } private TaskBuilder logPackageAction(ActionRole role, String keyId, Function, Object[]> formatArgsSupplier) { Objects.requireNonNull(keyId); return packageAction(role, (PackageBuildEnv env) -> { - Log.verbose(I18N.format(keyId, formatArgsSupplier.apply(env))); + Log.progress(I18N.format(keyId, formatArgsSupplier.apply(env))); }); } private TaskBuilder logAction(ActionRole role, String keyId, Supplier formatArgsSupplier) { Objects.requireNonNull(keyId); return action(role, () -> { - Log.verbose(I18N.format(keyId, formatArgsSupplier.get())); + Log.progress(I18N.format(keyId, formatArgsSupplier.get())); }); } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/TempDirectory.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/TempDirectory.java index 345a42c5051..1fa586bee73 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/TempDirectory.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/TempDirectory.java @@ -94,14 +94,14 @@ final class TempDirectory implements Closeable { path, MAX_REPORTED_UNDELETED_FILE_COUNT).paths(); if (remainingFiles.equals(List.of(path))) { - Log.info(I18N.format("warning.tempdir.cleanup-failed", path)); + Log.progressWarning(I18N.format("warning.tempdir.cleanup-failed", path)); } else { remainingFiles.forEach(file -> { - Log.info(I18N.format("warning.tempdir.cleanup-file-failed", file)); + Log.progressWarning(I18N.format("warning.tempdir.cleanup-file-failed", file)); }); } - Log.verbose(ex); + Log.progressWarning(ex); } } return null; @@ -138,7 +138,7 @@ final class TempDirectory implements Closeable { return addPath(dir, FileVisitResult.SKIP_SUBTREE); } } catch (IOException ex) { - Log.verbose(ex); + Log.trace(ex); } return FileVisitResult.CONTINUE; } @@ -170,7 +170,7 @@ final class TempDirectory implements Closeable { }); } catch (IOException ex) { - Log.verbose(ex); + Log.trace(ex); } return new DirectoryListing(Collections.unmodifiableList(paths), !stopped.get()); @@ -181,5 +181,5 @@ final class TempDirectory implements Closeable { private final boolean deleteOnClose; private final RetryExecutorFactory retryExecutorFactory; - private final static int MAX_REPORTED_UNDELETED_FILE_COUNT = 100; + private static final int MAX_REPORTED_UNDELETED_FILE_COUNT = 100; } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ToolValidator.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ToolValidator.java index 13a9e05e934..7ebeff08a73 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ToolValidator.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ToolValidator.java @@ -126,7 +126,7 @@ final class ToolValidator { String version = null; try { - var result = Executor.of(cmdline).setQuiet(true).saveOutput().execute(); + var result = Executor.of(cmdline).quiet().saveOutput().execute(); var lines = result.content(); if (versionParser != null && minimalVersion != null) { version = versionParser.apply(lines.stream()); diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/LogConfigParser.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/LogConfigParser.java new file mode 100644 index 00000000000..ff0b454161a --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/LogConfigParser.java @@ -0,0 +1,209 @@ +/* + * 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 jdk.jpackage.internal.cli; + +import java.util.BitSet; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Predicate; +import java.util.function.Supplier; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import jdk.jpackage.internal.log.LogEnvironment; +import jdk.jpackage.internal.log.LogEnvironment.Builder; +import jdk.jpackage.internal.log.LogEnvironment.LogSink; +import jdk.jpackage.internal.log.LoggerRole; +import jdk.jpackage.internal.util.SetBuilder; + +public final class LogConfigParser { + + static Builder valueOf(String str) { + return buildFromCategories(tokenize(str)); + } + + public static Set tokenize(String str) { + Objects.requireNonNull(str); + + Supplier ex = () -> { + return new IllegalArgumentException(String.format("Invalid value: [%s]", str)); + }; + + var groupCategories = new BitSet(MessageCategory.values().length); + var enableCategories = new BitSet(MessageCategory.values().length); + var disableCategories = new BitSet(MessageCategory.values().length); + + Stream.of(str.split("(?<=.),")).filter(Predicate.not(String::isEmpty)).forEach(v -> { + if (v.charAt(0) == '-') { + var category = CONSOLE_CATEGORIES.get(v.substring(1)); + if (category == null) { + throw ex.get(); + } else { + disableCategories.set(category.ordinal()); + } + } else { + Optional.ofNullable(GROUPS.get(v)).ifPresentOrElse(categoryGroup -> { + for (var category : categoryGroup) { + groupCategories.set(category.ordinal()); + } + }, () -> { + var category = CONSOLE_CATEGORIES.get(v); + if (category == null) { + throw ex.get(); + } else { + enableCategories.set(category.ordinal()); + } + }); + } + }); + + var categories = new HashSet(); + + for (var category : MessageCategory.values()) { + if (enableCategories.get(category.ordinal()) || + (groupCategories.get(category.ordinal()) && !disableCategories.get(category.ordinal()))) { + categories.add(category); + } + } + + return categories; + } + + static Builder defaultVerbose() { + return buildFromCategories(SetBuilder.build() + .add(MessageCategory.values()) + .remove(MessageCategory.TRACE, MessageCategory.SYSTEM_LOGGER) + .create()); + } + + static Builder quiet() { + return buildFromCategories(MessageCategory.ERRORS, MessageCategory.WARNINGS); + } + + private LogConfigParser() { + } + + public enum MessageCategory { + ERRORS { + public void applyTo(Builder builder) { + builder.enable(LoggerRole.ERROR_LOGGER, LogSink.CONSOLE); + builder.printFailedCommandOutputInConsole(true); + } + }, + PROGRESS { + public void applyTo(Builder builder) { + builder.enable(LoggerRole.PROGRESS_LOGGER, LogSink.CONSOLE); + builder.printProgressInConsole(true); + } + }, + RESOURCES { + public void applyTo(Builder builder) { + builder.enable(LoggerRole.RESOURCE_LOGGER, LogSink.CONSOLE); + } + }, + SUMMARY { + public void applyTo(Builder builder) { + builder.enable(LoggerRole.SUMMARY_LOGGER, LogSink.CONSOLE); + builder.printSummaryInConsole(true); + } + }, + SYSTEM_LOGGER { + public void applyTo(Builder builder) { + for (var role : LoggerRole.values()) { + builder.enable(role, LogSink.SYSTEM_LOGGER); + } + } + + @Override + String asStringValue() { + return "log"; + } + + @Override + boolean isConsole() { + return false; + } + }, + TOOLS { + public void applyTo(Builder builder) { + builder.enable(LoggerRole.COMMAND_LOGGER, LogSink.CONSOLE); + } + }, + TRACE { + public void applyTo(Builder builder) { + TOOLS.applyTo(builder); + builder.enable(LoggerRole.TRACE_LOGGER, LogSink.CONSOLE); + builder.printErrorStackTraceInConsole(true); + builder.printCommandOutputInConsole(true); + builder.printQuietCommands(true); + } + }, + WARNINGS { + public void applyTo(Builder builder) { + builder.enable(LoggerRole.SUMMARY_LOGGER, LogSink.CONSOLE); + builder.enable(LoggerRole.PROGRESS_LOGGER, LogSink.CONSOLE); + builder.printSummaryWarningsInConsole(true); + builder.printProgressWarningsInConsole(true); + } + }, + ; + + public abstract void applyTo(Builder builder); + + String asStringValue() { + return name().toLowerCase(); + } + + boolean isConsole() { + return true; + } + } + + private static Builder buildFromCategories(Set categories) { + var builder = LogEnvironment.build(); + + categories.forEach(c -> { + c.applyTo(builder); + }); + + return builder; + } + + private static Builder buildFromCategories(MessageCategory... categories) { + return buildFromCategories(Set.of(categories)); + } + + private static final Map CONSOLE_CATEGORIES = Stream.of(MessageCategory.values()) + .collect(Collectors.toUnmodifiableMap(MessageCategory::asStringValue, x -> x)); + + private static final Map> GROUPS = Map.ofEntries( + Map.entry("all", Set.of(MessageCategory.values())), + Map.entry("console", Stream.of(MessageCategory.values()) + .filter(MessageCategory::isConsole) + .collect(Collectors.toUnmodifiableSet())) + ); +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/Main.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/Main.java index 5789203c3e9..c3277bc1a9a 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/Main.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/Main.java @@ -28,6 +28,7 @@ package jdk.jpackage.internal.cli; import static jdk.jpackage.internal.cli.StandardOption.HELP; import static jdk.jpackage.internal.cli.StandardOption.VERBOSE; import static jdk.jpackage.internal.cli.StandardOption.VERSION; +import static jdk.jpackage.internal.log.StandardLogger.ERROR_LOGGER; import java.io.BufferedReader; import java.io.FileNotFoundException; @@ -49,13 +50,15 @@ import java.util.spi.ToolProvider; import jdk.internal.opt.CommandLine; import jdk.internal.util.OperatingSystem; import jdk.jpackage.internal.Globals; -import jdk.jpackage.internal.Log; +import jdk.jpackage.internal.cli.JOptSimpleOptionsBuilder.ConvertedOptionsBuilder; +import jdk.jpackage.internal.log.ErrorLogger; import jdk.jpackage.internal.model.ConfigException; import jdk.jpackage.internal.model.ExecutableAttributesWithCapturedOutput; import jdk.jpackage.internal.model.JPackageException; import jdk.jpackage.internal.model.SelfContainedException; import jdk.jpackage.internal.util.CommandOutputControl.UnexpectedExitCodeException; import jdk.jpackage.internal.util.CommandOutputControl.UnexpectedResultException; +import jdk.jpackage.internal.util.SetBuilder; import jdk.jpackage.internal.util.Slot; import jdk.jpackage.internal.util.function.ExceptionBox; @@ -139,12 +142,10 @@ public final class Main { Objects.requireNonNull(out); Objects.requireNonNull(err); - Globals.instance().loggerOutputStreams(out, err); + Globals.instance().logEnv(LogConfigParser.quiet().out(out).err(err).create()); final var runner = new Runner(t -> { - new ErrorReporter(_ -> { - t.printStackTrace(err); - }, Log::fatalError, Log.isVerbose()).reportError(t); + Globals.instance().logger(ERROR_LOGGER).reportError(t); }); try { @@ -170,7 +171,7 @@ public final class Main { final var parseResult = Utils.buildParser(os, bundlingEnv).create().apply(mappedArgs.get()); return runner.run(() -> { - final var parsedOptionsBuilder = parseResult.orElseThrow(); + var parsedOptionsBuilder = parseResult.orElseThrow(); final var options = parsedOptionsBuilder.create(); @@ -190,8 +191,30 @@ public final class Main { return List.of(); } + var skippedOptions = new ArrayList(); + if (VERBOSE.containsIn(options)) { - Globals.instance().loggerVerbose(); + // The "--verbose" option is on the command line. + // Pick this option from the command line and parse its string value. + // This will delay parsing of the rest of the command line + // until the configuration of the logging is complete. + parsedOptionsBuilder.copyWithExcludes( + SetBuilder.build(StandardOption.options()) + .remove(VERBOSE.getOption()) + .create().stream().map(WithOptionIdentifier::id).toList() + ).convertedOptions().map(ConvertedOptionsBuilder::create).map(VERBOSE::getFrom).value().ifPresent(logEnvBuilder -> { + skippedOptions.add(VERBOSE.id()); + Globals.instance().logEnv(logEnvBuilder.out(out).err(err).create()); + }); + } else if ("true".equals(System.getenv("JPACKAGE_DEBUG"))) { + // There is no "--verbose" option on the command line, + // but the "JPACKAGE_DEBUG" environment variable is set to "true". + // Enable the default verbose output. + Globals.instance().logEnv(LogConfigParser.defaultVerbose().out(out).err(err).create()); + } + + if (!skippedOptions.isEmpty()) { + parsedOptionsBuilder = parsedOptionsBuilder.copyWithExcludes(skippedOptions); } final var optionsProcessor = new OptionsProcessor(parsedOptionsBuilder, os, bundlingEnv); @@ -234,17 +257,22 @@ public final class Main { * Always print the messages for exceptions of any type. */ - record ErrorReporter(Consumer stackTracePrinter, Consumer messagePrinter, boolean verbose) { - ErrorReporter { + public record ErrorReporter( + Consumer stackTracePrinter, + Consumer messagePrinter, + boolean alwaysPrintStackTrace, + boolean printCommandOutput) implements ErrorLogger { + + public ErrorReporter { Objects.requireNonNull(stackTracePrinter); Objects.requireNonNull(messagePrinter); } - ErrorReporter(Consumer stackTracePrinter, Consumer messagePrinter) { - this(stackTracePrinter, messagePrinter, true); + public ErrorReporter(Consumer stackTracePrinter, Consumer messagePrinter) { + this(stackTracePrinter, messagePrinter, true, false); } - void reportError(Throwable t) { + public void reportError(Throwable t) { var unfoldedExceptions = new ArrayList(); ExceptionBox.visitUnboxedExceptionsRecursively(t, unfoldedExceptions::add); @@ -267,7 +295,7 @@ public final class Main { var commandOutput = ((ExecutableAttributesWithCapturedOutput)result.execAttrs()).printableOutput(); var printableCommandLine = result.execAttrs().printableCommandLine(); - if (verbose) { + if (alwaysPrintStackTrace) { stackTracePrinter.accept(ex); } @@ -281,16 +309,18 @@ public final class Main { } messagePrinter.accept(I18N.format("message.error-header", msg)); - messagePrinter.accept(I18N.format("message.failed-command-output-header")); - try (var lines = new BufferedReader(new StringReader(commandOutput)).lines()) { - lines.forEach(messagePrinter); + if (printCommandOutput) { + messagePrinter.accept(I18N.format("message.failed-command-output-header")); + try (var lines = new BufferedReader(new StringReader(commandOutput)).lines()) { + lines.forEach(messagePrinter); + } } } private void printError(Throwable t, Optional advice) { var isSelfContained = isSelfContained(t); - if (!isSelfContained || verbose) { + if (!isSelfContained || alwaysPrintStackTrace) { stackTracePrinter.accept(t); } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/OptionValue.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/OptionValue.java index fcd33826b95..1e617b8a457 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/OptionValue.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/OptionValue.java @@ -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 @@ -81,7 +81,8 @@ public sealed interface OptionValue extends WithOptionIdentifier { } static final class Builder { - OptionValue create() { + + public OptionValue create() { if (conv != null) { return conv.create(Optional.ofNullable(defaultValue)); } else { @@ -92,7 +93,7 @@ public sealed interface OptionValue extends WithOptionIdentifier { } } - Builder defaultValue(T v) { + public Builder defaultValue(T v) { defaultValue = v; return this; } @@ -103,19 +104,19 @@ public sealed interface OptionValue extends WithOptionIdentifier { return this; } - Builder id(OptionIdentifier v) { + public Builder id(OptionIdentifier v) { id = v; conv = null; return this; } - Builder from(OptionValue base, Function conv) { + public Builder from(OptionValue base, Function conv) { id(null).spec(null); this.conv = new Conv<>(base, conv); return this; } - Builder to(Function conv) { + public Builder to(Function conv) { return OptionValue.build().from(create(), conv); } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/StandardOption.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/StandardOption.java index f193cff0dc0..1cfdf326110 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/StandardOption.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/cli/StandardOption.java @@ -69,6 +69,7 @@ import jdk.jpackage.internal.model.LauncherShortcutStartupDirectory; import jdk.jpackage.internal.util.RootedPath; import jdk.jpackage.internal.model.SelfContainedException; import jdk.jpackage.internal.util.SetBuilder; +import jdk.jpackage.internal.log.LogEnvironment; /** * jpackage command line options @@ -109,7 +110,15 @@ public final class StandardOption { static final OptionValue VERSION = auxilaryOption("version").create(); - public static final OptionValue VERBOSE = auxilaryOption("verbose").create(); + static final OptionValue VERBOSE = option("verbose", LogEnvironment.Builder.class) + .scope(StandardBundlingOperation.values()) + .inScope(NOT_BUILDING_APP_IMAGE) + .converterExceptionFactory(ERROR_WITH_VALUE_AND_OPTION_NAME) + .converterExceptionFormatString("error.parameter-invalid-value") + .converter(LogConfigParser::valueOf) + .defaultOptionalValue(LogConfigParser.defaultVerbose()) + .valuePattern("[<[-]category(,[-]category)*>]") + .create(); static final OptionValue TYPE = option("type", BundleType.class).addAliases("t") .scope(StandardBundlingOperation.values()).inScope(NOT_BUILDING_APP_IMAGE) @@ -715,9 +724,8 @@ public final class StandardOption { private static UnaryOperator> nativeBundling() { return scope -> { - return new SetBuilder() - .set(scope) - .remove(new SetBuilder().set(StandardBundlingOperation.values()).remove(CREATE_NATIVE).create()) + return SetBuilder.build(scope) + .remove(SetBuilder.build(StandardBundlingOperation.values()).remove(CREATE_NATIVE).create()) .create(); }; } diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/CommandLogger.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/CommandLogger.java new file mode 100644 index 00000000000..247019fc627 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/CommandLogger.java @@ -0,0 +1,130 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.io.BufferedReader; +import java.io.StringReader; +import java.util.Objects; +import java.util.Optional; +import java.util.function.Consumer; + +public interface CommandLogger extends Logger { + + void beforeCommandExecuted(boolean quiet, String cmdline); + + void afterCommandExecuted(boolean quiet, + String cmdline, Optional pid, Optional exitCode, String printableOutput); + + enum CommandLoggerTrait implements LoggerTrait { + PRINT_COMMAND_RESULT, + PRINT_QUIET_COMMANDS, + } + + static CommandLogger create(ConsoleLogger sink, boolean printQuietCommands, boolean printResult) { + var theSink = sink.addTimestampsToOut().out(); + return new Details.DefaultLogger( + theSink, + printQuietCommands ? theSink : Utils.DISCARDER, + printResult); + } + + static CommandLogger create(System.Logger sink) { + var consumer = Utils.toStringConsumer(sink, System.Logger.Level.DEBUG); + return new Details.DefaultLogger(consumer, consumer, true); + } + + static final class Details { + + private Details() { + } + + private record DefaultLogger( + Consumer sink, + Consumer quietCommandSink, + boolean printResult) implements CommandLogger { + + DefaultLogger { + Objects.requireNonNull(sink); + Objects.requireNonNull(quietCommandSink); + } + + @Override + public void beforeCommandExecuted(boolean quiet, String cmdline) { + + Objects.requireNonNull(cmdline); + + sink(quiet).accept(String.format("Running %s", cmdline)); + } + + @Override + public void afterCommandExecuted(boolean quiet, + String cmdline, Optional pid, Optional exitCode, String printableOutput) { + + Objects.requireNonNull(cmdline); + Objects.requireNonNull(pid); + Objects.requireNonNull(exitCode); + Objects.requireNonNull(printableOutput); + + if (!printResult) { + return; + } + + var theSink = sink(quiet); + + var sb = new StringBuilder(); + sb.append("Command"); + pid.ifPresent(p -> { + sb.append(" [PID: ").append(p).append("]"); + }); + sb.append(":").append(System.lineSeparator()).append(" ").append(cmdline); + theSink.accept(sb.toString()); + + if (!printableOutput.isEmpty()) { + sb.delete(0, sb.length()); + sb.append("Output:"); + try (var lines = new BufferedReader(new StringReader(printableOutput)).lines()) { + lines.forEach(line -> { + sb.append(System.lineSeparator()).append(" ").append(line); + }); + } + theSink.accept(sb.toString()); + } + + exitCode.ifPresentOrElse(v -> { + theSink.accept("Returned: " + v); + }, () -> { + theSink.accept("Aborted: timed-out"); + }); + } + + private Consumer sink(boolean quietCommand) { + return quietCommand ? quietCommandSink : sink; + } + + } + } + + static final CommandLogger DISCARDING_LOGGER = Utils.discardingLogger(CommandLogger.class); +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ConsoleLogger.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ConsoleLogger.java new file mode 100644 index 00000000000..fbb5142d361 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ConsoleLogger.java @@ -0,0 +1,113 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.io.PrintWriter; +import java.time.Clock; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.util.Objects; +import java.util.function.Consumer; + +public record ConsoleLogger(Consumer out, Consumer err, Clock timestampClock) { + + public ConsoleLogger { + Objects.requireNonNull(out); + Objects.requireNonNull(err); + Objects.requireNonNull(timestampClock); + } + + public ConsoleLogger(Consumer out, Consumer err) { + this(out, err, Clock.systemDefaultZone()); + } + + ConsoleLogger discardOut() { + return new ConsoleLogger(Utils.DISCARDER, err, timestampClock); + } + + ConsoleLogger discardErr() { + return new ConsoleLogger(out, Utils.DISCARDER, timestampClock); + } + + ConsoleLogger addTimestampsToOut() { + return new ConsoleLogger(addTimestamps(out, timestampClock), err, timestampClock); + } + + ConsoleLogger addTimestampsToErr() { + return new ConsoleLogger(out, addTimestamps(err, timestampClock), timestampClock); + } + + record ConsoleLoggerOutSink(PrintWriter sink) implements LoggerTrait { + + ConsoleLoggerOutSink { + Objects.requireNonNull(sink); + } + } + + record ConsoleLoggerErrSink(PrintWriter sink) implements LoggerTrait { + + ConsoleLoggerErrSink { + Objects.requireNonNull(sink); + } + } + + record ConsoleLoggerTimestampClock(Clock clock) implements LoggerTrait { + + ConsoleLoggerTimestampClock { + Objects.requireNonNull(clock); + } + } + + private static Consumer addTimestamps(Consumer sink, Clock clock) { + Objects.requireNonNull(sink); + Objects.requireNonNull(clock); + if (sink == Utils.DISCARDER || sink instanceof AddingTimestampsConsumer) { + return sink; + } else { + return new AddingTimestampsConsumer(sink, clock); + } + } + + private record AddingTimestampsConsumer(Consumer sink, Clock clock) implements Consumer { + + AddingTimestampsConsumer { + Objects.requireNonNull(sink); + Objects.requireNonNull(clock); + } + + @Override + public void accept(String str) { + var sb = new StringBuilder(); + var time = LocalTime.now(clock); + sb.append('[').append(time.format(TIMESTAMP_FORMATTER)).append("] "); + sb.append(str); + str = sb.toString(); + sink.accept(str); + } + + private static final DateTimeFormatter TIMESTAMP_FORMATTER = DateTimeFormatter.ofPattern("HH:mm:ss.SSS"); + } + +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ErrorLogger.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ErrorLogger.java new file mode 100644 index 00000000000..01612b1732b --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ErrorLogger.java @@ -0,0 +1,78 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.Objects; +import jdk.jpackage.internal.cli.Main.ErrorReporter; + +public interface ErrorLogger extends Logger { + + void reportError(Throwable t); + + enum ErrorLoggerTrait implements LoggerTrait { + PRINT_STACK_TRACE_ALWAYS, + PRINT_FAILED_COMMAND_OUTPUT, + } + + static ErrorLogger create(ConsoleLogger sink, boolean alwaysPrintStackTrace, boolean printCommandOutput) { + Objects.requireNonNull(sink); + return new ErrorReporter( + t -> { + var buf = new StringWriter(); + t.printStackTrace(new PrintWriter(buf)); + Utils.writeWithoutTrailingLineSeparator(buf, sink.err()); + }, + sink.err(), + alwaysPrintStackTrace, + printCommandOutput); + } + + static ErrorLogger create(System.Logger sink) { + Objects.requireNonNull(sink); + return new ErrorLogger() { + + @Override + public void reportError(Throwable t) { + var buf = new StringWriter(); + + new ErrorReporter(t2 -> { + t2.printStackTrace(new PrintWriter(buf)); + }, str -> { + buf.write(str); + buf.write(System.lineSeparator()); + }, true, true).reportError(t); + + Utils.writeWithoutTrailingLineSeparator(buf, str -> { + sink.log(System.Logger.Level.ERROR, str); + }); + } + + }; + } + + static final ErrorLogger DISCARDING_LOGGER = Utils.discardingLogger(ErrorLogger.class); +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/I18N.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/I18N.java new file mode 100644 index 00000000000..8699daac81c --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/I18N.java @@ -0,0 +1,59 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.util.List; +import java.util.Map; +import jdk.internal.util.OperatingSystem; +import jdk.jpackage.internal.util.MultiResourceBundle; +import jdk.jpackage.internal.util.StringBundle; + +final class I18N { + + private I18N() { + } + + static String getString(String key) { + return BUNDLE.getString(key); + } + + static String format(String key, Object ... args) { + return BUNDLE.format(key, args); + } + + private static final StringBundle BUNDLE; + + static { + var prefix = "jdk.jpackage.internal.resources."; + BUNDLE = StringBundle.fromResourceBundle(MultiResourceBundle.create( + prefix + "MainResources", + Map.of( + OperatingSystem.LINUX, List.of(prefix + "LinuxResources"), + OperatingSystem.MACOS, List.of(prefix + "MacResources"), + OperatingSystem.WINDOWS, List.of(prefix + "WinResources") + ) + )); + } +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/LogEnvironment.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/LogEnvironment.java new file mode 100644 index 00000000000..6a8ba0d76a3 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/LogEnvironment.java @@ -0,0 +1,309 @@ +/* + * 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 jdk.jpackage.internal.log; + +import static java.util.stream.Collectors.toMap; + +import java.io.PrintWriter; +import java.time.Clock; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.stream.Stream; +import jdk.jpackage.internal.cli.Options; +import jdk.jpackage.internal.log.CommandLogger.CommandLoggerTrait; +import jdk.jpackage.internal.log.ConsoleLogger.ConsoleLoggerErrSink; +import jdk.jpackage.internal.log.ConsoleLogger.ConsoleLoggerOutSink; +import jdk.jpackage.internal.log.ConsoleLogger.ConsoleLoggerTimestampClock; +import jdk.jpackage.internal.log.ErrorLogger.ErrorLoggerTrait; +import jdk.jpackage.internal.log.ProgressLogger.ProgressLoggerTrait; +import jdk.jpackage.internal.log.SummaryLogger.SummaryLoggerTrait; + +public final class LogEnvironment { + + public enum LogSink { + CONSOLE, + SYSTEM_LOGGER + } + + public static Builder build() { + return new Builder(); + } + + public static final class Builder { + + public Options create() { + + var consoleTraits = new HashSet(); + Optional.ofNullable(out).map(ConsoleLoggerOutSink::new).ifPresent(consoleTraits::add); + Optional.ofNullable(err).map(ConsoleLoggerErrSink::new).ifPresent(consoleTraits::add); + Optional.ofNullable(consoleTimestampClock).map(ConsoleLoggerTimestampClock::new).ifPresent(consoleTraits::add); + + var loggerTraits = enabledLoggers.entrySet().stream().collect(toMap(Map.Entry::getKey, e -> { + var enabledSinks = e.getValue(); + + var traits = new ArrayList(booleanTraits); + + if (enabledSinks.contains(LogSink.SYSTEM_LOGGER)) { + traits.add(new SystemLoggerTrait( + Optional.ofNullable(systemLoggerFactory).orElse(System::getLogger).apply("jdk.jpackage"))); + } + + if (enabledSinks.contains(LogSink.CONSOLE)) { + traits.addAll(consoleTraits); + } + + return traits; + })); + + return LogEnvironment.create(loggerTraits); + } + + public Builder out(PrintWriter v) { + out = v; + return this; + } + + public Builder err(PrintWriter v) { + err = v; + return this; + } + + public Builder printErrorStackTraceInConsole(boolean v) { + return setBooleanTrait(v, ErrorLoggerTrait.PRINT_STACK_TRACE_ALWAYS); + } + + public Builder printCommandOutputInConsole(boolean v) { + return setBooleanTrait(v, CommandLoggerTrait.PRINT_COMMAND_RESULT); + } + + public Builder printFailedCommandOutputInConsole(boolean v) { + return setBooleanTrait(v, ErrorLoggerTrait.PRINT_FAILED_COMMAND_OUTPUT); + } + + public Builder printQuietCommands(boolean v) { + return setBooleanTrait(v, CommandLoggerTrait.PRINT_QUIET_COMMANDS); + } + + public Builder printProgressInConsole(boolean v) { + return setBooleanTrait(v, ProgressLoggerTrait.PRINT_INFO); + } + + public Builder printProgressWarningsInConsole(boolean v) { + return setBooleanTrait(v, ProgressLoggerTrait.PRINT_WARNINGS); + } + + public Builder printSummaryInConsole(boolean v) { + return setBooleanTrait(v, SummaryLoggerTrait.PRINT_INFO); + } + + public Builder printSummaryWarningsInConsole(boolean v) { + return setBooleanTrait(v, SummaryLoggerTrait.PRINT_WARNINGS); + } + + public Builder consoleTimestampClock(Clock v) { + consoleTimestampClock = v; + return this; + } + + public Builder systemLoggerFactory(Function v) { + systemLoggerFactory = v; + return this; + } + + public Builder enable(LoggerRole role, LogSink... sinks) { + Objects.requireNonNull(role); + if (sinks.length == 0) { + enabledLoggers.remove(role); + } else { + enabledLoggers.computeIfAbsent(role, _ -> { + return new HashSet<>(); + }).addAll(Set.of(sinks)); + } + return this; + } + + public Builder mutate(Consumer mutator) { + mutator.accept(this); + return this; + } + + private Builder setBooleanTrait(boolean set, LoggerTrait trait) { + Objects.requireNonNull(trait); + if (set) { + booleanTraits.add(trait); + } else { + booleanTraits.remove(trait); + } + return this; + } + + private PrintWriter out; + private PrintWriter err; + private Clock consoleTimestampClock; + private Function systemLoggerFactory; + private final Set booleanTraits = new HashSet<>(); + private final Map> enabledLoggers = new HashMap<>(); + } + + static Options create(Map> loggerTraits) { + return Options.of(loggerTraits.entrySet().stream().collect(toMap(e -> { + return e.getKey().logger(); + }, e -> { + return e.getKey().createLogger(e.getValue()); + }))); + } + + static CommandLogger createCommandLogger(Collection traits) { + return create( + CommandLogger.class, + traits, + sink -> { + var printQuietCommands = traits.contains(CommandLoggerTrait.PRINT_QUIET_COMMANDS); + var printResult = traits.contains(CommandLoggerTrait.PRINT_COMMAND_RESULT); + return CommandLogger.create(sink, printQuietCommands, printResult); + }, + CommandLogger::create).orElse(CommandLogger.DISCARDING_LOGGER); + } + + static ProgressLogger createProgressLogger(Collection traits) { + return create( + ProgressLogger.class, + traits, + sink -> { + var printInfo = traits.contains(ProgressLoggerTrait.PRINT_INFO); + var printWarnings = traits.contains(ProgressLoggerTrait.PRINT_WARNINGS); + return ProgressLogger.create(sink, printInfo, printWarnings); + }, + ProgressLogger::create).orElse(ProgressLogger.DISCARDING_LOGGER); + } + + static ErrorLogger createErrorLogger(Collection traits) { + return create( + ErrorLogger.class, + traits, + sink -> { + var printStackTrace = traits.contains(ErrorLoggerTrait.PRINT_STACK_TRACE_ALWAYS); + var printCommandOutput = traits.contains(ErrorLoggerTrait.PRINT_FAILED_COMMAND_OUTPUT); + return ErrorLogger.create(sink, printStackTrace, printCommandOutput); + }, + ErrorLogger::create).orElse(ErrorLogger.DISCARDING_LOGGER); + } + + static TraceLogger createTraceLogger(Collection traits) { + return create( + TraceLogger.class, + traits, + TraceLogger::create, + TraceLogger::create).orElse(TraceLogger.DISCARDING_LOGGER); + } + + static ResourceLogger createResourceLogger(Collection traits) { + return create( + ResourceLogger.class, + traits, + ResourceLogger::create, + ResourceLogger::create).orElse(ResourceLogger.DISCARDING_LOGGER); + } + + static SummaryLogger createSummaryLogger(Collection traits) { + return create(SummaryLogger.class, + traits, + sink -> { + var printInfo = traits.contains(SummaryLoggerTrait.PRINT_INFO); + var printWarnings = traits.contains(SummaryLoggerTrait.PRINT_WARNINGS); + return SummaryLogger.create(sink, printInfo, printWarnings); + }, + SummaryLogger::create).orElse(SummaryLogger.DISCARDING_LOGGER); + } + + static Optional createConsoleLoggerSink(Collection traits) { + + var out = filterTraitsOfType(ConsoleLoggerOutSink.class, traits.stream()) + .map(ConsoleLoggerOutSink::sink).findFirst(); + + var err = filterTraitsOfType(ConsoleLoggerErrSink.class, traits.stream()) + .map(ConsoleLoggerErrSink::sink).findFirst(); + + var timestampClock = filterTraitsOfType(ConsoleLoggerTimestampClock.class, traits.stream()) + .map(ConsoleLoggerTimestampClock::clock) + .findFirst().orElseGet(new ConsoleLogger(Utils.DISCARDER, Utils.DISCARDER)::timestampClock); + + if (out.isEmpty() && err.isEmpty()) { + return Optional.empty(); + } else { + return Optional.of(new ConsoleLogger(toStringConsumer(out), toStringConsumer(err), timestampClock)); + } + } + + static Optional createSystemLoggerSink(Collection traits) { + return filterTraitsOfType(SystemLoggerTrait.class, traits.stream()).map(SystemLoggerTrait::logger).findFirst(); + } + + private static Optional create( + Class loggerType, + Collection traits, + Function fromConsoleSinkCtor, + Function fromSystemLoggerSinkCtor) { + + Objects.requireNonNull(traits); + Objects.requireNonNull(fromSystemLoggerSinkCtor); + Objects.requireNonNull(fromConsoleSinkCtor); + + var consoleLogger = createConsoleLoggerSink(traits).map(fromConsoleSinkCtor); + var systemLogger = createSystemLoggerSink(traits).map(fromSystemLoggerSinkCtor); + + if (consoleLogger.isEmpty() && systemLogger.isEmpty()) { + return Optional.empty(); + } else { + return Optional.of(Utils.teeLogger(loggerType, Stream.of( + consoleLogger.stream(), + systemLogger.stream() + ).flatMap(x -> x).toList())); + } + } + + private static Stream filterTraitsOfType( + Class type, Stream stream) { + Objects.requireNonNull(type); + return stream.filter(type::isInstance).map(type::cast); + } + + private static Consumer toStringConsumer(Optional pw) { + return pw.>map(v -> { + return v::println; + }).orElse(Utils.DISCARDER); + } + + private LogEnvironment() { + } +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/Logger.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/Logger.java new file mode 100644 index 00000000000..21c9ed77452 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/Logger.java @@ -0,0 +1,32 @@ +/* + * 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 jdk.jpackage.internal.log; + +public interface Logger { + + default boolean enabled() { + return true; + } +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/LoggerRole.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/LoggerRole.java new file mode 100644 index 00000000000..9f96a7ebc6c --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/LoggerRole.java @@ -0,0 +1,63 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.util.Collection; +import java.util.Objects; +import java.util.function.Function; +import jdk.jpackage.internal.cli.OptionValue; + +public enum LoggerRole { + + COMMAND_LOGGER(StandardLogger.COMMAND_LOGGER, LogEnvironment::createCommandLogger), + + ERROR_LOGGER(StandardLogger.ERROR_LOGGER, LogEnvironment::createErrorLogger), + + PROGRESS_LOGGER(StandardLogger.PROGRESS_LOGGER, LogEnvironment::createProgressLogger), + + RESOURCE_LOGGER(StandardLogger.RESOURCE_LOGGER, LogEnvironment::createResourceLogger), + + SUMMARY_LOGGER(StandardLogger.SUMMARY_LOGGER, LogEnvironment::createSummaryLogger), + + TRACE_LOGGER(StandardLogger.TRACE_LOGGER, LogEnvironment::createTraceLogger), + + ; + + LoggerRole(OptionValue logger, Function, ? extends Logger> loggerCtor) { + this.logger = Objects.requireNonNull(logger); + this.loggerCtor = Objects.requireNonNull(loggerCtor); + } + + public OptionValue logger() { + return logger; + } + + Logger createLogger(Collection traits) { + return loggerCtor.apply(traits); + } + + private final OptionValue logger; + private final Function, ? extends Logger> loggerCtor; +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/LoggerTrait.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/LoggerTrait.java new file mode 100644 index 00000000000..8d8e30d6488 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/LoggerTrait.java @@ -0,0 +1,28 @@ +/* + * 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 jdk.jpackage.internal.log; + +interface LoggerTrait { +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ProgressLogger.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ProgressLogger.java new file mode 100644 index 00000000000..540dfa99cca --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ProgressLogger.java @@ -0,0 +1,126 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.util.Objects; + +public interface ProgressLogger extends Logger { + + void progress(String localizedMsg); + + void progressWarning(Exception cause); + + void progressWarning(Exception cause, String localizedMsg); + + void progressWarning(String localizedMsg); + + enum ProgressLoggerTrait implements LoggerTrait { + PRINT_INFO, + PRINT_WARNINGS, + } + + static ProgressLogger create(ConsoleLogger sink, boolean printInfo, boolean printWarnings) { + if (!printInfo) { + sink = sink.discardOut(); + } + if (!printWarnings) { + sink = sink.discardErr(); + } + return new Details.Console(sink.addTimestampsToOut()); + } + + static ProgressLogger create(System.Logger sink) { + return new Details.SystemLogger(sink); + } + + static final class Details { + + private Details() { + } + + private record Console(ConsoleLogger sink) implements ProgressLogger { + + Console { + Objects.requireNonNull(sink); + } + + @Override + public void progress(String localizedMsg) { + Objects.requireNonNull(localizedMsg); + sink.out().accept(localizedMsg); + } + + @Override + public void progressWarning(Exception cause) { + Objects.requireNonNull(cause); + sink.err().accept(I18N.format("progress.warning-header", Utils.toString(cause))); + } + + @Override + public void progressWarning(Exception cause, String localizedMsg) { + Objects.requireNonNull(cause); + Objects.requireNonNull(localizedMsg); + sink.err().accept(I18N.format("progress.warning-header2", localizedMsg, Utils.toString(cause))); + } + + @Override + public void progressWarning(String localizedMsg) { + Objects.requireNonNull(localizedMsg); + sink.err().accept(I18N.format("progress.warning-header", localizedMsg)); + } + + } + + private record SystemLogger(System.Logger sink) implements ProgressLogger { + + SystemLogger { + Objects.requireNonNull(sink); + } + + @Override + public void progress(String localizedMsg) { + sink.log(System.Logger.Level.INFO, localizedMsg); + } + + @Override + public void progressWarning(Exception cause) { + sink.log(System.Logger.Level.WARNING, "Ignore error", cause); + } + + @Override + public void progressWarning(Exception cause, String localizedMsg) { + sink.log(System.Logger.Level.WARNING, localizedMsg, cause); + } + + @Override + public void progressWarning(String localizedMsg) { + sink.log(System.Logger.Level.WARNING, localizedMsg); + } + + } + } + + static final ProgressLogger DISCARDING_LOGGER = Utils.discardingLogger(ProgressLogger.class); +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ResourceLogger.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ResourceLogger.java new file mode 100644 index 00000000000..564b23d5f1c --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/ResourceLogger.java @@ -0,0 +1,63 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.util.Objects; +import java.util.function.Consumer; + +public interface ResourceLogger extends Logger { + + void useResource(String localizedMsg); + + static ResourceLogger create(ConsoleLogger sink) { + return new Details.DefaultLogger(sink.addTimestampsToOut().out()); + } + + static ResourceLogger create(System.Logger sink) { + return new Details.DefaultLogger(Utils.toStringConsumer(sink, System.Logger.Level.INFO)); + } + + static final class Details { + + private Details() { + } + + private record DefaultLogger(Consumer sink) implements ResourceLogger { + + DefaultLogger { + Objects.requireNonNull(sink); + } + + @Override + public void useResource(String localizedMsg) { + Objects.requireNonNull(localizedMsg); + sink.accept(localizedMsg); + } + + } + } + + static final ResourceLogger DISCARDING_LOGGER = Utils.discardingLogger(ResourceLogger.class); +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/StandardLogger.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/StandardLogger.java new file mode 100644 index 00000000000..cabdef963c3 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/StandardLogger.java @@ -0,0 +1,52 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.util.Objects; +import jdk.jpackage.internal.cli.OptionValue; + +public final class StandardLogger { + + private StandardLogger() { + } + + public static final OptionValue COMMAND_LOGGER = create(CommandLogger.DISCARDING_LOGGER); + + public static final OptionValue ERROR_LOGGER = create(ErrorLogger.DISCARDING_LOGGER); + + public static final OptionValue PROGRESS_LOGGER = create(ProgressLogger.DISCARDING_LOGGER); + + public static final OptionValue RESOURCE_LOGGER = create(ResourceLogger.DISCARDING_LOGGER); + + public static final OptionValue SUMMARY_LOGGER = create(SummaryLogger.DISCARDING_LOGGER); + + public static final OptionValue TRACE_LOGGER = create(TraceLogger.DISCARDING_LOGGER); + + private static OptionValue create(T defaultValue) { + Objects.requireNonNull(defaultValue); + return OptionValue.build().defaultValue(defaultValue).create(); + } + +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/SummaryLogger.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/SummaryLogger.java new file mode 100644 index 00000000000..d3d4d9fc7c0 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/SummaryLogger.java @@ -0,0 +1,77 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.util.Objects; +import java.util.function.Consumer; +import jdk.jpackage.internal.summary.Summary; + +public interface SummaryLogger extends Logger { + + void summary(Summary summary); + + enum SummaryLoggerTrait implements LoggerTrait { + PRINT_INFO, + PRINT_WARNINGS, + } + + static SummaryLogger create(ConsoleLogger sink, boolean printInfo, boolean printWarnings) { + if (!printInfo) { + sink = sink.discardOut(); + } + if (!printWarnings) { + sink = sink.discardErr(); + } + return new Details.DefaultLogger(sink.out(), sink.err()); + } + + static SummaryLogger create(System.Logger sink) { + return new Details.DefaultLogger( + Utils.toStringConsumer(sink, System.Logger.Level.INFO), + Utils.toStringConsumer(sink, System.Logger.Level.WARNING)); + } + + static final class Details { + + private Details() { + } + + private record DefaultLogger(Consumer sinkInfo, Consumer sinkWarnings) implements SummaryLogger { + + DefaultLogger { + Objects.requireNonNull(sinkInfo); + Objects.requireNonNull(sinkWarnings); + } + + @Override + public void summary(Summary summary) { + summary.print(sinkInfo, sinkWarnings); + } + + } + } + + static final SummaryLogger DISCARDING_LOGGER = Utils.discardingLogger(SummaryLogger.class); +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/SystemLoggerTrait.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/SystemLoggerTrait.java new file mode 100644 index 00000000000..3aa875b2321 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/SystemLoggerTrait.java @@ -0,0 +1,34 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.util.Objects; + +record SystemLoggerTrait(System.Logger logger) implements LoggerTrait { + + SystemLoggerTrait { + Objects.requireNonNull(logger); + } +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/TraceLogger.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/TraceLogger.java new file mode 100644 index 00000000000..a33dfde726d --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/TraceLogger.java @@ -0,0 +1,128 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.Objects; + +public interface TraceLogger extends Logger { + + void trace(String msg); + + default void trace(String format, Object... args) { + if (enabled()) { + trace(String.format(format, args)); + } + } + + void trace(Throwable t, String msg); + + default void trace(Throwable t, String format, Object... args) { + if (enabled()) { + trace(t, String.format(format, args)); + } + } + + void trace(Throwable t); + + static TraceLogger create(ConsoleLogger sink) { + return new Details.Console(sink.addTimestampsToOut().addTimestampsToErr()); + } + + static TraceLogger create(System.Logger sink) { + return new Details.SystemLogger(sink); + } + + static final class Details { + + private Details() { + } + + private record Console(ConsoleLogger sink) implements TraceLogger { + + Console { + Objects.requireNonNull(sink); + } + + @Override + public void trace(String msg) { + Objects.requireNonNull(msg); + sink.out().accept(MSG_PREFIX + msg); + } + + @Override + public void trace(Throwable t, String msg) { + Objects.requireNonNull(t); + Objects.requireNonNull(msg); + + var buf = new StringWriter(); + buf.write(MSG_PREFIX); + buf.write(msg); + buf.write(": "); + t.printStackTrace(new PrintWriter(buf)); + + Utils.writeWithoutTrailingLineSeparator(buf, sink.err()); + } + + @Override + public void trace(Throwable t) { + Objects.requireNonNull(t); + + var buf = new StringWriter(); + buf.write(MSG_PREFIX); + t.printStackTrace(new PrintWriter(buf)); + + Utils.writeWithoutTrailingLineSeparator(buf, sink.err()); + } + + private static final String MSG_PREFIX = "TRACE: "; + } + + private record SystemLogger(System.Logger sink) implements TraceLogger { + + SystemLogger { + Objects.requireNonNull(sink); + } + + @Override + public void trace(String msg) { + sink.log(System.Logger.Level.TRACE, msg); + } + + @Override + public void trace(Throwable t, String msg) { + sink.log(System.Logger.Level.ERROR, msg, t); + } + + @Override + public void trace(Throwable t) { + sink.log(System.Logger.Level.ERROR, "Ignored error", t); + } + } + } + + static final TraceLogger DISCARDING_LOGGER = Utils.discardingLogger(TraceLogger.class); +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/Utils.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/Utils.java new file mode 100644 index 00000000000..1d5bd037ba3 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/log/Utils.java @@ -0,0 +1,163 @@ +/* + * 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 jdk.jpackage.internal.log; + +import java.io.StringWriter; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import jdk.jpackage.internal.model.SelfContainedException; +import jdk.jpackage.internal.util.function.ExceptionBox; + +final class Utils { + + private Utils() { + } + + @SuppressWarnings("unchecked") + static T discardingLogger(Class type) { + return (T)Proxy.newProxyInstance(Utils.class.getClassLoader(), new Class[]{type}, new LoggerHandler<>(type, false) { + + @Override + protected void invokeLoggerMethod(Object proxy, Method method, Object[] args) { + throw ExceptionBox.reachedUnreachable(); + } + + }); + } + + @SuppressWarnings("unchecked") + static T teeLogger(Class type, List loggers) { + + var enabledLoggers = loggers.stream().filter(Logger::enabled).toList(); + if (enabledLoggers.isEmpty()) { + return discardingLogger(type); + } else if (enabledLoggers.size() == 1) { + return enabledLoggers.getFirst(); + } + + return (T)Proxy.newProxyInstance(Utils.class.getClassLoader(), new Class[]{type}, new LoggerHandler<>(type, true) { + + @Override + protected void invokeLoggerMethod(Object proxy, Method method, Object[] args) throws Throwable { + for (var logger : enabledLoggers) { + method.invoke(logger, args); + } + } + + }); + } + + static Consumer toStringConsumer(System.Logger logger, System.Logger.Level level) { + Objects.requireNonNull(logger); + Objects.requireNonNull(level); + return str -> { + logger.log(level, str); + }; + } + + static boolean isSelfContained(Throwable t) { + return t.getClass().getAnnotation(SelfContainedException.class) != null; + } + + static String toString(Throwable t) { + if (isSelfContained(t)) { + return t.getMessage(); + } else { + return t.toString(); + } + } + + static void writeWithoutTrailingLineSeparator(StringWriter writer, Consumer sink) { + var buf = writer.getBuffer(); + var lineSeparator = System.lineSeparator(); + if (buf.length() >= lineSeparator.length()) { + var tailChars = new char[lineSeparator.length()]; + buf.getChars(buf.length() - tailChars.length, buf.length(), tailChars, 0); + if (Arrays.equals(tailChars, lineSeparator.toCharArray())) { + buf.setLength(buf.length() - tailChars.length); + } + } + sink.accept(buf.toString()); + } + + private abstract static class LoggerHandler implements InvocationHandler { + + protected LoggerHandler(Class loggerType, boolean loggerEnabled) { + Objects.requireNonNull(loggerType); + if (!loggerType.isInterface() ) { + throw new IllegalArgumentException(String.format("%s is not an interface", loggerType)); + } + + loggerMethods = unfoldInterface(loggerType).flatMap(interfaceType -> { + return Stream.of(interfaceType.getMethods()); + }).collect(Collectors.toSet()); + + this.loggerEnabled = loggerEnabled; + } + + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + if (loggerMethods.contains(method)) { + var returnType = method.getReturnType(); + + if (method.getName().equals("enabled") && returnType.equals(boolean.class) && method.getParameterCount() == 0) { + return loggerEnabled; + } else if (returnType.equals(void.class)) { + if (loggerEnabled) { + invokeLoggerMethod(proxy, method, args); + } + return null; + } else { + throw new AssertionError(String.format("Don't know how to handle %s", method)); + } + } else { + // Presumably this is java.lang.Objects's method. Redirect it to this instance. + return method.invoke(this, args); + } + } + + protected abstract void invokeLoggerMethod(Object proxy, Method method, Object[] args) throws Throwable; + + private final Set loggerMethods; + private final boolean loggerEnabled; + } + + private static Stream> unfoldInterface(Class interfaceType) { + return Stream.concat( + Stream.of(interfaceType), + Stream.of(interfaceType.getInterfaces() + ).flatMap(Utils::unfoldInterface)); + } + + static final Consumer DISCARDER = _ -> {}; +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/StandardPackageType.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/StandardPackageType.java index 6fadc748ecc..4cf6ead48d2 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/StandardPackageType.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/model/StandardPackageType.java @@ -43,9 +43,11 @@ public enum StandardPackageType implements PackageType { } /** - * Gets file extension of this package type. - * E.g.: .msi, .dmg, .deb. - * @return file extension of this package type + * Gets file extension corresponding to the package type. E.g.: + * .msi, .dmg, .deb. + * + * @return file extension corresponding to the package type; the value starts + * with the period (.) character. */ public String suffix() { return suffix; diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties index 7f570e71330..90f4a579bfe 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties @@ -388,7 +388,34 @@ help.option.vendor=\ \ Vendor of the application help.option.verbose=\ -\ Enables verbose output +\ Configures verbose output. Where "category" is one of\n\ +\ "all"\n\ +\ "console"\n\ +\ "log"\n\ +\ "errors"\n\ +\ "progress"\n\ +\ "resources"\n\ +\ "summary"\n\ +\ "tools"\n\ +\ "trace"\n\ +\ "warnings"\n\ +\n\ +\ Suppress all console output, enable logging via System.Logger API:\n\ +\ --verbose log\n\ +\ Enable all message categories in the console:\n\ +\ --verbose console\n\ +\ Enable all message categories, but "trace" and "tools" in the console:\n\ +\ --verbose console,-trace,-tools\n\ +\ Enable "trace" and "tools" message categories in the console:\n\ +\ --verbose trace,tools\n\ +\ Enable "trace" and "tools" message categories in the console and\n\ +\ enable logging via System.Logger API:\n\ +\ --verbose log,trace,tools\n\ +\n\ +\ If the option is specified without the value, it is equivalent to\n\ +\ --verbose console,-trace\n\ +\ If the option is not specified it is equivalent to\n\ +\ --verbose errors,warnings\n\ help.option.version=\ \ Print the product version to the output stream and exit. diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties index 9dfd13d60bb..931f0622584 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties @@ -37,6 +37,16 @@ bundle-type.linux-app=Linux Application Image bundle-type.linux-deb=Linux DEB Package bundle-type.linux-rpm=Linux RPM Package +summary.property.operation=Operation +summary.property.operation.format=Create {0} +summary.property.output-bundle=Output bundle +summary.property.version=Version +summary.warning=WARNING: {0} +summary.multi-line-warning=WARNING: {0}: + +summary.value.disabled=Disabled +summary.value.enabled=Enabled + resource.post-app-image-script=script to run after application image is populated message.using-default-resource=Using default package resource {0} {1} (add {2} to the resource-dir to customize). @@ -59,6 +69,9 @@ message.error-header=Error: {0} message.advice-header=Advice to fix: {0} message.failed-command-output-header=Command output: +progress.warning-header=WARNING: {0} +progress.warning-header2=WARNING: {0}: {1} + error.command-failed-unexpected-output=Unexpected output from executing the command {0} error.command-failed-unexpected-exit-code=Unexpected exit code {0} from executing the command {1} error.command-failed-timed-out=Timed-out command {0} @@ -91,6 +104,7 @@ error.parameter-not-mac-bundle=The value "{0}" provided for parameter {1} is not error.parameter-not-mac-bundle-identifier=The value "{0}" provided for parameter {1} is not a valid macOS bundle identifier. error.parameter-not-mac-bundle-identifier.advice=Bundle identifier must be a non-empty string containing only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-), and periods (.) error.path-parameter-ioexception=I/O error accessing path value "{0}" of parameter {1} +error.parameter-invalid-value=Invalid value "{0}" provided for parameter {1} error.parameter-add-launcher-malformed=The value "{0}" provided for parameter {1} does not match the pattern = error.parameter-add-launcher-not-file=The value of path to a property file "{0}" provided for additional launcher "{1}" is not a valid file path error.properties-parameter-not-path=The value "{0}" provided for property "{1}" in "{2}" file is not a valid path @@ -113,8 +127,8 @@ error.tool-not-found.advice=Please install "{0}" error.tool-old-version=Can not find "{0}" {1} or newer error.tool-old-version.advice=Please install "{0}" {1} or newer -warning.tempdir.cleanup-failed=Warning: Failed to clean-up temporary directory {0} -warning.tempdir.cleanup-file-failed=Warning: Failed to delete "{0}" file in the temporary directory +warning.tempdir.cleanup-failed=Failed to clean-up temporary directory {0} +warning.tempdir.cleanup-file-failed=Failed to delete "{0}" file in the temporary directory error.output-bundle-cannot-be-overwritten=Output package file "{0}" exists and can not be removed. diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/I18N.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/I18N.java new file mode 100644 index 00000000000..768e32b44b7 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/I18N.java @@ -0,0 +1,59 @@ +/* + * 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 jdk.jpackage.internal.summary; + +import java.util.List; +import java.util.Map; +import jdk.internal.util.OperatingSystem; +import jdk.jpackage.internal.util.MultiResourceBundle; +import jdk.jpackage.internal.util.StringBundle; + +final class I18N { + + private I18N() { + } + + static String getString(String key) { + return BUNDLE.getString(key); + } + + static String format(String key, Object ... args) { + return BUNDLE.format(key, args); + } + + private static final StringBundle BUNDLE; + + static { + var prefix = "jdk.jpackage.internal.resources."; + BUNDLE = StringBundle.fromResourceBundle(MultiResourceBundle.create( + prefix + "MainResources", + Map.of( + OperatingSystem.LINUX, List.of(prefix + "LinuxResources"), + OperatingSystem.MACOS, List.of(prefix + "MacResources"), + OperatingSystem.WINDOWS, List.of(prefix + "WinResources") + ) + )); + } +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/Property.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/Property.java new file mode 100644 index 00000000000..e747f86cd42 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/Property.java @@ -0,0 +1,33 @@ +/* + * 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 jdk.jpackage.internal.summary; + +/** + * Property in summary. + */ +public non-sealed interface Property extends SummaryItem { + + String formatLabel(); +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/StandardProperty.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/StandardProperty.java new file mode 100644 index 00000000000..6c28d127be8 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/StandardProperty.java @@ -0,0 +1,92 @@ +/* + * 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 jdk.jpackage.internal.summary; + +import java.util.Objects; +import java.util.Optional; + +/** + * Property for summary. + */ +public enum StandardProperty implements Property { + + // + // Keep items in the order they should be printed in the summary. + // + + OPERATION("summary.property.operation", "summary.property.operation.format"), + + MAC_SIGN_APP_IMAGE_OPERATION("summary.property.operation", "summary.property.mac-sign-app-image.format"), + + OUTPUT_BUNDLE("summary.property.output-bundle"), + + LINUX_PACKAGE_NAME("summary.property.linux-package-name"), + + WIN_MSI_PRODUCT_CODE("summary.property.win-product-code"), + + WIN_MSI_UPGRADE_CODE("summary.property.win-upgrade-code"), + + MAC_BUNDLE_IDENTIFIER("summary.property.mac-bundle-identifier"), + + MAC_BUNDLE_NAME("summary.property.mac-bundle-name"), + + VERSION("summary.property.version"), + + WIN_WIX_VERSION("summary.property.win-wix-version"), + + LINUX_DISABLE_REQUIRED_PACKAGES_SEARCH("summary.property.linux-required-packages-search", "summary.value.disabled"), + + ; + + StandardProperty(String label, Optional valueFormat) { + this.label = Objects.requireNonNull(label); + this.valueFormat = Objects.requireNonNull(valueFormat); + } + + StandardProperty(String label, String valueFormatter) { + this(label, Optional.of(valueFormatter)); + } + + StandardProperty(String label) { + this(label, Optional.empty()); + } + + String label() { + return label; + } + + @Override + public Optional valueFormat() { + return valueFormat; + } + + @Override + public String formatLabel() { + return I18N.getString(label); + } + + private final String label; + private final Optional valueFormat; +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/StandardWarning.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/StandardWarning.java new file mode 100644 index 00000000000..8702f47ef31 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/StandardWarning.java @@ -0,0 +1,60 @@ +/* + * 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 jdk.jpackage.internal.summary; + +import java.util.Optional; + +/** + * Warning in summary. + */ +public enum StandardWarning implements Warning { + + // + // Keep items in the order they should be printed in the summary. + // + + MAC_SIGNED_PREDEFINED_APP_IMAGE_WITHOUT_PACKAGE_FILE("warning.per.user.app.image.signed"), + + MAC_SIGNED_PKG_WITH_UNSIGNED_PREDEFINED_APP_IMAGE("warning.unsigned.app.image"), + + MAC_NON_STANDARD_APP_CONTENT("warning.non-standard-app-content"), + + MAC_BUNDLE_NAME_TOO_LONG("warning.bundle-name-too-long-warning"), + + LINUX_DEB_MISSING_LICENSE_FILE("message.debs-like-licenses"), + + ; + + StandardWarning(String valueFormat) { + this.valueFormat = Optional.of(valueFormat); + } + + @Override + public Optional valueFormat() { + return valueFormat; + } + + private final Optional valueFormat; +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/Summary.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/Summary.java new file mode 100644 index 00000000000..d4c36bcd5f0 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/Summary.java @@ -0,0 +1,180 @@ +/* + * 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 jdk.jpackage.internal.summary; + +import static jdk.jpackage.internal.util.IdentityWrapper.wrapIdentity; + +import java.nio.file.Path; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; +import jdk.jpackage.internal.cli.StandardBundlingOperation; +import jdk.jpackage.internal.model.Application; +import jdk.jpackage.internal.model.BundleSpec; +import jdk.jpackage.internal.model.Package; +import jdk.jpackage.internal.util.IdentityWrapper; +import jdk.jpackage.internal.util.PathUtils; + +/** + * Summary of the operation jpackage will perform. + */ +public final class Summary implements SummaryAccumulator { + + public void print(Consumer sinkInfo, Consumer sinkWarnings) { + + // Properties + properties.entrySet().stream().sorted(comparator()).map(e -> { + return String.format("%s: %s", e.getKey().value().formatLabel(), e.getValue()); + }).forEach(sinkInfo); + + // Warnings + warnings.entrySet().stream().sorted(comparator()).map(e -> { + switch (e.getValue()) { + case SingleLineContent c -> { + return I18N.format("summary.warning", c.str()); + } + case MultiLineContent c -> { + return Stream.concat( + Stream.of(I18N.format("summary.multi-line-warning", c.header())), + StreamSupport.stream(c.items().spliterator(), false).map(msg -> { + // Add indentation. + return " " + msg; + }) + ).collect(Collectors.joining("\n")); + } + } + }).forEach(sinkWarnings); + } + + @Override + public void putIfAbsent(SummaryItem k, String value) { + Objects.requireNonNull(value); + switch (k) { + case Property prop -> { + properties.putIfAbsent(wrapIdentity(prop), value); + } + case Warning warn -> { + warnings.putIfAbsent(wrapIdentity(warn), new SingleLineContent(value)); + } + } + } + + @Override + public void put(SummaryItem k, String value) { + Objects.requireNonNull(value); + switch (k) { + case Property prop -> { + properties.put(wrapIdentity(prop), value); + } + case Warning warn -> { + warnings.put(wrapIdentity(warn), new SingleLineContent(value)); + } + } + } + + @Override + public void putMultiValue(Warning k, String header, Iterable items) { + if (!items.iterator().hasNext()) { + throw new IllegalArgumentException(); + } + warnings.put(wrapIdentity(k), new MultiLineContent(header, items)); + } + + public Summary putStandardPropertiesIfAbsent(StandardBundlingOperation op, Path outputDir, BundleSpec bundle) { + Objects.requireNonNull(op); + Objects.requireNonNull(outputDir); + Objects.requireNonNull(bundle); + + if (op != StandardBundlingOperation.SIGN_MAC_APP_IMAGE) { + putIfAbsent(StandardProperty.OPERATION, (Object)op.bundleType().label()); + putIfAbsent(StandardProperty.OUTPUT_BUNDLE, PathUtils.normalizedAbsolutePath(outputDir.resolve(outputBundleName(bundle)))); + } + + putIfAbsent(StandardProperty.VERSION, version(bundle)); + + return this; + } + + private static Path outputBundleName(BundleSpec bundle) { + return getProperty(bundle, Application::appImageDirName, pkg -> { + return Path.of(pkg.packageFileNameWithSuffix()); + }); + } + + private static String version(BundleSpec bundle) { + return getProperty(bundle, Application::version, Package::version); + } + + private static T getProperty(BundleSpec bundle, + Function appPropertyGetter, + Function pkgPropertyGetter) { + + Objects.requireNonNull(appPropertyGetter); + Objects.requireNonNull(pkgPropertyGetter); + + switch (bundle) { + case Application app -> { + return appPropertyGetter.apply(app); + } + case Package pkg -> { + return pkgPropertyGetter.apply(pkg); + } + } + } + + private static Comparator, ?>> comparator() { + return Comparator.comparing( + e -> { + return e.getKey().value(); + }, + Comparator.comparingInt(SummaryItem::ordinal) + ); + } + + private sealed interface Content { + } + + record SingleLineContent(String str) implements Content { + SingleLineContent { + Objects.requireNonNull(str); + } + } + + record MultiLineContent(String header, Iterable items) implements Content { + MultiLineContent { + Objects.requireNonNull(header); + Objects.requireNonNull(items); + } + } + + private final Map, String> properties = new HashMap<>(); + private final Map, Content> warnings = new HashMap<>(); +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/SummaryAccumulator.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/SummaryAccumulator.java new file mode 100644 index 00000000000..d190046360a --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/SummaryAccumulator.java @@ -0,0 +1,49 @@ +/* + * 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 jdk.jpackage.internal.summary; + +/** + * Accumulator of items for summary. + */ +public interface SummaryAccumulator { + + default void putIfAbsent(SummaryItem k, Object... valueFormatArgs) { + putIfAbsent(k, k.formatValue(valueFormatArgs)); + } + + default void put(SummaryItem k, Object... valueFormatArgs) { + put(k, k.formatValue(valueFormatArgs)); + } + + default void putMultiValue(Warning k, Iterable items, Object... valueFormatArgs) { + putMultiValue(k, k.formatValue(valueFormatArgs), items); + } + + void put(SummaryItem k, String value); + + void putIfAbsent(SummaryItem k, String value); + + void putMultiValue(Warning k, String header, Iterable items); +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/SummaryItem.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/SummaryItem.java new file mode 100644 index 00000000000..1a072e514b3 --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/SummaryItem.java @@ -0,0 +1,45 @@ +/* + * 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 jdk.jpackage.internal.summary; + +import java.util.Optional; + +public sealed interface SummaryItem permits Property, Warning { + + int ordinal(); + + Optional valueFormat(); + + default String formatValue(Object... valueFormatArgs) { + return valueFormat().map(valueFormat -> { + return I18N.format(valueFormat, valueFormatArgs); + }).orElseGet(() -> { + if (valueFormatArgs.length != 1) { + throw new IllegalArgumentException(); + } + return valueFormatArgs[0].toString(); + }); + } +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/Warning.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/Warning.java new file mode 100644 index 00000000000..2f7400af16d --- /dev/null +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/summary/Warning.java @@ -0,0 +1,31 @@ +/* + * 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 jdk.jpackage.internal.summary; + +/** + * Warning in summary. + */ +public non-sealed interface Warning extends SummaryItem { +} diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/SetBuilder.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/SetBuilder.java index d3d677cba50..0c4497e4248 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/SetBuilder.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/SetBuilder.java @@ -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 @@ -28,11 +28,18 @@ import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.function.Consumer; public final class SetBuilder { - public static SetBuilder build() { - return new SetBuilder<>(); + @SafeVarargs + @SuppressWarnings("varargs") + public static SetBuilder build(T... v) { + return new SetBuilder().add(v); + } + + public static SetBuilder build(Collection v) { + return new SetBuilder().add(v); } public SetBuilder set(Collection v) { @@ -67,6 +74,11 @@ public final class SetBuilder { return remove(List.of(v)); } + public SetBuilder mutate(Consumer> mutator) { + mutator.accept(this); + return this; + } + public SetBuilder clear() { values.clear(); return this; diff --git a/src/jdk.jpackage/share/man/jpackage.md b/src/jdk.jpackage/share/man/jpackage.md index 156b05307b7..3467c53e595 100644 --- a/src/jdk.jpackage/share/man/jpackage.md +++ b/src/jdk.jpackage/share/man/jpackage.md @@ -121,9 +121,76 @@ The `jpackage` tool will take as input a Java application and a Java run-time im : Vendor of the application -`--verbose` +`--verbose` <\[-\]key(,\[-\]key)*> -: Enables verbose output. +: Configures verbose output. Enables and/or disables log message categories using zero or more of the keys described below separated by commas. + The key `all` enables or disables all categories (respectively); other keys enable the corresponding category, or disable it if preceded by a hyphen (`-`). + + Supported values for *key* are: + + - `all`: Enables console output and routing of all message categories to the logging framework through the [System.Logger API](../../api/java.base/java/lang/System.Logger.html). Equivalent to `console,log`. + + - `console`: Enables console output of all message categories. Equivalent to `all,-log`. + + - `errors`: Enables output of fatal errors. + If the key is specified without the `trace` key, error messages will be written to the console without the corresponding exception stacktraces. + If the key is specified with the `trace` key, error messages will be written to the console with the corresponding exception stacktraces. + + - `progress`: Enables output of progress messages. + + - `resources`: Enables output of messages about the use of the configurable resources. + + - `summary`: Enables output of the bundle properties and the versions of the tools being used. + + - `tools`: Enables output of commands being executed. + If the key is specified without the `trace` key, the jpackage will print the command lines without the output produced by executing these command lines. + Only command lines that are relevant to package customization will be written to the console. + If the key is specified with the `trace` key, the jpackage will print all command lines and their output. + + - `trace`: Enables output of stack traces of suppressed exceptions and details of the jpackage execution. + When combined with other keys, it enables additional information in messages from the corresponding message categories, as described above. + + - `warning`: Enables output of warnings. + + - `log`: Enables routing of all message categories to the logging framework through the [System.Logger API](../../api/java.base/java/lang/System.Logger.html). + The logger name will be "jdk.jpackage". + + If the option is specified without the value, it is equivalent to: + ``` + --verbose console,-trace + ``` + + If the option is not specified, it is equivalent to: + ``` + --verbose errors,warnings + ``` + + Sample usage: + + Suppress all console output, enable logging via the [System.Logger API](../../api/java.base/java/lang/System.Logger.html): + ``` + --verbose log + ``` + + Enable all message categories in the console: + ``` + --verbose console + ``` + + Enable all message categories, but "trace" and "tools" in the console: + ``` + --verbose console,-trace,-tools + ``` + + Enable "trace" and "tools" message categories in the console: + ``` + --verbose trace,tools + ``` + + Enable "trace" and "tools" message categories in the console and enable logging via the [System.Logger API](../../api/java.base/java/lang/System.Logger.html): + ``` + --verbose log,trace,tools + ``` `--version` diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/RtfConverter.java b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/RtfConverter.java new file mode 100644 index 00000000000..8886afc7918 --- /dev/null +++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/RtfConverter.java @@ -0,0 +1,140 @@ +/* + * 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 jdk.jpackage.internal; + +import static jdk.jpackage.internal.util.function.ThrowingConsumer.toConsumer; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Optional; +import java.util.stream.Stream; +import jdk.jpackage.internal.util.function.ExceptionBox; + +sealed interface RtfConverter { + + void convert(Path path) throws IOException; + + static boolean isRtfFile(Path path) throws IOException { + if (Files.isDirectory(path)) { + return false; + } + + try (InputStream fin = Files.newInputStream(path)) { + byte[] firstBits = new byte[7]; + + if (fin.read(firstBits) == firstBits.length) { + String header = new String(firstBits); + return "{\\rtf1\\".equals(header); + } + } + + return false; + } + + static Optional createSimple(Path path) throws IOException { + if (isRtfFile(path)) { + return Optional.of(Details.Simple.VALUE); + } else { + return Optional.empty(); + } + } + + static final class Details { + private enum Simple implements RtfConverter { + + VALUE; + + @Override + public void convert(Path path) throws IOException { + var content = Files.readAllLines(path); + try (var w = Files.newBufferedWriter(path, Charset.forName("Windows-1252"))) { + convert(content.stream(), w); + } + } + + private void convert(Stream textFile, Appendable sink) throws IOException { + + sink.append("{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033" + + "{\\fonttbl{\\f0\\fnil\\fcharset0 Arial;}}\n" + + "\\viewkind4\\uc1\\pard\\sa200\\sl276" + + "\\slmult1\\lang9\\fs20 "); + + try { + textFile.forEach(toConsumer(l -> { + for (char c : l.toCharArray()) { + // 0x00 <= ch < 0x20 Escaped (\'hh) + // 0x20 <= ch < 0x80 Raw(non - escaped) char + // 0x80 <= ch <= 0xFF Escaped(\ 'hh) + // 0x5C, 0x7B, 0x7D (special RTF characters + // \,{,})Escaped(\'hh) + // ch > 0xff Escaped (\\ud###?) + if (c < 0x10) { + sink.append("\\'0"); + sink.append(Integer.toHexString(c)); + } else if (c > 0xff) { + sink.append("\\ud"); + sink.append(Integer.toString(c)); + // \\uc1 is in the header and in effect + // so we trail with a replacement char if + // the font lacks that character - '?' + sink.append("?"); + } else if ((c < 0x20) || (c >= 0x80) || + (c == 0x5C) || (c == 0x7B) || + (c == 0x7D)) { + sink.append("\\'"); + sink.append(Integer.toHexString(c)); + } else { + sink.append(c); + } + } + // blank lines are interpreted as paragraph breaks + if (l.length() < 1) { + sink.append("\\par"); + } else { + sink.append(" "); + } + sink.append("\r\n"); + })); + } catch (ExceptionBox ex) { + switch (ExceptionBox.unbox(ex)) { + case IOException ioex -> { + throw ioex; + } + default -> { + throw ex; + } + } + } + + sink.append("}\r\n"); + } + } + + } +} diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinBundlingEnvironment.java b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinBundlingEnvironment.java index e10bfb95abf..e81e2a26dc0 100644 --- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinBundlingEnvironment.java +++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinBundlingEnvironment.java @@ -32,6 +32,7 @@ import static jdk.jpackage.internal.cli.StandardBundlingOperation.CREATE_WIN_MSI import static jdk.jpackage.internal.util.MemoizingSupplier.runOnce; import jdk.jpackage.internal.cli.Options; +import jdk.jpackage.internal.summary.StandardProperty; public class WinBundlingEnvironment extends DefaultBundlingEnvironment { @@ -47,28 +48,27 @@ public class WinBundlingEnvironment extends DefaultBundlingEnvironment { private static void createMsiPackage(Options options, WinSystemEnvironment sysEnv) { + addWixSummary(options, sysEnv); + createNativePackage(options, WinFromOptions.createWinMsiPackage(options), buildEnv()::create, WinPackagingPipeline.build(), (env, pkg, outputDir) -> { - - traceWixToolset(sysEnv); - return new WinMsiPackager(env, pkg, outputDir, sysEnv); }); } private static void createExePackage(Options options, WinSystemEnvironment sysEnv) { + addWixSummary(options, sysEnv); + createNativePackage(options, WinFromOptions.createWinExePackage(options), buildEnv()::create, WinPackagingPipeline.build(), (env, pkg, outputDir) -> { - traceWixToolset(sysEnv); - final var msiOutputDir = env.buildRoot().resolve("msi"); var msiPackager = new WinMsiPackager(env, pkg.msiPackage(), @@ -90,14 +90,7 @@ public class WinBundlingEnvironment extends DefaultBundlingEnvironment { return new BuildEnvFromOptions().predefinedAppImageLayout(APPLICATION_LAYOUT); } - private static void traceWixToolset(WinSystemEnvironment sysEnv) { - final var wixToolset = sysEnv.wixToolset(); - - for (var tool : wixToolset.getType().getTools()) { - Log.verbose(I18N.format("message.tool-version", - wixToolset.getToolPath(tool).getFileName(), - wixToolset.getVersion())); - } + private static void addWixSummary(Options options, WinSystemEnvironment sysEnv) { + OptionUtils.summary(options).put(StandardProperty.WIN_WIX_VERSION, sysEnv.wixToolset().getVersion()); } - } diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinFromOptions.java b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinFromOptions.java index 59701777396..63cb2ac0fe7 100644 --- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinFromOptions.java +++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinFromOptions.java @@ -50,6 +50,7 @@ import jdk.jpackage.internal.model.WinExePackage; import jdk.jpackage.internal.model.WinLauncher; import jdk.jpackage.internal.model.WinLauncherMixin; import jdk.jpackage.internal.model.WinMsiPackage; +import jdk.jpackage.internal.summary.StandardProperty; final class WinFromOptions { @@ -104,7 +105,13 @@ final class WinFromOptions { WIN_UPGRADE_UUID.ifPresentIn(options, pkgBuilder::upgradeCode); - return pkgBuilder.create(); + var pkg = pkgBuilder.create(); + + var summary = OptionUtils.summary(options); + summary.put(StandardProperty.WIN_MSI_PRODUCT_CODE, pkg.productCode()); + summary.put(StandardProperty.WIN_MSI_UPGRADE_CODE, pkg.upgradeCode()); + + return pkg; } static WinExePackage createWinExePackage(Options options) { diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiPackager.java b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiPackager.java index 3eb7b10b846..4e9f1f256b2 100644 --- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiPackager.java +++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiPackager.java @@ -24,12 +24,10 @@ */ package jdk.jpackage.internal; +import static jdk.jpackage.internal.util.function.ThrowingConsumer.toConsumer; import java.io.IOException; -import java.io.InputStream; import java.io.UncheckedIOException; -import java.io.Writer; -import java.nio.charset.Charset; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; @@ -169,19 +167,19 @@ final class WinMsiPackager implements Consumer { private void prepareConfigFiles() throws IOException { - pkg.licenseFile().ifPresent(licenseFile -> { + pkg.licenseFile().ifPresent(toConsumer(licenseFile -> { // need to copy license file to the working directory // and convert to rtf if needed Path destFile = env.configDir().resolve(licenseFile.getFileName()); - try { - IOUtils.copyFile(licenseFile, destFile); - } catch (IOException ex) { - throw new UncheckedIOException(ex); - } - destFile.toFile().setWritable(true); - ensureByMutationFileIsRTF(destFile); - }); + IOUtils.copyFile(licenseFile, destFile); + + RtfConverter.createSimple(licenseFile).ifPresent(toConsumer(rtfConverter -> { + Log.trace("Convert a copy of the license file [%s] to RTF", licenseFile); + destFile.toFile().setWritable(true); + rtfConverter.convert(destFile); + })); + })); for (var wixFragment : wixFragments) { wixFragment.initFromParams(env, pkg); @@ -190,7 +188,7 @@ final class WinMsiPackager implements Consumer { final var msiOut = outputDir.resolve(pkg.packageFileNameWithSuffix()); - Log.verbose(I18N.format("message.preparing-msi-config", msiOut.toAbsolutePath())); + Log.progress(I18N.format("message.preparing-msi-config", msiOut.toAbsolutePath())); final var wixVars = createWixVars(); @@ -252,7 +250,7 @@ final class WinMsiPackager implements Consumer { .filter(custom -> primaryWxlFiles.stream().noneMatch(primary -> primary.getFileName().toString().equalsIgnoreCase( custom.getFileName().toString()))) - .peek(custom -> Log.verbose(I18N.format( + .peek(custom -> Log.useResource(I18N.format( "message.using-custom-resource", String.format("[%s]", I18N.getString("resource.wxl-file")), custom.getFileName()))).toList(); @@ -320,9 +318,6 @@ final class WinMsiPackager implements Consumer { wixVars.put("JpProductCode", pkg.productCode().toString()); wixVars.put("JpProductUpgradeCode", pkg.upgradeCode().toString()); - Log.verbose(I18N.format("message.product-code", pkg.productCode())); - Log.verbose(I18N.format("message.upgrade-code", pkg.upgradeCode())); - wixVars.define("JpAllowUpgrades"); if (!pkg.isRuntimeInstaller()) { wixVars.define("JpAllowDowngrades"); @@ -402,74 +397,6 @@ final class WinMsiPackager implements Consumer { } } - private static void ensureByMutationFileIsRTF(Path f) { - try { - boolean existingLicenseIsRTF = false; - - try (InputStream fin = Files.newInputStream(f)) { - byte[] firstBits = new byte[7]; - - if (fin.read(firstBits) == firstBits.length) { - String header = new String(firstBits); - existingLicenseIsRTF = "{\\rtf1\\".equals(header); - } - } - - if (!existingLicenseIsRTF) { - List oldLicense = Files.readAllLines(f); - try (Writer w = Files.newBufferedWriter( - f, Charset.forName("Windows-1252"))) { - w.write("{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033" - + "{\\fonttbl{\\f0\\fnil\\fcharset0 Arial;}}\n" - + "\\viewkind4\\uc1\\pard\\sa200\\sl276" - + "\\slmult1\\lang9\\fs20 "); - oldLicense.forEach(l -> { - try { - for (char c : l.toCharArray()) { - // 0x00 <= ch < 0x20 Escaped (\'hh) - // 0x20 <= ch < 0x80 Raw(non - escaped) char - // 0x80 <= ch <= 0xFF Escaped(\ 'hh) - // 0x5C, 0x7B, 0x7D (special RTF characters - // \,{,})Escaped(\'hh) - // ch > 0xff Escaped (\\ud###?) - if (c < 0x10) { - w.write("\\'0"); - w.write(Integer.toHexString(c)); - } else if (c > 0xff) { - w.write("\\ud"); - w.write(Integer.toString(c)); - // \\uc1 is in the header and in effect - // so we trail with a replacement char if - // the font lacks that character - '?' - w.write("?"); - } else if ((c < 0x20) || (c >= 0x80) || - (c == 0x5C) || (c == 0x7B) || - (c == 0x7D)) { - w.write("\\'"); - w.write(Integer.toHexString(c)); - } else { - w.write(c); - } - } - // blank lines are interpreted as paragraph breaks - if (l.length() < 1) { - w.write("\\par"); - } else { - w.write(" "); - } - w.write("\r\n"); - } catch (IOException e) { - Log.verbose(e); - } - }); - w.write("}\r\n"); - } - } - } catch (IOException e) { - Log.verbose(e); - } - } - private final WinMsiPackage pkg; private final BuildEnv env; private final Path outputDir; diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixTool.java b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixTool.java index d0c5e6ca3b0..55e2ea0eb6b 100644 --- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixTool.java +++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixTool.java @@ -30,6 +30,7 @@ import static java.util.stream.Collectors.toSet; import java.io.IOException; import java.nio.file.FileSystems; import java.nio.file.Files; +import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.util.Comparator; import java.util.List; @@ -125,6 +126,7 @@ public enum WixTool { .collect(toSet()); if (sameVersionTools.equals(Set.of(Candle3)) || sameVersionTools.equals(Set.of(Light3))) { // There is only one tool from WiX v3 toolset of some version available. Discard it. + Log.trace("Discard [%s]: incomplete", sameVersionLookupResults.getFirst().info()); return false; } else { return true; @@ -178,6 +180,11 @@ public enum WixTool { }); }); + Log.trace("Using %s WiX Toolkit v%s", toolset.getType(), toolset.getVersion()); + toolset.getType().getTools().stream().sorted().forEach(tool -> { + Log.trace("%s: %s", tool, toolset.getToolPath(tool)); + }); + return toolset; } @@ -199,6 +206,12 @@ public enum WixTool { Objects.requireNonNull(tool); Objects.requireNonNull(lookupDir); + lookupDir.ifPresentOrElse(theLookupDir -> { + Log.trace("Look up for %s in [%s] directory", tool.toolFileName, theLookupDir); + }, () -> { + Log.trace("Look up for %s in the PATH", tool.toolFileName); + }); + final Path toolPath = lookupDir.map(p -> { return p.resolve(tool.toolFileName); }).orElse(tool.toolFileName); @@ -256,7 +269,7 @@ public enum WixTool { // Detect FIPS mode var fips = false; try { - final var result = Executor.of(toolPath.toString(), "-?").setQuiet(true).saveOutput(true).execute(); + final var result = Executor.of(toolPath.toString(), "-?").quiet().saveOutput(true).execute(); final var exitCode = result.getExitCode(); if (exitCode != 0 /* 308 */) { final var output = result.getOutput(); @@ -265,12 +278,18 @@ public enum WixTool { } } } catch (IOException ex) { + Log.trace(ex, "Failed to execute [%s] command with '-?' option to detect FIPS mode. Assume FIPS=false", toolPath); } info = new DefaultCandleInfo(info, fips); } + Log.trace("Found [%s]", info); + return Optional.of(new ToolLookupResult(tool, info)); } else { + if (parsedVersion.find().isPresent()) { + Log.trace("Discard [%s]: failed validation", new DefaultToolInfo(toolPath, parsedVersion.get())); + } return Optional.empty(); } } @@ -294,7 +313,14 @@ public enum WixTool { private static Optional getEnvVariableAsPath(String envVar) { Objects.requireNonNull(envVar); - return Optional.ofNullable(Globals.instance().system().getenv(envVar)).flatMap(PathUtils::asPath); + return Optional.ofNullable(Globals.instance().system().getenv(envVar)).map(v -> { + try { + return Path.of(v); + } catch (InvalidPathException ex) { + Log.trace(ex, "The value of environment variable '%s' [%s] is not a path", envVar, v); + return null; + } + }); } private static List findWixCurrentInstallDirs() { @@ -318,6 +344,7 @@ public enum WixTool { try (var paths = Files.walk(path, 1)) { return paths.toList(); } catch (IOException ex) { + Log.trace(ex, "Can not get a listing of [%s] directory", path); return List.of(); } }).flatMap(List::stream) diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties index a11a8a6b41e..05a264e856b 100644 --- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties +++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties @@ -36,6 +36,10 @@ resource.launcher-as-service-wix-file=Service installer WiX project file resource.wix-src-conv=XSLT stylesheet converting WiX sources from WiX v3 to WiX v4 format resource.installer-exe=installer executable +summary.property.win-product-code=MSI ProductCode +summary.property.win-upgrade-code=MSI UpgradeCode +summary.property.win-wix-version=WiX Toolkit version + error.no-wix-tools=No usable WiX Toolset installation found error.no-wix-tools.advice=Install the latest WiX v3 from https://github.com/wixtoolset/wix3/releases or WiX v4+ from https://github.com/wixtoolset/wix/releases error.version-string-wrong-format.advice=Set value of --app-version parameter to a valid Windows Installer ProductVersion. @@ -45,7 +49,6 @@ error.msi-product-version-build-out-of-range=Build part of version must be in th error.msi-product-version-minor-out-of-range=Minor version must be in the range [0, 255] error.version-swap=Failed to update version information for {0} error.icon-swap=Failed to update icon for {0} -error.invalid-envvar=Invalid value of {0} environment variable error.lock-resource=Failed to lock: {0} error.unlock-resource=Failed to unlock: {0} error.read-wix-l10n-file=Failed to parse {0} file @@ -56,6 +59,4 @@ error.missing-service-installer.advice=Add 'service-installer.exe' service insta message.icon-not-ico=The specified icon "{0}" is not an ICO file and will not be used. The default icon will be used in it's place. message.tool-version=Detected [{0}] version [{1}]. -message.product-code=MSI ProductCode: {0}. -message.upgrade-code=MSI UpgradeCode: {0}. message.preparing-msi-config=Preparing MSI config: {0}. diff --git a/src/jdk.localedata/share/legal/cldr.md b/src/jdk.localedata/share/legal/cldr.md index 6e609f35302..7423d3492f5 100644 --- a/src/jdk.localedata/share/legal/cldr.md +++ b/src/jdk.localedata/share/legal/cldr.md @@ -1,4 +1,4 @@ -## Unicode Common Local Data Repository (CLDR) v48 +## Unicode Common Local Data Repository (CLDR) v48.2 ### CLDR License diff --git a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_es.properties b/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_es.properties deleted file mode 100644 index ad2665e2ff4..00000000000 --- a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_es.properties +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) 2004, 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. 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. -# - -agent.err.error = Error -agent.err.exception = Excepción devuelta por el agente -agent.err.warning = Advertencia - -agent.err.configfile.notfound = No se ha encontrado el archivo de configuración -agent.err.configfile.failed = Fallo al leer el archivo de configuración -agent.err.configfile.closed.failed = Fallo al cerrar el archivo de configuración -agent.err.configfile.access.denied = Acceso denegado al archivo de configuración - -agent.err.exportaddress.failed = Fallo al exportar la dirección del conector JMX al buffer de instrumentación - -agent.err.agentclass.notfound = Clase de agente de gestión no encontrada -agent.err.agentclass.failed = Fallo de clase de agente de gestión -agent.err.premain.notfound = premain(String) no existe en la clase del agente -agent.err.agentclass.access.denied = Acceso denegado a premain(String) -agent.err.invalid.agentclass = Valor de propiedad com.sun.management.agent.class no válido -agent.err.invalid.state = Estado de agente no válido: {0} -agent.err.invalid.jmxremote.port = Número com.sun.management.jmxremote.port no válido -agent.err.invalid.jmxremote.rmi.port = Número com.sun.management.jmxremote.rmi.port no válido - -agent.err.file.not.set = Archivo no especificado -agent.err.file.not.readable = Archivo ilegible -agent.err.file.read.failed = Fallo al leer el archivo -agent.err.file.not.found = Archivo no encontrado -agent.err.file.access.not.restricted = El acceso de lectura al archivo debe ser restringido - -agent.err.password.file.notset = El archivo de contraseñas no se ha especificado, pero com.sun.management.jmxremote.authenticate=true -agent.err.password.file.not.readable = No se puede leer el archivo de contraseñas -agent.err.password.file.read.failed = Fallo al leer el archivo de contraseñas -agent.err.password.file.notfound = Archivo de contraseñas no encontrado -agent.err.password.file.access.notrestricted = Se debe restringir el acceso de lectura al archivo de contraseñas - -agent.err.access.file.notset = El archivo de acceso no se ha especificado, pero com.sun.management.jmxremote.authenticate=true -agent.err.access.file.not.readable = No se puede leer el archivo de acceso -agent.err.access.file.read.failed = Fallo al leer el archivo de acceso -agent.err.access.file.notfound = Archivo de acceso no encontrado - -agent.err.connector.server.io.error = Error de comunicación con el servidor de conector JMX - -agent.err.invalid.option = Opción especificada no válida - -jmxremote.ConnectorBootstrap.starting = Iniciando servidor de conector JMX: -jmxremote.ConnectorBootstrap.noAuthentication = Sin autenticación -jmxremote.ConnectorBootstrap.ready = Conector JMX listo en: {0} -jmxremote.ConnectorBootstrap.password.readonly = Se debe restringir el acceso de lectura al archivo de contraseñas: {0} -jmxremote.ConnectorBootstrap.file.readonly = El acceso de lectura al archivo debe ser restringido: {0} diff --git a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_fr.properties b/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_fr.properties deleted file mode 100644 index 28e21825220..00000000000 --- a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_fr.properties +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) 2004, 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. 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. -# - -agent.err.error = Erreur -agent.err.exception = Exception envoyée par l'agent -agent.err.warning = Avertissement - -agent.err.configfile.notfound = Fichier de configuration introuvable -agent.err.configfile.failed = Impossible de lire le fichier de configuration -agent.err.configfile.closed.failed = Impossible de fermer le fichier de configuration -agent.err.configfile.access.denied = Accès refusé au fichier de configuration - -agent.err.exportaddress.failed = Impossible d'exporter l'adresse du connecteur JMX dans le tampon d'instrumentation - -agent.err.agentclass.notfound = Classe d'agents de gestion introuvable -agent.err.agentclass.failed = Echec de la classe d'agents de gestion -agent.err.premain.notfound = premain(String) n'existe pas dans la classe d'agents -agent.err.agentclass.access.denied = Accès à premain(String) refusé -agent.err.invalid.agentclass = Valeur de propriété com.sun.management.agent.class incorrecte -agent.err.invalid.state = Etat de l''agent non valide : {0} -agent.err.invalid.jmxremote.port = Numéro com.sun.management.jmxremote.port incorrect -agent.err.invalid.jmxremote.rmi.port = Numéro com.sun.management.jmxremote.rmi.port non valide - -agent.err.file.not.set = Fichier non spécifié -agent.err.file.not.readable = Fichier illisible -agent.err.file.read.failed = Impossible de lire le fichier -agent.err.file.not.found = Fichier introuvable -agent.err.file.access.not.restricted = L'accès en lecture au fichier doit être limité - -agent.err.password.file.notset = Le fichier de mots de passe n'est pas spécifié mais com.sun.management.jmxremote.authenticate=true -agent.err.password.file.not.readable = Fichier de mots de passe illisible -agent.err.password.file.read.failed = Impossible de lire le fichier de mots de passe -agent.err.password.file.notfound = Fichier de mots de passe introuvable -agent.err.password.file.access.notrestricted = L'accès en lecture au fichier de mots de passe doit être limité - -agent.err.access.file.notset = Le fichier d'accès n'est pas spécifié mais com.sun.management.jmxremote.authenticate=true -agent.err.access.file.not.readable = Fichier d'accès illisible -agent.err.access.file.read.failed = Impossible de lire le fichier d'accès -agent.err.access.file.notfound = Fichier d'accès introuvable - -agent.err.connector.server.io.error = Erreur de communication avec le serveur du connecteur JMX - -agent.err.invalid.option = Option spécifiée non valide - -jmxremote.ConnectorBootstrap.starting = Démarrage du serveur du connecteur JMX : -jmxremote.ConnectorBootstrap.noAuthentication = Pas d'authentification -jmxremote.ConnectorBootstrap.ready = Connecteur JMX prêt à : {0} -jmxremote.ConnectorBootstrap.password.readonly = L''accès en lecture au fichier de mots de passe doit être limité : {0} -jmxremote.ConnectorBootstrap.file.readonly = L''accès en lecture au fichier doit être limité : {0} diff --git a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_it.properties b/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_it.properties deleted file mode 100644 index 005dec54ea8..00000000000 --- a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_it.properties +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) 2004, 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. 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. -# - -agent.err.error = Errore -agent.err.exception = Eccezione dell'agente -agent.err.warning = Avvertenza - -agent.err.configfile.notfound = File di configurazione non trovato -agent.err.configfile.failed = Errore di lettura file di configurazione -agent.err.configfile.closed.failed = Errore di chiusura file di configurazione -agent.err.configfile.access.denied = Accesso negato al file di configurazione - -agent.err.exportaddress.failed = Errore di esportazione dell'indirizzo connettore JMX nel buffer strumenti - -agent.err.agentclass.notfound = Classe agente gestione non trovata -agent.err.agentclass.failed = Errore classe agente gestione -agent.err.premain.notfound = premain(String) non esiste nella classe agente -agent.err.agentclass.access.denied = Accesso negato a premain(String) -agent.err.invalid.agentclass = Valore proprietà com.sun.management.agent.class non valido -agent.err.invalid.state = Stato agente non valido: {0} -agent.err.invalid.jmxremote.port = Numero com.sun.management.jmxremote.port non valido -agent.err.invalid.jmxremote.rmi.port = Numero com.sun.management.jmxremote.rmi.port non valido - -agent.err.file.not.set = File non specificato -agent.err.file.not.readable = File non leggibile -agent.err.file.read.failed = Errore di lettura file -agent.err.file.not.found = File non trovato -agent.err.file.access.not.restricted = Limitare l'accesso in lettura al file - -agent.err.password.file.notset = Il password file non è specificato ma com.sun.management.jmxremote.authenticate=true -agent.err.password.file.not.readable = Password file non leggibile -agent.err.password.file.read.failed = Errore di lettura password file -agent.err.password.file.notfound = Password file non trovato -agent.err.password.file.access.notrestricted = Limitare l'accesso in lettura al password file - -agent.err.access.file.notset = Il file di accesso non è specificato ma com.sun.management.jmxremote.authenticate=true -agent.err.access.file.not.readable = File di accesso non leggibile -agent.err.access.file.read.failed = Errore di lettura file di accesso -agent.err.access.file.notfound = File di accesso non trovato - -agent.err.connector.server.io.error = Errore di comunicazione server del connettore JMX - -agent.err.invalid.option = Specificata opzione non valida - -jmxremote.ConnectorBootstrap.starting = Avvio del server connettore JMX: -jmxremote.ConnectorBootstrap.noAuthentication = Nessuna autenticazione -jmxremote.ConnectorBootstrap.ready = Connettore JMX pronto in: {0} -jmxremote.ConnectorBootstrap.password.readonly = Limitare l''accesso in lettura al password file: {0} -jmxremote.ConnectorBootstrap.file.readonly = Limitare l''accesso in lettura al file: {0} diff --git a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_ko.properties b/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_ko.properties deleted file mode 100644 index f4ff84db84e..00000000000 --- a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_ko.properties +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) 2004, 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. 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. -# - -agent.err.error = 오류 -agent.err.exception = 에이전트에 예외사항이 발생했습니다. -agent.err.warning = 경고 - -agent.err.configfile.notfound = 구성 파일을 찾을 수 없습니다. -agent.err.configfile.failed = 구성 파일 읽기를 실패했습니다. -agent.err.configfile.closed.failed = 구성 파일 닫기를 실패했습니다. -agent.err.configfile.access.denied = 구성 파일에 대한 액세스가 거부되었습니다. - -agent.err.exportaddress.failed = 기기 버퍼로 JMX 커넥터 주소 익스포트를 실패했습니다. - -agent.err.agentclass.notfound = 관리 에이전트 클래스를 찾을 수 없습니다. -agent.err.agentclass.failed = 관리 에이전트 클래스를 실패했습니다. -agent.err.premain.notfound = 에이전트 클래스에 premain(문자열)이 존재하지 않습니다. -agent.err.agentclass.access.denied = premain(문자열)에 대한 액세스가 거부되었습니다. -agent.err.invalid.agentclass = com.sun.management.agent.class 속성 값이 부적합합니다. -agent.err.invalid.state = 부적합한 에이전트 상태: {0} -agent.err.invalid.jmxremote.port = com.sun.management.jmxremote.port 번호가 부적합합니다. -agent.err.invalid.jmxremote.rmi.port = 부적합한 com.sun.management.jmxremote.rmi.port 번호 - -agent.err.file.not.set = 파일이 지정되지 않았습니다. -agent.err.file.not.readable = 파일을 읽을 수 없습니다. -agent.err.file.read.failed = 파일 읽기를 실패했습니다. -agent.err.file.not.found = 파일을 찾을 수 없습니다. -agent.err.file.access.not.restricted = 파일 읽기 액세스는 제한되어야 합니다. - -agent.err.password.file.notset = 비밀번호 파일이 지정되지 않았지만 com.sun.management.jmxremote.authenticate=true입니다. -agent.err.password.file.not.readable = 비밀번호 파일을 읽을 수 없습니다. -agent.err.password.file.read.failed = 비밀번호 파일 읽기를 실패했습니다. -agent.err.password.file.notfound = 비밀번호 파일을 찾을 수 없습니다. -agent.err.password.file.access.notrestricted = 비밀번호 파일 읽기 액세스는 제한되어야 합니다. - -agent.err.access.file.notset = 액세스 파일이 지정되지 않았지만 com.sun.management.jmxremote.authenticate=true입니다. -agent.err.access.file.not.readable = 액세스 파일을 읽을 수 없습니다. -agent.err.access.file.read.failed = 액세스 파일 읽기를 실패했습니다. -agent.err.access.file.notfound = 액세스 파일을 찾을 수 없습니다. - -agent.err.connector.server.io.error = JMX 커넥터 서버 통신 오류 - -agent.err.invalid.option = 부적합한 옵션이 지정되었습니다. - -jmxremote.ConnectorBootstrap.starting = JMX 커넥터 서버를 시작하는 중: -jmxremote.ConnectorBootstrap.noAuthentication = 인증 없음 -jmxremote.ConnectorBootstrap.ready = {0}에서 JMX 커넥터가 준비되었습니다. -jmxremote.ConnectorBootstrap.password.readonly = 비밀번호 파일 읽기 액세스는 제한되어야 함: {0} -jmxremote.ConnectorBootstrap.file.readonly = 파일 읽기 액세스는 제한되어야 함: {0} diff --git a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_pt_BR.properties b/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_pt_BR.properties deleted file mode 100644 index 773042234e9..00000000000 --- a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_pt_BR.properties +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) 2004, 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. 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. -# - -agent.err.error = Erro -agent.err.exception = Exceção gerada pelo agente -agent.err.warning = Advertência - -agent.err.configfile.notfound = Arquivo de configuração não encontrado -agent.err.configfile.failed = Falha ao ler o arquivo de configuração -agent.err.configfile.closed.failed = Falha ao fechar o arquivo de configuração -agent.err.configfile.access.denied = Acesso negado ao arquivo de configuração - -agent.err.exportaddress.failed = Falha na exportação do endereço do conector JMX para o buffer de instrumentação - -agent.err.agentclass.notfound = Classe do agente de gerenciamento não encontrada -agent.err.agentclass.failed = Falha na classe do agente de gerenciamento -agent.err.premain.notfound = premain(String) não existe na classe do agente -agent.err.agentclass.access.denied = Acesso negado a premain(String) -agent.err.invalid.agentclass = Valor inválido da propriedade com.sun.management.agent.class -agent.err.invalid.state = Estado inválido do agente: {0} -agent.err.invalid.jmxremote.port = Número inválido de com.sun.management.jmxremote.port -agent.err.invalid.jmxremote.rmi.port = Número inválido do com.sun.management.jmxremote.rmi.port - -agent.err.file.not.set = Arquivo não especificado -agent.err.file.not.readable = Arquivo ilegível -agent.err.file.read.failed = Falha ao ler o arquivo -agent.err.file.not.found = Arquivo não encontrado -agent.err.file.access.not.restricted = O acesso de leitura do arquivo deve ser limitado - -agent.err.password.file.notset = O arquivo de senha não está especificado, mas com.sun.management.jmxremote.authenticate=true -agent.err.password.file.not.readable = Arquivo de senha ilegível -agent.err.password.file.read.failed = Falha ao ler o arquivo de senha -agent.err.password.file.notfound = Arquivo de senha não encontrado -agent.err.password.file.access.notrestricted = O acesso de leitura do arquivo de senha deve ser limitado - -agent.err.access.file.notset = O arquivo de acesso não está especificado, mas com.sun.management.jmxremote.authenticate=true -agent.err.access.file.not.readable = Arquivo de acesso ilegível -agent.err.access.file.read.failed = Falha ao ler o arquivo de acesso -agent.err.access.file.notfound = Arquivo de acesso não encontrado - -agent.err.connector.server.io.error = Erro de comunicação do servidor do conector JMX - -agent.err.invalid.option = Opção especificada inválida - -jmxremote.ConnectorBootstrap.starting = Iniciando o Servidor do Conector JMX: -jmxremote.ConnectorBootstrap.noAuthentication = Sem autenticação -jmxremote.ConnectorBootstrap.ready = Conector JMX pronto em: {0} -jmxremote.ConnectorBootstrap.password.readonly = O acesso de leitura do arquivo de senha deve ser limitado: {0} -jmxremote.ConnectorBootstrap.file.readonly = O acesso de leitura do arquivo deve ser limitado: {0} diff --git a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_sv.properties b/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_sv.properties deleted file mode 100644 index 7c4f2559ce1..00000000000 --- a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_sv.properties +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) 2004, 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. 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. -# - -agent.err.error = Fel -agent.err.exception = Agenten orsakade ett undantag -agent.err.warning = Varning - -agent.err.configfile.notfound = Konfigurationsfilen hittades inte -agent.err.configfile.failed = Kunde inte läsa konfigurationsfilen -agent.err.configfile.closed.failed = Kunde inte stänga konfigurationsfilen -agent.err.configfile.access.denied = Åtkomst till konfigurationsfilen nekad - -agent.err.exportaddress.failed = Kunde inte exportera JMX-anslutningsadressen till instrumentbufferten - -agent.err.agentclass.notfound = Administrationsagentklassen hittades inte -agent.err.agentclass.failed = Administrationsagentklassen utfördes inte -agent.err.premain.notfound = premain(String) finns inte i agentklassen -agent.err.agentclass.access.denied = Åtkomst till premain(String) nekad -agent.err.invalid.agentclass = Ogiltigt egenskapsvärde för com.sun.management.agent.class -agent.err.invalid.state = Ogiltig agentstatus: {0} -agent.err.invalid.jmxremote.port = Ogiltigt com.sun.management.jmxremote.port-nummer -agent.err.invalid.jmxremote.rmi.port = Ogiltigt com.sun.management.jmxremote.rmi.port-nummer - -agent.err.file.not.set = Filen är inte angiven -agent.err.file.not.readable = Filen är inte läsbar -agent.err.file.read.failed = Kunde inte läsa filen -agent.err.file.not.found = Filen hittades inte -agent.err.file.access.not.restricted = Filläsningsåtkomst måste begränsas - -agent.err.password.file.notset = Lösenordsfilen har inte angetts men com.sun.management.jmxremote.authenticate=true -agent.err.password.file.not.readable = Lösenordsfilen är inte läsbar -agent.err.password.file.read.failed = Kunde inte läsa lösenordsfilen -agent.err.password.file.notfound = Hittar inte lösenordsfilen -agent.err.password.file.access.notrestricted = Läsbehörigheten för filen måste begränsas - -agent.err.access.file.notset = Åtkomstfilen har inte angetts men com.sun.management.jmxremote.authenticate=true -agent.err.access.file.not.readable = Access-filen är inte läsbar -agent.err.access.file.read.failed = Kunde inte läsa åtkomstfilen -agent.err.access.file.notfound = Access-filen hittades inte - -agent.err.connector.server.io.error = Serverkommunikationsfel för JMX-anslutning - -agent.err.invalid.option = Det angivna alternativet är ogiltigt - -jmxremote.ConnectorBootstrap.starting = Startar server för JMX-anslutning: -jmxremote.ConnectorBootstrap.noAuthentication = Ingen autentisering -jmxremote.ConnectorBootstrap.ready = JMX-anslutning redo på: {0} -jmxremote.ConnectorBootstrap.password.readonly = Läsbehörigheten för lösenordsfilen måste begränsas: {0} -jmxremote.ConnectorBootstrap.file.readonly = Filläsningsåtkomst måste begränsas {0} diff --git a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_zh_TW.properties b/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_zh_TW.properties deleted file mode 100644 index 55e9da252f2..00000000000 --- a/src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_zh_TW.properties +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) 2004, 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. 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. -# - -agent.err.error = 錯誤 -agent.err.exception = 代理程式發生異常 -agent.err.warning = 警告 - -agent.err.configfile.notfound = 找不到設定檔案 -agent.err.configfile.failed = 無法讀取設定檔案 -agent.err.configfile.closed.failed = 無法關閉設定檔案 -agent.err.configfile.access.denied = 存取設定檔案遭到拒絕 - -agent.err.exportaddress.failed = 將 JMX 連接器位址匯出至設備緩衝區失敗 - -agent.err.agentclass.notfound = 找不到管理代理程式類別 -agent.err.agentclass.failed = 管理代理程式類別失敗 -agent.err.premain.notfound = 代理程式類別中不存在 premain(String) -agent.err.agentclass.access.denied = 存取 premain(String) 遭到拒絕 -agent.err.invalid.agentclass = com.sun.management.agent.class 屬性值無效 -agent.err.invalid.state = 無效的代理程式狀態: {0} -agent.err.invalid.jmxremote.port = com.sun.management.jmxremote.port 號碼無效 -agent.err.invalid.jmxremote.rmi.port = com.sun.management.jmxremote.rmi.port 號碼無效 - -agent.err.file.not.set = 未指定檔案 -agent.err.file.not.readable = 檔案無法讀取 -agent.err.file.read.failed = 無法讀取檔案 -agent.err.file.not.found = 找不到檔案 -agent.err.file.access.not.restricted = 必須限制檔案讀取存取權 - -agent.err.password.file.notset = 未指定密碼檔案,但 com.sun.management.jmxremote.authenticate=true -agent.err.password.file.not.readable = 密碼檔案無法讀取 -agent.err.password.file.read.failed = 無法讀取密碼檔案 -agent.err.password.file.notfound = 找不到密碼檔案 -agent.err.password.file.access.notrestricted = 必須限制密碼檔案讀取存取 - -agent.err.access.file.notset = 未指定存取檔案,但 com.sun.management.jmxremote.authenticate=true -agent.err.access.file.not.readable = 存取檔案無法讀取 -agent.err.access.file.read.failed = 無法讀取存取檔案 -agent.err.access.file.notfound = 找不到存取檔案 - -agent.err.connector.server.io.error = JMX 連接器伺服器通訊錯誤 - -agent.err.invalid.option = 指定的選項無效 - -jmxremote.ConnectorBootstrap.starting = 正在啟動 JMX 連接器伺服器: -jmxremote.ConnectorBootstrap.noAuthentication = 無認證 -jmxremote.ConnectorBootstrap.ready = JMX 連接器就緒,位於: {0} -jmxremote.ConnectorBootstrap.password.readonly = 必須限制密碼檔案讀取存取: {0} -jmxremote.ConnectorBootstrap.file.readonly = 必須限制檔案讀取存取權: {0} diff --git a/src/jdk.management.jfr/share/classes/jdk/management/jfr/FlightRecorderMXBean.java b/src/jdk.management.jfr/share/classes/jdk/management/jfr/FlightRecorderMXBean.java index 9f61cc3f358..4a1ef30b9cf 100644 --- a/src/jdk.management.jfr/share/classes/jdk/management/jfr/FlightRecorderMXBean.java +++ b/src/jdk.management.jfr/share/classes/jdk/management/jfr/FlightRecorderMXBean.java @@ -90,7 +90,7 @@ import jdk.jfr.Recording; * this parameter is ignored. * {@code "0"} (no limit) * {@code "0"} if no limit is imposed, otherwise a string - * representation of a positive {@code Long} value followed by an empty space + * representation of a positive {@code long} value followed by an empty space * and one of the following units,
              *
              * {@code "ns"} (nanoseconds)
              @@ -112,7 +112,7 @@ import jdk.jfr.Recording; * repository. Only works if * {@code disk=true}, otherwise this parameter is ignored. * {@code "0"} (no limit) - * String representation of a {@code Long} value, must be positive + * String representation of a {@code long} value, must be positive * {@code "0"},
              * {@code "1000000000"} * @@ -120,7 +120,7 @@ import jdk.jfr.Recording; * {@code dumpOnExit} * Dumps recording data to disk on Java Virtual Machine (JVM) exit * {@code "false"} - * String representation of a {@code Boolean} value, {@code "true"} or + * String representation of a {@code boolean} value, {@code "true"} or * {@code "false"} * {@code "true"},
              * {@code "false"} @@ -140,7 +140,7 @@ import jdk.jfr.Recording; * {@code disk} * Stores recorded data as it is recorded * "false" - * String representation of a {@code Boolean} value, {@code "true"} or + * String representation of a {@code boolean} value, {@code "true"} or * {@code "false"} * {@code "true"},
              * {@code "false"} @@ -149,7 +149,7 @@ import jdk.jfr.Recording; * Specifies the duration of the recording. * {@code "0"} (no limit, continuous) * {@code "0"} if no limit should be imposed, otherwise a string - * representation of a positive {@code Long} followed by an empty space and one + * representation of a positive {@code long} followed by an empty space and one * of the following units:
              *
              * {@code "ns"} (nanoseconds)
              diff --git a/src/utils/hsdis/README.md b/src/utils/hsdis/README.md index 98b08477450..eb532088032 100644 --- a/src/utils/hsdis/README.md +++ b/src/utils/hsdis/README.md @@ -61,6 +61,11 @@ backend to use. This is done with the configure switch `--with-hsdis=`, where `` is either `capstone`, `llvm` or `binutils`. For details, see the sections on the respective backends below. +A default value for `PrintAssemblyOptions` can be set at configure time with +`--with-print-assembly-options=` (e.g. `intel` for Intel syntax on x86, +if supported by the chosen backend). The runtime `-XX:PrintAssemblyOptions=...` +flag still takes precedence. + To build the hsdis library, run `make build-hsdis`. This will build the library in a separate directory, but not make it available to the JDK in the configuration. To actually install it in the JDK, run `make install-hsdis`. diff --git a/test/docs/ProblemList.txt b/test/docs/ProblemList.txt index d856f9c955e..6d496f62a21 100644 --- a/test/docs/ProblemList.txt +++ b/test/docs/ProblemList.txt @@ -45,10 +45,14 @@ # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/hotspot/gtest/aarch64/test_threadLS.cpp b/test/hotspot/gtest/aarch64/test_threadLS.cpp new file mode 100644 index 00000000000..1a4a152ea1d --- /dev/null +++ b/test/hotspot/gtest/aarch64/test_threadLS.cpp @@ -0,0 +1,35 @@ +/* + * 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. + */ + +#if defined(AARCH64) && !defined(ZERO) + +#include "runtime/javaThread.hpp" +#include "unittest.hpp" + +TEST_VM(ThreadLS, get_thread_helper) { + Thread* expected = Thread::current(); + Thread* actual = JavaThread::aarch64_get_thread_helper(); + ASSERT_EQ(actual, expected); +} + +#endif // AARCH64 && !ZERO diff --git a/test/hotspot/gtest/concurrentTestRunner.inline.hpp b/test/hotspot/gtest/concurrentTestRunner.inline.hpp index 4cdb342d45c..dcc025bdbf5 100644 --- a/test/hotspot/gtest/concurrentTestRunner.inline.hpp +++ b/test/hotspot/gtest/concurrentTestRunner.inline.hpp @@ -86,7 +86,7 @@ public: done.wait(); } - FREE_C_HEAP_ARRAY(UnitTestThread**, t); + FREE_C_HEAP_ARRAY(t); } private: diff --git a/test/hotspot/gtest/gc/g1/test_freeRegionList.cpp b/test/hotspot/gtest/gc/g1/test_freeRegionList.cpp index e61ce43fdb6..344f32d5ec8 100644 --- a/test/hotspot/gtest/gc/g1/test_freeRegionList.cpp +++ b/test/hotspot/gtest/gc/g1/test_freeRegionList.cpp @@ -91,5 +91,5 @@ TEST_OTHER_VM(G1FreeRegionList, length) { bot_storage->uncommit_regions(0, num_regions_in_test); delete bot_storage; os::release_memory(addr, sz); - FREE_C_HEAP_ARRAY(HeapWord, bot_data); + FREE_C_HEAP_ARRAY(bot_data); } diff --git a/test/hotspot/gtest/gc/g1/test_g1BatchedGangTask.cpp b/test/hotspot/gtest/gc/g1/test_g1BatchedGangTask.cpp index 08df547585a..01e512b6b22 100644 --- a/test/hotspot/gtest/gc/g1/test_g1BatchedGangTask.cpp +++ b/test/hotspot/gtest/gc/g1/test_g1BatchedGangTask.cpp @@ -87,7 +87,7 @@ public: ~G1TestSubTask() { check_and_inc_phase(3); - FREE_C_HEAP_ARRAY(Atomic, _do_work_called_by); + FREE_C_HEAP_ARRAY(_do_work_called_by); } double worker_cost() const override { diff --git a/test/hotspot/gtest/gc/g1/test_g1CardSetContainers.cpp b/test/hotspot/gtest/gc/g1/test_g1CardSetContainers.cpp index 91951b35405..2236b4e83aa 100644 --- a/test/hotspot/gtest/gc/g1/test_g1CardSetContainers.cpp +++ b/test/hotspot/gtest/gc/g1/test_g1CardSetContainers.cpp @@ -69,7 +69,7 @@ public: } ~G1FindCardsInRange() { - FREE_C_HEAP_ARRAY(mtGC, _cards_found); + FREE_C_HEAP_ARRAY(_cards_found); } void operator()(uint card) { ASSERT_TRUE((card - _range_min) < _num_cards); @@ -185,7 +185,7 @@ void G1CardSetContainersTest::cardset_array_test(uint cards_per_array) { found.verify_all_found(); } - FREE_C_HEAP_ARRAY(mtGC, cardset_data); + FREE_C_HEAP_ARRAY(cardset_data); } void G1CardSetContainersTest::cardset_bitmap_test(uint threshold, uint size_in_bits) { @@ -232,7 +232,7 @@ void G1CardSetContainersTest::cardset_bitmap_test(uint threshold, uint size_in_b found.verify_part_found(threshold); } - FREE_C_HEAP_ARRAY(mtGC, cardset_data); + FREE_C_HEAP_ARRAY(cardset_data); } TEST_VM_F(G1CardSetContainersTest, basic_cardset_inptr_test) { diff --git a/test/hotspot/gtest/gc/shared/test_collectorPolicy.cpp b/test/hotspot/gtest/gc/serial/test_collectorPolicy.cpp similarity index 100% rename from test/hotspot/gtest/gc/shared/test_collectorPolicy.cpp rename to test/hotspot/gtest/gc/serial/test_collectorPolicy.cpp diff --git a/test/hotspot/gtest/gc/shared/test_oopStorage.cpp b/test/hotspot/gtest/gc/shared/test_oopStorage.cpp index b343e7fc47f..61115fe9ea0 100644 --- a/test/hotspot/gtest/gc/shared/test_oopStorage.cpp +++ b/test/hotspot/gtest/gc/shared/test_oopStorage.cpp @@ -486,7 +486,7 @@ public: EXPECT_EQ(storage().block_count(), empty_block_count(storage())); - FREE_C_HEAP_ARRAY(oop*, to_release); + FREE_C_HEAP_ARRAY(to_release); } struct PointerCompare { @@ -534,7 +534,7 @@ TEST_VM_F(OopStorageTest, invalid_malloc_pointer) { oop* ptr = reinterpret_cast(align_down(mem + 250, sizeof(oop))); // Predicate returns false for some malloc'ed block. EXPECT_EQ(OopStorage::INVALID_ENTRY, storage().allocation_status(ptr)); - FREE_C_HEAP_ARRAY(char, mem); + FREE_C_HEAP_ARRAY(mem); } TEST_VM_F(OopStorageTest, invalid_random_pointer) { diff --git a/test/hotspot/gtest/gc/shared/test_oopStorage_parperf.cpp b/test/hotspot/gtest/gc/shared/test_oopStorage_parperf.cpp index 3f049eda6ea..72dd61c5cf4 100644 --- a/test/hotspot/gtest/gc/shared/test_oopStorage_parperf.cpp +++ b/test/hotspot/gtest/gc/shared/test_oopStorage_parperf.cpp @@ -137,7 +137,7 @@ public: } ~Task() { - FREE_C_HEAP_ARRAY(Tickspan, _worker_times); + FREE_C_HEAP_ARRAY(_worker_times); } virtual void work(uint worker_id) { diff --git a/test/hotspot/gtest/gc/shenandoah/test_shenandoahMarkBitMap.cpp b/test/hotspot/gtest/gc/shenandoah/test_shenandoahMarkBitMap.cpp index 18cf3b3333f..d395bd27db2 100644 --- a/test/hotspot/gtest/gc/shenandoah/test_shenandoahMarkBitMap.cpp +++ b/test/hotspot/gtest/gc/shenandoah/test_shenandoahMarkBitMap.cpp @@ -555,7 +555,7 @@ public: 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); + FREE_C_HEAP_ARRAY(my_bitmap_memory); _success = true; return true; } diff --git a/test/hotspot/gtest/logging/logTestFixture.cpp b/test/hotspot/gtest/logging/logTestFixture.cpp index 77cc3ee1f75..5a50d050511 100644 --- a/test/hotspot/gtest/logging/logTestFixture.cpp +++ b/test/hotspot/gtest/logging/logTestFixture.cpp @@ -116,7 +116,7 @@ void LogTestFixture::clear_snapshot() { for (size_t i = 0; i < _n_snapshots; i++) { os::free(_configuration_snapshot[i]); } - FREE_C_HEAP_ARRAY(char*, _configuration_snapshot); + FREE_C_HEAP_ARRAY(_configuration_snapshot); _configuration_snapshot = nullptr; _n_snapshots = 0; } diff --git a/test/hotspot/gtest/logging/logTestUtils.inline.hpp b/test/hotspot/gtest/logging/logTestUtils.inline.hpp index 93cace9c689..59045b3a7af 100644 --- a/test/hotspot/gtest/logging/logTestUtils.inline.hpp +++ b/test/hotspot/gtest/logging/logTestUtils.inline.hpp @@ -126,7 +126,7 @@ static inline char* read_line(FILE* fp) { char* ret = fgets(buf, buflen, fp); while (ret != nullptr && buf[strlen(buf) - 1] != '\n' && !feof(fp)) { // retry with a larger buffer - buf = REALLOC_RESOURCE_ARRAY(char, buf, buflen, buflen * 2); + buf = REALLOC_RESOURCE_ARRAY(buf, buflen, buflen * 2); buflen *= 2; // rewind to beginning of line fseek(fp, pos, SEEK_SET); diff --git a/test/hotspot/gtest/logging/test_asynclog.cpp b/test/hotspot/gtest/logging/test_asynclog.cpp index 2634b8dac77..61502f37d80 100644 --- a/test/hotspot/gtest/logging/test_asynclog.cpp +++ b/test/hotspot/gtest/logging/test_asynclog.cpp @@ -234,7 +234,7 @@ TEST_VM_F(AsyncLogTest, logBuffer) { EXPECT_FALSE(buffer->iterator().hasNext()); delete output; // close file - FREE_C_HEAP_ARRAY(char, name); + FREE_C_HEAP_ARRAY(name); const char* strs[4]; strs[0] = "a log line"; diff --git a/test/hotspot/gtest/logging/test_logMessageTest.cpp b/test/hotspot/gtest/logging/test_logMessageTest.cpp index 8ac92f66665..2bc644d9d0c 100644 --- a/test/hotspot/gtest/logging/test_logMessageTest.cpp +++ b/test/hotspot/gtest/logging/test_logMessageTest.cpp @@ -158,7 +158,7 @@ TEST_VM_F(LogMessageTest, long_message) { const char* expected[] = { start_marker, "0123456789", end_marker, nullptr }; EXPECT_TRUE(file_contains_substrings_in_order(_level_filename[LogLevel::Trace], expected)) << "unable to print long line"; - FREE_C_HEAP_ARRAY(char, data); + FREE_C_HEAP_ARRAY(data); } TEST_VM_F(LogMessageTest, message_with_many_lines) { diff --git a/test/hotspot/gtest/memory/test_arena.cpp b/test/hotspot/gtest/memory/test_arena.cpp index 9773aa2d027..abd108a698f 100644 --- a/test/hotspot/gtest/memory/test_arena.cpp +++ b/test/hotspot/gtest/memory/test_arena.cpp @@ -306,9 +306,9 @@ TEST_VM(Arena, random_allocs) { } // Free temp data - FREE_C_HEAP_ARRAY(char*, ptrs); - FREE_C_HEAP_ARRAY(size_t, sizes); - FREE_C_HEAP_ARRAY(size_t, alignments); + FREE_C_HEAP_ARRAY(ptrs); + FREE_C_HEAP_ARRAY(sizes); + FREE_C_HEAP_ARRAY(alignments); } #ifndef LP64 diff --git a/test/hotspot/gtest/metaspace/metaspaceGtestCommon.hpp b/test/hotspot/gtest/metaspace/metaspaceGtestCommon.hpp index 4c9bf67997b..cfa70919bed 100644 --- a/test/hotspot/gtest/metaspace/metaspaceGtestCommon.hpp +++ b/test/hotspot/gtest/metaspace/metaspaceGtestCommon.hpp @@ -42,7 +42,7 @@ public: _arr = NEW_C_HEAP_ARRAY(char, len, mtInternal); memset(_arr, 0, _len); } - ~TestMap() { FREE_C_HEAP_ARRAY(char, _arr); } + ~TestMap() { FREE_C_HEAP_ARRAY(_arr); } int get_num_set(size_t from, size_t to) const { int result = 0; @@ -193,7 +193,7 @@ public: } ~FeederBuffer() { - FREE_C_HEAP_ARRAY(MetaWord, _buf); + FREE_C_HEAP_ARRAY(_buf); } MetaWord* get(size_t word_size) { diff --git a/test/hotspot/gtest/metaspace/metaspaceGtestSparseArray.hpp b/test/hotspot/gtest/metaspace/metaspaceGtestSparseArray.hpp index 6ca6b68baa3..c4ddca624aa 100644 --- a/test/hotspot/gtest/metaspace/metaspaceGtestSparseArray.hpp +++ b/test/hotspot/gtest/metaspace/metaspaceGtestSparseArray.hpp @@ -100,7 +100,7 @@ public: } ~SparseArray() { - FREE_C_HEAP_ARRAY(T, _slots); + FREE_C_HEAP_ARRAY(_slots); } T at(int i) { return _slots[i]; } @@ -165,4 +165,3 @@ public: }; #endif // GTEST_METASPACE_METASPACEGTESTSPARSEARRAY_HPP - diff --git a/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp b/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp index c8711004f10..23575fe2c13 100644 --- a/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp +++ b/test/hotspot/gtest/nmt/test_nmt_locationprinting.cpp @@ -63,7 +63,7 @@ static void test_for_live_c_heap_block(size_t sz, ssize_t offset) { // NMT disabled: we should see nothing. test_pointer(c + offset, false, ""); } - FREE_C_HEAP_ARRAY(char, c); + FREE_C_HEAP_ARRAY(c); } #ifdef LINUX @@ -90,7 +90,7 @@ static void test_for_dead_c_heap_block(size_t sz, ssize_t offset) { test_pointer(c + offset, true, expected_string); hdr->revive(); - FREE_C_HEAP_ARRAY(char, c); + FREE_C_HEAP_ARRAY(c); } #endif diff --git a/test/hotspot/gtest/nmt/test_nmtpreinitmap.cpp b/test/hotspot/gtest/nmt/test_nmtpreinitmap.cpp index c37f5772a5d..6bf42c6f044 100644 --- a/test/hotspot/gtest/nmt/test_nmtpreinitmap.cpp +++ b/test/hotspot/gtest/nmt/test_nmtpreinitmap.cpp @@ -110,7 +110,7 @@ TEST_VM(NMTPreInit, stress_test_map) { print_and_check_table(table, 0); - FREE_C_HEAP_ARRAY(NMTPreInitAllocation*, allocations); + FREE_C_HEAP_ARRAY(allocations); } #ifdef ASSERT diff --git a/test/hotspot/gtest/oops/test_instanceKlass.cpp b/test/hotspot/gtest/oops/test_instanceKlass.cpp index 14fbd7ed53c..ac489b786fd 100644 --- a/test/hotspot/gtest/oops/test_instanceKlass.cpp +++ b/test/hotspot/gtest/oops/test_instanceKlass.cpp @@ -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 @@ -29,6 +29,7 @@ #include "oops/instanceKlass.hpp" #include "oops/klass.inline.hpp" #include "oops/method.hpp" +#include "runtime/fieldDescriptor.hpp" #include "runtime/interfaceSupport.inline.hpp" #include "unittest.hpp" @@ -69,6 +70,79 @@ TEST_VM(InstanceKlass, class_loader_printer) { #endif } +TEST_VM(InstanceKlass, class_flag_printer) { + JavaThread* THREAD = JavaThread::current(); + ThreadInVMfromNative scope(THREAD); + ResourceMark rm; + stringStream st; + + vmClasses::String_klass()->print_class_flags(&st); + ASSERT_STREQ("public final ", st.base()); + + st.reset(); + vmClasses::Runnable_klass()->print_class_flags(&st); + ASSERT_STREQ("public interface abstract ", st.base()); + + st.reset(); + Symbol* override_symbol = SymbolTable::new_symbol("java/lang/Override"); + Klass* override_klass = SystemDictionary::resolve_or_fail(override_symbol, true, THREAD); + ASSERT_FALSE(THREAD->has_pending_exception()) << "java/lang/Override must resolve"; + InstanceKlass::cast(override_klass)->print_class_flags(&st); + ASSERT_STREQ("public interface abstract annotation ", st.base()); + + st.reset(); + Symbol* thread_state_symbol = SymbolTable::new_symbol("java/lang/Thread$State"); + Klass* thread_state_klass = SystemDictionary::resolve_or_fail(thread_state_symbol, true, THREAD); + ASSERT_FALSE(THREAD->has_pending_exception()) << "java/lang/Thread$State must resolve"; + InstanceKlass::cast(thread_state_klass)->print_class_flags(&st); + ASSERT_STREQ("public static final enum ", st.base()); + + st.reset(); + Symbol* certificate_rep_symbol = SymbolTable::new_symbol("java/security/cert/Certificate$CertificateRep"); + Klass* certificate_rep_klass = SystemDictionary::resolve_or_fail(certificate_rep_symbol, true, THREAD); + ASSERT_FALSE(THREAD->has_pending_exception()) << "java/security/cert/Certificate$CertificateRep must resolve"; + InstanceKlass::cast(certificate_rep_klass)->print_class_flags(&st); + ASSERT_STREQ("protected static ", st.base()); + + st.reset(); + Symbol* arrays_array_list_symbol = SymbolTable::new_symbol("java/util/Arrays$ArrayList"); + Klass* arrays_array_list_klass = SystemDictionary::resolve_or_fail(arrays_array_list_symbol, true, THREAD); + ASSERT_FALSE(THREAD->has_pending_exception()) << "java/util/Arrays$ArrayList must resolve"; + InstanceKlass::cast(arrays_array_list_klass)->print_class_flags(&st); + ASSERT_STREQ("private static ", st.base()); +} + +TEST_VM(FieldDescriptor, access_flag_printer) { + JavaThread* THREAD = JavaThread::current(); + ThreadInVMfromNative scope(THREAD); + ResourceMark rm; + stringStream st; + + InstanceKlass* integer_klass = vmClasses::Integer_klass(); + Symbol* min_value_symbol = SymbolTable::new_symbol("MIN_VALUE"); + + fieldDescriptor fd; + ASSERT_TRUE(integer_klass->find_local_field(min_value_symbol, vmSymbols::int_signature(), &fd)) + << "Integer.MIN_VALUE must exist"; + fd.print_on(&st); + ASSERT_THAT(st.base(), HasSubstr("public static final 'MIN_VALUE' 'I'")) << "Must print field access flags"; + + st.reset(); + Symbol* thread_state_symbol = SymbolTable::new_symbol("java/lang/Thread$State"); + Klass* thread_state_klass = SystemDictionary::resolve_or_fail(thread_state_symbol, true, THREAD); + ASSERT_FALSE(THREAD->has_pending_exception()) << "java/lang/Thread$State must resolve"; + + fieldDescriptor enum_fd; + Symbol* enum_symbol = SymbolTable::new_symbol("NEW"); + Symbol* enum_signature = SymbolTable::new_symbol("Ljava/lang/Thread$State;"); + ASSERT_TRUE(InstanceKlass::cast(thread_state_klass)->find_local_field(enum_symbol, enum_signature, &enum_fd)) + << "Thread.State.NEW must exist"; + + enum_fd.print_on(&st); + ASSERT_THAT(st.base(), HasSubstr("public static final enum 'NEW' 'Ljava/lang/Thread$State;'")) + << "Must print enum field access flags"; +} + #ifndef PRODUCT // This class is friends with Method. class MethodTest : public ::testing::Test{ @@ -85,4 +159,40 @@ TEST_VM(Method, method_name) { ASSERT_TRUE(method != nullptr) << "Object must have toString"; MethodTest::compare_names(method, tostring); } + +TEST_VM(Method, access_flag_printer) { + ThreadInVMfromNative scope(JavaThread::current()); + ResourceMark rm; + stringStream st; + + InstanceKlass* object_klass = vmClasses::Object_klass(); + Symbol* wait_symbol = SymbolTable::new_symbol("wait"); + Method* wait_method = object_klass->find_method(wait_symbol, vmSymbols::long_void_signature()); + ASSERT_TRUE(wait_method != nullptr) << "Object must have wait(long)"; + wait_method->print_access_flags(&st); + ASSERT_STREQ("public final ", st.base()); + + st.reset(); + Symbol* symbol_hash_code = SymbolTable::new_symbol("hashCode"); + Method* hash_code = object_klass->find_method(symbol_hash_code, vmSymbols::void_int_signature()); + ASSERT_TRUE(hash_code != nullptr) << "Object must have hashCode()"; + hash_code->print_access_flags(&st); + ASSERT_STREQ("public native ", st.base()); + + st.reset(); + InstanceKlass* string_klass = vmClasses::String_klass(); + Symbol* format_symbol = SymbolTable::new_symbol("format"); + Symbol* format_signature = SymbolTable::new_symbol("(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;"); + Method* format_method = string_klass->find_method(format_symbol, format_signature); + ASSERT_TRUE(format_method != nullptr) << "String must have format(String, Object...)"; + format_method->print_access_flags(&st); + ASSERT_STREQ("public static varargs ", st.base()); + + st.reset(); + Symbol* compare_to_symbol = SymbolTable::new_symbol("compareTo"); + Method* compare_to_bridge_method = string_klass->find_method(compare_to_symbol, vmSymbols::object_int_signature()); + ASSERT_TRUE(compare_to_bridge_method != nullptr) << "String must have bridge compareTo(Object)"; + compare_to_bridge_method->print_access_flags(&st); + ASSERT_STREQ("public bridge synthetic ", st.base()); +} #endif diff --git a/test/hotspot/gtest/opto/test_regmask.cpp b/test/hotspot/gtest/opto/test_regmask.cpp index f367ca4bef4..b5d8cd091d6 100644 --- a/test/hotspot/gtest/opto/test_regmask.cpp +++ b/test/hotspot/gtest/opto/test_regmask.cpp @@ -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 @@ -253,6 +253,32 @@ TEST_VM(RegMask, find_first_set) { ASSERT_EQ(rm.find_first_set(lrg, 4), OptoReg::Name(19)); } +TEST_VM(RegMask, find_first_set_scalable_vector) { + RegMask rm; + LRG lrg{}; // Zero initialize + lrg._is_scalable = 1; + lrg._is_vector = 1; + lrg.set_num_regs(RegMask::SlotsPerVecA); + // This test only runs on hardware with scalable vector support (e.g., + // AArch64, RISC-V). This condition ensures the expected execution path in + // RegMask::find_first_set(). + if (lrg.is_scalable()) { + rm.insert(OptoReg::Name(rm.rm_size_in_bits() - 4)); + rm.insert(OptoReg::Name(rm.rm_size_in_bits() - 3)); + rm.insert(OptoReg::Name(rm.rm_size_in_bits() - 2)); + rm.insert(OptoReg::Name(rm.rm_size_in_bits() - 1)); + // Case-1: The physical length of scalable vector registers equals to + // RegMask::SlotsPerVecA, e.g., AArch64 Neoverse-V2. + uint scalable_reg_slots = RegMask::SlotsPerVecA; + ASSERT_EQ(rm.find_first_set(lrg, scalable_reg_slots), + OptoReg::Name(rm.rm_size_in_bits() - 1)); + // Case-2: The physical length of scalable vector registers is bigger than + // RegMask::SlotsPerVecA, e.g., AArch64 Neoverse-V1. + scalable_reg_slots = RegMask::SlotsPerVecA * 2; + ASSERT_EQ(rm.find_first_set(lrg, scalable_reg_slots), OptoReg::Bad); + } +} + TEST_VM(RegMask, alignment) { RegMask rm; rm.insert(OptoReg::Name(30)); diff --git a/test/hotspot/gtest/runtime/test_os.cpp b/test/hotspot/gtest/runtime/test_os.cpp index 094f16a4262..26c8fb8cd72 100644 --- a/test/hotspot/gtest/runtime/test_os.cpp +++ b/test/hotspot/gtest/runtime/test_os.cpp @@ -746,7 +746,7 @@ static void test_show_mappings(address start, size_t size) { #endif // buf[buflen - 1] = '\0'; // tty->print_raw(buf); - FREE_C_HEAP_ARRAY(char, buf); + FREE_C_HEAP_ARRAY(buf); } TEST_VM(os, show_mappings_small_range) { diff --git a/test/hotspot/gtest/runtime/test_os_windows.cpp b/test/hotspot/gtest/runtime/test_os_windows.cpp index 13574dcbdb3..7541caae286 100644 --- a/test/hotspot/gtest/runtime/test_os_windows.cpp +++ b/test/hotspot/gtest/runtime/test_os_windows.cpp @@ -28,6 +28,7 @@ #include "runtime/flags/flagSetting.hpp" #include "runtime/globals_extension.hpp" #include "runtime/os.inline.hpp" +#include "runtime/safefetch.hpp" #include "concurrentTestRunner.inline.hpp" #include "unittest.hpp" @@ -840,4 +841,36 @@ TEST_VM(os_windows, reserve_memory_special_concurrent) { testRunner.run(); } +TEST_VM(os_windows, SafeFetchN_with_page_guard_protection) { + const DWORD page_size = (DWORD)os::vm_page_size(); + + void* p = ::VirtualAlloc(nullptr, page_size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + ASSERT_NE(p, nullptr) << "VirtualAlloc failed"; + + DWORD old_protect; + BOOL res = ::VirtualProtect(p, page_size, PAGE_READWRITE | PAGE_GUARD, &old_protect); + ASSERT_TRUE(res) << "VirtualProtect failed"; + + intptr_t result = SafeFetchN((intptr_t*)p, -1); + ASSERT_EQ((intptr_t)-1, result) << "SafeFetchN should return errValue for a page protected with PAGE_GUARD"; + + ::VirtualFree(p, 0, MEM_RELEASE); +} + +TEST_VM(os_windows, SafeFetch32_with_page_guard_protection) { + const DWORD page_size = (DWORD)os::vm_page_size(); + + void* p = ::VirtualAlloc(nullptr, page_size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + ASSERT_NE(p, nullptr) << "VirtualAlloc failed"; + + DWORD old_protect; + BOOL res = ::VirtualProtect(p, page_size, PAGE_READWRITE | PAGE_GUARD, &old_protect); + ASSERT_TRUE(res) << "VirtualProtect failed"; + + int result = SafeFetch32((int*)p, -1); + ASSERT_EQ(-1, result) << "SafeFetch32 should return errValue for a page protected with PAGE_GUARD"; + + ::VirtualFree(p, 0, MEM_RELEASE); +} + #endif diff --git a/test/hotspot/gtest/threadHelper.inline.hpp b/test/hotspot/gtest/threadHelper.inline.hpp index 07764c45a7a..cc11b0f6ff5 100644 --- a/test/hotspot/gtest/threadHelper.inline.hpp +++ b/test/hotspot/gtest/threadHelper.inline.hpp @@ -169,7 +169,7 @@ public: } } ~TestThreadGroup() { - FREE_C_HEAP_ARRAY(BasicTestThread*, _threads); + FREE_C_HEAP_ARRAY(_threads); } void doit() { diff --git a/test/hotspot/gtest/utilities/test_bitMap_popcnt.cpp b/test/hotspot/gtest/utilities/test_bitMap_popcnt.cpp index 7f2b0eedaa4..bd5c80093d4 100644 --- a/test/hotspot/gtest/utilities/test_bitMap_popcnt.cpp +++ b/test/hotspot/gtest/utilities/test_bitMap_popcnt.cpp @@ -42,7 +42,7 @@ public: } ~SimpleFakeBitmap() { - FREE_C_HEAP_ARRAY(char, _buffer); + FREE_C_HEAP_ARRAY(_buffer); } // Set or clear the specified bit. diff --git a/test/hotspot/gtest/utilities/test_concurrentHashtable.cpp b/test/hotspot/gtest/utilities/test_concurrentHashtable.cpp index 8094e93b944..163b11c213e 100644 --- a/test/hotspot/gtest/utilities/test_concurrentHashtable.cpp +++ b/test/hotspot/gtest/utilities/test_concurrentHashtable.cpp @@ -609,7 +609,7 @@ class ValueSaver { _vals[_it++] = *val; if (_it == _size) { _size *= 2; - _vals = REALLOC_RESOURCE_ARRAY(uintptr_t, _vals, _size/2, _size); + _vals = REALLOC_RESOURCE_ARRAY(_vals, _size/2, _size); } return true; } diff --git a/test/hotspot/gtest/utilities/test_lockFreeStack.cpp b/test/hotspot/gtest/utilities/test_lockFreeStack.cpp index bdba49b48c0..3c3558f0018 100644 --- a/test/hotspot/gtest/utilities/test_lockFreeStack.cpp +++ b/test/hotspot/gtest/utilities/test_lockFreeStack.cpp @@ -300,5 +300,5 @@ TEST_VM(LockFreeStackTest, stress) { ASSERT_EQ(nelements, final_stack.length()); while (final_stack.pop() != nullptr) {} - FREE_C_HEAP_ARRAY(Element, elements); + FREE_C_HEAP_ARRAY(elements); } diff --git a/test/hotspot/gtest/utilities/test_quicksort.cpp b/test/hotspot/gtest/utilities/test_quicksort.cpp index acdd6a315e5..a84d5ecef92 100644 --- a/test/hotspot/gtest/utilities/test_quicksort.cpp +++ b/test/hotspot/gtest/utilities/test_quicksort.cpp @@ -129,7 +129,7 @@ TEST(QuickSort, random) { // Compare sorting to stdlib::qsort() qsort(expected_array, length, sizeof(int), test_stdlib_comparator); EXPECT_TRUE(sort_and_compare(test_array, expected_array, length, test_comparator)); - FREE_C_HEAP_ARRAY(int, test_array); - FREE_C_HEAP_ARRAY(int, expected_array); + FREE_C_HEAP_ARRAY(test_array); + FREE_C_HEAP_ARRAY(expected_array); } } diff --git a/test/hotspot/gtest/utilities/test_rbtree.cpp b/test/hotspot/gtest/utilities/test_rbtree.cpp index 7eca5f54831..bb306935f45 100644 --- a/test/hotspot/gtest/utilities/test_rbtree.cpp +++ b/test/hotspot/gtest/utilities/test_rbtree.cpp @@ -851,6 +851,46 @@ public: tree.verify_self(); } + void test_update_key() { + RBTreeInt tree; + + tree.upsert(10, 10); + tree.upsert(20, 20); + tree.upsert(30, 30); + + RBTreeIntNode* node = tree.find_node(20); + EXPECT_NOT_NULL(node); + + tree.update_key(node, 25); + + EXPECT_NULL(tree.find_node(20)); + + RBTreeIntNode* updated_node = tree.find_node(25); + EXPECT_NOT_NULL(updated_node); + EXPECT_EQ(updated_node, node); + + EXPECT_EQ(25, updated_node->key()); + EXPECT_EQ(20, updated_node->val()); + + RBTreeInt::Cursor cursor = tree.cursor(10); + EXPECT_TRUE(cursor.found()); + + tree.update_key(cursor, 20); + + EXPECT_FALSE(tree.cursor(10).found()); + + RBTreeInt::Cursor updated_cursor = tree.cursor(20); + EXPECT_TRUE(updated_cursor.found()); + + RBTreeIntNode* updated_cursor_node = updated_cursor.node(); + EXPECT_EQ(updated_cursor_node, cursor.node()); + + EXPECT_EQ(20, updated_cursor_node->key()); + EXPECT_EQ(10, updated_cursor_node->val()); + + tree.verify_self(); + } + void test_intrusive() { IntrusiveTreeInt intrusive_tree; int num_iterations = 100; @@ -1167,11 +1207,30 @@ TEST_VM_F(RBTreeTest, CursorReplace) { this->test_cursor_replace(); } +TEST_VM_F(RBTreeTest, UpdateKey) { + this->test_update_key(); +} + #ifdef ASSERT TEST_VM_F(RBTreeTest, NodesVisitedOnce) { this->test_nodes_visited_once(); } +TEST_VM_ASSERT_MSG(RBTreeTestNonFixture, UpdateKeyAssert, + ".*updated key not LT next node's key.*") { + typedef RBTreeCHeap TreeType; + + TreeType tree; + tree.upsert(10, 10); + tree.upsert(20, 20); + tree.upsert(30, 30); + + RBNode* node = tree.find_node(20); + ASSERT_NOT_NULL(node); + + tree.update_key(node, 35); +} + TEST_VM_ASSERT_MSG(RBTreeTestNonFixture, CustomVerifyAssert, ".*failed on key = 7") { typedef RBTreeCHeap TreeType; typedef RBNode NodeType; diff --git a/test/hotspot/gtest/utilities/test_unsigned5.cpp b/test/hotspot/gtest/utilities/test_unsigned5.cpp index f3859d0a750..d3288e1f8c7 100644 --- a/test/hotspot/gtest/utilities/test_unsigned5.cpp +++ b/test/hotspot/gtest/utilities/test_unsigned5.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2025, 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 @@ -221,6 +221,46 @@ TEST_VM(unsigned5, reader) { ASSERT_EQ(x, y) << i; } ASSERT_TRUE(i < LEN); + + { // Begin try_skip() test. + i = 0; + int skipped = 0; + r1.set_position(0); + // Skip from beginning to ith position. + for (; i < LEN; i++) { + skipped = r1.try_skip(i); + ASSERT_EQ(i, skipped); + const int x = r1.next_uint(); + const int y = ints[i]; + ASSERT_EQ(x, y) << i; + r1.set_position(0); + } + // Perform incremental skips. + int skipped_total = 0; + while (true) { + const int skip = skipped_total % 9; + skipped = r1.try_skip(skip); + skipped_total += skipped; + if (skipped_total > LEN - 1) { + r1.set_position(0); + break; + } + ASSERT_EQ(skip, skipped); + const int x = r1.next_uint(); + const int y = ints[skipped_total]; + ASSERT_EQ(x, y) << skipped_total; + // Update skipped_total because reader + // moved one position when reading x. + ++skipped_total; + } + // Underflow. + skipped = r1.try_skip(-1); + ASSERT_EQ(0, skipped) << skipped; + // Overflow. + skipped = r1.try_skip(LEN + 1); + ASSERT_EQ(LEN, skipped) << skipped; + } // End try_skip() test. + // copy from reader to writer UNSIGNED5::Reader r3(buf); int array_limit = 1; diff --git a/test/hotspot/jtreg/ProblemList-AotJdk.txt b/test/hotspot/jtreg/ProblemList-AotJdk.txt index 0a2177b8edb..3ebe405a046 100644 --- a/test/hotspot/jtreg/ProblemList-AotJdk.txt +++ b/test/hotspot/jtreg/ProblemList-AotJdk.txt @@ -62,10 +62,14 @@ compiler/arraycopy/TestCloneWithStressReflectiveCode.java 8323727 generic-all # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/hotspot/jtreg/ProblemList-StaticJdk.txt b/test/hotspot/jtreg/ProblemList-StaticJdk.txt index a6112169f8d..ce22258d04a 100644 --- a/test/hotspot/jtreg/ProblemList-StaticJdk.txt +++ b/test/hotspot/jtreg/ProblemList-StaticJdk.txt @@ -41,10 +41,14 @@ gtest/NMTGtests.java#nmt-summary 8356201 generic-all # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/hotspot/jtreg/ProblemList-Virtual.txt b/test/hotspot/jtreg/ProblemList-Virtual.txt index 7c4846a9fb2..c6bea25d275 100644 --- a/test/hotspot/jtreg/ProblemList-Virtual.txt +++ b/test/hotspot/jtreg/ProblemList-Virtual.txt @@ -82,10 +82,14 @@ vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended002/TestDescription.ja # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/hotspot/jtreg/ProblemList-Xcomp.txt b/test/hotspot/jtreg/ProblemList-Xcomp.txt index e4f1774e6e0..f9a4d5ec2a9 100644 --- a/test/hotspot/jtreg/ProblemList-Xcomp.txt +++ b/test/hotspot/jtreg/ProblemList-Xcomp.txt @@ -52,10 +52,14 @@ gc/arguments/TestNewSizeFlags.java 8299116 macosx-aarch64 # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/hotspot/jtreg/ProblemList-enable-preview.txt b/test/hotspot/jtreg/ProblemList-enable-preview.txt index 1a831a0dde3..b28670c9839 100644 --- a/test/hotspot/jtreg/ProblemList-enable-preview.txt +++ b/test/hotspot/jtreg/ProblemList-enable-preview.txt @@ -23,10 +23,13 @@ ############################################################################# # -# List of quarantined tests for testing with --enable-preview +# List of quarantined tests for testing with the '--enable-preview' option +# where the option IS specified in the task definition and NOT in the test. # -# These are failures that ONLY occur with the '--enable-preview' option -# specified. There are separate sub-sections for each preview project. +# If the '--enable-preview' option is NOT specified in the task definition, +# and the option IS specified in the test, then an entry here WILL NOT work. +# +# There are separate sub-sections for each preview project. # ############################################################################# diff --git a/test/hotspot/jtreg/ProblemList-jvmti-stress-agent.txt b/test/hotspot/jtreg/ProblemList-jvmti-stress-agent.txt index d8779a873cd..a30d6dfecff 100644 --- a/test/hotspot/jtreg/ProblemList-jvmti-stress-agent.txt +++ b/test/hotspot/jtreg/ProblemList-jvmti-stress-agent.txt @@ -100,10 +100,14 @@ serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorVMEventsTest.java#id1 # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/hotspot/jtreg/ProblemList-zgc.txt b/test/hotspot/jtreg/ProblemList-zgc.txt index 8514ffce11c..351ef2a540c 100644 --- a/test/hotspot/jtreg/ProblemList-zgc.txt +++ b/test/hotspot/jtreg/ProblemList-zgc.txt @@ -43,10 +43,14 @@ compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInf # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index 202570d6486..8c86d6aadde 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -47,8 +47,8 @@ compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java 8225370 generic- compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java 8190680 generic-all -compiler/runtime/Test8168712.java#with-dtrace 8211769,8211771 generic-ppc64,generic-ppc64le,linux-s390x -compiler/runtime/Test8168712.java#without-dtrace 8211769,8211771 generic-ppc64,generic-ppc64le,linux-s390x +compiler/runtime/Test8168712.java#with-dtrace 8211771 linux-s390x +compiler/runtime/Test8168712.java#without-dtrace 8211771 linux-s390x compiler/runtime/Test7196199.java 8365196 windows-x64 compiler/c2/Test8004741.java 8235801 generic-all @@ -62,6 +62,8 @@ compiler/vectorization/TestVectorAlgorithms.java#noSuperWord 8376803 aix-ppc64,l compiler/vectorization/TestVectorAlgorithms.java#vanilla 8376803 aix-ppc64,linux-s390x compiler/vectorization/TestVectorAlgorithms.java#noOptimizeFill 8376803 aix-ppc64,linux-s390x +compiler/vectorapi/TestVectorLongToMaskNodeIdealization.java 8384428 generic-x64 + compiler/jvmci/TestUncaughtErrorInCompileMethod.java 8309073 generic-all compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java 8331704 linux-riscv64 compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java 8331704 linux-riscv64 @@ -95,7 +97,10 @@ gc/TestAllocHumongousFragment.java#aggressive 8298781 generic-all gc/TestAllocHumongousFragment.java#g1 8298781 generic-all gc/TestAllocHumongousFragment.java#static 8298781 generic-all gc/shenandoah/oom/TestAllocOutOfMemory.java#large 8344312 linux-ppc64le -gc/shenandoah/TestEvilSyncBug.java#generational 8345501 generic-all +gc/stress/jfr/TestStressAllocationGCEventsWithShenandoah.java#generational 8382335 generic-all +gc/stress/jfr/TestStressAllocationGCEventsWithShenandoah.java#default 8382335 generic-all +gc/stress/jfr/TestStressBigAllocationGCEventsWithShenandoah.java#generational 8382335 generic-all +gc/stress/jfr/TestStressBigAllocationGCEventsWithShenandoah.java#default 8382335 generic-all ############################################################################# @@ -112,6 +117,7 @@ runtime/os/TestTracePageSizes.java#Serial 8267460 linux-aarch64 runtime/StackGuardPages/TestStackGuardPagesNative.java 8303612 linux-all runtime/ErrorHandling/MachCodeFramesInErrorFile.java 8313315 linux-ppc64le runtime/NMT/VirtualAllocCommitMerge.java 8309698 linux-s390x +runtime/Thread/TestAlwaysPreTouchStacks.java 8383372 macosx-aarch64 applications/ctw/modules/jdk_jfr.java 8286300 linux-s390x applications/jcstress/copy.java 8229852 linux-all @@ -190,9 +196,13 @@ vmTestbase/nsk/monitoring/ThreadMXBean/findMonitorDeadlockedThreads/find006/Test # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/hotspot/jtreg/TEST.groups b/test/hotspot/jtreg/TEST.groups index 6623676d2ba..a1aff165445 100644 --- a/test/hotspot/jtreg/TEST.groups +++ b/test/hotspot/jtreg/TEST.groups @@ -73,7 +73,8 @@ hotspot_misc = \ -:hotspot_gc \ -:hotspot_runtime \ -:hotspot_serviceability \ - -:hotspot_containers + -:hotspot_containers \ + -:hotspot_resourcehogs hotspot_native_sanity = \ native_sanity diff --git a/test/hotspot/jtreg/compiler/arguments/CheckCICompilerCount.java b/test/hotspot/jtreg/compiler/arguments/CheckCICompilerCount.java index 6f137e20261..ef9389542c4 100644 --- a/test/hotspot/jtreg/compiler/arguments/CheckCICompilerCount.java +++ b/test/hotspot/jtreg/compiler/arguments/CheckCICompilerCount.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, 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 @@ -23,7 +23,7 @@ /* * @test CheckCheckCICompilerCount - * @bug 8130858 8132525 8162881 + * @bug 8130858 8132525 8162881 8379396 * @summary Check that correct range of values for CICompilerCount are allowed depending on whether tiered is enabled or not * @library /test/lib / * @requires vm.flagless @@ -186,7 +186,25 @@ public class CheckCICompilerCount { 0 }; - private static void verifyValidOption(String[] arguments, String expected_output, int exit, boolean tiered) throws Exception { + private static final String[][] INVALID_ARGUMENTS = { + { + "-XX:CICompilerCount=100M", + "-version" + }, + }; + + private static final String[] INVALID_EXPECTED_OUTPUTS = { + // "CICompilerCount is too large" is a common prefix for two different messages: + // - product build: flag constraint fires early: "CICompilerCount is too large for current active processor count N" + // - debug build: CodeCache overflow guard fires: "CICompilerCount is too large: compiler buffer size exceeds the CodeCache size limit" + "CICompilerCount is too large" + }; + + private static final int[] INVALID_EXIT = { + 1, + }; + + private static void verifyOptionBehavior(String[] arguments, String expected_output, int exit, boolean tiered) throws Exception { ProcessBuilder pb; OutputAnalyzer out; @@ -215,11 +233,15 @@ public class CheckCICompilerCount { } for (int i = 0; i < NON_TIERED_ARGUMENTS.length; i++) { - verifyValidOption(NON_TIERED_ARGUMENTS[i], NON_TIERED_EXPECTED_OUTPUTS[i], NON_TIERED_EXIT[i], false); + verifyOptionBehavior(NON_TIERED_ARGUMENTS[i], NON_TIERED_EXPECTED_OUTPUTS[i], NON_TIERED_EXIT[i], false); } for (int i = 0; i < TIERED_ARGUMENTS.length; i++) { - verifyValidOption(TIERED_ARGUMENTS[i], TIERED_EXPECTED_OUTPUTS[i], TIERED_EXIT[i], true); + verifyOptionBehavior(TIERED_ARGUMENTS[i], TIERED_EXPECTED_OUTPUTS[i], TIERED_EXIT[i], true); + } + + for (int i = 0; i < INVALID_ARGUMENTS.length; i++) { + verifyOptionBehavior(INVALID_ARGUMENTS[i], INVALID_EXPECTED_OUTPUTS[i], INVALID_EXIT[i], true); } } } diff --git a/test/hotspot/jtreg/compiler/arguments/TestUseCountTrailingZerosInstructionOnSupportedCPU.java b/test/hotspot/jtreg/compiler/arguments/TestUseCountTrailingZerosInstructionOnSupportedCPU.java index 2d344b73802..558c1501314 100644 --- a/test/hotspot/jtreg/compiler/arguments/TestUseCountTrailingZerosInstructionOnSupportedCPU.java +++ b/test/hotspot/jtreg/compiler/arguments/TestUseCountTrailingZerosInstructionOnSupportedCPU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, 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 @@ -67,14 +67,14 @@ public class TestUseCountTrailingZerosInstructionOnSupportedCPU TestUseCountTrailingZerosInstructionOnSupportedCPU.DISABLE_BMI); /* - Verify that option could be turned on even if other BMI1 - instructions were turned off. VM will be launched with following + Verify that option cannot be turned on when BMI1 instructions + are explicitly turned off. VM will be launched with following options: -XX:-UseBMI1Instructions -XX:+UseCountTrailingZerosInstruction -version */ - CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "true", - "Option 'UseCountTrailingZerosInstruction' should be able to " - + "be turned on even if all BMI1 instructions are " + CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", + "Option 'UseCountTrailingZerosInstruction' should have " + + "'false' value if all BMI1 instructions are " + "disabled (-XX:-UseBMI1Instructions flag used)", TestUseCountTrailingZerosInstructionOnSupportedCPU.DISABLE_BMI, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); diff --git a/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyConjoint.java b/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyConjoint.java index a6ba75df625..8dee16b0f14 100644 --- a/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyConjoint.java +++ b/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyConjoint.java @@ -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 @@ -53,8 +53,6 @@ import java.util.Random; * @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch -XX:+IgnoreUnrecognizedVMOptions * -XX:UseAVX=3 -XX:+UnlockDiagnosticVMOptions -XX:ArrayOperationPartialInlineSize=64 -XX:MaxVectorSize=64 -XX:ArrayCopyLoadStoreMaxElem=16 * compiler.arraycopy.TestArrayCopyConjoint - * @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch -XX:+UnlockExperimentalVMOptions -XX:+AlwaysAtomicAccesses - * compiler.arraycopy.TestArrayCopyConjoint * */ diff --git a/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjoint.java b/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjoint.java index 73b1af90548..31d85a40a78 100644 --- a/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjoint.java +++ b/test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyDisjoint.java @@ -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 @@ -50,8 +50,6 @@ import java.util.Random; * @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch -XX:+IgnoreUnrecognizedVMOptions * -XX:UseAVX=3 -XX:+UnlockDiagnosticVMOptions -XX:ArrayOperationPartialInlineSize=64 -XX:MaxVectorSize=64 -XX:ArrayCopyLoadStoreMaxElem=16 * compiler.arraycopy.TestArrayCopyDisjoint - * @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch -XX:+UnlockExperimentalVMOptions -XX:+AlwaysAtomicAccesses - * compiler.arraycopy.TestArrayCopyDisjoint * @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch -XX:+IgnoreUnrecognizedVMOptions * -XX:+UnlockDiagnosticVMOptions -XX:UseAVX=3 -XX:MaxVectorSize=32 -XX:ArrayOperationPartialInlineSize=32 -XX:+StressIGVN * compiler.arraycopy.TestArrayCopyDisjoint diff --git a/test/hotspot/jtreg/compiler/arraycopy/TestBlockArrayCopyMisaligned.java b/test/hotspot/jtreg/compiler/arraycopy/TestBlockArrayCopyMisaligned.java new file mode 100644 index 00000000000..0d194b19078 --- /dev/null +++ b/test/hotspot/jtreg/compiler/arraycopy/TestBlockArrayCopyMisaligned.java @@ -0,0 +1,104 @@ +/* + * 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 8380060 + * @summary C2 block arraycopy initial-word pick-off folds load to zero + * + * @run main/othervm -Xbatch -XX:+UseCompactObjectHeaders + * -XX:CompileCommand=compileonly,compiler.arraycopy.TestBlockArrayCopyMisaligned::test* + * compiler.arraycopy.TestBlockArrayCopyMisaligned + * @run main/othervm -Xbatch -XX:-UseCompactObjectHeaders + * -XX:CompileCommand=compileonly,compiler.arraycopy.TestBlockArrayCopyMisaligned::test* + * compiler.arraycopy.TestBlockArrayCopyMisaligned + */ + +package compiler.arraycopy; + +import java.util.Arrays; + +public class TestBlockArrayCopyMisaligned { + + // Byte array with enough data to exercise the block arraycopy path. + // The clone + substring pattern triggers a tightly-coupled allocation + // where the source is initialized via a raw arraycopy (clone) and the + // destination is a nozero allocation filled by a block arraycopy. + static final byte[] BYTES = new byte[] { + 108, 77, 120, 120, 100, 77, 105, 113, + 83, 97, 71, 108, 116, 107, 90, 71, + 72, 107, 73, 85, 54, 65, 61, 61 + }; + + // Test via String(byte[],hibyte,off,count) + substring. + // The deprecated String constructor clones the byte array via + // Arrays.copyOfRange; substring then does another copyOfRange + // on the clone, triggering the block arraycopy optimization. + static String testStringSubstring() { + String s = new String(BYTES, 0, 0, 24); + return s.substring(0, 23); + } + + // Test via explicit clone + Arrays.copyOfRange. + static byte[] testCloneCopyOfRange() { + byte[] clone = BYTES.clone(); + return Arrays.copyOfRange(clone, 0, 23); + } + + // Test via explicit clone + Arrays.copyOf. + static byte[] testCloneCopyOf() { + byte[] clone = BYTES.clone(); + return Arrays.copyOf(clone, 20); + } + + public static void main(String[] args) { + String golden = new String(BYTES, 0, 0, 23); + + for (int i = 0; i < 10_000; i++) { + // Test 1: String path + String result1 = testStringSubstring(); + if (!result1.equals(golden)) { + throw new RuntimeException("testStringSubstring: expected " + + golden + ", got " + result1); + } + + // Test 2: clone + copyOfRange + byte[] result2 = testCloneCopyOfRange(); + for (int j = 0; j < 23; j++) { + if (result2[j] != BYTES[j]) { + throw new RuntimeException("testCloneCopyOfRange: mismatch at index " + j + + ", expected " + BYTES[j] + ", got " + result2[j]); + } + } + + // Test 3: clone + copyOf + byte[] result3 = testCloneCopyOf(); + for (int j = 0; j < 20; j++) { + if (result3[j] != BYTES[j]) { + throw new RuntimeException("testCloneCopyOf: mismatch at index " + j + + ", expected " + BYTES[j] + ", got " + result3[j]); + } + } + } + } +} diff --git a/test/hotspot/jtreg/compiler/arraycopy/TestInstanceCloneAsLoadsStores.java b/test/hotspot/jtreg/compiler/arraycopy/TestInstanceCloneAsLoadsStores.java index 82720c921df..a5e0c8b6371 100644 --- a/test/hotspot/jtreg/compiler/arraycopy/TestInstanceCloneAsLoadsStores.java +++ b/test/hotspot/jtreg/compiler/arraycopy/TestInstanceCloneAsLoadsStores.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2022, 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 @@ -42,10 +42,6 @@ * -XX:CompileCommand=dontinline,compiler.arraycopy.TestInstanceCloneAsLoadsStores::m* * -XX:+IgnoreUnrecognizedVMOptions -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing * compiler.arraycopy.TestInstanceCloneAsLoadsStores - * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement - * -XX:CompileCommand=dontinline,compiler.arraycopy.TestInstanceCloneAsLoadsStores::m* - * -XX:+UnlockExperimentalVMOptions -XX:+AlwaysAtomicAccesses - * compiler.arraycopy.TestInstanceCloneAsLoadsStores */ package compiler.arraycopy; diff --git a/test/hotspot/jtreg/compiler/c2/TestDependsOnTestSqrtHFAssertion.java b/test/hotspot/jtreg/compiler/c2/TestDependsOnTestSqrtHFAssertion.java index 5ad9a927097..f5f6107ff0c 100644 --- a/test/hotspot/jtreg/compiler/c2/TestDependsOnTestSqrtHFAssertion.java +++ b/test/hotspot/jtreg/compiler/c2/TestDependsOnTestSqrtHFAssertion.java @@ -28,7 +28,7 @@ * @library /test/lib / * @modules jdk.incubator.vector * @requires vm.debug & vm.compiler2.enabled - * @run main/othervm --add-modules=jdk.incubator.vector compiler.c2.TestDependsOnTestSqrtHFAssertion + * @run main/othervm --add-modules=jdk.incubator.vector -Xbatch compiler.c2.TestDependsOnTestSqrtHFAssertion */ package compiler.c2; @@ -54,15 +54,15 @@ public class TestDependsOnTestSqrtHFAssertion { } } } - } + } } return res; } public static void main(String [] args) { int res = 0; - for (int i = 0 ; i < 100000; i++) { - res += micro(x1, x2, y, i); + for (int i = 0 ; i < 10000; i++) { + res += micro(x1, x2, y, i % 100); } IO.println("PASS" + res); } diff --git a/test/hotspot/jtreg/compiler/c2/irTests/TestFloat16ScalarOperations.java b/test/hotspot/jtreg/compiler/c2/irTests/TestFloat16ScalarOperations.java index 445fef5e55a..8f2bbe8a8a7 100644 --- a/test/hotspot/jtreg/compiler/c2/irTests/TestFloat16ScalarOperations.java +++ b/test/hotspot/jtreg/compiler/c2/irTests/TestFloat16ScalarOperations.java @@ -24,7 +24,7 @@ /** * @test -* @bug 8308363 8336406 +* @bug 8308363 8336406 8381617 * @summary Validate compiler IR for various Float16 scalar operations. * @modules jdk.incubator.vector * @requires vm.compiler2.enabled @@ -714,9 +714,13 @@ public class TestFloat16ScalarOperations { @Test @IR(counts = {IRNode.FMA_HF, " 0 ", IRNode.REINTERPRET_S2HF, " 0 ", IRNode.REINTERPRET_HF2S, " 0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zfh", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zfh", "true"}, + // On Windows, both GCC and MSVC don't set __STDC_IEC_559__, so FMAs on constants are not folded. + applyIfPlatform = {"windows", "false"}) @IR(counts = {IRNode.FMA_HF, " 0 ", IRNode.REINTERPRET_S2HF, " 0 ", IRNode.REINTERPRET_HF2S, " 0 "}, - applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) + applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}, + // On Windows, both GCC and MSVC don't set __STDC_IEC_559__, so FMAs on constants are not folded. + applyIfPlatform = {"windows", "false"}) @Warmup(10000) public void testFMAConstantFolding() { // If any argument is NaN, the result is NaN. @@ -752,9 +756,13 @@ public class TestFloat16ScalarOperations { @Test @IR(failOn = {IRNode.ADD_HF, IRNode.SUB_HF, IRNode.MUL_HF, IRNode.DIV_HF, IRNode.SQRT_HF, IRNode.FMA_HF}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zfh", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zfh", "true"}, + // On Windows, both GCC and MSVC don't set __STDC_IEC_559__, so FMAs on constants are not folded. + applyIfPlatform = {"windows", "false"}) @IR(failOn = {IRNode.ADD_HF, IRNode.SUB_HF, IRNode.MUL_HF, IRNode.DIV_HF, IRNode.SQRT_HF, IRNode.FMA_HF}, - applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) + applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}, + // On Windows, both GCC and MSVC don't set __STDC_IEC_559__, so FMAs on constants are not folded. + applyIfPlatform = {"windows", "false"}) @Warmup(10000) public void testRounding1() { dst[0] = float16ToRawShortBits(add(RANDOM1, RANDOM2)); diff --git a/test/hotspot/jtreg/compiler/compilercontrol/commands/CompileLevelParseTest.java b/test/hotspot/jtreg/compiler/compilercontrol/commands/CompileLevelParseTest.java new file mode 100644 index 00000000000..abb54ba1074 --- /dev/null +++ b/test/hotspot/jtreg/compiler/compilercontrol/commands/CompileLevelParseTest.java @@ -0,0 +1,69 @@ +/* + * 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 8313713 + * @summary Test if the following CompileCommand options support compilation + * level bitmask argument: break, compileonly, exclude, print + * @library /test/lib + * @run main ${test.main.class} + */ + +package compiler.compilercontrol.commands; + +import jdk.test.lib.process.ProcessTools; + +import java.util.List; + +public class CompileLevelParseTest { + private static final List commandsWithCompileLevel = List.of("break", "compileonly", "exclude", "print"); + private static final List compLevels = List.of("0", "1", "11", "111", "10", "100", "101", "1000", "1111"); + private static final List invalidCompLevels = List.of("-9223372036854775808", "-1", "-1111", "10000", "2", "20000", "01012", + "91", "9", "c1", "true", "false"); + private static final String DEFAULT_COMP_LEVEL = "1111"; + private static final String METHOD_EXP = "java/lang/Object.toString"; + + public static void main(String[] args) throws Exception { + for (String cmd : commandsWithCompileLevel) { + ProcessTools.executeTestJava("-XX:CompileCommand=" + cmd + "," + METHOD_EXP, "-version") + .shouldHaveExitValue(0) + .shouldNotContain("CompileCommand: An error occurred during parsing") + .shouldContain("CompileCommand: " + cmd + " " + METHOD_EXP + " intx " + cmd + " = " + DEFAULT_COMP_LEVEL); // should be registered + for (String level : compLevels) { + ProcessTools.executeTestJava("-XX:CompileCommand=" + cmd + "," + METHOD_EXP + "," + level, "-version") + .shouldHaveExitValue(0) + .shouldNotContain("CompileCommand: An error occurred during parsing") + .shouldContain("CompileCommand: " + cmd + " " + METHOD_EXP + " intx " + cmd + " = " + level); // should be registered + } + // Note that values like "1suffix" are still accepted + for (String incorrectLevel : invalidCompLevels) { + ProcessTools.executeTestJava("-XX:CompileCommand=" + cmd + "," + METHOD_EXP + "," +incorrectLevel, "-version") + .shouldHaveExitValue(1) + .shouldContain("CompileCommand: An error occurred during parsing") + .shouldNotContain("CompileCommand: " + cmd + " " + METHOD_EXP + " intx " + cmd + " = " + incorrectLevel); + } + } + } +} diff --git a/test/hotspot/jtreg/compiler/compilercontrol/commands/CompileLevelPrintTest.java b/test/hotspot/jtreg/compiler/compilercontrol/commands/CompileLevelPrintTest.java new file mode 100644 index 00000000000..dcf625c807b --- /dev/null +++ b/test/hotspot/jtreg/compiler/compilercontrol/commands/CompileLevelPrintTest.java @@ -0,0 +1,514 @@ +/* + * 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 8313713 + * @summary Test -XX:CompileCommand=exclude and compileonly with different compilation levels, + * monitoring compilation events in VM -XX:+PrintCompilation and -XX:+PrintTieredEvents output + * @requires vm.compMode != "Xint" & vm.flavor == "server" + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @run main ${test.main.class} runner + */ + +package compiler.compilercontrol.commands; + +import jdk.test.lib.Asserts; +import jdk.test.lib.management.InputArguments; +import jdk.test.lib.process.ProcessTools; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.Writer; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.Set; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.BooleanSupplier; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class CompileLevelPrintTest { + static final Method TEST_METHOD; + + static { + try { + TEST_METHOD = Testee.class.getDeclaredMethod("compiledMethod", new Class[] {int.class}); + } catch (NoSuchMethodException e) { + throw new RuntimeException(e); + } + } + static final String TEST_METHOD_NAME_DOT = TEST_METHOD.getDeclaringClass().getName().replace('.', '/') + + "." + TEST_METHOD.getName(); + static final String TEST_METHOD_NAME_DBL_COLON = TEST_METHOD.getDeclaringClass().getName() + + "::" + TEST_METHOD.getName(); + static final String TEST_METHOD_SIGNATURE = TEST_METHOD_NAME_DBL_COLON + "("; + + static final String TESTEE_WAITING_FOR_START_CMD = "==> waiting for start command"; + + static final String START_CMD = "start"; + static final String STOP_CMD = "stop"; + + static final boolean DEBUG_OUTPUT = false; + + static int TIMEOUT_SEC = 30; + + static class TesteeState { + final CountDownLatch waitingForStartTest = new CountDownLatch(1); + final AtomicInteger compiler1QueueSize = new AtomicInteger(); + final AtomicInteger compiler2QueueSize = new AtomicInteger(0); + final Set compileCommandsReported = Collections.synchronizedSet(new HashSet<>()); + volatile Set testMethodCompiledAtLevel = Collections.synchronizedSet(new HashSet<>()); + final Set testMethodExcludedAtLevel = Collections.synchronizedSet(new HashSet<>()); + volatile Set testMethodPrintedAtLevel = Collections.synchronizedSet(new HashSet<>()); + volatile boolean testMethodMDOPrinted = false; + + @Override + public String toString() { + return "TesteeState{" + + "\n compileCommandsReported=" + compileCommandsReported + + "\n testMethodCompiledAtLevel=" + testMethodCompiledAtLevel + + "\n testMethodExcludedAtLevel=" + testMethodExcludedAtLevel + + "\n testMethodPrintedAtLevel=" + testMethodPrintedAtLevel + + "\n testMethodMDOPrinted=" + testMethodMDOPrinted + + "\n}"; + } + } + + public static void main(String[] args) throws IOException, InterruptedException, ExecutionException { + // Use the same launcher to avoid double launch cost compared to multiple jtreg @test annotations + if (args.length > 0 && "runner".equals(args[0])) { + if (Arrays.asList(InputArguments.getVmInputArgs()).contains("-Xcomp")) { + TIMEOUT_SEC *= 3; + } + + if (Arrays.asList(InputArguments.getVmInputArgs()).contains("-XX:-TieredCompilation")) { + // If we have -XX:-TieredCompilation, we check only for C2 compilation + // A space is printed instead of compile level + Runner.run("compileonly", 1, 1, 1, Set.of(), Set.of("4"), true, false); + Runner.run("compileonly", 10, 1, 1, Set.of(), Set.of("4"), true, false); + Runner.run("compileonly", 100, 1, 1, Set.of(), Set.of("4"), true, false); + Runner.run("compileonly", 1000, 1000, 4, Set.of(" "), Set.of(), true, false); + Runner.run("compileonly", 1100, 1100, 4, Set.of(" "), Set.of(), true, false); + + Runner.run("exclude", 1110, 1, 1, Set.of(), Set.of("4"), true, false); + Runner.run("exclude", 1101, 10, 2, Set.of(), Set.of("4"), true, false); + Runner.run("exclude", 1011, 100, 3, Set.of(), Set.of("4"), true, false); + Runner.run("exclude", 111, 1000, 4, Set.of(" "), Set.of(), true, false); + } else { + // -XX:+TieredCompilation + Runner.run("compileonly", 1, 1, 1, Set.of("1"), Set.of(), false, true); + Runner.run("compileonly", 10, 10, 2, Set.of("2"), Set.of(), true, true); + Runner.run("compileonly", 100, 100, 3, Set.of("3"), Set.of(), true, true); + Runner.run("compileonly", 1000, 1000, 4, Set.of("4"), Set.of("3"), true, true); + Runner.run("compileonly", 1100, 1100, 4, Set.of("3", "4"), Set.of(), true, true); + + Runner.run("exclude", 1110, 1, 1, Set.of("1"), Set.of(), false, true); + Runner.run("exclude", 1101, 10, 2, Set.of("2"), Set.of(), true, true); + Runner.run("exclude", 1011, 100, 3, Set.of("3"), Set.of(), true, true); + Runner.run("exclude", 111, 1000, 4, Set.of("4"), Set.of("3"), true, true); + } + } else if (args.length > 1 && "parse-logs".equals(args[0])) { + // For test troubleshooting: if test has failed due to regexp matching, + // try parsing testee-.out and hotspot_pid.log and adjust the patterns + TesteeState testeeState = new TesteeState(); + for (int i = 1; i < args.length; i++) { + Runner.matchMessagesInHotspotLog(args[i], testeeState); + } + IO.println(testeeState.toString()); + } else { + Testee.run(); + } + } + + static class Runner { + private static final int LAST_N_LINES_COUNT = 5; + + private static final Pattern reCompileCommand = Pattern.compile( + "CompileCommand: (.*)"); + private static final Pattern reTieredEvent = Pattern.compile( + "[0-9.]+: \\[(call|loop|compile|force-compile|remove-from-queue|update-in-queue|reprofile|make-not-entrant) " + + "level=\\d \\[([^]]+)] @-?\\d+ queues=(\\d+),(\\d+).*]"); + private static final Pattern reCompilation = Pattern.compile( + "(\\d+) (C1|C2|no compiler): *(\\d+) ([ %][ s][ !][ b][ n]) ([-0-4 ]) +([^ ]+).*"); + private static final Pattern reExcludeCompile = Pattern.compile( + ".*made not compilable on level (\\d) +([^ ]+) .* excluded by CompileCommand"); + private static final Pattern reCompiledMethod = Pattern.compile( + ".*-{35} Assembly -{35}\\n(?:\\[[0-9.]+s]\\[warning]\\[os] Loading hsdis library failed\\n)?\\nCompiled method \\((?:c1|c2)\\) (\\d+) ([Cc][12]): *" + + "(\\d+) ([ %][ s][ !][ b][ n]) ([-0-4 ]) +([^ ]+) +(@ -?[0-9]+ +)?\\(\\d+ bytes\\)", Pattern.DOTALL); + private static final Pattern reMethodData = Pattern.compile( + ".*-{72}\\nstatic ([^\\n]+)\\n *interpreter_invocation_count: *\\d+\\n *invocation_counter: *\\d+", Pattern.DOTALL); + private static final Pattern reEndOfLog = Pattern.compile(""); + + public static void run(String compileCmd, + int cmdCompLevel, + int printCmdCompLevel, + int tieredStopAtLevel, + Set expectedCompLevel, + Set expectExcludedAtLevels, + boolean expectMDOPrinted, + boolean tieredCompilation) + throws IOException, InterruptedException { + + IO.println("\n########> Testing " + compileCmd + " " + cmdCompLevel); + + ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder( + "-XX:+UnlockDiagnosticVMOptions", + "-XX:+PrintCompilation", + "-XX:+CIPrintCompilerName", + "-XX:+PrintTieredEvents", + "-XX:+LogVMOutput", + "-XX:+LogCompilation", + "-XX:" + (tieredCompilation ? "+" : "-") + "TieredCompilation", + "-XX:TieredStopAtLevel=" + tieredStopAtLevel, + "-XX:CompileCommand=" + compileCmd + "," + TEST_METHOD_NAME_DBL_COLON + "," + cmdCompLevel, + "-XX:CompileCommand=print," + TEST_METHOD_NAME_DBL_COLON + "," + printCmdCompLevel, + CompileLevelPrintTest.class.getName()); + + try (Process process = pb.start(); + BufferedWriter processInput = process.outputWriter(); + BufferedReader processOutput = process.inputReader(); + BufferedReader processErrOut = process.errorReader()) { + long startNanos = System.nanoTime(); + try { + IO.println("##> Testee PID: " + process.pid()); + TesteeState testeeState = new TesteeState(); + + Thread stdoutParser = startDaemonThread(() -> + matchVmMessages(processOutput, testeeState, "", "testee-" + process.pid() + ".out")); + Thread stderrParser = startDaemonThread(() -> + matchTesteeMessages(processErrOut, testeeState, "testee-" + process.pid() + ".err")); + + IO.println("##> Waiting for testee to get ready for the start command"); + if (!testeeState.waitingForStartTest.await(TIMEOUT_SEC, TimeUnit.SECONDS)) { + throw new RuntimeException("No start signal from testee"); + } + + Asserts.assertTrue(waitUntil(() -> !process.isAlive() + || (testeeState.compiler1QueueSize.get() < 5 + && testeeState.compiler2QueueSize.get() < 5)), + "Compiler queue is still not empty"); + Asserts.assertTrue(testeeState.compileCommandsReported.contains( + compileCmd + " " + TEST_METHOD_NAME_DOT + " intx " + compileCmd + " = " + cmdCompLevel), + "'CompileCommand: " + compileCmd + "...' was not printed"); + Asserts.assertTrue(testeeState.compileCommandsReported.contains( + "print " + TEST_METHOD_NAME_DOT + " intx print = " + printCmdCompLevel), + "'CompileCommand: print ...' was not printed"); + + IO.println("##> Order testee to start"); + processInput.write(START_CMD); processInput.newLine(); processInput.flush(); + + waitUntil(() -> !process.isAlive() + || (!expectedCompLevel.isEmpty() && !expectExcludedAtLevels.isEmpty() + && expectedCompLevel.equals(testeeState.testMethodCompiledAtLevel) + && expectedCompLevel.equals(testeeState.testMethodPrintedAtLevel) + && expectExcludedAtLevels.equals(testeeState.testMethodExcludedAtLevel))); + + if (process.isAlive()) { + IO.println("##> Required messages have been found in testee output, now stop it"); + processInput.write(STOP_CMD + "\n"); + processInput.flush(); + processInput.close(); + } + + Asserts.assertEquals(0, process.waitFor()); + stdoutParser.join(); + stderrParser.join(); + + // Process stdout can be garbled: pieces of different messages can be intertwined and regexps may + // intermittently fail to match the messages. + // Now parse Hotspot log file to re-match them. Duplicates are OK. + matchMessagesInHotspotLog("hotspot_pid" + process.pid() + ".log", testeeState); + + Asserts.assertEquals(expectedCompLevel, testeeState.testMethodCompiledAtLevel, + "Test method was not compiled at required level (" + expectedCompLevel + ")"); + Asserts.assertEquals(expectedCompLevel, testeeState.testMethodPrintedAtLevel, + "Test method assembly was not printed at required level (" + expectedCompLevel + ")"); + Asserts.assertEquals(expectExcludedAtLevels, testeeState.testMethodExcludedAtLevel, + "Test method compilation was not excluded at required levels (" + expectExcludedAtLevels + ")"); + Asserts.assertEquals(expectMDOPrinted, testeeState.testMethodMDOPrinted, + "Test method MDO was" + (expectMDOPrinted ? " NOT" : "") + " printed"); + + IO.println("########> Test passed"); + } catch (Exception ex) { + IO.println("########> Test failed"); + ex.printStackTrace(); + process.destroyForcibly(); + throw ex; + } finally { + IO.println("########> Elapsed " + TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanos) + " ms"); + } + } + } + + static void matchMessagesInHotspotLog(String logFileName, TesteeState testeeState) throws IOException { + IO.println("##> Parsing " + logFileName + " to match possibly missed messages"); + try (BufferedReader reader = new BufferedReader(new FileReader(logFileName))) { + matchVmMessages(reader, testeeState, "Log: ", null); + } + } + + private static void matchVmMessages(BufferedReader testeeOutput, TesteeState testeeState, String logPrefix, String fileName) { + try (Writer outWriter = fileName != null ? new BufferedWriter(new FileWriter(fileName)) : null) { + String line; + LinkedList lastNLines = new LinkedList<>(); + boolean endOfLog = false; + + while (!endOfLog && (line = testeeOutput.readLine()) != null) { + if (outWriter != null) { + outWriter.write(line); + outWriter.write('\n'); + } + + line = line.trim(); + + lastNLines.addLast(line); + while (lastNLines.size() > LAST_N_LINES_COUNT) { + lastNLines.removeFirst(); + } + String lastNLinesStr = String.join("\n", lastNLines); + + Matcher matcher; + String msg = ""; + + if ((matcher = reCompileCommand.matcher(line)).matches()) { + testeeState.compileCommandsReported.add(matcher.group(1)); + + msg = "Compile command reported: " + matcher.group(1); + + } else if ((matcher = reTieredEvent.matcher(line)).matches()) { + testeeState.compiler1QueueSize.set(Integer.parseInt(matcher.group(3))); + testeeState.compiler2QueueSize.set(Integer.parseInt(matcher.group(4))); + + } else if ((matcher = reCompilation.matcher(line)).matches()) { + if ("C1".equalsIgnoreCase(matcher.group(2))) { + testeeState.compiler1QueueSize.decrementAndGet(); + } else { + testeeState.compiler2QueueSize.decrementAndGet(); + } + + if (matcher.group(6).contains(TEST_METHOD_NAME_DBL_COLON)) { + testeeState.testMethodCompiledAtLevel.add(matcher.group(5)); + + msg = "Test method compiled:" + + " compiler=" + matcher.group(2) + + " level=" + matcher.group(5) + + " compilation#=" + matcher.group(3) + + " flags=" + matcher.group(4).trim() + + " name=" + matcher.group(6); + } + } else if ((matcher = reCompiledMethod.matcher(lastNLinesStr)).matches()) { + if (matcher.group(6).contains(TEST_METHOD_NAME_DBL_COLON)) { + testeeState.testMethodPrintedAtLevel.add(matcher.group(5)); + + msg = "Test method assembly printed:" + + " compiler=" + matcher.group(2) + + " level=" + matcher.group(5) + + " compilation#=" + matcher.group(3) + + " flags=" + matcher.group(4).trim() + + " name=" + matcher.group(6) + + " bci=" + (matcher.group(7) != null ? matcher.group(7).trim() : ""); + } + } else if ((matcher = reExcludeCompile.matcher(line)).matches()) { + if (matcher.group(2).contains(TEST_METHOD_NAME_DBL_COLON)) { + testeeState.testMethodExcludedAtLevel.add(matcher.group(1)); + + msg = "Test method not compilable:" + + " level=" + matcher.group(1) + + " name=" + matcher.group(2); + } + } else if ((matcher = reMethodData.matcher(lastNLinesStr)).matches()) { + if (matcher.group(1).contains(TEST_METHOD_SIGNATURE)) { + testeeState.testMethodMDOPrinted = true; + + msg = "Test method data:" + + " name=" + matcher.group(1); + } + } else if (reEndOfLog.matcher(line).matches()) { + endOfLog = true; + + msg = "End of log"; + } + + if (!msg.isEmpty()) { + msg = "##> " + logPrefix + msg; + IO.println(msg); + if (outWriter != null) { + outWriter.write(msg); + outWriter.write('\n'); + } + } + } + } catch (Exception ex) { + ex.printStackTrace(); + } + } + + private static void matchTesteeMessages(BufferedReader testeeErrorOutput, TesteeState testeeState, String fileName) { + try (BufferedWriter outWriter = new BufferedWriter(new FileWriter(fileName))) { + String line; + while ((line = testeeErrorOutput.readLine()) != null) { + outWriter.write(line); + outWriter.newLine(); + + line = line.trim(); + + if (TESTEE_WAITING_FOR_START_CMD.equals(line)) { + IO.println("##> Testee is waiting for start command"); + testeeState.waitingForStartTest.countDown(); + } else if (line.startsWith("==>")) { + IO.println(line); + } else if (line.startsWith("Exception in thread ") || line.startsWith("at ")) { + IO.println("==>" + line); + } else if (DEBUG_OUTPUT) { + IO.println("Did not parse stderr: " + line); + } + } + } catch (Exception ex) { + ex.printStackTrace(); + } + } + } + + static class Testee { + private static final CountDownLatch startCmd = new CountDownLatch(1); + private static final CountDownLatch stopCmd = new CountDownLatch(1); + + static void run() throws IOException, InterruptedException { + System.err.println("==> entering testee()"); + + try { + startDaemonThread(Testee::inputMonitor); + + if (stopCmd.getCount() == 0) { + return; + } + + // Print 3 times, since the output can be intermixed with + System.err.println(TESTEE_WAITING_FOR_START_CMD); + if (!startCmd.await(TIMEOUT_SEC + 1, TimeUnit.SECONDS)) { + System.err.println("==> 'start' command was not given in stdin"); + return; + } + + if (stopCmd.getCount() == 0) { + return; + } + + System.err.println("==> starting test"); + runTestCode(); + } finally { + System.err.println("==> exiting testee()"); + } + } + + private static void inputMonitor() { + try (BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in))) { + String line; + while ((line = stdin.readLine()) != null) { + line = line.trim(); + System.err.println("==> STDIN: " + line); + + switch (line) { + case START_CMD: + startCmd.countDown(); + break; + + case STOP_CMD: + stopCmd.countDown(); + break; + + default: + System.err.println("==> ERROR: unknown command"); + } + } + } catch (Exception ex) { + ex.printStackTrace(); + } + } + + // For Tier4 600 invocation of this method with avg 25 loops for each should be enough + // to trigger Tier4CompilationThreshold=15000 + private static void compiledMethod(final int a) { + int r = 0; + for (int i = 0; i < a % 50; i++) { + r ^= i; + } + if (r == 42) { + System.err.println("MAGIC!"); + } + } + + private static boolean longLoop() { + // To trigger compilation, 100-200 should be enough for C1 and 600-700 for C2 + for (int i = 0; i < 10000; i++) { + compiledMethod(i); + if ((i & 0xf) == 0 && stopCmd.getCount() == 0) { + System.err.println("==> Bailing out of compiledMethod() at iteration " + i); + return true; + } + } + return false; + } + + private static void runTestCode() { + for (int i = 0; i < 100; i++) { + if (longLoop()) { + return; + } + } + } + } + + static Thread startDaemonThread(Runnable code) { + Thread t = new Thread(code); + t.setDaemon(true); + t.start(); + return t; + } + + static boolean waitUntil(BooleanSupplier condition) throws InterruptedException { + for (int maxWait = TIMEOUT_SEC * 5; maxWait > 0; --maxWait) { + if (condition.getAsBoolean()) { + return true; + } + Thread.sleep(200); + } + return false; + } +} diff --git a/test/hotspot/jtreg/compiler/compilercontrol/commands/CompileLevelWBTest.java b/test/hotspot/jtreg/compiler/compilercontrol/commands/CompileLevelWBTest.java new file mode 100644 index 00000000000..81c72990107 --- /dev/null +++ b/test/hotspot/jtreg/compiler/compilercontrol/commands/CompileLevelWBTest.java @@ -0,0 +1,1088 @@ +/* + * 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 id=exclude-all-levels + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod + * ${test.main.class} + */ + +/* + * @test id=exclude-mask-1-mixed + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode == "Xmixed" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1 + * ${test.main.class} + * 2 3 4 + */ + +/* + * @test id=exclude-mask-1-comp + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode == "Xcomp" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1 + * ${test.main.class} + * 2 3/4 4 + */ + +/* + * @test id=exclude-mask-1-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode == "Xmixed" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1 + * ${test.main.class} + * 4 + */ + +/* + * @test id=exclude-mask-2-mixed + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode == "Xmixed" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,10 + * ${test.main.class} + * 1 3 4 + */ + +/* + * @test id=exclude-mask-2-comp + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode == "Xcomp" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,10 + * ${test.main.class} + * 1 3/4 4 + */ + +/* + * @test id=exclude-mask-2-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode == "Xcomp" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,10 + * ${test.main.class} + * 4 + */ + +/* + * @test id=exclude-mask-3-mixed + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode == "Xmixed" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,11 + * ${test.main.class} + * 3 4 + */ + +/* + * @test id=exclude-mask-3-comp + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode == "Xcomp" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,11 + * ${test.main.class} + * 3/4 4 + */ + +/* + * @test id=exclude-mask-3-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode == "Xcomp" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,11 + * ${test.main.class} + * 4 + */ + +/* + * @test id=exclude-mask-4-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,100 + * ${test.main.class} + * 1 2 4 + */ + +/* + * @test id=exclude-mask-4-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,100 + * ${test.main.class} + * 4 + */ + +/* + * @test id=exclude-mask-5-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,101 + * ${test.main.class} + * 2 4 + */ + +/* + * @test id=exclude-mask-5-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,101 + * ${test.main.class} + * 4 + */ + +/* + * @test id=exclude-mask-6-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,110 + * ${test.main.class} + * 1 4 + */ + +/* + * @test id=exclude-mask-6-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,110 + * ${test.main.class} + * 4 + */ + +/* + * @test id=exclude-mask-7 + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,111 + * ${test.main.class} + * 4 + */ + +/* + * @test id=exclude-mask-8 + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1000 + * ${test.main.class} + * 1 2 3 + */ + +/* + * @test id=exclude-mask-9 + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1001 + * ${test.main.class} + * 2 3 + */ + +/* + * @test id=exclude-mask-10 + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1010 + * ${test.main.class} + * 1 3 + */ + +/* + * @test id=exclude-mask-11 + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1011 + * ${test.main.class} + * 3 + */ + +/* + * @test id=exclude-mask-12 + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1100 + * ${test.main.class} + * 1 2 + */ + +/* + * @test id=exclude-mask-13 + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1101 + * ${test.main.class} + * 2 + */ + +/* + * @test id=exclude-mask-14 + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1110 + * ${test.main.class} + * 1 + */ + +/* + * @test id=exclude-mask-15 + * @bug 8313713 + * @summary Test -XX:CompileCommand=exclude with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=exclude,*.CompileLevelWBTest::compiledMethod,1111 + * ${test.main.class} + */ + +/* + * @test id=compileonly-all-levels-mixed + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode == "Xmixed" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod + * ${test.main.class} + * 1 2 3 4 + */ + +/* + * @test id=compileonly-all-levels-comp + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode == "Xcomp" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod + * ${test.main.class} + * 1 2 3/4 4 + */ + +/* + * @test id=compileonly-all-levels-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod + * ${test.main.class} + * 4 + */ + +/* + * @test id=compileonly-mask-1 + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1 + * ${test.main.class} + * 1 + */ + +/* + * @test id=compileonly-mask-2 + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,10 + * ${test.main.class} + * 2 + */ + +/* + * @test id=compileonly-mask-3 + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,11 + * ${test.main.class} + * 1 2 + */ + +/* + * @test id=compileonly-mask-4 + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,100 + * ${test.main.class} + * 3 + */ + +/* + * @test id=compileonly-mask-5 + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,101 + * ${test.main.class} + * 1 3 + */ + +/* + * @test id=compileonly-mask-6 + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,110 + * ${test.main.class} + * 2 3 + */ + +/* + * @test id=compileonly-mask-7 + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,111 + * ${test.main.class} + * 1 2 3 + */ + +/* + * @test id=compileonly-mask-8 + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1000 + * ${test.main.class} + * 4 + */ + +/* + * @test id=compileonly-mask-9-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1001 + * ${test.main.class} + * 1 4 + */ + +/* + * @test id=compileonly-mask-9-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1001 + * ${test.main.class} + * 4 + */ + +/* + * @test id=compileonly-mask-10-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1010 + * ${test.main.class} + * 2 4 + */ + +/* + * @test id=compileonly-mask-10-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1010 + * ${test.main.class} + * 4 + */ + +/* + * @test id=compileonly-mask-11-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1011 + * ${test.main.class} + * 1 2 4 + */ + +/* + * @test id=compileonly-mask-11-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1011 + * ${test.main.class} + * 4 + */ + +/* + * @test id=compileonly-mask-12-mixed + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode == "Xmixed" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1100 + * ${test.main.class} + * 3 4 + */ + +/* + * @test id=compileonly-mask-12-comp + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode == "Xcomp" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1100 + * ${test.main.class} + * 3/4 4 + */ + +/* + * @test id=compileonly-mask-12-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1100 + * ${test.main.class} + * 4 + */ + +/* + * @test id=compileonly-mask-13-mixed + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode == "Xmixed" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1101 + * ${test.main.class} + * 1 3 4 + */ + +/* + * @test id=compileonly-mask-13-comp + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode == "Xcomp" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1101 + * ${test.main.class} + * 1 3/4 4 + */ + +/* + * @test id=compileonly-mask-13-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1101 + * ${test.main.class} + * 4 + */ + +/* + * @test id=compileonly-mask-14-mixed + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode == "Xmixed" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1110 + * ${test.main.class} + * 2 3 4 + */ + +/* + * @test id=compileonly-mask-14-comp + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode == "Xcomp" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1110 + * ${test.main.class} + * 2 3/4 4 + */ + +/* + * @test id=compileonly-mask-14-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1110 + * ${test.main.class} + * 4 + */ + +/* + * @test id=compileonly-mask-15-mixed + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode == "Xmixed" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1111 + * ${test.main.class} + * 1 2 3 4 + */ + +/* + * @test id=compileonly-mask-15-comp + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode == "Xcomp" & vm.flavor == "server" & vm.opt.TieredCompilation != false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1111 + * ${test.main.class} + * 1 2 3/4 4 + */ + +/* + * @test id=compileonly-mask-15-no-tiered + * @bug 8313713 + * @summary Test -XX:CompileCommand=compileonly with different compilation levels + * @requires vm.compMode != "Xint" & vm.flavor == "server" & vm.opt.TieredCompilation == false + * & (vm.opt.TieredStopAtLevel == 4 | vm.opt.TieredStopAtLevel == null) + * & (vm.opt.CompilationMode == "normal" | vm.opt.CompilationMode == null) + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm/timeout=30 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PrintCompilation + * -XX:CompileCommand=BackgroundCompilation,*.CompileLevelWBTest::compiledMethod,false + * -XX:CompileCommand=compileonly,*.CompileLevelWBTest::compiledMethod,1111 + * ${test.main.class} + * 4 + */ + +package compiler.compilercontrol.commands; + +import jdk.test.lib.Asserts; +import jdk.test.whitebox.WhiteBox; + +import java.lang.reflect.Method; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.LockSupport; +import java.util.function.BooleanSupplier; + +public class CompileLevelWBTest { + private static final WhiteBox WB = WhiteBox.getWhiteBox(); + private static final Method testMethod; + private static boolean[] allowedToCompileAtLevel; + private static int[] expectedLevelAfterWBCompileRequestAtLevel; + + static { + try { + testMethod = CompileLevelWBTest.class.getDeclaredMethod("compiledMethod", new Class[] {int.class, boolean.class}); + } catch (NoSuchMethodException e) { + throw new RuntimeException(e); + } + } + + // For Tier4 600 invocation of this method with avg 25 loops for each should be enough + // to trigger Tier4CompilationThreshold=15000 + private static void compiledMethod(final int a, boolean uncommonTrap) { + int r = 0; + if (uncommonTrap) { + IO.println("==> compiledMethod(): uncommon trap! <=="); + } + for (int i = 0; i < a % 50; i++) { + r ^= i; + } + if (r == 42) { + IO.println("xopowo!"); + } + } + + private static boolean longLoop(int expectedLevel) { + // To trigger compilation, 100-200 should be enough for C1 and 600-700 for C2 + for (int i = 0; i < 10000; i++) { + compiledMethod(i, false); + if ((i & 0xf) == 0) { + if (isTestMethodCompiledAtLevel(expectedLevel)) { + IO.println("==> longLoop(): compiledMethod() has been compiled at iteration " + i + " <=="); + compiledMethod(i + 1, expectedLevel == 4); + return true; + } + } + } + return false; + } + + private static boolean runTestCode(int expectedLevel) { + for (int i = 0; i < 10; i++) { + if (longLoop(expectedLevel)) { + return true; + } + } + IO.println("==> runTestCode(): " + testMethod.getName() + " has not been compiled <=="); + return false; + } + + private static boolean isTestMethodCompiledAtLevel(int expectedLevel) { + int curLevel = WB.getMethodCompilationLevel(testMethod); + if (curLevel == 0) { + // we're in interpreter. keep going. + return false; + } + verifyCompileLevel(curLevel); + Asserts.assertTrue(allowedToCompileAtLevel[curLevel], "The test method should not be compiled at excluded level=" + curLevel); + return curLevel == expectedLevel; + } + + public static void main(String[] args) { + IO.println("==> entering main() <=="); + try { + parseExpectedLevels(args); + // Wait until compilers are free, so thresholds are not altered + waitUntilCompilerQueuesIsAlmostEmpty(); + + IO.println("==> starting test <=="); + for (int level = 1; level <= 4; level++) { + WB.deoptimizeMethod(testMethod); + WB.clearMethodState(testMethod); + + waitUntil(() -> { + int curLevel = WB.getMethodCompilationLevel(testMethod); + IO.println("==> waiting for deoptimization, current level: " + curLevel + " <=="); + return curLevel == 0; + }); + + boolean shouldBeCompilable = allowedToCompileAtLevel[level]; + String expectedResult = shouldBeCompilable ? "" : " NOT"; + IO.println("==> checking compilation at level " + level + " (should" + expectedResult + " be compiled) <=="); + Asserts.assertEquals(shouldBeCompilable, WB.isMethodCompilable(testMethod, level), + "WB.isMethodCompilable() returns wrong answer for level " + level); + Asserts.assertEquals(shouldBeCompilable, WB.enqueueMethodForCompilation(testMethod, level), + "Error enqueuing method for compilation at level " + level + " via WhiteBox"); + int expectedLevel = expectedLevelAfterWBCompileRequestAtLevel[level]; + Asserts.assertEquals(shouldBeCompilable, runTestCode(expectedLevel), + testMethod.getName() + " was" + expectedResult + " compiled at level " + expectedLevel); + } + } finally { + IO.println("==> exiting main() <=="); + } + } + + private static void parseExpectedLevels(String[] args) { + allowedToCompileAtLevel = new boolean[] { false, false, false, false, false }; + expectedLevelAfterWBCompileRequestAtLevel = new int[] { 0, 1, 2, 3, 4, 5 }; + + for (String arg : args) { + try { + String[] parts = arg.split("/"); + int level = Integer.parseInt(parts[0]); + int goesToLevel = parts.length > 1 ? Integer.parseInt(parts[1]) : level; + verifyCompileLevel(level); + allowedToCompileAtLevel[level] = true; + expectedLevelAfterWBCompileRequestAtLevel[level] = goesToLevel; + } catch (NumberFormatException ex) { + ex.printStackTrace(); + } + } + } + + private static void waitUntilCompilerQueuesIsAlmostEmpty() { + waitUntil(() -> { + int cqSize = WB.getCompileQueuesSize(); + IO.println("==> Compiler queues size: " + cqSize); + return cqSize < 5; + }); + } + + private static void waitUntil(BooleanSupplier condition) { + for (int maxWait = 30; maxWait > 0; --maxWait) { + if (condition.getAsBoolean()) { + return; + } + LockSupport.parkNanos(TimeUnit.SECONDS.toNanos(1)); + } + } + + private static void verifyCompileLevel(int curLevel) { + Asserts.assertTrue(curLevel > 0 && curLevel < 5, "Invalid compile level"); + } +} diff --git a/test/hotspot/jtreg/compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java b/test/hotspot/jtreg/compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java index 018d55be01b..01675a7801f 100644 --- a/test/hotspot/jtreg/compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java +++ b/test/hotspot/jtreg/compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022, 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 @@ -73,16 +73,16 @@ public class ClearDirectivesFileStackTest extends AbstractTestBase { // skip invalid command command = Command.COMPILEONLY; } - CompileCommand compileCommand = new CompileCommand(command, + CompileCommand compileCommand = new CompileCommand(command, true, methodDescriptor, cmdGen.generateCompiler(), Scenario.Type.DIRECTIVE); builder.add(compileCommand); } // clear the stack - builder.add(new JcmdCommand(Command.NONEXISTENT, null, null, + builder.add(new JcmdCommand(Command.NONEXISTENT, true, null, null, Scenario.Type.JCMD, Scenario.JcmdType.CLEAR)); // print all directives after the clear - builder.add(new JcmdCommand(Command.NONEXISTENT, null, null, + builder.add(new JcmdCommand(Command.NONEXISTENT, true, null, null, Scenario.Type.JCMD, Scenario.JcmdType.PRINT)); Scenario scenario = builder.build(); scenario.execute(); diff --git a/test/hotspot/jtreg/compiler/cpuflags/CPUFeaturesClearTest.java b/test/hotspot/jtreg/compiler/cpuflags/CPUFeaturesClearTest.java index 19768a8dc17..9b243ad6b39 100644 --- a/test/hotspot/jtreg/compiler/cpuflags/CPUFeaturesClearTest.java +++ b/test/hotspot/jtreg/compiler/cpuflags/CPUFeaturesClearTest.java @@ -23,6 +23,7 @@ /* * @test + * @bug 8364584 8381988 * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management @@ -38,6 +39,7 @@ package compiler.cpuflags; import java.util.List; +import java.util.Map; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.Platform; @@ -62,15 +64,23 @@ public class CPUFeaturesClearTest { } public void testX86Flags() throws Throwable { + Map vmFlagToCpuFeatureMap = Map.of("UseCLMUL", "clmul", + "UseAES", "aes", + "UseFMA", "fma", + "UseCountLeadingZerosInstruction", "lzcnt", + "UseBMI1Instructions", "bmi1", + "UseBMI2Instructions", "bmi2", + "UsePopCountInstruction", "popcnt", + "UseSHA", "sha"); + vmFlagToCpuFeatureMap.forEach((vmFlag, cpuFeature) -> { + try { + OutputAnalyzer outputAnalyzer = ProcessTools.executeTestJava(generateArgs(prepareBooleanFlag(vmFlag, false))); + outputAnalyzer.shouldNotMatch("[os,cpu] CPU: .* " + cpuFeature + ".*"); + } catch (Exception e) { + throw new RuntimeException (e); + } + }); OutputAnalyzer outputAnalyzer; - String vmFlagsToTest[] = {"UseCLMUL", "UseAES", "UseFMA", "UseSHA"}; - String cpuFeatures[] = {"clmul", "aes", "fma", "sha"}; - for (int i = 0; i < vmFlagsToTest.length; i++) { - String vmFlag = vmFlagsToTest[i]; - String cpuFeature = cpuFeatures[i]; - outputAnalyzer = ProcessTools.executeTestJava(generateArgs(prepareBooleanFlag(vmFlag, false))); - outputAnalyzer.shouldNotMatch("[os,cpu] CPU: .* " + cpuFeatures[i] + ".*"); - } if (isCpuFeatureSupported("sse4")) { outputAnalyzer = ProcessTools.executeTestJava(generateArgs(prepareNumericFlag("UseSSE", 3))); outputAnalyzer.shouldNotMatch("[os,cpu] CPU: .* sse4.*"); @@ -103,18 +113,20 @@ public class CPUFeaturesClearTest { } public void testAArch64Flags() throws Throwable { - OutputAnalyzer outputAnalyzer; - String vmFlagsToTest[] = {"UseCRC32", "UseLSE", "UseAES"}; - String cpuFeatures[] = {"crc32", "lse", "aes"}; - for (int i = 0; i < vmFlagsToTest.length; i++) { - String vmFlag = vmFlagsToTest[i]; - String cpuFeature = cpuFeatures[i]; - outputAnalyzer = ProcessTools.executeTestJava(generateArgs(prepareBooleanFlag(vmFlag, false))); - outputAnalyzer.shouldNotMatch("[os,cpu] CPU: .* " + cpuFeatures[i] + ".*"); - } + Map vmFlagToCpuFeatureMap = Map.of("UseCRC32", "crc32", + "UseLSE", "lse", + "UseAES", "aes"); + vmFlagToCpuFeatureMap.forEach((vmFlag, cpuFeature) -> { + try { + OutputAnalyzer outputAnalyzer = ProcessTools.executeTestJava(generateArgs(prepareBooleanFlag(vmFlag, false))); + outputAnalyzer.shouldNotMatch("[os,cpu] CPU: .* " + cpuFeature + ".*"); + } catch (Exception e) { + throw new RuntimeException(e); + } + }); // Disabling UseSHA should clear all shaXXX cpu features - outputAnalyzer = ProcessTools.executeTestJava(generateArgs(prepareBooleanFlag("UseSHA", false))); + OutputAnalyzer outputAnalyzer = ProcessTools.executeTestJava(generateArgs(prepareBooleanFlag("UseSHA", false))); outputAnalyzer.shouldNotMatch("[os,cpu] CPU: .* sha1.*"); outputAnalyzer.shouldNotMatch("[os,cpu] CPU: .* sha256.*"); outputAnalyzer.shouldNotMatch("[os,cpu] CPU: .* sha3.*"); diff --git a/test/hotspot/jtreg/compiler/debug/TestStressBailout.java b/test/hotspot/jtreg/compiler/debug/TestStressBailout.java index 68610576a39..f79cb679c41 100644 --- a/test/hotspot/jtreg/compiler/debug/TestStressBailout.java +++ b/test/hotspot/jtreg/compiler/debug/TestStressBailout.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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 @@ package compiler.debug; import java.util.Random; +import java.util.stream.Stream; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; @@ -36,24 +37,33 @@ import jdk.test.lib.Utils; * @requires vm.debug == true & vm.compiler2.enabled & (vm.opt.AbortVMOnCompilationFailure == "null" | !vm.opt.AbortVMOnCompilationFailure) * @summary Basic tests for bailout stress flag. * @library /test/lib / - * @run driver compiler.debug.TestStressBailout + * @run main compiler.debug.TestStressBailout + */ + +/* + * @test + * @key stress randomness + * @bug 8375905 + * @requires vm.debug == true & vm.compiler2.enabled & (vm.opt.AbortVMOnCompilationFailure == "null" | !vm.opt.AbortVMOnCompilationFailure) + * @summary Additional crashes revealed by diagnostic code run during VerifyIterativeGVN + * @library /test/lib / + * @run main compiler.debug.TestStressBailout -XX:VerifyIterativeGVN=1111 */ public class TestStressBailout { - static void runTest(int invprob) throws Exception { - String[] procArgs = {"-Xcomp", "-XX:-TieredCompilation", "-XX:+StressBailout", - "-XX:StressBailoutMean=" + invprob, "-version"}; - ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(procArgs); + static void runTest(int invprob, Stream vmArgs) throws Exception { + Stream procArgs = Stream.of("-Xcomp", "-XX:-TieredCompilation", "-XX:+StressBailout", "-XX:StressBailoutMean=" + invprob, "-version"); + ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(Stream.concat(vmArgs, procArgs).toArray(x -> new String[x])); OutputAnalyzer out = new OutputAnalyzer(pb.start()); out.shouldHaveExitValue(0); } - public static void main(String[] args) throws Exception { + public static void main(String[] vmArgs) throws Exception { Random r = Utils.getRandomInstance(); // Likely bail out on -version, for some low Mean value. - runTest(r.nextInt(1, 10)); + runTest(r.nextInt(1, 10), Stream.of(vmArgs)); // Higher value - runTest(r.nextInt(10, 1_000_000)); + runTest(r.nextInt(10, 1_000_000), Stream.of(vmArgs)); } } diff --git a/test/hotspot/jtreg/compiler/escapeAnalysis/TestMemoryPhiAlias.java b/test/hotspot/jtreg/compiler/escapeAnalysis/TestMemoryPhiAlias.java new file mode 100644 index 00000000000..efe9146fa49 --- /dev/null +++ b/test/hotspot/jtreg/compiler/escapeAnalysis/TestMemoryPhiAlias.java @@ -0,0 +1,72 @@ +/* + * 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 8350971 + * @summary C2 compilation fails with assert(idx == alias_idx) failed: Following Phi nodes should be on the same memory slice + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -Xbatch -XX:CompileCommand=compileonly,compiler.escapeAnalysis.TestMemoryPhiAlias::main + * compiler.escapeAnalysis.TestMemoryPhiAlias + */ + +package compiler.escapeAnalysis; + +import java.util.function.*; + +public class TestMemoryPhiAlias { + static int[] iArrFld = new int[400]; + static int counter = 0; + static int doWork() { + int[] more = {94}; + java.util.function.Predicate check = m -> m == 0; + java.util.function.IntConsumer decrement = x -> more[0]--; + java.util.function.BooleanSupplier innerLoop = () -> { + while (!check.test(more[0])) { + decrement.accept(0); + } + return true; + }; + counter++; + if (counter == 10000000) { + throw new RuntimeException("excepted"); + } + innerLoop.getAsBoolean(); + java.util.function.BooleanSupplier process = () -> check.test(more[0]); + while (!process.getAsBoolean()) { + } + return 0; + } + + public static void main(String[] strArr) { + int i14 = 1; + do { + iArrFld[i14] = 211; + for (int i15 = 1; i15 < 4; ++i15) + try { + TestMemoryPhiAlias.doWork(); + } catch (RuntimeException e) { + return; + } + } while (i14 < 5); + } +} \ No newline at end of file diff --git a/test/hotspot/jtreg/compiler/gcbarriers/TestImplicitNullChecks.java b/test/hotspot/jtreg/compiler/gcbarriers/TestImplicitNullChecks.java index 34583b8fea9..06057a34b61 100644 --- a/test/hotspot/jtreg/compiler/gcbarriers/TestImplicitNullChecks.java +++ b/test/hotspot/jtreg/compiler/gcbarriers/TestImplicitNullChecks.java @@ -64,6 +64,8 @@ public class TestImplicitNullChecks { public static void main(String[] args) { TestFramework.runWithFlags("-XX:CompileCommand=inline,java.lang.ref.*::*", "-XX:-TieredCompilation"); + TestFramework.runWithFlags("-XX:CompileCommand=inline,java.lang.ref.*::*", + "-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1"); } @Test diff --git a/test/hotspot/jtreg/compiler/igvn/TestIncorrectDeadPathTypeNode.java b/test/hotspot/jtreg/compiler/igvn/TestIncorrectDeadPathTypeNode.java new file mode 100644 index 00000000000..071c959477e --- /dev/null +++ b/test/hotspot/jtreg/compiler/igvn/TestIncorrectDeadPathTypeNode.java @@ -0,0 +1,138 @@ +/* + * 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 8376587 + * @summary Fatal "dead path discovered by TypeNode during igvn" after C2 compilation + * @run main/othervm -Xbatch -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+StressIGVN -XX:StressSeed=24476278 ${test.main.class} + * @run main/othervm -Xbatch -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+StressIGVN ${test.main.class} + * @run main ${test.main.class} + */ + +package compiler.igvn; + +public class TestIncorrectDeadPathTypeNode { + boolean ltIndirect(int p0, int p1) { + return lt(p0, p1); + } + static boolean lt(int p0, int p1) { return p0 < p1; } + boolean ltInstance(int p0, int p1) { return p0 < p1; } + + boolean _mutatorToggle; + boolean _mutatorFlip() { return _mutatorToggle; } + + static class MyInteger { + int v; + MyInteger(int v) { + for (int i = 0; i < 4; i++) + for (int j = 0; j < 8; j++) + switch (i) { + case -2, -3: + case 0: + this.v = v; + } + int limit = 2; + for (; limit < 4; limit *= 2) {} + for (int peel = 2; peel < limit; peel++) {} + } + } + + void test() { + Byte x = 1; + boolean flag = _mutatorFlip(); + int limit = 2; + for (; limit < 4; limit *= 2) {} + int zero = 4; + for (int peel = 2; peel < limit; peel++) { + zero = 0; + } + for (int i = 0; i < 10000; i++) { + if (flag) {} + if (zero == 0) { + if ((i & 1) == 0) { + for (int j = 0; j < 32; j++) { + if (j < 10) { + x = (byte)x; + } + } + for (int j = 0; j < 2; j++) { + if (ltIndirect(j, 10)) { + x = (byte)x; + } + } + int Nj = 32; + for (int j = 0; j < Nj; j++) { + if (j < 10) { + Object o = ""; + for (int k = 0; k < 32; k++) { + o.toString(); + } + Integer.valueOf(1).toString(); + for (int k = 0; k < 32; k++) { + if (k < 10) { + x = (byte)x; + } + } + x = (byte)x; + } + } + for (int j = 0; j < 4; j++) { + for (int k = 0; k < 8; k++) { + switch (j) { + case -2, -3: + case 0: + x = (byte)x; + } + } + } + for (int j = 0; j < 4; j++) { + for (int k = 0; lt(new MyInteger(k).v, 8); k++) { + switch (j) { + case -2, -3: + case 0: + x = (byte)x; + } + } + } + for (int j = 0; ltInstance(j, 4); j++) { + for (int k = 0; k < 8; k++) { + switch (j) { + case -2, -3: + case 0: + x = (byte)x; + } + } + } + x = (byte)x; + } + } + } + } + + public static void main(String args[]) { + TestIncorrectDeadPathTypeNode t = new TestIncorrectDeadPathTypeNode(); + t.test(); + } +} + diff --git a/test/hotspot/jtreg/compiler/inlining/LateInlineQueueDrainTest.java b/test/hotspot/jtreg/compiler/inlining/LateInlineQueueDrainTest.java new file mode 100644 index 00000000000..9675274b3b1 --- /dev/null +++ b/test/hotspot/jtreg/compiler/inlining/LateInlineQueueDrainTest.java @@ -0,0 +1,146 @@ +/* + * 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 8381362 + * @summary Verify no crash for vector late-inline queue draining when MH/virtual late inlining is disabled + * @modules jdk.incubator.vector + * @run main/othervm -Xcomp -XX:+UnlockDiagnosticVMOptions + * -XX:-IncrementalInlineVirtual -XX:-IncrementalInlineMH -XX:-UseInlineCaches + * ${test.main.class} vector + */ + +/* + * @test + * @bug 8381362 + * @summary Verify no crash for non-vector late-inline queue draining when MH/virtual late inlining is disabled + * @modules jdk.incubator.vector + * @run main/othervm -Xcomp -XX:+UnlockDiagnosticVMOptions + * -XX:-IncrementalInlineVirtual -XX:-IncrementalInlineMH -XX:-UseInlineCaches + * -XX:LiveNodeCountInliningCutoff=50 + * -XX:CompileCommand=compileonly,${test.main.class}::nonVector* + * -XX:CompileCommand=delayinline,${test.main.class}::lateInline* + * ${test.main.class} nonvector + */ + +package compiler.inlining; + +import jdk.incubator.vector.*; +import java.lang.invoke.VarHandle; + +public class LateInlineQueueDrainTest { + private static final int SIZE = 60_000; + private static int sink; + + public static void main(String[] args) { + sink = 0; + if (args.length != 1) { + throw new RuntimeException("Expected one argument: vector|nonvector"); + } + switch (args[0]) { + case "vector": + vectorWorkload(); + break; + case "nonvector": + nonVectorWorkload(); + break; + default: + throw new RuntimeException("Unknown mode: " + args[0]); + } + System.out.println("PASS " + args[0] + " " + sink); + } + + private static void vectorWorkload() { + char[] a = new char[SIZE]; + char[] b = new char[SIZE]; + for (int i = 0; i < SIZE; i++) { + a[i] = (char) i; + b[i] = (char) i; + } + vectorKernel(a); + } + + private static void vectorKernel(char[] arr) { + FloatVector lcFloatVec2 = null; + FloatVector lcFloatVec1 = null; + float[] lcFloatArr1 = new float[100]; + float[] lcFloatArr2 = new float[100]; + float[] lcFloatArr3 = new float[100]; + Object Obj = new Object(); + for (int i = 0; i < lcFloatArr1.length; i++) { + lcFloatArr1[i] = (((float) i) * 1.5F) + 7.89F; + } + for (int i = 0; i < lcFloatArr2.length; i++) { + lcFloatArr2[i] = (((float) i) * 1.5F) + 7.89F; + } + for (int i = 0; i < lcFloatArr3.length; i++) { + lcFloatArr3[i] = (((float) i) * 1.5F) + 7.89F; + } + for (int i = 0; i < 50; i++) { + VarHandle.fullFence(); + synchronized (Obj) { + try { + Obj.wait(1); + } catch (InterruptedException ex) { + } + } + VarHandle.fullFence(); + if ((((int) (lcFloatArr1[0])) % 3) < 1) { + lcFloatVec1 = ((FloatVector) (VectorShuffle.iota(FloatVector.SPECIES_PREFERRED, 0, 14, true).toVector())); + } else { + lcFloatVec1 = FloatVector.fromArray(FloatVector.SPECIES_PREFERRED, lcFloatArr2, 14); + } + lcFloatVec1 = FloatVector.fromArray(FloatVector.SPECIES_PREFERRED, lcFloatArr3, 14); + lcFloatVec2 = lcFloatVec1.add(lcFloatVec1); + lcFloatVec2.intoArray(lcFloatArr1, 14); + synchronized (Obj) { + try { + Obj.wait(1); + } catch (InterruptedException ex) { + } + } + } + } + + private static void nonVectorWorkload() { + int r = 0; + for (int i = 0; i < 200_000; i++) { + r += nonVectorKernel(100); + } + sink += r; + } + + private static int nonVectorKernel(int n) { + int s = 0; + for (int i = 0; i < n; i++) { + lateInline(i); + s += i; + } + return s; + } + + private static void lateInline(int x) { + sink += x; + } +} diff --git a/test/hotspot/jtreg/compiler/inlining/TestDelayAfterInliningCutoff.java b/test/hotspot/jtreg/compiler/inlining/TestDelayAfterInliningCutoff.java new file mode 100644 index 00000000000..b9564c20c21 --- /dev/null +++ b/test/hotspot/jtreg/compiler/inlining/TestDelayAfterInliningCutoff.java @@ -0,0 +1,93 @@ +/* + * 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. + */ +package compiler.inlining; + +import compiler.lib.ir_framework.*; + +/* + * @test + * @bug 8382700 + * @summary verify that method inlining continues during incremental inline after it has stopped + * during parsing due to NodeCountInliningCutoff + * @library /test/lib / + * @run driver ${test.main.class} + */ +public class TestDelayAfterInliningCutoff { + public static void main(String[] args) { + var framework = new TestFramework(); + framework.setDefaultWarmup(1); + framework.addFlags("-XX:+UnlockDiagnosticVMOptions"); + // Workaround the issue with incorrect call count at call sites + framework.addFlags("-XX:MinInlineFrequencyRatio=0"); + framework.addScenarios(new Scenario(0, "-XX:+DelayAfterInliningCutoff")); + framework.addScenarios(new Scenario(1, "-XX:-DelayAfterInliningCutoff")); + framework.start(); + } + + @Test + @IR(failOn = IRNode.CALL, applyIf = {"DelayAfterInliningCutoff", "true"}) + @IR(counts = {IRNode.CALL, ">= 1"}, applyIf = {"DelayAfterInliningCutoff", "false"}) + public static void test() { + call1(); + call1(); + call1(); + call1(); + } + + private static void call1() { + call2(); + call2(); + call2(); + call2(); + } + + private static void call2() { + call3(); + call3(); + call3(); + call3(); + } + + private static void call3() { + call4(); + call4(); + call4(); + call4(); + } + + private static void call4() { + call5(); + call5(); + call5(); + call5(); + } + + private static void call5() { + call6(); + call6(); + call6(); + call6(); + } + + private static void call6() {} +} diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestReferenceGet.java b/test/hotspot/jtreg/compiler/intrinsics/TestReferenceGet.java new file mode 100644 index 00000000000..6fca3e9df14 --- /dev/null +++ b/test/hotspot/jtreg/compiler/intrinsics/TestReferenceGet.java @@ -0,0 +1,175 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8382815 + * @run main/othervm -XX:CompileCommand=dontinline,${test.main.class}::test_* ${test.main.class} + */ + +package compiler.intrinsics; + +import java.lang.ref.Reference; +import java.lang.ref.ReferenceQueue; +import java.lang.ref.PhantomReference; +import java.lang.ref.SoftReference; +import java.lang.ref.WeakReference; + +public class TestReferenceGet { + private static final void fail(String msg) throws Exception { + throw new RuntimeException(msg); + } + + private static final void test0(Reference ref, + Object expectedValue, + Object unexpectedValue, + String kind) throws Exception { + if ((expectedValue != null) && ref.get() == null) { + fail(kind + " refers to null"); + } + if (ref.get() != expectedValue) { + fail(kind + " doesn't refer to expected value"); + } + if (ref.get() == unexpectedValue) { + fail(kind + " refers to unexpected value"); + } + } + + private static final void test_phantom0(PhantomReference ref, + String kind) throws Exception { + if (ref.get() != null) { + fail(kind + " does not refer to null"); + } + } + + // Entry points to the test, important to push down type information to + // individual test methods. + + private static final void test_phantom(PhantomReference ref) throws Exception { + test_phantom0(ref, "phantom"); + } + + private static final void test_phantom_shadow(ShadowPhantomReference ref) throws Exception { + test_phantom0(ref, "phantom shadow"); + } + + private static final void test_weak(WeakReference ref, + Object expectedValue, + Object unexpectedValue) throws Exception { + test0(ref, expectedValue, unexpectedValue, "weak"); + } + + private static final void test_weak_shadow(ShadowWeakReference ref, + Object expectedValue, + Object unexpectedValue) throws Exception { + test0(ref, expectedValue, unexpectedValue, "weak shadow"); + } + + private static final void test_soft(SoftReference ref, + Object expectedValue, + Object unexpectedValue) throws Exception { + test0(ref, expectedValue, unexpectedValue, "soft"); + } + + private static final void test_soft_shadow(ShadowSoftReference ref, + Object expectedValue, + Object unexpectedValue) throws Exception { + test0(ref, expectedValue, unexpectedValue, "soft shadow"); + } + + static Object unexpected = new Object(); + + static Object obj0 = new Object(); + static Object obj1 = new Object(); + static Object obj2 = new Object(); + static Object obj3 = new Object(); + static Object obj4 = new Object(); + static Object obj5 = new Object(); + + public static void main(String[] args) throws Exception { + var queue = new ReferenceQueue(); + + // It is important to do all test methods in the loop, so that we + // exercise all paths in intrinsics. + for (int i = 0; i < 100000; i++) { + System.out.println("Create"); + var pref = new PhantomReference(obj0, queue); + var wref = new WeakReference(obj1); + var sref = new SoftReference(obj2); + var psref = new ShadowPhantomReference<>(obj3, queue); + var wsref = new ShadowWeakReference<>(obj4); + var ssref = new ShadowSoftReference<>(obj5); + + System.out.println("After creation"); + test_phantom(pref); + test_weak(wref, obj1, unexpected); + test_soft(sref, obj2, unexpected); + test_phantom_shadow(psref); + test_weak_shadow(wsref, obj4, unexpected); + test_soft_shadow(ssref, obj5, unexpected); + + System.out.println("Cleaning references"); + pref.clear(); + wref.clear(); + sref.clear(); + psref.clear(); + wsref.clear(); + ssref.clear(); + + System.out.println("Testing after cleaning"); + test_phantom(pref); + test_weak(wref, null, unexpected); + test_soft(sref, null, unexpected); + test_phantom_shadow(psref); + test_weak_shadow(wsref, null, unexpected); + test_soft_shadow(ssref, null, unexpected); + } + } + + // References that have their own "shadow" referent. Check that intrinsics + // hit the right referent. + + static class ShadowSoftReference extends SoftReference { + T referent; + public ShadowSoftReference(T ref) { + super(ref); + referent = ref; + } + } + + static class ShadowWeakReference extends WeakReference { + T referent; + public ShadowWeakReference(T ref) { + super(ref); + referent = ref; + } + } + + static class ShadowPhantomReference extends PhantomReference { + T referent; + public ShadowPhantomReference(T ref, ReferenceQueue q) { + super(ref, q); + referent = ref; + } + } +} diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestReferenceRefersTo.java b/test/hotspot/jtreg/compiler/intrinsics/TestReferenceRefersTo.java index f9d36131a8b..c66edb8a6ad 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/TestReferenceRefersTo.java +++ b/test/hotspot/jtreg/compiler/intrinsics/TestReferenceRefersTo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 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 @@ -23,10 +23,13 @@ /* * @test - * @bug 8256377 + * @bug 8256377 8382815 * @summary Based on test/jdk/java/lang/ref/ReferenceRefersTo.java. + * @run main/othervm -XX:CompileCommand=dontinline,${test.main.class}::test_* ${test.main.class} */ +package compiler.intrinsics; + import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.lang.ref.PhantomReference; @@ -39,7 +42,7 @@ public class TestReferenceRefersTo { } // Test java.lang.ref.Reference::refersTo0 intrinsic. - private static final void test(Reference ref, + private static final void test0(Reference ref, Object expectedValue, Object unexpectedValue, String kind) throws Exception { @@ -55,10 +58,10 @@ public class TestReferenceRefersTo { } // Test java.lang.ref.PhantomReference::refersTo0 intrinsic. - private static final void test_phantom(PhantomReference ref, + private static final void test_phantom0(PhantomReference ref, Object expectedValue, - Object unexpectedValue) throws Exception { - String kind = "phantom"; + Object unexpectedValue, + String kind) throws Exception { if ((expectedValue != null) && ref.refersTo(null)) { fail(kind + " refers to null"); } @@ -68,53 +71,120 @@ public class TestReferenceRefersTo { if (ref.refersTo(unexpectedValue)) { fail(kind + " refers to unexpected value"); } + } + // Entry points to the test, important to push down type information to + // individual test methods. + + private static final void test_phantom(PhantomReference ref, + Object expectedValue, + Object unexpectedValue) throws Exception { + test_phantom0(ref, expectedValue, unexpectedValue, "phantom"); + } + + private static final void test_phantom_shadow(ShadowPhantomReference ref, + Object expectedValue, + Object unexpectedValue) throws Exception { + test_phantom0(ref, expectedValue, unexpectedValue, "phantom shadow"); } private static final void test_weak(WeakReference ref, Object expectedValue, Object unexpectedValue) throws Exception { - test(ref, expectedValue, unexpectedValue, "weak"); + test0(ref, expectedValue, unexpectedValue, "weak"); + } + + private static final void test_weak_shadow(ShadowWeakReference ref, + Object expectedValue, + Object unexpectedValue) throws Exception { + test0(ref, expectedValue, unexpectedValue, "weak shadow"); } private static final void test_soft(SoftReference ref, Object expectedValue, Object unexpectedValue) throws Exception { - test(ref, expectedValue, unexpectedValue, "soft"); + test0(ref, expectedValue, unexpectedValue, "soft"); } + private static final void test_soft_shadow(ShadowSoftReference ref, + Object expectedValue, + Object unexpectedValue) throws Exception { + test0(ref, expectedValue, unexpectedValue, "soft shadow"); + } + + static Object unexpected = new Object(); + + static Object obj0 = new Object(); + static Object obj1 = new Object(); + static Object obj2 = new Object(); + static Object obj3 = new Object(); + static Object obj4 = new Object(); + static Object obj5 = new Object(); + public static void main(String[] args) throws Exception { var queue = new ReferenceQueue(); - var obj0 = new Object(); - var obj1 = new Object(); - var obj2 = new Object(); - var obj3 = new Object(); + // It is important to do all test methods in the loop, so that we + // exercise all paths in intrinsics. + for (int i = 0; i < 100000; i++) { + System.out.println("Create"); + var pref = new PhantomReference(obj0, queue); + var wref = new WeakReference(obj1); + var sref = new SoftReference(obj2); + var psref = new ShadowPhantomReference<>(obj3, queue); + var wsref = new ShadowWeakReference<>(obj4); + var ssref = new ShadowSoftReference<>(obj5); - var pref = new PhantomReference(obj0, queue); - var wref = new WeakReference(obj1); - var sref = new SoftReference(obj2); + System.out.println("After creation"); + test_phantom(pref, obj0, unexpected); + test_weak(wref, obj1, unexpected); + test_soft(sref, obj2, unexpected); + test_phantom_shadow(psref, obj3, unexpected); + test_weak_shadow(wsref, obj4, unexpected); + test_soft_shadow(ssref, obj5, unexpected); - System.out.println("Warmup"); - for (int i = 0; i < 10000; i++) { - test_phantom(pref, obj0, obj3); - test_weak(wref, obj1, obj3); - test_soft(sref, obj2, obj3); + System.out.println("Cleaning references"); + pref.clear(); + wref.clear(); + sref.clear(); + psref.clear(); + wsref.clear(); + ssref.clear(); + + System.out.println("Testing after cleaning"); + test_phantom(pref, null, unexpected); + test_weak(wref, null, unexpected); + test_soft(sref, null, unexpected); + test_phantom_shadow(psref, null, unexpected); + test_weak_shadow(wsref, null, unexpected); + test_soft_shadow(ssref, null, unexpected); } + } - System.out.println("Testing starts"); - test_phantom(pref, obj0, obj3); - test_weak(wref, obj1, obj3); - test_soft(sref, obj2, obj3); + // References that have their own "shadow" referent. Check that intrinsics + // hit the right referent. - System.out.println("Cleaning references"); - pref.clear(); - wref.clear(); - sref.clear(); + static class ShadowSoftReference extends SoftReference { + T referent; + public ShadowSoftReference(T ref) { + super(ref); + referent = ref; + } + } - System.out.println("Testing after cleaning"); - test_phantom(pref, null, obj3); - test_weak(wref, null, obj3); - test_soft(sref, null, obj3); + static class ShadowWeakReference extends WeakReference { + T referent; + public ShadowWeakReference(T ref) { + super(ref); + referent = ref; + } + } + + static class ShadowPhantomReference extends PhantomReference { + T referent; + public ShadowPhantomReference(T ref, ReferenceQueue q) { + super(ref, q); + referent = ref; + } } } diff --git a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/AndnTestI.java b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/AndnTestI.java index 30ce3b36af6..d2fc3f29a75 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/AndnTestI.java +++ b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/AndnTestI.java @@ -24,7 +24,7 @@ /* * @test * @bug 8031321 - * @requires vm.flavor == "server" & !vm.graal.enabled + * @requires vm.flavor == "server" & !vm.graal.enabled & vm.cpu.features ~= ".*avx.*" * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/AndnTestL.java b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/AndnTestL.java index 1a3e7e1314d..374da537619 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/AndnTestL.java +++ b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/AndnTestL.java @@ -24,7 +24,7 @@ /* * @test * @bug 8031321 - * @requires vm.flavor == "server" & !vm.graal.enabled + * @requires vm.flavor == "server" & !vm.graal.enabled & vm.cpu.features ~= ".*avx.*" * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsiTestI.java b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsiTestI.java index 71d9e52a539..645fde13534 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsiTestI.java +++ b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsiTestI.java @@ -24,7 +24,7 @@ /* * @test * @bug 8031321 - * @requires vm.flavor == "server" & !vm.graal.enabled + * @requires vm.flavor == "server" & !vm.graal.enabled & vm.cpu.features ~= ".*avx.*" * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsiTestL.java b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsiTestL.java index 425f70f1052..8531f8580c1 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsiTestL.java +++ b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsiTestL.java @@ -24,7 +24,7 @@ /* * @test * @bug 8031321 - * @requires vm.flavor == "server" & !vm.graal.enabled + * @requires vm.flavor == "server" & !vm.graal.enabled & vm.cpu.features ~= ".*avx.*" * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java index 3632d9617b8..2509ed281c3 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java +++ b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java @@ -24,7 +24,7 @@ /* * @test * @bug 8031321 - * @requires vm.flavor == "server" & !vm.graal.enabled + * @requires vm.flavor == "server" & !vm.graal.enabled & vm.cpu.features ~= ".*avx.*" * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsmskTestL.java b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsmskTestL.java index 8f6958d212f..33223c595a6 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsmskTestL.java +++ b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsmskTestL.java @@ -24,7 +24,7 @@ /* * @test * @bug 8031321 - * @requires vm.flavor == "server" & !vm.graal.enabled + * @requires vm.flavor == "server" & !vm.graal.enabled & vm.cpu.features ~= ".*avx.*" * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsrTestI.java b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsrTestI.java index bd8c26724a1..2c249db8fd0 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsrTestI.java +++ b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsrTestI.java @@ -24,7 +24,7 @@ /* * @test * @bug 8031321 - * @requires vm.flavor == "server" & !vm.graal.enabled + * @requires vm.flavor == "server" & !vm.graal.enabled & vm.cpu.features ~= ".*avx.*" * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsrTestL.java b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsrTestL.java index 68f82a99bd3..4082cd4aa5b 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsrTestL.java +++ b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsrTestL.java @@ -24,7 +24,7 @@ /* * @test * @bug 8031321 - * @requires vm.flavor == "server" & !vm.graal.enabled + * @requires vm.flavor == "server" & !vm.graal.enabled & vm.cpu.features ~= ".*avx.*" * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BmiIntrinsicBase.java b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BmiIntrinsicBase.java index 8c6120388a1..425f3a92518 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BmiIntrinsicBase.java +++ b/test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BmiIntrinsicBase.java @@ -36,6 +36,7 @@ import java.lang.reflect.Executable; import java.lang.reflect.Method; import java.util.concurrent.Callable; import java.util.function.Function; +import java.util.List; public class BmiIntrinsicBase extends CompilerWhiteBoxTest { diff --git a/test/hotspot/jtreg/compiler/jsr292/InvokerSignatureMismatch.java b/test/hotspot/jtreg/compiler/jsr292/InvokerSignatureMismatch.java index 188051025ad..6e684ea104c 100644 --- a/test/hotspot/jtreg/compiler/jsr292/InvokerSignatureMismatch.java +++ b/test/hotspot/jtreg/compiler/jsr292/InvokerSignatureMismatch.java @@ -1,3 +1,26 @@ +/* + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.jsr292; import java.lang.invoke.MethodHandle; @@ -39,7 +62,7 @@ public class InvokerSignatureMismatch { static void mainLink(int i) throws Throwable { Object name = MethodHandleHelper.internalMemberName(INT_MH); - MethodHandleHelper.linkToStatic((float) i, name); + MethodHandleHelper.linkToStatic(name, (float) i); } static void mainInvoke(int i) throws Throwable { diff --git a/test/hotspot/jtreg/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java b/test/hotspot/jtreg/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java index a422e52986c..64eb58c5a2d 100644 --- a/test/hotspot/jtreg/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java +++ b/test/hotspot/jtreg/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2025, 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 @@ -49,7 +49,7 @@ public class MethodHandleHelper { } @ForceInline - public static void linkToStatic(float arg, Object name) throws Throwable { + public static void linkToStatic(Object name, float arg) throws Throwable { MethodHandle.linkToStatic(arg, name); } diff --git a/test/hotspot/jtreg/compiler/lib/compile_framework/CompileFrameworkException.java b/test/hotspot/jtreg/compiler/lib/compile_framework/CompileFrameworkException.java index 5c71a33a533..4f4749218e8 100644 --- a/test/hotspot/jtreg/compiler/lib/compile_framework/CompileFrameworkException.java +++ b/test/hotspot/jtreg/compiler/lib/compile_framework/CompileFrameworkException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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,6 +26,7 @@ package compiler.lib.compile_framework; /** * Exception thrown in the Compilation Framework. Most likely, the user is responsible for the failure. */ +@SuppressWarnings("serial") public class CompileFrameworkException extends RuntimeException { public CompileFrameworkException(String message) { super("Exception in Compile Framework:" + System.lineSeparator() + message); diff --git a/test/hotspot/jtreg/compiler/lib/compile_framework/InternalCompileFrameworkException.java b/test/hotspot/jtreg/compiler/lib/compile_framework/InternalCompileFrameworkException.java index 0cfed80ce1c..0ef1a386fe3 100644 --- a/test/hotspot/jtreg/compiler/lib/compile_framework/InternalCompileFrameworkException.java +++ b/test/hotspot/jtreg/compiler/lib/compile_framework/InternalCompileFrameworkException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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,6 +26,7 @@ package compiler.lib.compile_framework; /** * Internal exception thrown in Compilation Framework. Most likely, this is due to a bug in the CompileFramework. */ +@SuppressWarnings("serial") public class InternalCompileFrameworkException extends RuntimeException { public InternalCompileFrameworkException(String message) { super("Internal exception in Compile Framework, please file a bug:" + System.lineSeparator() + message); diff --git a/test/hotspot/jtreg/compiler/lib/generators/EmptyGeneratorException.java b/test/hotspot/jtreg/compiler/lib/generators/EmptyGeneratorException.java index df9c0b47b71..48572df9999 100644 --- a/test/hotspot/jtreg/compiler/lib/generators/EmptyGeneratorException.java +++ b/test/hotspot/jtreg/compiler/lib/generators/EmptyGeneratorException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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,6 +28,7 @@ package compiler.lib.generators; * set of values. For example, bounds such as [1, 0] cause an EmptyGeneratorException. Another example would be * restricting a uniform integer generator over the range [0, 1] to [10, 11]. */ +@SuppressWarnings("serial") public class EmptyGeneratorException extends RuntimeException { public EmptyGeneratorException() {} } diff --git a/test/hotspot/jtreg/compiler/lib/generators/Generators.java b/test/hotspot/jtreg/compiler/lib/generators/Generators.java index c16b35cdae8..99daae46c6e 100644 --- a/test/hotspot/jtreg/compiler/lib/generators/Generators.java +++ b/test/hotspot/jtreg/compiler/lib/generators/Generators.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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 @@ -258,6 +258,7 @@ public final class Generators { * An overload for restrictable generators exists. */ @SafeVarargs + @SuppressWarnings("varargs") public final Generator mixed(List weights, Generator... generators) { return new MixedGenerator<>(this, Arrays.asList(generators), weights); } @@ -279,6 +280,7 @@ public final class Generators { * generator. */ @SafeVarargs + @SuppressWarnings("varargs") public final > RestrictableGenerator mixed(List weights, RestrictableGenerator... generators) { return new RestrictableMixedGenerator<>(this, Arrays.asList(generators), weights); } diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java index 55d591acdb3..4f7869f444a 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java @@ -233,6 +233,11 @@ public class IRNode { beforeMatchingNameRegex(ADD_P, "AddP"); } + public static final String ADD_D = PREFIX + "ADD_D" + POSTFIX; + static { + beforeMatchingNameRegex(ADD_D, "AddD"); + } + public static final String ADD_VD = VECTOR_PREFIX + "ADD_VD" + POSTFIX; static { vectorNode(ADD_VD, "AddVD", TYPE_DOUBLE); @@ -763,11 +768,21 @@ public class IRNode { vectorNode(DIV_VHF, "DivVHF", TYPE_SHORT); } + public static final String DIV_F = PREFIX + "DIV_F" + POSTFIX; + static { + beforeMatchingNameRegex(DIV_F, "DivF"); + } + public static final String DIV_VF = VECTOR_PREFIX + "DIV_VF" + POSTFIX; static { vectorNode(DIV_VF, "DivVF", TYPE_FLOAT); } + public static final String DIV_D = PREFIX + "DIV_D" + POSTFIX; + static { + beforeMatchingNameRegex(DIV_D, "DivD"); + } + public static final String DIV_VD = VECTOR_PREFIX + "DIV_VD" + POSTFIX; static { vectorNode(DIV_VD, "DivVD", TYPE_DOUBLE); diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java b/test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java index debb025f449..e7fd51e4f39 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java @@ -364,6 +364,7 @@ public class TestFramework { * @return the same framework instance. */ @SafeVarargs + @SuppressWarnings("varargs") final public TestFramework addCrossProductScenarios(Set... flagSets) { TestFormat.checkAndReport(flagSets != null && Arrays.stream(flagSets).noneMatch(Objects::isNull) && diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/SuccessOnlyConstraintException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/SuccessOnlyConstraintException.java index 452e9a666c9..7868831ec79 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/SuccessOnlyConstraintException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/SuccessOnlyConstraintException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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,6 +28,7 @@ import compiler.lib.ir_framework.driver.irmatching.irrule.constraint.Constraint; /** * Exception used to signal that a {@link Constraint} should always succeed. */ +@SuppressWarnings("serial") public class SuccessOnlyConstraintException extends RuntimeException { public SuccessOnlyConstraintException(String message) { super("Unhandled SuccessOnlyConstraintException, should have created a Constraint that always succeeds:" + System.lineSeparator() + message); diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/TestVMException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/TestVMException.java index 8de9ac8e348..aff48b1741d 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/TestVMException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/TestVMException.java @@ -28,6 +28,7 @@ import compiler.lib.ir_framework.shared.TestFormatException; /** * Exception that is thrown if the Test VM has thrown any kind of exception (except for {@link TestFormatException}). */ +@SuppressWarnings("serial") public class TestVMException extends RuntimeException { private final String exceptionInfo; diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/IRViolationException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/IRViolationException.java index c11de93df06..6331cd9326f 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/IRViolationException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/IRViolationException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022, 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 @@ -34,6 +34,7 @@ import compiler.lib.ir_framework.Test; * @see IR * @see Test */ +@SuppressWarnings("serial") public class IRViolationException extends RuntimeException { private final String compilations; private String exceptionInfo; diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/mapping/OverlappingPhaseRangesException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/mapping/OverlappingPhaseRangesException.java index 6838f87a5be..f83e402fd9e 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/mapping/OverlappingPhaseRangesException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/mapping/OverlappingPhaseRangesException.java @@ -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 @@ -29,6 +29,7 @@ package compiler.lib.ir_framework.driver.irmatching.mapping; * @see PhaseInterval * @see MultiPhaseRangeEntry */ +@SuppressWarnings("serial") class OverlappingPhaseRangesException extends RuntimeException { public OverlappingPhaseRangesException(PhaseInterval entry, PhaseInterval entry2) { super("The following two PhaseRangeEntry objects overlap which is forbidden:" + System.lineSeparator() + "- " diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/TestVmMessageParser.java b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/TestVmMessageParser.java new file mode 100644 index 00000000000..fa68b638a9f --- /dev/null +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/TestVmMessageParser.java @@ -0,0 +1,49 @@ +/* + * 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. + */ + +package compiler.lib.ir_framework.driver.network.testvm; + +import compiler.lib.ir_framework.driver.network.testvm.java.JavaMessage; +import compiler.lib.ir_framework.shared.TestFrameworkSocket; + +/** + * We currently have only one type of Test VM message sent to the {@link TestFrameworkSocket}: + * - {@link JavaMessage}: A message sent from Java code. + * + *

              + * Later, we will add C2 messages as well as second type with JDK-8375270. + * Both kinds of messages are parsed differently by classes implementing this interface. + */ +public interface TestVmMessageParser { + /** + * Parse a single line of a received Test VM message. + * + * @param line A single message line forwarded by {@link TestVmMessageReader}. + */ + void parseLine(String line); + + /** + * Once parsing is done, this method returns the final output. + */ + Output output(); +} diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/TestVmMessageReader.java b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/TestVmMessageReader.java index a203fd367f7..992f95660a3 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/TestVmMessageReader.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/TestVmMessageReader.java @@ -23,8 +23,6 @@ package compiler.lib.ir_framework.driver.network.testvm; -import compiler.lib.ir_framework.driver.network.testvm.java.JavaMessageParser; -import compiler.lib.ir_framework.driver.network.testvm.java.JavaMessages; import compiler.lib.ir_framework.shared.TestFrameworkException; import compiler.lib.ir_framework.shared.TestFrameworkSocket; @@ -35,23 +33,23 @@ import java.util.concurrent.Future; /** * Dedicated reader for Test VM messages received by the {@link TestFrameworkSocket}. The reader is used as a task - * wrapped in a {@link Future}. The received messages are parsed with the {@link JavaMessageParser}. Once the Test VM - * is terminated, client connection is closed and the parsed messages can be fetched with {@link Future#get()} which - * calls {@link #call()}. + * wrapped in a {@link Future}. The received messages are parsed with the provided {@link TestVmMessageParser}. Once the + * Test VM is terminated, client connection is closed and the parsed messages can be fetched with {@link Future#get()} + * which calls {@link #call()}. */ -public class TestVmMessageReader implements Callable { +public class TestVmMessageReader implements Callable { private final Socket socket; - private final BufferedReader reader; - private final JavaMessageParser messageParser; + private final BufferedReader reader; // identity already consumed + private final TestVmMessageParser messageParser; - public TestVmMessageReader(Socket socket, BufferedReader reader) { + public TestVmMessageReader(Socket socket, BufferedReader reader, TestVmMessageParser messageParser) { this.socket = socket; this.reader = reader; - this.messageParser = new JavaMessageParser(); + this.messageParser = messageParser; } @Override - public JavaMessages call() { + public Output call() { try (socket; reader) { String line; while ((line = reader.readLine()) != null) { @@ -63,3 +61,4 @@ public class TestVmMessageReader implements Callable { } } } + diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/java/JavaMessageParser.java b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/java/JavaMessageParser.java index d419a06c8de..5b0c624720a 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/java/JavaMessageParser.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/driver/network/testvm/java/JavaMessageParser.java @@ -24,6 +24,7 @@ package compiler.lib.ir_framework.driver.network.testvm.java; import compiler.lib.ir_framework.TestFramework; +import compiler.lib.ir_framework.driver.network.testvm.TestVmMessageParser; import compiler.lib.ir_framework.driver.network.testvm.java.multiline.ApplicableIRRulesStrategy; import compiler.lib.ir_framework.driver.network.testvm.java.multiline.MultiLineParser; import compiler.lib.ir_framework.driver.network.testvm.java.multiline.VMInfoStrategy; @@ -40,7 +41,7 @@ import static compiler.lib.ir_framework.test.network.MessageTag.*; * Dedicated parser for {@link JavaMessages} received from the Test VM. Depending on the parsed {@link MessageTag}, the * message is parsed differently. */ -public class JavaMessageParser { +public class JavaMessageParser implements TestVmMessageParser { private static final Pattern TAG_PATTERN = Pattern.compile("^(\\[[^]]+])\\s*(.*)$"); private final List stdoutMessages; @@ -60,6 +61,7 @@ public class JavaMessageParser { this.currentMultiLineParser = null; } + @Override public void parseLine(String line) { line = line.trim(); Matcher tagLineMatcher = TAG_PATTERN.matcher(line); @@ -118,6 +120,7 @@ public class JavaMessageParser { currentMultiLineParser = null; } + @Override public JavaMessages output() { return new JavaMessages(new StdoutMessages(stdoutMessages), new ExecutedTests(executedTests), diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/CheckedTestFrameworkException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/CheckedTestFrameworkException.java index d18584abaa1..dca05ca23ed 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/CheckedTestFrameworkException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/CheckedTestFrameworkException.java @@ -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,6 +26,7 @@ package compiler.lib.ir_framework.shared; /** * Checked internal exceptions in the framework to propagate error handling. */ +@SuppressWarnings("serial") public class CheckedTestFrameworkException extends Exception { public CheckedTestFrameworkException(String msg) { super(msg); diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/EmptyConstraintException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/EmptyConstraintException.java index 6dfd31819ee..937ccede809 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/EmptyConstraintException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/EmptyConstraintException.java @@ -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 @@ -26,5 +26,6 @@ package compiler.lib.ir_framework.shared; /** * Exception thrown when {@link ComparisonConstraintParser} cannot find a constraint. */ +@SuppressWarnings("serial") class EmptyConstraintException extends Exception { } diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/InvalidComparatorException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/InvalidComparatorException.java index 4ab550e8be8..00ba02da26b 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/InvalidComparatorException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/InvalidComparatorException.java @@ -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 @@ -26,6 +26,7 @@ package compiler.lib.ir_framework.shared; /** * Exception threw when {@link ComparisonConstraintParser} parses an invalid comparator. */ +@SuppressWarnings("serial") public class InvalidComparatorException extends Exception { private final String comparator; diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/InvalidConstraintValueException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/InvalidConstraintValueException.java index a415ebf4046..d380343edd2 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/InvalidConstraintValueException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/InvalidConstraintValueException.java @@ -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 @@ -26,6 +26,7 @@ package compiler.lib.ir_framework.shared; /** * Exception thrown when {@link ComparisonConstraintParser} parses an invalid value. */ +@SuppressWarnings("serial") class InvalidConstraintValueException extends Exception { private final String invalidValue; private final String comparator; diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/MissingConstraintValueException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/MissingConstraintValueException.java index 12230f9219c..8edbd9bd4d0 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/MissingConstraintValueException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/MissingConstraintValueException.java @@ -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 @@ -26,6 +26,7 @@ package compiler.lib.ir_framework.shared; /** * Exception thrown when {@link ComparisonConstraintParser} cannot find a value in a constraint after a comparator. */ +@SuppressWarnings("serial") class MissingConstraintValueException extends Exception { private final String comparator; diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/NoTestsRunException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/NoTestsRunException.java index 4b616f53e4d..f5ec72f9cdf 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/NoTestsRunException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/NoTestsRunException.java @@ -27,6 +27,7 @@ package compiler.lib.ir_framework.shared; * Exception that is thrown by the Test VM if no tests are run as a result of specifying {@code -DTest} and/or * {@code -DExclude} defining an empty set with the used Test VM flags. */ +@SuppressWarnings("serial") public class NoTestsRunException extends RuntimeException { /** * Default constructor used by Test VM diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFormatException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFormatException.java index cb44f624bfb..3ec6a092f94 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFormatException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFormatException.java @@ -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,6 +26,7 @@ package compiler.lib.ir_framework.shared; /** * Exception that is thrown if a JTreg test violates the supported format by the test framework. */ +@SuppressWarnings("serial") public class TestFormatException extends RuntimeException { public TestFormatException(String message) { super(message); diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFrameworkException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFrameworkException.java index 050aecf09db..17dbbe3bcf3 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFrameworkException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFrameworkException.java @@ -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 @@ -27,6 +27,7 @@ package compiler.lib.ir_framework.shared; * Exception that is thrown if there is an internal error in the framework. This is most likely an indicator of a bug * in the framework. */ +@SuppressWarnings("serial") public class TestFrameworkException extends RuntimeException { public TestFrameworkException(String message) { super("Internal Test Framework exception - please file a bug:" + System.lineSeparator() + message); diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFrameworkSocket.java b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFrameworkSocket.java index 44063a4bd43..05359d0d789 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFrameworkSocket.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestFrameworkSocket.java @@ -26,7 +26,9 @@ package compiler.lib.ir_framework.shared; import compiler.lib.ir_framework.TestFramework; import compiler.lib.ir_framework.driver.network.*; import compiler.lib.ir_framework.driver.network.testvm.TestVmMessageReader; +import compiler.lib.ir_framework.driver.network.testvm.java.JavaMessageParser; import compiler.lib.ir_framework.driver.network.testvm.java.JavaMessages; +import compiler.lib.ir_framework.test.network.TestVmSocket; import java.io.BufferedReader; import java.io.IOException; @@ -116,20 +118,46 @@ public class TestFrameworkSocket implements AutoCloseable { } /** - * Accept new client connection and then submit a task accordingly to manage incoming message on that connection/socket. + * Accept new client connection by first reading the identity of the connection (either coming from Java or C2) + * and then submitting a task accordingly to manage incoming messages on that connection/socket. */ private void acceptNewClientConnection() throws IOException { Socket client = serverSocket.accept(); BufferedReader reader = new BufferedReader(new InputStreamReader(client.getInputStream())); - submitTask(client, reader); + try { + String identity = readIdentity(client, reader).trim(); + submitTask(identity, client, reader); + } catch (Exception e) { + client.close(); + reader.close(); + throw e; + } + } + + private String readIdentity(Socket client, BufferedReader reader) throws IOException { + String identity; + try { + client.setSoTimeout(10000); + identity = reader.readLine(); + TestFramework.check(identity != null, "end of stream has been reached without reading the identity"); + } catch (SocketTimeoutException e) { + throw new TestFrameworkException("Did not receive initial identity message after 10s", e); + } finally { + client.setSoTimeout(0); + } + return identity; } /** * Submit dedicated tasks which are wrapped into {@link Future} objects. The tasks will read all messages sent * over that connection. */ - private void submitTask(Socket client, BufferedReader reader) { - javaFuture = clientExecutor.submit(new TestVmMessageReader(client, reader)); + private void submitTask(String identity, Socket client, BufferedReader reader) { + if (identity.equals(TestVmSocket.IDENTITY)) { + javaFuture = clientExecutor.submit(new TestVmMessageReader<>(client, reader, new JavaMessageParser())); + } else { + throw new TestFrameworkException("Unrecognized identity: " + identity); + } } @Override diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestRunException.java b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestRunException.java index 1969a755704..1ace94cac16 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestRunException.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/shared/TestRunException.java @@ -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 @@ -27,6 +27,7 @@ package compiler.lib.ir_framework.shared; * Exception that is thrown if the JTreg test throws an exception during the execution of individual tests of the * test class. */ +@SuppressWarnings("serial") public class TestRunException extends RuntimeException { public TestRunException(String message) { super(message); diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/test/AbstractTest.java b/test/hotspot/jtreg/compiler/lib/ir_framework/test/AbstractTest.java index 152dcab273a..241f7aa5b54 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/test/AbstractTest.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/test/AbstractTest.java @@ -36,6 +36,7 @@ import java.lang.reflect.Modifier; /** * Abstract super class for base, checked and custom run tests. */ +@SuppressWarnings("serial") abstract class AbstractTest { protected static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); protected static final int TEST_COMPILATION_TIMEOUT_MS = Integer.parseInt(System.getProperty("TestCompilationTimeout", "10")) * 1000; diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/test/ArgumentsProvider.java b/test/hotspot/jtreg/compiler/lib/ir_framework/test/ArgumentsProvider.java index 3a3388baf14..f868fa2b82f 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/test/ArgumentsProvider.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/test/ArgumentsProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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,17 +23,6 @@ package compiler.lib.ir_framework.test; -import compiler.lib.ir_framework.shared.TestFormat; -import compiler.lib.ir_framework.shared.TestRunException; -import compiler.lib.ir_framework.Argument; -import compiler.lib.ir_framework.Arguments; -import compiler.lib.ir_framework.SetupInfo; - -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.HashMap; -import java.util.Arrays; - /** * This interface provides arguments (and can set fields) for a test method. Different implementations are chosen * based on the @Arguments annotation for the @Test method. @@ -51,90 +40,3 @@ interface ArgumentsProvider { Object[] getArguments(Object invocationTarget, int invocationCounter); } - -/** - * For a test method, determine what ArgumentsProvider is to be constructed, given its @Arguments annotation, - * and the available setup methods. - */ -class ArgumentsProviderBuilder { - public static ArgumentsProvider build(Method method, - HashMap setupMethodMap) { - Arguments argumentsAnnotation = method.getAnnotation(Arguments.class); - if (argumentsAnnotation == null) { - return new DefaultArgumentsProvider(); - } - - Argument[] values = argumentsAnnotation.values(); - String setupMethodName = argumentsAnnotation.setup(); - - if (!setupMethodName.isEmpty()) { - TestFormat.check(values.length == 0, - "@Arguments: Can only specify \"setup\" or \"values\" but not both in " + method); - TestFormat.check(setupMethodMap.containsKey(setupMethodName), - "@Arguments setup: did not find " + setupMethodName + - " for " + method); - Method setupMethod = setupMethodMap.get(setupMethodName); - return new SetupArgumentsProvider(setupMethod); - } else { - TestFormat.check(values.length > 0, - "@Arguments: Empty annotation not allowed. Either specify \"values\" or \"setup\" in " + method); - ArgumentValue[] argumentValues = ArgumentValue.getArgumentValues(method, values); - return new ValueArgumentsProvider(argumentValues); - } - } -} - -/** - * Default: when no @Arguments annotation is provided (including for custom run tests). - */ -final class DefaultArgumentsProvider implements ArgumentsProvider { - @Override - public Object[] getArguments(Object invocationTarget, int invocationCounter) { - return new Object[]{}; - } -} - -/** - * Used for @Arguments(values = {...}) to specify individual arguments directly. - */ -final class ValueArgumentsProvider implements ArgumentsProvider { - ArgumentValue[] argumentValues; - - ValueArgumentsProvider(ArgumentValue[] argumentValues) { - this.argumentValues = argumentValues; - } - - @Override - public Object[] getArguments(Object invocationTarget, int invocationCounter) { - return Arrays.stream(argumentValues).map(v -> v.getValue()).toArray(); - } -} - -/** - * Used for @Arguments(setup = "setupMethodName") to specify a setup method to provide arguments - * and possibly set fields. - */ -final class SetupArgumentsProvider implements ArgumentsProvider { - Method setupMethod; - - SetupArgumentsProvider(Method setupMethod) { - this.setupMethod = setupMethod; - } - - @Override - public Object[] getArguments(Object invocationTarget, int invocationCounter) { - Object target = Modifier.isStatic(setupMethod.getModifiers()) ? null - : invocationTarget; - try { - if (setupMethod.getParameterCount() == 1) { - return (Object[]) setupMethod.invoke(target, new SetupInfo(invocationCounter)); - } else { - return (Object[]) setupMethod.invoke(target); - } - } catch (Exception e) { - throw new TestRunException("There was an error while invoking setup method " + - setupMethod + " on " + target, e); - } - } -} - diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/test/ArgumentsProviderBuilder.java b/test/hotspot/jtreg/compiler/lib/ir_framework/test/ArgumentsProviderBuilder.java new file mode 100644 index 00000000000..b5137fdc32a --- /dev/null +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/test/ArgumentsProviderBuilder.java @@ -0,0 +1,63 @@ +/* + * 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. + */ + +package compiler.lib.ir_framework.test; + +import compiler.lib.ir_framework.Argument; +import compiler.lib.ir_framework.Arguments; +import compiler.lib.ir_framework.shared.TestFormat; + +import java.lang.reflect.Method; +import java.util.HashMap; + +/** + * For a test method, determine what ArgumentsProvider is to be constructed, given its @Arguments annotation, + * and the available setup methods. + */ +class ArgumentsProviderBuilder { + public static ArgumentsProvider build(Method method, + HashMap setupMethodMap) { + Arguments argumentsAnnotation = method.getAnnotation(Arguments.class); + if (argumentsAnnotation == null) { + return new DefaultArgumentsProvider(); + } + + Argument[] values = argumentsAnnotation.values(); + String setupMethodName = argumentsAnnotation.setup(); + + if (!setupMethodName.isEmpty()) { + TestFormat.check(values.length == 0, + "@Arguments: Can only specify \"setup\" or \"values\" but not both in " + method); + TestFormat.check(setupMethodMap.containsKey(setupMethodName), + "@Arguments setup: did not find " + setupMethodName + + " for " + method); + Method setupMethod = setupMethodMap.get(setupMethodName); + return new SetupArgumentsProvider(setupMethod); + } else { + TestFormat.check(values.length > 0, + "@Arguments: Empty annotation not allowed. Either specify \"values\" or \"setup\" in " + method); + ArgumentValue[] argumentValues = ArgumentValue.getArgumentValues(method, values); + return new ValueArgumentsProvider(argumentValues); + } + } +} diff --git a/test/jdk/jdk/internal/vm/ThreadSnapshot/java.base/jdk/internal/vm/Helper.java b/test/hotspot/jtreg/compiler/lib/ir_framework/test/DefaultArgumentsProvider.java similarity index 74% rename from test/jdk/jdk/internal/vm/ThreadSnapshot/java.base/jdk/internal/vm/Helper.java rename to test/hotspot/jtreg/compiler/lib/ir_framework/test/DefaultArgumentsProvider.java index 99be9d2241a..c6b60a400fd 100644 --- a/test/jdk/jdk/internal/vm/ThreadSnapshot/java.base/jdk/internal/vm/Helper.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/test/DefaultArgumentsProvider.java @@ -21,18 +21,14 @@ * questions. */ -package jdk.internal.vm; +package compiler.lib.ir_framework.test; /** - * Defines methods that use package-private methods on ThreadSnapshot. + * Default: when no @Arguments annotation is provided (including for custom run tests). */ -public class Helper { - - /** - * Uses ThreadSnapshot.of(Thread) to take a snapshot of the given thread, returning - * {@code true} if the thread is alive. - */ - public static boolean isAlive(Thread thread) { - return ThreadSnapshot.of(thread) != null; +final class DefaultArgumentsProvider implements ArgumentsProvider { + @Override + public Object[] getArguments(Object invocationTarget, int invocationCounter) { + return new Object[]{}; } } diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/test/SetupArgumentsProvider.java b/test/hotspot/jtreg/compiler/lib/ir_framework/test/SetupArgumentsProvider.java new file mode 100644 index 00000000000..d6ddddb6290 --- /dev/null +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/test/SetupArgumentsProvider.java @@ -0,0 +1,58 @@ +/* + * 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. + */ + +package compiler.lib.ir_framework.test; + +import compiler.lib.ir_framework.SetupInfo; +import compiler.lib.ir_framework.shared.TestRunException; + +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +/** + * Used for @Arguments(setup = "setupMethodName") to specify a setup method to provide arguments + * and possibly set fields. + */ +final class SetupArgumentsProvider implements ArgumentsProvider { + Method setupMethod; + + SetupArgumentsProvider(Method setupMethod) { + this.setupMethod = setupMethod; + } + + @Override + public Object[] getArguments(Object invocationTarget, int invocationCounter) { + Object target = Modifier.isStatic(setupMethod.getModifiers()) ? null + : invocationTarget; + try { + if (setupMethod.getParameterCount() == 1) { + return (Object[]) setupMethod.invoke(target, new SetupInfo(invocationCounter)); + } else { + return (Object[]) setupMethod.invoke(target); + } + } catch (Exception e) { + throw new TestRunException("There was an error while invoking setup method " + + setupMethod + " on " + target, e); + } + } +} diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/test/ValueArgumentsProvider.java b/test/hotspot/jtreg/compiler/lib/ir_framework/test/ValueArgumentsProvider.java new file mode 100644 index 00000000000..44ec55b93ab --- /dev/null +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/test/ValueArgumentsProvider.java @@ -0,0 +1,42 @@ +/* + * 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. + */ + +package compiler.lib.ir_framework.test; + +import java.util.Arrays; + +/** + * Used for @Arguments(values = {...}) to specify individual arguments directly. + */ +final class ValueArgumentsProvider implements ArgumentsProvider { + ArgumentValue[] argumentValues; + + ValueArgumentsProvider(ArgumentValue[] argumentValues) { + this.argumentValues = argumentValues; + } + + @Override + public Object[] getArguments(Object invocationTarget, int invocationCounter) { + return Arrays.stream(argumentValues).map(v -> v.getValue()).toArray(); + } +} diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/test/network/TestVmSocket.java b/test/hotspot/jtreg/compiler/lib/ir_framework/test/network/TestVmSocket.java index 37e59b9dcae..afb65b43338 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/test/network/TestVmSocket.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/test/network/TestVmSocket.java @@ -33,6 +33,8 @@ import java.net.InetAddress; import java.net.Socket; public class TestVmSocket { + public static final String IDENTITY = "#TestVM-Java#"; + private static final boolean REPRODUCE = Boolean.getBoolean("Reproduce"); private static final String SERVER_PORT_PROPERTY = "ir.framework.server.port"; private static final int SERVER_PORT = Integer.getInteger(SERVER_PORT_PROPERTY, -1); @@ -88,6 +90,7 @@ public class TestVmSocket { // Keep the client socket open until the test VM terminates (calls closeClientSocket before exiting main()). socket = new Socket(InetAddress.getLoopbackAddress(), SERVER_PORT); writer = new PrintWriter(socket.getOutputStream(), true); + writer.println(IDENTITY); } catch (Exception e) { // When the test VM is directly run, we should ignore all messages that would normally be sent to the // driver VM. diff --git a/test/hotspot/jtreg/compiler/lib/template_framework/DataName.java b/test/hotspot/jtreg/compiler/lib/template_framework/DataName.java index 4a82608567f..3932375150f 100644 --- a/test/hotspot/jtreg/compiler/lib/template_framework/DataName.java +++ b/test/hotspot/jtreg/compiler/lib/template_framework/DataName.java @@ -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 @@ -202,7 +202,7 @@ public record DataName(String name, DataName.Type type, boolean mutable, int wei * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token sample(Function function) { - return new NameSampleToken<>(predicate(), null, null, function); + return new NameSampleToken<>(DataName.class, predicate(), null, null, function); } /** @@ -244,7 +244,7 @@ public record DataName(String name, DataName.Type type, boolean mutable, int wei * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token sampleAndLetAs(String name, String type) { - return new NameSampleToken(predicate(), name, type, n -> Template.transparentScope()); + return new NameSampleToken<>(DataName.class, predicate(), name, type, n -> Template.transparentScope()); } /** @@ -284,7 +284,7 @@ public record DataName(String name, DataName.Type type, boolean mutable, int wei * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token sampleAndLetAs(String name) { - return new NameSampleToken(predicate(), name, null, n -> Template.transparentScope()); + return new NameSampleToken<>(DataName.class, predicate(), name, null, n -> Template.transparentScope()); } /** @@ -326,7 +326,7 @@ public record DataName(String name, DataName.Type type, boolean mutable, int wei * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token toList(Function, ScopeToken> function) { - return new NamesToListToken<>(predicate(), function); + return new NamesToListToken<>(DataName.class, predicate(), function); } /** @@ -340,7 +340,7 @@ public record DataName(String name, DataName.Type type, boolean mutable, int wei * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token forEach(Function function) { - return new NameForEachToken<>(predicate(), null, null, function); + return new NameForEachToken<>(DataName.class, predicate(), null, null, function); } /** @@ -364,7 +364,7 @@ public record DataName(String name, DataName.Type type, boolean mutable, int wei * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token forEach(String name, String type, Function function) { - return new NameForEachToken<>(predicate(), name, type, function); + return new NameForEachToken<>(DataName.class, predicate(), name, type, function); } } } diff --git a/test/hotspot/jtreg/compiler/lib/template_framework/NameForEachToken.java b/test/hotspot/jtreg/compiler/lib/template_framework/NameForEachToken.java index 0e629740be1..8145e81eac0 100644 --- a/test/hotspot/jtreg/compiler/lib/template_framework/NameForEachToken.java +++ b/test/hotspot/jtreg/compiler/lib/template_framework/NameForEachToken.java @@ -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,13 +29,14 @@ import java.util.function.Function; * Represents the for-each execution of the provided function and (optional) hashtag replacement * keys for name and type of each name. */ -record NameForEachToken( +record NameForEachToken( + Class clazz, NameSet.Predicate predicate, String name, String type, Function function) implements Token { ScopeToken getScopeToken(Name n) { - return function().apply((N)n); + return function().apply(clazz.cast(n)); } } diff --git a/test/hotspot/jtreg/compiler/lib/template_framework/NameSampleToken.java b/test/hotspot/jtreg/compiler/lib/template_framework/NameSampleToken.java index 0b01f00fcd9..bb764de8cc7 100644 --- a/test/hotspot/jtreg/compiler/lib/template_framework/NameSampleToken.java +++ b/test/hotspot/jtreg/compiler/lib/template_framework/NameSampleToken.java @@ -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 @@ -31,13 +31,14 @@ import java.util.function.Function; * name and type of the sampled name, which are then available in the inner scope * created by the provided function. */ -record NameSampleToken( +record NameSampleToken( + Class clazz, NameSet.Predicate predicate, String name, String type, Function function) implements Token { ScopeToken getScopeToken(Name n) { - return function().apply((N)n); + return function().apply(clazz.cast(n)); } } diff --git a/test/hotspot/jtreg/compiler/lib/template_framework/NamesToListToken.java b/test/hotspot/jtreg/compiler/lib/template_framework/NamesToListToken.java index 40710a01297..2cf3836076d 100644 --- a/test/hotspot/jtreg/compiler/lib/template_framework/NamesToListToken.java +++ b/test/hotspot/jtreg/compiler/lib/template_framework/NamesToListToken.java @@ -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 @@ -30,12 +30,13 @@ import java.util.List; * Represents the {@code toList} on a filtered name set, including the collection of the * names and the creation of the inner scope with the function. */ -record NamesToListToken( +record NamesToListToken( + Class type, NameSet.Predicate predicate, Function, ScopeToken> function) implements Token { ScopeToken getScopeToken(List names) { - List castNames = names.stream().map(n -> (N)n).toList(); + List castNames = names.stream().map(type::cast).toList(); return function().apply(castNames); } } diff --git a/test/hotspot/jtreg/compiler/lib/template_framework/Renderer.java b/test/hotspot/jtreg/compiler/lib/template_framework/Renderer.java index cb83a5ea40c..5a587084225 100644 --- a/test/hotspot/jtreg/compiler/lib/template_framework/Renderer.java +++ b/test/hotspot/jtreg/compiler/lib/template_framework/Renderer.java @@ -346,7 +346,7 @@ final class Renderer { case ScopeToken scopeToken -> { renderScopeToken(scopeToken); } - case NameSampleToken nameScopeToken -> { + case NameSampleToken nameScopeToken -> { Name name = currentCodeFrame.sampleName(nameScopeToken.predicate()); if (name == null) { throw new RendererException("No Name found for " + nameScopeToken.predicate().toString()); @@ -361,9 +361,9 @@ final class Renderer { } }); } - case NameForEachToken nameForEachToken -> { + case NameForEachToken nameForEachToken -> { List list = currentCodeFrame.listNames(nameForEachToken.predicate()); - list.stream().forEach(name -> { + list.forEach(name -> { ScopeToken scopeToken = nameForEachToken.getScopeToken(name); renderScopeToken(scopeToken, () -> { if (nameForEachToken.name() != null) { @@ -375,7 +375,7 @@ final class Renderer { }); }); } - case NamesToListToken nameToListToken -> { + case NamesToListToken nameToListToken -> { List list = currentCodeFrame.listNames(nameToListToken.predicate()); renderScopeToken(nameToListToken.getScopeToken(list)); } @@ -390,7 +390,7 @@ final class Renderer { case SetFuelCostToken(float fuelCost) -> { currentTemplateFrame.setFuelCost(fuelCost); } - case LetToken letToken -> { + case LetToken letToken -> { ScopeToken scopeToken = letToken.getScopeToken(); renderScopeToken(scopeToken, () -> { addHashtagReplacement(letToken.key(), letToken.value()); diff --git a/test/hotspot/jtreg/compiler/lib/template_framework/RendererException.java b/test/hotspot/jtreg/compiler/lib/template_framework/RendererException.java index 2ab542b6fe8..7a30a6767d8 100644 --- a/test/hotspot/jtreg/compiler/lib/template_framework/RendererException.java +++ b/test/hotspot/jtreg/compiler/lib/template_framework/RendererException.java @@ -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 @@ -28,6 +28,7 @@ package compiler.lib.template_framework; * rendering, or in the use of any of its static methods. * It most likely indicates a wrong use of the Templates. */ +@SuppressWarnings("serial") public class RendererException extends RuntimeException { RendererException(String message) { super(message); diff --git a/test/hotspot/jtreg/compiler/lib/template_framework/StructuralName.java b/test/hotspot/jtreg/compiler/lib/template_framework/StructuralName.java index 8a1090bc5ab..d6250aedd14 100644 --- a/test/hotspot/jtreg/compiler/lib/template_framework/StructuralName.java +++ b/test/hotspot/jtreg/compiler/lib/template_framework/StructuralName.java @@ -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 @@ -175,7 +175,7 @@ public record StructuralName(String name, StructuralName.Type type, int weight) * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token sample(Function function) { - return new NameSampleToken<>(predicate(), null, null, function); + return new NameSampleToken<>(StructuralName.class, predicate(), null, null, function); } /** @@ -190,7 +190,7 @@ public record StructuralName(String name, StructuralName.Type type, int weight) * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token sampleAndLetAs(String name, String type) { - return new NameSampleToken(predicate(), name, type, n -> Template.transparentScope()); + return new NameSampleToken<>(StructuralName.class, predicate(), name, type, n -> Template.transparentScope()); } /** @@ -204,7 +204,7 @@ public record StructuralName(String name, StructuralName.Type type, int weight) * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token sampleAndLetAs(String name) { - return new NameSampleToken(predicate(), name, null, n -> Template.transparentScope()); + return new NameSampleToken<>(StructuralName.class, predicate(), name, null, n -> Template.transparentScope()); } /** @@ -245,7 +245,7 @@ public record StructuralName(String name, StructuralName.Type type, int weight) * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token toList(Function, ScopeToken> function) { - return new NamesToListToken<>(predicate(), function); + return new NamesToListToken<>(StructuralName.class, predicate(), function); } /** @@ -259,7 +259,7 @@ public record StructuralName(String name, StructuralName.Type type, int weight) * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token forEach(Function function) { - return new NameForEachToken<>(predicate(), null, null, function); + return new NameForEachToken<>(StructuralName.class, predicate(), null, null, function); } /** @@ -283,7 +283,7 @@ public record StructuralName(String name, StructuralName.Type type, int weight) * {@link #subtypeOf}, {@link #supertypeOf} or {@link #exactOf}. */ public Token forEach(String name, String type, Function function) { - return new NameForEachToken<>(predicate(), name, type, function); + return new NameForEachToken<>(StructuralName.class, predicate(), name, type, function); } } } diff --git a/test/hotspot/jtreg/compiler/lib/template_framework/Template.java b/test/hotspot/jtreg/compiler/lib/template_framework/Template.java index 3cd3a9097ff..81a4bdd935b 100644 --- a/test/hotspot/jtreg/compiler/lib/template_framework/Template.java +++ b/test/hotspot/jtreg/compiler/lib/template_framework/Template.java @@ -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 @@ -873,7 +873,7 @@ public sealed interface Template permits Template.ZeroArgs, * @return A token that represents the hashtag replacement definition. */ static Token let(String key, Object value) { - return new LetToken(key, value, v -> transparentScope()); + return new LetToken<>(key, value, v -> transparentScope()); } /** @@ -902,7 +902,7 @@ public sealed interface Template permits Template.ZeroArgs, * @return A {@link Token} representing the hashtag replacement definition and inner scope. */ static Token let(String key, T value, Function function) { - return new LetToken(key, value, function); + return new LetToken<>(key, value, function); } /** diff --git a/test/hotspot/jtreg/compiler/lib/template_framework/library/Operations.java b/test/hotspot/jtreg/compiler/lib/template_framework/library/Operations.java index 4c598506e70..becda83a029 100644 --- a/test/hotspot/jtreg/compiler/lib/template_framework/library/Operations.java +++ b/test/hotspot/jtreg/compiler/lib/template_framework/library/Operations.java @@ -638,35 +638,19 @@ public final class Operations { var vopInfo = vop.isDeterministic ? new Expression.Info() : WITH_NONDETERMINISTIC_RESULT; if (vop.elementTypes().contains(type.elementType)) { switch(vop.type()) { - case VOPType.UNARY: - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.maskType, ")", vopInfo)); - break; - case VOPType.ASSOCIATIVE: - case VOPType.INTEGRAL_ASSOCIATIVE: - if (vop.type() == VOPType.ASSOCIATIVE || !type.elementType.isFloating()) { - ops.add(Expression.make(type.elementType, "", type, ".reduceLanes(VectorOperators." + vop.name() + ")", vopInfo)); - ops.add(Expression.make(type.elementType, "", type, ".reduceLanes(VectorOperators." + vop.name() + ", ", type.maskType, ")", vopInfo)); + case VOPType.UNARY -> { + ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ")", vopInfo)); + ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.maskType, ")", vopInfo)); } - // fall-through - case VOPType.BINARY: - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ", ", type.maskType, ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", LONGS, ")", vopInfo.combineWith(WITH_ILLEGAL_ARGUMENT_EXCEPTION))); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", LONGS, ", ", type.maskType, ")", vopInfo.combineWith(WITH_ILLEGAL_ARGUMENT_EXCEPTION))); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ", ", type.maskType, ")", vopInfo)); - break; - case VOPType.TERNARY: - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ", ", type.elementType, ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ", ", type.elementType, ", ", type.maskType, ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ", ", type, ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ", ", type, ", ", type.maskType, ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ", ", type.elementType, ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ", ", type.elementType, ", ", type.maskType, ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ", ", type, ")", vopInfo)); - ops.add(Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ", ", type, ", ", type.maskType, ")", vopInfo)); - break; + case VOPType.ASSOCIATIVE, VOPType.INTEGRAL_ASSOCIATIVE -> { + if (vop.type() == VOPType.ASSOCIATIVE || !type.elementType.isFloating()) { + ops.add(Expression.make(type.elementType, "", type, ".reduceLanes(VectorOperators." + vop.name() + ")", vopInfo)); + ops.add(Expression.make(type.elementType, "", type, ".reduceLanes(VectorOperators." + vop.name() + ", ", type.maskType, ")", vopInfo)); + } + ops.addAll(binaryOps(vop, type, vopInfo)); + } + case VOPType.BINARY -> ops.addAll(binaryOps(vop, type, vopInfo)); + case VOPType.TERNARY -> ops.addAll(ternaryOps(vop, type, vopInfo)); } } } @@ -717,7 +701,7 @@ public final class Operations { ops.add(Expression.make(type, "", type, ".unslice(", INTS, " & " + (type.length-1) + ")")); ops.add(Expression.make(type, "", type, ".unslice(", INTS, ")", WITH_OUT_OF_BOUNDS_EXCEPTION)); - ops.add(Expression.make(type, "", type, ".unslice(", INTS, " & " + (type.length-1) + ", ", type, ", ", INTS, " & 2)")); + ops.add(Expression.make(type, "", type, ".unslice(", INTS, " & " + (type.length-1) + ", ", type, ", ", INTS, " & 1)")); ops.add(Expression.make(type, "", type, ".unslice(", INTS, ", ", type, ", 0)", WITH_OUT_OF_BOUNDS_EXCEPTION)); ops.add(Expression.make(type, "", type, ".unslice(", INTS, ", ", type, ", ", INTS, ")", WITH_OUT_OF_BOUNDS_EXCEPTION)); ops.add(Expression.make(type, "", type, ".unslice(", INTS, ", ", type, ", 0, ", type.maskType, ")", WITH_OUT_OF_BOUNDS_EXCEPTION)); @@ -813,8 +797,32 @@ public final class Operations { return List.copyOf(ops); } + private static List binaryOps(Operations.VOP vop, VectorType.Vector type, Expression.Info vopInfo) { + return List.of( + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ")", vopInfo), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ", ", type.maskType, ")", vopInfo), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", LONGS, ")", vopInfo.combineWith(WITH_ILLEGAL_ARGUMENT_EXCEPTION)), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", LONGS, ", ", type.maskType, ")", vopInfo.combineWith(WITH_ILLEGAL_ARGUMENT_EXCEPTION)), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ")", vopInfo), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ", ", type.maskType, ")", vopInfo) + ); + } + + private static List ternaryOps(Operations.VOP vop, VectorType.Vector type, Expression.Info vopInfo) { + return List.of( + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ", ", type.elementType, ")", vopInfo), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ", ", type.elementType, ", ", type.maskType, ")", vopInfo), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ", ", type, ")", vopInfo), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type.elementType, ", ", type, ", ", type.maskType, ")", vopInfo), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ", ", type.elementType, ")", vopInfo), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ", ", type.elementType, ", ", type.maskType, ")", vopInfo), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ", ", type, ")", vopInfo), + Expression.make(type, "", type, ".lanewise(VectorOperators." + vop.name() + ", ", type, ", ", type, ", ", type.maskType, ")", vopInfo) + ); + } + /** - * Provides a lits of operations on {@link PrimitiveType}s, such as arithmetic, logical, + * Provides a list of operations on {@link PrimitiveType}s, such as arithmetic, logical, * and cast operations. */ public static final List PRIMITIVE_OPERATIONS = generatePrimitiveOperations(); diff --git a/test/hotspot/jtreg/compiler/lib/template_framework/library/Utils.java b/test/hotspot/jtreg/compiler/lib/template_framework/library/Utils.java index b96ad830a4b..7938e49258e 100644 --- a/test/hotspot/jtreg/compiler/lib/template_framework/library/Utils.java +++ b/test/hotspot/jtreg/compiler/lib/template_framework/library/Utils.java @@ -33,6 +33,7 @@ import java.util.stream.Collectors; */ final class Utils { @SafeVarargs + @SuppressWarnings("varargs") public static List concat(List... lists) { return Arrays.stream(lists) .flatMap(List::stream) diff --git a/test/hotspot/jtreg/compiler/lib/verify/VerifyException.java b/test/hotspot/jtreg/compiler/lib/verify/VerifyException.java index e54a0cbef95..1adde4aa771 100644 --- a/test/hotspot/jtreg/compiler/lib/verify/VerifyException.java +++ b/test/hotspot/jtreg/compiler/lib/verify/VerifyException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 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,6 +26,7 @@ package compiler.lib.verify; /** * Exception thrown in verification. */ +@SuppressWarnings("serial") public class VerifyException extends RuntimeException { /** diff --git a/test/hotspot/jtreg/compiler/loopopts/TestLoopPeelingDisabled.java b/test/hotspot/jtreg/compiler/loopopts/TestLoopPeelingDisabled.java index e7bbe24d1de..f8ee2084f3e 100644 --- a/test/hotspot/jtreg/compiler/loopopts/TestLoopPeelingDisabled.java +++ b/test/hotspot/jtreg/compiler/loopopts/TestLoopPeelingDisabled.java @@ -51,11 +51,14 @@ public class TestLoopPeelingDisabled { // elide the {BEFORE,AFTER}_LOOP_PEELING compilation phases, causing the // test to throw an IRViolationException. We then check whether the // exception message matches our expectation (that the loop peeling - // phase was not found). + // phase was not found). If IR verification is disabled, this test will + // not throw an IRViolationException. try { TestFramework.runWithFlags("-XX:+UnlockDiagnosticVMOptions", "-XX:LoopPeeling=0"); - Asserts.fail("Expected IRViolationException"); + String verifyIR = System.getProperty("VerifyIR", "true"); + String msg = "Expected IRViolationException when performing IR matching"; + Asserts.assertFalse(Boolean.parseBoolean(verifyIR), msg); } catch (IRViolationException e) { String info = e.getExceptionInfo(); if (!info.contains("NO compilation output found for this phase")) { diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java index 2678aab9c40..8179c33557c 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestDependencyOffsets.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 @@ -96,6 +96,7 @@ /* * @test id=sse4-v004-A * @bug 8298935 8308606 8310308 8312570 8310190 + * @key randomness * @summary Test SuperWord: vector size, offsets, dependencies, alignment. * @requires vm.compiler2.enabled * @requires (os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64") diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/TestReductions.java b/test/hotspot/jtreg/compiler/loopopts/superword/TestReductions.java index 97a55ae2074..599e95bd6ab 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/TestReductions.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/TestReductions.java @@ -33,7 +33,7 @@ /* * @test id=vanilla - * @bug 8340093 8342095 + * @bug 8340093 8342095 8381617 * @summary Test vectorization of reduction loops. * @modules jdk.incubator.vector * @library /test/lib / @@ -42,7 +42,7 @@ /* * @test id=force-vectorization - * @bug 8340093 8342095 + * @bug 8340093 8342095 8381617 * @summary Test vectorization of reduction loops. * @modules jdk.incubator.vector * @library /test/lib / @@ -1802,7 +1802,7 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.MUL_REDUCTION_VL, "> 0", IRNode.MUL_VL, "> 0"}, // vector accumulator - applyIfCPUFeature = {"avx512dq", "true"}, + applyIfCPUFeatureOr = {"avx512dq", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, applyIfCPUFeatureAnd = {"avx512dq", "false", "sse4.1", "true"}) @@ -1810,7 +1810,7 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.MUL_REDUCTION_VL, "> 0", IRNode.MUL_VL, "= 0"}, // Reduction NOT moved out of loop - applyIfCPUFeatureOr = {"asimd", "true"}, + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) // Note: NEON does not support MulVL for auto vectorization. There is // a scalarized implementation, but that is not profitable for @@ -1874,10 +1874,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.AND_REDUCTION_V, "> 0", IRNode.AND_VL, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While AndReductionV is implemented in NEON (see longAndSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -1895,10 +1895,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.OR_REDUCTION_V, "> 0", IRNode.OR_VL, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While OrReductionV is implemented in NEON (see longOrSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -1916,10 +1916,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.XOR_REDUCTION_V, "> 0", IRNode.XOR_VL, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While MaxReductionV is implemented in NEON (see longXorSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -1937,10 +1937,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.ADD_REDUCTION_VL, "> 0", IRNode.ADD_VL, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While MaxReductionV is implemented in NEON (see longAddSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -1958,13 +1958,13 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.MUL_REDUCTION_VL, "> 0", IRNode.MUL_VL, "> 0"}, - applyIfCPUFeature = {"avx512dq", "true"}, + applyIfCPUFeatureOr = {"avx512dq", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, applyIfCPUFeatureAnd = {"avx512dq", "false", "sse4.1", "true"}) // I think this could vectorize, but currently does not. Filed: JDK-8370673 @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // MulVL is not implemented on NEON, so we also not have the reduction. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -1982,13 +1982,13 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.MIN_REDUCTION_V, "> 0", IRNode.MIN_VL, "> 0"}, - applyIfCPUFeature = {"avx512", "true"}, + applyIfCPUFeatureOr = {"avx512", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, applyIfCPUFeatureAnd = {"avx512", "false", "avx2", "true"}) // I think this could vectorize, but currently does not. Filed: JDK-8370671 @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While MaxReductionV is implemented in NEON (see longMinSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -2006,13 +2006,13 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.MAX_REDUCTION_V, "> 0", IRNode.MAX_VL, "> 0"}, - applyIfCPUFeature = {"avx512", "true"}, + applyIfCPUFeatureOr = {"avx512", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, applyIfCPUFeatureAnd = {"avx512", "false", "avx2", "true"}) // I think this could vectorize, but currently does not. Filed: JDK-8370671 @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While MaxReductionV is implemented in NEON (see longMaxSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -2031,10 +2031,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.AND_REDUCTION_V, "> 0", IRNode.AND_VL, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While AndReductionV is implemented in NEON (see longAndSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -2052,10 +2052,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.OR_REDUCTION_V, "> 0", IRNode.OR_VL, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While OrReductionV is implemented in NEON (see longOrSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -2073,10 +2073,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.XOR_REDUCTION_V, "> 0", IRNode.XOR_VL, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While MaxReductionV is implemented in NEON (see longXorSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -2094,10 +2094,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.ADD_REDUCTION_VL, "> 0", IRNode.ADD_VL, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While MaxReductionV is implemented in NEON (see longAddSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -2115,7 +2115,7 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.MUL_REDUCTION_VL, "> 0", IRNode.MUL_VL, "> 0"}, - applyIfCPUFeature = {"avx512dq", "true"}, + applyIfCPUFeatureOr = {"avx512dq", "true", "sve", "true"}, applyIfAnd = {"AutoVectorizationOverrideProfitability", "> 0", "LoopUnrollLimit", ">= 1000"}) @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -2126,7 +2126,7 @@ public class TestReductions { // If you can eliminate this exception for LoopUnrollLimit, please remove // the flag completely from the test, also the "addFlags" at the top. @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // MulVL is not implemented on NEON, so we also not have the reduction. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -2144,13 +2144,13 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.MIN_REDUCTION_V, "> 0", IRNode.MIN_VL, "> 0"}, - applyIfCPUFeature = {"avx512", "true"}, + applyIfCPUFeatureOr = {"avx512", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, applyIfCPUFeatureAnd = {"avx512", "false", "avx2", "true"}) // I think this could vectorize, but currently does not. Filed: JDK-8370671 @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While MaxReductionV is implemented in NEON (see longMinSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -2168,13 +2168,13 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_L, "> 0", IRNode.MAX_REDUCTION_V, "> 0", IRNode.MAX_VL, "> 0"}, - applyIfCPUFeature = {"avx512", "true"}, + applyIfCPUFeatureOr = {"avx512", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_L, applyIfCPUFeatureAnd = {"avx512", "false", "avx2", "true"}) // I think this could vectorize, but currently does not. Filed: JDK-8370671 @IR(failOn = IRNode.LOAD_VECTOR_L, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // While MaxReductionV is implemented in NEON (see longMaxSimple), MulVL is not. // Filed: JDK-8370686 @IR(failOn = IRNode.LOAD_VECTOR_L, @@ -2193,10 +2193,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_F, "> 0", IRNode.ADD_REDUCTION_V, "> 0", IRNode.ADD_VF, "= 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "= 2"}) @IR(failOn = IRNode.LOAD_VECTOR_F, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_F, @@ -2217,10 +2217,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_F, "> 0", IRNode.MUL_REDUCTION_VF, "> 0", IRNode.MUL_VF, "= 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "= 2"}) @IR(failOn = IRNode.LOAD_VECTOR_F, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_F, @@ -2276,10 +2276,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_F, "> 0", IRNode.ADD_REDUCTION_V, "> 0", IRNode.ADD_VF, "= 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_F, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_F, @@ -2297,10 +2297,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_F, "> 0", IRNode.MUL_REDUCTION_VF, "> 0", IRNode.MUL_VF, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_F, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_F, @@ -2353,10 +2353,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_F, "> 0", IRNode.ADD_REDUCTION_V, "> 0", IRNode.ADD_VF, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_F, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_F, @@ -2374,10 +2374,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_F, "> 0", IRNode.MUL_REDUCTION_VF, "> 0", IRNode.MUL_VF, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_F, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_F, @@ -2430,10 +2430,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_D, "> 0", IRNode.ADD_REDUCTION_VD, "> 0", IRNode.ADD_VD, "= 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "= 2"}) @IR(failOn = IRNode.LOAD_VECTOR_D, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_D, @@ -2454,10 +2454,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_D, "> 0", IRNode.MUL_REDUCTION_VD, "> 0", IRNode.MUL_VD, "= 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "= 2"}) @IR(failOn = IRNode.LOAD_VECTOR_D, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_D, @@ -2513,10 +2513,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_D, "> 0", IRNode.ADD_REDUCTION_V, "> 0", IRNode.ADD_VD, "= 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_D, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_D, @@ -2534,10 +2534,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_D, "> 0", IRNode.MUL_REDUCTION_VD, "> 0", IRNode.MUL_VD, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_D, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_D, @@ -2590,10 +2590,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_D, "> 0", IRNode.ADD_REDUCTION_V, "> 0", IRNode.ADD_VD, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_D, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_D, @@ -2611,10 +2611,10 @@ public class TestReductions { @IR(counts = {IRNode.LOAD_VECTOR_D, "> 0", IRNode.MUL_REDUCTION_VD, "> 0", IRNode.MUL_VD, "> 0"}, - applyIfCPUFeature = {"sse4.1", "true"}, + applyIfCPUFeatureOr = {"sse4.1", "true", "sve", "true"}, applyIf = {"AutoVectorizationOverrideProfitability", "> 0"}) @IR(failOn = IRNode.LOAD_VECTOR_D, - applyIfCPUFeatureAnd = {"asimd", "true"}) + applyIfCPUFeatureAnd = {"asimd", "true", "sve", "false"}) // I think this could vectorize, but currently does not. Filed: JDK-8370677 // But: it is not clear that it would be profitable, given the sequential reduction. @IR(failOn = IRNode.LOAD_VECTOR_D, diff --git a/test/hotspot/jtreg/compiler/print/CompileCommandPrintCompilation2.java b/test/hotspot/jtreg/compiler/print/CompileCommandPrintCompilation2.java new file mode 100644 index 00000000000..f6a0f3086f7 --- /dev/null +++ b/test/hotspot/jtreg/compiler/print/CompileCommandPrintCompilation2.java @@ -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. + */ + +/* + * @test + * @bug 8255746 + * @summary Checks that -XX:+UnlockDiagnosticVMOptions -XX:CompileCommand=PrintCompilation2,... works + * @library /test/lib + * @run driver compiler.print.CompileCommandPrintCompilation2 + */ + +package compiler.print; + +import java.util.ArrayList; +import java.util.List; + +import jdk.test.lib.Asserts; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +public class CompileCommandPrintCompilation2 { + + final static String METHOD1 = "method1"; + final static String METHOD2 = "method2"; + + public static void main(String[] args) throws Exception { + test(METHOD1, METHOD2); + test(METHOD2, METHOD1); + } + + private static void test(String include, String exclude) throws Exception { + List options = new ArrayList(); + options.add("-Xcomp"); + options.add("-XX:-Inline"); + options.add("-XX:CompileCommand=compileonly," + getTestClass() + "::*"); + options.add("-XX:+UnlockDiagnosticVMOptions"); + options.add("-XX:CompileCommand=PrintCompilation2," + getTestMethod(include)); + options.add(getTestClass()); + + OutputAnalyzer oa = ProcessTools.executeTestJava(options); + + oa.shouldHaveExitValue(0) + .shouldContain(getTestMethod(include)) + .shouldNotContain(getTestMethod(exclude)); + } + + // Test class that is invoked by the sub process + public static String getTestClass() { + return TestMain.class.getName(); + } + + public static String getTestMethod(String method) { + return getTestClass() + "::" + method; + } + + public static class TestMain { + public static void main(String[] args) { + method1(); + method2(); + } + + static void method1() {} + static void method2() {} + } +} + diff --git a/test/hotspot/jtreg/compiler/print/PrintCompilation2.java b/test/hotspot/jtreg/compiler/print/PrintCompilation2.java new file mode 100644 index 00000000000..ac07bc316d3 --- /dev/null +++ b/test/hotspot/jtreg/compiler/print/PrintCompilation2.java @@ -0,0 +1,82 @@ +/* + * 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 + * @summary Checks that -XX:PrintCompilation2 works + * @library /test/lib + * @run driver compiler.print.PrintCompilation2 + */ + +package compiler.print; + +import java.util.ArrayList; +import java.util.List; + +import jdk.test.lib.Asserts; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +public class PrintCompilation2 { + + public static void main(String[] args) throws Exception { + List options = new ArrayList(); + options.add("-XX:+UnlockDiagnosticVMOptions"); + options.add("-XX:+PrintCompilation2"); + options.add("-Xcomp"); + options.add("-XX:-Inline"); + options.add("-XX:CompileCommand=compileonly," + getTestClass() + "::*"); + options.add(getTestClass()); + + OutputAnalyzer oa = ProcessTools.executeTestJava(options); + + oa.shouldHaveExitValue(0) + .shouldContain(getTestMethod("method1")) + .shouldContain(getTestMethod("method2")) + .shouldContain(getTestMethod("method3")) + .shouldNotContain(getTestMethod("notcalled")); + } + + // Test class that is invoked by the sub process + public static String getTestClass() { + return TestMain.class.getName(); + } + + public static String getTestMethod(String method) { + return getTestClass() + "::" + method; + } + + public static class TestMain { + public static void main(String[] args) { + method1(); + method2(); + method3(); + } + + static void method1() { System.out.println("method1()"); } + static void method2() {} + static void method3() {} + static void notcalled() {} + } +} + diff --git a/test/hotspot/jtreg/compiler/profiling/TestPrintMethodData.java b/test/hotspot/jtreg/compiler/profiling/TestPrintMethodData.java new file mode 100644 index 00000000000..9e14cd6ea4b --- /dev/null +++ b/test/hotspot/jtreg/compiler/profiling/TestPrintMethodData.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2026 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 8382777 + * @summary Test that PrintMethodData output matches expectations + * @requires vm.flagless + * @modules java.base/jdk.internal.misc + * @library /test/lib / + * @run driver ${test.main.class} + */ + +package compiler.profiling; + +import compiler.lib.generators.Generator; +import compiler.lib.generators.Generators; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +public class TestPrintMethodData { + public static void main(String[] args) throws Exception { + ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder( + "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintMethodData", + "-XX:CompileCommand=compileonly,compiler.profiling.TestPrintMethodData::test*", + Launcher.class.getName()); + + OutputAnalyzer analyzer = new OutputAnalyzer(pb.start()); + analyzer.shouldHaveExitValue(0); + analyzer.shouldContain("BranchData"); + analyzer.shouldMatch("taken\\(\\d+\\)"); + } + + static long testLongReductionSimpleMax(long[] array) { + long result = Long.MIN_VALUE; + for (int i = 0; i < array.length; i++) { + var v = array[i]; + result = Math.max(v, result); + } + return result; + } + + static class Launcher { + private static final Generator GEN_LONG = Generators.G.longs(); + private static final int SIZE = 1024; + + static void main(String[] args) throws Exception { + long[] longs = new long[SIZE]; + Generators.G.fill(GEN_LONG, longs); + + for (int i = 0; i < 20_000; i++) { + testLongReductionSimpleMax(longs); + } + } + } +} diff --git a/test/hotspot/jtreg/compiler/rangechecks/TestFoldedIfsWrongReexec.java b/test/hotspot/jtreg/compiler/rangechecks/TestFoldedIfsWrongReexec.java new file mode 100644 index 00000000000..9e77ceca0dd --- /dev/null +++ b/test/hotspot/jtreg/compiler/rangechecks/TestFoldedIfsWrongReexec.java @@ -0,0 +1,299 @@ +/* + * Copyright (c) 2026 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 8376400 + * @summary C2: folding ifs may cause incorrect execution when trap is taken + * + * @run main/othervm -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:-BackgroundCompilation + * -XX:+UnlockDiagnosticVMOptions -XX:-OptimizeUnstableIf ${test.main.class} + * @run main ${test.main.class} + * + */ + +package compiler.rangechecks; + +public class TestFoldedIfsWrongReexec { + private static int taken1; + private static int taken2; + private static int taken3; + private static int taken4; + private static int taken5; + private static int taken6; + private static int taken7; + private static int MIN_VALUE = Integer.MIN_VALUE; + + public static void main(String[] args) { + for (int i = 0; i < 20_000; i++) { + test1(12); + if (taken1 != 0) { + throw new RuntimeException("branch shouldn't have been taken"); + } + test1Helper1(16, 0); + test2(12); + if (taken2 != 0) { + throw new RuntimeException("branch shouldn't have been taken"); + } + test2Helper1(16, 0); + test3(12); + if (taken3 != 0) { + throw new RuntimeException("branch shouldn't have been taken"); + } + test3Helper1(16, 0); + test4(12, 1, 2); + if (taken4 != 0) { + throw new RuntimeException("branch shouldn't have been taken"); + } + test4Helper1(16, 0, 1, 2); + test5(12); + if (taken5 != 0) { + throw new RuntimeException("branch shouldn't have been taken"); + } + test5Helper1(16, 0); + test6(12, 1, 2); + if (taken6 != 0) { + throw new RuntimeException("branch shouldn't have been taken"); + } + test6Helper1(16, 0, 1, 2); + test7(12); + if (taken7 != 0) { + throw new RuntimeException("branch shouldn't have been taken"); + } + test7Helper1(16, 0); + test7Helper2(o1); + test7Helper2(a); + test7Helper2(b); + } + test1(0); + if (taken1 == 0) { + throw new RuntimeException("branch should have been taken"); + } + test2(0); + if (taken2 == 0) { + throw new RuntimeException("branch should have been taken"); + } + test3(0); + if (taken3 == 0) { + throw new RuntimeException("branch should have been taken"); + } + test4(0, 1, 2); + if (taken4 == 0) { + throw new RuntimeException("branch should have been taken"); + } + test5(0); + if (taken5 == 0) { + throw new RuntimeException("branch should have been taken"); + } + test6(0, 1, 2); + if (taken6 == 0) { + throw new RuntimeException("branch should have been taken"); + } + test7(0); + if (taken7 == 0) { + throw new RuntimeException("branch should have been taken"); + } + } + + private static void test1(int i) { + if (test1Helper1(i, 16) == 0) { + throw new RuntimeException("never taken"); + } + if (i + MIN_VALUE < 8 + Integer.MIN_VALUE) { + taken1++; + } + for (int j = 0; j < 10; j++) { + for (int k = 0; k < 10; k++) { + + } + } + } + + private static int test1Helper1(int i, int j) { + if (i + MIN_VALUE >= j + Integer.MIN_VALUE) { + for (int k = 0; k < 100; k++) { + } + return 0; + } + return 1; + } + + private static void test2(int i) { + if (test2Helper1(i, 16) == 42) { + throw new RuntimeException("never taken"); + } + if (i + MIN_VALUE < 8 + Integer.MIN_VALUE) { + taken2++; + } + for (int j = 0; j < 10; j++) { + for (int k = 0; k < 10; k++) { + + } + } + } + + private static int test2Helper1(int i, int j) { + if (i + MIN_VALUE >= j + Integer.MIN_VALUE) { + for (int k = 0; k < 100; k++) { + } + return 42; + } + return 0x42; + } + + private static void test3(int i) { + if (test3Helper1(i, 16) == 42L) { + throw new RuntimeException("never taken"); + } + if (i + MIN_VALUE < 8 + Integer.MIN_VALUE) { + taken3++; + } + for (int j = 0; j < 10; j++) { + for (int k = 0; k < 10; k++) { + + } + } + } + + private static long test3Helper1(int i, int j) { + if (i + MIN_VALUE >= j + Integer.MIN_VALUE) { + for (int k = 0; k < 100; k++) { + } + return 42L; + } + return 0x42L; + } + + private static void test4(int i, int x, int y) { + if (x == y) { + throw new RuntimeException("never taken"); + } + if (test4Helper1(i, 16, x, y) == y) { + throw new RuntimeException("never taken"); + } + if (i + MIN_VALUE < 8 + Integer.MIN_VALUE) { + taken4++; + } + for (int j = 0; j < 10; j++) { + for (int k = 0; k < 10; k++) { + + } + } + } + + private static int test4Helper1(int i, int j, int x, int y) { + if (i + MIN_VALUE >= j + Integer.MIN_VALUE) { + for (int k = 0; k < 100; k++) { + } + return y; + } + return x; + } + + static final Object o1 = new Object(); + static final Object o2 = new Object(); + + private static void test5(int i) { + if (test5Helper1(i, 16) == o1) { + throw new RuntimeException("never taken"); + } + if (i + MIN_VALUE < 8 + Integer.MIN_VALUE) { + taken5++; + } + for (int j = 0; j < 10; j++) { + for (int k = 0; k < 10; k++) { + + } + } + } + + private static Object test5Helper1(int i, int j) { + if (i + MIN_VALUE >= j + Integer.MIN_VALUE) { + for (int k = 0; k < 100; k++) { + } + return o1; + } + return o2; + } + + private static void test6(int i, int x, int y) { + if (x < y) { + if (test6Helper1(i, 16, x, y) < y) { + throw new RuntimeException("never taken"); + } + if (i + MIN_VALUE < 8 + Integer.MIN_VALUE) { + taken6++; + } + } + for (int j = 0; j < 10; j++) { + for (int k = 0; k < 10; k++) { + + } + } + } + + private static int test6Helper1(int i, int j, int x, int y) { + if (i + MIN_VALUE >= j + Integer.MIN_VALUE) { + for (int k = 0; k < 100; k++) { + } + return x; + } + return y; + } + + static final Object a = new A(); + static final Object b = new B(); + + private static void test7(int i) { + if (test7Helper2(test7Helper1(i, 16))) { + throw new RuntimeException("never taken"); + } + if (i + MIN_VALUE < 8 + Integer.MIN_VALUE) { + taken7++; + } + for (int j = 0; j < 10; j++) { + for (int k = 0; k < 10; k++) { + + } + } + } + + private static Object test7Helper1(int i, int j) { + if (i + MIN_VALUE >= j + Integer.MIN_VALUE) { + for (int k = 0; k < 100; k++) { + } + return a; + } + return b; + } + + private static boolean test7Helper2(Object o) { + return o instanceof A; + } + + private static class A { + } + + private static class B { + } +} diff --git a/test/hotspot/jtreg/compiler/stable/LazyConstantsIrTest.java b/test/hotspot/jtreg/compiler/stable/LazyConstantsIrTest.java new file mode 100644 index 00000000000..b9f9343dd39 --- /dev/null +++ b/test/hotspot/jtreg/compiler/stable/LazyConstantsIrTest.java @@ -0,0 +1,129 @@ +/* + * 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 + * @summary Check LazyConstant and lazy collection constant folding + * @modules java.base/jdk.internal.lang + * @library /test/lib / + * @enablePreview + * @run main ${test.main.class} + */ + +package compiler.stable; + +import compiler.lib.ir_framework.*; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +public class LazyConstantsIrTest { + + public static void main(String[] args) { + new TestFramework() + .addTestClassesToBootClassPath() + .addFlags( + "--enable-preview", + "-XX:+UnlockExperimentalVMOptions") + .addCrossProductScenarios( + Set.of("-XX:+TieredCompilation", "-XX:-TieredCompilation")) + .setDefaultWarmup(5000) + .start(); + } + + static final int THE_VALUE = 42; + + static final LazyConstant LAZY_CONSTANT = LazyConstant.of(() -> THE_VALUE); + static final List LAZY_LIST = List.ofLazy(1, _ -> THE_VALUE); + static final Set LAZY_SET = Set.ofLazy(Set.of(THE_VALUE), _ -> true); + static final Map LAZY_MAP = Map.ofLazy(Set.of(0), _ -> THE_VALUE); + + + // For all tests: + // * Access should be folded. + // * No barriers expected for a folded access (as opposed to a non-folded). + + // Lazy constant + + @Test + @IR(failOn = { IRNode.LOAD, IRNode.MEMBAR }) + static int foldLazyConstantGet() { + return LAZY_CONSTANT.get(); + } + + // Lazy list + + @Test + @IR(failOn = { IRNode.LOAD, IRNode.MEMBAR}) + static int foldLazyListGet() { + return LAZY_LIST.get(0); + } + + @Test + @IR(failOn = { IRNode.LOAD, IRNode.MEMBAR}) + static int foldLazyListSize() { + return LAZY_LIST.size(); + } + + // Lazy map + + @Test + @IR(failOn = { IRNode.LOAD, IRNode.MEMBAR}) + static int foldLazyMapGet() { + return LAZY_MAP.get(0); + } + + @Test + @IR(failOn = { IRNode.LOAD, IRNode.MEMBAR}) + static int foldLazyMapSize() { + return LAZY_MAP.size(); + } + + @Test + @IR(failOn = { IRNode.LOAD, IRNode.MEMBAR}) + static int foldLazyMapHashCode() { + return LAZY_MAP.hashCode(); + } + + // Lazy set + + @Test + @IR(failOn = { IRNode.LOAD, IRNode.MEMBAR}) + static boolean foldLazySetContains() { + return LAZY_SET.contains(THE_VALUE); + } + + @Test + @IR(failOn = { IRNode.LOAD, IRNode.MEMBAR}) + static int foldLazySetHashCode() { + return LAZY_SET.hashCode(); + } + + @Test + @IR(failOn = { IRNode.LOAD, IRNode.MEMBAR}) + static int foldLazySetSize() { + return LAZY_SET.size(); + } + +} diff --git a/test/hotspot/jtreg/compiler/startup/SmallCodeCacheStartup.java b/test/hotspot/jtreg/compiler/startup/SmallCodeCacheStartup.java index b3b92afa0d1..8e0d039ea52 100644 --- a/test/hotspot/jtreg/compiler/startup/SmallCodeCacheStartup.java +++ b/test/hotspot/jtreg/compiler/startup/SmallCodeCacheStartup.java @@ -52,8 +52,8 @@ public class SmallCodeCacheStartup { try { analyzer.shouldHaveExitValue(0); } catch (RuntimeException e) { - // Error occurred during initialization, did we run out of adapter space? - assertTrue(analyzer.getOutput().contains("VirtualMachineError: Out of space in CodeCache"), + // Error occurred during initialization + assertTrue(analyzer.getOutput().contains("CICompilerCount is too large"), "Expected VirtualMachineError"); } diff --git a/test/hotspot/jtreg/compiler/vectorapi/TestMultiplyReductionByte.java b/test/hotspot/jtreg/compiler/vectorapi/TestMultiplyReductionByte.java index 13eafd8dc26..b56dc371559 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/TestMultiplyReductionByte.java +++ b/test/hotspot/jtreg/compiler/vectorapi/TestMultiplyReductionByte.java @@ -35,7 +35,7 @@ import jdk.test.lib.Utils; /** * @test - * @bug 8378250 + * @bug 8378250 8381452 * @summary Verify correctness of byte vector MUL reduction across all species. * A register aliasing bug in mulreduce32B caused the upper half of * sign-extended data to overwrite the source, producing wrong results @@ -57,7 +57,7 @@ public class TestMultiplyReductionByte { @Test @IR(counts = {IRNode.MUL_REDUCTION_VI, ">=1"}, - applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true", "rvv", "true"}, applyIf = {"MaxVectorSize", ">=8"}) static byte testMulReduce64() { return ByteVector.fromArray(ByteVector.SPECIES_64, input, 0) @@ -75,7 +75,7 @@ public class TestMultiplyReductionByte { @Test @IR(counts = {IRNode.MUL_REDUCTION_VI, ">=1"}, - applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true", "rvv", "true"}, applyIf = {"MaxVectorSize", ">=16"}) static byte testMulReduce128() { return ByteVector.fromArray(ByteVector.SPECIES_128, input, 0) @@ -93,8 +93,13 @@ public class TestMultiplyReductionByte { @Test @IR(counts = {IRNode.MUL_REDUCTION_VI, ">=1"}, - applyIfCPUFeatureOr = {"avx2", "true", "asimd", "true"}, + applyIfCPUFeatureOr = {"avx2", "true", "rvv", "true"}, applyIf = {"MaxVectorSize", ">=32"}) + @IR(counts = {IRNode.MUL_REDUCTION_VI, "0"}, + applyIfCPUFeature = {"asimd", "true"}, + applyIf = {"MaxVectorSize", ">=32"}) + // AArch64 currently does not vectorize vectors larger than 128 bits, and + // that may change in the future. static byte testMulReduce256() { return ByteVector.fromArray(ByteVector.SPECIES_256, input, 0) .reduceLanes(VectorOperators.MUL); @@ -111,8 +116,13 @@ public class TestMultiplyReductionByte { @Test @IR(counts = {IRNode.MUL_REDUCTION_VI, ">=1"}, - applyIfCPUFeatureOr = {"avx512f", "true", "asimd", "true"}, + applyIfCPUFeatureOr = {"avx512f", "true", "rvv", "true"}, applyIf = {"MaxVectorSize", ">=64"}) + @IR(counts = {IRNode.MUL_REDUCTION_VI, "0"}, + applyIfCPUFeature = {"asimd", "true"}, + applyIf = {"MaxVectorSize", ">=64"}) + // AArch64 currently does not vectorize vectors larger than 128 bits, and + // that may change in the future. static byte testMulReduce512() { return ByteVector.fromArray(ByteVector.SPECIES_512, input, 0) .reduceLanes(VectorOperators.MUL); diff --git a/test/hotspot/jtreg/compiler/vectorapi/TestVectorBroadcastTransforms.java b/test/hotspot/jtreg/compiler/vectorapi/TestVectorBroadcastTransforms.java new file mode 100644 index 00000000000..c58a6710c86 --- /dev/null +++ b/test/hotspot/jtreg/compiler/vectorapi/TestVectorBroadcastTransforms.java @@ -0,0 +1,1100 @@ +/* + * 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 8358521 + * @summary Optimize vector operations by reassociating broadcasted inputs + * @modules jdk.incubator.vector + * @library /test/lib / + * @run driver compiler.vectorapi.TestVectorBroadcastTransforms + */ + +package compiler.vectorapi; + +import compiler.lib.ir_framework.*; +import compiler.lib.verify.Verify; +import jdk.incubator.vector.*; + +import jdk.test.lib.Utils; +import java.util.Random; + +public class TestVectorBroadcastTransforms { + + public static void main(String[] args) { + TestFramework.runWithFlags("--add-modules=jdk.incubator.vector"); + } + + private static final Random R = Utils.getRandomInstance(); + + /* ======================= + * INT + * ======================= */ + + static final VectorSpecies ISP = IntVector.SPECIES_PREFERRED; + + @Test + @IR(failOn = IRNode.ADD_VI, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_I, ">= 1", IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static int int_add(int ia, int ib) { + return IntVector.broadcast(ISP, ia) + .add(IntVector.broadcast(ISP, ib)) + .lane(0); + } + + @Run(test = "int_add") + static void run_int_add() { + int ia = R.nextInt(); + int ib = R.nextInt(); + int ir = int_add(ia, ib); + Verify.checkEQ(ir, ia + ib); + } + + @Test + @IR(failOn = IRNode.SUB_VI, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SUB_I, ">= 1", IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static int int_sub(int ia, int ib) { + return IntVector.broadcast(ISP, ia) + .sub(IntVector.broadcast(ISP, ib)) + .lane(0); + } + + @Run(test = "int_sub") + static void run_int_sub() { + int ia = R.nextInt(); + int ib = R.nextInt(); + int ir = int_sub(ia, ib); + Verify.checkEQ(ir, ia - ib); + } + + @Test + @IR(failOn = IRNode.MUL_VI, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_I, ">= 1", IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static int int_mul(int ia, int ib) { + return IntVector.broadcast(ISP, ia) + .mul(IntVector.broadcast(ISP, ib)) + .lane(0); + } + + @Run(test = "int_mul") + static void run_int_mul() { + int ia = R.nextInt(); + int ib = R.nextInt(); + int ir = int_mul(ia, ib); + Verify.checkEQ(ir, ia * ib); + } + + @Test + @IR(failOn = IRNode.AND_VI, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.AND_I, ">= 1", IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static int int_and(int ia, int ib) { + return IntVector.broadcast(ISP, ia) + .and(IntVector.broadcast(ISP, ib)) + .lane(0); + } + + @Run(test = "int_and") + static void run_int_and() { + int ia = R.nextInt(); + int ib = R.nextInt(); + int ir = int_and(ia, ib); + Verify.checkEQ(ir, ia & ib); + } + + @Test + @IR(failOn = IRNode.OR_VI, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.OR_I, ">= 1", IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static int int_or(int ia, int ib) { + return IntVector.broadcast(ISP, ia) + .or(IntVector.broadcast(ISP, ib)) + .lane(0); + } + + @Run(test = "int_or") + static void run_int_or() { + int ia = R.nextInt(); + int ib = R.nextInt(); + int ir = int_or(ia, ib); + Verify.checkEQ(ir, ia | ib); + } + + @Test + @IR(failOn = IRNode.XOR_VI, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.XOR_I, ">= 1", IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static int int_xor(int ia, int ib) { + return IntVector.broadcast(ISP, ia) + .lanewise(VectorOperators.XOR, IntVector.broadcast(ISP, ib)) + .lane(0); + } + + @Run(test = "int_xor") + static void run_int_xor() { + int ia = R.nextInt(); + int ib = R.nextInt(); + int ir = int_xor(ia, ib); + Verify.checkEQ(ir, ia ^ ib); + } + + @Test + @IR(failOn = IRNode.MIN_VI, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MIN_I, ">= 1", IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static int int_min(int ia, int ib) { + return IntVector.broadcast(ISP, ia) + .min(IntVector.broadcast(ISP, ib)) + .lane(0); + } + + @Run(test = "int_min") + static void run_int_min() { + int ia = R.nextInt(); + int ib = R.nextInt(); + int ir = int_min(ia, ib); + Verify.checkEQ(ir, Math.min(ia, ib)); + } + + @Test + @IR(failOn = IRNode.MAX_VI, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MAX_I, ">= 1", IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static int int_max(int ia, int ib) { + return IntVector.broadcast(ISP, ia) + .max(IntVector.broadcast(ISP, ib)) + .lane(0); + } + + @Run(test = "int_max") + static void run_int_max() { + int ia = R.nextInt(); + int ib = R.nextInt(); + int ir = int_max(ia, ib); + Verify.checkEQ(ir, Math.max(ia, ib)); + } + + /* ======================= + * LONG + * ======================= */ + + static final VectorSpecies LSP = LongVector.SPECIES_PREFERRED; + + @Test + @IR(failOn = IRNode.ADD_VL, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_L, ">= 1", IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static long long_add(long la, long lb) { + return LongVector.broadcast(LSP, la) + .add(LongVector.broadcast(LSP, lb)) + .lane(0); + } + + @Run(test = "long_add") + static void run_long_add() { + long la = R.nextLong(); + long lb = R.nextLong(); + long lr = long_add(la, lb); + Verify.checkEQ(lr, la + lb); + } + + @Test + @IR(failOn = IRNode.SUB_VL, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SUB_L, ">= 1", IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static long long_sub(long la, long lb) { + return LongVector.broadcast(LSP, la) + .sub(LongVector.broadcast(LSP, lb)) + .lane(0); + } + + @Run(test = "long_sub") + static void run_long_sub() { + long la = R.nextLong(); + long lb = R.nextLong(); + long lr = long_sub(la, lb); + Verify.checkEQ(lr, la - lb); + } + + @Test + @IR(failOn = IRNode.MUL_VL, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_L, ">= 1", IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static long long_mul(long la, long lb) { + return LongVector.broadcast(LSP, la) + .mul(LongVector.broadcast(LSP, lb)) + .lane(0); + } + + @Run(test = "long_mul") + static void run_long_mul() { + long la = R.nextLong(); + long lb = R.nextLong(); + long lr = long_mul(la, lb); + Verify.checkEQ(lr, la * lb); + } + + @Test + @IR(failOn = IRNode.AND_VL, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.AND_L, ">= 1", IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static long long_and(long la, long lb) { + return LongVector.broadcast(LSP, la) + .and(LongVector.broadcast(LSP, lb)) + .lane(0); + } + + @Run(test = "long_and") + static void run_long_and() { + long la = R.nextLong(); + long lb = R.nextLong(); + long lr = long_and(la, lb); + Verify.checkEQ(lr, la & lb); + } + + @Test + @IR(failOn = IRNode.OR_VL, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.OR_L, ">= 1", IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static long long_or(long la, long lb) { + return LongVector.broadcast(LSP, la) + .or(LongVector.broadcast(LSP, lb)) + .lane(0); + } + + @Run(test = "long_or") + static void run_long_or() { + long la = R.nextLong(); + long lb = R.nextLong(); + long lr = long_or(la, lb); + Verify.checkEQ(lr, la | lb); + } + + @Test + @IR(failOn = IRNode.XOR_VL, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.XOR_L, ">= 1", IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static long long_xor(long la, long lb) { + return LongVector.broadcast(LSP, la) + .lanewise(VectorOperators.XOR, LongVector.broadcast(LSP, lb)) + .lane(0); + } + + @Run(test = "long_xor") + static void run_long_xor() { + long la = R.nextLong(); + long lb = R.nextLong(); + long lr = long_xor(la, lb); + Verify.checkEQ(lr, la ^ lb); + } + + @Test + @IR(failOn = IRNode.MIN_VL, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = {IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static long long_min(long la, long lb) { + return LongVector.broadcast(LSP, la) + .min(LongVector.broadcast(LSP, lb)) + .lane(0); + } + + @Run(test = "long_min") + static void run_long_min() { + long la = R.nextLong(); + long lb = R.nextLong(); + long lr = long_min(la, lb); + Verify.checkEQ(lr, Math.min(la, lb)); + } + + @Test + @IR(failOn = IRNode.MAX_VL, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = {IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static long long_max(long la, long lb) { + return LongVector.broadcast(LSP, la) + .max(LongVector.broadcast(LSP, lb)) + .lane(0); + } + + @Run(test = "long_max") + static void run_long_max() { + long la = R.nextLong(); + long lb = R.nextLong(); + long lr = long_max(la, lb); + Verify.checkEQ(lr, Math.max(la, lb)); + } + + /* ======================= + * FLOAT + * ======================= */ + + static final VectorSpecies FSP = FloatVector.SPECIES_PREFERRED; + + @Test + @IR(failOn = IRNode.ADD_VF, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_F, ">= 1", IRNode.REPLICATE_F, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static float float_add(float fa, float fb) { + return FloatVector.broadcast(FSP, fa) + .add(FloatVector.broadcast(FSP, fb)) + .lane(0); + } + + @Run(test = "float_add") + static void run_float_add() { + float fa = R.nextFloat(); + float fb = R.nextFloat(); + float fr = float_add(fa, fb); + Verify.checkEQ(fr, fa + fb); + } + + @Test + @IR(failOn = IRNode.SUB_VF, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SUB_F, ">= 1", IRNode.REPLICATE_F, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static float float_sub(float fa, float fb) { + return FloatVector.broadcast(FSP, fa) + .sub(FloatVector.broadcast(FSP, fb)) + .lane(0); + } + + @Run(test = "float_sub") + static void run_float_sub() { + float fa = R.nextFloat(); + float fb = R.nextFloat(); + float fr = float_sub(fa, fb); + Verify.checkEQ(fr, fa - fb); + } + + @Test + @IR(failOn = IRNode.MUL_VF, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_F, ">= 1", IRNode.REPLICATE_F, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static float float_mul(float fa, float fb) { + return FloatVector.broadcast(FSP, fa) + .mul(FloatVector.broadcast(FSP, fb)) + .lane(0); + } + + @Run(test = "float_mul") + static void run_float_mul() { + float fa = R.nextFloat(); + float fb = R.nextFloat(); + float fr = float_mul(fa, fb); + Verify.checkEQ(fr, fa * fb); + } + + @Test + @IR(failOn = IRNode.DIV_VF, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.DIV_F, ">= 1", IRNode.REPLICATE_F, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static float float_div(float fa, float fb) { + return FloatVector.broadcast(FSP, fa) + .div(FloatVector.broadcast(FSP, fb)) + .lane(0); + } + + @Run(test = "float_div") + static void run_float_div() { + float fa = R.nextFloat(); + float fb = R.nextFloat(); + if (fb == 0f) fb = 1f; + float fr = float_div(fa, fb); + Verify.checkEQ(fr, fa / fb); + } + + @Test + @IR(failOn = IRNode.MIN_VF, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MIN_F, ">= 1", IRNode.REPLICATE_F, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static float float_min(float fa, float fb) { + return FloatVector.broadcast(FSP, fa) + .min(FloatVector.broadcast(FSP, fb)) + .lane(0); + } + + @Run(test = "float_min") + static void run_float_min() { + float fa = R.nextFloat(); + float fb = R.nextFloat(); + float fr = float_min(fa, fb); + Verify.checkEQ(fr, Math.min(fa, fb)); + } + + @Test + @IR(failOn = IRNode.MAX_VF, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MAX_F, ">= 1", IRNode.REPLICATE_F, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static float float_max(float fa, float fb) { + return FloatVector.broadcast(FSP, fa) + .max(FloatVector.broadcast(FSP, fb)) + .lane(0); + } + + @Run(test = "float_max") + static void run_float_max() { + float fa = R.nextFloat(); + float fb = R.nextFloat(); + float fr = float_max(fa, fb); + Verify.checkEQ(fr, Math.max(fa, fb)); + } + + @Test + @IR(failOn = IRNode.SQRT_VF, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SQRT_F, ">= 1", IRNode.REPLICATE_F, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static float float_sqrt(float fa) { + return FloatVector.broadcast(FSP, fa) + .sqrt() + .lane(0); + } + + @Run(test = "float_sqrt") + static void run_float_sqrt() { + float fa = Math.abs(R.nextFloat()) + Float.MIN_VALUE; + float fr = float_sqrt(fa); + Verify.checkEQ(fr, (float) Math.sqrt(fa)); + } + + @Test + @IR(failOn = IRNode.FMA_VF, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.FMA_F, ">= 1", IRNode.REPLICATE_F, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static float float_fma(float fa, float fb, float fc) { + return FloatVector.broadcast(FSP, fa) + .fma(FloatVector.broadcast(FSP, fb), + FloatVector.broadcast(FSP, fc)) + .lane(0); + } + + @Run(test = "float_fma") + static void run_float_fma() { + float fa = R.nextFloat(); + float fb = R.nextFloat(); + float fc = R.nextFloat(); + float fr = float_fma(fa, fb, fc); + Verify.checkEQ(fr, Math.fma(fa, fb, fc)); + } + + /* ======================= + * DOUBLE + * ======================= */ + + static final VectorSpecies DSP = DoubleVector.SPECIES_PREFERRED; + + @Test + @IR(failOn = IRNode.ADD_VD, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_D, ">= 1", IRNode.REPLICATE_D, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static double double_add(double da, double db) { + return DoubleVector.broadcast(DSP, da) + .add(DoubleVector.broadcast(DSP, db)) + .lane(0); + } + + @Run(test = "double_add") + static void run_double_add() { + double da = R.nextDouble(); + double db = R.nextDouble(); + double dr = double_add(da, db); + Verify.checkEQ(dr, da + db); + } + + @Test + @IR(failOn = IRNode.SUB_VD, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SUB_D, ">= 1", IRNode.REPLICATE_D, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static double double_sub(double da, double db) { + return DoubleVector.broadcast(DSP, da) + .sub(DoubleVector.broadcast(DSP, db)) + .lane(0); + } + + @Run(test = "double_sub") + static void run_double_sub() { + double da = R.nextDouble(); + double db = R.nextDouble(); + double dr = double_sub(da, db); + Verify.checkEQ(dr, da - db); + } + + @Test + @IR(failOn = IRNode.MUL_VD, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_D, ">= 1", IRNode.REPLICATE_D, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static double double_mul(double da, double db) { + return DoubleVector.broadcast(DSP, da) + .mul(DoubleVector.broadcast(DSP, db)) + .lane(0); + } + + @Run(test = "double_mul") + static void run_double_mul() { + double da = R.nextDouble(); + double db = R.nextDouble(); + double dr = double_mul(da, db); + Verify.checkEQ(dr, da * db); + } + + @Test + @IR(failOn = IRNode.DIV_VD, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.DIV_D, ">= 1", IRNode.REPLICATE_D, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static double double_div(double da, double db) { + return DoubleVector.broadcast(DSP, da) + .div(DoubleVector.broadcast(DSP, db)) + .lane(0); + } + + @Run(test = "double_div") + static void run_double_div() { + double da = R.nextDouble(); + double db = R.nextDouble(); + if (db == 0d) db = 1d; + double dr = double_div(da, db); + Verify.checkEQ(dr, da / db); + } + + @Test + @IR(failOn = IRNode.MIN_VD, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MIN_D, ">= 1", IRNode.REPLICATE_D, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static double double_min(double da, double db) { + return DoubleVector.broadcast(DSP, da) + .min(DoubleVector.broadcast(DSP, db)) + .lane(0); + } + + @Run(test = "double_min") + static void run_double_min() { + double da = R.nextDouble(); + double db = R.nextDouble(); + double dr = double_min(da, db); + Verify.checkEQ(dr, Math.min(da, db)); + } + + @Test + @IR(failOn = IRNode.MAX_VD, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MAX_D, ">= 1", IRNode.REPLICATE_D, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static double double_max(double da, double db) { + return DoubleVector.broadcast(DSP, da) + .max(DoubleVector.broadcast(DSP, db)) + .lane(0); + } + + @Run(test = "double_max") + static void run_double_max() { + double da = R.nextDouble(); + double db = R.nextDouble(); + double dr = double_max(da, db); + Verify.checkEQ(dr, Math.max(da, db)); + } + + @Test + @IR(failOn = IRNode.SQRT_VD, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SQRT_D, ">= 1", IRNode.REPLICATE_D, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static double double_sqrt(double da) { + return DoubleVector.broadcast(DSP, da) + .sqrt() + .lane(0); + } + + @Run(test = "double_sqrt") + static void run_double_sqrt() { + double da = Math.abs(R.nextDouble()) + Double.MIN_VALUE; + double dr = double_sqrt(da); + Verify.checkEQ(dr, Math.sqrt(da)); + } + + @Test + @IR(failOn = IRNode.FMA_VD, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.FMA_D, ">= 1", IRNode.REPLICATE_D, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static double double_fma(double da, double db, double dc) { + return DoubleVector.broadcast(DSP, da) + .fma(DoubleVector.broadcast(DSP, db), + DoubleVector.broadcast(DSP, dc)) + .lane(0); + } + + @Run(test = "double_fma") + static void run_double_fma() { + double da = R.nextDouble(); + double db = R.nextDouble(); + double dc = R.nextDouble(); + double dr = double_fma(da, db, dc); + Verify.checkEQ(dr, Math.fma(da, db, dc)); + } + + /* ======================= + * BYTE + * ======================= */ + + static final VectorSpecies BSP = ByteVector.SPECIES_PREFERRED; + static byte B_MAX = Byte.MAX_VALUE, B_MIN = Byte.MIN_VALUE; + static byte B_ONE = (byte) 1, B_NEG_ONE = (byte) -1; + + @Test + @IR(failOn = IRNode.ADD_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_add(byte ba, byte bb) { + return ByteVector.broadcast(BSP, ba) + .add(ByteVector.broadcast(BSP, bb)) + .lane(0); + } + + @Run(test = "byte_add") + static void run_byte_add() { + byte ba = (byte) R.nextInt(); + byte bb = (byte) R.nextInt(); + byte br = byte_add(ba, bb); + Verify.checkEQ(br, (byte) (ba + bb)); + } + + @Test + @IR(failOn = IRNode.SUB_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SUB_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_sub(byte ba, byte bb) { + return ByteVector.broadcast(BSP, ba) + .sub(ByteVector.broadcast(BSP, bb)) + .lane(0); + } + + @Run(test = "byte_sub") + static void run_byte_sub() { + byte ba = (byte) R.nextInt(); + byte bb = (byte) R.nextInt(); + byte br = byte_sub(ba, bb); + Verify.checkEQ(br, (byte) (ba - bb)); + } + + @Test + @IR(failOn = IRNode.ADD_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_add_overflow() { + return ByteVector.broadcast(BSP, B_MAX) + .add(ByteVector.broadcast(BSP, B_ONE)) + .lane(0); + } + + @Run(test = "byte_add_overflow") + static void run_byte_add_overflow() { + byte br = byte_add_overflow(); + Verify.checkEQ(br, (byte) (B_MAX + B_ONE)); + } + + @Test + @IR(failOn = IRNode.ADD_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_add_underflow() { + return ByteVector.broadcast(BSP, B_MIN) + .add(ByteVector.broadcast(BSP, B_NEG_ONE)) + .lane(0); + } + + @Run(test = "byte_add_underflow") + static void run_byte_add_underflow() { + byte br = byte_add_underflow(); + Verify.checkEQ(br, (byte) (B_MIN + B_NEG_ONE)); + } + + @Test + @IR(failOn = IRNode.SUB_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SUB_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_sub_overflow() { + return ByteVector.broadcast(BSP, B_MAX) + .sub(ByteVector.broadcast(BSP, B_NEG_ONE)) + .lane(0); + } + + @Run(test = "byte_sub_overflow") + static void run_byte_sub_overflow() { + byte br = byte_sub_overflow(); + Verify.checkEQ(br, (byte) (B_MAX - B_NEG_ONE)); + } + + @Test + @IR(failOn = IRNode.SUB_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SUB_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_sub_underflow() { + return ByteVector.broadcast(BSP, B_MIN) + .sub(ByteVector.broadcast(BSP, B_ONE)) + .lane(0); + } + + @Run(test = "byte_sub_underflow") + static void run_byte_sub_underflow() { + byte br = byte_sub_underflow(); + Verify.checkEQ(br, (byte) (B_MIN - B_ONE)); + } + + @Test + @IR(failOn = IRNode.MUL_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_mul(byte ba, byte bb) { + return ByteVector.broadcast(BSP, ba) + .mul(ByteVector.broadcast(BSP, bb)) + .lane(0); + } + + @Run(test = "byte_mul") + static void run_byte_mul() { + byte ba = (byte) R.nextInt(); + byte bb = (byte) R.nextInt(); + byte br = byte_mul(ba, bb); + Verify.checkEQ(br, (byte) (ba * bb)); + } + + @Test + @IR(failOn = IRNode.AND_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.AND_I, ">= 1", IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_and(byte ba, byte bb) { + return ByteVector.broadcast(BSP, ba) + .and(ByteVector.broadcast(BSP, bb)) + .lane(0); + } + + @Run(test = "byte_and") + static void run_byte_and() { + byte ba = (byte) R.nextInt(); + byte bb = (byte) R.nextInt(); + byte br = byte_and(ba, bb); + Verify.checkEQ(br, (byte) (ba & bb)); + } + + @Test + @IR(failOn = IRNode.OR_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.OR_I, ">= 1", IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_or(byte ba, byte bb) { + return ByteVector.broadcast(BSP, ba) + .or(ByteVector.broadcast(BSP, bb)) + .lane(0); + } + + @Run(test = "byte_or") + static void run_byte_or() { + byte ba = (byte) R.nextInt(); + byte bb = (byte) R.nextInt(); + byte br = byte_or(ba, bb); + Verify.checkEQ(br, (byte) (ba | bb)); + } + + @Test + @IR(failOn = IRNode.XOR_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.XOR_I, ">= 1", IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_xor(byte ba, byte bb) { + return ByteVector.broadcast(BSP, ba) + .lanewise(VectorOperators.XOR, ByteVector.broadcast(BSP, bb)) + .lane(0); + } + + @Run(test = "byte_xor") + static void run_byte_xor() { + byte ba = (byte) R.nextInt(); + byte bb = (byte) R.nextInt(); + byte br = byte_xor(ba, bb); + Verify.checkEQ(br, (byte) (ba ^ bb)); + } + + @Test + @IR(failOn = IRNode.MIN_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MIN_I, ">= 1", IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_min(byte ba, byte bb) { + return ByteVector.broadcast(BSP, ba) + .min(ByteVector.broadcast(BSP, bb)) + .lane(0); + } + + @Run(test = "byte_min") + static void run_byte_min() { + byte ba = (byte) R.nextInt(); + byte bb = (byte) R.nextInt(); + byte br = byte_min(ba, bb); + Verify.checkEQ(br, (byte) Math.min(ba, bb)); + } + + @Test + @IR(failOn = IRNode.MAX_VB, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MAX_I, ">= 1", IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static byte byte_max(byte ba, byte bb) { + return ByteVector.broadcast(BSP, ba) + .max(ByteVector.broadcast(BSP, bb)) + .lane(0); + } + + @Run(test = "byte_max") + static void run_byte_max() { + byte ba = (byte) R.nextInt(); + byte bb = (byte) R.nextInt(); + byte br = byte_max(ba, bb); + Verify.checkEQ(br, (byte) Math.max(ba, bb)); + } + + /* ======================= + * SHORT + * ======================= */ + + static final VectorSpecies SSP = ShortVector.SPECIES_PREFERRED; + static short S_MAX = Short.MAX_VALUE, S_MIN = Short.MIN_VALUE; + static short S_ONE = (short) 1, S_NEG_ONE = (short) -1; + + @Test + @IR(failOn = IRNode.ADD_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_add(short sa, short sb) { + return ShortVector.broadcast(SSP, sa) + .add(ShortVector.broadcast(SSP, sb)) + .lane(0); + } + + @Run(test = "short_add") + static void run_short_add() { + short sa = (short) R.nextInt(); + short sb = (short) R.nextInt(); + short sr = short_add(sa, sb); + Verify.checkEQ(sr, (short) (sa + sb)); + } + + @Test + @IR(failOn = IRNode.SUB_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SUB_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_sub(short sa, short sb) { + return ShortVector.broadcast(SSP, sa) + .sub(ShortVector.broadcast(SSP, sb)) + .lane(0); + } + + @Run(test = "short_sub") + static void run_short_sub() { + short sa = (short) R.nextInt(); + short sb = (short) R.nextInt(); + short sr = short_sub(sa, sb); + Verify.checkEQ(sr, (short) (sa - sb)); + } + + @Test + @IR(failOn = IRNode.ADD_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_add_overflow() { + return ShortVector.broadcast(SSP, S_MAX) + .add(ShortVector.broadcast(SSP, S_ONE)) + .lane(0); + } + + @Run(test = "short_add_overflow") + static void run_short_add_overflow() { + short sr = short_add_overflow(); + Verify.checkEQ(sr, (short) (S_MAX + S_ONE)); + } + + @Test + @IR(failOn = IRNode.ADD_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_add_underflow() { + return ShortVector.broadcast(SSP, S_MIN) + .add(ShortVector.broadcast(SSP, S_NEG_ONE)) + .lane(0); + } + + @Run(test = "short_add_underflow") + static void run_short_add_underflow() { + short sr = short_add_underflow(); + Verify.checkEQ(sr, (short) (S_MIN + S_NEG_ONE)); + } + + @Test + @IR(failOn = IRNode.SUB_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SUB_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_sub_overflow() { + return ShortVector.broadcast(SSP, S_MAX) + .sub(ShortVector.broadcast(SSP, S_NEG_ONE)) + .lane(0); + } + + @Run(test = "short_sub_overflow") + static void run_short_sub_overflow() { + short sr = short_sub_overflow(); + Verify.checkEQ(sr, (short) (S_MAX - S_NEG_ONE)); + } + + @Test + @IR(failOn = IRNode.SUB_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.SUB_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_sub_underflow() { + return ShortVector.broadcast(SSP, S_MIN) + .sub(ShortVector.broadcast(SSP, S_ONE)) + .lane(0); + } + + @Run(test = "short_sub_underflow") + static void run_short_sub_underflow() { + short sr = short_sub_underflow(); + Verify.checkEQ(sr, (short) (S_MIN - S_ONE)); + } + + @Test + @IR(failOn = IRNode.MUL_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_mul(short sa, short sb) { + return ShortVector.broadcast(SSP, sa) + .mul(ShortVector.broadcast(SSP, sb)) + .lane(0); + } + + @Run(test = "short_mul") + static void run_short_mul() { + short sa = (short) R.nextInt(); + short sb = (short) R.nextInt(); + short sr = short_mul(sa, sb); + Verify.checkEQ(sr, (short) (sa * sb)); + } + + @Test + @IR(failOn = IRNode.AND_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.AND_I, ">= 1", IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_and(short sa, short sb) { + return ShortVector.broadcast(SSP, sa) + .and(ShortVector.broadcast(SSP, sb)) + .lane(0); + } + + @Run(test = "short_and") + static void run_short_and() { + short sa = (short) R.nextInt(); + short sb = (short) R.nextInt(); + short sr = short_and(sa, sb); + Verify.checkEQ(sr, (short) (sa & sb)); + } + + @Test + @IR(failOn = IRNode.OR_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.OR_I, ">= 1", IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_or(short sa, short sb) { + return ShortVector.broadcast(SSP, sa) + .or(ShortVector.broadcast(SSP, sb)) + .lane(0); + } + + @Run(test = "short_or") + static void run_short_or() { + short sa = (short) R.nextInt(); + short sb = (short) R.nextInt(); + short sr = short_or(sa, sb); + Verify.checkEQ(sr, (short) (sa | sb)); + } + + @Test + @IR(failOn = IRNode.XOR_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.XOR_I, ">= 1", IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_xor(short sa, short sb) { + return ShortVector.broadcast(SSP, sa) + .lanewise(VectorOperators.XOR, ShortVector.broadcast(SSP, sb)) + .lane(0); + } + + @Run(test = "short_xor") + static void run_short_xor() { + short sa = (short) R.nextInt(); + short sb = (short) R.nextInt(); + short sr = short_xor(sa, sb); + Verify.checkEQ(sr, (short) (sa ^ sb)); + } + + @Test + @IR(failOn = IRNode.MIN_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MIN_I, ">= 1", IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_min(short sa, short sb) { + return ShortVector.broadcast(SSP, sa) + .min(ShortVector.broadcast(SSP, sb)) + .lane(0); + } + + @Run(test = "short_min") + static void run_short_min() { + short sa = (short) R.nextInt(); + short sb = (short) R.nextInt(); + short sr = short_min(sa, sb); + Verify.checkEQ(sr, (short) Math.min(sa, sb)); + } + + @Test + @IR(failOn = IRNode.MAX_VS, + applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MAX_I, ">= 1", IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + static short short_max(short sa, short sb) { + return ShortVector.broadcast(SSP, sa) + .max(ShortVector.broadcast(SSP, sb)) + .lane(0); + } + + @Run(test = "short_max") + static void run_short_max() { + short sa = (short) R.nextInt(); + short sb = (short) R.nextInt(); + short sr = short_max(sa, sb); + Verify.checkEQ(sr, (short) Math.max(sa, sb)); + } + +} diff --git a/test/hotspot/jtreg/compiler/vectorapi/TestVectorReassociations.java b/test/hotspot/jtreg/compiler/vectorapi/TestVectorReassociations.java new file mode 100644 index 00000000000..c6a11627215 --- /dev/null +++ b/test/hotspot/jtreg/compiler/vectorapi/TestVectorReassociations.java @@ -0,0 +1,605 @@ +/* + * 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 8358521 + * @summary Test reassociation of broadcasted inputs across vector operations + * @modules jdk.incubator.vector + * @library /test/lib / + * @run driver compiler.vectorapi.TestVectorReassociations + */ + +package compiler.vectorapi; + +import compiler.lib.ir_framework.*; +import jdk.incubator.vector.*; +import java.util.stream.IntStream; + +/** + * Tests for the reassociation transform: + * VectorOp(broadcast(a), VectorOp(broadcast(b), array)) + * => VectorOp(broadcast(ScalarOp(a, b)), array) + */ +public class TestVectorReassociations { + + public static void main(String[] args) { + TestFramework.runWithFlags("--add-modules=jdk.incubator.vector"); + } + + /* ======================= + * INT + * ======================= */ + + static final VectorSpecies ISP = IntVector.SPECIES_PREFERRED; + static int[] intIn = IntStream.range(0, IntVector.SPECIES_PREFERRED.length()).toArray(); + static int[] intOut = new int[IntVector.SPECIES_PREFERRED.length()]; + static int ia = 17, ib = 9; + + // --- INT ADD --- + + // bcast(a) ADD (bcast(b) ADD array) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VI, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_int_add_reassociation_pattern1() { + IntVector.broadcast(ISP, ia) + .lanewise(VectorOperators.ADD, + IntVector.broadcast(ISP, ib) + .lanewise(VectorOperators.ADD, + IntVector.fromArray(ISP, intIn, 0))) + .intoArray(intOut, 0); + } + + // bcast(a) ADD (array ADD bcast(b)) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VI, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_int_add_reassociation_pattern2() { + IntVector.broadcast(ISP, ia) + .lanewise(VectorOperators.ADD, + IntVector.fromArray(ISP, intIn, 0) + .lanewise(VectorOperators.ADD, + IntVector.broadcast(ISP, ib))) + .intoArray(intOut, 0); + } + + // (bcast(a) ADD array) ADD bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VI, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_int_add_reassociation_pattern3() { + IntVector.broadcast(ISP, ia) + .lanewise(VectorOperators.ADD, + IntVector.fromArray(ISP, intIn, 0)) + .lanewise(VectorOperators.ADD, + IntVector.broadcast(ISP, ib)) + .intoArray(intOut, 0); + } + + // (array ADD bcast(a)) ADD bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VI, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_int_add_reassociation_pattern4() { + IntVector.fromArray(ISP, intIn, 0) + .lanewise(VectorOperators.ADD, + IntVector.broadcast(ISP, ia)) + .lanewise(VectorOperators.ADD, + IntVector.broadcast(ISP, ib)) + .intoArray(intOut, 0); + } + + // --- INT MUL --- + + // bcast(a) MUL (bcast(b) MUL array) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VI, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_int_mul_reassociation_pattern1() { + IntVector.broadcast(ISP, ia) + .lanewise(VectorOperators.MUL, + IntVector.broadcast(ISP, ib) + .lanewise(VectorOperators.MUL, + IntVector.fromArray(ISP, intIn, 0))) + .intoArray(intOut, 0); + } + + // bcast(a) MUL (array MUL bcast(b)) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VI, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_int_mul_reassociation_pattern2() { + IntVector.broadcast(ISP, ia) + .lanewise(VectorOperators.MUL, + IntVector.fromArray(ISP, intIn, 0) + .lanewise(VectorOperators.MUL, + IntVector.broadcast(ISP, ib))) + .intoArray(intOut, 0); + } + + // (bcast(a) MUL array) MUL bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VI, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_int_mul_reassociation_pattern3() { + IntVector.broadcast(ISP, ia) + .lanewise(VectorOperators.MUL, + IntVector.fromArray(ISP, intIn, 0)) + .lanewise(VectorOperators.MUL, + IntVector.broadcast(ISP, ib)) + .intoArray(intOut, 0); + } + + // (array MUL bcast(a)) MUL bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VI, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_I, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_int_mul_reassociation_pattern4() { + IntVector.fromArray(ISP, intIn, 0) + .lanewise(VectorOperators.MUL, + IntVector.broadcast(ISP, ia)) + .lanewise(VectorOperators.MUL, + IntVector.broadcast(ISP, ib)) + .intoArray(intOut, 0); + } + + /* ======================= + * LONG + * ======================= */ + + static final VectorSpecies LSP = LongVector.SPECIES_PREFERRED; + static long[] longIn; + static long[] longOut; + static long la = 17L, lb = 9L; + + static { + longIn = new long[LSP.length()]; + longOut = new long[LSP.length()]; + for (int i = 0; i < LSP.length(); i++) { + longIn[i] = (long) i; + } + } + + // --- LONG ADD --- + + // bcast(a) ADD (bcast(b) ADD array) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VL, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_L, ">= 1", + IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_long_add_reassociation_pattern1() { + LongVector.broadcast(LSP, la) + .lanewise(VectorOperators.ADD, + LongVector.broadcast(LSP, lb) + .lanewise(VectorOperators.ADD, + LongVector.fromArray(LSP, longIn, 0))) + .intoArray(longOut, 0); + } + + // bcast(a) ADD (array ADD bcast(b)) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VL, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_L, ">= 1", + IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_long_add_reassociation_pattern2() { + LongVector.broadcast(LSP, la) + .lanewise(VectorOperators.ADD, + LongVector.fromArray(LSP, longIn, 0) + .lanewise(VectorOperators.ADD, + LongVector.broadcast(LSP, lb))) + .intoArray(longOut, 0); + } + + // (bcast(a) ADD array) ADD bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VL, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_L, ">= 1", + IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_long_add_reassociation_pattern3() { + LongVector.broadcast(LSP, la) + .lanewise(VectorOperators.ADD, + LongVector.fromArray(LSP, longIn, 0)) + .lanewise(VectorOperators.ADD, + LongVector.broadcast(LSP, lb)) + .intoArray(longOut, 0); + } + + // (array ADD bcast(a)) ADD bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VL, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_L, ">= 1", + IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_long_add_reassociation_pattern4() { + LongVector.fromArray(LSP, longIn, 0) + .lanewise(VectorOperators.ADD, + LongVector.broadcast(LSP, la)) + .lanewise(VectorOperators.ADD, + LongVector.broadcast(LSP, lb)) + .intoArray(longOut, 0); + } + + // --- LONG MUL --- + + // bcast(a) MUL (bcast(b) MUL array) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VL, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_L, ">= 1", + IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_long_mul_reassociation_pattern1() { + LongVector.broadcast(LSP, la) + .lanewise(VectorOperators.MUL, + LongVector.broadcast(LSP, lb) + .lanewise(VectorOperators.MUL, + LongVector.fromArray(LSP, longIn, 0))) + .intoArray(longOut, 0); + } + + // bcast(a) MUL (array MUL bcast(b)) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VL, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_L, ">= 1", + IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_long_mul_reassociation_pattern2() { + LongVector.broadcast(LSP, la) + .lanewise(VectorOperators.MUL, + LongVector.fromArray(LSP, longIn, 0) + .lanewise(VectorOperators.MUL, + LongVector.broadcast(LSP, lb))) + .intoArray(longOut, 0); + } + + // (bcast(a) MUL array) MUL bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VL, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_L, ">= 1", + IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_long_mul_reassociation_pattern3() { + LongVector.broadcast(LSP, la) + .lanewise(VectorOperators.MUL, + LongVector.fromArray(LSP, longIn, 0)) + .lanewise(VectorOperators.MUL, + LongVector.broadcast(LSP, lb)) + .intoArray(longOut, 0); + } + + // (array MUL bcast(a)) MUL bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VL, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_L, ">= 1", + IRNode.REPLICATE_L, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_long_mul_reassociation_pattern4() { + LongVector.fromArray(LSP, longIn, 0) + .lanewise(VectorOperators.MUL, + LongVector.broadcast(LSP, la)) + .lanewise(VectorOperators.MUL, + LongVector.broadcast(LSP, lb)) + .intoArray(longOut, 0); + } + + /* ======================= + * SHORT + * ======================= */ + + static final VectorSpecies SSP = ShortVector.SPECIES_PREFERRED; + static short[] shortIn; + static short[] shortOut; + static short sa = 17, sb = 9; + + static { + shortIn = new short[SSP.length()]; + shortOut = new short[SSP.length()]; + for (int i = 0; i < SSP.length(); i++) { + shortIn[i] = (short) i; + } + } + + // --- SHORT ADD --- + + // bcast(a) ADD (bcast(b) ADD array) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VS, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_short_add_reassociation_pattern1() { + ShortVector.broadcast(SSP, sa) + .lanewise(VectorOperators.ADD, + ShortVector.broadcast(SSP, sb) + .lanewise(VectorOperators.ADD, + ShortVector.fromArray(SSP, shortIn, 0))) + .intoArray(shortOut, 0); + } + + // bcast(a) ADD (array ADD bcast(b)) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VS, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_short_add_reassociation_pattern2() { + ShortVector.broadcast(SSP, sa) + .lanewise(VectorOperators.ADD, + ShortVector.fromArray(SSP, shortIn, 0) + .lanewise(VectorOperators.ADD, + ShortVector.broadcast(SSP, sb))) + .intoArray(shortOut, 0); + } + + // (bcast(a) ADD array) ADD bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VS, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_short_add_reassociation_pattern3() { + ShortVector.broadcast(SSP, sa) + .lanewise(VectorOperators.ADD, + ShortVector.fromArray(SSP, shortIn, 0)) + .lanewise(VectorOperators.ADD, + ShortVector.broadcast(SSP, sb)) + .intoArray(shortOut, 0); + } + + // (array ADD bcast(a)) ADD bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VS, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_short_add_reassociation_pattern4() { + ShortVector.fromArray(SSP, shortIn, 0) + .lanewise(VectorOperators.ADD, + ShortVector.broadcast(SSP, sa)) + .lanewise(VectorOperators.ADD, + ShortVector.broadcast(SSP, sb)) + .intoArray(shortOut, 0); + } + + // --- SHORT MUL --- + + // bcast(a) MUL (bcast(b) MUL array) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VS, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_short_mul_reassociation_pattern1() { + ShortVector.broadcast(SSP, sa) + .lanewise(VectorOperators.MUL, + ShortVector.broadcast(SSP, sb) + .lanewise(VectorOperators.MUL, + ShortVector.fromArray(SSP, shortIn, 0))) + .intoArray(shortOut, 0); + } + + // bcast(a) MUL (array MUL bcast(b)) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VS, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_short_mul_reassociation_pattern2() { + ShortVector.broadcast(SSP, sa) + .lanewise(VectorOperators.MUL, + ShortVector.fromArray(SSP, shortIn, 0) + .lanewise(VectorOperators.MUL, + ShortVector.broadcast(SSP, sb))) + .intoArray(shortOut, 0); + } + + // (bcast(a) MUL array) MUL bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VS, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_short_mul_reassociation_pattern3() { + ShortVector.broadcast(SSP, sa) + .lanewise(VectorOperators.MUL, + ShortVector.fromArray(SSP, shortIn, 0)) + .lanewise(VectorOperators.MUL, + ShortVector.broadcast(SSP, sb)) + .intoArray(shortOut, 0); + } + + // (array MUL bcast(a)) MUL bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VS, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_S, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_short_mul_reassociation_pattern4() { + ShortVector.fromArray(SSP, shortIn, 0) + .lanewise(VectorOperators.MUL, + ShortVector.broadcast(SSP, sa)) + .lanewise(VectorOperators.MUL, + ShortVector.broadcast(SSP, sb)) + .intoArray(shortOut, 0); + } + + /* ======================= + * BYTE + * ======================= */ + + static final VectorSpecies BSP = ByteVector.SPECIES_PREFERRED; + static byte[] byteIn; + static byte[] byteOut; + static byte ba = 17, bb = 9; + + static { + byteIn = new byte[BSP.length()]; + byteOut = new byte[BSP.length()]; + for (int i = 0; i < BSP.length(); i++) { + byteIn[i] = (byte) i; + } + } + + // --- BYTE ADD --- + + // bcast(a) ADD (bcast(b) ADD array) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VB, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_byte_add_reassociation_pattern1() { + ByteVector.broadcast(BSP, ba) + .lanewise(VectorOperators.ADD, + ByteVector.broadcast(BSP, bb) + .lanewise(VectorOperators.ADD, + ByteVector.fromArray(BSP, byteIn, 0))) + .intoArray(byteOut, 0); + } + + // bcast(a) ADD (array ADD bcast(b)) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VB, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_byte_add_reassociation_pattern2() { + ByteVector.broadcast(BSP, ba) + .lanewise(VectorOperators.ADD, + ByteVector.fromArray(BSP, byteIn, 0) + .lanewise(VectorOperators.ADD, + ByteVector.broadcast(BSP, bb))) + .intoArray(byteOut, 0); + } + + // (bcast(a) ADD array) ADD bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VB, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_byte_add_reassociation_pattern3() { + ByteVector.broadcast(BSP, ba) + .lanewise(VectorOperators.ADD, + ByteVector.fromArray(BSP, byteIn, 0)) + .lanewise(VectorOperators.ADD, + ByteVector.broadcast(BSP, bb)) + .intoArray(byteOut, 0); + } + + // (array ADD bcast(a)) ADD bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.ADD_VB, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.ADD_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_byte_add_reassociation_pattern4() { + ByteVector.fromArray(BSP, byteIn, 0) + .lanewise(VectorOperators.ADD, + ByteVector.broadcast(BSP, ba)) + .lanewise(VectorOperators.ADD, + ByteVector.broadcast(BSP, bb)) + .intoArray(byteOut, 0); + } + + // --- BYTE MUL --- + + // bcast(a) MUL (bcast(b) MUL array) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VB, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_byte_mul_reassociation_pattern1() { + ByteVector.broadcast(BSP, ba) + .lanewise(VectorOperators.MUL, + ByteVector.broadcast(BSP, bb) + .lanewise(VectorOperators.MUL, + ByteVector.fromArray(BSP, byteIn, 0))) + .intoArray(byteOut, 0); + } + + // bcast(a) MUL (array MUL bcast(b)) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VB, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_byte_mul_reassociation_pattern2() { + ByteVector.broadcast(BSP, ba) + .lanewise(VectorOperators.MUL, + ByteVector.fromArray(BSP, byteIn, 0) + .lanewise(VectorOperators.MUL, + ByteVector.broadcast(BSP, bb))) + .intoArray(byteOut, 0); + } + + // (bcast(a) MUL array) MUL bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VB, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_byte_mul_reassociation_pattern3() { + ByteVector.broadcast(BSP, ba) + .lanewise(VectorOperators.MUL, + ByteVector.fromArray(BSP, byteIn, 0)) + .lanewise(VectorOperators.MUL, + ByteVector.broadcast(BSP, bb)) + .intoArray(byteOut, 0); + } + + // (array MUL bcast(a)) MUL bcast(b) + @Test + @IR(applyIfCPUFeatureOr = {"avx", "true", "asimd", "true"}, + counts = { IRNode.MUL_VB, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MUL_I, ">= 1", + IRNode.REPLICATE_B, IRNode.VECTOR_SIZE_ANY, ">= 1" }) + @Warmup(value = 10000) + static void test_byte_mul_reassociation_pattern4() { + ByteVector.fromArray(BSP, byteIn, 0) + .lanewise(VectorOperators.MUL, + ByteVector.broadcast(BSP, ba)) + .lanewise(VectorOperators.MUL, + ByteVector.broadcast(BSP, bb)) + .intoArray(byteOut, 0); + } +} diff --git a/test/hotspot/jtreg/compiler/vectorapi/TestVectorRotateConstantAArch64.java b/test/hotspot/jtreg/compiler/vectorapi/TestVectorRotateConstantAArch64.java new file mode 100644 index 00000000000..93661e8836a --- /dev/null +++ b/test/hotspot/jtreg/compiler/vectorapi/TestVectorRotateConstantAArch64.java @@ -0,0 +1,450 @@ +/* + * 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. + */ + +package compiler.vectorapi; + +import compiler.lib.ir_framework.*; + +import java.util.Random; + +import jdk.incubator.vector.IntVector; +import jdk.incubator.vector.ByteVector; +import jdk.incubator.vector.LongVector; +import jdk.incubator.vector.ShortVector; +import jdk.incubator.vector.VectorOperators; +import jdk.incubator.vector.VectorSpecies; +import jdk.test.lib.Asserts; + +/* + * @test + * @summary Test that constant-count vector rotates on AArch64 NEON emit + * RotateLeftV / RotateRightV IR nodes instead of decomposing them. + * @requires vm.compiler2.enabled + * @requires os.arch == "aarch64" & vm.cpu.features ~= ".*simd.*" + * @modules jdk.incubator.vector + * @library /test/lib / + * @run driver compiler.vectorapi.TestVectorRotateConstantAArch64 + */ +public class TestVectorRotateConstantAArch64 { + + static final VectorSpecies L_SPECIES_128 = LongVector.SPECIES_128; + static final VectorSpecies I_SPECIES_128 = IntVector.SPECIES_128; + static final VectorSpecies S_SPECIES_128 = ShortVector.SPECIES_128; + static final VectorSpecies B_SPECIES_128 = ByteVector.SPECIES_128; + + static final int SIZE = 256; + static final int INT_INCR = I_SPECIES_128.length(); + static final int BYTE_INCR = B_SPECIES_128.length(); + static final int LONG_INCR = L_SPECIES_128.length(); + static final int SHORT_INCR = S_SPECIES_128.length(); + static final int INT_BOUND = I_SPECIES_128.loopBound(SIZE); + static final int BYTE_BOUND = B_SPECIES_128.loopBound(SIZE); + static final int LONG_BOUND = L_SPECIES_128.loopBound(SIZE); + static final int SHORT_BOUND = S_SPECIES_128.loopBound(SIZE); + + static int[] iinp = new int[SIZE]; + static int[] iout = new int[SIZE]; + static byte[] binp = new byte[SIZE]; + static byte[] bout = new byte[SIZE]; + static long[] linp = new long[SIZE]; + static long[] lout = new long[SIZE]; + static short[] sinp = new short[SIZE]; + static short[] sout = new short[SIZE]; + + static { + Random r = new Random(42); + for (int i = 0; i < SIZE; i++) { + iinp[i] = r.nextInt(); + linp[i] = r.nextLong(); + binp[i] = (byte) r.nextInt(); + sinp[i] = (short) r.nextInt(); + } + } + + public static void main(String[] args) { + TestFramework.runWithFlags("--add-modules=jdk.incubator.vector"); + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftInt_shift0() { + for (int i = 0; i < INT_BOUND; i += INT_INCR) { + IntVector.fromArray(I_SPECIES_128, iinp, i) + .lanewise(VectorOperators.ROL, 0) + .intoArray(iout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftInt_shift31() { + for (int i = 0; i < INT_BOUND; i += INT_INCR) { + IntVector.fromArray(I_SPECIES_128, iinp, i) + .lanewise(VectorOperators.ROL, 31) + .intoArray(iout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftInt_shift37() { + for (int i = 0; i < INT_BOUND; i += INT_INCR) { + IntVector.fromArray(I_SPECIES_128, iinp, i) + .lanewise(VectorOperators.ROL, 37) + .intoArray(iout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_RIGHT_V, "> 0"}) + public static void testRotateRightInt_shift13() { + for (int i = 0; i < INT_BOUND; i += INT_INCR) { + IntVector.fromArray(I_SPECIES_128, iinp, i) + .lanewise(VectorOperators.ROR, 13) + .intoArray(iout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_RIGHT_V, "> 0"}) + public static void testRotateRightInt_shift31() { + for (int i = 0; i < INT_BOUND; i += INT_INCR) { + IntVector.fromArray(I_SPECIES_128, iinp, i) + .lanewise(VectorOperators.ROR, 31) + .intoArray(iout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftLong_shift0() { + for (int i = 0; i < LONG_BOUND; i += LONG_INCR) { + LongVector.fromArray(L_SPECIES_128, linp, i) + .lanewise(VectorOperators.ROL, 0) + .intoArray(lout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftLong_shift63() { + for (int i = 0; i < LONG_BOUND; i += LONG_INCR) { + LongVector.fromArray(L_SPECIES_128, linp, i) + .lanewise(VectorOperators.ROL, 63) + .intoArray(lout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftLong_shift67() { + for (int i = 0; i < LONG_BOUND; i += LONG_INCR) { + LongVector.fromArray(L_SPECIES_128, linp, i) + .lanewise(VectorOperators.ROL, 67) + .intoArray(lout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_RIGHT_V, "> 0"}) + public static void testRotateRightLong_shift13() { + for (int i = 0; i < LONG_BOUND; i += LONG_INCR) { + LongVector.fromArray(L_SPECIES_128, linp, i) + .lanewise(VectorOperators.ROR, 13) + .intoArray(lout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_RIGHT_V, "> 0"}) + public static void testRotateRightLong_shift63() { + for (int i = 0; i < LONG_BOUND; i += LONG_INCR) { + LongVector.fromArray(L_SPECIES_128, linp, i) + .lanewise(VectorOperators.ROR, 63) + .intoArray(lout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftShort_shift0() { + for (int i = 0; i < SHORT_BOUND; i += SHORT_INCR) { + ShortVector.fromArray(S_SPECIES_128, sinp, i) + .lanewise(VectorOperators.ROL, 0) + .intoArray(sout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftShort_shift7() { + for (int i = 0; i < SHORT_BOUND; i += SHORT_INCR) { + ShortVector.fromArray(S_SPECIES_128, sinp, i) + .lanewise(VectorOperators.ROL, 7) + .intoArray(sout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftShort_shift15() { + for (int i = 0; i < SHORT_BOUND; i += SHORT_INCR) { + ShortVector.fromArray(S_SPECIES_128, sinp, i) + .lanewise(VectorOperators.ROL, 15) + .intoArray(sout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftShort_shift16() { + for (int i = 0; i < SHORT_BOUND; i += SHORT_INCR) { + ShortVector.fromArray(S_SPECIES_128, sinp, i) + .lanewise(VectorOperators.ROL, 16) + .intoArray(sout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftShort_shift19() { + for (int i = 0; i < SHORT_BOUND; i += SHORT_INCR) { + ShortVector.fromArray(S_SPECIES_128, sinp, i) + .lanewise(VectorOperators.ROL, 19) + .intoArray(sout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_RIGHT_V, "> 0"}) + public static void testRotateRightShort_shift5() { + for (int i = 0; i < SHORT_BOUND; i += SHORT_INCR) { + ShortVector.fromArray(S_SPECIES_128, sinp, i) + .lanewise(VectorOperators.ROR, 5) + .intoArray(sout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftByte_shift0() { + for (int i = 0; i < BYTE_BOUND; i += BYTE_INCR) { + ByteVector.fromArray(B_SPECIES_128, binp, i) + .lanewise(VectorOperators.ROL, 0) + .intoArray(bout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftByte_shift4() { + for (int i = 0; i < BYTE_BOUND; i += BYTE_INCR) { + ByteVector.fromArray(B_SPECIES_128, binp, i) + .lanewise(VectorOperators.ROL, 4) + .intoArray(bout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftByte_shift7() { + for (int i = 0; i < BYTE_BOUND; i += BYTE_INCR) { + ByteVector.fromArray(B_SPECIES_128, binp, i) + .lanewise(VectorOperators.ROL, 7) + .intoArray(bout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftByte_shift8() { + for (int i = 0; i < BYTE_BOUND; i += BYTE_INCR) { + ByteVector.fromArray(B_SPECIES_128, binp, i) + .lanewise(VectorOperators.ROL, 8) + .intoArray(bout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_LEFT_V, "> 0"}) + public static void testRotateLeftByte_shift11() { + for (int i = 0; i < BYTE_BOUND; i += BYTE_INCR) { + ByteVector.fromArray(B_SPECIES_128, binp, i) + .lanewise(VectorOperators.ROL, 11) + .intoArray(bout, i); + } + } + + @Test + @IR(counts = {IRNode.ROTATE_RIGHT_V, "> 0"}) + public static void testRotateRightByte_shift3() { + for (int i = 0; i < BYTE_BOUND; i += BYTE_INCR) { + ByteVector.fromArray(B_SPECIES_128, binp, i) + .lanewise(VectorOperators.ROR, 3) + .intoArray(bout, i); + } + } + + @Run(test = { + // Int tests + "testRotateLeftInt_shift0", "testRotateLeftInt_shift31", + "testRotateLeftInt_shift37", "testRotateRightInt_shift13", + "testRotateRightInt_shift31", + + // Long tests + "testRotateLeftLong_shift0", "testRotateLeftLong_shift63", + "testRotateLeftLong_shift67", "testRotateRightLong_shift13", + "testRotateRightLong_shift63", + + // Short tests + "testRotateLeftShort_shift0", "testRotateLeftShort_shift7", + "testRotateLeftShort_shift15", "testRotateLeftShort_shift16", + "testRotateLeftShort_shift19", "testRotateRightShort_shift5", + + // Byte tests + "testRotateLeftByte_shift0", "testRotateLeftByte_shift4", + "testRotateLeftByte_shift7", "testRotateLeftByte_shift8", + "testRotateLeftByte_shift11", "testRotateRightByte_shift3", + }) + public void verifyAllRotates() { + testRotateLeftInt_shift0(); + verifyInt(iout, iinp, 0, true); + + testRotateLeftInt_shift31(); + verifyInt(iout, iinp, 31, true); + + testRotateLeftInt_shift37(); + verifyInt(iout, iinp, 37, true); + + testRotateRightInt_shift13(); + verifyInt(iout, iinp, 13, false); + + testRotateRightInt_shift31(); + verifyInt(iout, iinp, 31, false); + + testRotateLeftLong_shift0(); + verifyLong(lout, linp, 0, true); + + testRotateLeftLong_shift63(); + verifyLong(lout, linp, 63, true); + + testRotateLeftLong_shift67(); + verifyLong(lout, linp, 67, true); + + testRotateRightLong_shift13(); + verifyLong(lout, linp, 13, false); + + testRotateRightLong_shift63(); + verifyLong(lout, linp, 63, false); + + testRotateLeftShort_shift0(); + verifyShort(sout, sinp, 0, true); + + testRotateLeftShort_shift7(); + verifyShort(sout, sinp, 7, true); + + testRotateLeftShort_shift15(); + verifyShort(sout, sinp, 15, true); + + testRotateLeftShort_shift16(); + verifyShort(sout, sinp, 16, true); + + testRotateLeftShort_shift19(); + verifyShort(sout, sinp, 19, true); + + testRotateRightShort_shift5(); + verifyShort(sout, sinp, 5, false); + + testRotateLeftByte_shift0(); + verifyByte(bout, binp, 0, true); + + testRotateLeftByte_shift4(); + verifyByte(bout, binp, 4, true); + + testRotateLeftByte_shift7(); + verifyByte(bout, binp, 7, true); + + testRotateLeftByte_shift8(); + verifyByte(bout, binp, 8, true); + + testRotateLeftByte_shift11(); + verifyByte(bout, binp, 11, true); + + testRotateRightByte_shift3(); + verifyByte(bout, binp, 3, false); + } + + static void verifyInt(int[] dst, int[] src, int shift, boolean left) { + int bound = I_SPECIES_128.loopBound(src.length); + for (int i = 0; i < bound; i++) { + int expected = left ? Integer.rotateLeft(src[i], shift) + : Integer.rotateRight(src[i], shift); + Asserts.assertEquals(dst[i], expected, + "int rotate" + (left ? "Left" : "Right") + " failed at index " + i + + ": src=" + Integer.toHexString(src[i]) + " shift=" + shift); + } + } + + static void verifyLong(long[] dst, long[] src, int shift, boolean left) { + int bound = L_SPECIES_128.loopBound(src.length); + for (int i = 0; i < bound; i++) { + long expected = left ? Long.rotateLeft(src[i], shift) + : Long.rotateRight(src[i], shift); + Asserts.assertEquals(dst[i], expected, + "long rotate" + (left ? "Left" : "Right") + " failed at index " + i + + ": src=" + Long.toHexString(src[i]) + " shift=" + shift); + } + } + + static short rotateShort(short val, int shift, boolean left) { + int n = left ? (shift & 15) : ((-shift) & 15); + int unsigned = val & 0xFFFF; + return (short) ((unsigned << n) | (unsigned >>> (16 - n))); + } + + static void verifyShort(short[] dst, short[] src, int shift, boolean left) { + int bound = S_SPECIES_128.loopBound(src.length); + for (int i = 0; i < bound; i++) { + short expected = rotateShort(src[i], shift, left); + Asserts.assertEquals(dst[i], expected, + "short rotate" + (left ? "Left" : "Right") + " failed at index " + i + + ": src=" + Integer.toHexString(src[i] & 0xFFFF) + " shift=" + shift); + } + } + + static byte rotateByte(byte val, int shift, boolean left) { + int n = left ? (shift & 7) : ((-shift) & 7); + int unsigned = val & 0xFF; + return (byte) ((unsigned << n) | (unsigned >>> (8 - n))); + } + + static void verifyByte(byte[] dst, byte[] src, int shift, boolean left) { + int bound = B_SPECIES_128.loopBound(src.length); + for (int i = 0; i < bound; i++) { + byte expected = rotateByte(src[i], shift, left); + Asserts.assertEquals(dst[i], expected, + "byte rotate" + (left ? "Left" : "Right") + " failed at index " + i + + ": src=" + Integer.toHexString(src[i] & 0xFF) + " shift=" + shift); + } + } +} diff --git a/test/hotspot/jtreg/compiler/vectorapi/VectorMinMaxTransforms.java b/test/hotspot/jtreg/compiler/vectorapi/VectorMinMaxTransforms.java index be3ec322892..532f0d22927 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/VectorMinMaxTransforms.java +++ b/test/hotspot/jtreg/compiler/vectorapi/VectorMinMaxTransforms.java @@ -640,7 +640,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VI, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VI, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testIntMaskedMinIdealSameMask(int index) { IntVector v1 = IntVector.fromArray(I_SPECIES, ia, index); IntVector v2 = IntVector.fromArray(I_SPECIES, ib, index); @@ -669,7 +669,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VI, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VI, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testIntMaskedMaxIdealSameMask(int index) { IntVector v1 = IntVector.fromArray(I_SPECIES, ia, index); IntVector v2 = IntVector.fromArray(I_SPECIES, ib, index); @@ -698,7 +698,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VI, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VI, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testIntMaskedMaxIdealFlippedInputs(int index) { IntVector v1 = IntVector.fromArray(I_SPECIES, ia, index); IntVector v2 = IntVector.fromArray(I_SPECIES, ib, index); @@ -727,7 +727,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VI, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VI, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testIntMaskedMinIdealFlippedInputs(int index) { IntVector v1 = IntVector.fromArray(I_SPECIES, ia, index); IntVector v2 = IntVector.fromArray(I_SPECIES, ib, index); @@ -756,7 +756,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VI, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VI, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testIntMaskedMinIdealDiffMaskMinMax(int index) { IntVector v1 = IntVector.fromArray(I_SPECIES, ia, index); IntVector v2 = IntVector.fromArray(I_SPECIES, ib, index); @@ -786,7 +786,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VI, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VI, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testIntMaskedMinIdealDiffMaskMinMaxSwapped(int index) { IntVector v1 = IntVector.fromArray(I_SPECIES, ia, index); IntVector v2 = IntVector.fromArray(I_SPECIES, ib, index); @@ -814,7 +814,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VI, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VI, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testIntMaskedMinIdealDiffMaskOuter(int index) { IntVector v1 = IntVector.fromArray(I_SPECIES, ia, index); IntVector v2 = IntVector.fromArray(I_SPECIES, ib, index); @@ -843,7 +843,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VI, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VI, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testIntMaskedMinIdealAllDiffMask(int index) { IntVector v1 = IntVector.fromArray(I_SPECIES, ia, index); IntVector v2 = IntVector.fromArray(I_SPECIES, ib, index); @@ -873,7 +873,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VB, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VB, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testByteMaskedMinIdealSameMask(int index) { ByteVector v1 = ByteVector.fromArray(B_SPECIES, ba, index); ByteVector v2 = ByteVector.fromArray(B_SPECIES, bb, index); @@ -902,7 +902,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VB, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VB, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testByteMaskedMaxIdealSameMask(int index) { ByteVector v1 = ByteVector.fromArray(B_SPECIES, ba, index); ByteVector v2 = ByteVector.fromArray(B_SPECIES, bb, index); @@ -931,7 +931,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VB, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VB, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testByteMaskedMaxIdealFlippedInputs(int index) { ByteVector v1 = ByteVector.fromArray(B_SPECIES, ba, index); ByteVector v2 = ByteVector.fromArray(B_SPECIES, bb, index); @@ -960,7 +960,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VB, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VB, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testByteMaskedMinIdealFlippedInputs(int index) { ByteVector v1 = ByteVector.fromArray(B_SPECIES, ba, index); ByteVector v2 = ByteVector.fromArray(B_SPECIES, bb, index); @@ -989,7 +989,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VB, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VB, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testByteMaskedMinIdealDiffMaskMinMax(int index) { ByteVector v1 = ByteVector.fromArray(B_SPECIES, ba, index); ByteVector v2 = ByteVector.fromArray(B_SPECIES, bb, index); @@ -1018,7 +1018,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VB, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VB, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testByteMaskedMinIdealDiffMaskMinMaxSwapped(int index) { ByteVector v1 = ByteVector.fromArray(B_SPECIES, ba, index); ByteVector v2 = ByteVector.fromArray(B_SPECIES, bb, index); @@ -1047,7 +1047,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VB, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VB, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testByteMaskedMinIdealDiffMaskOuter(int index) { ByteVector v1 = ByteVector.fromArray(B_SPECIES, ba, index); ByteVector v2 = ByteVector.fromArray(B_SPECIES, bb, index); @@ -1076,7 +1076,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VB, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VB, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testByteMaskedMinIdealAllDiffMask(int index) { ByteVector v1 = ByteVector.fromArray(B_SPECIES, ba, index); ByteVector v2 = ByteVector.fromArray(B_SPECIES, bb, index); @@ -1106,7 +1106,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VS, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VS, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testShortMaskedMinIdealSameMask(int index) { ShortVector v1 = ShortVector.fromArray(S_SPECIES, sa, index); ShortVector v2 = ShortVector.fromArray(S_SPECIES, sb, index); @@ -1135,7 +1135,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VS, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VS, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testShortMaskedMaxIdealSameMask(int index) { ShortVector v1 = ShortVector.fromArray(S_SPECIES, sa, index); ShortVector v2 = ShortVector.fromArray(S_SPECIES, sb, index); @@ -1164,7 +1164,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VS, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VS, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testShortMaskedMaxIdealFlippedInputs(int index) { ShortVector v1 = ShortVector.fromArray(S_SPECIES, sa, index); ShortVector v2 = ShortVector.fromArray(S_SPECIES, sb, index); @@ -1193,7 +1193,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VS, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VS, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testShortMaskedMinIdealFlippedInputs(int index) { ShortVector v1 = ShortVector.fromArray(S_SPECIES, sa, index); ShortVector v2 = ShortVector.fromArray(S_SPECIES, sb, index); @@ -1222,7 +1222,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VS, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VS, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testShortMaskedMinIdealDiffMaskMinMax(int index) { ShortVector v1 = ShortVector.fromArray(S_SPECIES, sa, index); ShortVector v2 = ShortVector.fromArray(S_SPECIES, sb, index); @@ -1251,7 +1251,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VS, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VS, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testShortMaskedMinIdealDiffMaskMinMaxSwapped(int index) { ShortVector v1 = ShortVector.fromArray(S_SPECIES, sa, index); ShortVector v2 = ShortVector.fromArray(S_SPECIES, sb, index); @@ -1280,7 +1280,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VS, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VS, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testShortMaskedMinIdealDiffMaskOuter(int index) { ShortVector v1 = ShortVector.fromArray(S_SPECIES, sa, index); ShortVector v2 = ShortVector.fromArray(S_SPECIES, sb, index); @@ -1309,7 +1309,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VS, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VS, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512bw", "true", "sve", "true", "rvv", "true"}) public void testShortMaskedMinIdealAllDiffMask(int index) { ShortVector v1 = ShortVector.fromArray(S_SPECIES, sa, index); ShortVector v2 = ShortVector.fromArray(S_SPECIES, sb, index); @@ -1339,7 +1339,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VL, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VL, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testLongMaskedMinIdealSameMask(int index) { LongVector v1 = LongVector.fromArray(L_SPECIES, la, index); LongVector v2 = LongVector.fromArray(L_SPECIES, lb, index); @@ -1368,7 +1368,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VL, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VL, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testLongMaskedMaxIdealSameMask(int index) { LongVector v1 = LongVector.fromArray(L_SPECIES, la, index); LongVector v2 = LongVector.fromArray(L_SPECIES, lb, index); @@ -1397,7 +1397,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VL, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VL, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testLongMaskedMaxIdealFlippedInputs(int index) { LongVector v1 = LongVector.fromArray(L_SPECIES, la, index); LongVector v2 = LongVector.fromArray(L_SPECIES, lb, index); @@ -1426,7 +1426,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VL, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VL, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testLongMaskedMinIdealFlippedInputs(int index) { LongVector v1 = LongVector.fromArray(L_SPECIES, la, index); LongVector v2 = LongVector.fromArray(L_SPECIES, lb, index); @@ -1455,7 +1455,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VL, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VL, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testLongMaskedMinIdealDiffMaskMinMax(int index) { LongVector v1 = LongVector.fromArray(L_SPECIES, la, index); LongVector v2 = LongVector.fromArray(L_SPECIES, lb, index); @@ -1484,7 +1484,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VL, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VL, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testLongMaskedMinIdealDiffMaskMinMaxSwapped(int index) { LongVector v1 = LongVector.fromArray(L_SPECIES, la, index); LongVector v2 = LongVector.fromArray(L_SPECIES, lb, index); @@ -1513,7 +1513,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VL, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VL, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testLongMaskedMinIdealDiffMaskOuter(int index) { LongVector v1 = LongVector.fromArray(L_SPECIES, la, index); LongVector v2 = LongVector.fromArray(L_SPECIES, lb, index); @@ -1542,7 +1542,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VL, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VL, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512f", "true", "sve", "true", "rvv", "true"}) public void testLongMaskedMinIdealAllDiffMask(int index) { LongVector v1 = LongVector.fromArray(L_SPECIES, la, index); LongVector v2 = LongVector.fromArray(L_SPECIES, lb, index); @@ -1572,7 +1572,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VF, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VF, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testFloatMaskedMinIdealSameMask(int index) { FloatVector v1 = FloatVector.fromArray(F_SPECIES, fa, index); FloatVector v2 = FloatVector.fromArray(F_SPECIES, fb, index); @@ -1601,7 +1601,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VF, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VF, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testFloatMaskedMaxIdealSameMask(int index) { FloatVector v1 = FloatVector.fromArray(F_SPECIES, fa, index); FloatVector v2 = FloatVector.fromArray(F_SPECIES, fb, index); @@ -1630,7 +1630,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VF, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VF, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testFloatMaskedMaxIdealFlippedInputs(int index) { FloatVector v1 = FloatVector.fromArray(F_SPECIES, fa, index); FloatVector v2 = FloatVector.fromArray(F_SPECIES, fb, index); @@ -1659,7 +1659,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VF, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VF, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testFloatMaskedMinIdealFlippedInputs(int index) { FloatVector v1 = FloatVector.fromArray(F_SPECIES, fa, index); FloatVector v2 = FloatVector.fromArray(F_SPECIES, fb, index); @@ -1688,7 +1688,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VF, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VF, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testFloatMaskedMinIdealDiffMaskMinMax(int index) { FloatVector v1 = FloatVector.fromArray(F_SPECIES, fa, index); FloatVector v2 = FloatVector.fromArray(F_SPECIES, fb, index); @@ -1717,7 +1717,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VF, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VF, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testFloatMaskedMinIdealDiffMaskMinMaxSwapped(int index) { FloatVector v1 = FloatVector.fromArray(F_SPECIES, fa, index); FloatVector v2 = FloatVector.fromArray(F_SPECIES, fb, index); @@ -1746,7 +1746,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VF, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VF, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testFloatMaskedMinIdealDiffMaskOuter(int index) { FloatVector v1 = FloatVector.fromArray(F_SPECIES, fa, index); FloatVector v2 = FloatVector.fromArray(F_SPECIES, fb, index); @@ -1775,7 +1775,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VF, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VF, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testFloatMaskedMinIdealAllDiffMask(int index) { FloatVector v1 = FloatVector.fromArray(F_SPECIES, fa, index); FloatVector v2 = FloatVector.fromArray(F_SPECIES, fb, index); @@ -1805,7 +1805,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VD, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VD, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testDoubleMaskedMinIdealSameMask(int index) { DoubleVector v1 = DoubleVector.fromArray(D_SPECIES, da, index); DoubleVector v2 = DoubleVector.fromArray(D_SPECIES, db, index); @@ -1834,7 +1834,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VD, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VD, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testDoubleMaskedMaxIdealSameMask(int index) { DoubleVector v1 = DoubleVector.fromArray(D_SPECIES, da, index); DoubleVector v2 = DoubleVector.fromArray(D_SPECIES, db, index); @@ -1863,7 +1863,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VD, IRNode.VECTOR_SIZE_ANY, " 0 ", IRNode.MAX_VD, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testDoubleMaskedMaxIdealFlippedInputs(int index) { DoubleVector v1 = DoubleVector.fromArray(D_SPECIES, da, index); DoubleVector v2 = DoubleVector.fromArray(D_SPECIES, db, index); @@ -1892,7 +1892,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VD, IRNode.VECTOR_SIZE_ANY, " 1 ", IRNode.MAX_VD, IRNode.VECTOR_SIZE_ANY, " 0 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testDoubleMaskedMinIdealFlippedInputs(int index) { DoubleVector v1 = DoubleVector.fromArray(D_SPECIES, da, index); DoubleVector v2 = DoubleVector.fromArray(D_SPECIES, db, index); @@ -1921,7 +1921,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VD, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VD, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testDoubleMaskedMinIdealDiffMaskMinMax(int index) { DoubleVector v1 = DoubleVector.fromArray(D_SPECIES, da, index); DoubleVector v2 = DoubleVector.fromArray(D_SPECIES, db, index); @@ -1950,7 +1950,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VD, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VD, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testDoubleMaskedMinIdealDiffMaskMinMaxSwapped(int index) { DoubleVector v1 = DoubleVector.fromArray(D_SPECIES, da, index); DoubleVector v2 = DoubleVector.fromArray(D_SPECIES, db, index); @@ -1979,7 +1979,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VD, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VD, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testDoubleMaskedMinIdealDiffMaskOuter(int index) { DoubleVector v1 = DoubleVector.fromArray(D_SPECIES, da, index); DoubleVector v2 = DoubleVector.fromArray(D_SPECIES, db, index); @@ -2008,7 +2008,7 @@ public class VectorMinMaxTransforms { @Test @IR(counts = { IRNode.MIN_VD, IRNode.VECTOR_SIZE_ANY, " 2 ", IRNode.MAX_VD, IRNode.VECTOR_SIZE_ANY, " 1 " }, - applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx10_2", "true", "sve", "true", "rvv", "true"}) public void testDoubleMaskedMinIdealAllDiffMask(int index) { DoubleVector v1 = DoubleVector.fromArray(D_SPECIES, da, index); DoubleVector v2 = DoubleVector.fromArray(D_SPECIES, db, index); diff --git a/test/hotspot/jtreg/compiler/vectorapi/VectorStoreMaskIdentityTest.java b/test/hotspot/jtreg/compiler/vectorapi/VectorStoreMaskIdentityTest.java index c019f116373..527041b58a6 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/VectorStoreMaskIdentityTest.java +++ b/test/hotspot/jtreg/compiler/vectorapi/VectorStoreMaskIdentityTest.java @@ -73,7 +73,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "asimd", "true", "avx", "true" }, + applyIfCPUFeatureOr = { "asimd", "true", "avx", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", ">= 16" }) public static void testVectorMaskStoreIdentityByte() { VectorMask mask_byte_64 = VectorMask.fromArray(B64, mask_in, 0); @@ -93,7 +93,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "sve", "true", "avx2", "true" }, + applyIfCPUFeatureOr = { "sve", "true", "avx2", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", "> 16" }) public static void testVectorMaskStoreIdentityByte256() { VectorMask mask_byte_64 = VectorMask.fromArray(B64, mask_in, 0); @@ -113,7 +113,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "asimd", "true", "avx", "true" }, + applyIfCPUFeatureOr = { "asimd", "true", "avx", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", ">= 16" }) public static void testVectorMaskStoreIdentityShort() { VectorMask mask_short_128 = VectorMask.fromArray(S128, mask_in, 0); @@ -133,7 +133,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "sve", "true", "avx2", "true" }, + applyIfCPUFeatureOr = { "sve", "true", "avx2", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", "> 16" }) public static void testVectorMaskStoreIdentityShort256() { VectorMask mask_short_128 = VectorMask.fromArray(S128, mask_in, 0); @@ -153,7 +153,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "asimd", "true", "avx", "true" }, + applyIfCPUFeatureOr = { "asimd", "true", "avx", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", ">= 16" }) public static void testVectorMaskStoreIdentityInt() { VectorMask mask_int_128 = VectorMask.fromArray(I128, mask_in, 0); @@ -173,7 +173,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "sve", "true", "avx2", "true" }, + applyIfCPUFeatureOr = { "sve", "true", "avx2", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", "> 16" }) public static void testVectorMaskStoreIdentityInt256() { VectorMask mask_int_128 = VectorMask.fromArray(I128, mask_in, 0); @@ -193,7 +193,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "asimd", "true" }, + applyIfCPUFeatureOr = { "asimd", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", ">= 16" }) public static void testVectorMaskStoreIdentityLong() { VectorMask mask_long_128 = VectorMask.fromArray(L128, mask_in, 0); @@ -213,7 +213,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "sve", "true", "avx2", "true" }, + applyIfCPUFeatureOr = { "sve", "true", "avx2", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", "> 16" }) public static void testVectorMaskStoreIdentityLong256() { VectorMask mask_long_256 = VectorMask.fromArray(L256, mask_in, 0); @@ -233,7 +233,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "asimd", "true", "avx", "true" }, + applyIfCPUFeatureOr = { "asimd", "true", "avx", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", ">= 16" }) public static void testVectorMaskStoreIdentityFloat() { VectorMask mask_float_128 = VectorMask.fromArray(F128, mask_in, 0); @@ -253,7 +253,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "sve", "true", "avx2", "true" }, + applyIfCPUFeatureOr = { "sve", "true", "avx2", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", "> 16" }) public static void testVectorMaskStoreIdentityFloat256() { VectorMask mask_float_128 = VectorMask.fromArray(F128, mask_in, 0); @@ -273,7 +273,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "asimd", "true" }, + applyIfCPUFeatureOr = { "asimd", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", ">= 16" }) public static void testVectorMaskStoreIdentityDouble() { VectorMask mask_double_128 = VectorMask.fromArray(D128, mask_in, 0); @@ -293,7 +293,7 @@ public class VectorStoreMaskIdentityTest { IRNode.VECTOR_LOAD_MASK, "= 0", IRNode.VECTOR_STORE_MASK, "= 0", IRNode.VECTOR_MASK_CAST, "= 0" }, - applyIfCPUFeatureOr = { "sve", "true", "avx2", "true" }, + applyIfCPUFeatureOr = { "sve", "true", "avx2", "true", "rvv", "true" }, applyIf = { "MaxVectorSize", "> 16" }) public static void testVectorMaskStoreIdentityDouble256() { VectorMask mask_double_256 = VectorMask.fromArray(D256, mask_in, 0); @@ -314,4 +314,4 @@ public class VectorStoreMaskIdentityTest { .addFlags("--add-modules=jdk.incubator.vector") .start(); } -} \ No newline at end of file +} diff --git a/test/hotspot/jtreg/compiler/vectorization/TestFloat16VectorOperations.java b/test/hotspot/jtreg/compiler/vectorization/TestFloat16VectorOperations.java index 929a70f304a..00a556cff8f 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestFloat16VectorOperations.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestFloat16VectorOperations.java @@ -24,7 +24,7 @@ /** * @test -* @bug 8346236 +* @bug 8346236 8381617 * @summary Auto-vectorization support for various Float16 operations * @modules jdk.incubator.vector * @library /test/lib / @@ -96,7 +96,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.ADD_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.ADD_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorAddFloat16() { @@ -117,7 +117,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.SUB_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.SUB_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorSubFloat16() { @@ -138,7 +138,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.MUL_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.MUL_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorMulFloat16() { @@ -158,7 +158,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.DIV_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.DIV_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorDivFloat16() { @@ -178,7 +178,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.MIN_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.MIN_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorMinFloat16() { @@ -198,7 +198,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.MAX_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.MAX_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorMaxFloat16() { @@ -218,7 +218,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.SQRT_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.SQRT_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorSqrtFloat16() { @@ -238,7 +238,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.FMA_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.FMA_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorFmaFloat16() { @@ -260,7 +260,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.FMA_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.FMA_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorFmaFloat16ScalarMixedConstants() { @@ -283,7 +283,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.FMA_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.FMA_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorFmaFloat16MixedConstants() { @@ -306,7 +306,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.FMA_VHF, " 0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.FMA_VHF, " 0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorFmaFloat16AllConstants() { @@ -333,7 +333,7 @@ public class TestFloat16VectorOperations { @Test @Warmup(50) @IR(counts = {IRNode.ADD_VHF, " >0 "}, - applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true", "sve", "true"}) + applyIfCPUFeatureOr = {"avx512_fp16", "true", "zvfh", "true"}) @IR(counts = {IRNode.ADD_VHF, " >0 "}, applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}) public void vectorAddConstInputFloat16() { diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java index a0434411da7..e2d28cbf083 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java @@ -80,6 +80,9 @@ public class ArrayShiftOpTest extends VectorizationTestRunner { counts = {IRNode.STORE_VECTOR, ">0"}) @IR(applyIfCPUFeatureOr = {"avx512f", "true", "zvbb", "true"}, counts = {IRNode.ROTATE_RIGHT_V, ">0"}) + @IR(applyIfCPUFeature = {"asimd", "true"}, + applyIf = {"MaxVectorSize", "<= 16"}, + counts = {IRNode.ROTATE_RIGHT_V, ">0"}) public int[] intCombinedRotateShift() { int[] res = new int[SIZE]; for (int i = 0; i < SIZE; i++) { @@ -109,6 +112,9 @@ public class ArrayShiftOpTest extends VectorizationTestRunner { counts = {IRNode.STORE_VECTOR, ">0"}) @IR(applyIfCPUFeatureOr = {"avx512f", "true", "zvbb", "true"}, counts = {IRNode.ROTATE_RIGHT_V, ">0"}) + @IR(applyIfCPUFeature = {"asimd", "true"}, + applyIf = {"MaxVectorSize", "<= 16"}, + counts = {IRNode.ROTATE_RIGHT_V, ">0"}) public long[] longCombinedRotateShift() { long[] res = new long[SIZE]; for (int i = 0; i < SIZE; i++) { diff --git a/test/hotspot/jtreg/containers/docker/TestLimitsUpdating.java b/test/hotspot/jtreg/containers/docker/TestLimitsUpdating.java index 32436cec1d7..68afe2b2db3 100644 --- a/test/hotspot/jtreg/containers/docker/TestLimitsUpdating.java +++ b/test/hotspot/jtreg/containers/docker/TestLimitsUpdating.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2023, Red Hat, Inc. - * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2026, Oracle and/or its affiliates. All rights reserved. * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -49,8 +49,12 @@ import jdk.test.lib.containers.docker.Common; import jdk.test.lib.containers.docker.DockerRunOptions; import jdk.test.lib.containers.docker.DockerTestUtils; import jdk.test.lib.process.OutputAnalyzer; +import jtreg.SkippedException; public class TestLimitsUpdating { + private static final int CPU_PERIOD = 100_000; + private static final int INITIAL_CPU_COUNT = 1; + private static final int UPDATED_CPU_COUNT = 2; private static final String TARGET_CONTAINER = "limitsUpdatingHS_" + Runtime.getRuntime().version().major(); private static final String imageName = Common.imageName("limitsUpdating"); @@ -68,6 +72,10 @@ public class TestLimitsUpdating { } private static void testLimitUpdates() throws Exception { + if (Runtime.getRuntime().availableProcessors() < UPDATED_CPU_COUNT) { + throw new SkippedException("Need at least " + UPDATED_CPU_COUNT + + " available CPUs to test CPU limit updates"); + } File sharedtmpdir = new File("test-sharedtmp"); File flag = new File(sharedtmpdir, "limitsUpdated"); // shared with LimitUpdateChecker File started = new File(sharedtmpdir, "started"); // shared with LimitUpdateChecker @@ -77,8 +85,8 @@ public class TestLimitsUpdating { DockerRunOptions opts = new DockerRunOptions(imageName, "/jdk/bin/java", "LimitUpdateChecker"); opts.addDockerOpts("--volume", Utils.TEST_CLASSES + ":/test-classes/"); opts.addDockerOpts("--volume", sharedtmpdir.getAbsolutePath() + ":/tmp"); - opts.addDockerOpts("--cpu-period", "100000"); - opts.addDockerOpts("--cpu-quota", "200000"); + opts.addDockerOpts("--cpu-period", Integer.toString(CPU_PERIOD)); + opts.addDockerOpts("--cpu-quota", Integer.toString(INITIAL_CPU_COUNT * CPU_PERIOD)); opts.addDockerOpts("--memory", "500m"); opts.addDockerOpts("--memory-swap", "500m"); opts.addDockerOpts("--name", TARGET_CONTAINER); @@ -103,7 +111,7 @@ public class TestLimitsUpdating { Thread.sleep(100); } - final List containerCommand = getContainerUpdate(300_000, 100_000, "300m"); + final List containerCommand = getContainerUpdate(UPDATED_CPU_COUNT * CPU_PERIOD, CPU_PERIOD, "300m"); // Run the update command so as to increase resources once the container signaled it has started. Thread t2 = new Thread() { public void run() { @@ -126,8 +134,8 @@ public class TestLimitsUpdating { // Do assertions based on the output in target container OutputAnalyzer targetOut = out[0]; - DockerTestUtils.shouldMatchWithValue(targetOut, "active_processor_count", "2"); // initial value - DockerTestUtils.shouldMatchWithValue(targetOut, "active_processor_count", "3"); // updated value + DockerTestUtils.shouldMatchWithValue(targetOut, "active_processor_count", "1"); // initial value + DockerTestUtils.shouldMatchWithValue(targetOut, "active_processor_count", "2"); // updated value DockerTestUtils.shouldMatchWithValue(targetOut, "memory_limit", "512000 kB"); // initial value DockerTestUtils.shouldMatchWithValue(targetOut, "memory_and_swap_limit", "512000 kB"); // initial value DockerTestUtils.shouldMatchWithValue(targetOut, "memory_limit", "307200 kB"); // updated value diff --git a/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java b/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java index 35b7bf993f7..016bb5bf592 100644 --- a/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java +++ b/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java @@ -62,66 +62,48 @@ public class TestMemoryWithSubgroups { Common.prepareWhiteBox(); DockerTestUtils.buildJdkContainerImage(imageName); - if ("cgroupv1".equals(metrics.getProvider())) { - try { - testMemoryLimitSubgroupV1("200m", "100m", "104857600", false); - testMemoryLimitSubgroupV1("1g", "500m", "524288000", false); - testMemoryLimitSubgroupV1("200m", "100m", "104857600", true); - testMemoryLimitSubgroupV1("1g", "500m", "524288000", true); - } finally { - DockerTestUtils.removeDockerImage(imageName); - } - } else if ("cgroupv2".equals(metrics.getProvider())) { - try { - testMemoryLimitSubgroupV2("200m", "100m", "104857600", false); - testMemoryLimitSubgroupV2("1g", "500m", "524288000", false); - testMemoryLimitSubgroupV2("200m", "100m", "104857600", true); - testMemoryLimitSubgroupV2("1g", "500m", "524288000", true); - } finally { - DockerTestUtils.removeDockerImage(imageName); - } - } else { + String provider = metrics.getProvider(); + if (!"cgroupv1".equals(provider) && !"cgroupv2".equals(provider)) { throw new SkippedException("Metrics are from neither cgroup v1 nor v2, skipped for now."); } + + try { + testMemoryLimitSubgroup(provider, "200m", "100m", "104857600", false); + testMemoryLimitSubgroup(provider, "1g", "500m", "524288000", false); + testMemoryLimitSubgroup(provider, "200m", "100m", "104857600", true); + testMemoryLimitSubgroup(provider, "1g", "500m", "524288000", true); + } finally { + DockerTestUtils.removeDockerImage(imageName); + } } - private static void testMemoryLimitSubgroupV1(String containerMemorySize, String valueToSet, String expectedValue, boolean privateNamespace) + private static void testMemoryLimitSubgroup(String cgroupVersion, String containerMemorySize, + String valueToSet, String expectedValue, boolean privateNamespace) throws Exception { - Common.logNewTestCase("Cgroup V1 subgroup memory limit: " + valueToSet); + final String upperVersion = "cgroupv1".equals(cgroupVersion) ? "V1" : "V2"; + Common.logNewTestCase("Cgroup " + upperVersion + " subgroup memory limit: " + valueToSet); DockerRunOptions opts = new DockerRunOptions(imageName, "sh", "-c"); opts.javaOpts = new ArrayList<>(); opts.appendTestJavaOptions = false; opts.addDockerOpts("--privileged") + .addDockerOpts("--user", "root") .addDockerOpts("--cgroupns=" + (privateNamespace ? "private" : "host")) .addDockerOpts("--memory", containerMemorySize); - opts.addClassOptions("mkdir -p /sys/fs/cgroup/memory/test ; " + - "echo " + valueToSet + " > /sys/fs/cgroup/memory/test/memory.limit_in_bytes ; " + - "echo $$ > /sys/fs/cgroup/memory/test/cgroup.procs ; " + - "/jdk/bin/java -Xlog:os+container=trace -version"); - - Common.run(opts) - .shouldMatch("Lowest limit was:.*" + expectedValue); - } - - private static void testMemoryLimitSubgroupV2(String containerMemorySize, String valueToSet, String expectedValue, boolean privateNamespace) - throws Exception { - - Common.logNewTestCase("Cgroup V2 subgroup memory limit: " + valueToSet); - - DockerRunOptions opts = new DockerRunOptions(imageName, "sh", "-c"); - opts.javaOpts = new ArrayList<>(); - opts.appendTestJavaOptions = false; - opts.addDockerOpts("--privileged") - .addDockerOpts("--cgroupns=" + (privateNamespace ? "private" : "host")) - .addDockerOpts("--memory", containerMemorySize); - opts.addClassOptions("mkdir -p /sys/fs/cgroup/memory/test ; " + - "echo $$ > /sys/fs/cgroup/memory/test/cgroup.procs ; " + - "echo '+memory' > /sys/fs/cgroup/cgroup.subtree_control ; " + - "echo '+memory' > /sys/fs/cgroup/memory/cgroup.subtree_control ; " + - "echo " + valueToSet + " > /sys/fs/cgroup/memory/test/memory.max ; " + - "/jdk/bin/java -Xlog:os+container=trace -version"); + if ("cgroupv1".equals(cgroupVersion)) { + opts.addClassOptions("mkdir -p /sys/fs/cgroup/memory/test ; " + + "echo " + valueToSet + " > /sys/fs/cgroup/memory/test/memory.limit_in_bytes ; " + + "echo $$ > /sys/fs/cgroup/memory/test/cgroup.procs ; " + + "/jdk/bin/java -Xlog:os+container=trace -version"); + } else { + opts.addClassOptions("mkdir -p /sys/fs/cgroup/memory/test ; " + + "echo $$ > /sys/fs/cgroup/memory/test/cgroup.procs ; " + + "echo '+memory' > /sys/fs/cgroup/cgroup.subtree_control ; " + + "echo '+memory' > /sys/fs/cgroup/memory/cgroup.subtree_control ; " + + "echo " + valueToSet + " > /sys/fs/cgroup/memory/test/memory.max ; " + + "/jdk/bin/java -Xlog:os+container=trace -version"); + } Common.run(opts) .shouldMatch("Lowest limit was:.*" + expectedValue); diff --git a/test/hotspot/jtreg/containers/systemd/SystemdContainerDetectionTest.java b/test/hotspot/jtreg/containers/systemd/SystemdContainerDetectionTest.java new file mode 100644 index 00000000000..266e9a00309 --- /dev/null +++ b/test/hotspot/jtreg/containers/systemd/SystemdContainerDetectionTest.java @@ -0,0 +1,121 @@ +/* + * 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.internal.platform.Metrics; +import jdk.test.lib.containers.systemd.SystemdRunOptions; +import jdk.test.lib.containers.systemd.SystemdTestUtils; +import jdk.test.lib.process.OutputAnalyzer; +import jtreg.SkippedException; + +/* + * @test + * @summary Container detection test for a JDK inside a systemd slice. + * @requires systemd.support + * @library /test/lib + * @modules java.base/jdk.internal.platform + * @build HelloSystemd jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar whitebox.jar jdk.test.whitebox.WhiteBox + * @run main/othervm SystemdContainerDetectionTest + */ +public class SystemdContainerDetectionTest { + + private static final int MB = 1024 * 1024; + private static final int EXPECTED_LIMIT_MB = 512; + + public static void main(String[] args) throws Exception { + Metrics metrics = Metrics.systemMetrics(); + + testWithoutLimits(); + testCpuLimit(); + testMemoryLimit(); + if ("cgroupv2".equals(metrics.getProvider())) { + // MemoryHigh/MemoryLow based detection requires cgroup v2 + testMemoryLow(); + testMemoryHigh(); + } + } + + private static void testWithoutLimits() throws Exception { + OutputAnalyzer out = runWithLimits("infinity", null, null, null); + assertContainerized(out, false); + } + + private static void testCpuLimit() throws Exception { + OutputAnalyzer out = runWithLimits("infinity", null, null, "50%"); + assertContainerized(out, true); + out.shouldContain("OSContainer::active_processor_count:"); + } + + private static void testMemoryLimit() throws Exception { + OutputAnalyzer out = runWithLimits(String.format("%dM", EXPECTED_LIMIT_MB), null, null, null); + assertContainerized(out, true); + out.shouldContain(String.format("Memory Limit is: %d", EXPECTED_LIMIT_MB * MB)); + } + + private static void testMemoryLow() throws Exception { + OutputAnalyzer out = runWithLimits("infinity", String.format("%dM", EXPECTED_LIMIT_MB), null, null); + assertContainerized(out, true); + out.shouldContain(String.format("Memory Soft Limit is: %d", EXPECTED_LIMIT_MB * MB)); + } + + private static void testMemoryHigh() throws Exception { + OutputAnalyzer out = runWithLimits("infinity", null, String.format("%dM", EXPECTED_LIMIT_MB), null); + assertContainerized(out, true); + out.shouldContain(String.format("Memory Throttle Limit is: %d", EXPECTED_LIMIT_MB * MB)); + } + + private static void assertContainerized(OutputAnalyzer out, boolean expected) { + try { + out.shouldHaveExitValue(0) + .shouldContain("Hello Systemd") + .shouldContain(String.format("OSContainer::init: is_containerized() = %b", expected)); + } catch (RuntimeException e) { + // CPU/memory delegation needs to be enabled when run as user on cg v2 + if (SystemdTestUtils.RUN_AS_USER) { + String hint = "When run as user on cg v2 cpu/memory delegation needs to be configured!"; + throw new SkippedException(hint); + } + throw e; + } + } + + private static OutputAnalyzer runWithLimits(String memoryLimit, + String memoryLow, + String memoryHigh, + String cpuLimit) throws Exception { + SystemdRunOptions opts = SystemdTestUtils.newOpts("HelloSystemd"); + opts.memoryLimit(memoryLimit); + if (memoryHigh != null) { + opts.memoryHigh(memoryHigh); + } + if (memoryLow != null) { + opts.memoryLow(memoryLow); + } + if (cpuLimit != null) { + opts.cpuLimit(cpuLimit); + } + return SystemdTestUtils.buildAndRunSystemdJava(opts); + } + +} diff --git a/test/hotspot/jtreg/gc/arguments/TestAggressiveHeap.java b/test/hotspot/jtreg/gc/arguments/TestAggressiveHeap.java deleted file mode 100644 index 758747d451a..00000000000 --- a/test/hotspot/jtreg/gc/arguments/TestAggressiveHeap.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2017, 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. - */ - -package gc.arguments; - -/* - * @test TestAggressiveHeap - * @bug 8179084 - * @requires vm.gc.Parallel - * @summary Test argument processing for -XX:+AggressiveHeap. - * @library /test/lib - * @library / - * @modules java.management - * @run driver gc.arguments.TestAggressiveHeap - */ - -import java.lang.management.ManagementFactory; -import javax.management.MBeanServer; -import javax.management.ObjectName; - -import jdk.test.lib.process.OutputAnalyzer; -import jtreg.SkippedException; - -public class TestAggressiveHeap { - - public static void main(String args[]) throws Exception { - if (canUseAggressiveHeapOption()) { - testFlag(); - } - } - - // Note: Not a normal boolean flag; -XX:-AggressiveHeap is invalid. - private static final String option = "-XX:+AggressiveHeap"; - - // Option requires at least 256M, else error during option processing. - private static final long minMemory = 256 * 1024 * 1024; - - // Setting the heap to half of the physical memory is not suitable for - // a test environment with many tests running concurrently, setting to - // half of the required size instead. - private static final String heapSizeOption = "-Xmx128M"; - - // bool UseParallelGC = true {product} {command line} - private static final String parallelGCPattern = - " *bool +UseParallelGC *= *true +\\{product\\} *\\{command line\\}"; - - private static void testFlag() throws Exception { - OutputAnalyzer output = GCArguments.executeTestJava( - option, heapSizeOption, "-XX:+PrintFlagsFinal", "-version"); - - output.shouldHaveExitValue(0); - - String value = output.firstMatch(parallelGCPattern); - if (value == null) { - throw new RuntimeException( - option + " didn't set UseParallelGC as if from command line"); - } - } - - private static boolean haveRequiredMemory() throws Exception { - MBeanServer server = ManagementFactory.getPlatformMBeanServer(); - ObjectName os = new ObjectName("java.lang", "type", "OperatingSystem"); - Object attr = server.getAttribute(os, "TotalPhysicalMemorySize"); - String value = attr.toString(); - long memory = Long.parseLong(value); - return memory >= minMemory; - } - - private static boolean canUseAggressiveHeapOption() throws Exception { - if (!haveRequiredMemory()) { - throw new SkippedException("Skipping test of " + option + " : insufficient memory"); - } - return true; - } -} diff --git a/test/hotspot/jtreg/gc/g1/TestHumongousAllocConcurrentStart.java b/test/hotspot/jtreg/gc/g1/TestHumongousAllocConcurrentStart.java index 0d932ef50d4..5ee027d3648 100644 --- a/test/hotspot/jtreg/gc/g1/TestHumongousAllocConcurrentStart.java +++ b/test/hotspot/jtreg/gc/g1/TestHumongousAllocConcurrentStart.java @@ -41,9 +41,9 @@ import jdk.test.lib.process.ProcessTools; public class TestHumongousAllocConcurrentStart { // Heap sizes < 224 MB are increased to 224 MB if vm_page_size == 64K to // fulfill alignment constraints. - private static final int heapSize = 224; // MB - private static final int heapRegionSize = 1; // MB - private static final int initiatingHeapOccupancyPercent = 50; // % + private static final int heapSize = 224; // MB + private static final int heapRegionSize = 1; // MB + private static final int G1IHOP = 50; // % public static void main(String[] args) throws Exception { OutputAnalyzer output = ProcessTools.executeLimitedTestJava( @@ -51,7 +51,7 @@ public class TestHumongousAllocConcurrentStart { "-Xms" + heapSize + "m", "-Xmx" + heapSize + "m", "-XX:G1HeapRegionSize=" + heapRegionSize + "m", - "-XX:InitiatingHeapOccupancyPercent=" + initiatingHeapOccupancyPercent, + "-XX:G1IHOP=" + G1IHOP, "-Xlog:gc", HumongousObjectAllocator.class.getName()); @@ -70,7 +70,7 @@ public class TestHumongousAllocConcurrentStart { // Number of objects to allocate to go above IHOP final int humongousObjectAllocations = - (int)((heapSize * initiatingHeapOccupancyPercent / 100.0) / heapRegionSize) + 1; + (int)((heapSize * G1IHOP / 100.0) / heapRegionSize) + 1; // Allocate for (int i = 1; i <= humongousObjectAllocations; i++) { diff --git a/test/hotspot/jtreg/gc/g1/TestHumongousCodeCacheRoots.java b/test/hotspot/jtreg/gc/g1/TestHumongousCodeCacheRoots.java index b12fd50ae69..fb5cc553e62 100644 --- a/test/hotspot/jtreg/gc/g1/TestHumongousCodeCacheRoots.java +++ b/test/hotspot/jtreg/gc/g1/TestHumongousCodeCacheRoots.java @@ -115,7 +115,7 @@ public class TestHumongousCodeCacheRoots { final String[] baseArguments = new String[] { "-XX:+UseG1GC", "-XX:G1HeapRegionSize=1M", "-Xmx100M", // make sure we get a humongous region "-XX:+UnlockDiagnosticVMOptions", - "-XX:InitiatingHeapOccupancyPercent=1", // strong code root marking + "-XX:G1IHOP=1", // strong code root marking "-XX:+G1VerifyHeapRegionCodeRoots", "-XX:+VerifyAfterGC", // make sure that verification is run }; diff --git a/test/hotspot/jtreg/gc/g1/TestHumongousConcurrentStartUndo.java b/test/hotspot/jtreg/gc/g1/TestHumongousConcurrentStartUndo.java index b4302111b8c..e5c60f96732 100644 --- a/test/hotspot/jtreg/gc/g1/TestHumongousConcurrentStartUndo.java +++ b/test/hotspot/jtreg/gc/g1/TestHumongousConcurrentStartUndo.java @@ -49,10 +49,10 @@ import java.lang.ref.Reference; public class TestHumongousConcurrentStartUndo { // Heap sizes < 224 MB are increased to 224 MB if vm_page_size == 64K to // fulfill alignment constraints. - private static final int HeapSize = 224; // MB - private static final int HeapRegionSize = 1; // MB - private static final int InitiatingHeapOccupancyPercent = 50; // % - private static final int YoungSize = HeapSize / 8; + private static final int HeapSize = 224; // MB + private static final int HeapRegionSize = 1; // MB + private static final int G1IHOP = 50; // % + private static final int YoungSize = HeapSize / 8; public static void main(String[] args) throws Exception { OutputAnalyzer output = ProcessTools.executeLimitedTestJava( @@ -62,7 +62,7 @@ public class TestHumongousConcurrentStartUndo { "-Xmx" + HeapSize + "m", "-Xmn" + YoungSize + "m", "-XX:G1HeapRegionSize=" + HeapRegionSize + "m", - "-XX:InitiatingHeapOccupancyPercent=" + InitiatingHeapOccupancyPercent, + "-XX:G1IHOP=" + G1IHOP, "-XX:-G1UseAdaptiveIHOP", "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", diff --git a/test/hotspot/jtreg/gc/g1/TestPrintRegionRememberedSetInfo.java b/test/hotspot/jtreg/gc/g1/TestPrintRegionRememberedSetInfo.java index a13cf1fa013..46e8c051832 100644 --- a/test/hotspot/jtreg/gc/g1/TestPrintRegionRememberedSetInfo.java +++ b/test/hotspot/jtreg/gc/g1/TestPrintRegionRememberedSetInfo.java @@ -61,7 +61,7 @@ public class TestPrintRegionRememberedSetInfo { "-XX:+ExplicitGCInvokesConcurrent", "-XX:+UnlockDiagnosticVMOptions", "-XX:G1HeapRegionSize=1M", - "-XX:InitiatingHeapOccupancyPercent=0", + "-XX:G1IHOP=0", }; finalargs.addAll(Arrays.asList(defaultArgs)); diff --git a/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java b/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java index 65b532e43d4..4b7daa0df4d 100644 --- a/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java +++ b/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java @@ -63,7 +63,7 @@ public class TestRemsetLoggingTools { "-Xms20m", "-Xmx20m", "-XX:ParallelGCThreads=1", - "-XX:InitiatingHeapOccupancyPercent=100", // we don't want the additional GCs due to marking + "-XX:G1IHOP=100", // we don't want the additional GCs due to marking "-XX:+UnlockDiagnosticVMOptions", "-XX:G1HeapRegionSize=1M", }; diff --git a/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java b/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java index 710236e1aae..fb04f54f641 100644 --- a/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java +++ b/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java @@ -166,6 +166,7 @@ public class TestVerifyGCType { "-Xmx16m", "-XX:ParallelGCThreads=1", "-XX:G1HeapWastePercent=1", + "-XX:+G1VerifyBitmaps", "-XX:+VerifyBeforeGC", "-XX:+VerifyAfterGC", "-XX:+VerifyDuringGC"}); diff --git a/test/hotspot/jtreg/gc/g1/humongousObjects/TestHeapCounters.java b/test/hotspot/jtreg/gc/g1/humongousObjects/TestHeapCounters.java index 7deacca8577..36f06685a72 100644 --- a/test/hotspot/jtreg/gc/g1/humongousObjects/TestHeapCounters.java +++ b/test/hotspot/jtreg/gc/g1/humongousObjects/TestHeapCounters.java @@ -45,13 +45,13 @@ import java.util.List; * * @run main/othervm -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xmx128m -Xms128m - * -XX:G1HeapRegionSize=1M -XX:InitiatingHeapOccupancyPercent=100 -XX:-G1UseAdaptiveIHOP + * -XX:G1HeapRegionSize=1M -XX:G1IHOP=100 -XX:-G1UseAdaptiveIHOP * -Xlog:gc -Xlog:gc:file=TestHeapCountersRuntime.gc.log * gc.g1.humongousObjects.TestHeapCounters RUNTIME_COUNTER * * @run main/othervm -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xmx128m -Xms128m - * -XX:G1HeapRegionSize=1M -XX:InitiatingHeapOccupancyPercent=100 -XX:-G1UseAdaptiveIHOP + * -XX:G1HeapRegionSize=1M -XX:G1IHOP=100 -XX:-G1UseAdaptiveIHOP * -Xlog:gc -Xlog:gc:file=TestHeapCountersMXBean.gc.log * gc.g1.humongousObjects.TestHeapCounters MX_BEAN_COUNTER */ diff --git a/test/hotspot/jtreg/gc/g1/humongousObjects/TestHumongousMovement.java b/test/hotspot/jtreg/gc/g1/humongousObjects/TestHumongousMovement.java index 8acc8fce56b..3e393d57fb9 100644 --- a/test/hotspot/jtreg/gc/g1/humongousObjects/TestHumongousMovement.java +++ b/test/hotspot/jtreg/gc/g1/humongousObjects/TestHumongousMovement.java @@ -46,7 +46,7 @@ import java.util.stream.Collectors; * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. - * -XX:G1HeapRegionSize=1M -Xms200m -Xmx200m -XX:InitiatingHeapOccupancyPercent=100 + * -XX:G1HeapRegionSize=1M -Xms200m -Xmx200m -XX:G1IHOP=100 * -Xlog:gc=info:file=TestHumongousMovement.log * gc.g1.humongousObjects.TestHumongousMovement */ diff --git a/test/hotspot/jtreg/gc/g1/humongousObjects/TestObjectCollected.java b/test/hotspot/jtreg/gc/g1/humongousObjects/TestObjectCollected.java index b3a30d8f2f4..7e79d0139c2 100644 --- a/test/hotspot/jtreg/gc/g1/humongousObjects/TestObjectCollected.java +++ b/test/hotspot/jtreg/gc/g1/humongousObjects/TestObjectCollected.java @@ -45,7 +45,7 @@ import java.lang.ref.WeakReference; * * @run main/othervm -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions * -XX:+WhiteBoxAPI -Xbootclasspath/a:. -Xms200m -Xmx200m -Xlog:gc,gc+humongous=debug - * -XX:InitiatingHeapOccupancyPercent=100 -XX:G1HeapRegionSize=1M -Xlog:gc,gc+humongous=debug:file=TestObjectCollected.gc.log + * -XX:G1IHOP=100 -XX:G1HeapRegionSize=1M -Xlog:gc,gc+humongous=debug:file=TestObjectCollected.gc.log * gc.g1.humongousObjects.TestObjectCollected */ diff --git a/test/hotspot/jtreg/gc/g1/ihop/TestIHOPErgo.java b/test/hotspot/jtreg/gc/g1/ihop/TestIHOPErgo.java index 83080175a15..9deea1797af 100644 --- a/test/hotspot/jtreg/gc/g1/ihop/TestIHOPErgo.java +++ b/test/hotspot/jtreg/gc/g1/ihop/TestIHOPErgo.java @@ -71,7 +71,7 @@ public class TestIHOPErgo { "-Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug", "-XX:+AlwaysTenure", "-XX:G1AdaptiveIHOPNumInitialSamples=1", - "-XX:InitiatingHeapOccupancyPercent=30" + "-XX:G1IHOP=30" }; public static void main(String[] args) throws Throwable { diff --git a/test/hotspot/jtreg/gc/g1/ihop/TestIHOPStatic.java b/test/hotspot/jtreg/gc/g1/ihop/TestIHOPStatic.java index 2028e8751d7..26dfe932f59 100644 --- a/test/hotspot/jtreg/gc/g1/ihop/TestIHOPStatic.java +++ b/test/hotspot/jtreg/gc/g1/ihop/TestIHOPStatic.java @@ -114,13 +114,13 @@ public class TestIHOPStatic { private static void runTest(int ihop, long pctToFill, long heapSize, boolean expectInitiationMessage) throws Throwable { System.out.println(""); System.out.println("IHOP test:"); - System.out.println(" InitiatingHeapOccupancyPercent : " + ihop); + System.out.println(" G1IHOP : " + ihop); System.out.println(" Part of heap to fill (percentage) : " + pctToFill); System.out.println(" MaxHeapSize : " + heapSize); System.out.println(" Expect for concurrent cycle initiation message : " + expectInitiationMessage); List options = new ArrayList<>(); Collections.addAll(options, - "-XX:InitiatingHeapOccupancyPercent=" + ihop, + "-XX:G1IHOP=" + ihop, "-Dmemory.fill=" + (heapSize * 1024 * 1024 * pctToFill / 100), "-XX:MaxHeapSize=" + heapSize + "M", "-XX:InitialHeapSize=" + heapSize + "M" diff --git a/test/hotspot/jtreg/gc/g1/mixedgc/TestLogging.java b/test/hotspot/jtreg/gc/g1/mixedgc/TestLogging.java index 28da6598141..b1d4a4ed5fc 100644 --- a/test/hotspot/jtreg/gc/g1/mixedgc/TestLogging.java +++ b/test/hotspot/jtreg/gc/g1/mixedgc/TestLogging.java @@ -56,7 +56,7 @@ public class TestLogging { "-XX:+WhiteBoxAPI", "-Xms10M", "-Xmx10M", "-XX:NewSize=2M", "-XX:MaxNewSize=2M", "-XX:+AlwaysTenure", // surviving promote objects immediately - "-XX:InitiatingHeapOccupancyPercent=100", // set initial CMC threshold and disable adaptive IHOP + "-XX:G1IHOP=100", // set initial CMC threshold and disable adaptive IHOP "-XX:-G1UseAdaptiveIHOP", // to avoid additional concurrent cycles caused by ergonomics "-XX:G1MixedGCCountTarget=4", "-XX:MaxGCPauseMillis=30000", // to have enough time diff --git a/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java b/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java index 1bc92ef7cc0..3204cd38971 100644 --- a/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java +++ b/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java @@ -41,7 +41,7 @@ import gc.testlibrary.g1.MixedGCProvoker; * @modules java.management * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox - * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -verbose:gc -XX:NewSize=2m -XX:MaxNewSize=2m -Xmx14m -Xms14m -XX:+AlwaysTenure -XX:InitiatingHeapOccupancyPercent=100 -XX:-G1UseAdaptiveIHOP -XX:G1MixedGCCountTarget=4 -XX:MaxGCPauseMillis=30000 -XX:G1HeapRegionSize=1m -XX:G1HeapWastePercent=0 -XX:G1MixedGCLiveThresholdPercent=100 gc.g1.mixedgc.TestOldGenCollectionUsage + * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -verbose:gc -XX:NewSize=2m -XX:MaxNewSize=2m -Xmx14m -Xms14m -XX:+AlwaysTenure -XX:G1IHOP=100 -XX:-G1UseAdaptiveIHOP -XX:G1MixedGCCountTarget=4 -XX:MaxGCPauseMillis=30000 -XX:G1HeapRegionSize=1m -XX:G1HeapWastePercent=0 -XX:G1MixedGCLiveThresholdPercent=100 gc.g1.mixedgc.TestOldGenCollectionUsage */ // 8195115 says that for the "G1 Old Gen" MemoryPool, CollectionUsage.used diff --git a/test/hotspot/jtreg/gc/g1/plab/TestPLABEvacuationFailure.java b/test/hotspot/jtreg/gc/g1/plab/TestPLABEvacuationFailure.java index bc70b9c193c..acba7c5355c 100644 --- a/test/hotspot/jtreg/gc/g1/plab/TestPLABEvacuationFailure.java +++ b/test/hotspot/jtreg/gc/g1/plab/TestPLABEvacuationFailure.java @@ -70,7 +70,7 @@ public class TestPLABEvacuationFailure { private static final String[] COMMON_OPTIONS = { "-Xlog:gc,gc+plab=debug", "-XX:+UseG1GC", - "-XX:InitiatingHeapOccupancyPercent=100", + "-XX:G1IHOP=100", "-XX:-G1UseAdaptiveIHOP", "-XX:G1HeapRegionSize=1m"}; diff --git a/test/hotspot/jtreg/gc/shenandoah/TestLargeArrayInit.java b/test/hotspot/jtreg/gc/shenandoah/TestLargeArrayInit.java new file mode 100644 index 00000000000..83c74866a95 --- /dev/null +++ b/test/hotspot/jtreg/gc/shenandoah/TestLargeArrayInit.java @@ -0,0 +1,140 @@ +/* + * 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 id=adaptive + * @summary Verify zero-initialization completeness for large arrays under Shenandoah adaptive mode + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx512m -Xms512m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive + * TestLargeArrayInit + */ + +/* + * @test id=generational + * @summary Verify zero-initialization completeness for large arrays under Shenandoah generational mode + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx512m -Xms512m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive -XX:ShenandoahGCMode=generational + * TestLargeArrayInit + */ + +/* + * @test id=compact-on + * @summary Verify zero-initialization completeness for large arrays with compact object headers enabled + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx512m -Xms512m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive + * -XX:+UseCompactObjectHeaders + * TestLargeArrayInit + */ + +/* + * @test id=compact-off + * @summary Verify zero-initialization completeness for large arrays with compact object headers disabled + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx512m -Xms512m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive + * -XX:-UseCompactObjectHeaders + * TestLargeArrayInit + */ + +/* + * @test id=compressed-oops-off + * @summary Verify zero-initialization completeness for large arrays with compressed oops disabled + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx512m -Xms512m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive + * -XX:-UseCompressedOops + * TestLargeArrayInit + */ + +/** + * + * Allocates large byte[], int[], long[], and Object[] arrays whose sizes span + * multiple 64K-word segments (~100MB each), then verifies every element is + * zero (or null for reference arrays). + */ +public class TestLargeArrayInit { + + // ~100MB for each array type + static final int BYTE_LEN = 100 * 1024 * 1024; // 100M elements + static final int INT_LEN = 25 * 1024 * 1024; // 25M elements * 4 bytes = 100MB + static final int LONG_LEN = 12 * 1024 * 1024 + 512*1024; // ~100MB in longs + static final int OBJ_LEN = 12 * 1024 * 1024 + 512*1024; // ~100MB in refs (8 bytes each on 64-bit) + + public static void main(String[] args) { + testByteArray(); + testIntArray(); + testLongArray(); + testObjectArray(); + System.out.println("TestLargeArrayInit PASSED"); + } + + static void testByteArray() { + byte[] arr = new byte[BYTE_LEN]; + for (int i = 0; i < arr.length; i++) { + if (arr[i] != 0) { + throw new RuntimeException("byte[] not zero at index " + i + ": " + arr[i]); + } + } + } + + static void testIntArray() { + int[] arr = new int[INT_LEN]; + for (int i = 0; i < arr.length; i++) { + if (arr[i] != 0) { + throw new RuntimeException("int[] not zero at index " + i + ": " + arr[i]); + } + } + } + + static void testLongArray() { + long[] arr = new long[LONG_LEN]; + for (int i = 0; i < arr.length; i++) { + if (arr[i] != 0L) { + throw new RuntimeException("long[] not zero at index " + i + ": " + arr[i]); + } + } + } + + static void testObjectArray() { + Object[] arr = new Object[OBJ_LEN]; + for (int i = 0; i < arr.length; i++) { + if (arr[i] != null) { + throw new RuntimeException("Object[] not null at index " + i + ": " + arr[i]); + } + } + } +} diff --git a/test/hotspot/jtreg/gc/shenandoah/TestLargeArrayInitGCStress.java b/test/hotspot/jtreg/gc/shenandoah/TestLargeArrayInitGCStress.java new file mode 100644 index 00000000000..6dfd250e3cc --- /dev/null +++ b/test/hotspot/jtreg/gc/shenandoah/TestLargeArrayInitGCStress.java @@ -0,0 +1,202 @@ +/* + * 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 id=aggressive + * @summary Verify correct object metadata for large arrays under Shenandoah GC stress (aggressive heuristics) + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx256m -Xms256m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive + * TestLargeArrayInitGCStress + */ + +/* + * @test id=generational-aggressive + * @summary Verify correct object metadata for large arrays under Shenandoah generational mode with aggressive heuristics + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx256m -Xms256m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:ShenandoahGCMode=generational + * TestLargeArrayInitGCStress + */ + +/* + * @test id=compact-on + * @summary Verify correct object metadata for large arrays with compact object headers enabled + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx256m -Xms256m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive + + * -XX:+UseCompactObjectHeaders + * TestLargeArrayInitGCStress + */ + +/* + * @test id=compact-off + * @summary Verify correct object metadata for large arrays with compact object headers disabled + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx256m -Xms256m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive + * -XX:-UseCompactObjectHeaders + * TestLargeArrayInitGCStress + */ + +/* + * @test id=compressed-oops-off + * @summary Verify correct object metadata for large arrays with compressed oops disabled under GC stress + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx256m -Xms256m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive + * -XX:-UseCompressedOops + * TestLargeArrayInitGCStress + */ + +/** + * + * Allocates large arrays of various types under GC stress (aggressive heuristics, + * tight 256MB heap) and verifies that after each allocation: + * - array.length matches the requested length + * - array.getClass() matches the expected array type + * - All elements are zero/null + * + * Arrays are sized to span multiple 64K-word segments to exercise the segmented + * clearing path in ShenandoahObjArrayAllocator. The loop creates sustained GC + * pressure so that safepoints are likely to occur during array initialization. + */ +public class TestLargeArrayInitGCStress { + + static final int ITERATIONS = 50; + + // Array sizes: small (within one segment), medium (a few segments), large (many segments) + static final int[] BYTE_SIZES = {1024, 256 * 1024, 2 * 1024 * 1024, 16 * 1024 * 1024}; + static final int[] INT_SIZES = {1024, 64 * 1024, 512 * 1024, 4 * 1024 * 1024}; + static final int[] LONG_SIZES = {1024, 32 * 1024, 256 * 1024, 2 * 1024 * 1024}; + static final int[] OBJ_SIZES = {1024, 32 * 1024, 256 * 1024, 2 * 1024 * 1024}; + + // Volatile sink to prevent dead code elimination + static volatile Object sink; + + public static void main(String[] args) { + for (int iter = 0; iter < ITERATIONS; iter++) { + testByteArrays(); + testIntArrays(); + testLongArrays(); + testObjectArrays(); + } + System.out.println("TestLargeArrayInitGCStress PASSED"); + } + + static void testByteArrays() { + for (int len : BYTE_SIZES) { + byte[] arr = new byte[len]; + sink = arr; + verifyLength(arr.length, len, "byte[]"); + verifyClass(arr.getClass(), byte[].class, "byte[]"); + verifyByteZeros(arr, len); + } + } + + static void testIntArrays() { + for (int len : INT_SIZES) { + int[] arr = new int[len]; + sink = arr; + verifyLength(arr.length, len, "int[]"); + verifyClass(arr.getClass(), int[].class, "int[]"); + verifyIntZeros(arr, len); + } + } + + static void testLongArrays() { + for (int len : LONG_SIZES) { + long[] arr = new long[len]; + sink = arr; + verifyLength(arr.length, len, "long[]"); + verifyClass(arr.getClass(), long[].class, "long[]"); + verifyLongZeros(arr, len); + } + } + + static void testObjectArrays() { + for (int len : OBJ_SIZES) { + Object[] arr = new Object[len]; + sink = arr; + verifyLength(arr.length, len, "Object[]"); + verifyClass(arr.getClass(), Object[].class, "Object[]"); + verifyObjectNulls(arr, len); + } + } + + static void verifyLength(int actual, int expected, String type) { + if (actual != expected) { + throw new RuntimeException(type + " length mismatch: expected " + expected + ", got " + actual); + } + } + + static void verifyClass(Class actual, Class expected, String type) { + if (actual != expected) { + throw new RuntimeException(type + " class mismatch: expected " + expected.getName() + ", got " + actual.getName()); + } + } + + static void verifyByteZeros(byte[] arr, int len) { + for (int i = 0; i < len; i++) { + if (arr[i] != 0) { + throw new RuntimeException("byte[] not zero at index " + i + ": " + arr[i]); + } + } + } + + static void verifyIntZeros(int[] arr, int len) { + for (int i = 0; i < len; i++) { + if (arr[i] != 0) { + throw new RuntimeException("int[] not zero at index " + i + ": " + arr[i]); + } + } + } + + static void verifyLongZeros(long[] arr, int len) { + for (int i = 0; i < len; i++) { + if (arr[i] != 0L) { + throw new RuntimeException("long[] not zero at index " + i + ": " + arr[i]); + } + } + } + + static void verifyObjectNulls(Object[] arr, int len) { + for (int i = 0; i < len; i++) { + if (arr[i] != null) { + throw new RuntimeException("Object[] not null at index " + i + ": " + arr[i]); + } + } + } +} diff --git a/test/hotspot/jtreg/gc/shenandoah/TestRegionSamplingLogging.java b/test/hotspot/jtreg/gc/shenandoah/TestRegionSamplingLogging.java index 0017328b517..5c9536223f3 100644 --- a/test/hotspot/jtreg/gc/shenandoah/TestRegionSamplingLogging.java +++ b/test/hotspot/jtreg/gc/shenandoah/TestRegionSamplingLogging.java @@ -59,8 +59,10 @@ public class TestRegionSamplingLogging { } File directory = new File("."); - File[] files = directory.listFiles((dir, name) -> name.startsWith("region-snapshots") && name.endsWith(".log")); + File[] files = directory.listFiles((dir, name) -> name.startsWith("region-snapshots")); System.out.println(Arrays.toString(files)); + + // Expect one or more log files when region logging is enabled if (files == null || files.length == 0) { throw new IllegalStateException("Did not find expected snapshot log file."); } diff --git a/test/hotspot/jtreg/gc/shenandoah/TestShenandoahRegionLogging.java b/test/hotspot/jtreg/gc/shenandoah/TestShenandoahRegionLogging.java index 81e66c9d0cb..a5fe1589d25 100644 --- a/test/hotspot/jtreg/gc/shenandoah/TestShenandoahRegionLogging.java +++ b/test/hotspot/jtreg/gc/shenandoah/TestShenandoahRegionLogging.java @@ -33,6 +33,7 @@ * TestShenandoahRegionLogging */ import java.io.File; +import java.util.Arrays; public class TestShenandoahRegionLogging { public static void main(String[] args) throws Exception { @@ -40,9 +41,10 @@ public class TestShenandoahRegionLogging { File directory = new File("."); File[] files = directory.listFiles((dir, name) -> name.startsWith("region-snapshots")); + System.out.println(Arrays.toString(files)); // Expect one or more log files when region logging is enabled - if (files.length == 0) { + if (files == null || files.length == 0) { throw new Error("Expected at least one log file for region sampling data."); } } diff --git a/test/hotspot/jtreg/gc/shenandoah/TestSmallArrayInit.java b/test/hotspot/jtreg/gc/shenandoah/TestSmallArrayInit.java new file mode 100644 index 00000000000..3c15a140d18 --- /dev/null +++ b/test/hotspot/jtreg/gc/shenandoah/TestSmallArrayInit.java @@ -0,0 +1,141 @@ +/* + * 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 id=adaptive + * @summary Verify behavioral equivalence for small arrays under Shenandoah adaptive mode + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx256m -Xms256m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive + * TestSmallArrayInit + */ + +/* + * @test id=generational + * @summary Verify behavioral equivalence for small arrays under Shenandoah generational mode + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx256m -Xms256m + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive -XX:ShenandoahGCMode=generational + * TestSmallArrayInit + */ + +/** + * + * For arrays with word_size <= 64K words (the segment size threshold), + * ShenandoahObjArrayAllocator delegates to ObjArrayAllocator::initialize(). + * This test verifies that small arrays of various types and sizes are correctly + * zero-initialized, confirming no regression vs. the default allocator behavior. + * + * Test sizes: + * - Tiny: 10 elements + * - Small: 1000 elements + * - Near boundary: just under 64K words (65536 words = 524288 bytes on 64-bit) + * byte[] -> 524288 elements (524288 bytes = 64K words) + * int[] -> 131072 elements (524288 bytes = 64K words) + * long[] -> 65536 elements (524288 bytes = 64K words) + * Object[] -> 65536 elements (524288 bytes = 64K words, 8 bytes/ref) + */ +public class TestSmallArrayInit { + + // Tiny sizes + static final int TINY = 10; + + // Small sizes + static final int SMALL = 1000; + + // Near 64K-word boundary sizes (just under 524288 bytes of element data) + // 64K words = 65536 words = 524288 bytes on 64-bit + static final int NEAR_BOUNDARY_BYTE = 524288; // 524288 bytes + static final int NEAR_BOUNDARY_INT = 131072; // 131072 * 4 = 524288 bytes + static final int NEAR_BOUNDARY_LONG = 65536; // 65536 * 8 = 524288 bytes + static final int NEAR_BOUNDARY_OBJ = 65536; // 65536 * 8 = 524288 bytes (8 bytes/ref on 64-bit) + + public static void main(String[] args) { + testByteArrays(); + testIntArrays(); + testLongArrays(); + testObjectArrays(); + System.out.println("TestSmallArrayInit PASSED"); + } + + static void testByteArrays() { + verifyByteArray(new byte[TINY], "tiny"); + verifyByteArray(new byte[SMALL], "small"); + verifyByteArray(new byte[NEAR_BOUNDARY_BYTE], "near-boundary"); + } + + static void testIntArrays() { + verifyIntArray(new int[TINY], "tiny"); + verifyIntArray(new int[SMALL], "small"); + verifyIntArray(new int[NEAR_BOUNDARY_INT], "near-boundary"); + } + + static void testLongArrays() { + verifyLongArray(new long[TINY], "tiny"); + verifyLongArray(new long[SMALL], "small"); + verifyLongArray(new long[NEAR_BOUNDARY_LONG], "near-boundary"); + } + + static void testObjectArrays() { + verifyObjectArray(new Object[TINY], "tiny"); + verifyObjectArray(new Object[SMALL], "small"); + verifyObjectArray(new Object[NEAR_BOUNDARY_OBJ], "near-boundary"); + } + + static void verifyByteArray(byte[] arr, String label) { + for (int i = 0; i < arr.length; i++) { + if (arr[i] != 0) { + throw new RuntimeException("byte[" + label + "] not zero at index " + i + ": " + arr[i]); + } + } + } + + static void verifyIntArray(int[] arr, String label) { + for (int i = 0; i < arr.length; i++) { + if (arr[i] != 0) { + throw new RuntimeException("int[" + label + "] not zero at index " + i + ": " + arr[i]); + } + } + } + + static void verifyLongArray(long[] arr, String label) { + for (int i = 0; i < arr.length; i++) { + if (arr[i] != 0L) { + throw new RuntimeException("long[" + label + "] not zero at index " + i + ": " + arr[i]); + } + } + } + + static void verifyObjectArray(Object[] arr, String label) { + for (int i = 0; i < arr.length; i++) { + if (arr[i] != null) { + throw new RuntimeException("Object[" + label + "] not null at index " + i + ": " + arr[i]); + } + } + } +} diff --git a/test/hotspot/jtreg/gc/shenandoah/TestWeakReferenceCAS.java b/test/hotspot/jtreg/gc/shenandoah/TestWeakReferenceCAS.java new file mode 100644 index 00000000000..2373bc1c905 --- /dev/null +++ b/test/hotspot/jtreg/gc/shenandoah/TestWeakReferenceCAS.java @@ -0,0 +1,117 @@ +/* + * 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 + * @summary Test that weak CAS attempt on Reference.referent is handled properly + * @requires vm.gc.Shenandoah + * @library /test/lib + * @modules java.base/jdk.internal.misc:+open + * + * @run driver TestWeakReferenceCAS + */ + +import java.util.*; +import java.lang.ref.*; +import java.lang.reflect.*; +import jdk.internal.misc.Unsafe; + +import jdk.test.lib.Platform; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.process.OutputAnalyzer; + +public class TestWeakReferenceCAS { + + public static void main(String[] args) throws Exception { + if (args.length == 0) { + driver("CAS"); + driver("CAE"); + driver("GAS"); + } else { + switch (args[0]) { + case "CAS": + Test.testCAS(); + break; + case "CAE": + Test.testCAE(); + break; + case "GAS": + Test.testGAS(); + break; + default: + throw new IllegalArgumentException("Unknown test mode: " + args[0]); + } + } + } + + private static void driver(String test) throws Exception { + OutputAnalyzer output = ProcessTools.executeLimitedTestJava( + "-Xmx128m", + "--add-exports", "java.base/jdk.internal.misc=ALL-UNNAMED", + "--add-opens", "java.base/java.lang.ref=ALL-UNNAMED", + "-XX:+UseShenandoahGC", + TestWeakReferenceCAS.class.getName(), + test); + if (Platform.isDebugBuild()) { + output.shouldNotHaveExitValue(0); + output.shouldContain("Application error:"); + } else { + output.shouldHaveExitValue(0); + } + } + + static class Test { + static final Unsafe UNSAFE = Unsafe.getUnsafe(); + static final long OFFSET; + + static { + try { + Field f = Reference.class.getDeclaredField("referent"); + OFFSET = UNSAFE.objectFieldOffset(f); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + static void testCAS() { + Object obj = new Object(); + Object next = new Object(); + WeakReference ref = new WeakReference<>(obj); + UNSAFE.compareAndSetReference(ref, OFFSET, obj, next); + } + + static void testCAE() { + Object obj = new Object(); + Object next = new Object(); + WeakReference ref = new WeakReference<>(obj); + UNSAFE.compareAndExchangeReference(ref, OFFSET, obj, next); + } + + static void testGAS() { + Object obj = new Object(); + Object next = new Object(); + WeakReference ref = new WeakReference<>(obj); + UNSAFE.getAndSetReference(ref, OFFSET, next); + } + } +} diff --git a/test/hotspot/jtreg/gc/shenandoah/compiler/CallMultipleCatchProjs.java b/test/hotspot/jtreg/gc/shenandoah/compiler/CallMultipleCatchProjs.java index 6a3fe5bb32e..b647be5f5e6 100644 --- a/test/hotspot/jtreg/gc/shenandoah/compiler/CallMultipleCatchProjs.java +++ b/test/hotspot/jtreg/gc/shenandoah/compiler/CallMultipleCatchProjs.java @@ -27,7 +27,7 @@ * @summary barrier expansion breaks if barrier is right after call to rethrow stub * @requires vm.gc.Shenandoah * - * @run main/othervm -XX:CompileOnly=CallMultipleCatchProjs::test -Xcomp -Xverify:none -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC CallMultipleCatchProjs + * @run main/othervm -XX:CompileOnly=CallMultipleCatchProjs::test -Xcomp -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC CallMultipleCatchProjs * */ diff --git a/test/hotspot/jtreg/gc/shenandoah/compiler/TestClone.java b/test/hotspot/jtreg/gc/shenandoah/compiler/TestClone.java index 0775e5baadd..45891e0bd40 100644 --- a/test/hotspot/jtreg/gc/shenandoah/compiler/TestClone.java +++ b/test/hotspot/jtreg/gc/shenandoah/compiler/TestClone.java @@ -24,7 +24,9 @@ /* * @test id=default + * @key randomness * @summary Test clone barriers work correctly + * @library /test/lib * @requires vm.gc.Shenandoah * * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g @@ -50,7 +52,9 @@ /* * @test id=default-verify + * @key randomness * @summary Test clone barriers work correctly + * @library /test/lib * @requires vm.gc.Shenandoah * * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g @@ -79,9 +83,82 @@ * TestClone */ +/* + * @test id=passive + * @key randomness + * @summary Test clone barriers work correctly + * @library /test/lib + * @requires vm.gc.Shenandoah + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC + * -XX:ShenandoahGCMode=passive -XX:+ShenandoahCloneBarrier + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC + * -XX:ShenandoahGCMode=passive -XX:+ShenandoahCloneBarrier + * -Xint + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC + * -XX:ShenandoahGCMode=passive -XX:+ShenandoahCloneBarrier + * -XX:-TieredCompilation + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC + * -XX:ShenandoahGCMode=passive -XX:+ShenandoahCloneBarrier + * -XX:TieredStopAtLevel=1 + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC + * -XX:ShenandoahGCMode=passive -XX:+ShenandoahCloneBarrier + * -XX:TieredStopAtLevel=4 + * TestClone + */ + +/* + * @test id=passive-verify + * @key randomness + * @summary Test clone barriers work correctly + * @library /test/lib + * @requires vm.gc.Shenandoah + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC + * -XX:ShenandoahGCMode=passive -XX:+ShenandoahCloneBarrier + * -XX:+ShenandoahVerify + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC + * -XX:ShenandoahGCMode=passive -XX:+ShenandoahCloneBarrier + * -XX:+ShenandoahVerify + * -Xint + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC + * -XX:ShenandoahGCMode=passive -XX:+ShenandoahCloneBarrier + * -XX:+ShenandoahVerify + * -XX:-TieredCompilation + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC + * -XX:ShenandoahGCMode=passive -XX:+ShenandoahCloneBarrier + * -XX:+ShenandoahVerify + * -XX:TieredStopAtLevel=1 + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC + * -XX:ShenandoahGCMode=passive -XX:+ShenandoahCloneBarrier + * -XX:+ShenandoahVerify + * -XX:TieredStopAtLevel=4 + * TestClone + */ + /* * @test id=aggressive + * @key randomness * @summary Test clone barriers work correctly + * @library /test/lib * @requires vm.gc.Shenandoah * * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g @@ -106,8 +183,43 @@ */ /* - * @test id=no-coops + * @test id=aggressive-verify + * @key randomness * @summary Test clone barriers work correctly + * @library /test/lib + * @requires vm.gc.Shenandoah + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive + * -XX:+ShenandoahVerify + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive + * -XX:+ShenandoahVerify + * -Xint + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive + * -XX:+ShenandoahVerify + * -XX:-TieredCompilation + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive + * -XX:+ShenandoahVerify + * -XX:TieredStopAtLevel=1 + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive + * -XX:+ShenandoahVerify + * -XX:TieredStopAtLevel=4 + * TestClone + */ + +/* + * @test id=no-coops + * @key randomness + * @summary Test clone barriers work correctly + * @library /test/lib * @requires vm.gc.Shenandoah * @requires vm.bits == "64" * @@ -139,7 +251,9 @@ /* * @test id=no-coops-verify + * @key randomness * @summary Test clone barriers work correctly + * @library /test/lib * @requires vm.gc.Shenandoah * @requires vm.bits == "64" * @@ -176,7 +290,9 @@ /* * @test id=no-coops-aggressive + * @key randomness * @summary Test clone barriers work correctly + * @library /test/lib * @requires vm.gc.Shenandoah * @requires vm.bits == "64" * @@ -208,7 +324,9 @@ /* * @test id=generational + * @key randomness * @summary Test clone barriers work correctly + * @library /test/lib * @requires vm.gc.Shenandoah * * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g @@ -234,7 +352,9 @@ /* * @test id=generational-small-card-size + * @key randomness * @summary Test clone barriers work correctly + * @library /test/lib * @requires vm.gc.Shenandoah * * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g @@ -260,7 +380,9 @@ /* * @test id=generational-verify + * @key randomness * @summary Test clone barriers work correctly + * @library /test/lib * @requires vm.gc.Shenandoah * * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g @@ -289,100 +411,241 @@ * TestClone */ - /* - * @test id=generational-no-coops - * @summary Test clone barriers work correctly - * @requires vm.gc.Shenandoah - * @requires vm.bits == "64" - * - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g - * -XX:-UseCompressedOops - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational - * TestClone - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g - * -XX:-UseCompressedOops - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational - * -Xint - * TestClone - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g - * -XX:-UseCompressedOops - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational - * -XX:-TieredCompilation - * TestClone - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g - * -XX:-UseCompressedOops - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational - * -XX:TieredStopAtLevel=1 - * TestClone - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g - * -XX:-UseCompressedOops - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational - * -XX:TieredStopAtLevel=4 - * TestClone - */ +/* + * @test id=generational-no-coops + * @key randomness + * @summary Test clone barriers work correctly + * @library /test/lib + * @requires vm.gc.Shenandoah + * @requires vm.bits == "64" + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:-UseCompressedOops + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:-UseCompressedOops + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational + * -Xint + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:-UseCompressedOops + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational + * -XX:-TieredCompilation + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:-UseCompressedOops + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational + * -XX:TieredStopAtLevel=1 + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:-UseCompressedOops + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational + * -XX:TieredStopAtLevel=4 + * TestClone + */ +/* + * @test id=generational-no-coops-verify + * @key randomness + * @summary Test clone barriers work correctly + * @library /test/lib + * @requires vm.gc.Shenandoah + * @requires vm.bits == "64" + * + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:-UseCompressedOops + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational + * -XX:+ShenandoahVerify + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:-UseCompressedOops + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational + * -XX:+ShenandoahVerify + * -Xint + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:-UseCompressedOops + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational + * -XX:+ShenandoahVerify + * -XX:-TieredCompilation + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:-UseCompressedOops + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational + * -XX:+ShenandoahVerify + * -XX:TieredStopAtLevel=1 + * TestClone + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g + * -XX:-UseCompressedOops + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational + * -XX:+ShenandoahVerify + * -XX:TieredStopAtLevel=4 + * TestClone + */ - /* - * @test id=generational-no-coops-verify - * @summary Test clone barriers work correctly - * @requires vm.gc.Shenandoah - * @requires vm.bits == "64" - * - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g - * -XX:-UseCompressedOops - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational - * -XX:+ShenandoahVerify - * TestClone - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g - * -XX:-UseCompressedOops - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational - * -XX:+ShenandoahVerify - * -Xint - * TestClone - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g - * -XX:-UseCompressedOops - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational - * -XX:+ShenandoahVerify - * -XX:-TieredCompilation - * TestClone - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g - * -XX:-UseCompressedOops - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational - * -XX:+ShenandoahVerify - * -XX:TieredStopAtLevel=1 - * TestClone - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xms1g -Xmx1g - * -XX:-UseCompressedOops - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational - * -XX:+ShenandoahVerify - * -XX:TieredStopAtLevel=4 - * TestClone - */ +import java.util.Random; + +import jdk.test.lib.Utils; public class TestClone { + private static final int ENTRIES = 1_000; + private static final int ITERS = 50_000; + private static final int ARRAY_MAX_SIZE = 128; + private static final Random RAND = Utils.getRandomInstance(); + private static final SmallObject[] SMALL = new SmallObject[ENTRIES]; + private static final LargeObject[] LARGE = new LargeObject[ENTRIES]; + private static final Ref[][] ARRAY = new Ref[ENTRIES][]; + public static void main(String[] args) throws Exception { - for (int i = 0; i < 10000; i++) { - Object[] src = new Object[i]; - for (int c = 0; c < src.length; c++) { - src[c] = new Object(); - } - testWith(src); + // Seed + for (int i = 0; i < ENTRIES; i++) { + SMALL[i] = new SmallObject(i); + LARGE[i] = new LargeObject(i); + ARRAY[i] = newArray(i); + } + + // Random clone and verify + for (int i = 0; i < ITERS; i++) { + cloneAndVerify(); + } + + // Verify everything + for (int i = 0; i < ENTRIES; i++) { + verify(SMALL[i], i); + verify(LARGE[i], i); + verify(ARRAY[i], i); } } - static void testWith(Object[] src) { - Object[] dst = src.clone(); - int srcLen = src.length; - int dstLen = dst.length; - if (srcLen != dstLen) { - throw new IllegalStateException("Lengths do not match: " + srcLen + " vs " + dstLen); + static void cloneAndVerify() { + int r = RAND.nextInt(ENTRIES); + SMALL[r] = SMALL[r].clone(); + LARGE[r] = LARGE[r].clone(); + ARRAY[r] = ARRAY[r].clone(); + + // Verify will trigger LRB. + // We don't want LRB to heal refs in the clone source or target, + // so we verify a different random location. + r = RAND.nextInt(ENTRIES); + verify(SMALL[r], r); + verify(LARGE[r], r); + verify(ARRAY[r], r); + } + + static Ref[] newArray(int id) { + int size = id % ARRAY_MAX_SIZE; + Ref[] arr = new Ref[size]; + for (int i = 0; i < size; i++) { + arr[i] = new Ref(elementValue(id, i)); } - for (int c = 0; c < src.length; c++) { - Object s = src[c]; - Object d = dst[c]; - if (s != d) { - throw new IllegalStateException("Elements do not match at " + c + ": " + s + " vs " + d); + return arr; + } + + static void verify(SmallObject src, int id) { + assertEquals(elementValue(id, 0), src.x1.x); + assertEquals(elementValue(id, 1), src.x2.x); + assertEquals(elementValue(id, 2), src.x3.x); + assertEquals(elementValue(id, 3), src.x4.x); + } + + static void verify(LargeObject src, int id) { + assertEquals(elementValue(id, 0), src.x01.x); + assertEquals(elementValue(id, 1), src.x02.x); + assertEquals(elementValue(id, 2), src.x03.x); + assertEquals(elementValue(id, 3), src.x04.x); + assertEquals(elementValue(id, 4), src.x05.x); + assertEquals(elementValue(id, 5), src.x06.x); + assertEquals(elementValue(id, 6), src.x07.x); + assertEquals(elementValue(id, 7), src.x08.x); + assertEquals(elementValue(id, 8), src.x09.x); + assertEquals(elementValue(id, 9), src.x10.x); + assertEquals(elementValue(id, 10), src.x11.x); + assertEquals(elementValue(id, 11), src.x12.x); + assertEquals(elementValue(id, 12), src.x13.x); + assertEquals(elementValue(id, 13), src.x14.x); + assertEquals(elementValue(id, 14), src.x15.x); + assertEquals(elementValue(id, 15), src.x16.x); + } + + static void assertEquals(int expected, int actual) { + if (actual != expected) { + throw new IllegalStateException("Mismatch: expected=" + expected + ", actual=" + actual); + } + } + + static void verify(Ref[] src, int id) { + int expectedLen = id % ARRAY_MAX_SIZE; + int srcLen = src.length; + if (srcLen != expectedLen) { + throw new IllegalStateException("Lengths do not match: " + srcLen + " vs " + expectedLen); + } + for (int i = 0; i < src.length; i++) { + int expectedVal = elementValue(id, i); + int val = src[i].x; + if (val != expectedVal) { + throw new IllegalStateException("Elements do not match at " + i + ": " + val + " vs " + expectedVal + ", len = " + srcLen); } } } + + static int elementValue(int id, int offset) { + // Globally unique (per type). + return ENTRIES * id + offset; + } + + static class Ref { + int x; + + Ref(int x) { + this.x = x; + } + } + + abstract static class DefaultClone implements Cloneable { + @Override + @SuppressWarnings("unchecked") + public T clone() { + try { + return (T) super.clone(); + } catch (CloneNotSupportedException e) { + throw new AssertionError(e); + } + } + } + + static class SmallObject extends DefaultClone { + Ref x1, x2, x3, x4; + + SmallObject(int x) { + x1 = new Ref(elementValue(x, 0)); + x2 = new Ref(elementValue(x, 1)); + x3 = new Ref(elementValue(x, 2)); + x4 = new Ref(elementValue(x, 3)); + } + } + + static class LargeObject extends DefaultClone { + Ref x01, x02, x03, x04, x05, x06, x07, x08; + Ref x09, x10, x11, x12, x13, x14, x15, x16; + + LargeObject(int x) { + x01 = new Ref(elementValue(x, 0)); + x02 = new Ref(elementValue(x, 1)); + x03 = new Ref(elementValue(x, 2)); + x04 = new Ref(elementValue(x, 3)); + x05 = new Ref(elementValue(x, 4)); + x06 = new Ref(elementValue(x, 5)); + x07 = new Ref(elementValue(x, 6)); + x08 = new Ref(elementValue(x, 7)); + x09 = new Ref(elementValue(x, 8)); + x10 = new Ref(elementValue(x, 9)); + x11 = new Ref(elementValue(x, 10)); + x12 = new Ref(elementValue(x, 11)); + x13 = new Ref(elementValue(x, 12)); + x14 = new Ref(elementValue(x, 13)); + x15 = new Ref(elementValue(x, 14)); + x16 = new Ref(elementValue(x, 15)); + } + } } diff --git a/test/hotspot/jtreg/gc/shenandoah/mxbeans/TestPauseNotifications.java b/test/hotspot/jtreg/gc/shenandoah/mxbeans/TestPauseNotifications.java index 1ae3b690b0d..e5c3acaccac 100644 --- a/test/hotspot/jtreg/gc/shenandoah/mxbeans/TestPauseNotifications.java +++ b/test/hotspot/jtreg/gc/shenandoah/mxbeans/TestPauseNotifications.java @@ -109,6 +109,8 @@ public class TestPauseNotifications { static final long HEAP_MB = 128; // adjust for test configuration above static final long TARGET_MB = Long.getLong("target", 2_000); // 2 Gb allocation + static final long STEP_MS = 1000; + static final int SIZE = 100_000; static volatile Object sink; @@ -160,24 +162,21 @@ public class TestPauseNotifications { ((NotificationEmitter) bean).addNotificationListener(listener, null, null); } - final int size = 100_000; - long count = TARGET_MB * 1024 * 1024 / (16 + 4 * size); - + final long count = TARGET_MB * 1024 * 1024 / (16 + 4 * SIZE); for (int c = 0; c < count; c++) { - sink = new int[size]; + sink = new int[SIZE]; } // Look at test timeout to figure out how long we can wait without breaking into timeout. // Default to 1/4 of the remaining time in 1s steps. - final long STEP_MS = 1000; - long spentTimeNanos = System.nanoTime() - startTimeNanos; - long maxTries = (Utils.adjustTimeout(Utils.DEFAULT_TEST_TIMEOUT) - (spentTimeNanos / 1_000_000L)) / STEP_MS / 4; + final long spentTimeNanos = System.nanoTime() - startTimeNanos; + final long maxTries = (Utils.adjustTimeout(Utils.DEFAULT_TEST_TIMEOUT) - (spentTimeNanos / 1_000_000L)) / STEP_MS / 4; long actualPauses = 0; long actualCycles = 0; // Wait until enough notifications are accrued to match minimum boundary. - long minExpected = 10; + final long minExpected = 10; long tries = 0; while (tries++ < maxTries) { @@ -186,13 +185,20 @@ public class TestPauseNotifications { if (minExpected <= actualPauses && minExpected <= actualCycles) { // Wait a little bit to catch the lingering notifications. Thread.sleep(5000); - actualPauses = pausesCount.get(); - actualCycles = cyclesCount.get(); break; } Thread.sleep(STEP_MS); } + for (GarbageCollectorMXBean bean : ManagementFactory.getGarbageCollectorMXBeans()) { + ((NotificationEmitter) bean).removeNotificationListener(listener); + } + + actualPauses = pausesCount.get(); + actualCycles = cyclesCount.get(); + long actualPauseDuration = pausesDuration.get(); + long actualCycleDuration = cyclesDuration.get(); + { String msg = "Pauses expected = [" + minExpected + "; +inf], actual = " + actualPauses; if (minExpected <= actualPauses) { @@ -212,11 +218,7 @@ public class TestPauseNotifications { } { - long actualPauseDuration = pausesDuration.get(); - long actualCycleDuration = cyclesDuration.get(); - String msg = "Pauses duration (" + actualPauseDuration + ") is expected to be not larger than cycles duration (" + actualCycleDuration + ")"; - if (actualPauseDuration <= actualCycleDuration) { System.out.println(msg); } else { diff --git a/test/hotspot/jtreg/gc/shenandoah/options/TestRegionSizeArgs.java b/test/hotspot/jtreg/gc/shenandoah/options/TestRegionSizeArgs.java index 80962f0ffa6..1ce829c7dd9 100644 --- a/test/hotspot/jtreg/gc/shenandoah/options/TestRegionSizeArgs.java +++ b/test/hotspot/jtreg/gc/shenandoah/options/TestRegionSizeArgs.java @@ -38,8 +38,6 @@ import jdk.test.lib.process.OutputAnalyzer; public class TestRegionSizeArgs { public static void main(String[] args) throws Exception { testInvalidRegionSizes(); - testMinRegionSize(); - testMaxRegionSize(); } private static void testInvalidRegionSizes() throws Exception { @@ -146,88 +144,4 @@ public class TestRegionSizeArgs { output.shouldHaveExitValue(1); } } - - private static void testMinRegionSize() throws Exception { - - { - OutputAnalyzer output = ProcessTools.executeLimitedTestJava("-XX:+UnlockExperimentalVMOptions", - "-XX:+UseShenandoahGC", - "-Xms100m", - "-Xmx1g", - "-XX:ShenandoahMinRegionSize=255K", - "-version"); - output.shouldMatch("Invalid -XX:ShenandoahMinRegionSize option"); - output.shouldHaveExitValue(1); - } - - { - OutputAnalyzer output = ProcessTools.executeLimitedTestJava("-XX:+UnlockExperimentalVMOptions", - "-XX:+UseShenandoahGC", - "-Xms100m", - "-Xmx1g", - "-XX:ShenandoahMinRegionSize=1M", - "-XX:ShenandoahMaxRegionSize=260K", - "-version"); - output.shouldMatch("Invalid -XX:ShenandoahMinRegionSize or -XX:ShenandoahMaxRegionSize"); - output.shouldHaveExitValue(1); - } - { - OutputAnalyzer output = ProcessTools.executeLimitedTestJava("-XX:+UnlockExperimentalVMOptions", - "-XX:+UseShenandoahGC", - "-Xms100m", - "-Xmx1g", - "-XX:ShenandoahMinRegionSize=200m", - "-version"); - output.shouldMatch("Invalid -XX:ShenandoahMinRegionSize option"); - output.shouldHaveExitValue(1); - } - - { - OutputAnalyzer output = ProcessTools.executeLimitedTestJava("-XX:+UnlockExperimentalVMOptions", - "-XX:+UseShenandoahGC", - "-Xms100m", - "-Xmx1g", - "-XX:ShenandoahMinRegionSize=9m", - "-version"); - output.shouldHaveExitValue(0); - } - - // This used to assert that _conservative_max_heap_alignment is not a power-of-2. - { - OutputAnalyzer output = ProcessTools.executeLimitedTestJava("-XX:+UnlockExperimentalVMOptions", - "-XX:+UseShenandoahGC", - "-Xms100m", - "-Xmx1g", - "-XX:ShenandoahMaxRegionSize=33m", - "-version"); - output.shouldHaveExitValue(0); - } - - } - - private static void testMaxRegionSize() throws Exception { - - { - OutputAnalyzer output = ProcessTools.executeLimitedTestJava("-XX:+UnlockExperimentalVMOptions", - "-XX:+UseShenandoahGC", - "-Xms100m", - "-Xmx1g", - "-XX:ShenandoahMaxRegionSize=255K", - "-version"); - output.shouldMatch("Invalid -XX:ShenandoahMaxRegionSize option"); - output.shouldHaveExitValue(1); - } - - { - OutputAnalyzer output = ProcessTools.executeLimitedTestJava("-XX:+UnlockExperimentalVMOptions", - "-XX:+UseShenandoahGC", - "-Xms100m", - "-Xmx1g", - "-XX:ShenandoahMinRegionSize=1M", - "-XX:ShenandoahMaxRegionSize=260K", - "-version"); - output.shouldMatch("Invalid -XX:ShenandoahMinRegionSize or -XX:ShenandoahMaxRegionSize"); - output.shouldHaveExitValue(1); - } - } } diff --git a/test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java b/test/hotspot/jtreg/resourcehogs/runtime/jni/checked/TestLargeUTF8Length.java similarity index 100% rename from test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java rename to test/hotspot/jtreg/resourcehogs/runtime/jni/checked/TestLargeUTF8Length.java diff --git a/test/hotspot/jtreg/runtime/jni/checked/libTestLargeUTF8Length.c b/test/hotspot/jtreg/resourcehogs/runtime/jni/checked/libTestLargeUTF8Length.c similarity index 100% rename from test/hotspot/jtreg/runtime/jni/checked/libTestLargeUTF8Length.c rename to test/hotspot/jtreg/resourcehogs/runtime/jni/checked/libTestLargeUTF8Length.c diff --git a/test/hotspot/jtreg/compiler/gcbarriers/TestAlwaysAtomicAccesses.java b/test/hotspot/jtreg/runtime/8359166/Test.java similarity index 66% rename from test/hotspot/jtreg/compiler/gcbarriers/TestAlwaysAtomicAccesses.java rename to test/hotspot/jtreg/runtime/8359166/Test.java index 4a874b84122..509a06a3de1 100644 --- a/test/hotspot/jtreg/compiler/gcbarriers/TestAlwaysAtomicAccesses.java +++ b/test/hotspot/jtreg/runtime/8359166/Test.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2026, IBM Corp. * 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,19 +23,17 @@ */ /* - * @test TestAlwaysAtomicAccesses - * @bug 8285301 - * @summary Test memory accesses from compiled code with AlwaysAtomicAccesses. - * @run main/othervm -Xcomp -XX:+UnlockExperimentalVMOptions -XX:+AlwaysAtomicAccesses - * compiler.membars.TestAlwaysAtomicAccesses + * @test + * @bug 8359166 + * @requires os.arch=="amd64" | os.arch=="x86_64" + * @requires vm.debug + * + * @run main/othervm + * -XX:-UseAddressNop -Xcomp -Xbatch -XX:-TieredCompilation Test */ -package compiler.membars; - -public class TestAlwaysAtomicAccesses { - +public class Test { public static void main(String[] args) { - // Nothing to do here. Compilations are triggered by -Xcomp. - System.out.println("Test passed"); + } } diff --git a/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java b/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java index eb0fd5f8be5..81ab75a9514 100644 --- a/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java +++ b/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java @@ -267,6 +267,13 @@ public class TestOptionsWithRanges { */ excludeTestMaxRange("CompileThresholdScaling"); + /* + * Do not test InitiatingHeapOccupancyPercent as it is an + * alias that will answer with the string G1IHOP. Remove this + * when the alias is removed. + */ + excludeTestRange("InitiatingHeapOccupancyPercent"); + List testSubset = getTestSubset(args); Asserts.assertGT(testSubset.size(), 0, "Options with ranges not found!"); diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java b/test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java index 6fe00498797..309a77ae7ef 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java @@ -29,6 +29,7 @@ * in the same directory as the libjvm.so file, in a subdirectory called .debug, or in the path specified * by the environment variable _JVM_DWARF_PATH, then no verification of the hs_err_file is done for libjvm.so. * @requires vm.debug == true & vm.flagless & vm.compMode != "Xint" & os.family == "linux" & !vm.graal.enabled & vm.gc.G1 + * @requires !vm.ubsan * @modules java.base/jdk.internal.misc * @run main/native/othervm -Xbootclasspath/a:. -XX:-CreateCoredumpOnCrash TestDwarf */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java index 2d26079fa0e..4534a609bb3 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java @@ -1,6 +1,6 @@ /* - * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2018, 2022 SAP. All rights reserved. + * Copyright (c) 2013, 2026, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2026 SAP. All rights reserved. * 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 @@ * @library /test/lib * @modules java.base/jdk.internal.misc * @requires vm.flagless + * @requires !vm.ubsan * @requires (vm.debug == true) * @requires os.family == "linux" * @run driver VeryEarlyAssertTest diff --git a/test/hotspot/jtreg/runtime/Metaspace/DefineClass.java b/test/hotspot/jtreg/runtime/Metaspace/DefineClass.java index 302bf7cdc73..9c7d1b5532a 100644 --- a/test/hotspot/jtreg/runtime/Metaspace/DefineClass.java +++ b/test/hotspot/jtreg/runtime/Metaspace/DefineClass.java @@ -193,7 +193,7 @@ public class DefineClass { private static int getStringIndex(String needle, byte[] buf, int offset) { outer: - for (int i = offset; i < buf.length - offset - needle.length(); i++) { + for (int i = offset; i <= buf.length - needle.length(); i++) { for (int j = 0; j < needle.length(); j++) { if (buf[i + j] != (byte)needle.charAt(j)) continue outer; } diff --git a/test/hotspot/jtreg/runtime/Nestmates/membership/TestNestmateMembership.java b/test/hotspot/jtreg/runtime/Nestmates/membership/TestNestmateMembership.java index 62bbcf7d5a7..4eddc765b51 100644 --- a/test/hotspot/jtreg/runtime/Nestmates/membership/TestNestmateMembership.java +++ b/test/hotspot/jtreg/runtime/Nestmates/membership/TestNestmateMembership.java @@ -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 @@ -680,7 +680,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNoHost with modifiers \"private static\""; + "TestNestmateMembership$TargetNoHost with private access"; try { Caller.invokeTargetNoHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -729,7 +729,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetSelfHost with modifiers \"private static\""; + "TestNestmateMembership$TargetSelfHost with private access"; try { Caller.invokeTargetSelfHostReflectively(); throw new Error("Missing IllegalAccessError: " + msg); @@ -776,7 +776,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class" + - " TestNestmateMembership$TargetMissingHost with modifiers \"private static\""; + " TestNestmateMembership$TargetMissingHost with private access"; try { Caller.invokeTargetMissingHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -831,7 +831,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class "+ - "TestNestmateMembership$TargetNotInstanceHost with modifiers \"private static\""; + "TestNestmateMembership$TargetNotInstanceHost with private access"; try { Caller.invokeTargetNotInstanceHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -878,7 +878,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNotOurHost with modifiers \"private static\""; + "TestNestmateMembership$TargetNotOurHost with private access"; try { Caller.invokeTargetNotOurHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -956,7 +956,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNoHost with modifiers \"private\""; + "TestNestmateMembership$TargetNoHost with private access"; try { Caller.newTargetNoHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1005,7 +1005,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetSelfHost with modifiers \"private\""; + "TestNestmateMembership$TargetSelfHost with private access"; try { Caller.newTargetSelfHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1052,7 +1052,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetMissingHost with modifiers \"private\""; + "TestNestmateMembership$TargetMissingHost with private access"; try { Caller.newTargetMissingHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1099,7 +1099,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNotInstanceHost with modifiers \"private\""; + "TestNestmateMembership$TargetNotInstanceHost with private access"; try { Caller.newTargetNotInstanceHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1146,7 +1146,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNotOurHost with modifiers \"private\""; + "TestNestmateMembership$TargetNotOurHost with private access"; try { Caller.newTargetNotOurHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1226,7 +1226,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNoHost with modifiers \"private static\""; + "TestNestmateMembership$TargetNoHost with private access"; try { Caller.getFieldTargetNoHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1275,7 +1275,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetSelfHost with modifiers \"private static\""; + "TestNestmateMembership$TargetSelfHost with private access"; try { Caller.getFieldTargetSelfHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1323,7 +1323,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetMissingHost with modifiers \"private static\""; + "TestNestmateMembership$TargetMissingHost with private access"; try { Caller.getFieldTargetMissingHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1371,7 +1371,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNotInstanceHost with modifiers \"private static\""; + "TestNestmateMembership$TargetNotInstanceHost with private access"; try { Caller.getFieldTargetNotInstanceHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1419,7 +1419,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNotOurHost with modifiers \"private static\""; + "TestNestmateMembership$TargetNotOurHost with private access"; try { Caller.getFieldTargetNotOurHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1496,7 +1496,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNoHost with modifiers \"private static\""; + "TestNestmateMembership$TargetNoHost with private access"; try { Caller.putFieldTargetNoHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1545,7 +1545,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetSelfHost with modifiers \"private static\""; + "TestNestmateMembership$TargetSelfHost with private access"; try { Caller.putFieldTargetSelfHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1593,7 +1593,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetMissingHost with modifiers \"private static\""; + "TestNestmateMembership$TargetMissingHost with private access"; try { Caller.putFieldTargetMissingHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1640,7 +1640,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNotInstanceHost with modifiers \"private static\""; + "TestNestmateMembership$TargetNotInstanceHost with private access"; try { Caller.putFieldTargetNotInstanceHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); @@ -1688,7 +1688,7 @@ public class TestNestmateMembership { check_expected(expected, msg); } msg = "class TestNestmateMembership$Caller cannot access a member of class " + - "TestNestmateMembership$TargetNotOurHost with modifiers \"private static\""; + "TestNestmateMembership$TargetNotOurHost with private access"; try { Caller.putFieldTargetNotOurHostReflectively(); throw new Error("Missing IllegalAccessException: " + msg); diff --git a/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTCacheConsistency.java b/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTCacheConsistency.java new file mode 100644 index 00000000000..a48051bb672 --- /dev/null +++ b/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTCacheConsistency.java @@ -0,0 +1,76 @@ +/* + * 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 + * @key randomness + * @summary AOTCacheConsistency This test checks that there is a CRC validation of the AOT Cache regions. + * @bug 8382166 + * @requires vm.cds.supports.aot.class.linking + * @library /test/lib /test/setup_aot + * @build jdk.test.whitebox.WhiteBox AOTCacheConsistency HelloWorld + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar HelloWorld + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AOTCacheConsistency + */ + +import jdk.test.lib.cds.CDSArchiveUtils; +import jdk.test.lib.cds.SimpleCDSAppTester; +import jdk.test.lib.process.OutputAnalyzer; +import java.io.File; + +public class AOTCacheConsistency { + public static void main(String args[]) throws Exception { + // Train and run the app + SimpleCDSAppTester tester = SimpleCDSAppTester.of("AOTCacheConsistency") + .classpath("app.jar") + .appCommandLine("HelloWorld") + .setProductionChecker((OutputAnalyzer out) -> { + out.shouldContain("HelloWorld"); + }) + .runAOTWorkflow(); + + String aotCache = tester.aotCacheFile(); + + String[] regions = CDSArchiveUtils.getRegions(); + String orig = aotCache + ".orig"; + CDSArchiveUtils.copyArchiveFile(new File(aotCache), orig); // save original copy + + // Modify each of the region individually. The production should fail to run + // with these args; + String extraVMArgs[] = {"-XX:+VerifySharedSpaces", "-XX:AOTMode=on"}; + tester.setCheckExitValue(false); + + for (int i = 0; i < regions.length; i++) { + File f = CDSArchiveUtils.copyArchiveFile(new File(orig), aotCache); + System.out.println("\n=======\nTesting region " + i + " = " + regions[i]); + if (CDSArchiveUtils.modifyRegionContent(i, f)) { + tester.setProductionChecker((OutputAnalyzer out) -> { + out.shouldContain("Checksum verification failed."); + }); + tester.rerunProduction(extraVMArgs); + } + } + } +} \ No newline at end of file diff --git a/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JcmdOnTrainingProcess.java b/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JcmdOnTrainingProcess.java new file mode 100644 index 00000000000..f0342d85773 --- /dev/null +++ b/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JcmdOnTrainingProcess.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2026, 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 + * @bug 8378894 + * @requires vm.cds.supports.aot.class.linking + * @requires vm.cds.write.archived.java.heap + * @summary Test the use of jcmd on a JVM process that's running in AOT training mode. + * @library /test/lib + * @build JcmdOnTrainingProcess + * @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 JcmdOnTrainingProcess + */ + +import java.io.IOException; + +import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.apps.LingeredApp; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +public class JcmdOnTrainingProcess { + public static void main(String[] args) throws Exception { + test_VM_native_memory(); + // Add other test cases here if needed in the future. + } + + static void test_VM_native_memory() throws Exception { + // In training run, we should not map any read-only regions. + OutputAnalyzer out = runJcmdOnTrainingProcess("VM.native_memory"); + out.shouldMatch("Shared class space .* readonly=0KB"); + } + + static OutputAnalyzer runJcmdOnTrainingProcess(String... cmds) throws Exception { + LingeredApp theApp = null; + try { + theApp = new LingeredApp(); + theApp.setUseDefaultClasspath(false); + LingeredApp.startApp(theApp, + "-cp", "LingeredApp.jar", + "-XX:AOTMode=record", + "-XX:AOTConfiguration=LingeredApp.aotconfig", + "-XX:NativeMemoryTracking=summary"); + long pid = theApp.getPid(); + + JDKToolLauncher jcmd = JDKToolLauncher.createUsingTestJDK("jcmd"); + jcmd.addToolArg(String.valueOf(pid)); + for (String cmd : cmds) { + jcmd.addToolArg(cmd); + } + + try { + OutputAnalyzer output = ProcessTools.executeProcess(jcmd.getCommand()); + output.shouldHaveExitValue(0); + return output; + } catch (Exception e) { + throw new RuntimeException("Test failed: " + e); + } + } catch (IOException e) { + throw new RuntimeException("Test failed: " + e); + } + finally { + LingeredApp.stopApp(theApp); + } + } +} diff --git a/test/hotspot/jtreg/runtime/cds/appcds/aotCode/AOTCodeCPUFeatureIncompatibilityTest.java b/test/hotspot/jtreg/runtime/cds/appcds/aotCode/AOTCodeCPUFeatureIncompatibilityTest.java index aa7becdb6f8..eebace23fea 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/aotCode/AOTCodeCPUFeatureIncompatibilityTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/aotCode/AOTCodeCPUFeatureIncompatibilityTest.java @@ -51,41 +51,77 @@ import jdk.test.whitebox.WhiteBox; import jdk.test.whitebox.cpuinfo.CPUInfo; public class AOTCodeCPUFeatureIncompatibilityTest { + enum IncompatibilityMode { + MISSING, + ADDITIONAL + } public static void main(String... args) throws Exception { + int mode; List cpuFeatures = CPUInfo.getFeatures(); if (Platform.isX64()) { // Minimum value of UseSSE required by JVM is 2. So the production run has to be executed with UseSSE=2. // To simulate the case of incmpatible SSE feature, we can run this test only on system with higher SSE level (sse3 or above). if (isSSE3Supported(cpuFeatures)) { - testIncompatibleFeature("-XX:UseSSE=2", "sse3"); + testIncompatibleFeature("-XX:UseSSE=2", "sse3", IncompatibilityMode.MISSING); + testIncompatibleFeature("-XX:UseSSE=2", "sse3", IncompatibilityMode.ADDITIONAL); } if (isAVXSupported(cpuFeatures)) { - testIncompatibleFeature("-XX:UseAVX=0", "avx"); + testIncompatibleFeature("-XX:UseAVX=0", "avx", IncompatibilityMode.MISSING); + testIncompatibleFeature("-XX:UseAVX=0", "avx", IncompatibilityMode.ADDITIONAL); + } + } else if (Platform.isAArch64()) { + if (isCRC32Supported(cpuFeatures)) { + testIncompatibleFeature("-XX:-UseCRC32", "crc32", IncompatibilityMode.MISSING); + testIncompatibleFeature("-XX:-UseCRC32", "crc32", IncompatibilityMode.ADDITIONAL); } } } // vmOption = command line option to disable CPU feature // featureName = name of the CPU feature used by the JVM in the log messages - public static void testIncompatibleFeature(String vmOption, String featureName) throws Exception { + public static void testIncompatibleFeature(String vmOption, String featureName, IncompatibilityMode mode) throws Exception { new CDSAppTester("AOTCodeCPUFeatureIncompatibilityTest") { @Override public String[] vmArgs(RunMode runMode) { - if (runMode == RunMode.PRODUCTION) { - return new String[] {vmOption, "-Xlog:aot+codecache*=debug"}; - } else { - return new String[] {"-Xlog:aot+codecache*=debug"}; + if (runMode == RunMode.ASSEMBLY) { + if (mode == IncompatibilityMode.MISSING) { + return new String[] {"-Xlog:aot+codecache*=debug"}; + } else { + return new String[] {vmOption, "-Xlog:aot+codecache*=debug"}; + } + } else if (runMode == RunMode.PRODUCTION) { + if (mode == IncompatibilityMode.MISSING) { + return new String[] {vmOption, + "-XX:+UnlockDiagnosticVMOptions", + // Prevent exiting VM on failure + "-XX:-AbortVMOnAOTCodeFailure", + "-Xlog:aot+codecache*=debug"}; + } else { + return new String[] {"-XX:+UnlockDiagnosticVMOptions", + // Prevent exiting VM on failure + "-XX:-AbortVMOnAOTCodeFailure", + "-Xlog:aot+codecache*=debug"}; + } } + return new String[]{}; } @Override public void checkExecution(OutputAnalyzer out, RunMode runMode) throws Exception { if (runMode == RunMode.ASSEMBLY || runMode == RunMode.PRODUCTION) { - out.shouldMatch("CPU features recorded in AOTCodeCache:.*" + featureName + ".*"); + if (mode == IncompatibilityMode.MISSING) { + out.shouldMatch("CPU features recorded in AOTCodeCache:.*" + featureName + ".*"); + } else { + out.shouldNotMatch("CPU features recorded in AOTCodeCache:.*" + featureName + ".*"); + } } if (runMode == RunMode.PRODUCTION) { - out.shouldMatch("AOT Code Cache disabled: required cpu features are missing:.*" + featureName + ".*"); - out.shouldContain("Unable to use AOT Code Cache"); + out.shouldMatch("AOT Code Cache disabled: cpu features are incompatible"); + if (mode == IncompatibilityMode.MISSING) { + out.shouldMatch("cpu features that are required:.*" + featureName + ".*"); + } else { + out.shouldMatch("cpu features that are additional:.*" + featureName + ".*"); + } } } @Override @@ -108,4 +144,9 @@ public class AOTCodeCPUFeatureIncompatibilityTest { static boolean isAVXSupported(List cpuFeatures) { return cpuFeatures.contains("avx"); } + + // Only used on aarch64 platofrm + static boolean isCRC32Supported(List cpuFeatures) { + return cpuFeatures.contains("crc32"); + } } diff --git a/test/hotspot/jtreg/runtime/cds/appcds/aotCode/AOTCodeCompressedOopsTest.java b/test/hotspot/jtreg/runtime/cds/appcds/aotCode/AOTCodeCompressedOopsTest.java index 0fe11235749..9ca8ba9ed91 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/aotCode/AOTCodeCompressedOopsTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/aotCode/AOTCodeCompressedOopsTest.java @@ -134,6 +134,7 @@ public class AOTCodeCompressedOopsTest { case RunMode.PRODUCTION: { List args = getVMArgsForHeapConfig(zeroBaseInProdPhase, zeroShiftInProdPhase); args.addAll(List.of("-XX:+UnlockDiagnosticVMOptions", + "-XX:-AbortVMOnAOTCodeFailure", "-Xlog:aot=info", // we need this to parse CompressedOops settings "-Xlog:aot+codecache+init=debug", "-Xlog:aot+codecache+exit=debug")); diff --git a/test/hotspot/jtreg/runtime/interpreter/PopFrameMethodNameInvariantTest.java b/test/hotspot/jtreg/runtime/interpreter/PopFrameMethodNameInvariantTest.java new file mode 100644 index 00000000000..bd02227c464 --- /dev/null +++ b/test/hotspot/jtreg/runtime/interpreter/PopFrameMethodNameInvariantTest.java @@ -0,0 +1,119 @@ +/* + * 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. + */ + +package runtime.interpreter; + +import com.sun.jdi.Bootstrap; +import com.sun.jdi.VirtualMachine; +import com.sun.jdi.connect.Connector; +import com.sun.jdi.connect.IllegalConnectorArgumentsException; +import com.sun.jdi.connect.LaunchingConnector; +import com.sun.jdi.connect.VMStartException; +import com.sun.jdi.event.BreakpointEvent; +import com.sun.jdi.event.ClassPrepareEvent; +import com.sun.jdi.event.Event; +import com.sun.jdi.event.EventSet; +import com.sun.jdi.request.ClassPrepareRequest; +import com.sun.jdi.request.EventRequestManager; +import jdk.test.lib.Utils; + +import java.io.IOException; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandleHelper; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; +import java.nio.file.Path; +import java.util.Map; + +/* + * @test + * @bug 8380080 + * @summary MemberName in local0 must be preserved when PopFrame re-executes direct MethodHandles.linkToStatic + * @requires vm.jvmti + * @requires vm.flavor != "zero" + * @library ../../compiler/jsr292/patches /test/lib + * @modules java.base/jdk.internal.vm.annotation + * jdk.jdi + * @build java.base/java.lang.invoke.MethodHandleHelper + * @run driver runtime.interpreter.PopFrameMethodNameInvariantTest + */ + +public class PopFrameMethodNameInvariantTest { + public static class Target { + static void body(float x) {} + public static void main(String[] args) throws Throwable { + MethodHandle target = MethodHandles.lookup().findStatic( + Target.class, + "body", + MethodType.methodType(void.class, float.class)); + Object name = MethodHandleHelper.internalMemberName(target); + MethodHandleHelper.linkToStatic(name, (float)1.0); + } + } + + public static void main(String[] args) throws Exception { + VirtualMachine vm = getVm(); + EventRequestManager eventRequestManager = vm.eventRequestManager(); + ClassPrepareRequest classPrepareRequest = eventRequestManager.createClassPrepareRequest(); + classPrepareRequest.addClassFilter(Target.class.getName()); + classPrepareRequest.enable(); + outerLoop: + while (true) { + EventSet eventSet = vm.eventQueue().remove(); + for (Event event : eventSet) { + if (event instanceof ClassPrepareEvent prepareEvent) { + eventRequestManager.createBreakpointRequest( + prepareEvent.referenceType() + .methodsByName("body") + .get(0) + .location() + ).enable(); + } + if (event instanceof BreakpointEvent breakpointEvent) { + breakpointEvent.request().disable(); + breakpointEvent.thread().popFrames(breakpointEvent.thread().frame(0)); + eventSet.resume(); + break outerLoop; + } + } + eventSet.resume(); + } + int exitCode = vm.process().waitFor(); + if (exitCode != 0) { + throw new RuntimeException("Debugee exited with code " + exitCode); + } + } + + private static VirtualMachine getVm() throws IOException, IllegalConnectorArgumentsException, VMStartException { + LaunchingConnector connector = Bootstrap.virtualMachineManager().defaultConnector(); + Map argumentMap = connector.defaultArguments(); + argumentMap.get("main").setValue(Target.class.getName()); + String options = String.join(" ", Utils.getTestJavaOpts()); + String patchPath = System.getProperty("test.patch.path"); + if (patchPath != null) { + options += " --patch-module=java.base=\"" + Path.of(patchPath, "java.base") + "\""; + } + argumentMap.get("options").setValue((options + " -Xint").trim()); + return connector.launch(argumentMap); + } +} diff --git a/test/hotspot/jtreg/runtime/interpreter/TraceBytecodesSignatures.java b/test/hotspot/jtreg/runtime/interpreter/TraceBytecodesSignatures.java new file mode 100644 index 00000000000..a7881582d8c --- /dev/null +++ b/test/hotspot/jtreg/runtime/interpreter/TraceBytecodesSignatures.java @@ -0,0 +1,194 @@ +/* + * 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 8370102 + * @requires vm.debug + * @library / /test/lib + * @summary Test to ensure the signatures in -XX:+TraceBytecodes are printed in edge cases + * @run driver TraceBytecodesSignatures + */ + +import java.io.IOException; +import java.util.List; + +import jdk.test.lib.Utils; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +public class TraceBytecodesSignatures { + + public static void main(String[] args) + throws InterruptedException, IOException { + if (args.length == 1 && "worker".equals(args[0])) { + runTest(); + return; + } + // Enable byteocde tracing but disable compilation of the key methods + // that we will trace. + String[] processArgs = new String[] { + "-XX:+TraceBytecodes", + exclude("runTest"), + exclude("testSameMethod"), + exclude("testSameMethodHelper"), + excludeConstructor(), + exclude("testSelfRecursive"), + exclude("testSelfRecursiveHelper"), + klass(), + "worker" + }; + // Create a VM process and trace its bytecodes. + ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(processArgs); + OutputAnalyzer oa = new OutputAnalyzer(pb.start()) + .shouldHaveExitValue(0); + analyze(oa.stdoutAsLines()); + } + + private static void runTest() { + testSameMethod(true); + testSameMethod(false); + new TestConstructor(); + new TestConstructor(); + testSelfRecursive(3); + } + + // Expect 3 signature prints: + // 1. The first call + // 2. The first call switch back after the helper is called + // 3. The second call + private static final int EXPECTED_SAME_METHOD = 3; + + // Expect 2 signature prints: + // 1. The first call of the no-arg constructor + // 2. Switch back after calling the 1-arg constructor + // 3. The second call of the no-arg constructor + // 4. Switch back again + private static final int EXPECTED_CONSTRUCTOR = 4; + + // Expect 10 signature prints: + // 1. The first recursive call + // 2. The first switch back after the helper is called. + // 3. The second recursive call + // 4. The second switch back + // 5. The third recursive call + // 6. The third switch back + // 7. The fourth recursive call: base case hit + // 8-10. Switch back to i=1, i=2, i=3, respectively + private static final int EXPECTED_SELF_RECURSIVE_METHOD = 10; + + // Ensure that the expected signatures are printed the correct nr of times. + // The signatures here need to be changed if any of the test code is changed. + private static void analyze(List lines) { + System.out.println("Analyzing " + lines.size() + " lines"); + int testSameMethodCount = 0; + int testConstructorCount = 0; + int testSelfRecursiveCount = 0; + for (String line : lines) { + if (line.contains("static void TraceBytecodesSignatures.testSameMethod(jboolean)")) { + testSameMethodCount++; + } else if (line.contains("virtual void TraceBytecodesSignatures$TestConstructor.()")) { + testConstructorCount++; + } else if (line.contains("static void TraceBytecodesSignatures.testSelfRecursive(jint)")) { + testSelfRecursiveCount++; + } + } + if (testSameMethodCount != EXPECTED_SAME_METHOD) { + throw new RuntimeException("testSameMethod: " + + EXPECTED_SAME_METHOD + + " != " + + testSameMethodCount); + } + if (testConstructorCount != EXPECTED_CONSTRUCTOR) { + throw new RuntimeException("testConstructor: " + + EXPECTED_CONSTRUCTOR + + " != " + + testConstructorCount); + } + if (testSelfRecursiveCount != EXPECTED_SELF_RECURSIVE_METHOD) { + throw new RuntimeException("testSelfRecursive: " + + EXPECTED_SELF_RECURSIVE_METHOD + + " != " + + testSelfRecursiveCount); + } + } + + // Use a variable to do some arithmetic on to represent work. + // This work should not produce method invocations, hence integer arithmetic. + private static int globalState = 0; + + private static void testSameMethod(boolean other) { + globalState = 1; + if (other) { + testSameMethodHelper(); + } + globalState = 1; + } + + private static void testSameMethodHelper() { + globalState = 5; + } + + private static final class TestConstructor { + // Represents some kind of mutable state, not necessarily a object attribute. + private static String foo = "test"; + + public TestConstructor() { + this("bar"); + } + + public TestConstructor(String other) { + foo = other; + } + } + + private static void testSelfRecursive(int i) { + if (i == 0) { + return; + } + globalState += 2; + // Ensure to generate another method call within the recursive method. + // This will trigger the method switches more often. + testSelfRecursiveHelper(); + globalState -= 2; + testSelfRecursive(i - 1); + } + + private static void testSelfRecursiveHelper() { + globalState = -1; + } + + // CompileCommand is accepted even if the VM does not use JIT compilation. + private static String exclude(String methodName) { + return "-XX:CompileCommand=exclude," + klass() + "." + methodName; + } + + private static String excludeConstructor() { + return "-XX:CompileCommand=exclude," + klass() + "$TestConstructor."; + } + + private static String klass() { + return TraceBytecodesSignatures.class.getName(); + } +} diff --git a/test/hotspot/jtreg/runtime/jni/critical/SuspendInCritical.java b/test/hotspot/jtreg/runtime/jni/critical/SuspendInCritical.java new file mode 100644 index 00000000000..47ece0f1857 --- /dev/null +++ b/test/hotspot/jtreg/runtime/jni/critical/SuspendInCritical.java @@ -0,0 +1,212 @@ +/* + * 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 8373839 + * @requires vm.jvmti + * @library /test/lib + * @run main/othervm/native -agentlib:SuspendInCritical SuspendInCritical 1 + * @run main/othervm/native -agentlib:SuspendInCritical SuspendInCritical 2 + * @run main/othervm/native -agentlib:SuspendInCritical SuspendInCritical 3 + */ +import jdk.test.lib.Asserts; + +import java.util.concurrent.CountDownLatch; + +public class SuspendInCritical { + + static { + System.loadLibrary("SuspendInCritical"); + } + + static native void suspendThread(Thread t); + static native void resumeThread(Thread t); + static native boolean isSuspended(Thread t); + + static native void doCritical(byte[] b, String str); + static native void leaveCriticalNative(); + static native long getNativeCounter(); + + static volatile boolean suspendStarted = false; + static volatile boolean suspendCompleted = false; + static volatile boolean canTerminate = false; + + /* + * Incoming arg sets the mode: + * - 1: GetPrimitiveArrayCritical only + * - 2: GetStringCritical only + * - 3: Do both so we have a nested critical region + */ + public static void main(String[] args) throws Throwable { + int mode = Integer.parseInt(args[0]); + final byte[] bytes = (mode == 1 || mode == 3) ? new byte[16] : null; + final String str = (mode == 2 || mode == 3) ? "A String" : null; + + final Thread t = new Thread() { + public void run() { + System.out.println("CriticalThread calling native ..."); + doCritical(bytes, str); + System.out.println("CriticalThread return from native ..."); + // delay termination so we can check the suspend state + // from another thread + while (!canTerminate) { + delay(10); + } + System.out.println("CriticalThread terminating"); + } + }; + t.setName("CriticalThread"); + + System.out.println("main thread starting CriticalThread"); + + // Start the target thread. It will enter a JNI critical region + // and stay executing native code until released. + t.start(); + + // Check that the counter is progressing + checkNativeCounter(); + + System.out.println("main thread saw CriticalThread executing and is starting SuspenderThread"); + + // Now start the suspender thread. + Thread s = new Thread() { + public void run() { + suspendStarted = true; + System.out.println("SuspenderThread calling suspend ..."); + // This will block until t is out of the critical region + suspendThread(t); + suspendCompleted = true; + + System.out.println("SuspenderThread checking suspend ..."); + // Verify t is suspended + Asserts.assertTrue(isSuspended(t), "not suspended"); + + System.out.println("SuspenderThread calling resume ..."); + // Resume t + resumeThread(t); + + System.out.println("SuspenderThread checking not suspended ..."); + Asserts.assertFalse(isSuspended(t), "suspended"); + + System.out.println("SuspenderThread allowing target to terminate ..."); + // Allow t to terminate + canTerminate = true; + System.out.println("SuspenderThread terminatng"); + } + }; + s.setName("SuspenderThread"); + s.start(); + + while (!suspendStarted) { + delay(2); + } + + // Check suspender is blocked + checkSuspenderIsBlocked(); + + System.out.println("main thread confirms SuspenderThread is blocked in suspend()"); + + // Check target is still progressing + checkNativeCounter(); + + System.out.println("main thread saw CriticalThread still executing and has enabled the upcall"); + + // Allow target to proceed to Java upcall + leaveCriticalNative(); + + // Wait till target is in Java upcall + waitForUpcall(); + + System.out.println("main thread saw CriticalThread in upcall"); + + // Check suspender is blocked + checkSuspenderIsBlocked(); + + System.out.println("main thread confirms SuspenderThread is still blocked in suspend()"); + + // Check target is still executing + checkUpcallCount(); + + System.out.println("main thread confirms CriticalThread is still executing and will let it return and be suspended"); + + // Check suspender is still blocked + checkSuspenderIsBlocked(); + + // Allow target to return from Java and exit critical + upcallDone = true; + + // The suspension can now proceed, then both threads will terminate + t.join(); + s.join(); + System.out.println("main thread terminating"); + } + + static void checkNativeCounter() { + long counter = getNativeCounter(); + // If the counter never progresses then the test will timeout + while (counter == getNativeCounter()) { + delay(5); + } + } + + static void checkSuspenderIsBlocked() { + delay(200); + Asserts.assertTrue(!suspendCompleted,"Unexpected suspend completion"); + } + + static volatile boolean upcallDone = false; + static volatile long upcallCounter = 0; + static CountDownLatch inUpcall = new CountDownLatch(1); + + static void waitForUpcall() throws InterruptedException { + inUpcall.await(); + } + + static void upcall() { + inUpcall.countDown(); + System.out.println("CriticalThread is executing upcall"); + while (!upcallDone) { + upcallCounter++; + delay(1); + } + } + + static void checkUpcallCount() { + long count = upcallCounter; + // If the counter never progresses then the test will timeout + while (count == upcallCounter) { + delay(5); + } + } + + static void delay(long ms) { + try { + Thread.sleep(ms); + } + catch (InterruptedException ex) { + throw new Error("interrupted!"); + } + } + +} diff --git a/test/hotspot/jtreg/runtime/jni/critical/libSuspendInCritical.cpp b/test/hotspot/jtreg/runtime/jni/critical/libSuspendInCritical.cpp new file mode 100644 index 00000000000..0c5e95de611 --- /dev/null +++ b/test/hotspot/jtreg/runtime/jni/critical/libSuspendInCritical.cpp @@ -0,0 +1,146 @@ +/* + * 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. + */ + +#include +#include +#include +#include +#include + +#include "jvmti.h" +#include "jvmti_common.hpp" + +static jvmtiEnv* jvmti = nullptr; + +static std::atomic stay_in_critical_native{JNI_TRUE}; +static std::atomic native_counter{0}; + +extern "C" { + +JNIEXPORT void JNICALL +Java_SuspendInCritical_suspendThread(JNIEnv* jni, jclass cls, jthread t) { + suspend_thread(jvmti, jni, t); +} + +JNIEXPORT void JNICALL +Java_SuspendInCritical_resumeThread(JNIEnv* jni, jclass cls, jthread t) { + resume_thread(jvmti, jni, t); +} + +JNIEXPORT jboolean JNICALL +Java_SuspendInCritical_isSuspended(JNIEnv* jni, jclass cls, jthread t) { + jint state = get_thread_state(jvmti, jni, t); + return (state & JVMTI_THREAD_STATE_SUSPENDED) != 0; +} + +JNIEXPORT void JNICALL +Java_SuspendInCritical_leaveCriticalNative(JNIEnv* jni, jclass cls) { + stay_in_critical_native = JNI_FALSE; +} + +JNIEXPORT jlong JNICALL +Java_SuspendInCritical_getNativeCounter(JNIEnv* jni, jclass cls) { + return native_counter; +} + +JNIEXPORT void JNICALL + Java_SuspendInCritical_doCritical(JNIEnv* jni, jclass cls, jbyteArray bytes, jstring str) { + jboolean is_copy = JNI_FALSE; + jbyte* b; + if (bytes != nullptr) { + LOG("CriticalThread doing GetPrimitiveArrayCritical\n"); + b = (jbyte*) jni->GetPrimitiveArrayCritical(bytes, &is_copy); + if (b == nullptr) { + jni->FatalError("GetPrimitiveArrayCritical returned null!"); + } + } + + const jchar* c; + if (str != nullptr) { + LOG("CriticalThread doing GetStringCritical\n"); + c = jni->GetStringCritical(str, &is_copy); + if (c == nullptr) { + jni->FatalError("GetStringCritical returned null!"); + } + } + + LOG("CriticalThread should now be in deferred suspension\n"); + // Do some visible work + while (stay_in_critical_native) { + native_counter++; + sleep_ms(1); + } + + LOG("CriticalThread released for Java upcall\n"); + // Now perform the Java upcall + jmethodID upcall_mid = jni->GetStaticMethodID(cls, "upcall", "()V"); + if (upcall_mid == nullptr) { + // Unexpected exception - let it propagate + if (bytes != nullptr) { + jni->ReleasePrimitiveArrayCritical(bytes, b, 0); + } + if (str != nullptr) { + jni->ReleaseStringCritical(str, c); + } + return; + } + jni->CallStaticVoidMethod(cls, upcall_mid); + + if (bytes != nullptr) { + jni->ReleasePrimitiveArrayCritical(bytes, b, 0); + } + if (str != nullptr) { + jni->ReleaseStringCritical(str, c); + } + + // Now we should suspend as we return to Java + LOG("CriticalThread returning to Java\n"); +} + +/** Agent library initialization. */ + +JNIEXPORT jint JNICALL +Agent_OnLoad(JavaVM *jvm, char *options, void *reserved) { + LOG("\nAgent_OnLoad started\n"); + + // create JVMTI environment + if (jvm->GetEnv((void **) (&jvmti), JVMTI_VERSION_1_1) != JNI_OK) { + LOG("Wrong result of a valid call to GetEnv!\n"); + return JNI_ERR; + } + + // add specific capabilities for suspending thread + jvmtiCapabilities suspendCaps; + memset(&suspendCaps, 0, sizeof(suspendCaps)); + suspendCaps.can_suspend = 1; + + jvmtiError err = jvmti->AddCapabilities(&suspendCaps); + if (err != JVMTI_ERROR_NONE) { + LOG("(AddCapabilities) unexpected error: %s (%d)\n", TranslateError(err), err); + return JNI_ERR; + } + LOG("Agent_OnLoad finished\n"); + return JNI_OK; +} + +} // extern C diff --git a/test/hotspot/jtreg/runtime/reflect/ReflectOutOfMemoryError.java b/test/hotspot/jtreg/runtime/reflect/ReflectOutOfMemoryError.java index 69cfade4521..42f386d3f09 100644 --- a/test/hotspot/jtreg/runtime/reflect/ReflectOutOfMemoryError.java +++ b/test/hotspot/jtreg/runtime/reflect/ReflectOutOfMemoryError.java @@ -38,7 +38,8 @@ public class ReflectOutOfMemoryError { try { // Repository for objects, which should be allocated: int index = 0; - for (int size = 1 << 30; size > 0 && pool == null; size >>= 1) + // Halving loop starting from max possible size constrained by max heap size + for (int size = (int)(Runtime.getRuntime().maxMemory()>>2); size > 0 && pool == null; size >>= 1) try { pool = new Object[size]; } catch (OutOfMemoryError oome) { diff --git a/test/hotspot/jtreg/runtime/vthread/RedefineClass.java b/test/hotspot/jtreg/runtime/vthread/RedefineClass.java index 33a9d52a523..b17bb55701b 100644 --- a/test/hotspot/jtreg/runtime/vthread/RedefineClass.java +++ b/test/hotspot/jtreg/runtime/vthread/RedefineClass.java @@ -120,7 +120,7 @@ public class RedefineClass { private static int getStringIndex(String needle, byte[] buf, int offset) { outer: - for (int i = offset; i < buf.length - offset - needle.length(); i++) { + for (int i = offset; i <= buf.length - needle.length(); i++) { for (int j = 0; j < needle.length(); j++) { if (buf[i + j] != (byte)needle.charAt(j)) continue outer; } diff --git a/test/hotspot/jtreg/serviceability/dcmd/compiler/CodeCacheTest.java b/test/hotspot/jtreg/serviceability/dcmd/compiler/CodeCacheTest.java index 157c1713ec2..ab459f31931 100644 --- a/test/hotspot/jtreg/serviceability/dcmd/compiler/CodeCacheTest.java +++ b/test/hotspot/jtreg/serviceability/dcmd/compiler/CodeCacheTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2024, 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 CodeCacheTest - * @bug 8054889 + * @bug 8054889 8307537 * @library /test/lib * @modules java.base/jdk.internal.misc * java.compiler @@ -57,26 +57,30 @@ public class CodeCacheTest { * * CodeCache: size=245760Kb used=1366Kb max_used=1935Kb free=244393Kb * bounds [0x00007ff4d89f2000, 0x00007ff4d8c62000, 0x00007ff4e79f2000] - * total_blobs=474, nmethods=87, adapters=293, full_count=0 + * blobs=474, nmethods=87, adapters=293, full_count=0 * Compilation: enabled, stopped_count=0, restarted_count=0 * * Expected output with code cache segmentation (number of segments may change): * - * CodeHeap 'non-profiled nmethods': size=118592Kb used=29Kb max_used=29Kb free=118562Kb - * bounds [0x00007f09f8622000, 0x00007f09f8892000, 0x00007f09ff9f2000] - * CodeHeap 'profiled nmethods': size=118588Kb used=80Kb max_used=80Kb free=118507Kb - * bounds [0x00007f09f09f2000, 0x00007f09f0c62000, 0x00007f09f7dc1000] - * CodeHeap 'non-nmethods': size=8580Kb used=1257Kb max_used=1833Kb free=7323Kb - * bounds [0x00007f09f7dc1000, 0x00007f09f8031000, 0x00007f09f8622000] - * CodeCache: size=245760Kb, used=1366Kb, max_used=1942Kb, free=244392Kb - * total_blobs=474, nmethods=87, adapters=293, full_count=0 + * CodeHeap 'non-profiled nmethods': size=118592Kb used=370Kb max_used=370Kb free=118221Kb + * bounds [0x00007f2093d3a000, 0x00007f2093faa000, 0x00007f209b10a000] + * blobs=397, nmethods=397, adapters=0, full_count=0 + * CodeHeap 'profiled nmethods': size=118592Kb used=2134Kb max_used=2134Kb free=116457Kb + * bounds [0x00007f208c109000, 0x00007f208c379000, 0x00007f20934d9000] + * blobs=1091, nmethods=1091, adapters=0, full_count=0 + * CodeHeap 'non-nmethods': size=8580Kb used=4461Kb max_used=4506Kb free=4118Kb + * bounds [0x00007f20934d9000, 0x00007f2093949000, 0x00007f2093d3a000] + * blobs=478, nmethods=0, adapters=387, full_count=0 + * CodeCache: size=245764Kb, used=6965Kb, max_used=7010Kb, free=238796Kb + * total blobs=1966, nmethods=1488, adapters=387, full_count=0 * Compilation: enabled, stopped_count=0, restarted_count=0 */ static Pattern line1 = Pattern.compile("(CodeCache|CodeHeap.*): size=(\\p{Digit}*)Kb used=(\\p{Digit}*)Kb max_used=(\\p{Digit}*)Kb free=(\\p{Digit}*)Kb"); static Pattern line2 = Pattern.compile(" bounds \\[0x(\\p{XDigit}*), 0x(\\p{XDigit}*), 0x(\\p{XDigit}*)\\]"); - static Pattern line3 = Pattern.compile(" total_blobs=(\\p{Digit}*), nmethods=(\\p{Digit}*), adapters=(\\p{Digit}*), full_count=(\\p{Digit}*)"); - static Pattern line4 = Pattern.compile("Compilation: (.*?), stopped_count=(\\p{Digit}*), restarted_count=(\\p{Digit}*)"); + static Pattern line3 = Pattern.compile(" blobs=(\\p{Digit}*), nmethods=(\\p{Digit}*), adapters=(\\p{Digit}*), full_count=(\\p{Digit}*)"); + static Pattern line4 = Pattern.compile(" total blobs=(\\p{Digit}*), nmethods=(\\p{Digit}*), adapters=(\\p{Digit}*), full_count=(\\p{Digit}*)"); + static Pattern line5 = Pattern.compile("Compilation: (.*?), stopped_count=(\\p{Digit}*), restarted_count=(\\p{Digit}*)"); private static boolean getFlagBool(String flag, String where) { Matcher m = Pattern.compile(flag + "\\s+:?= (true|false)").matcher(where); @@ -118,6 +122,9 @@ public class CodeCacheTest { String line; Matcher m; int matchedCount = 0; + int totalBlobs = 0; + int totalNmethods = 0; + int totalAdapters = 0; while (true) { // Validate first line line = lines.next(); @@ -151,6 +158,33 @@ public class CodeCacheTest { } else { Assert.fail("Regexp 2 failed to match line: " + line); } + + // Validate third line + line = lines.next(); + m = line3.matcher(line); + if (m.matches()) { + int blobs = Integer.parseInt(m.group(1)); + if (blobs < 0) { + Assert.fail("Failed parsing dcmd codecache output"); + } + totalBlobs += blobs; + int nmethods = Integer.parseInt(m.group(2)); + if (nmethods < 0) { + Assert.fail("Failed parsing dcmd codecache output"); + } + totalNmethods += nmethods; + int adapters = Integer.parseInt(m.group(3)); + if (adapters < 0) { + Assert.fail("Failed parsing dcmd codecache output"); + } + totalAdapters += adapters; + if (blobs < (nmethods + adapters)) { + Assert.fail("Failed parsing dcmd codecache output"); + } + } else { + Assert.fail("Regexp 3 failed to match line: " + line); + } + ++matchedCount; } // Because of CodeCacheExtensions, we could match more than expected @@ -161,32 +195,33 @@ public class CodeCacheTest { if (segmentsCount != 1) { // Skip this line CodeCache: size=245760Kb, used=5698Kb, max_used=5735Kb, free=240059Kb line = lines.next(); - } - // Validate third line - m = line3.matcher(line); - if (m.matches()) { - int blobs = Integer.parseInt(m.group(1)); - if (blobs <= 0) { - Assert.fail("Failed parsing dcmd codecache output"); + + // Validate fourth line + m = line4.matcher(line); + if (m.matches()) { + int blobs = Integer.parseInt(m.group(1)); + if (blobs != totalBlobs) { + Assert.fail("Failed parsing dcmd codecache output"); + } + int nmethods = Integer.parseInt(m.group(2)); + if (nmethods != totalNmethods) { + Assert.fail("Failed parsing dcmd codecache output"); + } + int adapters = Integer.parseInt(m.group(3)); + if (adapters != totalAdapters) { + Assert.fail("Failed parsing dcmd codecache output"); + } + if (blobs < (nmethods + adapters)) { + Assert.fail("Failed parsing dcmd codecache output"); + } + } else { + Assert.fail("Regexp 4 failed to match line: " + line); } - int nmethods = Integer.parseInt(m.group(2)); - if (nmethods < 0) { - Assert.fail("Failed parsing dcmd codecache output"); - } - int adapters = Integer.parseInt(m.group(3)); - if (adapters <= 0) { - Assert.fail("Failed parsing dcmd codecache output"); - } - if (blobs < (nmethods + adapters)) { - Assert.fail("Failed parsing dcmd codecache output"); - } - } else { - Assert.fail("Regexp 3 failed to match line: " + line); + line = lines.next(); } - // Validate fourth line - line = lines.next(); - m = line4.matcher(line); + // Validate last line + m = line5.matcher(line); if (m.matches()) { if (!m.group(1).contains("enabled") && !m.group(1).contains("disabled")) { Assert.fail("Failed parsing dcmd codecache output"); @@ -200,7 +235,7 @@ public class CodeCacheTest { Assert.fail("Failed parsing dcmd codecache output"); } } else { - Assert.fail("Regexp 4 failed to match line: " + line); + Assert.fail("Regexp 5 failed to match line: " + line); } } diff --git a/test/hotspot/jtreg/serviceability/jvmti/SuspendWithObjectMonitorTimedWait/SuspendWithObjectMonitorTimedWait.java b/test/hotspot/jtreg/serviceability/jvmti/SuspendWithObjectMonitorTimedWait/SuspendWithObjectMonitorTimedWait.java new file mode 100644 index 00000000000..a64275c70f3 --- /dev/null +++ b/test/hotspot/jtreg/serviceability/jvmti/SuspendWithObjectMonitorTimedWait/SuspendWithObjectMonitorTimedWait.java @@ -0,0 +1,162 @@ +/* + * 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 jvmti.JVMTIUtils; +import java.lang.management.ManagementFactory; +import java.lang.management.ThreadInfo; +import java.util.Arrays; +import java.util.concurrent.Phaser; + +import static jdk.test.lib.Asserts.assertTrue; + +/** + * @test + * @bug 8382088 + * @summary Check that a thread suspended at a timed wait() call does not re-acquire the monitor before it is resumed. + * @requires vm.jvmti + * @library /test/lib /test/hotspot/jtreg/testlibrary + * @run main/othervm/native SuspendWithObjectMonitorTimedWait + */ + +public class SuspendWithObjectMonitorTimedWait { + static final Object lock = new Object(); + static long timeout = 10; // milliseconds + static int maxRetries = 200; + static long waitForTimedWaitingMills = timeout * 2; + + private static boolean waitUntilTimedWaiting(Thread thread, long deadlineNs) { + while (System.nanoTime() < deadlineNs) { + if (thread.getState() == Thread.State.TIMED_WAITING) { + return true; + } + Thread.onSpinWait(); + } + return false; + } + + public static void main(String[] args) throws RuntimeException { + long failureCounter = 0; + System.out.println("Timeout = " + timeout + " msc."); + + Phaser phaser = new Phaser(2); + waitTask task = new waitTask(phaser); + Thread targetThread = Thread.ofPlatform().name("Target Thread").unstarted(task); + + targetThread.start(); + + System.out.println("Target Thread started"); + + int usefulRuns = 0; + for (int n = 0; n < maxRetries; ++n) { + + phaser.arriveAndAwaitAdvance(); + + long deadlineNanos = System.nanoTime() + waitForTimedWaitingMills * 1_000_000L; + if (!waitUntilTimedWaiting(targetThread, deadlineNanos)) { + continue; + } + + boolean grabbedMonitor = false; + + JVMTIUtils.suspendThread(targetThread); + try { + grabbedMonitor = hasGrabbedMonitor(targetThread); + + if (grabbedMonitor) { + // Cannot assert anything here. + continue; + } + + usefulRuns += 1; + + try { + Thread.sleep(2 * timeout); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + + // Check if the target still does not own monitors + grabbedMonitor = hasGrabbedMonitor(targetThread); + + if (grabbedMonitor) { + System.out.println("Grabbed the monitor on iteration " + n); + failureCounter++; + } + } finally { + JVMTIUtils.resumeThread(targetThread); + } + } + + phaser.arriveAndAwaitAdvance(); + + // wait for targetThread finish + try { + targetThread.join(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + + System.out.println("Sync: targetThread finished"); + + if (usefulRuns == 0) { + // not representative + System.out.println("Test succeeded, but there were 0 useful runs."); + } + + if (failureCounter > 0) { + throw new RuntimeException("Grabbed the monitor in total " + failureCounter + " times out of " + usefulRuns + " useful runs, which is more than 0."); + } + } + + private static boolean hasGrabbedMonitor(Thread targetThread) { + ThreadInfo [] threadInfo = ManagementFactory.getThreadMXBean().getThreadInfo(new long [] { targetThread.threadId()}, true, false); + assertTrue(threadInfo != null, "getThreadInfo() failed"); + assertTrue(threadInfo[0] != null, "getThreadInfo() failed"); + return Arrays.stream(threadInfo[0].getLockedMonitors()).anyMatch(m -> m.getIdentityHashCode() == System.identityHashCode(lock)); + } + + + static class waitTask implements Runnable { + + private final Phaser phaser; + + waitTask(final Phaser phaser) { + this.phaser = phaser; + } + + public void run() { + synchronized (lock) { + for (int i = 0; i < maxRetries; ++i) { + phaser.arriveAndAwaitAdvance(); + try { + lock.wait(timeout); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + } + phaser.arriveAndDeregister(); + } + } +} + diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java index ab5b73bf720..e6a6e55c7f7 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java @@ -26,6 +26,7 @@ * @bug 8174994 8200613 * @summary Test the clhsdb commands 'printall', 'jstack' on a CDS enabled corefile. * @requires vm.hasSA + * @requires !vm.ubsan * @requires vm.gc != "Z" * @requires vm.cds * @requires vm.flavor == "server" diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java index 1997e497af8..821ce1356e5 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java @@ -50,6 +50,7 @@ import jtreg.SkippedException; * @bug 8193124 * @summary Test the clhsdb 'findpc' command with Xcomp on core file * @requires vm.hasSA + * @requires !vm.ubsan * @requires vm.gc != "Z" * @requires vm.compMode != "Xcomp" * @requires vm.compiler1.enabled @@ -75,6 +76,7 @@ import jtreg.SkippedException; * @bug 8193124 * @summary Test the clhsdb 'findpc' command w/o Xcomp on core file * @requires vm.hasSA + * @requires !vm.ubsan * @requires vm.gc != "Z" * @requires vm.compiler1.enabled * @library /test/lib diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java index 885694f7abb..4079ee6f2b2 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java @@ -46,6 +46,7 @@ import jtreg.SkippedException; * @bug 8190198 * @summary Test clhsdb pmap command on a core file * @requires vm.hasSA + * @requires !vm.ubsan * @requires vm.gc != "Z" * @library /test/lib * @run main/othervm/timeout=480 ClhsdbPmap true diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java index 6921a7ec0ca..8f06cf75518 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java @@ -46,6 +46,7 @@ import jtreg.SkippedException; * @bug 8190198 * @summary Test clhsdb pstack command on a core file * @requires vm.hasSA + * @requires !vm.ubsan * @requires vm.gc != "Z" * @library /test/lib * @run main/othervm/timeout=480 ClhsdbPstack true diff --git a/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle2.java b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle2.java index eff35559626..839d8200da0 100644 --- a/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle2.java +++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle2.java @@ -33,7 +33,7 @@ /* * The next test stresses the interaction between (mostly) full garbage collections and refinement. */ -/* @test @key stress randomness @library /vmTestbase /test/lib @run main/othervm -XX:-G1UseAdaptiveIHOP -XX:InitiatingHeapOccupancyPercent=0 -XX:G1HeapRegionSize=1m -XX:G1RSetUpdatingPauseTimePercent=0 -XX:+UnlockDiagnosticVMOptions -XX:G1PerThreadPendingCardThreshold=0 -XX:+VerifyAfterGC -Xlog:gc=debug,gc+refine=debug:gc.log gc.ArrayJuggle.Juggle2 -tg */ +/* @test @key stress randomness @library /vmTestbase /test/lib @run main/othervm -XX:-G1UseAdaptiveIHOP -XX:G1IHOP=0 -XX:G1HeapRegionSize=1m -XX:G1RSetUpdatingPauseTimePercent=0 -XX:+UnlockDiagnosticVMOptions -XX:G1PerThreadPendingCardThreshold=0 -XX:+VerifyAfterGC -Xlog:gc=debug,gc+refine=debug:gc.log gc.ArrayJuggle.Juggle2 -tg */ package gc.ArrayJuggle; diff --git a/test/hotspot/jtreg/vmTestbase/jit/Arrays/ArrayBounds/ArrayBounds.java b/test/hotspot/jtreg/vmTestbase/jit/Arrays/ArrayBounds/ArrayBounds.java index b0b7bcdccde..ac9a442cfb2 100644 --- a/test/hotspot/jtreg/vmTestbase/jit/Arrays/ArrayBounds/ArrayBounds.java +++ b/test/hotspot/jtreg/vmTestbase/jit/Arrays/ArrayBounds/ArrayBounds.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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,9 +34,6 @@ package jit.Arrays.ArrayBounds; -/* -SCCS ID : @(#)ArrayBounds.java 1.2 02/07/16 -*/ /* The intent of this Java program is to expose Virtual Machines that make illegal array bounds check removal optimizations. */ diff --git a/test/hotspot/jtreg/vmTestbase/jit/verifier/VerifyInitLocal/VerifyInitLocal.java b/test/hotspot/jtreg/vmTestbase/jit/verifier/VerifyInitLocal/VerifyInitLocal.java index d4ab2ee30bb..76d6b59e542 100644 --- a/test/hotspot/jtreg/vmTestbase/jit/verifier/VerifyInitLocal/VerifyInitLocal.java +++ b/test/hotspot/jtreg/vmTestbase/jit/verifier/VerifyInitLocal/VerifyInitLocal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -40,7 +40,6 @@ package jit.verifier.VerifyInitLocal; import nsk.share.TestFailure; /** - * @(#)VerifyInitLocal.java 1.1 01/03/15 * @bug 4408261 * @summary Make sure verifier allows initialization of local fields. */ diff --git a/test/hotspot/jtreg/vmTestbase/jit/verifier/VerifyMergeStack/VerifyMergeStack.java b/test/hotspot/jtreg/vmTestbase/jit/verifier/VerifyMergeStack/VerifyMergeStack.java index fe2171e7ed9..5f50b5a7339 100644 --- a/test/hotspot/jtreg/vmTestbase/jit/verifier/VerifyMergeStack/VerifyMergeStack.java +++ b/test/hotspot/jtreg/vmTestbase/jit/verifier/VerifyMergeStack/VerifyMergeStack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -38,7 +38,6 @@ package jit.verifier.VerifyMergeStack; import nsk.share.TestFailure; /** - * @(#)VerifyMergeStack.java 1.1 01/25/01 * @bug 4336916 * @summary Make sure verifier fails when two distinct types meet on operand stack */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Invalid/invalid001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Invalid/invalid001.java new file mode 100644 index 00000000000..670bf81dd39 --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Invalid/invalid001.java @@ -0,0 +1,177 @@ +/* + * 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 8382537 + * @summary + * Tests to make sure invalid commands and command sets return NOT_IMPLEMENTED. + * Test launches debuggee VM using support classes and sends bad command sets + * and commands to it. Then test receives replies for the bad command sets and + * command and expects them to contain the NOT_IMPLEMENTED error code. + * + * @library /vmTestbase /test/hotspot/jtreg/vmTestbase + * /test/lib + * @build nsk.jdwp.Invalid.invalid001a + * @run driver + * nsk.jdwp.Invalid.invalid001 + * -arch=${os.family}-${os.simpleArch} + * -verbose + * -waittime=5 + * -debugee.vmkind=java + * -transport.address=dynamic + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" + */ + +package nsk.jdwp.Invalid; + +import java.io.*; +import java.util.*; + +import nsk.share.*; +import nsk.share.jpda.*; +import nsk.share.jdwp.*; + +public class invalid001 { + static final int JCK_STATUS_BASE = 95; + static final int PASSED = 0; + static final int FAILED = 2; + static final String PACKAGE_NAME = "nsk.jdwp.Invalid"; + static final String TEST_CLASS_NAME = PACKAGE_NAME + "." + "invalid001"; + static final String DEBUGEE_CLASS_NAME = TEST_CLASS_NAME + "a"; + + public static void main (String argv[]) { + int result = run(argv, System.out); + if (result != 0) { + throw new RuntimeException("Test failed"); + } + } + + public static int run(String argv[], PrintStream out) { + return new invalid001().runIt(argv, out); + } + + Transport transport; + Log log; + boolean success = true; + + public int runIt(String argv[], PrintStream out) { + + try { + ArgumentHandler argumentHandler = new ArgumentHandler(argv); + log = new Log(out, argumentHandler); + + try { + + Binder binder = new Binder(argumentHandler, log); + log.display("Start debugee VM"); + Debugee debugee = binder.bindToDebugee(DEBUGEE_CLASS_NAME); + transport = debugee.getTransport(); + IOPipe pipe = debugee.createIOPipe(); + + log.display("Waiting for VM_INIT event"); + debugee.waitForVMInit(); + + log.display("Querying for IDSizes"); + debugee.queryForIDSizes(); + + log.display("Resume debugee VM"); + debugee.resume(); + + log.display("Waiting for command: " + "ready"); + String cmd = pipe.readln(); + log.display("Received command: " + cmd); + + // begin test of invalid JDWP commands + + try { + // First byte is the command set and 2nd byte is the command + verifyCmd(0x0001, "0 cmd set"); + verifyCmd(0xff01, "-1 cmd set"); + verifyCmd(0x7f01, "127 cmd set"); + verifyCmd(0x0100, "0 command"); + verifyCmd(0x01ff, "-1 command"); + verifyCmd(0x017f, "127 command"); + } catch (Exception e) { + log.complain("Exception caught: " + e); + success = false; + } + + // end test of invalid JDWP commands + + log.display("Sending command: " + "quit"); + pipe.println("quit"); + + log.display("Waiting for debugee exits"); + int code = debugee.waitFor(); + if (code == JCK_STATUS_BASE + PASSED) { + log.display("Debugee PASSED: " + code); + } else { + log.complain("Debugee FAILED: " + code); + success = false; + } + + } catch (Exception e) { + log.complain("Unexpected exception: " + e); + e.printStackTrace(out); + success = false; + } + + if (!success) { + log.complain("TEST FAILED"); + return FAILED; + } + + } catch (Exception e) { + out.println("Unexpected exception: " + e); + e.printStackTrace(out); + out.println("TEST FAILED"); + return FAILED; + } + + out.println("TEST PASSED"); + return PASSED; + + } + + public void verifyCmd(int cmd, String cmdDescription) throws Exception { + CommandPacket command = new CommandPacket(cmd); + + log.display("Sending command packet with " + cmdDescription + ":\n" + command); + transport.write(command); + + log.display("Waiting for reply packet"); + ReplyPacket reply = new ReplyPacket(); + transport.read(reply); + log.display("Reply packet received:\n" + reply); + + log.display("Checking reply packet error code"); + int errorCode = reply.getErrorCode(); + if (errorCode == JDWP.Error.NOT_IMPLEMENTED) { + log.display("Got expected NOT_IMPLEMENTED error code"); + } else { + log.complain("Got unexpected error code: " + errorCode); + success = false; + } + } +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Invalid/invalid001a.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Invalid/invalid001a.java new file mode 100644 index 00000000000..5c3a020de05 --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Invalid/invalid001a.java @@ -0,0 +1,52 @@ +/* + * 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. + */ + +package nsk.jdwp.Invalid; + +import java.io.*; + +import nsk.share.*; +import nsk.share.jpda.*; +import nsk.share.jdwp.*; + +public class invalid001a { + + public static void main(String args[]) { + invalid001a _invalid001a = new invalid001a(); + System.exit(invalid001.JCK_STATUS_BASE + _invalid001a.runIt(args, System.err)); + } + + public int runIt(String args[], PrintStream out) { + ArgumentHandler argumentHandler = new ArgumentHandler(args); + Log log = new Log(out, argumentHandler); + log.display("Creating pipe"); + IOPipe pipe = argumentHandler.createDebugeeIOPipe(log); + log.display("Sending command: " + "ready"); + pipe.println("ready"); + log.display("Waiting for command: " + "quit"); + String command = pipe.readln(); + log.display("Received command: " + command); + log.display("Debugee PASSED"); + return invalid001.PASSED; + } +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java index 32d4bd8b865..01fe847ec33 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -47,13 +47,6 @@ public class Launcher extends DebugeeBinder { /** Pattern for message of jdb has started. */ protected static String JDB_STARTED = "Initializing jdb"; - /** - * Get version string. - */ - public static String getVersion () { - return "@(#)Launcher.java %I% %E%"; - } - // -------------------------------------------------- // /** diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java index a30afed77d8..558ade41c8d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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,13 +63,6 @@ public class Binder extends DebugeeBinder { */ public static final String LOG_PREFIX = "binder> "; - /** - * Get version string. - */ - public static String getVersion () { - return "@(#)Binder.java 1.14 03/10/08"; - } - // -------------------------------------------------- // /** diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdwp/Binder.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdwp/Binder.java index 0a15c23b004..ef1cf2943c1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdwp/Binder.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdwp/Binder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -55,13 +55,6 @@ final public class Binder extends DebugeeBinder { */ public static final String LOG_PREFIX = "binder> "; - /** - * Get version string. - */ - public static String getVersion () { - return "@(#)Binder.java %I% %E%"; - } - // -------------------------------------------------- // /** diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java index d04fed1bd32..03142768b47 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -88,13 +88,6 @@ public class DebugeeBinder extends Log.Logger { private DebugeeArgumentHandler argumentHandler = null; - /** - * Get version string. - */ - public static String getVersion () { - return "@(#)Binder.java %I% %E%"; - } - // -------------------------------------------------- // private ServerSocket pipeServerSocket = null; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.java b/test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.java index 41daf3364ea..4c2ad79608d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2022, 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 @@ -302,6 +302,8 @@ public class LockingThread extends Thread { private Wicket waitStateWicket = new Wicket(); + private volatile boolean canEnterRelinquishWait = false; + private Thread.State requiredState; public void waitState() { @@ -365,7 +367,9 @@ public class LockingThread extends Thread { relinquishMonitor = true; relinquishedMonitorIndex = index; + canEnterRelinquishWait = false; interrupt(); + canEnterRelinquishWait = true; DebugMonitorInfo monitorInfo = monitorsInfo.get(relinquishedMonitorIndex); @@ -432,6 +436,10 @@ public class LockingThread extends Thread { log("Relinquish monitor: " + relinquishedMonitor); + while (!canEnterRelinquishWait) { + Thread.onSpinWait(); + } + // monitor is relinquished ready(); diff --git a/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/Test.java b/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/Test.java index b9218480788..7ca852f2726 100644 --- a/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/Test.java +++ b/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2024, 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 @@ -56,15 +56,16 @@ public class Test { static { String p1 = " size=\\d+Kb used=\\d+Kb max_used=\\d+Kb free=\\d+Kb\\n"; String p2 = " bounds \\[0x[0-9a-f]+, 0x[0-9a-f]+, 0x[0-9a-f]+\\]\\n"; - String p3 = "CodeCache:.*\\n"; - String p4 = " total_blobs=\\d+, nmethods=\\d+, adapters=\\d+, full_count=\\d+\\n"; - String p5 = "Compilation: enabled.*\\n"; + String p3 = " blobs=\\d+, nmethods=\\d+, adapters=\\d+, full_count=\\d+\\n"; + String p4 = "CodeCache:.*\\n"; + String p5 = " total blobs=\\d+, nmethods=\\d+, adapters=\\d+, full_count=\\d+\\n"; + String p6 = "Compilation: enabled.*\\n"; - String segPrefix = "^(CodeHeap '[^']+':" + p1 + p2 + ")+"; - String nosegPrefix = "^CodeCache:" + p1 + p2; + String segPrefix = "^(CodeHeap '[^']+':" + p1 + p2 + p3 + ")+"; + String nosegPrefix = "^CodeCache:" + p1 + p2 + p3; - SEG_REGEXP = segPrefix + p3 + p4 + p5; - NOSEG_REGEXP = nosegPrefix + p4 + p5; + SEG_REGEXP = segPrefix + p4 + p5 + p6; + NOSEG_REGEXP = nosegPrefix + p6; } public static void main(String[] args) throws Exception { diff --git a/test/jaxp/ProblemList.txt b/test/jaxp/ProblemList.txt index 8f7380a43f8..a30f1ad30ed 100644 --- a/test/jaxp/ProblemList.txt +++ b/test/jaxp/ProblemList.txt @@ -28,10 +28,14 @@ # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/jdk/ProblemList-AotJdk.txt b/test/jdk/ProblemList-AotJdk.txt index c98bf63b25f..1f99d0f6859 100644 --- a/test/jdk/ProblemList-AotJdk.txt +++ b/test/jdk/ProblemList-AotJdk.txt @@ -49,10 +49,14 @@ java/util/Locale/UseOldISOCodesTest.java 0000000 generic-a # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/jdk/ProblemList-StaticJdk.txt b/test/jdk/ProblemList-StaticJdk.txt index 700099656e8..fc3f2226100 100644 --- a/test/jdk/ProblemList-StaticJdk.txt +++ b/test/jdk/ProblemList-StaticJdk.txt @@ -30,10 +30,14 @@ # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/jdk/ProblemList-Virtual.txt b/test/jdk/ProblemList-Virtual.txt index 52f187086de..8dd65f257f8 100644 --- a/test/jdk/ProblemList-Virtual.txt +++ b/test/jdk/ProblemList-Virtual.txt @@ -39,10 +39,14 @@ java/lang/ScopedValue/StressStackOverflow.java#TieredStopAtLevel1 8309646 generi # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/jdk/ProblemList-Xcomp.txt b/test/jdk/ProblemList-Xcomp.txt index 44bad411f26..5b104f08b16 100644 --- a/test/jdk/ProblemList-Xcomp.txt +++ b/test/jdk/ProblemList-Xcomp.txt @@ -35,10 +35,14 @@ java/lang/reflect/callerCache/ReflectionCallerCacheTest.java 8332028 generic- # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/jdk/ProblemList-enable-preview.txt b/test/jdk/ProblemList-enable-preview.txt index 1a831a0dde3..b28670c9839 100644 --- a/test/jdk/ProblemList-enable-preview.txt +++ b/test/jdk/ProblemList-enable-preview.txt @@ -23,10 +23,13 @@ ############################################################################# # -# List of quarantined tests for testing with --enable-preview +# List of quarantined tests for testing with the '--enable-preview' option +# where the option IS specified in the task definition and NOT in the test. # -# These are failures that ONLY occur with the '--enable-preview' option -# specified. There are separate sub-sections for each preview project. +# If the '--enable-preview' option is NOT specified in the task definition, +# and the option IS specified in the test, then an entry here WILL NOT work. +# +# There are separate sub-sections for each preview project. # ############################################################################# diff --git a/test/jdk/ProblemList-jvmti-stress-agent.txt b/test/jdk/ProblemList-jvmti-stress-agent.txt index e9019b6014e..e96ad2d9b99 100644 --- a/test/jdk/ProblemList-jvmti-stress-agent.txt +++ b/test/jdk/ProblemList-jvmti-stress-agent.txt @@ -35,10 +35,14 @@ java/lang/ref/ReachabilityFenceTest.java 0000 # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/jdk/ProblemList-shenandoah.txt b/test/jdk/ProblemList-shenandoah.txt index 522b77cb502..533ad5d613c 100644 --- a/test/jdk/ProblemList-shenandoah.txt +++ b/test/jdk/ProblemList-shenandoah.txt @@ -63,10 +63,14 @@ jdk/jfr/startupargs/TestOldObjectQueueSize.java 8342951 generic-all # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/jdk/ProblemList-zgc.txt b/test/jdk/ProblemList-zgc.txt index a669f3e3abf..ae3d8c33e96 100644 --- a/test/jdk/ProblemList-zgc.txt +++ b/test/jdk/ProblemList-zgc.txt @@ -34,10 +34,14 @@ com/sun/jdi/ThreadMemoryLeakTest.java 8307402 generic-all # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index f1bd91d86aa..3e1437f01f5 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -152,15 +152,9 @@ java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all java/awt/List/KeyEventsTest/KeyEventsTest.java 8201307 linux-all java/awt/List/NoEvents/ProgrammaticChange.java 8201307 linux-all java/awt/Paint/ListRepaint.java 8201307 linux-all -java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java 8370584 windows-x64 java/awt/Mixing/AWT_Mixing/OpaqueOverlappingChoice.java 8048171 generic-all -java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java 8159451 linux-all,windows-all,macosx-all -java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java 6986109 generic-all java/awt/Mixing/AWT_Mixing/JInternalFrameMoveOverlapping.java 6986109 windows-all -java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java 8049405 generic-all -java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java 8049405 macosx-all -java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java 8049405 macosx-all -java/awt/Mixing/AWT_Mixing/JTableInGlassPaneOverlapping.java 8357360 windows-all,linux-all +java/awt/Mixing/AWT_Mixing/JTableInGlassPaneOverlapping.java 8357360 linux-all java/awt/Mixing/NonOpaqueInternalFrame.java 7124549 macosx-all java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowRetaining.java 6829264 generic-all java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java 8080982 generic-all @@ -222,7 +216,6 @@ sun/awt/datatransfer/SuplementaryCharactersTransferTest.java 8011371 generic-all 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/MultiWindowFillTest.java 8378506 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 @@ -247,32 +240,6 @@ java/awt/Clipboard/ImageTransferTest.java 8030710 generic-all java/awt/Clipboard/NoDataConversionFailureTest.java 8234140 macosx-all java/awt/Dialog/ModalExcludedTest.java 7125054 macosx-all java/awt/Frame/MiscUndecorated/RepaintTest.java 8266244 macosx-aarch64 -java/awt/Modal/FileDialog/FileDialogAppModal1Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogAppModal2Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogAppModal3Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogAppModal4Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogAppModal5Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogAppModal6Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogDocModal1Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogDocModal2Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogDocModal3Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogDocModal4Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogDocModal5Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogDocModal6Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogDocModal7Test.java 7186009 macosx-all,linux-all -java/awt/Modal/FileDialog/FileDialogModal1Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogModal2Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogModal3Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogModal4Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogModal5Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogModal6Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogNonModal1Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogNonModal2Test.java 7186009 macosx-all,linux-all -java/awt/Modal/FileDialog/FileDialogNonModal3Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogNonModal4Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogNonModal5Test.java 7186009 macosx-all -java/awt/Modal/FileDialog/FileDialogNonModal6Test.java 7186009 macosx-all,linux-all -java/awt/Modal/FileDialog/FileDialogNonModal7Test.java 7186009 macosx-all,linux-all java/awt/Modal/FileDialog/FileDialogTKModal1Test.java 8196430 generic-all java/awt/Modal/FileDialog/FileDialogTKModal2Test.java 8196430 generic-all java/awt/Modal/FileDialog/FileDialogTKModal3Test.java 8196430 generic-all @@ -280,60 +247,6 @@ java/awt/Modal/FileDialog/FileDialogTKModal4Test.java 8196430 generic-all java/awt/Modal/FileDialog/FileDialogTKModal5Test.java 8196430 generic-all java/awt/Modal/FileDialog/FileDialogTKModal6Test.java 8196430 generic-all java/awt/Modal/FileDialog/FileDialogTKModal7Test.java 8196430 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDDAppModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDDDocModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDDModelessTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDDNonModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDDSetModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDDToolkitModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDFAppModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDFSetModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDFToolkitModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDFWModeless1Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDFWModeless2Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDFWNonModal1Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDFWNonModal2Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingDocModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDModelessTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDNonModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal1Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal2Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal3Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWDocModal4Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWModeless1Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWModeless2Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWModeless3Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWModeless4Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal1Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal2Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal3Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingFDWNonModal4Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal1Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal2Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal3Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal4Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal5Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsAppModal6Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsDocModal1Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsDocModal2Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal1Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal2Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal3Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal4Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal5Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsSetModal6Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal1Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal2Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal3Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal4Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal5Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/BlockingWindowsToolkitModal6Test.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/UnblockedDialogAppModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/UnblockedDialogDocModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/UnblockedDialogModelessTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/UnblockedDialogNonModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/UnblockedDialogSetModalTest.java 8198665 macosx-all -java/awt/Modal/ModalBlockingTests/UnblockedDialogToolkitModalTest.java 8198665 macosx-all java/awt/Modal/ModalDialogOrderingTest/ModalDialogOrderingTest.java 8066259 macosx-all java/awt/Modal/ModalExclusionTests/ApplicationExcludeFrameFileTest.java 8047179 linux-all,macosx-all java/awt/Modal/ModalExclusionTests/ApplicationExcludeDialogFileTest.java 8047179 linux-all,macosx-all @@ -349,73 +262,61 @@ java/awt/Modal/ModalExclusionTests/ToolkitExcludeFramePageSetupTest.java 8196431 java/awt/Modal/ModalExclusionTests/ToolkitExcludeFramePrintSetupTest.java 8196431 linux-all,macosx-all java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFAppModal2Test.java 8058813 windows-all java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFModeless2Test.java 8196191 windows-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFDocModalTest.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFModelessTest.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFNonModalTest.java 8196432 linux-all,macosx-all + +java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFDocModalTest.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFModelessTest.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFNonModalTest.java 8196432 macosx-all java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsModelessTest.java 8196432 linux-all java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsNonModalTest.java 8196432 linux-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWDocModalTest.java 8196432 linux-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWModelessTest.java 8196432 linux-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFDWNonModalTest.java 8196432 linux-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal1Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal2Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal3Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal4Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal1Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal2Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal3Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal4Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless1Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless2Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless3Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless4Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal1Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal2Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal3Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal4Test.java 8196432 linux-all,macosx-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFDocModal2Test.java 8196432 linux-all -java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal2Test.java 8196432 linux-all -java/awt/Modal/MultipleDialogs/MultipleDialogs1Test.java 8198665 macosx-all -java/awt/Modal/MultipleDialogs/MultipleDialogs2Test.java 8198665 macosx-all -java/awt/Modal/MultipleDialogs/MultipleDialogs3Test.java 8198665 macosx-all -java/awt/Modal/MultipleDialogs/MultipleDialogs4Test.java 8198665 macosx-all -java/awt/Modal/MultipleDialogs/MultipleDialogs5Test.java 8198665 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal1Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal2Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal3Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDAppModal4Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal1Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal2Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal3Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDDocModal4Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless1Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless2Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless3Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDModeless4Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal1Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal2Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal3Test.java 8196432 macosx-all +java/awt/Modal/ModalFocusTransferTests/FocusTransferFWDNonModal4Test.java 8196432 macosx-all + java/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java 8177326 macosx-all java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java 8005021 macosx-all java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java 8051455 macosx-all java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java 7124407,8302787 macosx-all,windows-all java/awt/Mouse/RemovedComponentMouseListener/RemovedComponentMouseListener.java 8157170 macosx-all java/awt/Modal/ToFront/DialogToFrontNonModalTest.java 8221899 linux-all -java/awt/Modal/ToBack/ToBackAppModal1Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackAppModal2Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackAppModal3Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackAppModal4Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackAppModal5Test.java 8196441 macosx-all +java/awt/Modal/ToBack/ToBackAppModal1Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackAppModal2Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackAppModal3Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackAppModal4Test.java 8196441 linux-all java/awt/Modal/ToBack/ToBackAppModal6Test.java 8196441 linux-all -java/awt/Modal/ToBack/ToBackModal1Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackModal2Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackModal3Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackModal4Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackTKModal1Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackTKModal2Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackTKModal3Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackTKModal4Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackTKModal5Test.java 8196441 macosx-all -java/awt/Modal/ToBack/ToBackDocModal1Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackDocModal2Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackDocModal3Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackDocModal4Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackDocModal5Test.java 8196441 linux-all,macosx-all -java/awt/Modal/ToBack/ToBackModeless1Test.java 8196441 macosx-all,linux-all -java/awt/Modal/ToBack/ToBackModeless2Test.java 8196441 macosx-all,linux-all -java/awt/Modal/ToBack/ToBackModeless3Test.java 8196441 macosx-all,linux-all -java/awt/Modal/ToBack/ToBackModeless4Test.java 8196441 macosx-all,linux-all -java/awt/Modal/ToBack/ToBackModeless5Test.java 8196441 macosx-all -java/awt/Modal/ToBack/ToBackNonModal1Test.java 8196441 macosx-all,linux-all -java/awt/Modal/ToBack/ToBackNonModal2Test.java 8196441 macosx-all,linux-all -java/awt/Modal/ToBack/ToBackNonModal3Test.java 8196441 macosx-all,linux-all -java/awt/Modal/ToBack/ToBackNonModal4Test.java 8196441 macosx-all,linux-all -java/awt/Modal/ToBack/ToBackNonModal5Test.java 8196441 macosx-all +java/awt/Modal/ToBack/ToBackModal1Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackModal2Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackModal3Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackModal4Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackTKModal1Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackTKModal2Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackTKModal3Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackTKModal4Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackDocModal1Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackDocModal2Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackDocModal3Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackDocModal4Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackDocModal5Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackModeless1Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackModeless2Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackModeless3Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackModeless4Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackNonModal1Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackNonModal2Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackNonModal3Test.java 8196441 linux-all +java/awt/Modal/ToBack/ToBackNonModal4Test.java 8196441 linux-all javax/print/PrintSEUmlauts/PrintSEUmlauts.java 8135174 generic-all java/awt/font/Rotate/RotatedTextTest.java 8219641 linux-all java/awt/font/TextLayout/LigatureCaretTest.java 8266312 generic-all @@ -476,7 +377,6 @@ java/awt/GraphicsDevice/DisplayModes/UnknownRefrshRateTest.java 8286436 macosx-a java/awt/image/multiresolution/MultiresolutionIconTest.java 8291979 linux-x64,windows-all java/awt/event/SequencedEvent/MultipleContextsFunctionalTest.java 8305061 macosx-x64 sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java 8301177 linux-x64 -sun/awt/image/bug8038000.java 8373065 generic-all # Several tests which fail on some hidpi systems/macosx12-aarch64 system java/awt/Window/8159168/SetShapeTest.java 8274106 macosx-aarch64 @@ -735,6 +635,7 @@ jdk/jfr/event/compiler/TestCodeSweeper.java 8338127 generic- jdk/jfr/event/oldobject/TestShenandoah.java 8342951 generic-all jdk/jfr/event/runtime/TestResidentSetSizeEvent.java 8309846 aix-ppc64 jdk/jfr/jvm/TestWaste.java 8371630 generic-all +jdk/jfr/event/oldobject/TestZ.java 8375615 generic-all ############################################################################ @@ -748,8 +649,6 @@ jdk/jfr/jvm/TestWaste.java 8371630 generic- # jdk_foreign -java/foreign/TestBufferStackStress.java 8350455 macosx-all - ############################################################################ # Client manual tests @@ -804,10 +703,14 @@ tools/sincechecker/modules/jdk.management.jfr/JdkManagementJfrCheckSince.java 83 # Preview project specific failures go here at the end of the file. # # These are NOT failures that occur with the '--enable-preview' option -# specified; those go in the appropriate ProblemList-enable-preview.txt file. +# specified in the task definition; those go in the appropriate +# ProblemList-enable-preview.txt file. +# # These are failures that occur WITHOUT the '--enable-preview' option -# specified AND occur because of some issue with preview project code, -# in either implementation or test code. +# specified in the task definition OR the '--enable-preview' option +# MAY BE specified in the test itself. In either case, the failure +# occurs because of some issue with preview project code, in either +# implementation or test code. ############################################################################# diff --git a/test/jdk/com/sun/jdi/ClassesByName2Test.java b/test/jdk/com/sun/jdi/ClassesByName2Test.java index b8f517d0448..d1f45e254e6 100644 --- a/test/jdk/com/sun/jdi/ClassesByName2Test.java +++ b/test/jdk/com/sun/jdi/ClassesByName2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -137,6 +137,10 @@ public class ClassesByName2Test extends TestScaffold { } } + private static boolean isHiddenClass(String className) { + return className.contains("/"); + } + protected void runTests() throws Exception { BreakpointEvent bpe = startToMain("ClassesByName2Targ"); @@ -160,6 +164,13 @@ public class ClassesByName2Test extends TestScaffold { for (Iterator it = all.iterator(); it.hasNext(); ) { ReferenceType cls = (ReferenceType)it.next(); String name = cls.name(); + + if (isHiddenClass(name)) { + // Hidden classes may have been unloaded by the time classesByName + // is called so we skip those + continue; + } + List found = vm().classesByName(name); if (found.contains(cls)) { //System.out.println("Found class: " + name); diff --git a/test/jdk/com/sun/jdi/FinalizerTest.java b/test/jdk/com/sun/jdi/FinalizerTest.java index 1163607b133..eef53de0518 100644 --- a/test/jdk/com/sun/jdi/FinalizerTest.java +++ b/test/jdk/com/sun/jdi/FinalizerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -30,15 +30,17 @@ * @run build TestScaffold VMConnection TargetListener TargetAdapter * @run compile -g FinalizerTest.java * - * @run driver FinalizerTest + * @run driver FinalizerTest -Xmx256M */ -import com.sun.jdi.*; -import com.sun.jdi.event.*; -import com.sun.jdi.request.*; - -import java.util.List; import java.util.ArrayList; import java.util.Iterator; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import com.sun.jdi.StackFrame; +import com.sun.jdi.event.BreakpointEvent; +import com.sun.jdi.event.StepEvent; /* @@ -48,8 +50,7 @@ import java.util.Iterator; * @author Gordon Hirsch (modified for HotSpot by tbell & rfield) */ class FinalizerTarg { - static String lockit = "lock"; - static boolean finalizerRun = false; + static final CountDownLatch finalizerDone = new CountDownLatch(1); static class BigObject { String name; byte[] foo = new byte[300000]; @@ -67,7 +68,7 @@ class FinalizerTarg { */ super.finalize(); //Thread.dumpStack(); - finalizerRun = true; + finalizerDone.countDown(); } } @@ -77,29 +78,36 @@ class FinalizerTarg { b = null; // Drop the object, creating garbage... System.gc(); System.runFinalization(); + try { + // finalize() is run in another lower priority Finalizer thread. + // Wait for it to finish. + finalizerDone.await(5, TimeUnit.SECONDS); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } - // Now, we have to make sure the finalizer - // gets run. We will keep allocating more - // and more memory with the idea that eventually, - // the memory occupied by the BigObject will get reclaimed - // and the finalizer will be run. + // If System.gc() and System.runFinalization() did not trigger the + // finalizer, then finalizerDone.await() will time out and the code + // below will be needed as a second attempt to trigger finalization. List holdAlot = new ArrayList(); for (int chunk=10000000; chunk > 10000; chunk = chunk / 2) { - if (finalizerRun) { + if (finalizerDone.getCount() == 0) { return; } try { - while(true) { + while (finalizerDone.getCount() > 0) { holdAlot.add(new byte[chunk]); System.err.println("Allocated " + chunk); } - } - catch ( Throwable thrown ) { // OutOfMemoryError + } catch ( Throwable thrown ) { // OutOfMemoryError + } finally { + holdAlot.clear(); System.gc(); } System.runFinalization(); } - return; // not reached + System.out.println("The Debuggee should not reach here in theory!"); + return; } public static void main(String[] args) throws Exception { diff --git a/test/jdk/com/sun/jndi/ldap/LdapStartTlsTest.java b/test/jdk/com/sun/jndi/ldap/LdapStartTlsTest.java new file mode 100644 index 00000000000..17c7d34fa47 --- /dev/null +++ b/test/jdk/com/sun/jndi/ldap/LdapStartTlsTest.java @@ -0,0 +1,423 @@ +/* + * 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.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.lang.reflect.Field; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.ServerSocket; +import java.net.Socket; +import java.security.KeyStore; +import java.util.Arrays; +import java.util.Hashtable; +import java.util.List; + +import javax.naming.Context; +import javax.naming.ldap.InitialLdapContext; +import javax.naming.ldap.LdapContext; +import javax.naming.ldap.StartTlsRequest; +import javax.naming.ldap.StartTlsResponse; +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLPeerUnverifiedException; +import javax.net.ssl.SSLSession; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; + +import com.sun.jndi.ldap.BerEncoder; +import com.sun.jndi.ldap.Connection; +import jdk.test.lib.net.URIBuilder; +import jdk.test.lib.security.CertUtils; +import jdk.test.lib.security.KeyEntry; +import jdk.test.lib.security.KeyStoreUtils; +import jdk.test.lib.security.SSLContextBuilder; +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.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/* + * @test + * @bug 8261289 + * @summary Verify the behaviour of LDAPv3 Extended Response for StartTLS + * @modules java.naming/com.sun.jndi.ldap + * java.naming/com.sun.jndi.ldap.ext:+open + * @library /test/lib lib/ + * @build jdk.test.lib.net.URIBuilder + * jdk.test.lib.security.SSLContextBuilder + * jdk.test.lib.security.KeyStoreUtils + * BaseLdapServer LdapMessage + * @run junit ${test.main.class} + */ +class LdapStartTlsTest { + + private static final byte BER_TYPE_LDAP_SEQUENCE = 0x30; + private static final byte BER_TYPE_EXTENDED_RESPONSE = 0x78; + private static final byte BER_TYPE_ENUM = 0x0a; + private static final byte BER_TYPE_LDAP_SEARCH_RESULT_DONE_OP = 0x65; + + static List failedNegotiations() throws Exception { + // a SSLContext which we expect to cause the TLS handshake to fail when + // handshaking with a loopback address + final SSLContext localhostOnlySSLCtx = onlyLocalHostSSLCtx(); + + return List.of( + Arguments.of(new Server(localhostOnlySSLCtx), null), + Arguments.of(new Server(localhostOnlySSLCtx), new SimpleHostnameVerifier(false)) + ); + } + + static List successfulNegotiations() throws Exception { + // a SSLContext constructed out of a keystore which has relevant + // subject or subject alternate name and doesn't require a custom + // hostname verifier to allow for TLS verification to succeed + final String keyStoreFile = System.getProperty("test.src") + File.separator + "ksWithSAN"; + final String keyStorePass = "welcome1"; + final SSLContext sslContext = sslCtxFromKeyStoreFile(keyStoreFile, keyStorePass); + + // a different SSLContext which requires a custom hostname verifier to pass TLS verification + final SSLContext localhostOnlySSLCtx = onlyLocalHostSSLCtx(); + + return List.of( + Arguments.of(new Server(sslContext), null), + Arguments.of(new Server(localhostOnlySSLCtx), new SimpleHostnameVerifier(true)) + ); + } + + private static SSLContext onlyLocalHostSSLCtx() throws Exception { + // a cert which is issued to "localhost" (and without any subject alternative name + // for loopback IP address), which we expect the test to reject during TLS handshake + final String cert = CertUtils.ECDSA_CERT; + final KeyEntry ke = new KeyEntry("EC", CertUtils.ECDSA_KEY, new String[]{cert}); + return SSLContextBuilder.builder() + .keyStore(KeyStoreUtils.createKeyStore(new KeyEntry[]{ke})) + .trustStore(KeyStoreUtils.createTrustStore(new String[]{cert})) + .build(); + } + + private static SSLContext sslCtxFromKeyStoreFile(final String keyStoreFile, + final String keyStorePass) throws Exception { + final KeyStore keyStore = KeyStoreUtils.loadKeyStore(keyStoreFile, keyStorePass); + return SSLContextBuilder.builder() + .keyStore(keyStore) + .trustStore(keyStore) + .kmfPassphrase(keyStorePass) + .build(); + } + + @ParameterizedTest + @MethodSource(value = "failedNegotiations") + void testFailedNegotiation(final Server server, final SimpleHostnameVerifier verifier) + throws Exception { + + try (server) { + server.start(); + System.err.println("server started at " + server.getAddress()); + + final Hashtable envProps = createEnvProps(server); + final LdapContext ctx = new InitialLdapContext(envProps, null); + + StartTlsResponse startTlsResp = null; + try { + startTlsResp = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest()); + assertNotNull(startTlsResp, "StartTlsResponse is null"); + if (verifier != null) { + startTlsResp.setHostnameVerifier(verifier); + } + + final Connection ldapConn = getConnection(startTlsResp); + assertNotNull(ldapConn, "LDAP connection is null in " + startTlsResp); + // capture the input/output stream on the LDAP connection + final LdapConnStreams before = getStreams(ldapConn); + + // initiate the StartTLS negotiation/handshake + final StartTlsResponse tlsRsp = startTlsResp; + final SSLPeerUnverifiedException spue = assertThrows( + SSLPeerUnverifiedException.class, + () -> tlsRsp.negotiate(server.sslContext.getSocketFactory())); + System.err.println("got expected exception: " + spue); + + if (verifier != null) { + // assert that the custom hostname verifier was invoked + assertTrue(verifier.invoked, "custom HostnameVerifier was not invoked"); + } + // verify that after the failed StartTLS negotitation, the LDAP connection + // streams are the ones that were prior to the negotiation + final LdapConnStreams after = getStreams(ldapConn); + assertSame(before.in, after.in, + "unexpected InputStream on LDAP connection after a failed StartTLS negotiation"); + assertSame(before.out, after.out, + "unexpected OutputStream on LDAP connection after a failed StartTLS negotiation"); + } finally { + if (startTlsResp != null) { + startTlsResp.close(); + } + ctx.close(); + } + } + } + + @ParameterizedTest + @MethodSource(value = "successfulNegotiations") + void testSuccessfulNegotiation(final Server server, final SimpleHostnameVerifier verifier) + throws Exception { + try (server) { + server.start(); + System.err.println("server started at " + server.getAddress()); + + final Hashtable envProps = createEnvProps(server); + final LdapContext ctx = new InitialLdapContext(envProps, null); + + StartTlsResponse startTlsResp = null; + try { + startTlsResp = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest()); + assertNotNull(startTlsResp, "StartTlsResponse is null"); + if (verifier != null) { + startTlsResp.setHostnameVerifier(verifier); + } + + final Connection ldapConn = getConnection(startTlsResp); + assertNotNull(ldapConn, "LDAP connection is null in " + startTlsResp); + // capture the input/output stream on the LDAP connection + final LdapConnStreams before = getStreams(ldapConn); + // do the TLS negotiation. expected to complete successfully + final SSLSession sess = startTlsResp.negotiate(server.sslContext.getSocketFactory()); + assertNotNull(sess, "SSLSession is null after StartTLS negotiation"); + assertTrue(sess.isValid(), "SSLSession is invalid after StartTLS negotiation"); + if (verifier != null) { + // assert that the custom hostname verifier was invoked + assertTrue(verifier.invoked, "custom HostnameVerifier was not invoked"); + } + + // TLS session established, now do a trivial LDAP search and expect it to + // work fine + final Object result = ctx.lookup("CN=foobar"); + System.err.println("got result " + result); + assertNotNull(result, "Context.lookup() returned null"); + + // TLS negotiation as well as a trivial LDAP search completed fine, + // now close the StartTlsResponse + startTlsResp.close(); + + // verify that after the StartTlsResponse is closed, the streams + // of the underlying LDAP connection are switched back to the ones that were there + // before the TLS negotiation + final LdapConnStreams after = getStreams(ldapConn); + assertSame(before.in, after.in, + "unexpected InputStream on LDAP connection after StartTlsResponse was closed"); + assertSame(before.out, after.out, + "unexpected OutputStream on LDAP connection after StartTlsResponse was closed"); + } finally { + if (startTlsResp != null) { + startTlsResp.close(); + } + ctx.close(); + } + } + } + + private static Hashtable createEnvProps(final Server server) throws Exception { + final Hashtable envProps = new Hashtable<>(); + envProps.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); + final String providerUrl = URIBuilder.newBuilder() + .scheme("ldap") + .host(server.getInetAddress().getHostAddress()) + .port(server.getPort()) + .build().toString(); + envProps.put(Context.PROVIDER_URL, providerUrl); + // explicitly set LDAP version to 3 to prevent LDAP BIND requests + // during LdapCtx instantiation + envProps.put("java.naming.ldap.version", "3"); + return envProps; + } + + // using reflection, returns the LDAP connection instance associated with the StartTlsResponse + private static Connection getConnection(final StartTlsResponse tlsResponse) throws Exception { + final Field connField = tlsResponse.getClass().getDeclaredField("ldapConnection"); + connField.setAccessible(true); + return (Connection) connField.get(tlsResponse); + } + + // returns the input and output stream associated with the LDAP Connection + private static LdapConnStreams getStreams(final Connection connection) { + return new LdapConnStreams(connection.inStream, connection.outStream); + } + + private record LdapConnStreams(InputStream in, OutputStream out) { + } + + // a trivial HostnameVerifier which returns a given verification result from + // its verify method + private static final class SimpleHostnameVerifier implements HostnameVerifier { + private final boolean verificationResult; + private boolean invoked; + + private SimpleHostnameVerifier(final boolean verificationResult) { + this.verificationResult = verificationResult; + } + + @Override + public boolean verify(final String hostname, final SSLSession session) { + this.invoked = true; + return this.verificationResult; + } + } + + // the LDAP server used in the test + private static final class Server extends BaseLdapServer implements AutoCloseable { + private final SSLContext sslContext; + + private Server(final SSLContext sslContext) throws IOException { + super(new ServerSocket(0, 0, InetAddress.getLoopbackAddress())); + this.sslContext = sslContext; + } + + private InetSocketAddress getAddress() { + return new InetSocketAddress(this.getInetAddress(), this.getPort()); + } + + // handles and responds to the incoming LDAP request + @Override + protected void handleRequestEx(final Socket socket, + final LdapMessage request, + final OutputStream out, + final BaseLdapServer.ConnWrapper connWrapper) + throws IOException { + switch (request.getOperation()) { + case EXTENDED_REQUEST: { + System.err.println("handling ExtendedRequest from " + socket); + // write out the ExtendedResponse + final byte[] resp = makeExtendedResponse((byte) request.getMessageID()); + out.write(resp); + out.flush(); + System.err.println("ExtendedResponse: " + Arrays.toString(resp)); + // switch to using TLS over the server connection + switchToTLSConnection(socket, connWrapper); + return; + } + case SEARCH_REQUEST: { + System.err.println("handling SEARCH_REQUEST with id: " + + request.getMessageID() + " from " + socket); + // write out a search response + final byte[] resp = makeSearchResultDone((byte) request.getMessageID()); + out.write(resp); + out.flush(); + System.err.println("search response: " + Arrays.toString(resp)); + break; + } + default: { + throw new IOException("unexpected operation type: " + request.getOperation() + + ", request: " + request); + } + } + } + + @Override + public void close() { + System.err.println("stopping server " + this.getAddress()); + super.close(); + } + + // switch the underlying server implementation to expect TLS content + // on the connection + private void switchToTLSConnection(final Socket socket, + final BaseLdapServer.ConnWrapper connWrapper) + throws IOException { + SSLSocket sslSocket; + final SSLSocketFactory factory = this.sslContext.getSocketFactory(); + try { + sslSocket = (SSLSocket) factory.createSocket(socket, null, socket.getLocalPort(), false); + } catch (Exception e) { + throw new IOException(e); + } + sslSocket.setUseClientMode(false); + connWrapper.setWrapper(sslSocket); + } + + // construct a ExtendedResponse LDAP message for the given message id + private static byte[] makeExtendedResponse(final byte msgId) throws IOException { + // LDAPResult ::= SEQUENCE { + // resultCode ENUMERATED { + // success (0), + // ... + // }, + // matchedDN LDAPDN, + // diagnosticMessage LDAPString, + // referral [3] Referral OPTIONAL + // } + // + // ExtendedResponse ::= [APPLICATION 24] SEQUENCE { + // COMPONENTS OF LDAPResult, + // responseName [10] LDAPOID OPTIONAL, + // responseValue [11] OCTET STRING OPTIONAL + // } + final BerEncoder ber = new BerEncoder(); + ber.beginSeq(BER_TYPE_LDAP_SEQUENCE); + ber.encodeInt(msgId); + { + ber.beginSeq(BER_TYPE_EXTENDED_RESPONSE); + ber.encodeInt(0, BER_TYPE_ENUM); // resultCode = 0 == success + ber.encodeString("", false); // matchedDN == empty string + ber.encodeString("", false); // diagnosticMessage == empty string + ber.endSeq(); + } + ber.endSeq(); + + return ber.getTrimmedBuf(); + } + + // construct a SearchResultDone LDAP message for the given message id + private static byte[] makeSearchResultDone(final byte msgId) throws IOException { + // SearchResultDone ::= [APPLICATION 5] LDAPResult + // + // LDAPResult ::= SEQUENCE { + // resultCode ENUMERATED { + // success (0), + // ... + // }, + // matchedDN LDAPDN, + // diagnosticMessage LDAPString, + // referral [3] Referral OPTIONAL + // } + final BerEncoder ber = new BerEncoder(); + ber.beginSeq(BER_TYPE_LDAP_SEQUENCE); + ber.encodeInt(msgId); + { + ber.beginSeq(BER_TYPE_LDAP_SEARCH_RESULT_DONE_OP); + ber.encodeInt(0, BER_TYPE_ENUM); // resultCode = 0 == success + ber.encodeString("", false); // matchedDN == empty string + ber.encodeString("", false); // diagnosticMessage == empty string + ber.endSeq(); + } + ber.endSeq(); + + return ber.getTrimmedBuf(); + } + } +} diff --git a/test/jdk/com/sun/net/httpserver/simpleserver/OutputFilterTest.java b/test/jdk/com/sun/net/httpserver/simpleserver/OutputFilterTest.java index bed4b8e2f3d..6f2eecafc15 100644 --- a/test/jdk/com/sun/net/httpserver/simpleserver/OutputFilterTest.java +++ b/test/jdk/com/sun/net/httpserver/simpleserver/OutputFilterTest.java @@ -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 @@ -118,6 +118,7 @@ public class OutputFilterTest { var filter = SimpleFileServer.createOutputFilter(baos, VERBOSE); var server = HttpServer.create(LOOPBACK_ADDR, 10, "/", handler, filter); server.start(); + final String serverIPPattern = Pattern.quote(server.getAddress().getAddress().getHostAddress()); try (baos) { var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); var request = HttpRequest.newBuilder(uri(server, "")).build(); @@ -129,8 +130,9 @@ public class OutputFilterTest { server.stop(0); baos.flush(); var filterOutput = baos.toString(UTF_8); - var pattern = Pattern.compile(""" - 127\\.0\\.0\\.1 - - \\[[\\s\\S]+] "GET / HTTP/1\\.1" 200 - + System.err.println("server output:\n" + filterOutput); + var pattern = Pattern.compile(serverIPPattern + " " + """ + - - \\[[\\s\\S]+] "GET / HTTP/1\\.1" 200 - Resource requested: /foo/bar (>[\\s\\S]+:[\\s\\S]+)+ > @@ -170,6 +172,7 @@ public class OutputFilterTest { var filter = SimpleFileServer.createOutputFilter(baos, VERBOSE); var server = HttpServer.create(LOOPBACK_ADDR, 10, "/", handler, filter); server.start(); + final String serverIPPattern = Pattern.quote(server.getAddress().getAddress().getHostAddress()); try (baos) { var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); var request = HttpRequest.newBuilder(uri(server, "")).build(); @@ -181,8 +184,9 @@ public class OutputFilterTest { server.stop(0); baos.flush(); var filterOutput = baos.toString(UTF_8); - var pattern = Pattern.compile(""" - 127\\.0\\.0\\.1 - - \\[[\\s\\S]+] "GET / HTTP/1\\.1" 200 - + System.err.println("server output:\n" + filterOutput); + var pattern = Pattern.compile(serverIPPattern + " " + """ + - - \\[[\\s\\S]+] "GET / HTTP/1\\.1" 200 - (>[\\s\\S]+:[\\s\\S]+)+ > (<[\\s\\S]+:[\\s\\S]+)+ @@ -262,6 +266,7 @@ public class OutputFilterTest { var filter = SimpleFileServer.createOutputFilter(baos, VERBOSE); var server = HttpServer.create(LOOPBACK_ADDR, 0, "/", handler, filter); server.start(); + final String serverIPPattern = Pattern.quote(server.getAddress().getAddress().getHostAddress()); try (baos) { var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); var request = HttpRequest.newBuilder(uri(server, "aFile\u0000.txt")).build(); @@ -272,8 +277,9 @@ public class OutputFilterTest { server.stop(0); baos.flush(); var filterOutput = baos.toString(UTF_8); - var pattern = Pattern.compile(""" - 127\\.0\\.0\\.1 - - \\[[\\s\\S]+] "GET /aFile%00\\.txt HTTP/1\\.1" 404 - + System.err.println("server output:\n" + filterOutput); + var pattern = Pattern.compile(serverIPPattern + " " + """ + - - \\[[\\s\\S]+] "GET /aFile%00\\.txt HTTP/1\\.1" 404 - Resource requested: could not resolve request URI path (>[\\s\\S]+:[\\s\\S]+)+ > diff --git a/test/jdk/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java b/test/jdk/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java index 46e5473a2f3..ab7dcff7179 100644 --- a/test/jdk/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java +++ b/test/jdk/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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,17 @@ * @key headful * @summary Checks that an Error which propogates up to the EventDispatch * loop does not crash AWT. - * @author Andrei Dmitriev: area=awt.event - * @library ../../regtesthelpers - * @modules java.desktop/sun.awt - * @build Util * @run main LoopRobustness */ -import java.awt.*; -import java.awt.event.*; - -import sun.awt.SunToolkit; - -import test.java.awt.regtesthelpers.Util; +import java.awt.AWTException; +import java.awt.Button; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Robot; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.InputEvent; public class LoopRobustness { @@ -50,15 +48,15 @@ public class LoopRobustness { public static volatile boolean notifyOccured = false; public static volatile boolean otherExceptionsCaught = false; - public static void main(String [] args) throws Exception { - SunToolkit.createNewAppContext(); + public static void main(String[] args) throws Exception { ThreadGroup mainThreadGroup = Thread.currentThread().getThreadGroup(); + Impl impl = new Impl(); long at; //wait for a TIMEOUT giving a chance to a new Thread above to accomplish its stuff. synchronized (LoopRobustness.LOCK) { - new Thread(new TestThreadGroup(mainThreadGroup, "TestGroup"), new Impl()).start(); + new Thread(new TestThreadGroup(mainThreadGroup, "TestGroup"), impl).start(); at = System.currentTimeMillis(); try { while (!notifyOccured && (System.currentTimeMillis() - at < TIMEOUT)) { @@ -76,7 +74,7 @@ public class LoopRobustness { //now wait for two clicks at = System.currentTimeMillis(); - while(System.currentTimeMillis() - at < TIMEOUT && clicks < 2) { + while (System.currentTimeMillis() - at < TIMEOUT && clicks < 2) { try { Thread.sleep(100); } catch(InterruptedException e) { @@ -89,16 +87,26 @@ public class LoopRobustness { if (otherExceptionsCaught) { throw new RuntimeException("Test FAILED: unexpected exceptions caught"); } + Frame f = impl.getFrame(); + if (f != null) { + EventQueue.invokeAndWait(() -> f.dispose()); + } } } -class Impl implements Runnable{ +class Impl implements Runnable { static Robot robot; - public void run() { - SunToolkit.createNewAppContext(); + volatile Button b; + volatile Frame lr; - Button b = new Button("Press me to test the AWT-Event Queue thread"); - Frame lr = new Frame("ROBUST FRAME"); + public Frame getFrame() { + return lr; + } + + void createUI() { + + b = new Button("Press me to test the AWT-Event Queue thread"); + lr = new Frame("ROBUST FRAME"); lr.setBounds(100, 100, 300, 100); b.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -109,13 +117,19 @@ class Impl implements Runnable{ }); lr.add(b); lr.setVisible(true); + } + + public void run() { try { + EventQueue.invokeAndWait(() -> createUI()); robot = new Robot(); } catch (AWTException e) { throw new RuntimeException("Test interrupted.", e); + } catch (Exception e) { + throw new RuntimeException("UI creation failed.", e); } - Util.waitForIdle(robot); + robot.waitForIdle(); synchronized (LoopRobustness.LOCK){ LoopRobustness.LOCK.notify(); @@ -126,11 +140,11 @@ class Impl implements Runnable{ while (i < 2) { robot.mouseMove(b.getLocationOnScreen().x + b.getWidth()/2, b.getLocationOnScreen().y + b.getHeight()/2); - Util.waitForIdle(robot); - robot.mousePress(InputEvent.BUTTON1_MASK); - Util.waitForIdle(robot); - robot.mouseRelease(InputEvent.BUTTON1_MASK); - Util.waitForIdle(robot); + robot.waitForIdle(); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.waitForIdle(); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.waitForIdle(); i++; } } diff --git a/test/jdk/java/awt/GraphicsConfiguration/TranslucentDialogTest.java b/test/jdk/java/awt/GraphicsConfiguration/TranslucentDialogTest.java new file mode 100644 index 00000000000..13e7da5d188 --- /dev/null +++ b/test/jdk/java/awt/GraphicsConfiguration/TranslucentDialogTest.java @@ -0,0 +1,183 @@ +/* + * 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 8382201 + * @key headful + * @summary This tests window translucency when + * `swing.volatileImageBufferEnabled=false` + * @requires os.family == "mac" + * @run main/othervm -Dsun.java2d.opengl=false TranslucentDialogTest + * @run main/othervm -Dsun.java2d.opengl=true TranslucentDialogTest + */ + +import javax.swing.JComponent; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.SwingUtilities; +import javax.swing.border.EmptyBorder; +import javax.swing.plaf.PanelUI; +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Robot; +import java.awt.geom.RoundRectangle2D; + +public class TranslucentDialogTest { + public static void main(String[] args) { + System.setProperty("swing.volatileImageBufferEnabled", "false"); + TranslucentDialogTest test = new TranslucentDialogTest(); + test.run(); + } + + static class Sample { + final int x, y; + Color before, after; + + Sample(int x, int y) { + this.x = x; + this.y = y; + } + + void assignBeforeColor(Robot robot) { + before = robot.getPixelColor(x, y); + } + + void assignAfterColor(Robot robot) { + after = robot.getPixelColor(x, y); + } + + boolean isIdentical(int tolerance) { + int dRed = Math.abs(before.getRed() - after.getRed()); + int dGreen = Math.abs(before.getGreen() - after.getGreen()); + int dBlue = Math.abs(before.getBlue() - after.getBlue()); + return dRed < tolerance && dGreen < tolerance && dBlue < tolerance; + } + + @Override + public String toString() { + return "Sample[ x = " + x + ", y = " + y + ", " + + "before = 0x" + Integer.toHexString( + before.getRGB()) + + " after = 0x" + Integer.toHexString( + after.getRGB()); + } + } + + JDialog translucentDialog; + Sample transparentPixel, translucentPixel; + Robot robot; + + private void run() { + try { + SwingUtilities.invokeAndWait(() -> { + translucentDialog = createDialog(); + translucentDialog.pack(); + translucentDialog.setLocationRelativeTo(null); + transparentPixel = new Sample(translucentDialog.getX() + 4, + translucentDialog.getY() + 4); + translucentPixel = new Sample(translucentDialog.getX() + + translucentDialog.getWidth()/2, + translucentDialog.getY() + + translucentDialog.getHeight()/2); + try { + robot = new Robot(); + } catch(Exception e) { + e.printStackTrace(); + return; + } + transparentPixel.assignBeforeColor(robot); + translucentPixel.assignBeforeColor(robot); + int gray = (transparentPixel.before.getRed() + + transparentPixel.before.getGreen() + + transparentPixel.before.getBlue()) / 3; + if (gray > 128) { + System.out.println("using transparent black"); + translucentDialog.setBackground(new Color(0,0,0,0)); + } else { + System.out.println("using transparent white"); + translucentDialog.setBackground( + new Color(255, 255, 255, 0)); + } + translucentDialog.setVisible(true); + }); + + robot.waitForIdle(); + robot.delay(50); + + SwingUtilities.invokeAndWait(() -> { + transparentPixel.assignAfterColor(robot); + translucentPixel.assignAfterColor(robot); + }); + + + } catch(Exception e) { + e.printStackTrace(); + transparentPixel = translucentPixel = null; + } + + System.out.println("transparent pixel (border): " + transparentPixel); + System.out.println("translucent pixel (center): " + translucentPixel); + + if (!transparentPixel.isIdentical(10)) { + // this is the main problem with JDK-8382201 + throw new RuntimeException("the border pixel wasn't supposed to change"); + } + if (translucentPixel.isIdentical(10)) { + // if this fails: this test isn't capturing pixels correctly. + throw new RuntimeException("the center pixel was supposed to change"); + } + + SwingUtilities.invokeLater(() -> { + translucentDialog.dispose(); + }); + } + + private static JDialog createDialog() { + JDialog d = new JDialog(); + d.getRootPane().putClientProperty("Window.shadow", "false"); + JLabel instructions = new JLabel( + "This test passes if this window is translucent"); + instructions.setBorder(new EmptyBorder(10,10,10,10)); + instructions.setOpaque(false); + + d.setUndecorated(true); + JPanel p = new JPanel(); + p.setOpaque(false); + p.setBorder(new EmptyBorder(10,10,10,10)); + p.setUI(new PanelUI() { + @Override + public void paint(Graphics g, JComponent c) { + Graphics2D g2 = (Graphics2D) g; + g2.setColor(new Color(220, 180, 0, 200)); + g2.fill(new RoundRectangle2D.Double(5, 5, c.getWidth() - 10, + c.getHeight() - 10,20,20)); + } + }); + p.add(instructions); + d.getContentPane().add(p); + return d; + } +} diff --git a/test/jdk/java/awt/List/ListSelection/DeselectionUnitTest.java b/test/jdk/java/awt/List/ListSelection/DeselectionUnitTest.java new file mode 100644 index 00000000000..4db4637f432 --- /dev/null +++ b/test/jdk/java/awt/List/ListSelection/DeselectionUnitTest.java @@ -0,0 +1,159 @@ +/* + * 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.Frame; +import java.awt.List; + +import static jdk.test.lib.Asserts.assertEquals; +import static jdk.test.lib.Asserts.assertFalse; +import static jdk.test.lib.Asserts.assertTrue; + +/** + * @test + * @bug 8369327 + * @summary Test awt list deselection methods + * @key headful + * @library /test/lib + * @build jdk.test.lib.Asserts + * @run main DeselectionUnitTest + */ +public final class DeselectionUnitTest { + + public static void main(String[] args) { + testNonDisplayable(DeselectionUnitTest::testSingleMode); + testNonDisplayable(DeselectionUnitTest::testMultipleMode); + testNonDisplayable(DeselectionUnitTest::testInvalidDeselection); + testNonDisplayable(DeselectionUnitTest::testEmptyListDeselection); + + testDisplayable(DeselectionUnitTest::testSingleMode); + testDisplayable(DeselectionUnitTest::testMultipleMode); + testDisplayable(DeselectionUnitTest::testInvalidDeselection); + testDisplayable(DeselectionUnitTest::testEmptyListDeselection); + } + + interface Test { + void execute(Frame frame); + } + + private static void testNonDisplayable(Test test) { + test.execute(null); + } + + private static void testDisplayable(Test test) { + Frame frame = new Frame(); + try { + frame.setSize(300, 200); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + test.execute(frame); + } finally { + frame.dispose(); + } + } + + private static List createList(Frame frame, boolean multi) { + List list = new List(4, multi); + if (frame != null) { + frame.add(list); + } + list.add("Item1"); + list.add("Item2"); + list.add("Item3"); + return list; + } + + private static void testSingleMode(Frame frame) { + List list = createList(frame, false); + + // Select and deselect single item + list.select(1); + assertTrue(list.isIndexSelected(1)); + list.deselect(1); + assertEquals(-1, list.getSelectedIndex()); + assertEquals(0, list.getSelectedIndexes().length); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + + // Deselect non-selected item (should be no-op) + list.select(0); + list.deselect(2); + assertEquals(0, list.getSelectedIndex()); + assertTrue(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + } + + private static void testMultipleMode(Frame frame) { + List list = createList(frame, true); + + // Select multiple items and deselect one + list.select(0); + list.select(1); + list.select(2); + assertEquals(3, list.getSelectedIndexes().length); + + list.deselect(1); + assertEquals(2, list.getSelectedIndexes().length); + assertTrue(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertTrue(list.isIndexSelected(2)); + + // Deselect all remaining + list.deselect(0); + list.deselect(2); + assertEquals(-1, list.getSelectedIndex()); + assertEquals(0, list.getSelectedIndexes().length); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + } + + private static void testInvalidDeselection(Frame frame) { + List list = createList(frame, false); + + // Deselect invalid indices (should be no-op) + list.select(0); + list.deselect(-1); + list.deselect(5); + assertEquals(0, list.getSelectedIndex()); + assertTrue(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + } + + private static void testEmptyListDeselection(Frame frame) { + List list = new List(); + if (frame != null) { + frame.add(list); + } + + // Deselect on empty list (should be no-op) + list.deselect(0); + list.deselect(-1); + assertEquals(-1, list.getSelectedIndex()); + assertEquals(0, list.getSelectedIndexes().length); + assertFalse(list.isIndexSelected(0)); + } + +} diff --git a/test/jdk/java/awt/List/ListSelection/SelectInvalidTest.java b/test/jdk/java/awt/List/ListSelection/SelectInvalidTest.java new file mode 100644 index 00000000000..24759985725 --- /dev/null +++ b/test/jdk/java/awt/List/ListSelection/SelectInvalidTest.java @@ -0,0 +1,216 @@ +/* + * 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.Frame; +import java.awt.List; + +import jdk.test.lib.Platform; + +import static jdk.test.lib.Asserts.assertEquals; +import static jdk.test.lib.Asserts.assertFalse; +import static jdk.test.lib.Asserts.assertTrue; + +/** + * @test + * @bug 8369327 8369455 + * @summary Test awt list selection of invalid indexes + * @key headful + * @library /test/lib + * @build jdk.test.lib.Asserts jdk.test.lib.Platform + * @run main SelectInvalidTest + */ +public final class SelectInvalidTest { + + /** + * A special index on windows, selects or deselects all elements. + */ + private static final int WINDOWS_INVALID = -1; + + /** + * The list of invalid indexes, their usages should be noop. + */ + private static final int[] INVALID = { + WINDOWS_INVALID, Integer.MIN_VALUE, -100, 3, 100, Integer.MAX_VALUE + }; + + public static void main(String[] args) { + for (int i : INVALID) { + if (Platform.isWindows() && i == WINDOWS_INVALID) { + testDisplayable(SelectInvalidTest::testWinDeselectAllSingleMode, i); + testDisplayable(SelectInvalidTest::testWinSelectAllMultipleMode, i); + } else { + testDisplayable(SelectInvalidTest::testSingleMode, i); + testDisplayable(SelectInvalidTest::testMultipleMode, i); + testDisplayable(SelectInvalidTest::testEmptySelection, i); + } + } + } + + interface Test { + void execute(Frame frame, int invalid); + } + + private static void testDisplayable(Test test, int invalid) { + Frame frame = new Frame(); + try { + frame.setSize(300, 200); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + test.execute(frame, invalid); + } finally { + frame.dispose(); + } + } + + private static void testSingleMode(Frame frame, int invalid) { + List list = new List(4, false); + frame.add(list); + list.add("Item1"); + list.add("Item2"); + list.add("Item3"); + + // Test initial state + list.select(invalid); + assertEquals(-1, list.getSelectedIndex()); + assertEquals(0, list.getSelectedIndexes().length); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + + // Test single selection + list.select(1); + list.select(invalid); + assertEquals(1, list.getSelectedIndex()); + assertEquals(1, list.getSelectedIndexes().length); + assertEquals(1, list.getSelectedIndexes()[0]); + assertFalse(list.isIndexSelected(0)); + assertTrue(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + + // Test selection replacement in single mode + list.select(2); + list.select(invalid); + assertEquals(2, list.getSelectedIndex()); + assertEquals(1, list.getSelectedIndexes().length); + assertEquals(2, list.getSelectedIndexes()[0]); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertTrue(list.isIndexSelected(2)); + } + + private static void testMultipleMode(Frame frame, int invalid) { + List list = new List(4, true); + frame.add(list); + list.add("Item1"); + list.add("Item2"); + list.add("Item3"); + + // Test multiple selections + list.select(0); + list.select(2); + list.select(invalid); + // Returns -1 for multiple selections + assertEquals(-1, list.getSelectedIndex()); + assertEquals(2, list.getSelectedIndexes().length); + assertTrue(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertTrue(list.isIndexSelected(2)); + + // Test partial deselection + list.deselect(0); + list.select(invalid); + // Single selection remaining + assertEquals(2, list.getSelectedIndex()); + assertEquals(1, list.getSelectedIndexes().length); + assertEquals(2, list.getSelectedIndexes()[0]); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertTrue(list.isIndexSelected(2)); + } + + private static void testEmptySelection(Frame frame, int invalid) { + List list = new List(); + frame.add(list); + list.select(invalid); + assertEquals(-1, list.getSelectedIndex()); + assertEquals(0, list.getSelectedIndexes().length); + assertFalse(list.isIndexSelected(0)); + } + + private static void testWinDeselectAllSingleMode(Frame frame, int invalid) { + List list = new List(4, false); + frame.add(list); + list.add("Item1"); + list.add("Item2"); + list.add("Item3"); + + list.select(invalid); + assertEquals(-1, list.getSelectedIndex()); + assertEquals(0, list.getSelectedIndexes().length); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + + list.select(1); + list.select(invalid); + assertEquals(-1, list.getSelectedIndex()); + assertEquals(0, list.getSelectedIndexes().length); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + + list.select(2); + list.select(invalid); + assertEquals(-1, list.getSelectedIndex()); + assertEquals(0, list.getSelectedIndexes().length); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + } + + private static void testWinSelectAllMultipleMode(Frame frame, int invalid) { + List list = new List(4, true); + frame.add(list); + list.add("Item1"); + list.add("Item2"); + list.add("Item3"); + + list.select(0); + list.select(2); + list.select(invalid); + assertEquals(-1, list.getSelectedIndex()); + assertEquals(3, list.getSelectedIndexes().length); + assertTrue(list.isIndexSelected(0)); + assertTrue(list.isIndexSelected(1)); + assertTrue(list.isIndexSelected(2)); + + list.deselect(0); + list.select(invalid); + assertEquals(-1, list.getSelectedIndex()); + assertEquals(3, list.getSelectedIndexes().length); + assertTrue(list.isIndexSelected(0)); + assertTrue(list.isIndexSelected(1)); + assertTrue(list.isIndexSelected(2)); + } + +} diff --git a/test/jdk/java/awt/List/ListSelection/SelectionUnitTest.java b/test/jdk/java/awt/List/ListSelection/SelectionUnitTest.java new file mode 100644 index 00000000000..7757eb61b08 --- /dev/null +++ b/test/jdk/java/awt/List/ListSelection/SelectionUnitTest.java @@ -0,0 +1,146 @@ +/* + * 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.Frame; +import java.awt.List; + +import static jdk.test.lib.Asserts.assertEquals; +import static jdk.test.lib.Asserts.assertFalse; +import static jdk.test.lib.Asserts.assertTrue; + +/** + * @test + * @bug 8369327 + * @summary Test awt list selection methods + * @key headful + * @library /test/lib + * @build jdk.test.lib.Asserts + * @run main SelectionUnitTest + */ +public final class SelectionUnitTest { + + public static void main(String[] args) { + testNonDisplayable(SelectionUnitTest::testSingleMode); + testNonDisplayable(SelectionUnitTest::testMultipleMode); + testNonDisplayable(SelectionUnitTest::testEmptySelection); + + testDisplayable(SelectionUnitTest::testSingleMode); + testDisplayable(SelectionUnitTest::testMultipleMode); + testDisplayable(SelectionUnitTest::testEmptySelection); + } + + interface Test { + void execute(Frame frame); + } + + private static void testNonDisplayable(Test test) { + test.execute(null); + } + + private static void testDisplayable(Test test) { + Frame frame = new Frame(); + try { + frame.setSize(300, 200); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + test.execute(frame); + } finally { + frame.dispose(); + } + } + + private static List createList(Frame frame, boolean multi) { + List list = new List(4, multi); + if (frame != null) { + frame.add(list); + } + list.add("Item1"); + list.add("Item2"); + list.add("Item3"); + return list; + } + + private static void testSingleMode(Frame frame) { + List list = createList(frame, false); + + // Test initial state + assertEquals(-1, list.getSelectedIndex()); + assertEquals(0, list.getSelectedIndexes().length); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + + // Test single selection + list.select(1); + assertEquals(1, list.getSelectedIndex()); + assertEquals(1, list.getSelectedIndexes().length); + assertEquals(1, list.getSelectedIndexes()[0]); + assertFalse(list.isIndexSelected(0)); + assertTrue(list.isIndexSelected(1)); + assertFalse(list.isIndexSelected(2)); + + // Test selection replacement in single mode + list.select(2); + assertEquals(2, list.getSelectedIndex()); + assertEquals(1, list.getSelectedIndexes().length); + assertEquals(2, list.getSelectedIndexes()[0]); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertTrue(list.isIndexSelected(2)); + } + + private static void testMultipleMode(Frame frame) { + List list = createList(frame, true); + + // Test multiple selections + list.select(0); + list.select(2); + // Returns -1 for multiple selections + assertEquals(-1, list.getSelectedIndex()); + assertEquals(2, list.getSelectedIndexes().length); + assertTrue(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertTrue(list.isIndexSelected(2)); + + // Test partial deselection + list.deselect(0); + // Single selection remaining + assertEquals(2, list.getSelectedIndex()); + assertEquals(1, list.getSelectedIndexes().length); + assertEquals(2, list.getSelectedIndexes()[0]); + assertFalse(list.isIndexSelected(0)); + assertFalse(list.isIndexSelected(1)); + assertTrue(list.isIndexSelected(2)); + } + + private static void testEmptySelection(Frame frame) { + List list = new List(); + if (frame != null) { + frame.add(list); + } + assertEquals(-1, list.getSelectedIndex()); + assertEquals(0, list.getSelectedIndexes().length); + assertFalse(list.isIndexSelected(0)); + } + +} diff --git a/test/jdk/java/awt/List/ListSelection/SetMultipleModeTest.java b/test/jdk/java/awt/List/ListSelection/SetMultipleModeTest.java new file mode 100644 index 00000000000..73c131c1105 --- /dev/null +++ b/test/jdk/java/awt/List/ListSelection/SetMultipleModeTest.java @@ -0,0 +1,133 @@ +/* + * 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.Frame; +import java.awt.List; +import java.awt.Toolkit; +import java.util.Arrays; + +/** + * @test + * @bug 8369327 + * @summary Test awt list setMultipleMode selection + * @key headful + */ +public final class SetMultipleModeTest { + + public static void main(String[] args) { + // Non-displayable list + // test(null); Does not work per the spec + + // Displayable list + Frame frame = new Frame(); + try { + test(frame); + } finally { + frame.dispose(); + } + } + + private static void test(Frame frame) { + List list = new List(); + list.add("Item1"); + list.add("Item2"); + list.add("Item3"); + if (frame != null) { + frame.add(list); + frame.pack(); + } + + // Empty: mode switch preserves empty + list.setMultipleMode(true); + check(list); + list.deselect(0); + check(list); + list.setMultipleMode(false); + check(list); + + // Single to multi preserves selection + list.select(1); + list.setMultipleMode(true); + check(list, 1); + + // Multi to multi is no-op + list.select(0); + list.select(2); + check(list, 0, 1, 2); + list.setMultipleMode(true); + check(list, 0, 1, 2); + + // Multi to single keeps lead + list.setMultipleMode(false); + check(list, 2); + + // Single to single is no-op + list.setMultipleMode(false); + check(list, 2); + + // Round-trip + list.setMultipleMode(true); + check(list, 2); + list.setMultipleMode(false); + check(list, 2); + + // XAWT does not move the focus cursor on deselect(), + // so multi->single keeps the focused item, skip on XAWT + boolean isXToolkit = "sun.awt.X11.XToolkit".equals( + Toolkit.getDefaultToolkit().getClass().getName()); + if (!isXToolkit) { + // Deselect lead in multi, switch to single + list.setMultipleMode(true); + list.select(0); + list.select(1); + check(list, 0, 1, 2); + list.deselect(2); + check(list, 0, 1); + list.setMultipleMode(false); + check(list); + + // Deselect non-selected in multi, no-op + list.setMultipleMode(true); + list.select(0); + check(list, 0); + list.deselect(2); + check(list, 0); + list.setMultipleMode(false); + check(list); + } + + if (frame != null) { + frame.remove(list); + } + } + + private static void check(List list, int... expected) { + int[] actual = list.getSelectedIndexes(); + Arrays.sort(actual); + if (!Arrays.equals(expected, actual)) { + throw new RuntimeException( + "Expected %s, got %s".formatted(Arrays.toString(expected), + Arrays.toString(actual))); + } + } +} diff --git a/test/jdk/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java b/test/jdk/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java index f5dd838eff2..6bd9900a670 100644 --- a/test/jdk/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java +++ b/test/jdk/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java @@ -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 @@ -21,11 +21,17 @@ * questions. */ +import java.awt.Component; import java.awt.Container; +import java.awt.KeyboardFocusManager; import java.awt.Point; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.lang.reflect.InvocationTargetException; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import javax.swing.JFrame; import javax.swing.SpringLayout; @@ -54,7 +60,7 @@ public abstract class GlassPaneOverlappingTestBase extends SimpleOverlappingTest protected void prepareControls() { wasLWClicked = false; - if(f != null) { + if (f != null) { f.setVisible(false); } f = new JFrame("Mixing : GlassPane Overlapping test"); @@ -63,7 +69,8 @@ public abstract class GlassPaneOverlappingTestBase extends SimpleOverlappingTest propagateAWTControls(f); - f.getGlassPane().setVisible(true); + f.getGlassPane() + .setVisible(true); Container glassPane = (Container) f.getGlassPane(); glassPane.setLayout(null); @@ -102,6 +109,7 @@ public abstract class GlassPaneOverlappingTestBase extends SimpleOverlappingTest * Run test by {@link OverlappingTestBase#clickAndBlink(java.awt.Robot, java.awt.Point) } validation for current lightweight component. *

              Also resize component and repeat validation in the resized area. *

              Called by base class. + * * @return true if test passed * @see GlassPaneOverlappingTestBase#testResize */ @@ -110,28 +118,54 @@ public abstract class GlassPaneOverlappingTestBase extends SimpleOverlappingTest if (!super.performTest()) { return false; } - if (!testResize) { return true; } + final CountDownLatch latch = new CountDownLatch(1); + f.addFocusListener(new FocusAdapter() { + @Override + public void focusGained(FocusEvent e) { + latch.countDown(); + } + }); wasLWClicked = false; try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { testedComponent.setBounds(0, 0, - testedComponent.getPreferredSize().width, - testedComponent.getPreferredSize().height + 20); + testedComponent.getPreferredSize().width, + testedComponent.getPreferredSize().height + 20); + Component focusOwner = KeyboardFocusManager + .getCurrentKeyboardFocusManager() + .getFocusOwner(); + if (focusOwner == f) { + // frame already has focus + latch.countDown(); + } else { + f.requestFocusInWindow(); + } } }); } catch (InterruptedException | InvocationTargetException ex) { fail(ex.getMessage()); } - Point lLoc = testedComponent.getLocationOnScreen(); - lLoc.translate(1, testedComponent.getPreferredSize().height + 1); - clickAndBlink(robot, lLoc); + try { + if (!latch.await(1, TimeUnit.SECONDS)) { + throw new RuntimeException("Ancestor frame didn't receive focus"); + } + final Point[] points = new Point[1]; + SwingUtilities.invokeAndWait(() -> { + Point lLoc = testedComponent.getLocationOnScreen(); + lLoc.translate(1, testedComponent.getPreferredSize().height + 1); + points[0] = lLoc; + }); + clickAndBlink(robot, points[0]); + } catch (InterruptedException | InvocationTargetException e) { + throw new RuntimeException(e); + } return wasLWClicked; } diff --git a/test/jdk/java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java b/test/jdk/java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java index d71fa7b3522..31a042a995d 100644 --- a/test/jdk/java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java +++ b/test/jdk/java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java @@ -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 @@ -26,15 +26,17 @@ import java.awt.Point; import java.awt.Robot; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; + import javax.swing.BoxLayout; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.SwingUtilities; + import test.java.awt.regtesthelpers.Util; /** - * AWT/Swing overlapping test for {@link javax.swing.JCombobox } component. + * AWT/Swing overlapping test for {@link javax.swing.JComboBox } component. *

              This test creates combobox and test if heavyweight component is drawn correctly then dropdown is shown. *

              See base class for details. */ @@ -55,18 +57,22 @@ public class JComboBoxOverlapping extends OverlappingTestBase { private boolean lwClicked = false; private Point loc; private Point loc2; - private JComboBox cb; + private JComboBox cb; private JFrame frame; - {testEmbeddedFrame = true;} + { + testEmbeddedFrame = true; + } protected void prepareControls() { frame = new JFrame("Mixing : Dropdown Overlapping test"); - frame.getContentPane().setLayout(new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS)); + frame.getContentPane() + .setLayout(new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS)); frame.setSize(200, 200); - cb = new JComboBox(petStrings); - cb.setPreferredSize(new Dimension(frame.getContentPane().getWidth(), 20)); + cb = new JComboBox<>(petStrings); + cb.setPreferredSize(new Dimension(frame.getContentPane() + .getWidth(), 20)); cb.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -92,13 +98,15 @@ public class JComboBoxOverlapping extends OverlappingTestBase { try { SwingUtilities.invokeAndWait(() -> { loc = cb.getLocationOnScreen(); - loc2 = frame.getContentPane().getLocationOnScreen(); + loc2 = frame.getContentPane() + .getLocationOnScreen(); }); } catch (Exception e) { throw new RuntimeException(e); } loc2.translate(75, 75); + robot.mouseMove(0, 0); // Avoid capturing mouse cursor pixelPreCheck(robot, loc2, currentAwtControl); loc.translate(3, 3); diff --git a/test/jdk/java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java b/test/jdk/java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java index f3a213e5144..ac2adb4ba13 100644 --- a/test/jdk/java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java +++ b/test/jdk/java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java @@ -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 @@ -54,7 +54,7 @@ import test.java.awt.regtesthelpers.Util; * java.desktop/java.awt.peer * @build java.desktop/java.awt.Helper * @build Util - * @run main JMenuBarOverlapping + * @run main/timeout=180 JMenuBarOverlapping */ public class JMenuBarOverlapping extends OverlappingTestBase { @@ -73,6 +73,8 @@ public class JMenuBarOverlapping extends OverlappingTestBase { frame = new JFrame("Mixing : Dropdown Overlapping test"); frame.setLayout(new GridLayout(0,1)); frame.setSize(200, 200); + frame.setLocationRelativeTo(null); + frame.setVisible(true); menuBar = new JMenuBar(); JMenu menu = new JMenu("Test Menu"); @@ -104,8 +106,6 @@ public class JMenuBarOverlapping extends OverlappingTestBase { frame.setJMenuBar(menuBar); propagateAWTControls(frame); - frame.setLocationRelativeTo(null); - frame.setVisible(true); } @Override @@ -122,6 +122,7 @@ public class JMenuBarOverlapping extends OverlappingTestBase { // run robot Robot robot = Util.createRobot(); robot.setAutoDelay(ROBOT_DELAY); + robot.mouseMove(0, 0);// Avoid capturing mouse cursor loc2.translate(75, 75); pixelPreCheck(robot, loc2, currentAwtControl); diff --git a/test/jdk/java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java b/test/jdk/java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java index e80475088ac..003977e233a 100644 --- a/test/jdk/java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java +++ b/test/jdk/java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java @@ -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 @@ -69,12 +69,14 @@ public class JPopupMenuOverlapping extends OverlappingTestBase { frame = new JFrame("Mixing : Dropdown Overlapping test"); frame.setLayout(new SpringLayout()); frame.setSize(200, 200); + frame.setLocationRelativeTo(null); popup = new JPopupMenu(); ActionListener menuListener = new ActionListener() { public void actionPerformed(ActionEvent event) { lwClicked = true; + frame.setVisible(false); } }; JMenuItem item; @@ -83,7 +85,6 @@ public class JPopupMenuOverlapping extends OverlappingTestBase { item.addActionListener(menuListener); } propagateAWTControls(frame); - frame.setLocationRelativeTo(null); frame.setVisible(true); loc = frame.getContentPane().getLocationOnScreen(); } @@ -93,9 +94,8 @@ public class JPopupMenuOverlapping extends OverlappingTestBase { // run robot Robot robot = Util.createRobot(); robot.setAutoDelay(ROBOT_DELAY); - + robot.mouseMove(0, 0);// Avoid capturing mouse cursor loc.translate(75, 75); - pixelPreCheck(robot, loc, currentAwtControl); try { @@ -107,7 +107,6 @@ public class JPopupMenuOverlapping extends OverlappingTestBase { }); robot.waitForIdle(); - clickAndBlink(robot, loc, false); SwingUtilities.invokeAndWait(new Runnable() { diff --git a/test/jdk/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java b/test/jdk/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java index 5875a04b62b..7e0b377faf3 100644 --- a/test/jdk/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java +++ b/test/jdk/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java @@ -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 @@ -70,6 +70,8 @@ public class JSplitPaneOverlapping extends OverlappingTestBase { p.setPreferredSize(new Dimension(500, 500)); propagateAWTControls(p); sp1 = new JScrollPane(p); + currentAwtControl.setForeground(Color.WHITE); + currentAwtControl.setBackground(Color.WHITE); JButton button = new JButton("JButton"); button.setBackground(Color.RED); diff --git a/test/jdk/java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java b/test/jdk/java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java index 1bb9b442dd8..19a1df0ab91 100644 --- a/test/jdk/java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java +++ b/test/jdk/java/awt/Mixing/AWT_Mixing/MixingPanelsResizing.java @@ -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 @@ -58,7 +58,7 @@ import test.java.awt.regtesthelpers.Util; */ public class MixingPanelsResizing { - static volatile boolean failed = false; + private static final int TOLERANCE_MACOSX = 15; private static JFrame frame; private static JButton jbutton; @@ -77,7 +77,8 @@ public class MixingPanelsResizing { private static int frameBorderCounter() { String JAVA_HOME = System.getProperty("java.home"); try { - Process p = Runtime.getRuntime().exec(JAVA_HOME + "/bin/java FrameBorderCounter"); + Process p = Runtime.getRuntime() + .exec(JAVA_HOME + "/bin/java FrameBorderCounter"); try { p.waitFor(); } catch (InterruptedException e) { @@ -85,7 +86,9 @@ public class MixingPanelsResizing { throw new RuntimeException(e); } if (p.exitValue() != 0) { - throw new RuntimeException("FrameBorderCounter exited with not null code!\n" + readInputStream(p.getErrorStream())); + throw new RuntimeException( + "FrameBorderCounter exited with not null code!\n" + + readInputStream(p.getErrorStream())); } return Integer.parseInt(readInputStream(p.getInputStream()).trim()); } catch (IOException e) { @@ -108,9 +111,11 @@ public class MixingPanelsResizing { private static void init() throws Exception { //*** Create instructions for the user here *** - borderShift = frameBorderCounter(); - borderShift = Math.abs(borderShift) == 1 ? borderShift : (borderShift / 2); + borderShift = + Math.abs(borderShift) == 1 + ? borderShift + : (borderShift / 2); SwingUtilities.invokeAndWait(new Runnable() { public void run() { // prepare controls @@ -127,12 +132,15 @@ public class MixingPanelsResizing { awtPanel.add(jbutton); jbutton.setForeground(jbColor); jbutton.setBackground(jbColor); + jbutton.setOpaque(true); JPanel jPanel = new JPanel(); jbutton2 = new JButton("SwingButton2"); jPanel.add(jbutton2); jbutton2.setForeground(jb2Color); jbutton2.setBackground(jb2Color); + jbutton2.setOpaque(true); + awtButton2 = new Button("AWT Button2"); jPanel.add(awtButton2); awtButton2.setForeground(awt2Color); @@ -158,7 +166,8 @@ public class MixingPanelsResizing { SwingUtilities.invokeAndWait(new Runnable() { public void run() { lLoc = frame.getLocationOnScreen(); - lLoc.translate(frame.getWidth() + borderShift, frame.getHeight() + borderShift); + lLoc.translate(frame.getWidth() + borderShift, + frame.getHeight() + borderShift); } }); @@ -171,25 +180,29 @@ public class MixingPanelsResizing { public void run() { Point btnLoc = jbutton.getLocationOnScreen(); Color c = robot.getPixelColor(btnLoc.x + 5, btnLoc.y + 5); - if (!c.equals(jbColor)) { + System.out.println("Color picked for jbutton: " + c); + if (!isAlmostEqualColor(c, jbColor)) { fail("JButton was not redrawn properly on AWT Panel during move"); } btnLoc = awtButton.getLocationOnScreen(); c = robot.getPixelColor(btnLoc.x + 5, btnLoc.y + 5); - if (!c.equals(awtColor)) { + System.out.println("Color picked for awtButton: " + c); + if (!isAlmostEqualColor(c, awtColor)) { fail("AWT Button was not redrawn properly on AWT Panel during move"); } btnLoc = jbutton2.getLocationOnScreen(); c = robot.getPixelColor(btnLoc.x + 5, btnLoc.y + 5); - if (!c.equals(jb2Color)) { + System.out.println("Color picked for jbutton2: " + c); + if (!isAlmostEqualColor(c, jb2Color)) { fail("JButton was not redrawn properly on JPanel during move"); } btnLoc = awtButton2.getLocationOnScreen(); c = robot.getPixelColor(btnLoc.x + 5, btnLoc.y + 5); - if (!c.equals(awt2Color)) { + System.out.println("Color picked for awtButton2: " + c); + if (!isAlmostEqualColor(c, awt2Color)) { fail("ATW Button was not redrawn properly on JPanel during move"); } } @@ -212,6 +225,7 @@ public class MixingPanelsResizing { pass(); }//End init() + /***************************************************** * Standard Test Machinery Section * DO NOT modify anything in this section -- it's a @@ -256,7 +270,8 @@ public class MixingPanelsResizing { try { Thread.sleep(sleepTime); //Timed out, so fail the test - throw new RuntimeException("Timed out after " + sleepTime / 1000 + " seconds"); + throw new RuntimeException( + "Timed out after " + (sleepTime / 1000) + " seconds"); } catch (InterruptedException e) { //The test harness may have interrupted the test. If so, rethrow the exception // so that the harness gets it and deals with it. @@ -313,6 +328,16 @@ public class MixingPanelsResizing { mainThread.interrupt(); }//fail() + private static boolean isAlmostEqualColor(Color color, Color refColor) { + System.out.println("Comparing color: " + color + " with reference " + + "color: " + refColor); + return color.equals(refColor) + || (Math.abs(color.getRed() - refColor.getRed()) < TOLERANCE_MACOSX + && Math.abs(color.getGreen() - refColor.getGreen()) < TOLERANCE_MACOSX + && Math.abs(color.getBlue() - refColor.getBlue()) < TOLERANCE_MACOSX); + } + static class TestPassedException extends RuntimeException { } + }// class JButtonInGlassPane diff --git a/test/jdk/java/awt/Mixing/AWT_Mixing/OverlappingTestBase.java b/test/jdk/java/awt/Mixing/AWT_Mixing/OverlappingTestBase.java index 3d4adecbd17..cdc76f08894 100644 --- a/test/jdk/java/awt/Mixing/AWT_Mixing/OverlappingTestBase.java +++ b/test/jdk/java/awt/Mixing/AWT_Mixing/OverlappingTestBase.java @@ -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 @@ -21,6 +21,7 @@ * questions. */ +import java.awt.Button; import java.awt.Canvas; import java.awt.Choice; import java.awt.Color; @@ -28,6 +29,7 @@ import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Font; +import java.awt.Helper; import java.awt.List; import java.awt.Point; import java.awt.Robot; @@ -54,7 +56,6 @@ import javax.swing.WindowConstants; import sun.awt.AWTAccessor; import sun.awt.EmbeddedFrame; import sun.awt.OSInfo; - import test.java.awt.regtesthelpers.Util; /** @@ -236,7 +237,7 @@ public abstract class OverlappingTestBase { try { Class definition = Class.forName("java.awt." + className); Constructor constructor = definition.getConstructor(new Class[]{String.class}); - java.awt.Component component = (java.awt.Component) constructor.newInstance(new Object[]{"AWT Component " + className}); + Component component = (Component) constructor.newInstance(new Object[]{"AWT Component " + className}); addAwtControl(container, component); } catch (Exception ex) { System.err.println(ex.getMessage()); @@ -270,16 +271,16 @@ public abstract class OverlappingTestBase { String getWindowMethodName = null; String eframeClassName = null; if (Toolkit.getDefaultToolkit().getClass().getName().contains("XToolkit")) { - java.awt.Helper.addExports("sun.awt.X11", OverlappingTestBase.class.getModule()); + Helper.addExports("sun.awt.X11", OverlappingTestBase.class.getModule()); getWindowMethodName = "getWindow"; eframeClassName = "sun.awt.X11.XEmbeddedFrame"; }else if (Toolkit.getDefaultToolkit().getClass().getName().contains(".WToolkit")) { - java.awt.Helper.addExports("sun.awt.windows", OverlappingTestBase.class.getModule()); + Helper.addExports("sun.awt.windows", OverlappingTestBase.class.getModule()); getWindowMethodName = "getHWnd"; eframeClassName = "sun.awt.windows.WEmbeddedFrame"; }else if (isMac) { - java.awt.Helper.addExports("sun.lwawt", OverlappingTestBase.class.getModule()); - java.awt.Helper.addExports("sun.lwawt.macosx", OverlappingTestBase.class.getModule()); + Helper.addExports("sun.lwawt", OverlappingTestBase.class.getModule()); + Helper.addExports("sun.lwawt.macosx", OverlappingTestBase.class.getModule()); eframeClassName = "sun.lwawt.macosx.CViewEmbeddedFrame"; } @@ -382,10 +383,9 @@ public abstract class OverlappingTestBase { protected String failMessage = "The LW component did not received the click."; private static boolean isValidForPixelCheck(Component component) { - if ((component instanceof java.awt.Scrollbar) || isMac && (component instanceof java.awt.Button)) { - return false; - } - return true; + return component != null + && !(component instanceof Scrollbar) + && !(isMac && (component instanceof Button)); } /** diff --git a/test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java b/test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java index 0dd42a36cd0..00140bc845f 100644 --- a/test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java +++ b/test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java @@ -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 @@ -44,7 +44,7 @@ import test.java.awt.regtesthelpers.Util; *

              See base class for usage * * @author Sergey Grinev -*/ + */ public abstract class SimpleOverlappingTestBase extends OverlappingTestBase { { @@ -59,6 +59,7 @@ public abstract class SimpleOverlappingTestBase extends OverlappingTestBase { /** * Constructor which sets {@link SimpleOverlappingTestBase#useDefaultClickValidation } + * * @param defaultClickValidation */ protected SimpleOverlappingTestBase(boolean defaultClickValidation) { @@ -66,7 +67,7 @@ public abstract class SimpleOverlappingTestBase extends OverlappingTestBase { this.useDefaultClickValidation = defaultClickValidation; } - protected boolean isMultiFramesTest(){ + protected boolean isMultiFramesTest() { return true; } @@ -75,8 +76,10 @@ public abstract class SimpleOverlappingTestBase extends OverlappingTestBase { } //overridables + /** * Successors override this method providing swing component for testing + * * @return swing component to test */ protected abstract JComponent getSwingComponent(); @@ -93,6 +96,7 @@ public abstract class SimpleOverlappingTestBase extends OverlappingTestBase { /** * Current tested lightweight component + * * @see SimpleOverlappingTestBase#getSwingComponent() */ protected JComponent testedComponent; @@ -141,6 +145,7 @@ public abstract class SimpleOverlappingTestBase extends OverlappingTestBase { /** * Run test by {@link OverlappingTestBase#clickAndBlink(java.awt.Robot, java.awt.Point) } validation for current lightweight component. *

              Called by base class. + * * @return true if test passed */ protected boolean performTest() { @@ -156,23 +161,27 @@ public abstract class SimpleOverlappingTestBase extends OverlappingTestBase { /* this is a workaround for certain jtreg(?) focus issue: tests fail starting after failing mixing tests but always pass alone. */ + final CountDownLatch latch = new CountDownLatch(1); + JFrame ancestor = (JFrame) (testedComponent.getTopLevelAncestor()); if (ancestor != null) { - final CountDownLatch latch = new CountDownLatch(1); ancestor.addFocusListener(new FocusAdapter() { - @Override public void focusGained(FocusEvent e) { + @Override + public void focusGained(FocusEvent e) { latch.countDown(); } }); ancestor.requestFocus(); - try { - if (!latch.await(1L, TimeUnit.SECONDS)) { - throw new RuntimeException( - "Ancestor frame didn't receive focus"); - } - } catch (InterruptedException e) { - throw new RuntimeException(e); + } else { + latch.countDown(); + } + + try { + if (!latch.await(1, TimeUnit.SECONDS)) { + throw new RuntimeException("Ancestor frame didn't receive " + "focus"); } + } catch (InterruptedException e) { + throw new RuntimeException(e); } clickAndBlink(robot, lLoc); @@ -184,14 +193,18 @@ public abstract class SimpleOverlappingTestBase extends OverlappingTestBase { } public boolean isOel7orLater() { - if (System.getProperty("os.name").toLowerCase().contains("linux") && - System.getProperty("os.version").toLowerCase().contains("el")) { + if (System.getProperty("os.name") + .toLowerCase() + .contains("linux") && System.getProperty("os.version") + .toLowerCase() + .contains("el")) { Pattern p = Pattern.compile("el(\\d+)"); Matcher m = p.matcher(System.getProperty("os.version")); if (m.find()) { try { return Integer.parseInt(m.group(1)) >= 7; - } catch (NumberFormatException nfe) {} + } catch (NumberFormatException nfe) { + } } } return false; diff --git a/test/jdk/java/awt/Modal/FileDialog/FileDialogDocModal7Test.java b/test/jdk/java/awt/Modal/FileDialog/FileDialogDocModal7Test.java index 9fd7d72a399..89370d71cb6 100644 --- a/test/jdk/java/awt/Modal/FileDialog/FileDialogDocModal7Test.java +++ b/test/jdk/java/awt/Modal/FileDialog/FileDialogDocModal7Test.java @@ -37,6 +37,7 @@ import java.awt.Dialog; * @build TestDialog * @build TestFrame * @build TestWindow + * @requires (os.family != "mac") * @run main FileDialogDocModal7Test */ diff --git a/test/jdk/java/awt/Modal/FileDialog/FileDialogNonModal7Test.java b/test/jdk/java/awt/Modal/FileDialog/FileDialogNonModal7Test.java index 7c29610e205..75f52f7321d 100644 --- a/test/jdk/java/awt/Modal/FileDialog/FileDialogNonModal7Test.java +++ b/test/jdk/java/awt/Modal/FileDialog/FileDialogNonModal7Test.java @@ -37,6 +37,7 @@ import java.awt.Dialog; * @build TestDialog * @build TestFrame * @build TestWindow + * @requires (os.family != "mac") * @run main FileDialogNonModal7Test */ diff --git a/test/jdk/java/awt/Modal/ModalBlockingTests/UnblockedDialogTest.java b/test/jdk/java/awt/Modal/ModalBlockingTests/UnblockedDialogTest.java index 33eead43c17..67e78d8bce5 100644 --- a/test/jdk/java/awt/Modal/ModalBlockingTests/UnblockedDialogTest.java +++ b/test/jdk/java/awt/Modal/ModalBlockingTests/UnblockedDialogTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2018, 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 @@ -21,19 +21,22 @@ * questions. */ -import java.awt.*; -import static jdk.test.lib.Asserts.*; +import java.awt.Dialog; +import java.awt.EventQueue; +import java.awt.Frame; +import static jdk.test.lib.Asserts.assertFalse; +import static jdk.test.lib.Asserts.assertTrue; public class UnblockedDialogTest { - private TestDialog dialog; + private volatile TestDialog dialog; private static final int delay = 500; private final ExtendedRobot robot; - private Dialog parentDialog; - private Frame parentFrame; + private volatile Dialog parentDialog; + private volatile Frame parentFrame; private enum DialogOwner {HIDDEN_DIALOG, HIDDEN_FRAME, NULL_DIALOG, NULL_FRAME}; @@ -108,6 +111,7 @@ public class UnblockedDialogTest { dialog.checkUnblockedDialog(robot, ""); robot.waitForIdle(delay); + EventQueue.invokeAndWait(this::closeAll); } } finally { @@ -116,8 +120,17 @@ public class UnblockedDialogTest { } private void closeAll() { - if (dialog != null) { dialog.dispose(); } - if (parentDialog != null) { parentDialog.dispose(); } - if (parentFrame != null) { parentFrame.dispose(); } + if (dialog != null) { + dialog.dispose(); + dialog = null; + } + if (parentDialog != null) { + parentDialog.dispose(); + parentDialog = null; + } + if (parentFrame != null) { + parentFrame.dispose(); + parentFrame = null; + } } } diff --git a/test/jdk/java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsTest.java b/test/jdk/java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsTest.java index 322dd6b94d4..d99f7bf9876 100644 --- a/test/jdk/java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsTest.java +++ b/test/jdk/java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsTest.java @@ -185,9 +185,10 @@ public class FocusTransferDialogsTest { javax.imageio.ImageIO.write(img, "jpg", new java.io.File("NOK.jpg")); throw e; - } + } finally { - robot.waitForIdle(delay); - EventQueue.invokeAndWait(this::closeAll); + robot.waitForIdle(delay); + EventQueue.invokeAndWait(this::closeAll); + } } } diff --git a/test/jdk/java/awt/Modal/helpers/TestDialog.java b/test/jdk/java/awt/Modal/helpers/TestDialog.java index a56ce1f5164..6d5972205fa 100644 --- a/test/jdk/java/awt/Modal/helpers/TestDialog.java +++ b/test/jdk/java/awt/Modal/helpers/TestDialog.java @@ -219,9 +219,9 @@ public class TestDialog extends Dialog implements ActionListener, dummyButton.equals(b)) && robot != null) { robot.mouseMove((int) b.getLocationOnScreen().x + b.getSize().width / 2, (int) b.getLocationOnScreen().y + b.getSize().height / 2); - robot.delay(delay); + robot.waitForIdle(delay); robot.click(); - robot.delay(delay); + robot.waitForIdle(delay); } } @@ -292,9 +292,9 @@ public class TestDialog extends Dialog implements ActionListener, if (robot != null) { robot.mouseMove((int) topPanel.getLocationOnScreen().x + topPanel.getSize().width / 2, (int) topPanel.getLocationOnScreen().y + topPanel.getSize().height / 2); - robot.delay(delay); + robot.waitForIdle(delay); robot.click(); - robot.delay(delay); + robot.waitForIdle(delay); } } diff --git a/test/jdk/java/awt/Modal/helpers/TestFrame.java b/test/jdk/java/awt/Modal/helpers/TestFrame.java index d002d6faf8e..d0cc7a827b1 100644 --- a/test/jdk/java/awt/Modal/helpers/TestFrame.java +++ b/test/jdk/java/awt/Modal/helpers/TestFrame.java @@ -209,9 +209,9 @@ public class TestFrame extends Frame implements ActionListener, dummyButton.equals(b)) && robot != null) { robot.mouseMove((int) b.getLocationOnScreen().x + b.getSize().width / 2, (int) b.getLocationOnScreen().y + b.getSize().height / 2); - robot.delay(delay); + robot.waitForIdle(delay); robot.click(); - robot.delay(delay); + robot.waitForIdle(delay); } } @@ -280,9 +280,9 @@ public class TestFrame extends Frame implements ActionListener, if (robot != null) { robot.mouseMove((int) topPanel.getLocationOnScreen().x + topPanel.getSize().width / 2, (int) topPanel.getLocationOnScreen().y + topPanel.getSize().height / 2); - robot.delay(delay); + robot.waitForIdle(delay); robot.click(); - robot.delay(delay); + robot.waitForIdle(delay); } } diff --git a/test/jdk/java/awt/Modal/helpers/TestWindow.java b/test/jdk/java/awt/Modal/helpers/TestWindow.java index 249f56ead7d..f747bc19000 100644 --- a/test/jdk/java/awt/Modal/helpers/TestWindow.java +++ b/test/jdk/java/awt/Modal/helpers/TestWindow.java @@ -215,9 +215,9 @@ public class TestWindow extends Window implements ActionListener, dummyButton.equals(b)) && robot != null) { robot.mouseMove((int) b.getLocationOnScreen().x + b.getSize().width / 2, (int) b.getLocationOnScreen().y + b.getSize().height / 2); - robot.delay(delay); + robot.waitForIdle(delay); robot.click(); - robot.delay(delay); + robot.waitForIdle(delay); } } diff --git a/test/jdk/java/awt/PrintJob/PrintProgressBarTest.java b/test/jdk/java/awt/PrintJob/PrintProgressBarTest.java new file mode 100644 index 00000000000..3ddcb539bcb --- /dev/null +++ b/test/jdk/java/awt/PrintJob/PrintProgressBarTest.java @@ -0,0 +1,102 @@ +/* + * 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 6328248 + * @summary JProgessBar should be printed on paper with PrintJob + * @key printer + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual PrintProgressBarTest + */ + +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.SwingConstants; +import java.awt.Graphics; +import java.awt.BorderLayout; +import java.awt.FlowLayout; +import java.awt.PrintJob; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Properties; + +public class PrintProgressBarTest { + + private static final String INSTRUCTIONS = """ + This test shows a frame with a progressbar and a "Print" button. + 1. Click the 'Print' button on the frame + 2. Select a printer/pdf-printer in the print dialog and proceed + If the progressbar is printed along with progress string + test PASSED else FAILED. + """; + + public static void main(String[] args) throws Exception { + PassFailJFrame.builder() + .instructions(INSTRUCTIONS) + .columns(40) + .testUI(PrintProgressBarTest::createTestUI) + .build() + .awaitAndCheck(); + } + + private static JFrame createTestUI() { + JPanel panel = new JPanel(new FlowLayout()); + JProgressBar bar = new JProgressBar(); + bar.setOpaque(true); + bar.setStringPainted(true); + bar.setValue(50); + panel.add("Center", bar); + + JFrame frame = new JFrame("Print Progressbar"); + frame.setContentPane(panel); + JButton b = new JButton("Print"); + b.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent ev) { + PrintJob pj = Toolkit.getDefaultToolkit().getPrintJob(frame, + "PrintProgressBarTest", null); + if (pj != null) { + try { + Graphics g = pj.getGraphics(); + panel.printAll(g); + g.dispose(); + pj.end(); + } catch (ClassCastException cce) { + throw new RuntimeException("Test FAILED: ClassCastException", cce); + } catch (Exception e) { + throw new Error("Test FAILED: unknown exception", e); + } + } + } + }); + + frame.setSize(200, 150); + frame.add(b); + return frame; + } + +} diff --git a/test/jdk/java/awt/Robot/HiDPIMouseClick/HiDPIRobotMouseClick.java b/test/jdk/java/awt/Robot/HiDPIMouseClick/HiDPIRobotMouseClick.java index 25c40cc707d..99604b0d8f3 100644 --- a/test/jdk/java/awt/Robot/HiDPIMouseClick/HiDPIRobotMouseClick.java +++ b/test/jdk/java/awt/Robot/HiDPIMouseClick/HiDPIRobotMouseClick.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, 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 @@ -33,10 +33,13 @@ import javax.swing.UIManager; * @test * @key headful * @bug 8073320 - * @summary Windows HiDPI support - * @author Alexander Scherbatiy + * @summary Windows HiDPI support (multi-scale) * @requires (os.family == "windows") - * @run main/othervm -Dsun.java2d.win.uiScale=2 HiDPIRobotMouseClick + * @run main/othervm -Dsun.java2d.win.uiScale=1 HiDPIRobotMouseClick + * @run main/othervm -Dsun.java2d.win.uiScale=1.25 HiDPIRobotMouseClick + * @run main/othervm -Dsun.java2d.win.uiScale=1.5 HiDPIRobotMouseClick + * @run main/othervm -Dsun.java2d.win.uiScale=2 HiDPIRobotMouseClick + * @run main/othervm -Dsun.java2d.win.uiScale=2.5 HiDPIRobotMouseClick */ public class HiDPIRobotMouseClick { @@ -46,9 +49,12 @@ public class HiDPIRobotMouseClick { public static void main(String[] args) throws Exception { + String scale = System.getProperty("sun.java2d.win.uiScale", "default"); + System.out.println("Running with DPI scale: " + scale); + try { UIManager.setLookAndFeel( - "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); + "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception e) { return; } @@ -58,7 +64,6 @@ public class HiDPIRobotMouseClick { frame.setUndecorated(true); frame.addMouseListener(new MouseAdapter() { - @Override public void mouseClicked(MouseEvent e) { mouseX = e.getXOnScreen(); @@ -79,12 +84,16 @@ public class HiDPIRobotMouseClick { int y = (int) rect.getCenterY(); robot.mouseMove(x, y); - robot.mousePress(InputEvent.BUTTON1_MASK); - robot.mouseRelease(InputEvent.BUTTON1_MASK); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); robot.waitForIdle(); if (x != mouseX || y != mouseY) { - throw new RuntimeException("Wrong mouse click point!"); + throw new RuntimeException( + "Wrong mouse click point at scale %s! Expected: (%d,%d) Got: (%d,%d)" + .formatted(scale, x, y, mouseX, mouseY)); } + + System.out.println("PASS at scale: " + scale); } } diff --git a/test/jdk/java/awt/image/DataBuffer/DataBufferConstructorTest.java b/test/jdk/java/awt/image/DataBuffer/DataBufferConstructorTest.java new file mode 100644 index 00000000000..84f964dfcda --- /dev/null +++ b/test/jdk/java/awt/image/DataBuffer/DataBufferConstructorTest.java @@ -0,0 +1,825 @@ +/* + * 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 8377568 + * @summary test DataBuffer subclass constructors behaviour with illegal arguments. + */ + +import java.awt.image.DataBufferByte; +import java.awt.image.DataBufferDouble; +import java.awt.image.DataBufferFloat; +import java.awt.image.DataBufferInt; +import java.awt.image.DataBufferShort; +import java.awt.image.DataBufferUShort; +import java.util.Arrays; + +public class DataBufferConstructorTest { + + static void testByteConstructor(int size, + Class expectedExceptionType) { + try { + new DataBufferByte(size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testByteConstructor(int size, int numBanks, + Class expectedExceptionType) { + try { + new DataBufferByte(size, numBanks); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testByteConstructor(byte[] dataArray, int size, + Class expectedExceptionType) { + try { + new DataBufferByte(dataArray, size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testByteConstructor(byte[] dataArray, int size, int offset, + Class expectedExceptionType) { + try { + new DataBufferByte(dataArray, size, offset); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testByteConstructor(byte[][] dataArray, int size, + Class expectedExceptionType) { + try { + new DataBufferByte(dataArray, size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + static void testByteConstructor(byte[][] dataArray, int size, int[] offsets, + Class expectedExceptionType) { + try { + new DataBufferByte(dataArray, size, offsets); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testShortConstructor(int size, + boolean signed, Class expectedExceptionType) { + try { + if (signed) { + new DataBufferShort(size); + } else { + new DataBufferUShort(size); + } + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testShortConstructor(int size, int numBanks, + boolean signed, Class expectedExceptionType) { + try { + if (signed) { + new DataBufferShort(size, numBanks); + } else { + new DataBufferUShort(size, numBanks); + } + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testShortConstructor(short[] dataArray, int size, + boolean signed, Class expectedExceptionType) { + try { + if (signed) { + new DataBufferShort(dataArray, size); + } else { + new DataBufferUShort(dataArray, size); + } + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testShortConstructor(short[] dataArray, int size, int offset, + boolean signed, Class expectedExceptionType) { + try { + if (signed) { + new DataBufferShort(dataArray, size, offset); + } else { + new DataBufferUShort(dataArray, size, offset); + } + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testShortConstructor(short[][] dataArray, int size, + boolean signed, Class expectedExceptionType) { + try { + if (signed) { + new DataBufferShort(dataArray, size); + } else { + new DataBufferUShort(dataArray, size); + } + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + static void testShortConstructor(short[][] dataArray, int size, int[] offsets, + boolean signed, Class expectedExceptionType) { + try { + if (signed) { + new DataBufferShort(dataArray, size, offsets); + } else { + new DataBufferUShort(dataArray, size, offsets); + } + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testIntConstructor(int size, + Class expectedExceptionType) { + try { + new DataBufferInt(size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testIntConstructor(int size, int numBanks, + Class expectedExceptionType) { + try { + new DataBufferInt(size, numBanks); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testIntConstructor(int[] dataArray, int size, + Class expectedExceptionType) { + try { + new DataBufferInt(dataArray, size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testIntConstructor(int[] dataArray, int size, int offset, + Class expectedExceptionType) { + try { + new DataBufferInt(dataArray, size, offset); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testIntConstructor(int[][] dataArray, int size, + Class expectedExceptionType) { + try { + new DataBufferInt(dataArray, size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + static void testIntConstructor(int[][] dataArray, int size, int[] offsets, + Class expectedExceptionType) { + try { + new DataBufferInt(dataArray, size, offsets); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testFloatConstructor(int size, + Class expectedExceptionType) { + try { + new DataBufferFloat(size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testFloatConstructor(int size, int numBanks, + Class expectedExceptionType) { + try { + new DataBufferFloat(size, numBanks); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testFloatConstructor(float[] dataArray, int size, + Class expectedExceptionType) { + try { + new DataBufferFloat(dataArray, size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testFloatConstructor(float[] dataArray, int size, int offset, + Class expectedExceptionType) { + try { + new DataBufferFloat(dataArray, size, offset); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testFloatConstructor(float[][] dataArray, int size, + Class expectedExceptionType) { + try { + new DataBufferFloat(dataArray, size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testFloatConstructor(float[][] dataArray, int size, int[] offsets, + Class expectedExceptionType) { + try { + new DataBufferFloat(dataArray, size, offsets); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testDoubleConstructor(int size, + Class expectedExceptionType) { + try { + new DataBufferDouble(size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testDoubleConstructor(int size, int numBanks, + Class expectedExceptionType) { + try { + new DataBufferDouble(size, numBanks); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testDoubleConstructor(double[] dataArray, int size, + Class expectedExceptionType) { + try { + new DataBufferDouble(dataArray, size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testDoubleConstructor(double[] dataArray, int size, int offset, + Class expectedExceptionType) { + try { + new DataBufferDouble(dataArray, size, offset); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testDoubleConstructor(double[][] dataArray, int size, + Class expectedExceptionType) { + try { + new DataBufferDouble(dataArray, size); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static void testDoubleConstructor(double[][] dataArray, int size, int[] offsets, + Class expectedExceptionType) { + try { + new DataBufferDouble(dataArray, size, offsets); + failed = true; + System.err.println("No expected exception"); + Thread.dumpStack(); + } catch (Exception e) { + if (!expectedExceptionType.isInstance(e)) { + failed = true; + System.err.println("Unexpected exception type " + e); + Thread.dumpStack(); + } + } + } + + static boolean failed = false; + + static final int[] nullOffsetArray = null; + static final int[] zeroOffsetArray = { 0 } ; + static final int[] negOffsetArray = { -1 } ; + static final int[] oneOffsetArray = { 1 } ; + static final int[] twoOffsetArray = { 0, 0 } ; + + public static void main(String[] args) { + + final byte[] nullByteArray = null; + final byte[] zeroByteArray = { } ; + final byte[] oneByteArray = { 0 } ; + final byte[] tenByteArray = new byte[10]; + final byte[] oneKByteArray = new byte[1000]; + final byte[][] nullByteArrays = null; + final byte[][] nullByteSubArrays = { nullByteArray } ; + final byte[][] zeroByteSubArrays = { zeroByteArray } ; + final byte[][] oneByteSubArrays = { oneByteArray } ; + + // DataBufferByte(int size) + testByteConstructor(-1, IllegalArgumentException.class); + testByteConstructor(0, IllegalArgumentException.class); + + // DataBufferByte(int size, numBanks) + testByteConstructor(0, 1, IllegalArgumentException.class); + testByteConstructor(-1, 0, IllegalArgumentException.class); + testByteConstructor(1, -1, IllegalArgumentException.class); + testByteConstructor(-1, 1, IllegalArgumentException.class); + + // DataBufferByte(byte[] dataArray, int size) + testByteConstructor(nullByteArray, 1, NullPointerException.class); + testByteConstructor(zeroByteArray, 0, IllegalArgumentException.class); + testByteConstructor(oneByteArray, -1, IllegalArgumentException.class); + testByteConstructor(oneByteArray, 2, IllegalArgumentException.class); + + // DataBufferByte(byte[] dataArray, int size, int offset) + testByteConstructor(nullByteArray, 1, 1, NullPointerException.class); + testByteConstructor(zeroByteArray, 0, 0, IllegalArgumentException.class); + testByteConstructor(oneByteArray, -1, 1, IllegalArgumentException.class); + testByteConstructor(oneByteArray, 2, 1, IllegalArgumentException.class); + testByteConstructor(tenByteArray, 1, -1, IllegalArgumentException.class); + testByteConstructor(oneKByteArray, 1000, Integer.MAX_VALUE - 50, IllegalArgumentException.class); + + // DataBufferByte(byte[][] dataArray, int size) + testByteConstructor(nullByteArrays, 0, NullPointerException.class); + testByteConstructor(nullByteSubArrays, 1, NullPointerException.class); + testByteConstructor(oneByteSubArrays, 0, IllegalArgumentException.class); + testByteConstructor(oneByteSubArrays, -1, IllegalArgumentException.class); + testByteConstructor(oneByteSubArrays, 2, IllegalArgumentException.class); + + // DataBufferByte(byte[][] dataArray, int size, int[] offsets) + testByteConstructor(oneByteSubArrays, 1, nullOffsetArray, NullPointerException.class); + testByteConstructor(nullByteArrays, 0, zeroOffsetArray, NullPointerException.class); + testByteConstructor(nullByteSubArrays, 1, zeroOffsetArray, NullPointerException.class); + testByteConstructor(zeroByteSubArrays, 0, zeroOffsetArray, IllegalArgumentException.class); + testByteConstructor(oneByteSubArrays, 0, zeroOffsetArray, IllegalArgumentException.class); + testByteConstructor(oneByteSubArrays, 1, negOffsetArray, IllegalArgumentException.class); + testByteConstructor(oneByteSubArrays, -1, oneOffsetArray, IllegalArgumentException.class); + testByteConstructor(oneByteSubArrays, 2, oneOffsetArray, IllegalArgumentException.class); + testByteConstructor(oneByteSubArrays, 1, oneOffsetArray, IllegalArgumentException.class); + testByteConstructor(oneByteSubArrays, 1, twoOffsetArray, ArrayIndexOutOfBoundsException.class); + + + final short[] nullShortArray = null; + final short[] zeroShortArray = { } ; + final short[] oneShortArray = { 0 } ; + final short[] tenShortArray = new short[10]; + final short[] oneKShortArray = new short[1000]; + final short[][] nullShortArrays = null; + final short[][] nullShortSubArrays = { nullShortArray } ; + final short[][] zeroShortSubArrays = { zeroShortArray } ; + final short[][] oneShortSubArrays = { oneShortArray } ; + + // test DataBufferShort and DataBufferUShort + for (boolean signed : Arrays.asList(true, false)) { + + // DataBufferShort(int size); + testShortConstructor(-1, signed, IllegalArgumentException.class); + testShortConstructor(0, signed, IllegalArgumentException.class); + + // DataBufferShort(int size, int numBanks) + testShortConstructor(0, 1, signed, IllegalArgumentException.class); + testShortConstructor(-1, 0, signed, IllegalArgumentException.class); + testShortConstructor(1, -1, signed, IllegalArgumentException.class); + testShortConstructor(-1, 1, signed, IllegalArgumentException.class); + + // DataBufferShort(short[] dataArray, int size) + testShortConstructor(nullShortArray, 1, signed, NullPointerException.class); + testShortConstructor(zeroShortArray, 0, signed, IllegalArgumentException.class); + testShortConstructor(oneShortArray, -1, signed, IllegalArgumentException.class); + testShortConstructor(oneShortArray, 2, signed, IllegalArgumentException.class); + + // DataBufferShort(short[] dataArray, int size, int offset) + testShortConstructor(nullShortArray, 1, 1, signed, NullPointerException.class); + testShortConstructor(zeroShortArray, 0, 0, signed, IllegalArgumentException.class); + testShortConstructor(oneShortArray, -1, 1, signed, IllegalArgumentException.class); + testShortConstructor(oneShortArray, 2, 1, signed, IllegalArgumentException.class); + testShortConstructor(tenShortArray, 10, -1, signed, IllegalArgumentException.class); + testShortConstructor(oneKShortArray, 1000, Integer.MAX_VALUE - 50, signed, IllegalArgumentException.class); + + // DataBufferShort(short[][] dataArray, int size) + testShortConstructor(nullShortArrays, 0, signed, NullPointerException.class); + testShortConstructor(nullShortSubArrays, 1, signed, NullPointerException.class); + testShortConstructor(oneShortSubArrays, 0, signed, IllegalArgumentException.class); + testShortConstructor(oneShortSubArrays, -1, signed, IllegalArgumentException.class); + testShortConstructor(oneShortSubArrays, 2, signed, IllegalArgumentException.class); + + // DataBufferShort(short[][] dataArray, int size, int[] offsets) + testShortConstructor(oneShortSubArrays, 1, nullOffsetArray, signed, NullPointerException.class); + testShortConstructor(nullShortArrays, 0, zeroOffsetArray, signed, NullPointerException.class); + testShortConstructor(nullShortSubArrays, 1, zeroOffsetArray, signed, NullPointerException.class); + testShortConstructor(zeroShortSubArrays, 0, zeroOffsetArray, signed, IllegalArgumentException.class); + testShortConstructor(oneShortSubArrays, 0, zeroOffsetArray, signed, IllegalArgumentException.class); + testShortConstructor(oneShortSubArrays, 1, negOffsetArray, signed, IllegalArgumentException.class); + testShortConstructor(oneShortSubArrays, -1, oneOffsetArray, signed, IllegalArgumentException.class); + testShortConstructor(oneShortSubArrays, 2, oneOffsetArray, signed, IllegalArgumentException.class); + testShortConstructor(oneShortSubArrays, 1, oneOffsetArray, signed, IllegalArgumentException.class); + testShortConstructor(oneShortSubArrays, 1, twoOffsetArray, signed, ArrayIndexOutOfBoundsException.class); + } + + final int[] nullIntArray = null; + final int[] zeroIntArray = { }; + final int[] oneIntArray = { 0 } ; + final int[] tenIntArray = new int[10]; + final int[] oneKIntArray = new int[1000]; + final int[][] nullIntArrays = null; + final int[][] nullIntSubArrays = { nullIntArray } ; + final int[][] zeroIntSubArrays = { zeroIntArray } ; + final int[][] oneIntSubArrays = { oneIntArray } ; + + // DataBufferInt(int size) + testIntConstructor(-1, IllegalArgumentException.class); + testIntConstructor(0, IllegalArgumentException.class); + + // DataBufferInt(int size, numBanks) + testIntConstructor(0, 1, IllegalArgumentException.class); + testIntConstructor(-1, 0, IllegalArgumentException.class); + testIntConstructor(1, -1, IllegalArgumentException.class); + testIntConstructor(-1, 1, IllegalArgumentException.class); + + // DataBufferInt(int[] dataArray, int size) + testIntConstructor(nullIntArray, 1, NullPointerException.class); + testIntConstructor(zeroIntArray, 0, IllegalArgumentException.class); + testIntConstructor(oneIntArray, -1, IllegalArgumentException.class); + testIntConstructor(oneIntArray, 2, IllegalArgumentException.class); + + // DataBufferInt(int[] dataArray, int size, int offset) + testIntConstructor(nullIntArray, 1, 1, NullPointerException.class); + testIntConstructor(zeroIntArray, 0, 0, IllegalArgumentException.class); + testIntConstructor(oneIntArray, -1, 1, IllegalArgumentException.class); + testIntConstructor(oneIntArray, 2, 1, IllegalArgumentException.class); + testIntConstructor(tenIntArray, 10, -1, IllegalArgumentException.class); + testIntConstructor(oneKIntArray, 1000, Integer.MAX_VALUE - 50, IllegalArgumentException.class); + + // DataBufferInt(int[][] dataArray, int size) + testIntConstructor(nullIntArrays, 0, NullPointerException.class); + testIntConstructor(nullIntSubArrays, 1, NullPointerException.class); + testIntConstructor(zeroIntSubArrays, 0, IllegalArgumentException.class); + testIntConstructor(oneIntSubArrays, -1, IllegalArgumentException.class); + testIntConstructor(oneIntSubArrays, 2, IllegalArgumentException.class); + + // DataBufferInt(int[][] dataArray, int size, int[] offsets) + testIntConstructor(oneIntSubArrays, 1, nullOffsetArray, NullPointerException.class); + testIntConstructor(nullIntArrays, 0, zeroOffsetArray, NullPointerException.class); + testIntConstructor(nullIntSubArrays, 1, zeroOffsetArray, NullPointerException.class); + testIntConstructor(zeroIntSubArrays, 0, zeroOffsetArray, IllegalArgumentException.class); + testIntConstructor(oneIntSubArrays, 0, zeroOffsetArray, IllegalArgumentException.class); + testIntConstructor(oneIntSubArrays, 1, negOffsetArray, IllegalArgumentException.class); + testIntConstructor(oneIntSubArrays, -1, oneOffsetArray, IllegalArgumentException.class); + testIntConstructor(oneIntSubArrays, 2, oneOffsetArray, IllegalArgumentException.class); + testIntConstructor(oneIntSubArrays, 1, oneOffsetArray, IllegalArgumentException.class); + testIntConstructor(oneIntSubArrays, 1, twoOffsetArray, ArrayIndexOutOfBoundsException.class); + + final float[] nullFloatArray = null; + final float[] zeroFloatArray = { } ; + final float[] oneFloatArray = { 0 } ; + final float[] tenFloatArray = new float[10]; + final float[] oneKFloatArray = new float[1000]; + final float[][] nullFloatArrays = null; + final float[][] nullFloatSubArrays = { nullFloatArray } ; + final float[][] zeroFloatSubArrays = { zeroFloatArray } ; + final float[][] oneFloatSubArrays = { oneFloatArray } ; + + // DataBufferFloat(int size) + testFloatConstructor(-1, IllegalArgumentException.class); + testFloatConstructor(0, IllegalArgumentException.class); + + // DataBufferFloat(int size, numBanks) + testFloatConstructor(0, 1, IllegalArgumentException.class); + testFloatConstructor(-1, 0, IllegalArgumentException.class); + testFloatConstructor(1, -1, IllegalArgumentException.class); + testFloatConstructor(-1, 1, IllegalArgumentException.class); + + // DataBufferFloat(float[] dataArray, int size) + testFloatConstructor(nullFloatArray, 1, NullPointerException.class); + testFloatConstructor(zeroFloatArray, 0, IllegalArgumentException.class); + testFloatConstructor(oneFloatArray, -1, IllegalArgumentException.class); + testFloatConstructor(oneFloatArray, 2, IllegalArgumentException.class); + + // DataBufferFloat(float[] dataArray, int size, int offset) + testFloatConstructor(nullFloatArray, 1, 1, NullPointerException.class); + testFloatConstructor(zeroFloatArray, 0, 0, IllegalArgumentException.class); + testFloatConstructor(oneFloatArray, -1, 1, IllegalArgumentException.class); + testFloatConstructor(oneFloatArray, 2, 1, IllegalArgumentException.class); + testFloatConstructor(tenFloatArray, 10, -1, IllegalArgumentException.class); + testFloatConstructor(oneKFloatArray, 1000, Integer.MAX_VALUE - 50, IllegalArgumentException.class); + + // DataBufferFloat(float[][] dataArray, int size) + testFloatConstructor(nullFloatArrays, 0, NullPointerException.class); + testFloatConstructor(nullFloatSubArrays, 1, NullPointerException.class); + testFloatConstructor(zeroFloatSubArrays, 0, IllegalArgumentException.class); + testFloatConstructor(oneFloatSubArrays, -1, IllegalArgumentException.class); + testFloatConstructor(oneFloatSubArrays, 2, IllegalArgumentException.class); + + // DataBufferFloat(float[][] dataArray, int size, int[] offsets) + testFloatConstructor(oneFloatSubArrays, 1, nullOffsetArray, NullPointerException.class); + testFloatConstructor(nullFloatArrays, 0, zeroOffsetArray, NullPointerException.class); + testFloatConstructor(nullFloatSubArrays, 1, zeroOffsetArray, NullPointerException.class); + testFloatConstructor(zeroFloatSubArrays, 0, zeroOffsetArray, IllegalArgumentException.class); + testFloatConstructor(oneFloatSubArrays, 0, zeroOffsetArray, IllegalArgumentException.class); + testFloatConstructor(oneFloatSubArrays, 1, negOffsetArray, IllegalArgumentException.class); + testFloatConstructor(oneFloatSubArrays, -1, oneOffsetArray, IllegalArgumentException.class); + testFloatConstructor(oneFloatSubArrays, 2, oneOffsetArray, IllegalArgumentException.class); + testFloatConstructor(oneFloatSubArrays, 1, oneOffsetArray, IllegalArgumentException.class); + testFloatConstructor(oneFloatSubArrays, 1, twoOffsetArray, ArrayIndexOutOfBoundsException.class); + + final double[] nullDoubleArray = null; + final double[] zeroDoubleArray = { }; + final double[] oneDoubleArray = { 0 } ; + final double[] tenDoubleArray = new double[10]; + final double[] oneKDoubleArray = new double[1000]; + final double[][] nullDoubleArrays = null; + final double[][] nullDoubleSubArrays = { nullDoubleArray } ; + final double[][] zeroDoubleSubArrays = { zeroDoubleArray } ; + final double[][] oneDoubleSubArrays = { oneDoubleArray } ; + + // DataBufferDouble(int size) + testDoubleConstructor(-1, IllegalArgumentException.class); + testDoubleConstructor(0, IllegalArgumentException.class); + + // DataBufferDouble(int size, numBanks) + testDoubleConstructor(0, 1, IllegalArgumentException.class); + testDoubleConstructor(-1, 0, IllegalArgumentException.class); + testDoubleConstructor(1, -1, IllegalArgumentException.class); + testDoubleConstructor(-1, 1, IllegalArgumentException.class); + + // DataBufferDouble(double[] dataArray, int size) + testDoubleConstructor(nullDoubleArray, 1, NullPointerException.class); + testDoubleConstructor(zeroDoubleArray, 0, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleArray, -1, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleArray, 2, IllegalArgumentException.class); + + // DataBufferDouble(double[] dataArray, int size, int offset) + testDoubleConstructor(nullDoubleArray, 1, 1, NullPointerException.class); + testDoubleConstructor(zeroDoubleArray, 0, 0, IllegalArgumentException.class); + testDoubleConstructor(tenDoubleArray, 1, -1, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleArray, -1, 1, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleArray, 2, 1, IllegalArgumentException.class); + + // DataBufferDouble(double[][] dataArray, int size) + testDoubleConstructor(nullDoubleArrays, 0, NullPointerException.class); + testDoubleConstructor(nullDoubleSubArrays, 1, NullPointerException.class); + testDoubleConstructor(zeroDoubleSubArrays, 0, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleSubArrays, -1, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleSubArrays, 2, IllegalArgumentException.class); + testDoubleConstructor(oneKDoubleArray, 1000, Integer.MAX_VALUE - 50, IllegalArgumentException.class); + + // DataBufferDouble(double[][] dataArray, int size, int[] offsets) + testDoubleConstructor(oneDoubleSubArrays, 1, nullOffsetArray, NullPointerException.class); + testDoubleConstructor(nullDoubleArrays, 0, zeroOffsetArray, NullPointerException.class); + testDoubleConstructor(nullDoubleSubArrays, 1, zeroOffsetArray, NullPointerException.class); + testDoubleConstructor(zeroDoubleSubArrays, 0, zeroOffsetArray, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleSubArrays, 0, zeroOffsetArray, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleSubArrays, -1, oneOffsetArray, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleSubArrays, 1, negOffsetArray, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleSubArrays, 2, oneOffsetArray, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleSubArrays, 1, oneOffsetArray, IllegalArgumentException.class); + testDoubleConstructor(oneDoubleSubArrays, 1, twoOffsetArray, ArrayIndexOutOfBoundsException.class); + + if (failed) { + throw new RuntimeException("One or more cases failed."); + } + } +} diff --git a/test/jdk/java/awt/image/DataBuffer/DataBufferGetSetElemTest.java b/test/jdk/java/awt/image/DataBuffer/DataBufferGetSetElemTest.java new file mode 100644 index 00000000000..e62c5913627 --- /dev/null +++ b/test/jdk/java/awt/image/DataBuffer/DataBufferGetSetElemTest.java @@ -0,0 +1,293 @@ +/* + * 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 8377568 + * @summary test DataBuffer subclass getters and setters with illegal arguments. + */ + +import java.awt.image.DataBuffer; +import java.awt.image.DataBufferByte; +import java.awt.image.DataBufferDouble; +import java.awt.image.DataBufferFloat; +import java.awt.image.DataBufferInt; +import java.awt.image.DataBufferShort; +import java.awt.image.DataBufferUShort; +import java.util.Arrays; + +public class DataBufferGetSetElemTest { + + public static void main(String[] args) { + int size = 5; + + { + byte[] buf = new byte[size*2]; + DataBufferByte dbb = new DataBufferByte(buf, size); + try { + dbb.getData(1); + throw new RuntimeException("No exception for invalid data bank index"); + } catch (ArrayIndexOutOfBoundsException e) { + } + test(dbb, size); + test(dbb, -1); + dbb = new DataBufferByte(buf, size-1, 1); + test(dbb, size); + dbb = new DataBufferByte(buf, size, size); + testpass(dbb); + } + + { + short[] buf = new short[size*2]; + DataBufferShort dbs = new DataBufferShort(buf, size); + try { + dbs.getData(1); + throw new RuntimeException("No exception for invalid data bank index"); + } catch (ArrayIndexOutOfBoundsException e) { + } + test(dbs, size); + test(dbs, -1); + dbs = new DataBufferShort(buf, size-1, 1); + test(dbs, size); + test(dbs, -2); + dbs = new DataBufferShort(buf, size, size); + testpass(dbs); + + DataBufferUShort dbu = new DataBufferUShort(buf, size); + try { + dbu.getData(1); + throw new RuntimeException("No exception for invalid data bank index"); + } catch (ArrayIndexOutOfBoundsException e) { + } + test(dbu, size); + test(dbu, -1); + dbu = new DataBufferUShort(buf, size-1, 1); + test(dbu, size); + test(dbu, -2); + dbu = new DataBufferUShort(buf, size, size); + testpass(dbu); + } + + { + int[] buf = new int[size*2]; + DataBufferInt dbi = new DataBufferInt(buf, size); + try { + dbi.getData(1); + throw new RuntimeException("No exception for invalid data bank index"); + } catch (ArrayIndexOutOfBoundsException e) { + } + test(dbi, size); + test(dbi, -1); + dbi = new DataBufferInt(buf, size-1, 1); + test(dbi, size); + test(dbi, -2); + dbi = new DataBufferInt(buf, size, size); + testpass(dbi); + } + + { + float[] buf = new float[size*2]; + DataBufferFloat dbf = new DataBufferFloat(buf, size); + try { + dbf.getData(1); + throw new RuntimeException("No exception for invalid data bank index"); + } catch (ArrayIndexOutOfBoundsException e) { + } + test(dbf, size); + test(dbf, -1); + dbf = new DataBufferFloat(buf, size-1, 1); + test(dbf, size); + test(dbf, -2); + dbf = new DataBufferFloat(buf, size, size); + testpass(dbf); + } + + { + double[] buf = new double[size*2]; + DataBufferDouble dbd = new DataBufferDouble(buf, size); + try { + dbd.getData(1); + throw new RuntimeException("No exception for invalid data bank index"); + } catch (ArrayIndexOutOfBoundsException e) { + } + test(dbd, size); + test(dbd, -1); + dbd = new DataBufferDouble(buf, size-1, 1); + test(dbd, size); + test(dbd, -2); + dbd = new DataBufferDouble(buf, size, size); + testpass(dbd); + } + } + + static void testpass(DataBuffer db) { + int i = db.getSize() - 1; + + db.getElem(i); + db.setElem(i, 0); + db.getElem(0, i); + db.setElem(0, i, 0); + + db.getElemFloat(i); + db.setElemFloat(i, 0); + db.getElemFloat(0, i); + db.setElemFloat(0, i, 0); + + db.getElemDouble(i); + db.setElemDouble(i, 0); + db.getElemDouble(0, i); + db.setElemDouble(0, i, 0); + } + + static void test(DataBuffer db, int index) { + boolean failed = false; + int val = 1; + + try { + db.getElem(index); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElem(index, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.getElem(0, index); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElem(0, index, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.getElem(1, 0); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElem(1, 0, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.getElem(1, index); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElem(1, index, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + + try { + db.getElemFloat(index); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElemFloat(index, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.getElemFloat(0, index); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElemFloat(0, index, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.getElemFloat(1, 0); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElemFloat(1, 0, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.getElemFloat(1, index); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElemFloat(1, index, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + + try { + db.getElemDouble(index); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElemDouble(index, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.getElemDouble(0, index); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElemDouble(0, index, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.getElemDouble(1, 0); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElemDouble(1, 0, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.getElemDouble(1, index); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + try { + db.setElemDouble(1, index, val); + failed = true; + } catch (ArrayIndexOutOfBoundsException e) { + } + + if (failed) { + throw new RuntimeException("get/setElem test failed for " + db + " index= " + index); + } + } +} diff --git a/test/jdk/java/foreign/StdLibTest.java b/test/jdk/java/foreign/StdLibTest.java index f1e35b53a39..aa9102cc168 100644 --- a/test/jdk/java/foreign/StdLibTest.java +++ b/test/jdk/java/foreign/StdLibTest.java @@ -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 @@ -23,7 +23,7 @@ /* * @test - * @run testng/othervm/timeout=480 --enable-native-access=ALL-UNNAMED StdLibTest + * @run junit/othervm/timeout=600 --enable-native-access=ALL-UNNAMED StdLibTest */ import java.lang.invoke.MethodHandle; @@ -41,73 +41,83 @@ import java.util.List; import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; +import java.util.stream.IntStream; import java.util.stream.Stream; import java.lang.foreign.*; -import org.testng.annotations.*; +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.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.*; -public class StdLibTest extends NativeTestHelper { +final class StdLibTest extends NativeTestHelper { - final static Linker abi = Linker.nativeLinker(); + static final Linker ABI = Linker.nativeLinker(); - private StdLibHelper stdLibHelper = new StdLibHelper(); + static final StdLibHelper STD_LIB_HELPER = new StdLibHelper(); - @Test(dataProvider = "stringPairs") + @ParameterizedTest + @MethodSource("stringPairs") void test_strcat(String s1, String s2) throws Throwable { - assertEquals(stdLibHelper.strcat(s1, s2), s1 + s2); + assertEquals(s1 + s2, STD_LIB_HELPER.strcat(s1, s2)); } - @Test(dataProvider = "stringPairs") + @ParameterizedTest + @MethodSource("stringPairs") void test_strcmp(String s1, String s2) throws Throwable { - assertEquals(Math.signum(stdLibHelper.strcmp(s1, s2)), Math.signum(s1.compareTo(s2))); + assertEquals(Math.signum(s1.compareTo(s2)), Math.signum(STD_LIB_HELPER.strcmp(s1, s2))); } - @Test(dataProvider = "strings") + @ParameterizedTest + @MethodSource("strings") void test_puts(String s) throws Throwable { - assertTrue(stdLibHelper.puts(s) >= 0); + assertTrue(STD_LIB_HELPER.puts(s) >= 0); } - @Test(dataProvider = "strings") + @ParameterizedTest + @MethodSource("strings") void test_strlen(String s) throws Throwable { - assertEquals(stdLibHelper.strlen(s), s.length()); + assertEquals(STD_LIB_HELPER.strlen(s), s.length()); } - @Test(dataProvider = "instants") + @ParameterizedTest + @MethodSource("instants") void test_time(Instant instant) throws Throwable { - StdLibHelper.Tm tm = stdLibHelper.gmtime(instant.getEpochSecond()); + StdLibHelper.Tm tm = STD_LIB_HELPER.gmtime(instant.getEpochSecond()); LocalDateTime localTime = LocalDateTime.ofInstant(instant, ZoneOffset.UTC); - assertEquals(tm.sec(), localTime.getSecond()); - assertEquals(tm.min(), localTime.getMinute()); - assertEquals(tm.hour(), localTime.getHour()); + assertEquals(localTime.getSecond(), tm.sec()); + assertEquals(localTime.getMinute(), tm.min()); + assertEquals(localTime.getHour(), tm.hour()); //day pf year in Java has 1-offset - assertEquals(tm.yday(), localTime.getDayOfYear() - 1); - assertEquals(tm.mday(), localTime.getDayOfMonth()); + assertEquals(localTime.getDayOfYear() - 1, tm.yday()); + assertEquals(localTime.getDayOfMonth(), tm.mday()); //days of week starts from Sunday in C, but on Monday in Java, also account for 1-offset - assertEquals((tm.wday() + 6) % 7, localTime.getDayOfWeek().getValue() - 1); + assertEquals(localTime.getDayOfWeek().getValue() - 1, (tm.wday() + 6) % 7); //month in Java has 1-offset - assertEquals(tm.mon(), localTime.getMonth().getValue() - 1); - assertEquals(tm.isdst(), ZoneOffset.UTC.getRules() - .isDaylightSavings(Instant.ofEpochMilli(instant.getEpochSecond() * 1000))); + assertEquals(localTime.getMonth().getValue() - 1, tm.mon()); + assertEquals(ZoneOffset.UTC.getRules() + .isDaylightSavings(Instant.ofEpochMilli(instant.getEpochSecond() * 1000)), tm.isdst()); } - @Test(dataProvider = "ints") + @ParameterizedTest + @MethodSource("ints") void test_qsort(List ints) throws Throwable { if (ints.size() > 0) { int[] input = ints.stream().mapToInt(i -> i).toArray(); - int[] sorted = stdLibHelper.qsort(input); + int[] sorted = STD_LIB_HELPER.qsort(input); Arrays.sort(input); - assertEquals(sorted, input); + assertArrayEquals(input, sorted); } } @Test void test_rand() throws Throwable { - int val = stdLibHelper.rand(); + int val = STD_LIB_HELPER.rand(); for (int i = 0 ; i < 100 ; i++) { - int newVal = stdLibHelper.rand(); + int newVal = STD_LIB_HELPER.rand(); if (newVal != val) { return; //ok } @@ -116,7 +126,8 @@ public class StdLibTest extends NativeTestHelper { fail("All values are the same! " + val); } - @Test(dataProvider = "printfArgs") + @ParameterizedTest + @MethodSource("printfArgs") void test_printf(List args) throws Throwable { String javaFormatArgs = args.stream() .map(a -> a.javaFormat) @@ -131,8 +142,8 @@ public class StdLibTest extends NativeTestHelper { String expected = String.format(javaFormatString, args.stream() .map(a -> a.javaValue).toArray()); - int found = stdLibHelper.printf(nativeFormatString, args); - assertEquals(found, expected.length()); + int found = STD_LIB_HELPER.printf(nativeFormatString, args); + assertEquals(expected.length(), found); } @Test @@ -140,25 +151,25 @@ public class StdLibTest extends NativeTestHelper { assertTrue(LINKER.defaultLookup().find("strlen\u0000foobar").isEmpty()); } - static class StdLibHelper { + static final class StdLibHelper { - final static MethodHandle strcat = abi.downcallHandle(abi.defaultLookup().find("strcat").get(), + final static MethodHandle strcat = ABI.downcallHandle(ABI.defaultLookup().findOrThrow("strcat"), FunctionDescriptor.of(C_POINTER, C_POINTER, C_POINTER)); - final static MethodHandle strcmp = abi.downcallHandle(abi.defaultLookup().find("strcmp").get(), + final static MethodHandle strcmp = ABI.downcallHandle(ABI.defaultLookup().findOrThrow("strcmp"), FunctionDescriptor.of(C_INT, C_POINTER, C_POINTER)); - final static MethodHandle puts = abi.downcallHandle(abi.defaultLookup().find("puts").get(), + final static MethodHandle puts = ABI.downcallHandle(ABI.defaultLookup().findOrThrow("puts"), FunctionDescriptor.of(C_INT, C_POINTER)); - final static MethodHandle strlen = abi.downcallHandle(abi.defaultLookup().find("strlen").get(), + final static MethodHandle strlen = ABI.downcallHandle(ABI.defaultLookup().findOrThrow("strlen"), FunctionDescriptor.of(C_INT, C_POINTER)); - final static MethodHandle gmtime = abi.downcallHandle(abi.defaultLookup().find("gmtime").get(), + final static MethodHandle gmtime = ABI.downcallHandle(ABI.defaultLookup().findOrThrow("gmtime"), FunctionDescriptor.of(C_POINTER.withTargetLayout(Tm.LAYOUT), C_POINTER)); // void qsort( void *ptr, size_t count, size_t size, int (*comp)(const void *, const void *) ); - final static MethodHandle qsort = abi.downcallHandle(abi.defaultLookup().find("qsort").get(), + final static MethodHandle qsort = ABI.downcallHandle(ABI.defaultLookup().findOrThrow("qsort"), FunctionDescriptor.ofVoid(C_POINTER, C_SIZE_T, C_SIZE_T, C_POINTER)); final static FunctionDescriptor qsortComparFunction = FunctionDescriptor.of(C_INT, @@ -166,13 +177,13 @@ public class StdLibTest extends NativeTestHelper { final static MethodHandle qsortCompar; - final static MethodHandle rand = abi.downcallHandle(abi.defaultLookup().find("rand").get(), + final static MethodHandle rand = ABI.downcallHandle(ABI.defaultLookup().findOrThrow("rand"), FunctionDescriptor.of(C_INT)); - final static MethodHandle vprintf = abi.downcallHandle(abi.defaultLookup().find("vprintf").get(), + final static MethodHandle vprintf = ABI.downcallHandle(ABI.defaultLookup().findOrThrow("vprintf"), FunctionDescriptor.of(C_INT, C_POINTER, C_POINTER)); - final static MemorySegment printfAddr = abi.defaultLookup().find("printf").get(); + final static MemorySegment printfAddr = ABI.defaultLookup().findOrThrow("printf"); final static FunctionDescriptor printfBase = FunctionDescriptor.of(C_INT, C_POINTER); @@ -225,7 +236,7 @@ public class StdLibTest extends NativeTestHelper { } } - static class Tm { + static final class Tm { //Tm pointer should never be freed directly, as it points to shared memory private final MemorySegment base; @@ -282,7 +293,7 @@ public class StdLibTest extends NativeTestHelper { MemorySegment nativeArr = arena.allocateFrom(C_INT, arr); //call qsort - MemorySegment qsortUpcallStub = abi.upcallStub(qsortCompar, qsortComparFunction, arena); + MemorySegment qsortUpcallStub = ABI.upcallStub(qsortCompar, qsortComparFunction, arena); // both of these fit in an int // automatically widen them to long on x64 @@ -297,7 +308,7 @@ public class StdLibTest extends NativeTestHelper { static int qsortCompare(MemorySegment addr1, MemorySegment addr2) { return addr1.get(C_INT, 0) - - addr2.get(C_INT, 0); + addr2.get(C_INT, 0); } int rand() throws Throwable { @@ -322,7 +333,7 @@ public class StdLibTest extends NativeTestHelper { variadicLayouts.add(arg.layout); } Linker.Option varargIndex = Linker.Option.firstVariadicArg(fd.argumentLayouts().size()); - MethodHandle mh = abi.downcallHandle(printfAddr, + MethodHandle mh = ABI.downcallHandle(printfAddr, fd.appendArgumentLayouts(variadicLayouts.toArray(new MemoryLayout[args.size()])), varargIndex); return mh.asSpreader(1, Object[].class, args.size()); @@ -331,47 +342,36 @@ public class StdLibTest extends NativeTestHelper { /*** data providers ***/ - @DataProvider - public static Object[][] ints() { + static Stream ints() { return perms(0, new Integer[] { 0, 1, 2, 3, 4 }).stream() - .map(l -> new Object[] { l }) - .toArray(Object[][]::new); + .map(Arguments::of); } - @DataProvider - public static Object[][] strings() { + static Stream strings() { + return strings0() + .map(Arguments::of); + } + + static Stream stringPairs() { + return strings0() + .flatMap(s -> strings0() + .map(s2 -> Arguments.of(s, s2))); + } + + static Stream strings0() { return perms(0, new String[] { "a", "b", "c" }).stream() - .map(l -> new Object[] { String.join("", l) }) - .toArray(Object[][]::new); + .map(l -> String.join("", l)); } - @DataProvider - public static Object[][] stringPairs() { - Object[][] strings = strings(); - Object[][] stringPairs = new Object[strings.length * strings.length][]; - int pos = 0; - for (Object[] s1 : strings) { - for (Object[] s2 : strings) { - stringPairs[pos++] = new Object[] { s1[0], s2[0] }; - } - } - return stringPairs; - } - - @DataProvider - public static Object[][] instants() { + static Stream instants() { Instant start = ZonedDateTime.of(LocalDateTime.parse("2017-01-01T00:00:00"), ZoneOffset.UTC).toInstant(); Instant end = ZonedDateTime.of(LocalDateTime.parse("2017-12-31T00:00:00"), ZoneOffset.UTC).toInstant(); - Object[][] instants = new Object[100][]; - for (int i = 0 ; i < instants.length ; i++) { - Instant instant = start.plusSeconds((long)(Math.random() * (end.getEpochSecond() - start.getEpochSecond()))); - instants[i] = new Object[] { instant }; - } - return instants; + return IntStream.range(0, 100) + .mapToObj(i -> start.plusSeconds((long)(Math.random() * (end.getEpochSecond() - start.getEpochSecond())))) + .map(Arguments::of); } - @DataProvider - public static Object[][] printfArgs() { + static Stream printfArgs() { ArrayList> res = new ArrayList<>(); List> perms = new ArrayList<>(perms(0, PrintfArg.values())); for (int i = 0 ; i < 100 ; i++) { @@ -379,8 +379,7 @@ public class StdLibTest extends NativeTestHelper { res.addAll(perms); } return res.stream() - .map(l -> new Object[] { l }) - .toArray(Object[][]::new); + .map(Arguments::of); } enum PrintfArg { diff --git a/test/jdk/java/foreign/TestBufferStackStress.java b/test/jdk/java/foreign/TestBufferStackStress.java index 0ec46311a6f..a0b7348331c 100644 --- a/test/jdk/java/foreign/TestBufferStackStress.java +++ b/test/jdk/java/foreign/TestBufferStackStress.java @@ -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 @@ -24,11 +24,12 @@ /* * @test * @modules java.base/jdk.internal.foreign - * @build NativeTestHelper TestBufferStackStress + * @library /test/lib * @run junit TestBufferStackStress */ import jdk.internal.foreign.BufferStack; +import jdk.test.lib.Platform; import org.junit.jupiter.api.Test; import java.lang.foreign.Arena; @@ -40,17 +41,23 @@ import java.util.stream.IntStream; import static java.lang.foreign.ValueLayout.*; import static java.time.temporal.ChronoUnit.SECONDS; import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assumptions.*; -public class TestBufferStackStress { +final class TestBufferStackStress { @Test - public void stress() throws InterruptedException { + void stress() throws InterruptedException { + if (Platform.isOSX()) { + // 8350455 was only fixed in macOS versions 26 or higher + assumeFalse(Platform.getOsVersionMajor() < 26, "Unsupported OS version: " + Platform.getOsVersionMajor()); + } + BufferStack stack = BufferStack.of(256, 1); - Thread[] vThreads = IntStream.range(0, 1024).mapToObj(_ -> + Thread[] vThreads = IntStream.range(0, 512).mapToObj(_ -> Thread.ofVirtual().start(() -> { long threadId = Thread.currentThread().threadId(); while (!Thread.interrupted()) { - for (int i = 0; i < 1_000_000; i++) { + for (int i = 0; i < 500_000; i++) { try (Arena arena = stack.pushFrame(JAVA_LONG.byteSize(), JAVA_LONG.byteAlignment())) { // Try to assert no two vThreads get allocated the same stack space. MemorySegment segment = arena.allocate(JAVA_LONG); diff --git a/test/jdk/java/foreign/TestBufferStackStress2.java b/test/jdk/java/foreign/TestBufferStackStress2.java index 402ce6bbe94..cf02d5ae608 100644 --- a/test/jdk/java/foreign/TestBufferStackStress2.java +++ b/test/jdk/java/foreign/TestBufferStackStress2.java @@ -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,6 @@ * * @bug 8356114 8356658 * @modules java.base/jdk.internal.foreign - * @build NativeTestHelper TestBufferStackStress2 * @run junit/timeout=480 TestBufferStackStress2 */ diff --git a/test/jdk/java/foreign/TestSegmentOffset.java b/test/jdk/java/foreign/TestSegmentOffset.java index cf335e4ff88..963063378a3 100644 --- a/test/jdk/java/foreign/TestSegmentOffset.java +++ b/test/jdk/java/foreign/TestSegmentOffset.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, 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 @@ -23,30 +23,32 @@ /* * @test - * @run testng TestSegmentOffset + * @run junit TestSegmentOffset */ import java.lang.foreign.Arena; import java.lang.foreign.MemorySegment; -import org.testng.SkipException; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +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 java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.function.IntFunction; +import java.util.stream.Stream; + import static java.lang.System.out; import static java.lang.foreign.ValueLayout.JAVA_BYTE; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.*; -public class TestSegmentOffset { +final class TestSegmentOffset { - @Test(dataProvider = "slices") - public void testOffset(SegmentSlice s1, SegmentSlice s2) { - if (s1.kind != s2.kind) { - throw new SkipException("Slices of different segment kinds"); - } + @ParameterizedTest + @MethodSource("slices") + void testOffset(SegmentSlice s1, SegmentSlice s2) { if (s1.contains(s2)) { // check that a segment and its overlapping segment point to same elements long offset = s1.offset(s2); @@ -54,7 +56,7 @@ public class TestSegmentOffset { out.format("testOffset s1:%s, s2:%s, offset:%d, i:%s\n", s1, s2, offset, i); byte expected = s2.segment.get(JAVA_BYTE, i); byte found = s1.segment.get(JAVA_BYTE, i + offset); - assertEquals(found, expected); + assertEquals(expected, found); } } else if (!s2.contains(s1)) { // disjoint segments - check that offset is out of bounds @@ -72,7 +74,7 @@ public class TestSegmentOffset { } } - static class SegmentSlice { + final static class SegmentSlice { enum Kind { NATIVE(i -> Arena.ofAuto().allocate(i, 1)), @@ -94,7 +96,7 @@ public class TestSegmentOffset { final int last; final MemorySegment segment; - public SegmentSlice(Kind kind, int first, int last, MemorySegment segment) { + SegmentSlice(Kind kind, int first, int last, MemorySegment segment) { this.kind = kind; this.first = first; this.last = last; @@ -116,8 +118,8 @@ public class TestSegmentOffset { } } - @DataProvider(name = "slices") - static Object[][] slices() { + + static Stream slices() { int[] sizes = { 16, 8, 4, 2, 1 }; List slices = new ArrayList<>(); for (SegmentSlice.Kind kind : SegmentSlice.Kind.values()) { @@ -134,12 +136,15 @@ public class TestSegmentOffset { } } } - Object[][] sliceArray = new Object[slices.size() * slices.size()][]; + SegmentSlice[][] sliceArray = new SegmentSlice[slices.size() * slices.size()][]; for (int i = 0 ; i < slices.size() ; i++) { for (int j = 0 ; j < slices.size() ; j++) { - sliceArray[i * slices.size() + j] = new Object[] { slices.get(i), slices.get(j) }; + sliceArray[i * slices.size() + j] = new SegmentSlice[] { slices.get(i), slices.get(j) }; } } - return sliceArray; + return Arrays.stream(sliceArray) + // Only consider segment slices of the same kind + .filter(a -> a[0].kind == a[1].kind) + .map(Arguments::of); } } diff --git a/test/jdk/java/lang/LazyConstant/DemoContainerInjectionTest.java b/test/jdk/java/lang/LazyConstant/DemoContainerInjectionTest.java index df51a562210..0878ec03789 100644 --- a/test/jdk/java/lang/LazyConstant/DemoContainerInjectionTest.java +++ b/test/jdk/java/lang/LazyConstant/DemoContainerInjectionTest.java @@ -58,15 +58,6 @@ final class DemoContainerInjectionTest { assertContainerPopulated(container); } - @Test - void SettableComponents() { - SettableContainer container = SettableScratchContainer.of(Set.of(Foo.class, Bar.class)); - container.set(Foo.class, new FooImpl()); - container.set(Bar.class, new BarImpl()); - assertContainerPopulated(container); - } - - @Test void ProviderComponents() { Container container = ProviderContainer.of(Map.of( @@ -93,10 +84,6 @@ final class DemoContainerInjectionTest { T get(Class type); } - interface SettableContainer extends Container { - void set(Class type, T implementation); - } - record ComputedContainer(Map, ?> components) implements Container { @Override @@ -110,26 +97,6 @@ final class DemoContainerInjectionTest { } - record SettableScratchContainer(Map, Object> scratch, Map, ?> components) implements SettableContainer { - - @Override - public void set(Class type, T implementation) { - if (scratch.putIfAbsent(type, type.cast(implementation)) != null) { - throw new IllegalStateException("Can only set once for " + type); - } - } - - @Override - public T get(Class type) { - return type.cast(components.get(type)); - } - - static SettableContainer of(Set> components) { - Map, Object> scratch = new ConcurrentHashMap<>(); - return new SettableScratchContainer(scratch, Map.ofLazy(components, scratch::get)); - } - - } record ProviderContainer(Map, ?> components) implements Container { diff --git a/test/jdk/java/lang/LazyConstant/DemoImperativeTest.java b/test/jdk/java/lang/LazyConstant/DemoImperativeTest.java deleted file mode 100644 index bc1208e67f8..00000000000 --- a/test/jdk/java/lang/LazyConstant/DemoImperativeTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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 Test of a demo of an imperative stable value based on a lazy constant - * @enablePreview - * @run junit DemoImperativeTest - */ - -import org.junit.jupiter.api.Test; - -import java.util.concurrent.atomic.AtomicReference; - -import static org.junit.jupiter.api.Assertions.*; - -final class DemoImperativeTest { - - interface ImperativeStableValue { - T orElse(T other); - boolean isSet(); - boolean trySet(T t); - T get(); - - static ImperativeStableValue of() { - var scratch = new AtomicReference(); - return new Impl<>(scratch, LazyConstant.of(scratch::get)); - } - - } - - - private record Impl(AtomicReference scratch, - LazyConstant underlying) implements ImperativeStableValue { - - @Override - public boolean trySet(T t) { - final boolean result = scratch.compareAndSet(null, t); - if (result) { - // Actually set the value - get(); - } - return result; - } - - @Override public T orElse(T other) { return underlying.orElse(other); } - @Override public boolean isSet() { return underlying.isInitialized(); } - @Override public T get() { return underlying.get(); } - - } - - @Test - void basic() { - var stableValue = ImperativeStableValue.of(); - assertFalse(stableValue.isSet()); - assertEquals(13, stableValue.orElse(13)); - assertTrue(stableValue.trySet(42)); - assertFalse(stableValue.trySet(13)); - assertTrue(stableValue.isSet()); - assertEquals(42, stableValue.get()); - assertEquals(42, stableValue.orElse(13)); - } - -} diff --git a/test/jdk/java/lang/LazyConstant/LazyConstantClassUnloading.java b/test/jdk/java/lang/LazyConstant/LazyConstantClassUnloading.java new file mode 100644 index 00000000000..fcc9920aa39 --- /dev/null +++ b/test/jdk/java/lang/LazyConstant/LazyConstantClassUnloading.java @@ -0,0 +1,184 @@ +/* + * 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 + * @summary LazyConstant should not retain throwable classes after failed computation + * @enablePreview + * @modules java.base/java.lang.ref:open + * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @requires vm.opt.final.ClassUnloading + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm + * -Xbootclasspath/a:. + * -XX:+UnlockDiagnosticVMOptions + * -XX:+WhiteBoxAPI + * LazyConstantClassUnloading + */ + +import jdk.test.lib.Utils; +import jdk.test.whitebox.WhiteBox; + +import java.io.ByteArrayOutputStream; +import java.lang.LazyConstant; +import java.lang.ref.WeakReference; +import java.net.URL; +import java.net.URLClassLoader; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.NoSuchElementException; +import java.util.function.BooleanSupplier; +import java.util.function.Supplier; +import javax.tools.JavaCompiler; +import javax.tools.ToolProvider; + +public class LazyConstantClassUnloading { + + private static final String THROWABLE_NAME = "test.lazyconstant.GeneratedProblem"; + private static final String SUPPLIER_NAME = "test.lazyconstant.ThrowingSupplier"; + + private static WhiteBox wb; + + public static void main(String[] args) throws Exception { + TestState state = createFailedLazyConstant(); + + if (!waitFor(() -> state.loaderRef().refersTo(null), Utils.adjustTimeout(4_000L))) { + throw new AssertionError("The throwing supplier class loader was not unloaded"); + } + + assertLazyAccessFails(state.lazyConstant(), THROWABLE_NAME); + } + + private static TestState createFailedLazyConstant() throws Exception { + Path sourceDir = Files.createTempDirectory("lazy-constant-throwables-src"); + Path classesDir = Files.createTempDirectory("lazy-constant-throwables-classes"); + + writeSource(sourceDir, "GeneratedProblem.java", """ + package test.lazyconstant; + + public class GeneratedProblem extends RuntimeException { + } + """); + writeSource(sourceDir, "ThrowingSupplier.java", """ + package test.lazyconstant; + + import java.util.function.Supplier; + + public class ThrowingSupplier implements Supplier { + @Override + public String get() { + throw new GeneratedProblem(); + } + } + """); + compile(sourceDir, classesDir); + + URLClassLoader loader = new URLClassLoader(new URL[] { classesDir.toUri().toURL() }, + LazyConstantClassUnloading.class.getClassLoader()); + WeakReference loaderRef = new WeakReference<>(loader); + + Class supplierClass = Class.forName(SUPPLIER_NAME, true, loader); + @SuppressWarnings("unchecked") + Supplier supplier = + (Supplier) supplierClass.getConstructor().newInstance(); + + LazyConstant lazyConstant = LazyConstant.of(supplier); + assertLazyAccessFails(lazyConstant, THROWABLE_NAME); + + supplier = null; + supplierClass = null; + loader.close(); + loader = null; + + return new TestState(lazyConstant, loaderRef); + } + + private static void writeSource(Path sourceDir, String fileName, String source) throws Exception { + Path file = sourceDir.resolve("test/lazyconstant").resolve(fileName); + Files.createDirectories(file.getParent()); + Files.writeString(file, source); + } + + private static void compile(Path sourceDir, Path classesDir) throws Exception { + JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); + if (compiler == null) { + throw new AssertionError("No system Java compiler available"); + } + + ByteArrayOutputStream output = new ByteArrayOutputStream(); + int exitCode = compiler.run(null, output, output, + "-d", classesDir.toString(), + sourceDir.resolve("test/lazyconstant/GeneratedProblem.java").toString(), + sourceDir.resolve("test/lazyconstant/ThrowingSupplier.java").toString()); + if (exitCode != 0) { + throw new AssertionError("Compilation failed: " + output); + } + } + + private static void assertLazyAccessFails(LazyConstant lazyConstant, String throwableName) { + var x = assertThrows(NoSuchElementException.class, () -> lazyConstant.get()); + var message = x.getMessage(); + assertTrue(message.contains(throwableName), "Missing throwable name in message: " + message); + } + + private static boolean waitFor(BooleanSupplier condition, long timeoutMillis) { + final long deadline = System.currentTimeMillis() + timeoutMillis; + wb = WhiteBox.getWhiteBox(); + wb.fullGC(); + boolean refProResult; + boolean conditionValue; + try { + do { + refProResult = wb.waitForReferenceProcessing(); + conditionValue = condition.getAsBoolean(); + if (System.currentTimeMillis() > deadline) { + throw new AssertionError("Timed out waiting for reference"); + } + } while (refProResult || !conditionValue); + return conditionValue; + } catch (InterruptedException e) { + throw new AssertionError(e); + } + } + + static X assertThrows(Class type, Runnable runnable) { + try { + runnable.run(); + } catch (Throwable t) { + if (t.getClass().equals(type)) { + return (X) t; + } + throw new AssertionError("Expected " + type + " to be thrown", t); + } + throw new AssertionError("Expected " + type + " to be thrown but nothing was thrown."); + } + + static void assertTrue(boolean value, String message) { + if (!value) { + throw new AssertionError(message); + } + } + + private record TestState(LazyConstant lazyConstant, WeakReference loaderRef) { } +} diff --git a/test/jdk/java/lang/LazyConstant/LazyConstantSafePublicationTest.java b/test/jdk/java/lang/LazyConstant/LazyConstantSafePublicationTest.java index 4d88169b155..84e6ddd5444 100644 --- a/test/jdk/java/lang/LazyConstant/LazyConstantSafePublicationTest.java +++ b/test/jdk/java/lang/LazyConstant/LazyConstantSafePublicationTest.java @@ -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 @@ -25,10 +25,13 @@ * @summary Basic tests for making sure ComputedConstant publishes values safely * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.lang + * @library /test/lib * @enablePreview * @run junit LazyConstantSafePublicationTest */ +import jdk.internal.lang.LazyConstantImpl; +import jdk.test.lib.Utils; import org.junit.jupiter.api.Test; import java.util.Arrays; @@ -48,7 +51,7 @@ import static org.junit.jupiter.api.Assertions.*; final class LazyConstantSafePublicationTest { private static final int SIZE = 100_000; - private static final int THREADS = Runtime.getRuntime().availableProcessors(); + private static final int THREADS = Math.max(8, Runtime.getRuntime().availableProcessors()); static final class Holder { // These are non-final fields but should be seen @@ -62,18 +65,18 @@ final class LazyConstantSafePublicationTest { static final class Consumer implements Runnable { - final LazyConstant[] constants; + final LazyConstantImpl[] constants; final int[] observations = new int[SIZE]; int i = 0; - public Consumer(LazyConstant[] constants) { + public Consumer(LazyConstantImpl[] constants) { this.constants = constants; } @Override public void run() { for (; i < SIZE; i++) { - LazyConstant s = constants[i]; + LazyConstantImpl s = constants[i]; Holder h; // Wait until the ComputedConstant has a holder value while ((h = s.orElse(null)) == null) { Thread.onSpinWait();} @@ -89,20 +92,20 @@ final class LazyConstantSafePublicationTest { static final class Producer implements Runnable { - final LazyConstant[] constants; + final LazyConstantImpl[] constants; - public Producer(LazyConstant[] constants) { + public Producer(LazyConstantImpl[] constants) { this.constants = constants; } @Override public void run() { - LazyConstant s; + LazyConstantImpl s; long deadlineNs = System.nanoTime(); for (int i = 0; i < SIZE; i++) { s = constants[i]; s.get(); - deadlineNs += 1000; + deadlineNs += Utils.adjustTimeout(1000L); while (System.nanoTime() < deadlineNs) { Thread.onSpinWait(); } @@ -112,7 +115,7 @@ final class LazyConstantSafePublicationTest { @Test void mainTest() { - final LazyConstant[] constants = constants(); + final LazyConstantImpl[] constants = constants(); List consumers = IntStream.range(0, THREADS) .mapToObj(_ -> new Consumer(constants)) .toList(); @@ -148,12 +151,12 @@ final class LazyConstantSafePublicationTest { assertEquals(THREADS * SIZE, histogram[63]); } - static void join(final LazyConstant[] constants, List consumers, Thread... threads) { + static void join(final LazyConstantImpl[] constants, List consumers, Thread... threads) { try { for (Thread t:threads) { - long deadline = System.nanoTime() + TimeUnit.MINUTES.toNanos(1); + long deadline = System.nanoTime() + Utils.adjustTimeout(TimeUnit.MINUTES.toNanos(4)); while (t.isAlive()) { - t.join(TimeUnit.SECONDS.toMillis(10)); + t.join(TimeUnit.SECONDS.toMillis(20)); if (t.isAlive()) { String stack = Arrays.stream(t.getStackTrace()) .map(Objects::toString) @@ -178,11 +181,11 @@ final class LazyConstantSafePublicationTest { } } - static LazyConstant[] constants() { + static LazyConstantImpl[] constants() { @SuppressWarnings("unchecked") - LazyConstant[] constants = (LazyConstant[]) new LazyConstant[SIZE]; + LazyConstantImpl[] constants = (LazyConstantImpl[]) new LazyConstantImpl[SIZE]; for (int i = 0; i < SIZE; i++) { - constants[i] = LazyConstant.of(Holder::new); + constants[i] = LazyConstantImpl.ofLazy(Holder::new); } return constants; } diff --git a/test/jdk/java/lang/LazyConstant/LazyConstantTest.java b/test/jdk/java/lang/LazyConstant/LazyConstantTest.java index 485138bc492..4faaf74a811 100644 --- a/test/jdk/java/lang/LazyConstant/LazyConstantTest.java +++ b/test/jdk/java/lang/LazyConstant/LazyConstantTest.java @@ -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 @@ -24,6 +24,7 @@ /* @test * @summary Basic tests for the LazyConstant implementation * @enablePreview + * @library /test/lib * @modules java.base/jdk.internal.lang * @run junit/othervm --add-opens java.base/jdk.internal.lang=ALL-UNNAMED LazyConstantTest */ @@ -32,12 +33,18 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; -import java.util.Objects; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.lang.LazyConstant; import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Stream; +import jdk.test.lib.Utils; import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -46,6 +53,8 @@ final class LazyConstantTest { private static final int VALUE = 42; private static final Supplier SUPPLIER = () -> VALUE; + private static final long TIME_OUT_S = Utils.adjustTimeout(5); + private static final long OVERLAP_TIME_MS = 100; @Test void factoryInvariants() { @@ -57,7 +66,6 @@ final class LazyConstantTest { void basic(Function, LazyConstant> factory) { LazyConstantTestUtil.CountingSupplier cs = new LazyConstantTestUtil.CountingSupplier<>(SUPPLIER); var lazy = factory.apply(cs); - assertFalse(lazy.isInitialized()); assertEquals(SUPPLIER.get(), lazy.get()); assertEquals(1, cs.cnt()); assertEquals(SUPPLIER.get(), lazy.get()); @@ -67,24 +75,48 @@ final class LazyConstantTest { @ParameterizedTest @MethodSource("factories") - void exception(Function, LazyConstant> factory) { - LazyConstantTestUtil.CountingSupplier cs = new LazyConstantTestUtil.CountingSupplier<>(() -> { - throw new UnsupportedOperationException(); - }); - var lazy = factory.apply(cs); - assertThrows(UnsupportedOperationException.class, lazy::get); - assertEquals(1, cs.cnt()); - assertThrows(UnsupportedOperationException.class, lazy::get); - assertEquals(2, cs.cnt()); - assertTrue(lazy.toString().contains("computing function")); + void exceptionInComputingFunction(Function, LazyConstant> factory) { + // Test different Throwable categories + for (LazyConstantTestUtil.Thrower thrower : LazyConstantTestUtil.throwers()) { + AtomicReference exceptionThrown = new AtomicReference<>(); + LazyConstantTestUtil.CountingSupplier cs = new LazyConstantTestUtil.CountingSupplier<>(() -> { + Throwable t = thrower.supplier().get(); + exceptionThrown.set(t); + LazyConstantTestUtil.sneakyThrow(t); + return 42; // Unreachable + }); + exceptionInComputingFunction(factory, cs, () -> exceptionThrown.get().getClass(), thrower.message()); + } } @ParameterizedTest - @MethodSource("lazyConstants") - void orElse(LazyConstant constant) { - assertNull(constant.orElse(null)); - constant.get(); - assertEquals(VALUE, constant.orElse(null)); + @MethodSource("factories") + void nullInComputingFunction(Function, LazyConstant> factory) { + LazyConstantTestUtil.CountingSupplier cs = new LazyConstantTestUtil.CountingSupplier<>(() -> { + return null; + }); + exceptionInComputingFunction(factory, cs, () -> NullPointerException.class, null); + } + + void exceptionInComputingFunction(Function, LazyConstant> factory, + LazyConstantTestUtil.CountingSupplier cs, + Supplier> causeTypeSupplier, + String message) { + var lazy = factory.apply(cs); + var ix = assertThrows(NoSuchElementException.class, lazy::get); + // Now we can look at the throwable + var causeType = causeTypeSupplier.get(); + assertEquals(causeType, ix.getCause().getClass()); + if (message != null) { + assertEquals(message, ix.getCause().getMessage()); + } + assertEquals(1, cs.cnt()); + var x = assertThrows(NoSuchElementException.class, lazy::get); + assertEquals("Unable to access the constant because "+causeType.getName()+" was thrown at initial computation", x.getMessage()); + assertEquals(1, cs.cnt()); + var toString = lazy.toString(); + assertTrue(toString.contains("failed with="+causeType.getName()), toString); + assertNull(x.getCause()); } @ParameterizedTest @@ -94,34 +126,35 @@ final class LazyConstantTest { } @ParameterizedTest - @MethodSource("lazyConstants") - void isInitialized(LazyConstant constant) { - assertFalse(constant.isInitialized()); - constant.get(); - assertTrue(constant.isInitialized()); - } - - @ParameterizedTest - @MethodSource("lazyConstants") - void testHashCode(LazyConstant constant) { - assertEquals(System.identityHashCode(constant), constant.hashCode()); + @MethodSource("factories") + void testHashCode(Function, LazyConstant> factory) { + LazyConstantTestUtil.CountingSupplier cs = new LazyConstantTestUtil.CountingSupplier<>(SUPPLIER); + var lazy = factory.apply(cs); + assertEquals(System.identityHashCode(lazy), lazy.hashCode()); + assertEquals(System.identityHashCode(lazy), lazy.hashCode()); + // The supplier should never be invoked + assertEquals(0, cs.cnt()); } @ParameterizedTest - @MethodSource("lazyConstants") - void testEquals(LazyConstant c0) { - assertNotEquals(null, c0); + @MethodSource("factories") + void testEquals(Function, LazyConstant> factory) { + LazyConstantTestUtil.CountingSupplier cs = new LazyConstantTestUtil.CountingSupplier<>(SUPPLIER); + var lazy = factory.apply(cs); + assertNotEquals(null, lazy); LazyConstant different = LazyConstant.of(SUPPLIER); - assertNotEquals(different, c0); - assertNotEquals(c0, different); - assertNotEquals("a", c0); + assertNotEquals(different, lazy); + assertNotEquals(lazy, different); + assertNotEquals("a", lazy); + // The supplier should never be invoked + assertEquals(0, cs.cnt()); } @ParameterizedTest @MethodSource("lazyConstants") void testLazyConstantAsComputingFunction(LazyConstant constant) { LazyConstant c1 = LazyConstant.of(constant); - assertSame(constant, c1); + assertNotSame(constant, c1); } @Test @@ -161,9 +194,156 @@ final class LazyConstantTest { void recursiveCall() { AtomicReference> ref = new AtomicReference<>(); LazyConstant constant = LazyConstant.of(() -> ref.get().get()); - LazyConstant constant1 = LazyConstant.of(constant); - ref.set(constant1); - assertThrows(IllegalStateException.class, constant::get); + ref.set(constant); + var x = assertThrows(NoSuchElementException.class, constant::get); + assertEquals(IllegalStateException.class, x.getCause().getClass()); + } + + @Test + void recursiveCallWithComputingFunctionsToStringThrowing() { + AtomicReference> ref = new AtomicReference<>(); + AtomicInteger cnt = new AtomicInteger(); + + final class NaughtySupplier implements Supplier { + @Override + public Integer get() { + return ref.get().get(); + } + + @Override + public String toString() { + cnt.incrementAndGet(); + throw new UnsupportedOperationException("I should never be seen"); + } + } + + LazyConstant constant = LazyConstant.of(new NaughtySupplier()); + + ref.set(constant); + var x = assertThrows(NoSuchElementException.class, constant::get); + assertEquals(IllegalStateException.class, x.getCause().getClass()); + assertEquals(1, cnt.get()); + assertEquals("Unable to access the constant because java.lang.IllegalStateException was thrown at initial computation", x.getMessage()); + assertTrue(x.getCause().getMessage().contains(NaughtySupplier.class.getName()), x.getCause().getMessage()); + } + + @Test + void atMostOnceComputationUnderContention() throws Exception { + // Mitigate thread starvation via a dedicated thread pool != FJP + try (var testExecutor = Executors.newFixedThreadPool(3)) { + AtomicInteger calls = new AtomicInteger(); + CountDownLatch entered = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + CountDownLatch competing = new CountDownLatch(2); + + LazyConstant constant = LazyConstant.of(() -> { + calls.incrementAndGet(); + entered.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + throw new AssertionError(e); + } + return VALUE; + }); + + var f1 = CompletableFuture.supplyAsync(constant::get, testExecutor); + assertTrue(entered.await(TIME_OUT_S, TimeUnit.SECONDS)); + + var f2 = CompletableFuture.supplyAsync(() -> { + competing.countDown(); + return constant.get(); + }, testExecutor); + var f3 = CompletableFuture.supplyAsync(() -> { + competing.countDown(); + return constant.get(); + }, testExecutor); + + assertTrue(competing.await(TIME_OUT_S, TimeUnit.SECONDS)); + // While computation is blocked, only one thread should have entered supplier + assertEquals(1, calls.get()); + + release.countDown(); + + assertEquals(VALUE, f1.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(VALUE, f2.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(VALUE, f3.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(1, calls.get()); + } + } + + @Test + void competingThreadsBlockUntilInitializationCompletes() throws Exception { + // Mitigate thread starvation via a dedicated thread pool != FJP + try (var testExecutor = Executors.newFixedThreadPool(2)) { + CountDownLatch entered = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + CountDownLatch waiting = new CountDownLatch(1); + + LazyConstant constant = LazyConstant.of(() -> { + entered.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + throw new AssertionError(e); + } + return VALUE; + }); + + var computingThread = CompletableFuture.supplyAsync(constant::get, testExecutor); + assertTrue(entered.await(TIME_OUT_S, TimeUnit.SECONDS)); + + var waitingThread = CompletableFuture.supplyAsync(() -> { + waiting.countDown(); + return constant.get(); + }, testExecutor); + + assertTrue(waiting.await(TIME_OUT_S, TimeUnit.SECONDS)); + Thread.sleep(OVERLAP_TIME_MS); + assertFalse(waitingThread.isDone(), "contending thread should be be blocked"); + + release.countDown(); + + assertEquals(VALUE, computingThread.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(VALUE, waitingThread.get(TIME_OUT_S, TimeUnit.SECONDS)); + } + } + + @Test + void interruptStatusIsPreservedForComputingThread() throws Exception { + int unset = -1; + int notInterrupted = 0; + int interrupted = 1; + AtomicInteger observedInterrupted = new AtomicInteger(unset); + CountDownLatch supplierRunning = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + + LazyConstant constant = LazyConstant.of(() -> { + supplierRunning.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + observedInterrupted.set(Thread.currentThread().isInterrupted() ? interrupted : notInterrupted); + Thread.currentThread().interrupt(); // restore if await cleared it + } + return VALUE; + }); + + AtomicInteger interruptedAfterGet = new AtomicInteger(unset); + + Thread t = Thread.ofPlatform().start(() -> { + assertEquals(VALUE, constant.get()); + interruptedAfterGet.set(Thread.currentThread().isInterrupted() ? interrupted : notInterrupted); + }); + + assertTrue(supplierRunning.await(TIME_OUT_S, TimeUnit.SECONDS)); + Thread.sleep(OVERLAP_TIME_MS); + t.interrupt(); + release.countDown(); + t.join(); + + assertEquals(notInterrupted, observedInterrupted.get()); // Observed before restoration of the status + assertEquals(interrupted, interruptedAfterGet.get(), "get() cleared interrupt status"); } @ParameterizedTest @@ -172,10 +352,10 @@ final class LazyConstantTest { LazyConstantTestUtil.CountingSupplier cs = new LazyConstantTestUtil.CountingSupplier<>(SUPPLIER); var f1 = factory.apply(cs); - Supplier underlyingBefore = LazyConstantTestUtil.computingFunction(f1); + Object underlyingBefore = LazyConstantTestUtil.computingFunction(f1); assertSame(cs, underlyingBefore); int v = f1.get(); - Supplier underlyingAfter = LazyConstantTestUtil.computingFunction(f1); + Object underlyingAfter = LazyConstantTestUtil.computingFunction(f1); assertNull(underlyingAfter); } @@ -187,15 +367,14 @@ final class LazyConstantTest { }); var f1 = factory.apply(cs); - Supplier underlyingBefore = LazyConstantTestUtil.computingFunction(f1); + Object underlyingBefore = LazyConstantTestUtil.computingFunction(f1); assertSame(cs, underlyingBefore); - try { - int v = f1.get(); - } catch (UnsupportedOperationException _) { - // Expected - } - Supplier underlyingAfter = LazyConstantTestUtil.computingFunction(f1); - assertSame(cs, underlyingAfter); + + var x = assertThrows(NoSuchElementException.class, f1::get); + assertEquals(UnsupportedOperationException.class, x.getCause().getClass()); + + Object underlyingAfter = LazyConstantTestUtil.computingFunction(f1); + assertEquals(UnsupportedOperationException.class.getName(), underlyingAfter); } private static Stream> lazyConstants() { diff --git a/test/jdk/java/lang/LazyConstant/LazyConstantTestUtil.java b/test/jdk/java/lang/LazyConstant/LazyConstantTestUtil.java index 502f46b726d..31317c52490 100644 --- a/test/jdk/java/lang/LazyConstant/LazyConstantTestUtil.java +++ b/test/jdk/java/lang/LazyConstant/LazyConstantTestUtil.java @@ -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 @@ -21,12 +21,12 @@ * questions. */ +import java.io.IOException; import java.lang.reflect.Field; +import java.lang.reflect.Type; +import java.util.List; import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.BiFunction; -import java.util.function.Function; -import java.util.function.IntFunction; -import java.util.function.Supplier; +import java.util.function.*; final class LazyConstantTestUtil { @@ -82,6 +82,22 @@ final class LazyConstantTestUtil { } + public static final class CountingPredicate + extends AbstractCounting> + implements Predicate { + + public CountingPredicate(Predicate delegate) { + super(delegate); + } + + @Override + public boolean test(T t) { + incrementCounter(); + return delegate.test(t); + } + + } + public static final class CountingBiFunction extends AbstractCounting> implements BiFunction { @@ -150,11 +166,11 @@ final class LazyConstantTestUtil { } } - static Supplier computingFunction(LazyConstant o) { + static Object computingFunction(LazyConstant o) { try { - final Field field = field(o.getClass(), "computingFunction"); + final Field field = field(o.getClass(), "computingFunctionOrExceptionType"); field.setAccessible(true); - return (Supplier) field.get(o); + return field.get(o); } catch (ReflectiveOperationException e) { throw new RuntimeException(e); } @@ -171,4 +187,27 @@ final class LazyConstantTestUtil { } } + static String expectedMessage(Class throwableClass, Object input) { + return "Unable to access the lazy collection because " + throwableClass.getName() + " was thrown at initial computation for input '" + input + "'"; + } + + @SuppressWarnings("unchecked") + static void sneakyThrow(Throwable e) throws E { + throw (E) e; + } + + record Thrower(String message, Function factory) { + public Supplier supplier() { + return () -> factory.apply(Thrower.this.message); + } + } + + static List throwers() { + return List.of( + new Thrower("Initial checked exception", IOException::new), + new Thrower("Initial runtime exception", UnsupportedOperationException::new), + new Thrower("Initial Error", InternalError::new) + ); + } + } diff --git a/test/jdk/java/lang/LazyConstant/LazyListTest.java b/test/jdk/java/lang/LazyConstant/LazyListTest.java index 111e3cf8ab2..c4cc843646e 100644 --- a/test/jdk/java/lang/LazyConstant/LazyListTest.java +++ b/test/jdk/java/lang/LazyConstant/LazyListTest.java @@ -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 @@ -33,18 +33,15 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import java.io.Serializable; -import java.util.Comparator; -import java.util.List; -import java.util.NoSuchElementException; -import java.util.RandomAccess; -import java.util.Set; +import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Consumer; +import java.util.function.*; import java.util.function.Function; -import java.util.function.IntFunction; -import java.util.function.UnaryOperator; -import java.util.stream.Collectors; import java.util.stream.IntStream; import java.util.stream.Stream; @@ -57,6 +54,9 @@ final class LazyListTest { private static final int SIZE = 31; private static final IntFunction IDENTITY = i -> i; + private static final long TIME_OUT_S = 5; + private static final long OVERLAP_TIME_MS = 100; + @Test void factoryInvariants() { assertThrows(NullPointerException.class, () -> List.ofLazy(SIZE, null)); @@ -88,15 +88,44 @@ final class LazyListTest { } @Test - void getException() { + void exeptionInComputingFunction() { LazyConstantTestUtil.CountingIntFunction cif = new LazyConstantTestUtil.CountingIntFunction(_ -> { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException("Initial exception"); }); + exceptionInComputingFunction(cif, UnsupportedOperationException.class); + } + + @Test + void nullResultInComputingFunction() { + LazyConstantTestUtil.CountingIntFunction cif = new LazyConstantTestUtil.CountingIntFunction(_ -> { + return null; + }); + exceptionInComputingFunction(cif, NullPointerException.class); + } + + void exceptionInComputingFunction(LazyConstantTestUtil.CountingIntFunction cif, + Class causeType) { var lazy = List.ofLazy(SIZE, cif); - assertThrows(UnsupportedOperationException.class, () -> lazy.get(INDEX)); + var x = assertThrows(NoSuchElementException.class, () -> lazy.get(INDEX)); + assertEquals(LazyConstantTestUtil.expectedMessage(causeType, INDEX), x.getMessage()); + assertEquals(causeType, x.getCause().getClass()); assertEquals(1, cif.cnt()); - assertThrows(UnsupportedOperationException.class, () -> lazy.get(INDEX)); - assertEquals(2, cif.cnt()); + + var x2 = assertThrows(NoSuchElementException.class, () -> lazy.get(INDEX)); + assertEquals(1, cif.cnt()); + assertEquals(LazyConstantTestUtil.expectedMessage(causeType, INDEX), x2.getMessage()); + // The initial cause should only be present on the _first_ unchecked exception + assertNull(x2.getCause()); + + for (int i = 0; i < SIZE; i++) { + // Make sure all values are touched + final int finalI = i; + assertThrows(Exception.class, () -> lazy.get(finalI)); + } + + var xToString = assertThrows(NoSuchElementException.class, lazy::toString); + assertEquals(LazyConstantTestUtil.expectedMessage(causeType, 0), xToString.getMessage()); + assertEquals(SIZE, cif.cnt()); } @Test @@ -109,14 +138,14 @@ final class LazyListTest { void toArrayWithArrayLarger() { Integer[] actual = new Integer[SIZE]; for (int i = 0; i < SIZE; i++) { - actual[INDEX] = 100 + i; + actual[i] = 100 + i; } var lazy = List.ofLazy(INDEX, IDENTITY); assertSame(actual, lazy.toArray(actual)); - Integer[] expected = IntStream.range(0, SIZE) - .mapToObj(i -> i < INDEX ? i : null) - .toArray(Integer[]::new); - assertArrayEquals(expected, actual); + for (int i = 0; i < INDEX; i++) { + assertEquals(i, actual[i]); + } + assertNull(actual[INDEX]); } @Test @@ -153,6 +182,15 @@ final class LazyListTest { assertEquals(-1, lazy.lastIndexOf(SIZE + 1)); } + @ParameterizedTest + @MethodSource("lazyLists") + void bounds(List list) { + IntStream.range(0, list.size()) + .forEach(i -> assertEquals(IDENTITY.apply(i), list.get(i))); + assertThrows(IndexOutOfBoundsException.class, () -> list.get(-1)); + assertThrows(IndexOutOfBoundsException.class, () -> list.get(list.size())); + } + @Test void toStringTest() { assertEquals("[]", newEmptyLazyList().toString()); @@ -264,8 +302,148 @@ final class LazyListTest { AtomicReference> ref = new AtomicReference<>(); var lazy = List.ofLazy(SIZE, i -> ref.get().apply(i)); ref.set(lazy::get); - var x = assertThrows(IllegalStateException.class, () -> lazy.get(INDEX)); - assertEquals("Recursive initialization of a lazy collection is illegal", x.getMessage()); + var x = assertThrows(NoSuchElementException.class, () -> lazy.get(INDEX)); + assertEquals(LazyConstantTestUtil.expectedMessage(IllegalStateException.class, INDEX), x.getMessage()); + assertEquals("Recursive initialization of a lazy collection is illegal: " + INDEX, x.getCause().getMessage()); + assertEquals(IllegalStateException.class, x.getCause().getClass()); + } + + @ParameterizedTest + @MethodSource("viewOperations") + void atMostOnceComputationUnderContention(UnaryOperation viewOp) throws Exception { + final int index = SIZE / 2; + // Mitigate thread starvation via a dedicated thread pool != FJP + try (var testExecutor = Executors.newFixedThreadPool(3)) { + AtomicInteger calls = new AtomicInteger(); + CountDownLatch entered = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + CountDownLatch competing = new CountDownLatch(2); + + List ref = viewOp.apply(newRegularList()); + List constant = viewOp.apply(List.ofLazy(SIZE, i -> { + calls.incrementAndGet(); + entered.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + throw new AssertionError(e); + } + return i; + })); + + var f1 = CompletableFuture.supplyAsync(() -> constant.get(index), testExecutor); + assertTrue(entered.await(5, TimeUnit.SECONDS)); + + var f2 = CompletableFuture.supplyAsync(() -> { + competing.countDown(); + return constant.get(index); + }, testExecutor); + var f3 = CompletableFuture.supplyAsync(() -> { + competing.countDown(); + return constant.get(index); + }, testExecutor); + + assertTrue(competing.await(TIME_OUT_S, TimeUnit.SECONDS)); + // While computation is blocked, only one thread should have entered supplier + Thread.sleep(OVERLAP_TIME_MS); + assertEquals(1, calls.get()); + + release.countDown(); + + assertEquals(ref.get(index), f1.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(ref.get(index), f2.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(ref.get(index), f3.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(1, calls.get()); + } + } + + @ParameterizedTest + @MethodSource("viewOperations") + void competingThreadsBlockUntilInitializationCompletes(UnaryOperation viewOp) throws Exception { + final int index = SIZE / 2; + // Mitigate thread starvation via a dedicated thread pool != FJP + try (var testExecutor = Executors.newFixedThreadPool(2)) { + CountDownLatch entered = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + CountDownLatch waiting = new CountDownLatch(1); + + List ref = viewOp.apply(newRegularList()); + List constant = viewOp.apply(List.ofLazy(SIZE, i -> { + entered.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + throw new AssertionError(e); + } + return i; + })); + + var computingThread = CompletableFuture.supplyAsync(() -> constant.get(index), testExecutor); + assertTrue(entered.await(TIME_OUT_S, TimeUnit.SECONDS)); + + var waitingThread = CompletableFuture.supplyAsync(() -> { + waiting.countDown(); + return constant.get(index); + }, testExecutor); + + assertTrue(waiting.await(TIME_OUT_S, TimeUnit.SECONDS)); + Thread.sleep(OVERLAP_TIME_MS); + assertFalse(waitingThread.isDone(), "contending thread should be be blocked"); + + release.countDown(); + + assertEquals(ref.get(index), computingThread.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(ref.get(index), waitingThread.get(TIME_OUT_S, TimeUnit.SECONDS)); + } + } + + @ParameterizedTest + @MethodSource("viewOperations") + void interruptStatusIsPreservedForComputingThread(UnaryOperation viewOp) throws Exception { + final int index = SIZE / 2; + int unset = -1; + int notInterrupted = 0; + int interrupted = 1; + AtomicInteger observedInterrupted = new AtomicInteger(unset); + CountDownLatch supplierRunning = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + + List constant = viewOp.apply(List.ofLazy(SIZE, i -> { + supplierRunning.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + observedInterrupted.set(Thread.currentThread().isInterrupted() ? interrupted : notInterrupted); + Thread.currentThread().interrupt(); // restore if await cleared it + } + return i; + })); + + AtomicInteger interruptedAfterGet = new AtomicInteger(unset); + + Thread t = Thread.ofPlatform().start(() -> { + assertEquals(index, constant.get(index)); + interruptedAfterGet.set(Thread.currentThread().isInterrupted() ? interrupted : notInterrupted); + }); + + assertTrue(supplierRunning.await(TIME_OUT_S, TimeUnit.SECONDS)); + Thread.sleep(OVERLAP_TIME_MS); + t.interrupt(); + release.countDown(); + t.join(); + + assertEquals(notInterrupted, observedInterrupted.get()); // Observed before restoration of the status + assertEquals(interrupted, interruptedAfterGet.get(), "get() cleared interrupt status"); + } + + @ParameterizedTest + @MethodSource("iteratorOperations") + void iterators(ListFunction viewOp) throws Exception { + List lazy = newLazyList(); + Iterator iter = (Iterator) viewOp.apply(lazy); + List actual = new ArrayList<>(); + iter.forEachRemaining(actual::add); + assertEquals(newRegularList(), actual); } // Immutability @@ -365,16 +543,16 @@ final class LazyListTest { // We need identity to capture all combinations new UnaryOperation("identity", l -> l), new UnaryOperation("reversed", List::reversed), - new UnaryOperation("subList", l -> l.subList(0, l.size())) + new UnaryOperation("subList", l -> l.subList(0, l.size() - 1)) ); } - static Stream childOperations() { + static Stream iteratorOperations() { return Stream.of( // We need identity to capture all combinations new ListFunction("iterator", List::iterator), new ListFunction("listIterator", List::listIterator), - new ListFunction("listIterator", List::stream) + new ListFunction("stream::iterator", l -> l.stream().iterator()) ); } @@ -382,6 +560,9 @@ final class LazyListTest { return Stream.of( new Operation("forEach", l -> l.forEach(null)), new Operation("containsAll", l -> l.containsAll(null)), + new Operation("contains", l -> l.contains(null)), + new Operation("indexOf", l -> l.indexOf(null)), + new Operation("lastIndexOf", l -> l.lastIndexOf(null)), new Operation("toArray", l -> l.toArray((Integer[]) null)), new Operation("toArray", l -> l.toArray((IntFunction) null)) ); @@ -423,6 +604,11 @@ final class LazyListTest { ); } + static Stream lazyLists() { + return IntStream.rangeClosed(0, SIZE) + .mapToObj(i -> List.ofLazy(i, IDENTITY)); + } + static List newLazyList() { return List.ofLazy(SIZE, IDENTITY); } @@ -434,4 +620,5 @@ final class LazyListTest { static List newRegularList() { return IntStream.range(0, SIZE).boxed().toList(); } + } diff --git a/test/jdk/java/lang/LazyConstant/LazyMapTest.java b/test/jdk/java/lang/LazyConstant/LazyMapTest.java index 889ec43df6a..56285fcd52c 100644 --- a/test/jdk/java/lang/LazyConstant/LazyMapTest.java +++ b/test/jdk/java/lang/LazyConstant/LazyMapTest.java @@ -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 @@ -32,21 +32,26 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; +import java.io.IOException; import java.io.Serializable; -import java.util.AbstractMap; +import java.util.*; import java.util.Arrays; import java.util.Comparator; -import java.util.EnumSet; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.Map; +import java.util.List; import java.util.Set; import java.util.TreeSet; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import java.util.function.Function; +import java.util.function.IntFunction; +import java.util.function.Supplier; import java.util.stream.Collectors; +import java.util.stream.IntStream; import java.util.stream.Stream; import static java.util.stream.Collectors.joining; @@ -90,6 +95,9 @@ final class LazyMapTest { private static final Value KEY = Value.FORTY_TWO; private static final Integer VALUE = MAPPER.apply(KEY); + private static final long TIME_OUT_S = 5; + private static final long OVERLAP_TIME_MS = 100; + @ParameterizedTest @MethodSource("allSets") void factoryInvariants(Set set) { @@ -132,19 +140,58 @@ final class LazyMapTest { assertNull(lazy.get(Value.ILLEGAL_BETWEEN)); } + @ParameterizedTest + @MethodSource("nonEmptySets") + void getOrDefault(Set set) { + LazyConstantTestUtil.CountingFunction cf = new LazyConstantTestUtil.CountingFunction<>(MAPPER); + var lazy = Map.ofLazy(set, cf); + int cnt = 1; + for (Value v : set) { + assertEquals(MAPPER.apply(v), lazy.getOrDefault(v, Integer.MIN_VALUE)); + assertEquals(cnt, cf.cnt()); + assertEquals(MAPPER.apply(v), lazy.getOrDefault(v, Integer.MIN_VALUE)); + assertEquals(cnt++, cf.cnt()); + } + assertEquals(Integer.MIN_VALUE, lazy.getOrDefault(Value.ILLEGAL_BETWEEN, Integer.MIN_VALUE)); + assertEquals(Integer.MIN_VALUE, lazy.getOrDefault("a", Integer.MIN_VALUE)); + assertThrows(NullPointerException.class, () -> lazy.getOrDefault(null, Integer.MIN_VALUE)); + } + @ParameterizedTest @MethodSource("nonEmptySets") void exception(Set set) { - LazyConstantTestUtil.CountingFunction cif = new LazyConstantTestUtil.CountingFunction<>(_ -> { - throw new UnsupportedOperationException(); - }); - var lazy = Map.ofLazy(set, cif); - assertThrows(UnsupportedOperationException.class, () -> lazy.get(KEY)); - assertEquals(1, cif.cnt()); - assertThrows(UnsupportedOperationException.class, () -> lazy.get(KEY)); - assertEquals(2, cif.cnt()); - assertThrows(UnsupportedOperationException.class, lazy::toString); - assertEquals(3, cif.cnt()); + // Test different Throwable categories + for (LazyConstantTestUtil.Thrower thrower : LazyConstantTestUtil.throwers()) { + AtomicReference exceptionThrown = new AtomicReference<>(); + LazyConstantTestUtil.CountingFunction cif = new LazyConstantTestUtil.CountingFunction<>(_ -> { + Throwable t = thrower.supplier().get(); + exceptionThrown.set(t); + LazyConstantTestUtil.sneakyThrow(t); + return 42; // Unreachable + }); + var lazy = Map.ofLazy(set, cif); + var x = assertThrows(NoSuchElementException.class, () -> lazy.get(KEY)); + assertEquals(LazyConstantTestUtil.expectedMessage(exceptionThrown.get().getClass(), KEY), x.getMessage()); + assertEquals(exceptionThrown.get().getClass(), x.getCause().getClass()); + assertEquals(thrower.message(), x.getCause().getMessage()); + assertEquals(1, cif.cnt()); + + var x2 = assertThrows(NoSuchElementException.class, () -> lazy.get(KEY)); + assertEquals(1, cif.cnt()); + assertEquals(LazyConstantTestUtil.expectedMessage(exceptionThrown.get().getClass(), KEY), x2.getMessage()); + // The initial cause should only be present on the _first_ unchecked exception + assertNull(x2.getCause()); + + for (Value v : set) { + // Make sure all values are touched + assertThrows(Exception.class, () -> lazy.get(v)); + } + + var xToString = assertThrows(NoSuchElementException.class, lazy::toString); + var xMessage = xToString.getMessage(); + assertTrue(xMessage.startsWith(LazyConstantTestUtil.expectedMessage(exceptionThrown.get().getClass(), 0).substring(0, xMessage.indexOf("'")))); + assertEquals(set.size(), cif.cnt()); + } } @ParameterizedTest @@ -155,6 +202,8 @@ final class LazyMapTest { assertTrue(lazy.containsKey(v)); } assertFalse(lazy.containsKey(Value.ILLEGAL_BETWEEN)); + assertThrows(NullPointerException.class, () -> lazy.containsKey(null)); + assertFalse(lazy.containsKey("a")); } @ParameterizedTest @@ -240,8 +289,36 @@ final class LazyMapTest { @SuppressWarnings("unchecked") Map> lazy = Map.ofLazy(set, k -> (Map) ref.get().get(k)); ref.set(lazy); - var x = assertThrows(IllegalStateException.class, () -> lazy.get(KEY)); - assertEquals("Recursive initialization of a lazy collection is illegal", x.getMessage()); + var x = assertThrows(NoSuchElementException.class, () -> lazy.get(KEY)); + assertEquals(LazyConstantTestUtil.expectedMessage(IllegalStateException.class, KEY), x.getMessage()); + assertEquals("Recursive initialization of a lazy collection is illegal: " + KEY, x.getCause().getMessage()); + assertEquals(IllegalStateException.class, x.getCause().getClass()); + } + + @Test + void recursiveCallWithKeysToStringThrowing() { + AtomicInteger cnt = new AtomicInteger(); + + final class NaughtyKey { + + @Override + public String toString() { + cnt.incrementAndGet(); + throw new UnsupportedOperationException("I should never be seen"); + } + } + + final NaughtyKey key = new NaughtyKey(); + final Set set = Set.of(key); + + final AtomicReference> ref = new AtomicReference<>(); + @SuppressWarnings("unchecked") + Map> lazy = Map.ofLazy(set, k -> (Map) ref.get().get(k)); + ref.set(lazy); + var x = assertThrows(NoSuchElementException.class, () -> lazy.get(key)); + // We recurse here so `NaughtyKey.toString` is called twice before reentry is prevented + assertEquals(2, cnt.get()); + assertTrue(x.getCause().getMessage().contains(NaughtyKey.class.getName())); } @ParameterizedTest @@ -252,6 +329,31 @@ final class LazyMapTest { assertTrue(regular.equals(lazy)); assertTrue(lazy.equals(regular)); assertTrue(regular.equals(lazy)); + assertEquals(lazy.hashCode(), regular.hashCode()); + } + + @ParameterizedTest + @MethodSource("allSets") + void entrySetHashCode(Set set) { + assertEquals(newRegularMap(set).entrySet().hashCode(), + newLazyMap(set).entrySet().hashCode()); + } + + @ParameterizedTest + @MethodSource("nonEmptySets") + void keySet(Set set) { + var lazy = newLazyMap(set); + var keySet = lazy.keySet(); + assertEquals(set, keySet); + assertThrows(UnsupportedOperationException.class, () -> lazy.remove(KEY)); + } + + @ParameterizedTest + @MethodSource("nonEmptySets") + void entrySetValue(Set set) { + var entry = newLazyMap(set).entrySet().iterator().next(); + assertThrows(UnsupportedOperationException.class, () -> entry.setValue(null)); + assertThrows(UnsupportedOperationException.class, () -> entry.setValue(1)); } @ParameterizedTest @@ -267,6 +369,15 @@ final class LazyMapTest { assertTrue(toString.endsWith("]")); } + @ParameterizedTest + @MethodSource("emptySets") + void emptyValues(Set set) { + var lazy = newLazyMap(set); + var lazyValues = lazy.values(); + assertEquals(0, lazyValues.size()); + assertTrue(lazyValues.isEmpty()); + } + @ParameterizedTest @MethodSource("nonEmptySets") void values(Set set) { @@ -276,6 +387,10 @@ final class LazyMapTest { var val = lazyValues.stream().iterator().next(); assertEquals(lazy.size() - 1, functionCounter(lazy)); + assertEquals(set.size(), lazyValues.size()); + assertFalse(lazyValues.isEmpty()); + assertTrue(lazyValues.contains(VALUE)); + // Mod ops assertThrows(UnsupportedOperationException.class, () -> lazyValues.remove(val)); assertThrows(UnsupportedOperationException.class, () -> lazyValues.add(val)); @@ -395,7 +510,9 @@ final class LazyMapTest { @Test void nullResult() { var lazy = Map.ofLazy(Set.of(0), _ -> null); - assertThrows(NullPointerException.class, () -> lazy.getOrDefault(0, 1));; + var x = assertThrows(NoSuchElementException.class, () -> lazy.getOrDefault(0, 1)); + assertEquals(LazyConstantTestUtil.expectedMessage(NullPointerException.class, 0), x.getMessage()); + assertEquals(NullPointerException.class, x.getCause().getClass()); assertTrue(lazy.containsKey(0)); } @@ -439,6 +556,129 @@ final class LazyMapTest { assertNull(LazyConstantTestUtil.functionHolderFunction(holder)); } + @ParameterizedTest + @MethodSource("nonEmptySets") + void atMostOnceComputationUnderContention(Set set) throws Exception { + // Mitigate thread starvation via a dedicated thread pool != FJP + try (var testExecutor = Executors.newFixedThreadPool(3)) { + AtomicInteger calls = new AtomicInteger(); + CountDownLatch entered = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + CountDownLatch competing = new CountDownLatch(2); + + Map constant = Map.ofLazy(set, i -> { + calls.incrementAndGet(); + entered.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + throw new AssertionError(e); + } + return MAPPER.apply(i); + }); + + var f1 = CompletableFuture.supplyAsync(() -> constant.get(KEY), testExecutor); + assertTrue(entered.await(5, TimeUnit.SECONDS)); + + var f2 = CompletableFuture.supplyAsync(() -> { + competing.countDown(); + return constant.get(KEY); + }, testExecutor); + var f3 = CompletableFuture.supplyAsync(() -> { + competing.countDown(); + return constant.get(KEY); + }, testExecutor); + + assertTrue(competing.await(TIME_OUT_S, TimeUnit.SECONDS)); + // While computation is blocked, only one thread should have entered supplier + Thread.sleep(OVERLAP_TIME_MS); + assertEquals(1, calls.get()); + + release.countDown(); + + assertEquals(VALUE, f1.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(VALUE, f2.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(VALUE, f3.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(1, calls.get()); + } + } + + @ParameterizedTest + @MethodSource("nonEmptySets") + void competingThreadsBlockUntilInitializationCompletes(Set set) throws Exception { + // Mitigate thread starvation via a dedicated thread pool != FJP + try (var testExecutor = Executors.newFixedThreadPool(2)) { + CountDownLatch entered = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + CountDownLatch waiting = new CountDownLatch(1); + + Map constant = Map.ofLazy(set, i -> { + entered.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + throw new AssertionError(e); + } + return MAPPER.apply(i); + }); + + var computingThread = CompletableFuture.supplyAsync(() -> constant.get(KEY), testExecutor); + assertTrue(entered.await(TIME_OUT_S, TimeUnit.SECONDS)); + + var waitingThread = CompletableFuture.supplyAsync(() -> { + waiting.countDown(); + return constant.get(KEY); + }, testExecutor); + + assertTrue(waiting.await(TIME_OUT_S, TimeUnit.SECONDS)); + Thread.sleep(OVERLAP_TIME_MS); + assertFalse(waitingThread.isDone(), "contending thread should be be blocked"); + + release.countDown(); + + assertEquals(VALUE, computingThread.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(VALUE, waitingThread.get(TIME_OUT_S, TimeUnit.SECONDS)); + } + } + + @ParameterizedTest + @MethodSource("nonEmptySets") + void interruptStatusIsPreservedForComputingThread(Set set) throws Exception { + int unset = -1; + int notInterrupted = 0; + int interrupted = 1; + AtomicInteger observedInterrupted = new AtomicInteger(unset); + CountDownLatch supplierRunning = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + + Map constant = Map.ofLazy(set, i -> { + supplierRunning.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + observedInterrupted.set(Thread.currentThread().isInterrupted() ? interrupted : notInterrupted); + Thread.currentThread().interrupt(); // restore if await cleared it + } + return MAPPER.apply(i); + }); + + AtomicInteger interruptedAfterGet = new AtomicInteger(unset); + + Thread t = Thread.ofPlatform().start(() -> { + assertEquals(VALUE, constant.get(KEY)); + interruptedAfterGet.set(Thread.currentThread().isInterrupted() ? interrupted : notInterrupted); + }); + + assertTrue(supplierRunning.await(TIME_OUT_S, TimeUnit.SECONDS)); + Thread.sleep(OVERLAP_TIME_MS); + t.interrupt(); + release.countDown(); + t.join(); + + assertEquals(notInterrupted, observedInterrupted.get()); // Observed before restoration of the status + assertEquals(interrupted, interruptedAfterGet.get(), "get() cleared interrupt status"); + } + @ParameterizedTest @MethodSource("allSets") void underlyingRefViaEntrySetForEach(Set set) { @@ -461,6 +701,7 @@ final class LazyMapTest { @Test void usesOptimizedVersion() { + // This test is using name magic but we are in control of the naming. Map enumMap = Map.ofLazy(EnumSet.of(KEY), Value::asInt); assertTrue(enumMap.getClass().getName().contains("Enum"), enumMap.getClass().getName()); Map emptyMap = Map.ofLazy(EnumSet.noneOf(Value.class), Value::asInt); @@ -498,7 +739,8 @@ final class LazyMapTest { static Stream nullAverseOperations() { return Stream.of( - new Operation("forEach", m -> m.forEach(null)) + new Operation("forEach", m -> m.forEach(null)), + new Operation("containsValue", m -> m.containsValue(null)) ); } @@ -571,4 +813,30 @@ final class LazyMapTest { return LazyConstantTestUtil.functionHolderCounter(holder); } + // Javadoc equivalent + class LazyMap extends AbstractMap { + + private final Map> backingMap; + + public LazyMap(Set keys, Function computingFunction) { + this.backingMap = keys.stream() + .collect(Collectors.toUnmodifiableMap( + Function.identity(), + k -> LazyConstant.of(() -> computingFunction.apply(k)))); + } + + @Override + public V get(Object key) { + var lazyConstant = backingMap.get(key); + return lazyConstant == null + ? null + : lazyConstant.get(); + } + + @Override + public Set> entrySet() { + return Set.of(); + } + } + } diff --git a/test/jdk/java/lang/LazyConstant/LazySetTest.java b/test/jdk/java/lang/LazyConstant/LazySetTest.java new file mode 100644 index 00000000000..4e168c7bcad --- /dev/null +++ b/test/jdk/java/lang/LazyConstant/LazySetTest.java @@ -0,0 +1,591 @@ +/* + * 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 + * @summary Basic tests for lazy set methods + * @enablePreview + * @modules java.base/java.util:+open + * @run junit LazySetTest + */ + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.Serializable; +import java.lang.Class; +import java.lang.Override; +import java.util.*; +import java.util.Arrays; +import java.util.Comparator; +import java.util.Set; +import java.util.TreeSet; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.*; + +final class LazySetTest { + + enum Value { + // Zero is here so that we have enums with ordinals before the first one + // actually used in input sets (i.e. ZERO is not in the input set) + ZERO(0), + ILLEGAL_BEFORE(-1), + // Valid values + THIRTEEN(13) { + @Override + public String toString() { + // getEnumConstants will be `null` for this enum as it is overridden + return super.toString()+" (Overridden)"; + } + }, + ILLEGAL_BETWEEN(-2), + FORTY_TWO(42), + // Illegal values (not in the input set) + ILLEGAL_AFTER(-3); + + final int intValue; + + Value(int intValue) { + this.intValue = intValue; + } + + int asInt() { + return intValue; + } + + } + + private static final Value MEMBER = Value.FORTY_TWO; + private static final Value NON_MEMBER = Value.THIRTEEN; + private static final Set SET = Set.of(NON_MEMBER, MEMBER); + private static final Predicate PREDICATE = c -> c == MEMBER; ; + + private static final long TIME_OUT_S = 5; + private static final long OVERLAP_TIME_MS = 100; + + @ParameterizedTest + @MethodSource("allSets") + void factoryInvariants(Set set) { + assertThrows(NullPointerException.class, () -> Set.ofLazy(set, null), set.getClass().getSimpleName()); + assertThrows(NullPointerException.class, () -> Set.ofLazy(null, PREDICATE)); + Set setWithNull = new HashSet<>(); + setWithNull.add(MEMBER); + setWithNull.add(null); + assertThrows(NullPointerException.class, () -> Set.ofLazy(setWithNull, PREDICATE)); + } + + @ParameterizedTest + @MethodSource("emptySets") + void empty(Set set) { + var lazy = newLazySet(set); + assertTrue(lazy.isEmpty()); + assertEquals("[]", lazy.toString()); + } + + @ParameterizedTest + @MethodSource("allSets") + void size(Set set) { + assertEquals(newRegularSet(set).size(), newLazySet(set).size()); + } + + @ParameterizedTest + @MethodSource("nonEmptySets") + void exception(Set set) { + LazyConstantTestUtil.CountingPredicate cif = new LazyConstantTestUtil.CountingPredicate<>(_ -> { + throw new UnsupportedOperationException("Initial exception"); + }); + var lazy = Set.ofLazy(set, cif); + var x = assertThrows(NoSuchElementException.class, () -> lazy.contains(MEMBER)); + assertEquals(LazyConstantTestUtil.expectedMessage(UnsupportedOperationException.class, MEMBER), x.getMessage()); + assertEquals(UnsupportedOperationException.class, x.getCause().getClass()); + assertEquals(1, cif.cnt()); + + var x2 = assertThrows(NoSuchElementException.class, () -> lazy.contains(MEMBER)); + assertEquals(LazyConstantTestUtil.expectedMessage(UnsupportedOperationException.class, MEMBER), x2.getMessage()); + // The initial cause should only be present on the _first_ unchecked exception + assertNull(x2.getCause()); + + for (Value v : set) { + // Make sure all values are touched + assertThrows(Exception.class, () -> lazy.contains(v)); + } + + var xToString = assertThrows(NoSuchElementException.class, lazy::toString); + var xMessage = xToString.getMessage(); + assertTrue(xMessage.startsWith(LazyConstantTestUtil.expectedMessage(UnsupportedOperationException.class, 0).substring(0, xMessage.indexOf("'")))); + assertEquals(set.size(), cif.cnt()); + } + + @ParameterizedTest + @MethodSource("allSets") + void contains(Set set) { + var lazy = newLazySet(set); + var expected = newRegularSet(set); + for (Value v : set) { + assertEquals(expected.contains(v), lazy.contains(v)); + } + assertFalse(lazy.contains(Value.ILLEGAL_BETWEEN)); + } + + @ParameterizedTest + @MethodSource("allSets") + void forEach(Set set) { + var lazy = newLazySet(set); + var expected = newRegularSet(set); + Set actual = new HashSet<>(); + lazy.forEach(actual::add); + assertEquals(expected, actual); + } + + @ParameterizedTest + @MethodSource("emptySets") + void toStringTestEmpty(Set set) { + var lazy = newLazySet(set); + assertEquals("[]", lazy.toString()); + } + + @ParameterizedTest + @MethodSource("nonEmptySets") + void toStringTest(Set set) { + var lazy = newLazySet(set); + var expected = newRegularSet(set); + var toString = lazy.toString(); + assertTrue(toString.startsWith("[")); + assertTrue(toString.endsWith("]")); + + // Key order is unspecified + for (Value key : expected) { + assertTrue(toString.contains(key.toString()), key + " is not in" + toString); + } + + // One between the values + assertEquals(expected.size() - 1, toString.chars().filter(ch -> ch == ',').count()); + } + + @ParameterizedTest + @MethodSource("allSets") + void hashCodeTest(Set set) { + var lazy = newLazySet(set); + var regular = newRegularSet(set); + assertEquals(regular.hashCode(), lazy.hashCode()); + } + + @ParameterizedTest + @MethodSource("allSets") + void zeroHashCodeTest() { + specificHashCodeTest(0); + } + + @ParameterizedTest + @MethodSource("allSets") + void negativeHashCodeTest() { + specificHashCodeTest(-1); + specificHashCodeTest(-42); + specificHashCodeTest(Integer.MIN_VALUE); + } + + @ParameterizedTest + @MethodSource("allSets") + void positiveHashCodeTest() { + specificHashCodeTest(1); + specificHashCodeTest(42); + specificHashCodeTest(Integer.MAX_VALUE); + } + + void specificHashCodeTest(int hc) { + final class ZeroHashCode { + @Override + public int hashCode() { + return hc; + } + } + + var lazy = Set.ofLazy(Set.of(new ZeroHashCode()), e -> true); + assertEquals(hc, lazy.hashCode()); + } + + @ParameterizedTest + @MethodSource("allSets") + void equality(Set set) { + var lazy = newLazySet(set); + var regular = newRegularSet(set); + assertEquals(regular, lazy); + assertEquals(lazy, regular); + assertNotEquals("A", lazy); + } + + @ParameterizedTest + @MethodSource("nonEmptySets") + void recursiveCall(Set set) { + final AtomicReference> ref = new AtomicReference<>(); + @SuppressWarnings("unchecked") + Set lazy = Set.ofLazy(set, k -> ref.get().contains(k)); + ref.set(lazy); + var x = assertThrows(NoSuchElementException.class, () -> lazy.contains(MEMBER)); + assertEquals(LazyConstantTestUtil.expectedMessage(java.lang.IllegalStateException.class, MEMBER), x.getMessage()); + assertEquals("Recursive initialization of a lazy collection is illegal: " + MEMBER, x.getCause().getMessage()); + assertEquals(IllegalStateException.class, x.getCause().getClass()); + } + + @ParameterizedTest + @MethodSource("allSets") + void iteratorNext(Set set) { + Set encountered = new HashSet<>(); + var expected = newRegularSet(set); + var iterator = newLazySet(set).iterator(); + while (iterator.hasNext()) { + var entry = iterator.next(); + encountered.add(entry); + } + assertEquals(expected, encountered); + } + + @ParameterizedTest + @MethodSource("nonEmptySets") + void iteratorForEachRemaining(Set set) { + Set encountered = new HashSet<>(); + var expected = newRegularSet(set); + var iterator = newLazySet(set).iterator(); + var value = iterator.next(); + encountered.add(value); + iterator.forEachRemaining(encountered::add); + assertEquals(expected, encountered); + } + + + @ParameterizedTest + @MethodSource("nonEmptySets") + void atMostOnceComputationUnderContention(Set set) throws Exception { + // Make sure to exercise both member and non-member statuses + for (Value candidate : set) { + // Mitigate thread starvation via a dedicated thread pool != FJP + try (var testExecutor = Executors.newFixedThreadPool(3)) { + AtomicInteger calls = new AtomicInteger(); + CountDownLatch entered = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + CountDownLatch competing = new CountDownLatch(2); + + Set constant = Set.ofLazy(set, i -> { + calls.incrementAndGet(); + entered.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + throw new AssertionError(e); + } + return PREDICATE.test(i); + }); + + var f1 = CompletableFuture.supplyAsync(() -> constant.contains(candidate), testExecutor); + assertTrue(entered.await(5, TimeUnit.SECONDS)); + + var f2 = CompletableFuture.supplyAsync(() -> { + competing.countDown(); + return constant.contains(candidate); + }, testExecutor); + var f3 = CompletableFuture.supplyAsync(() -> { + competing.countDown(); + return constant.contains(candidate); + }, testExecutor); + + assertTrue(competing.await(TIME_OUT_S, TimeUnit.SECONDS)); + // While computation is blocked, only one thread should have entered supplier + Thread.sleep(OVERLAP_TIME_MS); + assertEquals(1, calls.get()); + + release.countDown(); + + assertEquals(PREDICATE.test(candidate), f1.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(PREDICATE.test(candidate), f2.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(PREDICATE.test(candidate), f3.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(1, calls.get()); + } + } + } + + @ParameterizedTest + @MethodSource("nonEmptySets") + void competingThreadsBlockUntilInitializationCompletes(Set set) throws Exception { + // Make sure to exercise both member and non-member statuses + for (Value candidate : set) { + // Mitigate thread starvation via a dedicated thread pool != FJP + try (var testExecutor = Executors.newFixedThreadPool(2)) { + CountDownLatch entered = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + CountDownLatch waiting = new CountDownLatch(1); + + Set constant = Set.ofLazy(set, i -> { + entered.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + throw new AssertionError(e); + } + return PREDICATE.test(i); + }); + + var computingThread = CompletableFuture.supplyAsync(() -> constant.contains(candidate), testExecutor); + assertTrue(entered.await(TIME_OUT_S, TimeUnit.SECONDS)); + + var waitingThread = CompletableFuture.supplyAsync(() -> { + waiting.countDown(); + return constant.contains(candidate); + }, testExecutor); + + assertTrue(waiting.await(TIME_OUT_S, TimeUnit.SECONDS)); + Thread.sleep(OVERLAP_TIME_MS); + assertFalse(waitingThread.isDone(), "contending thread should be be blocked"); + + release.countDown(); + + assertEquals(PREDICATE.test(candidate), computingThread.get(TIME_OUT_S, TimeUnit.SECONDS)); + assertEquals(PREDICATE.test(candidate), waitingThread.get(TIME_OUT_S, TimeUnit.SECONDS)); + } + } + } + + @ParameterizedTest + @MethodSource("nonEmptySets") + void interruptStatusIsPreservedForComputingThread(Set set) throws Exception { + // Make sure to exercise both member and non-member statuses + for (Value candidate : set) { + int unset = -1; + int notInterrupted = 0; + int interrupted = 1; + AtomicInteger observedInterrupted = new AtomicInteger(unset); + CountDownLatch supplierRunning = new CountDownLatch(1); + CountDownLatch release = new CountDownLatch(1); + + Set constant = Set.ofLazy(set, i -> { + supplierRunning.countDown(); + try { + assertTrue(release.await(TIME_OUT_S, TimeUnit.SECONDS)); + } catch (InterruptedException e) { + observedInterrupted.set(Thread.currentThread().isInterrupted() ? interrupted : notInterrupted); + Thread.currentThread().interrupt(); // restore if await cleared it + } + return PREDICATE.test(i); + }); + + AtomicInteger interruptedAfterGet = new AtomicInteger(unset); + + Thread t = Thread.ofPlatform().start(() -> { + assertEquals(PREDICATE.test(candidate), constant.contains(candidate)); + interruptedAfterGet.set(Thread.currentThread().isInterrupted() ? interrupted : notInterrupted); + }); + + assertTrue(supplierRunning.await(TIME_OUT_S, TimeUnit.SECONDS)); + Thread.sleep(OVERLAP_TIME_MS); + t.interrupt(); + release.countDown(); + t.join(); + + assertEquals(notInterrupted, observedInterrupted.get()); // Observed before restoration of the status + assertEquals(interrupted, interruptedAfterGet.get(), "get() cleared interrupt status"); + } + } + + // Immutability + @ParameterizedTest + @MethodSource("unsupportedOperations") + void unsupported(Operation operation) { + assertThrowsForOperation(UnsupportedOperationException.class, operation); + } + + // Method parameter invariant checking + + @ParameterizedTest + @MethodSource("nullAverseOperations") + void nullAverse(Operation operation) { + assertThrowsForOperation(NullPointerException.class, operation); + } + + static void assertThrowsForOperation(Class expectedType, Operation operation) { + for (Set set : allSets().toList()) { + var lazy = newLazySet(set); + assertThrows(expectedType, () -> operation.accept(lazy), set.getClass().getSimpleName() + " " + operation); + } + } + + // Implementing interfaces + + @ParameterizedTest + @MethodSource("allSets") + void serializable(Set set) { + var lazy = newLazySet(set); + assertFalse(lazy instanceof Serializable); + } + + @Test + void overriddenEnum() { + final var overridden = Value.THIRTEEN; + Set enumMap = Set.ofLazy(EnumSet.of(overridden), PREDICATE); + assertEquals(PREDICATE.test(overridden), enumMap.contains(overridden), enumMap.toString()); + } + + // Support constructs + + record Operation(String name, + Consumer> consumer) implements Consumer> { + @Override + public void accept(Set set) { consumer.accept(set); } + @Override + public String toString() { return name; } + } + + static Stream nullAverseOperations() { + return Stream.of( + new Operation("forEach", m -> m.forEach(null)), + new Operation("containsAll", m -> m.containsAll(null)), + new Operation("contains", m -> m.contains(null)) + ); + } + + static Stream unsupportedOperations() { + return Stream.of( + new Operation("clear", Set::clear), + new Operation("add", m -> m.add(MEMBER)), + new Operation("addAll", m -> m.addAll(Set.of(MEMBER))), + new Operation("remove", m -> m.remove(MEMBER)), + new Operation("removeAll",m -> m.removeAll(Set.of(MEMBER))), + new Operation("retainAll",m -> m.retainAll(Set.of(MEMBER))), + new Operation("iter.rm", m -> m.iterator().remove()) + ); + } + + static Set newLazySet(Set set) { + return Set.ofLazy(set, PREDICATE); + } + + static Set newRegularSet(Set set) { + return set.stream() + .filter(PREDICATE) + .collect(Collectors.toSet()); + } + + private static Stream> nonEmptySets() { + return Stream.of( + Set.of(MEMBER, NON_MEMBER), + linkedHashSet(NON_MEMBER, MEMBER), + treeSet(MEMBER, NON_MEMBER), + EnumSet.of(MEMBER, NON_MEMBER) + ); + } + + private static Stream> emptySets() { + return Stream.of( + Set.of(), + linkedHashSet(), + treeSet(), + EnumSet.noneOf(Value.class) + ); + } + + private static Stream> allSets() { + return Stream.concat( + nonEmptySets(), + emptySets() + ); + } + + static Set treeSet(Value... values) { + return populate(new TreeSet<>(Comparator.comparingInt(Value::asInt).reversed()),values); + } + + static Set linkedHashSet(Value... values) { + return populate(new LinkedHashSet<>(), values); + } + + static Set populate(Set set, Value... values) { + set.addAll(Arrays.asList(values)); + return set; + } + + // JEP Example + class Application { + + enum Option { VERBOSE, DRY_RUN, STRICT } + + // Return true when the given Option is enabled + private static boolean isEnabled(Option option) { + // Parse command line, read configuration file, load database + return true; + } + + // Lazily initialized Set of Options + static final Set