From 3f2556b86079fbdba848b1ac16b62a376386999b Mon Sep 17 00:00:00 2001 From: Kevin Walls Date: Thu, 12 Dec 2024 09:16:06 +0000 Subject: [PATCH 01/93] 8345984: Remove redundant checkXXX methods from java.management Util class Reviewed-by: alanb, mchung, cjplummer, sspitsyn --- .../share/classes/sun/management/Util.java | 12 ------------ .../GarbageCollectionNotifInfoCompositeData.java | 1 - .../com/sun/management/internal/GcInfoBuilder.java | 3 +-- .../sun/management/internal/GcInfoCompositeData.java | 1 - 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/java.management/share/classes/sun/management/Util.java b/src/java.management/share/classes/sun/management/Util.java index cad5a2e3892..6ae270b0569 100644 --- a/src/java.management/share/classes/sun/management/Util.java +++ b/src/java.management/share/classes/sun/management/Util.java @@ -49,16 +49,4 @@ public static ObjectName newObjectName(String name) { throw new IllegalArgumentException(e); } } - - // Methods retained temporarily due to usage by jdk.management. - static void checkAccess(ManagementPermission p) { - // no-op - } - - static void checkMonitorAccess() throws SecurityException { - // no-op - } - public static void checkControlAccess() throws SecurityException { - // no-op - } } diff --git a/src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java b/src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java index ebbda8db70c..1fcbb2ba6a6 100644 --- a/src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java +++ b/src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectionNotifInfoCompositeData.java @@ -37,7 +37,6 @@ import java.util.HashMap; import sun.management.LazyCompositeData; import static sun.management.LazyCompositeData.getString; -import sun.management.Util; /** * A CompositeData for GarbageCollectionNotificationInfo for the local management support. diff --git a/src/jdk.management/share/classes/com/sun/management/internal/GcInfoBuilder.java b/src/jdk.management/share/classes/com/sun/management/internal/GcInfoBuilder.java index 0ceb1f6b6d2..e607277467b 100644 --- a/src/jdk.management/share/classes/com/sun/management/internal/GcInfoBuilder.java +++ b/src/jdk.management/share/classes/com/sun/management/internal/GcInfoBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -31,7 +31,6 @@ import javax.management.openmbean.CompositeType; import javax.management.openmbean.OpenDataException; import com.sun.management.GcInfo; -import sun.management.Util; /** * Helper class to build composite data. diff --git a/src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java b/src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java index 6b3d2cc7bb9..9ccbe513305 100644 --- a/src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java +++ b/src/jdk.management/share/classes/com/sun/management/internal/GcInfoCompositeData.java @@ -41,7 +41,6 @@ import sun.management.LazyCompositeData; import static sun.management.LazyCompositeData.getLong; import sun.management.MappedMXBeanType; -import sun.management.Util; /** * A CompositeData for GcInfo for the local management support. From 77e493226d6875bb73faaadedc4170dbb5d4fdc5 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Thu, 12 Dec 2024 09:51:56 +0000 Subject: [PATCH 02/93] 8344026: Ubsan: prevent potential integer overflow in c1_LIRGenerator_.cpp file Reviewed-by: aph, epeter, mdoerr --- .../cpu/aarch64/c1_LIRGenerator_aarch64.cpp | 16 +++-- src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp | 12 ++-- src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp | 14 ++-- src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp | 18 +++-- .../compiler/c1/StrengthReduceCheck.java | 70 +++++++++++++++++++ 5 files changed, 109 insertions(+), 21 deletions(-) create mode 100644 test/hotspot/jtreg/compiler/c1/StrengthReduceCheck.java diff --git a/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp index 4acac65ad5b..4ae2da66802 100644 --- a/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp @@ -277,18 +277,20 @@ void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr bas bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, jint c, LIR_Opr result, LIR_Opr tmp) { - - if (is_power_of_2(c - 1)) { - __ shift_left(left, exact_log2(c - 1), tmp); + juint u_value = (juint)c; + if (is_power_of_2(u_value - 1)) { + __ shift_left(left, exact_log2(u_value - 1), tmp); __ add(tmp, left, result); return true; - } else if (is_power_of_2(c + 1)) { - __ shift_left(left, exact_log2(c + 1), tmp); + } else if (is_power_of_2(u_value + 1)) { + __ shift_left(left, exact_log2(u_value + 1), tmp); __ sub(tmp, left, result); return true; - } else { - return false; + } else if (c == -1) { + __ negate(left, result); + return true; } + return false; } void LIRGenerator::store_stack_parameter (LIR_Opr item, ByteSize offset_from_sp) { diff --git a/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp index adda0c1c290..a70bf2cbda9 100644 --- a/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp +++ b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp @@ -328,16 +328,20 @@ void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr bas bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, jint c, LIR_Opr result, LIR_Opr tmp) { assert(left != result, "should be different registers"); - if (is_power_of_2(c + 1)) { - LIR_Address::Scale scale = (LIR_Address::Scale) log2i_exact(c + 1); + juint u_value = (juint)c; + if (is_power_of_2(u_value + 1)) { + LIR_Address::Scale scale = (LIR_Address::Scale) log2i_exact(u_value + 1); LIR_Address* addr = new LIR_Address(left, left, scale, 0, T_INT); __ sub(LIR_OprFact::address(addr), left, result); // rsb with shifted register return true; - } else if (is_power_of_2(c - 1)) { - LIR_Address::Scale scale = (LIR_Address::Scale) log2i_exact(c - 1); + } else if (is_power_of_2(u_value - 1)) { + LIR_Address::Scale scale = (LIR_Address::Scale) log2i_exact(u_value - 1); LIR_Address* addr = new LIR_Address(left, left, scale, 0, T_INT); __ add(left, LIR_OprFact::address(addr), result); // add with shifted register return true; + } else if (c == -1) { + __ negate(left, result); + return true; } return false; } diff --git a/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp index 4e0908d6e61..b332ffbcee7 100644 --- a/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp +++ b/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp @@ -296,14 +296,20 @@ void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr bas bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, jint c, LIR_Opr result, LIR_Opr tmp) { assert(left != result, "should be different registers"); - if (is_power_of_2(c + 1)) { - __ shift_left(left, log2i_exact(c + 1), result); + // Using unsigned arithmetics to avoid undefined behavior due to integer overflow. + // The involved operations are not sensitive to signedness. + juint u_value = (juint)c; + if (is_power_of_2(u_value + 1)) { + __ shift_left(left, log2i_exact(u_value + 1), result); __ sub(result, left, result); return true; - } else if (is_power_of_2(c - 1)) { - __ shift_left(left, log2i_exact(c - 1), result); + } else if (is_power_of_2(u_value - 1)) { + __ shift_left(left, log2i_exact(u_value - 1), result); __ add(result, left, result); return true; + } else if (c == -1) { + __ negate(left, result); + return true; } return false; } diff --git a/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp b/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp index f998e86256f..c12f883ab58 100644 --- a/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp +++ b/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp @@ -227,19 +227,25 @@ void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr bas } bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, jint c, LIR_Opr result, LIR_Opr tmp) { + juint u_value = (juint)c; if (tmp->is_valid()) { - if (is_power_of_2(c + 1)) { + if (is_power_of_2(u_value + 1)) { __ move(left, tmp); - __ shift_left(left, log2i_exact(c + 1), left); + __ shift_left(left, log2i_exact(u_value + 1), left); __ sub(left, tmp, result); return true; - } else if (is_power_of_2(c - 1)) { + } else if (is_power_of_2(u_value - 1)) { __ move(left, tmp); - __ shift_left(left, log2i_exact(c - 1), left); + __ shift_left(left, log2i_exact(u_value - 1), left); __ add(left, tmp, result); return true; } } + + if (c == -1) { + __ negate(left, result); + return true; + } return false; } @@ -496,8 +502,8 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) { if (x->op() == Bytecodes::_imul) { bool use_tmp = false; if (right_arg->is_constant()) { - int iconst = right_arg->get_jint_constant(); - if (is_power_of_2(iconst - 1) || is_power_of_2(iconst + 1)) { + juint u_const = (juint)right_arg->get_jint_constant(); + if (is_power_of_2(u_const - 1) || is_power_of_2(u_const + 1)) { use_tmp = true; } } diff --git a/test/hotspot/jtreg/compiler/c1/StrengthReduceCheck.java b/test/hotspot/jtreg/compiler/c1/StrengthReduceCheck.java new file mode 100644 index 00000000000..4763f8e89c6 --- /dev/null +++ b/test/hotspot/jtreg/compiler/c1/StrengthReduceCheck.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2024 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 + * @author Amit Kumar + * @bug 8344026 + * @library /test/lib + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -Xcomp -Xbatch -XX:TieredStopAtLevel=1 compiler.c1.StrengthReduceCheck + */ + +package compiler.c1; + +import jdk.test.lib.Asserts; + +public class StrengthReduceCheck { + + static int test1(int x) { + // Multiply by 2 ^ 30 - 1 + x = x * 1073741823; + return x; + } + + static int test2(int x) { + // Multiply by 2 ^ 30 + 1 + x = x * 1073741825; + return x; + } + + static int test3(int x) { + // Multiply by INT_MIN + x = x * -2147483648; + return x; + } + + static int test4(int x) { + x = x * -1; + return x; + } + + public static void main(String[] args) { + for (int i =0; i < 1000; ++i) { + Asserts.assertEQ(test1(26071999), -1099813823); + Asserts.assertEQ(test2(26071999), -1047669825); + Asserts.assertEQ(test3(26071999), -2147483648); + Asserts.assertEQ(test4(26071999), -26071999); + } + } +} + From 68aa4d44ff95493d66a740be99e6cf533bec5bc8 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Thu, 12 Dec 2024 10:04:09 +0000 Subject: [PATCH 03/93] 8346063: java/lang/Thread/virtual/Starvation.java missing @requires vm.continuations Reviewed-by: alanb, vklang --- test/jdk/java/lang/Thread/virtual/Starvation.java | 1 + 1 file changed, 1 insertion(+) diff --git a/test/jdk/java/lang/Thread/virtual/Starvation.java b/test/jdk/java/lang/Thread/virtual/Starvation.java index c767cffbdf5..0661d6e608e 100644 --- a/test/jdk/java/lang/Thread/virtual/Starvation.java +++ b/test/jdk/java/lang/Thread/virtual/Starvation.java @@ -22,6 +22,7 @@ */ /* @test + * @requires vm.continuations * @library /test/lib * @bug 8345294 * @run main/othervm --enable-native-access=ALL-UNNAMED Starvation 100000 From 0ad64234e2fd19ec0435fb00340120153b928f9c Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Thu, 12 Dec 2024 10:49:35 +0000 Subject: [PATCH 04/93] 8345944: JEP 492: extending local class in a different static context should not be allowed 8345953: JEP 492: instantiating local classes in a different static context should not be allowed Reviewed-by: vromero --- .../com/sun/tools/javac/comp/Attr.java | 15 +- .../com/sun/tools/javac/comp/Resolve.java | 6 +- .../javac/LocalFreeVarStaticInstantiate.java | 59 ++++++- .../javac/LocalFreeVarStaticInstantiate.out | 8 +- .../tools/javac/LocalFreeVarStaticSuper.java | 161 ++++++++++++++++++ .../tools/javac/LocalFreeVarStaticSuper.out | 31 ++++ 6 files changed, 271 insertions(+), 9 deletions(-) create mode 100644 test/langtools/tools/javac/LocalFreeVarStaticSuper.java create mode 100644 test/langtools/tools/javac/LocalFreeVarStaticSuper.out 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 62f7c15a95f..2c3a79650b4 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 @@ -2587,10 +2587,6 @@ public void visitApply(JCMethodInvocation tree) { chk.checkRefType(qualifier.pos(), attribExpr(qualifier, localEnv, encl)); - } else if (methName == names._super) { - // qualifier omitted; check for existence - // of an appropriate implicit qualifier. - checkNewInnerClass(tree.meth.pos(), localEnv, site, true); } } else if (tree.meth.hasTag(SELECT)) { log.error(tree.meth.pos(), @@ -2598,6 +2594,15 @@ public void visitApply(JCMethodInvocation tree) { attribExpr(((JCFieldAccess) tree.meth).selected, localEnv, site); } + if (tree.meth.hasTag(IDENT)) { + // non-qualified super(...) call; check whether explicit constructor + // invocation is well-formed. If the super class is an inner class, + // make sure that an appropriate implicit qualifier exists. If the super + // class is a local class, make sure that the current class is defined + // in the same context as the local class. + checkNewInnerClass(tree.meth.pos(), localEnv, site, true); + } + // if we're calling a java.lang.Enum constructor, // prefix the implicit String and int parameters if (site.tsym == syms.enumSym) @@ -3065,7 +3070,7 @@ public void report(DiagnosticPosition _unused, JCDiagnostic details) { } void checkNewInnerClass(DiagnosticPosition pos, Env env, Type type, boolean isSuper) { - boolean isLocal = type.tsym.owner.kind == MTH; + boolean isLocal = type.tsym.owner.kind == VAR || type.tsym.owner.kind == MTH; if ((type.tsym.flags() & (INTERFACE | ENUM | RECORD)) != 0 || (!isLocal && !type.tsym.isInner()) || (isSuper && env.enclClass.sym.isAnonymous())) { 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 43a0c61a069..855b8a4b234 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 @@ -3834,7 +3834,7 @@ Symbol findSelfContaining(DiagnosticPosition pos, */ Symbol findLocalClassOwner(Env env, TypeSymbol c) { Symbol owner = c.owner; - Assert.check(owner.kind == MTH); + Assert.check(owner.kind == MTH || owner.kind == VAR); Env env1 = env; boolean staticOnly = false; while (env1.outer != null) { @@ -3846,7 +3846,9 @@ Symbol findLocalClassOwner(Env env, TypeSymbol c) { if (isStatic(env1)) staticOnly = true; env1 = env1.outer; } - return methodNotFound; + return owner.kind == MTH ? + methodNotFound : + varNotFound; } /** diff --git a/test/langtools/tools/javac/LocalFreeVarStaticInstantiate.java b/test/langtools/tools/javac/LocalFreeVarStaticInstantiate.java index 39b419c694a..09d33573da5 100644 --- a/test/langtools/tools/javac/LocalFreeVarStaticInstantiate.java +++ b/test/langtools/tools/javac/LocalFreeVarStaticInstantiate.java @@ -1,6 +1,6 @@ /* * @test /nodynamiccopyright/ - * @bug 8322882 + * @bug 8322882 8345953 * @summary Disallow attempts to access a free variable proxy field from a static method * @compile/fail/ref=LocalFreeVarStaticInstantiate.out -XDrawDiagnostics LocalFreeVarStaticInstantiate.java */ @@ -41,4 +41,61 @@ class Local { }; } }; + + // local class in switch + static Object bar = switch (foo) { + case Runnable r -> { + Object there = ""; + class Local { + { + there.hashCode(); + } + + static { + new Local(); // can't get there from here + } + + static Runnable r = () -> { + new Local(); // can't get there from here + }; + } + yield r; + } + }; + + // local class in instance init + { + Object there = ""; + class Local { + { + there.hashCode(); + } + + static { + new Local(); // can't get there from here + } + + static Runnable r = () -> { + new Local(); // can't get there from here + }; + } + } + + // local class in static init + static { + Object there = ""; + class Local { + { + there.hashCode(); + } + + static { + new Local(); // can't get there from here + } + + static Runnable r = () -> { + new Local(); // can't get there from here + }; + } + } } diff --git a/test/langtools/tools/javac/LocalFreeVarStaticInstantiate.out b/test/langtools/tools/javac/LocalFreeVarStaticInstantiate.out index 50e913083b0..9c26cf4a527 100644 --- a/test/langtools/tools/javac/LocalFreeVarStaticInstantiate.out +++ b/test/langtools/tools/javac/LocalFreeVarStaticInstantiate.out @@ -2,4 +2,10 @@ LocalFreeVarStaticInstantiate.java:18:17: compiler.err.local.cant.be.inst.static LocalFreeVarStaticInstantiate.java:22:17: compiler.err.local.cant.be.inst.static: kindname.class, Local LocalFreeVarStaticInstantiate.java:36:17: compiler.err.local.cant.be.inst.static: kindname.class, Local LocalFreeVarStaticInstantiate.java:40:17: compiler.err.local.cant.be.inst.static: kindname.class, Local -4 errors +LocalFreeVarStaticInstantiate.java:55:21: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticInstantiate.java:59:21: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticInstantiate.java:75:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticInstantiate.java:79:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticInstantiate.java:93:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticInstantiate.java:97:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +10 errors diff --git a/test/langtools/tools/javac/LocalFreeVarStaticSuper.java b/test/langtools/tools/javac/LocalFreeVarStaticSuper.java new file mode 100644 index 00000000000..332eb239e35 --- /dev/null +++ b/test/langtools/tools/javac/LocalFreeVarStaticSuper.java @@ -0,0 +1,161 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8345944 + * @summary JEP 492: extending local class in a different static context should not be allowed + * @compile/fail/ref=LocalFreeVarStaticSuper.out -XDrawDiagnostics LocalFreeVarStaticSuper.java + */ + +class LocalFreeVarStaticSuper { + + // local class in method + static void foo(Object there) { + class Local { + { + there.hashCode(); + } + + static { + class Sub1 extends Local { } + class Sub2 extends Local { + Sub2() { } + } + class Sub3 extends Local { + Sub3() { super(); } + } + } + + static Runnable r = () -> { + class Sub1 extends Local { } + class Sub2 extends Local { + Sub2() { } + } + class Sub3 extends Local { + Sub3() { super(); } + } + }; + } + } + + // local class in lambda + static Runnable foo = () -> { + Object there = ""; + class Local { + { + there.hashCode(); + } + + static { + class Sub1 extends Local { } + class Sub2 extends Local { + Sub2() { } + } + class Sub3 extends Local { + Sub3() { super(); } + } + } + + static Runnable r = () -> { + class Sub1 extends Local { } + class Sub2 extends Local { + Sub2() { } + } + class Sub3 extends Local { + Sub3() { super(); } + } + }; + } + }; + + // local class in switch + static Object bar = switch (foo) { + case Runnable r -> { + Object there = ""; + class Local { + { + there.hashCode(); + } + + static { + class Sub1 extends Local { } + class Sub2 extends Local { + Sub2() { } + } + class Sub3 extends Local { + Sub3() { super(); } + } + } + + static Runnable r = () -> { + class Sub1 extends Local { } + class Sub2 extends Local { + Sub2() { } + } + class Sub3 extends Local { + Sub3() { super(); } + } + }; + } + yield r; + } + }; + + // local class in instance init + { + Object there = ""; + class Local { + { + there.hashCode(); + } + + static { + class Sub1 extends Local { } + class Sub2 extends Local { + Sub2() { } + } + class Sub3 extends Local { + Sub3() { super(); } + } + } + + static Runnable r = () -> { + class Sub1 extends Local { } + class Sub2 extends Local { + Sub2() { } + } + class Sub3 extends Local { + Sub3() { super(); } + } + }; + } + } + + // local class in static init + static { + Object there = ""; + class Local { + { + there.hashCode(); + } + + static { + class Sub1 extends Local { } + class Sub2 extends Local { + Sub2() { } + } + class Sub3 extends Local { + Sub3() { super(); } + } + } + + static Runnable r = () -> { + class Sub1 extends Local { } + class Sub2 extends Local { + Sub2() { } + } + class Sub3 extends Local { + Sub3() { super(); } + } + }; + } + } +} diff --git a/test/langtools/tools/javac/LocalFreeVarStaticSuper.out b/test/langtools/tools/javac/LocalFreeVarStaticSuper.out new file mode 100644 index 00000000000..d85451337bd --- /dev/null +++ b/test/langtools/tools/javac/LocalFreeVarStaticSuper.out @@ -0,0 +1,31 @@ +LocalFreeVarStaticSuper.java:18:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:20:28: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:23:30: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:28:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:30:28: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:33:30: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:48:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:50:28: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:53:30: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:58:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:60:28: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:63:30: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:79:21: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:81:32: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:84:34: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:89:21: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:91:32: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:94:34: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:111:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:113:28: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:116:30: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:121:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:123:28: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:126:30: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:141:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:143:28: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:146:30: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:151:17: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:153:28: compiler.err.local.cant.be.inst.static: kindname.class, Local +LocalFreeVarStaticSuper.java:156:30: compiler.err.local.cant.be.inst.static: kindname.class, Local +30 errors From 1bdb7b4271098b02ee225c101ea7a12a432d0440 Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Thu, 12 Dec 2024 11:59:45 +0000 Subject: [PATCH 05/93] 8345622: test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java should set processorpath to work correctly in the agentvm mode Reviewed-by: darcy, liach --- .../javac/annotations/parameter/ParameterAnnotations.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java b/test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java index da042001356..ce50a9ad0d3 100644 --- a/test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java +++ b/test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java @@ -640,8 +640,9 @@ private void doTest(Path base, String code, String binaryNameToCheck, } Task.Result result = new JavacTask(tb) - .processors(new TestAP()) .options("-classpath", classes.toString(), + "-processorpath", System.getProperty("test.classes"), + "-processor", TestAP.class.getName(), "-XDrawDiagnostics", "-Xlint:classfile") .outdir(classes) From f7f07b94c57d7ac5406d78be47800cf578d1c32f Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Thu, 12 Dec 2024 12:06:27 +0000 Subject: [PATCH 06/93] 8345804: Update copyright year to 2024 for langtools in files where it was missed Reviewed-by: rgiulietti, jlahoda --- .../share/classes/com/sun/source/tree/CaseTree.java | 2 +- src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java | 2 +- .../share/classes/com/sun/source/tree/TreeVisitor.java | 2 +- .../share/classes/com/sun/source/tree/YieldTree.java | 2 +- src/jdk.compiler/share/classes/com/sun/source/util/Plugin.java | 2 +- .../share/classes/com/sun/source/util/SimpleTreeVisitor.java | 2 +- .../share/classes/com/sun/source/util/TreeScanner.java | 2 +- .../share/classes/com/sun/tools/javac/api/JavacScope.java | 2 +- .../share/classes/com/sun/tools/javac/code/ClassFinder.java | 2 +- .../share/classes/com/sun/tools/javac/code/Flags.java | 2 +- .../share/classes/com/sun/tools/javac/code/Kinds.java | 2 +- .../share/classes/com/sun/tools/javac/code/Printer.java | 2 +- .../share/classes/com/sun/tools/javac/code/Symbol.java | 2 +- .../share/classes/com/sun/tools/javac/code/TypeAnnotations.java | 2 +- .../share/classes/com/sun/tools/javac/code/TypeTag.java | 2 +- .../share/classes/com/sun/tools/javac/code/Types.java | 2 +- .../share/classes/com/sun/tools/javac/comp/AttrContext.java | 2 +- .../share/classes/com/sun/tools/javac/comp/CompileStates.java | 2 +- .../share/classes/com/sun/tools/javac/comp/Enter.java | 2 +- .../share/classes/com/sun/tools/javac/comp/Infer.java | 2 +- .../classes/com/sun/tools/javac/comp/InferenceContext.java | 2 +- .../share/classes/com/sun/tools/javac/comp/Lower.java | 2 +- .../classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java | 2 +- .../share/classes/com/sun/tools/javac/comp/TreeHasher.java | 2 +- .../share/classes/com/sun/tools/javac/jvm/Code.java | 2 +- src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java | 2 +- .../share/classes/com/sun/tools/javac/jvm/PoolWriter.java | 2 +- .../share/classes/com/sun/tools/javac/jvm/StringConcat.java | 2 +- .../classes/com/sun/tools/javac/launcher/MemoryClassLoader.java | 2 +- .../share/classes/com/sun/tools/javac/main/JavaCompiler.java | 2 +- .../share/classes/com/sun/tools/javac/model/JavacTypes.java | 2 +- .../com/sun/tools/javac/util/AbstractDiagnosticFormatter.java | 2 +- .../share/classes/com/sun/tools/javac/util/JCDiagnostic.java | 2 +- .../share/classes/com/sun/tools/javac/util/Log.java | 2 +- .../com/sun/tools/javac/util/RichDiagnosticFormatter.java | 2 +- .../classes/sun/tools/serialver/resources/serialver.properties | 2 +- .../share/classes/jdk/javadoc/doclet/StandardDoclet.java | 2 +- .../doclets/formats/html/AbstractOverviewIndexWriter.java | 2 +- .../internal/doclets/formats/html/AbstractTreeWriter.java | 2 +- .../internal/doclets/formats/html/AllClassesIndexWriter.java | 2 +- .../internal/doclets/formats/html/AllPackagesIndexWriter.java | 2 +- .../internal/doclets/formats/html/HtmlConfiguration.java | 2 +- .../internal/doclets/formats/html/IndexRedirectWriter.java | 2 +- .../javadoc/internal/doclets/formats/html/MarkerComments.java | 2 +- .../internal/doclets/formats/html/ModuleIndexWriter.java | 2 +- .../internal/doclets/formats/html/NestedClassWriter.java | 2 +- .../internal/doclets/formats/html/PackageIndexWriter.java | 2 +- .../internal/doclets/formats/html/RestrictedListWriter.java | 2 +- .../internal/doclets/formats/html/SerialFieldWriter.java | 2 +- .../internal/doclets/formats/html/SerialMethodWriter.java | 2 +- .../internal/doclets/formats/html/SerializedFormWriter.java | 2 +- .../internal/doclets/formats/html/SourceToHTMLConverter.java | 2 +- .../jdk/javadoc/internal/doclets/formats/html/Table.java | 2 +- .../jdk/javadoc/internal/doclets/formats/html/TableHeader.java | 2 +- .../jdk/javadoc/internal/doclets/formats/html/TreeWriter.java | 2 +- .../javadoc/internal/doclets/formats/html/WriterFactory.java | 2 +- .../internal/doclets/formats/html/markup/HtmlDocument.java | 2 +- .../internal/doclets/formats/html/markup/package-info.java | 2 +- .../internal/doclets/formats/html/taglets/BaseTaglet.java | 2 +- .../internal/doclets/formats/html/taglets/DeprecatedTaglet.java | 2 +- .../internal/doclets/formats/html/taglets/DocRootTaglet.java | 2 +- .../internal/doclets/formats/html/taglets/IndexTaglet.java | 2 +- .../internal/doclets/formats/html/taglets/LiteralTaglet.java | 2 +- .../internal/doclets/formats/html/taglets/ReturnTaglet.java | 2 +- .../internal/doclets/formats/html/taglets/SummaryTaglet.java | 2 +- .../doclets/formats/html/taglets/SystemPropertyTaglet.java | 2 +- .../javadoc/internal/doclets/formats/html/taglets/Taglet.java | 2 +- .../internal/doclets/formats/html/taglets/ThrowsTaglet.java | 2 +- .../internal/doclets/formats/html/taglets/UserTaglet.java | 2 +- .../internal/doclets/formats/html/taglets/ValueTaglet.java | 2 +- .../jdk/javadoc/internal/doclets/toolkit/BaseOptions.java | 2 +- .../classes/jdk/javadoc/internal/doclets/toolkit/Messages.java | 2 +- .../jdk/javadoc/internal/doclets/toolkit/util/Extern.java | 2 +- .../share/classes/jdk/javadoc/internal/html/Comment.java | 2 +- .../share/classes/jdk/javadoc/internal/html/DocType.java | 2 +- .../share/classes/jdk/javadoc/internal/html/HtmlId.java | 2 +- .../share/classes/jdk/javadoc/internal/html/Script.java | 2 +- .../share/classes/jdk/javadoc/internal/package-info.java | 2 +- .../share/classes/jdk/javadoc/internal/tool/JavadocTool.java | 2 +- .../classes/jdk/javadoc/internal/tool/ToolEnvironment.java | 2 +- .../share/classes/jdk/internal/jshell/tool/IOContext.java | 2 +- .../jdk/internal/jshell/tool/resources/l10n_de.properties | 2 +- .../jdk/internal/jshell/tool/resources/l10n_ja.properties | 2 +- .../jdk/internal/jshell/tool/resources/l10n_zh_CN.properties | 2 +- .../classes/jdk/internal/shellsupport/doc/JavadocFormatter.java | 2 +- .../shellsupport/doc/resources/javadocformatter.properties | 2 +- .../share/classes/jdk/jshell/CompletenessAnalyzer.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java | 2 +- .../share/classes/jdk/jshell/ExpressionToTypeInfo.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/JShellConsole.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/KeyMap.java | 2 +- .../share/classes/jdk/jshell/MaskCommentsAndModifiers.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/SnippetMaps.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/TreeDissector.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java | 2 +- src/jdk.jshell/share/classes/jdk/jshell/Wrap.java | 2 +- .../classes/jdk/jshell/execution/ExecutionControlForwarder.java | 2 +- .../jdk/jshell/execution/JdiDefaultExecutionControl.java | 2 +- .../classes/jdk/jshell/execution/LocalExecutionControl.java | 2 +- src/jdk.jshell/share/man/jshell.md | 2 +- test/langtools/ProblemList.txt | 2 +- .../jdk/javadoc/doclet/testBreakIterator/TestBreakIterator.java | 2 +- .../javadoc/doclet/testBreakIterator/pkg/BreakIteratorTest.java | 2 +- .../jdk/javadoc/doclet/testClassTree/TestClassTree.java | 2 +- .../javadoc/doclet/testGenericTypeLink/TestGenericTypeLink.java | 2 +- .../jdk/javadoc/doclet/testHtmlDocument/TestHtmlDocument.java | 2 +- .../javadoc/doclet/testHtmlTableStyles/TestHtmlTableStyles.java | 2 +- .../jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java | 2 +- .../jdk/javadoc/doclet/testInheritance/TestInheritance.java | 2 +- .../javadoc/doclet/testMethodSignature/TestMethodSignature.java | 2 +- .../doclet/testOverriddenMethods/TestOverrideMethods.java | 2 +- .../doclet/testVoidHtmlElements/TestVoidHtmlElements.java | 2 +- .../langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java | 2 +- .../jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApi.java | 2 +- .../sampleapi/lib/sampleapi/generator/DocCommentGenerator.java | 2 +- .../tool/sampleapi/lib/sampleapi/generator/Documentifier.java | 2 +- .../tool/sampleapi/lib/sampleapi/generator/ModuleGenerator.java | 2 +- .../sampleapi/lib/sampleapi/generator/PackageGenerator.java | 2 +- .../tool/sampleapi/lib/sampleapi/util/SimpleMultiplier.java | 2 +- .../javadoc/tool/testExternRedirects/TestExternRedirects.java | 2 +- test/langtools/jdk/jshell/CompletenessTest.java | 2 +- test/langtools/jdk/jshell/ExceptionMessageTest.java | 2 +- test/langtools/jdk/jshell/ExecPtyGetFlagsToSetTest.java | 2 +- test/langtools/jdk/jshell/ReplToolTesting.java | 2 +- test/langtools/jdk/jshell/ShutdownTest.java | 2 +- test/langtools/jdk/jshell/ToolProviderTest.java | 2 +- test/langtools/jdk/jshell/ToolSimpleTest.java | 2 +- test/langtools/jdk/jshell/VariablesTest.java | 2 +- test/langtools/tools/doclint/CoverageExtras.java | 2 +- test/langtools/tools/javac/4241573/T4241573.java | 2 +- test/langtools/tools/javac/6341866/T6341866.java | 2 +- test/langtools/tools/javac/6402516/TestClass.java | 2 +- test/langtools/tools/javac/6402516/TestLocalElements.java | 2 +- test/langtools/tools/javac/6402516/TestMethod.java | 2 +- test/langtools/tools/javac/7003595/T7003595.java | 2 +- .../tools/javac/7153958/CPoolRefClassContainingInlinedCts.java | 2 +- .../tools/javac/8000518/DuplicateConstantPoolEntry.java | 2 +- .../javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java | 2 +- .../tools/javac/8009170/RedundantByteCodeInArrayTest.java | 2 +- .../tools/javac/AnonymousClass/AnonymousClassFlags.java | 2 +- test/langtools/tools/javac/MethodParameters/AnnotationTest.java | 2 +- test/langtools/tools/javac/MethodParameters/AnonymousClass.java | 2 +- .../tools/javac/MethodParameters/ClassFileVisitor.java | 2 +- test/langtools/tools/javac/MethodParameters/Constructors.java | 2 +- test/langtools/tools/javac/MethodParameters/EnumTest.java | 2 +- .../langtools/tools/javac/MethodParameters/InstanceMethods.java | 2 +- test/langtools/tools/javac/MethodParameters/LambdaTest.java | 2 +- test/langtools/tools/javac/MethodParameters/LocalClassTest.java | 2 +- .../langtools/tools/javac/MethodParameters/MemberClassTest.java | 2 +- test/langtools/tools/javac/MethodParameters/StaticMethods.java | 2 +- .../tools/javac/MethodParameters/UncommonParamNames.java | 2 +- test/langtools/tools/javac/NoStringToLower.java | 2 +- .../tools/javac/RequiredParameterFlags/ImplicitParameters.java | 2 +- test/langtools/tools/javac/StringConcat/access/Test.java | 2 +- test/langtools/tools/javac/SuperInit/SuperInitGood.java | 2 +- .../T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java | 2 +- .../tools/javac/T6970173/DebugPointerAtBadPositionTest.java | 2 +- .../javac/T7008643/InlinedFinallyConfuseDebuggersTest.java | 2 +- test/langtools/tools/javac/T7053059/DoubleCastTest.java | 2 +- test/langtools/tools/javac/T7093325.java | 2 +- .../T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java | 2 +- .../tools/javac/T8003967/DetectMutableStaticFields.java | 2 +- .../T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java | 2 +- .../tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java | 2 +- test/langtools/tools/javac/T8019486/WrongLNTForLambdaTest.java | 2 +- .../tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java | 2 +- .../tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java | 2 +- .../tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java | 2 +- .../javac/T8180141/MissingLNTEntryForBreakContinueTest.java | 2 +- .../tools/javac/T8180660/MissingLNTEntryForFinalizerTest.java | 2 +- .../tools/javac/T8187805/BogusRTTAForUnusedVarTest.java | 2 +- .../T8203892/CheckTargetIsNotAddedAsMarkerInterfaceTest.java | 2 +- .../tools/javac/T8209173/CodeCompletionExceptTest.java | 2 +- .../javac/T8210435/NoLocalsMustBeReservedForDCEedVarsTest.java | 2 +- test/langtools/tools/javac/T8222949/TestConstantDynamic.java | 2 +- test/langtools/tools/javac/TryWithResources/TwrSimpleClose.java | 2 +- .../tools/javac/annotations/ApplicableAnnotationsOnRecords.java | 2 +- test/langtools/tools/javac/annotations/SyntheticParameters.java | 2 +- .../typeAnnotations/TypeAnnotationsPositionsOnRecords.java | 2 +- .../typeAnnotations/VariablesDeclaredWithVarTest.java | 2 +- .../typeAnnotations/classfile/ClassfileTestHelper.java | 2 +- .../typeAnnotations/classfile/CombinationsTargetTest1.java | 2 +- .../typeAnnotations/classfile/CombinationsTargetTest2.java | 2 +- .../typeAnnotations/classfile/CombinationsTargetTest3.java | 2 +- .../javac/annotations/typeAnnotations/classfile/DeadCode.java | 2 +- .../typeAnnotations/classfile/InstanceInitializer.java | 2 +- .../annotations/typeAnnotations/classfile/NewTypeArguments.java | 2 +- .../typeAnnotations/classfile/NoTargetAnnotations.java | 2 +- .../javac/annotations/typeAnnotations/classfile/Scopes.java | 2 +- .../typeAnnotations/classfile/StaticInitializer.java | 2 +- .../typeAnnotations/classfile/SyntheticParameters.java | 2 +- .../javac/annotations/typeAnnotations/classfile/T8008762.java | 2 +- .../javac/annotations/typeAnnotations/classfile/T8008769.java | 2 +- .../javac/annotations/typeAnnotations/classfile/T8010015.java | 2 +- .../typeAnnotations/classfile/TestAnonInnerClasses.java | 2 +- .../annotations/typeAnnotations/classfile/TestNewCastArray.java | 2 +- .../javac/annotations/typeAnnotations/classfile/TypeCasts.java | 2 +- .../javac/annotations/typeAnnotations/classfile/Wildcards.java | 2 +- .../typeAnnotations/referenceinfos/ClassExtends.java | 2 +- .../typeAnnotations/referenceinfos/ClassTypeParam.java | 2 +- .../referenceinfos/ConstructorInvocationTypeArgument.java | 2 +- .../typeAnnotations/referenceinfos/Constructors.java | 2 +- .../typeAnnotations/referenceinfos/ExceptionParameters.java | 2 +- .../annotations/typeAnnotations/referenceinfos/Fields.java | 2 +- .../typeAnnotations/referenceinfos/FromSpecification.java | 2 +- .../typeAnnotations/referenceinfos/Initializers.java | 2 +- .../annotations/typeAnnotations/referenceinfos/Lambda.java | 2 +- .../referenceinfos/MethodInvocationTypeArgument.java | 2 +- .../typeAnnotations/referenceinfos/MethodParameters.java | 2 +- .../typeAnnotations/referenceinfos/MethodReceivers.java | 2 +- .../typeAnnotations/referenceinfos/MethodReturns.java | 2 +- .../typeAnnotations/referenceinfos/MethodThrows.java | 2 +- .../typeAnnotations/referenceinfos/MethodTypeParam.java | 2 +- .../annotations/typeAnnotations/referenceinfos/MultiCatch.java | 2 +- .../annotations/typeAnnotations/referenceinfos/NestedTypes.java | 2 +- .../annotations/typeAnnotations/referenceinfos/NewObjects.java | 2 +- .../referenceinfos/RepeatingTypeAnnotations.java | 2 +- .../typeAnnotations/referenceinfos/ResourceVariable.java | 2 +- .../annotations/typeAnnotations/referenceinfos/TypeCasts.java | 2 +- .../annotations/typeAnnotations/referenceinfos/TypeTests.java | 2 +- test/langtools/tools/javac/api/TestGetScopeResult.java | 2 +- .../tools/javac/cast/intersection/DuplicatedCheckcastTest.java | 2 +- .../tools/javac/classfiles/InnerClasses/SyntheticClasses.java | 2 +- test/langtools/tools/javac/classfiles/T8255757/T8255757.java | 2 +- .../attributes/AnnotationDefault/AnnotationDefaultTest.java | 2 +- .../attributes/EnclosingMethod/EnclosingMethodTest.java | 2 +- .../classfiles/attributes/LineNumberTable/LineNumberTest.java | 2 +- .../attributes/LineNumberTable/LineNumberTestBase.java | 2 +- .../attributes/LineNumberTable/MultipleRecordPatterns.java | 2 +- .../classfiles/attributes/LineNumberTable/RuleSwitchBreaks.java | 2 +- .../attributes/LineNumberTable/StringSwitchBreaks.java | 2 +- .../attributes/LocalVariableTable/LocalVariableTableTest.java | 2 +- .../attributes/LocalVariableTable/LocalVariableTestBase.java | 2 +- .../LocalVariableTable/LocalVariableTypeTableTest.java | 2 +- .../javac/classfiles/attributes/Module/ModuleFlagTest.java | 2 +- .../tools/javac/classfiles/attributes/Module/ModuleTest.java | 2 +- .../javac/classfiles/attributes/Module/ModuleTestBase.java | 2 +- .../javac/classfiles/attributes/Signature/ConstructorTest.java | 2 +- .../tools/javac/classfiles/attributes/Signature/Driver.java | 2 +- .../tools/javac/classfiles/attributes/Signature/EnumTest.java | 2 +- .../javac/classfiles/attributes/Signature/ExceptionTest.java | 2 +- .../tools/javac/classfiles/attributes/Signature/FieldTest.java | 2 +- .../javac/classfiles/attributes/Signature/InnerClassTest.java | 2 +- .../classfiles/attributes/Signature/MethodParameterTest.java | 2 +- .../classfiles/attributes/Signature/MethodTypeBoundTest.java | 2 +- .../javac/classfiles/attributes/Signature/ReturnTypeTest.java | 2 +- .../classfiles/attributes/SourceFile/AnonymousClassTest.java | 2 +- .../javac/classfiles/attributes/SourceFile/InnerClassTest.java | 2 +- .../javac/classfiles/attributes/SourceFile/LocalClassTest.java | 2 +- .../tools/javac/classfiles/attributes/SourceFile/MixTest.java | 2 +- .../javac/classfiles/attributes/SourceFile/ModuleInfoTest.java | 2 +- .../classfiles/attributes/SourceFile/NoSourceFileAttribute.java | 2 +- .../classfiles/attributes/SourceFile/SourceFileTestBase.java | 2 +- .../attributes/SourceFile/TopLevelClassesOneFileTest.java | 2 +- .../Synthetic/AccessToPrivateInnerClassConstructorsTest.java | 2 +- .../Synthetic/AccessToPrivateInnerClassMembersTest.java | 2 +- .../attributes/Synthetic/AccessToPrivateSiblingsTest.java | 2 +- .../javac/classfiles/attributes/Synthetic/AssertFieldTest.java | 2 +- .../attributes/Synthetic/BridgeMethodForGenericMethodTest.java | 2 +- .../attributes/Synthetic/BridgeMethodsForLambdaTest.java | 2 +- .../tools/javac/classfiles/attributes/Synthetic/EnumTest.java | 2 +- .../javac/classfiles/attributes/Synthetic/PackageInfoTest.java | 2 +- .../classfiles/attributes/Synthetic/SyntheticTestDriver.java | 2 +- .../javac/classfiles/attributes/Synthetic/ThisFieldTest.java | 2 +- .../annotations/RuntimeAnnotationsForGenericMethodTest.java | 2 +- .../annotations/RuntimeAnnotationsForInnerAnnotationTest.java | 2 +- .../annotations/RuntimeAnnotationsForInnerClassTest.java | 2 +- .../annotations/RuntimeAnnotationsForInnerEnumTest.java | 2 +- .../annotations/RuntimeAnnotationsForInnerInterfaceTest.java | 2 +- .../annotations/RuntimeAnnotationsForTopLevelClassTest.java | 2 +- .../attributes/annotations/RuntimeAnnotationsTestBase.java | 2 +- .../RuntimeParameterAnnotationsForGenericMethodTest.java | 2 +- .../annotations/RuntimeParameterAnnotationsForLambdaTest.java | 2 +- .../attributes/annotations/RuntimeParameterAnnotationsTest.java | 2 +- .../annotations/RuntimeParameterAnnotationsTestBase.java | 2 +- .../innerclasses/InnerAnnotationsInInnerAnnotationTest.java | 2 +- .../innerclasses/InnerAnnotationsInInnerClassTest.java | 2 +- .../innerclasses/InnerAnnotationsInInnerEnumTest.java | 2 +- .../innerclasses/InnerAnnotationsInInnerInterfaceTest.java | 2 +- .../attributes/innerclasses/InnerClassesHierarchyTest.java | 2 +- .../innerclasses/InnerClassesInAnonymousClassTest.java | 2 +- .../innerclasses/InnerClassesInInnerAnnotationTest.java | 2 +- .../attributes/innerclasses/InnerClassesInInnerClassTest.java | 2 +- .../attributes/innerclasses/InnerClassesInInnerEnumTest.java | 2 +- .../innerclasses/InnerClassesInInnerInterfaceTest.java | 2 +- .../attributes/innerclasses/InnerClassesInLocalClassTest.java | 2 +- .../attributes/innerclasses/InnerClassesIndexTest.java | 2 +- .../classfiles/attributes/innerclasses/InnerClassesTest.java | 2 +- .../attributes/innerclasses/InnerClassesTestBase.java | 2 +- .../attributes/innerclasses/InnerEnumInInnerAnnotationTest.java | 2 +- .../attributes/innerclasses/InnerEnumInInnerEnumTest.java | 2 +- .../attributes/innerclasses/InnerEnumInInnerInterfaceTest.java | 2 +- .../attributes/innerclasses/InnerEnumsInInnerClassTest.java | 2 +- .../innerclasses/InnerInterfacesInInnerAnnotationTest.java | 2 +- .../innerclasses/InnerInterfacesInInnerClassTest.java | 2 +- .../attributes/innerclasses/InnerInterfacesInInnerEnumTest.java | 2 +- .../innerclasses/InnerInterfacesInInnerInterfaceTest.java | 2 +- .../classfiles/attributes/innerclasses/NoInnerClassesTest.java | 2 +- .../tools/javac/classwriter/IndyCorrectInvocationName.java | 2 +- test/langtools/tools/javac/code/CharImmediateValue.java | 2 +- test/langtools/tools/javac/constDebug/ConstDebugTest.java | 2 +- test/langtools/tools/javac/defaultMethods/TestDefaultBody.java | 2 +- .../tools/javac/defaultMethods/TestNoBridgeOnDefaults.java | 2 +- .../defaultMethods/super/TestDirectSuperInterfaceInvoke.java | 2 +- test/langtools/tools/javac/diags/CheckResourceKeys.java | 2 +- test/langtools/tools/javac/diags/Example.java | 2 +- .../examples/BadConstantValueType/BadConstantValueType.java | 2 +- .../tools/javac/diags/examples/CantAnnotateScoping.java | 2 +- .../tools/javac/diags/examples/CantAnnotateScoping1.java | 2 +- .../tools/javac/diags/examples/IllegalDigitInBinaryLiteral.java | 2 +- .../tools/javac/diags/examples/IllegalDigitInOctalLiteral.java | 2 +- .../tools/javac/diags/examples/InvalidBinaryNumber.java | 2 +- .../InvalidDefaultInterface/InvalidDefaultInterface.java | 2 +- .../examples/InvalidStaticInterface/InvalidStaticInterface.java | 2 +- .../javac/diags/examples/ModifierNotAllowed/module-info.java | 2 +- .../tools/javac/diags/examples/PrimitivePatternMatching.java | 2 +- .../examples/ProcUseProcOrImplicit/ProcUseProcOrImplicit.java | 2 +- .../langtools/tools/javac/diags/examples/TypeReqClassArray.java | 2 +- test/langtools/tools/javac/diags/examples/TypeReqRef.java | 2 +- .../javac/expression/_super/NonDirectSuper/NonDirectSuper.java | 2 +- test/langtools/tools/javac/file/SymLinkTest.java | 2 +- test/langtools/tools/javac/flow/LVTHarness.java | 2 +- test/langtools/tools/javac/generics/bridges/BridgeHarness.java | 2 +- .../javac/generics/parametricException/ParametricException.java | 2 +- test/langtools/tools/javac/importscope/T8193717.java | 2 +- .../tools/javac/jvm/ClassRefDupInConstantPoolTest.java | 2 +- test/langtools/tools/javac/lambda/ByteCodeTest.java | 2 +- test/langtools/tools/javac/lambda/LocalVariableTable.java | 2 +- .../langtools/tools/javac/lambda/TestBootstrapMethodsCount.java | 2 +- test/langtools/tools/javac/lambda/TestInvokeDynamic.java | 2 +- .../tools/javac/lambda/bytecode/TestLambdaBytecode.java | 2 +- .../lambda/bytecode/TestLambdaBytecodeTargetRelease14.java | 2 +- .../lambdaNaming/TestNonSerializableLambdaNameStability.java | 2 +- test/langtools/tools/javac/launcher/GetResourceTest.java | 2 +- .../tools/javac/launcher/MultiFileSourceLauncherTests.java | 2 +- test/langtools/tools/javac/launcher/ProgramDescriptorTests.java | 2 +- test/langtools/tools/javac/launcher/Run.java | 2 +- test/langtools/tools/javac/launcher/src/p/q/CLTest.java | 2 +- .../tools/javac/linenumbers/ConditionalLineNumberTest.java | 2 +- .../tools/javac/linenumbers/FinallyLineNumberTest.java | 2 +- .../langtools/tools/javac/mandatoryWarnings/unchecked/Test.java | 2 +- test/langtools/tools/javac/meth/TestCP.java | 2 +- .../tools/javac/modules/ConvenientAccessErrorsTest.java | 2 +- test/langtools/tools/javac/modules/EdgeCases.java | 2 +- test/langtools/tools/javac/modules/ModuleVersion.java | 2 +- test/langtools/tools/javac/modules/RequiresTransitiveTest.java | 2 +- test/langtools/tools/javac/multicatch/7005371/T7005371.java | 2 +- test/langtools/tools/javac/multicatch/Pos05.java | 2 +- test/langtools/tools/javac/patterns/LocalVariableTable.java | 2 +- test/langtools/tools/javac/patterns/MatchExceptionTest.java | 2 +- .../tools/javac/patterns/NestedPatternVariablesBytecode.java | 2 +- test/langtools/tools/javac/patterns/NoUnnecessaryCast.java | 2 +- .../tools/javac/patterns/PrimitiveInstanceOfComboTest.java | 2 +- .../PrimitiveInstanceOfPatternOpWithRecordPatterns.java | 2 +- .../langtools/tools/javac/patterns/PrimitivePatternsSwitch.java | 2 +- test/langtools/tools/javac/patterns/SourceLevelChecks.java | 2 +- test/langtools/tools/javac/patterns/Switches.java | 2 +- test/langtools/tools/javac/patterns/TranslationTest.java | 2 +- test/langtools/tools/javac/platform/ModuleVersionTest.java | 2 +- test/langtools/tools/javac/plugin/AutostartPlugins.java | 2 +- test/langtools/tools/javac/plugin/InternalAPI.java | 2 +- test/langtools/tools/javac/preview/PreviewAutoSuppress.java | 2 +- test/langtools/tools/javac/preview/PreviewErrors.java | 2 +- .../langtools/tools/javac/processing/model/TestSymtabItems.java | 2 +- .../tools/javac/processing/model/element/TestFileObjectOf.java | 2 +- .../javac/processing/options/TestNoteOnImplicitProcessing.java | 2 +- .../tools/javac/records/RecordsBinaryCompatibilityTests.java | 2 +- .../javac/records/recordComponent/RecordComponentTypeTest.java | 2 +- test/langtools/tools/javac/recovery/AnnotationRecovery.java | 2 +- test/langtools/tools/javac/recovery/LambdaRecovery.java | 2 +- test/langtools/tools/javac/recovery/MethodModifiers.java | 2 +- test/langtools/tools/javac/resolve/NoObjectToString.java | 2 +- test/langtools/tools/javac/sealed/BinaryCompatibilityTests.java | 2 +- .../langtools/tools/javac/sealed/CheckSubtypesOfSealedTest.java | 2 +- .../tools/javac/sealed/SealedDiffConfigurationsTest.java | 2 +- test/langtools/tools/javac/sym/ElementStructureTest.java | 2 +- test/langtools/tools/javac/tree/TreeKindTest.java | 2 +- test/langtools/tools/javac/varargs/6199075/T6199075.java | 2 +- test/langtools/tools/javac/varargs/7042566/T7042566.java | 2 +- test/langtools/tools/javap/T4459541.java | 2 +- test/langtools/tools/javap/T6716452.java | 2 +- test/langtools/tools/javap/T8032814.java | 2 +- test/langtools/tools/javap/TestClassNameWarning.java | 2 +- test/langtools/tools/javap/classfile/T6887895.java | 2 +- .../tools/javap/typeAnnotations/JSR175Annotations.java | 2 +- test/langtools/tools/javap/typeAnnotations/NewArray.java | 2 +- test/langtools/tools/javap/typeAnnotations/Presence.java | 2 +- test/langtools/tools/javap/typeAnnotations/PresenceInner.java | 2 +- test/langtools/tools/javap/typeAnnotations/TypeCasts.java | 2 +- test/langtools/tools/javap/typeAnnotations/Visibility.java | 2 +- test/langtools/tools/javap/typeAnnotations/Wildcards.java | 2 +- test/langtools/tools/jdeps/listdeps/ListModuleDeps.java | 2 +- test/langtools/tools/lib/toolbox/AbstractTask.java | 2 +- test/langtools/tools/lib/toolbox/JavacTask.java | 2 +- test/langtools/tools/lib/toolbox/ToolBox.java | 2 +- 400 files changed, 400 insertions(+), 400 deletions(-) diff --git a/src/jdk.compiler/share/classes/com/sun/source/tree/CaseTree.java b/src/jdk.compiler/share/classes/com/sun/source/tree/CaseTree.java index 62fa36fa6b7..335ede1d7f6 100644 --- a/src/jdk.compiler/share/classes/com/sun/source/tree/CaseTree.java +++ b/src/jdk.compiler/share/classes/com/sun/source/tree/CaseTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java b/src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java index 4b7df6185d6..845203c8735 100644 --- a/src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java +++ b/src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java b/src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java index b7851d8ff9a..a2a33ccf8eb 100644 --- a/src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java +++ b/src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/source/tree/YieldTree.java b/src/jdk.compiler/share/classes/com/sun/source/tree/YieldTree.java index eeda36d84ae..360debca7e4 100644 --- a/src/jdk.compiler/share/classes/com/sun/source/tree/YieldTree.java +++ b/src/jdk.compiler/share/classes/com/sun/source/tree/YieldTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/src/jdk.compiler/share/classes/com/sun/source/util/Plugin.java b/src/jdk.compiler/share/classes/com/sun/source/util/Plugin.java index aee626929f4..7fcce4285fe 100644 --- a/src/jdk.compiler/share/classes/com/sun/source/util/Plugin.java +++ b/src/jdk.compiler/share/classes/com/sun/source/util/Plugin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/source/util/SimpleTreeVisitor.java b/src/jdk.compiler/share/classes/com/sun/source/util/SimpleTreeVisitor.java index 1a123a49faa..77305d56b1e 100644 --- a/src/jdk.compiler/share/classes/com/sun/source/util/SimpleTreeVisitor.java +++ b/src/jdk.compiler/share/classes/com/sun/source/util/SimpleTreeVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java b/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java index 4327c6f5f31..29e81c206e0 100644 --- a/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java +++ b/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacScope.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacScope.java index 9b3a50a035a..18f9859e62b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacScope.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacScope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java index 972d6a1075b..6aa47ae3617 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java index a2937b73a14..b7fac8948c9 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Kinds.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Kinds.java index 2491cd31f0d..5923af86579 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Kinds.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Kinds.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. + * 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 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 f59392c658b..d9781f19c5d 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java index 99f0645cd5c..96d601cf0db 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 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 886da9fd6ba..90b9744d296 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeTag.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeTag.java index 51d3deec88b..0b97b119119 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeTag.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeTag.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java index 3545ebcc278..1bc1e078c1a 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java index f121849457c..2a7b339f258 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java index cbeedfcbade..b9cab47d8ab 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java index 1042a9747ba..a5744c65f20 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 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 d590c62f27f..137dfa7c3c5 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, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java index 35cd9a25ae4..ea7806ef032 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java index 62117583a96..d2219bb08b8 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java index c063058d11c..0876aa0d5a0 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeHasher.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeHasher.java index 1f7691c5183..6109a9fd9a8 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeHasher.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeHasher.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2018, Google LLC. All rights reserved. - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java index 703e1cb0c9c..8e8dfd00058 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java index b9bfe587c6c..b21a7f190c9 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/PoolWriter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/PoolWriter.java index bfdb9775e11..c90fbab788c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/PoolWriter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/PoolWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java index 07ee62eb75e..36376456c4b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/launcher/MemoryClassLoader.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/launcher/MemoryClassLoader.java index e87c0a4681f..f87fc88fdff 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/launcher/MemoryClassLoader.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/launcher/MemoryClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 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 274ac029b92..96cf4049533 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java index 71e39a6a408..db9d327dc07 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * 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 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 d9d55e16528..7fa2889c7d2 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java index 3f779175540..907539d540e 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 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 1491c65180c..5423d19b600 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java index 3bc5c671bfd..9809212dc28 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2021, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.compiler/share/classes/sun/tools/serialver/resources/serialver.properties b/src/jdk.compiler/share/classes/sun/tools/serialver/resources/serialver.properties index 2da648dcb25..2dfa103409e 100644 --- a/src/jdk.compiler/share/classes/sun/tools/serialver/resources/serialver.properties +++ b/src/jdk.compiler/share/classes/sun/tools/serialver/resources/serialver.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java index 69db8f0800c..8f5fec1e4b9 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractOverviewIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractOverviewIndexWriter.java index c466a2fcb5a..12e6fbab469 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractOverviewIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractOverviewIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java index 915dbd7627a..a6f3ac7dd28 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java index 68ee6d98857..ea0ea1f79fe 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java index 2c9539d3c30..b80be46aa24 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java index ca20d065a1e..2794a13f9da 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java index a7afd9db85d..2ad39dbf94c 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MarkerComments.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MarkerComments.java index 78696cc320e..fac6ed76e48 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MarkerComments.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MarkerComments.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java index 86e81b77ddd..25f6a46b1ef 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java index 12d4dcbd663..fdd250f4f01 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java index fd257fc06f4..375bfd27609 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/RestrictedListWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/RestrictedListWriter.java index ec629a227a3..8f78027bed2 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/RestrictedListWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/RestrictedListWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerialFieldWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerialFieldWriter.java index ef9810f7374..7de92d08214 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerialFieldWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerialFieldWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerialMethodWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerialMethodWriter.java index 4ce7d662abb..62758bf3f07 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerialMethodWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerialMethodWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriter.java index 09fa5ed347c..118f6efd0d6 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java index aa20fc8c9ae..68d2bc8b4d0 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Table.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Table.java index 0e09920b7b1..6ba40145e8f 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Table.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Table.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableHeader.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableHeader.java index e1c42062c21..52ca845d26e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableHeader.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java index 8af3b7016ce..124fbce3c7f 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/WriterFactory.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/WriterFactory.java index d656fe35293..2b2a1232137 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/WriterFactory.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/WriterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocument.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocument.java index 051cbfd0042..a7181ac7f67 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocument.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/package-info.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/package-info.java index efad5fc0fe9..aa5873098f6 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/package-info.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/BaseTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/BaseTaglet.java index 7b0a4329ee1..dd22274f313 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/BaseTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/BaseTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/DeprecatedTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/DeprecatedTaglet.java index fa30589e59d..dc7a30d8643 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/DeprecatedTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/DeprecatedTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/DocRootTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/DocRootTaglet.java index d4050f6e0ec..f2a62cb83c1 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/DocRootTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/DocRootTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/IndexTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/IndexTaglet.java index 6f5077bb32c..1ce2384067c 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/IndexTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/IndexTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LiteralTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LiteralTaglet.java index c0543026f23..42f5fe3b810 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LiteralTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LiteralTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ReturnTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ReturnTaglet.java index b9572afb9bc..38ab48bb61f 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ReturnTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ReturnTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/SummaryTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/SummaryTaglet.java index 7912abef0c6..d1f2cbdcf64 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/SummaryTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/SummaryTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/SystemPropertyTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/SystemPropertyTaglet.java index 4cab9d90ce0..cac058aabdc 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/SystemPropertyTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/SystemPropertyTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/Taglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/Taglet.java index c1c6a56e5cb..a5a565b4da9 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/Taglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/Taglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ThrowsTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ThrowsTaglet.java index ca4a8c939ab..5a92bf42a04 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ThrowsTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ThrowsTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/UserTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/UserTaglet.java index cc5ae21ba29..d1884c53ccf 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/UserTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/UserTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ValueTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ValueTaglet.java index a4fddef0f11..506bec8b517 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ValueTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ValueTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 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 a4d5f4fae0e..a1533eb115a 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java index 576bf64e751..9d77b390c3e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java index 81daa41c357..17f98cf05a8 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/Comment.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/Comment.java index 77b456cc7ff..4e57132b5f0 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/Comment.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/Comment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/DocType.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/DocType.java index 5e6bf502fe1..5444d75c20a 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/DocType.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/DocType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlId.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlId.java index a6af1438284..54ad843d03f 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlId.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlId.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/Script.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/Script.java index a5fc1521509..642d74d54e7 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/Script.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/Script.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/package-info.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/package-info.java index dffb34f1e93..160cd1f81b2 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/package-info.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java index 8390831b249..b4ee61fc36c 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolEnvironment.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolEnvironment.java index 5eed7cd9268..8c8e06fb616 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolEnvironment.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 diff --git a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/IOContext.java b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/IOContext.java index 7a1234628de..aa1f840c9c3 100644 --- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/IOContext.java +++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/IOContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_de.properties b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_de.properties index 21f30891008..a275ab8a080 100644 --- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_de.properties +++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 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 diff --git a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties index 87533d28371..ab62e05ca8b 100644 --- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties +++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 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 diff --git a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties index d9fe0e492ea..ebab8f9f08f 100644 --- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties +++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 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 diff --git a/src/jdk.jshell/share/classes/jdk/internal/shellsupport/doc/JavadocFormatter.java b/src/jdk.jshell/share/classes/jdk/internal/shellsupport/doc/JavadocFormatter.java index 07d3ccae510..932241b2d61 100644 --- a/src/jdk.jshell/share/classes/jdk/internal/shellsupport/doc/JavadocFormatter.java +++ b/src/jdk.jshell/share/classes/jdk/internal/shellsupport/doc/JavadocFormatter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/src/jdk.jshell/share/classes/jdk/internal/shellsupport/doc/resources/javadocformatter.properties b/src/jdk.jshell/share/classes/jdk/internal/shellsupport/doc/resources/javadocformatter.properties index 6d8cc024e54..f5f0eca2bac 100644 --- a/src/jdk.jshell/share/classes/jdk/internal/shellsupport/doc/resources/javadocformatter.properties +++ b/src/jdk.jshell/share/classes/jdk/internal/shellsupport/doc/resources/javadocformatter.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java b/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java index e2a5446393b..e387af1a2cf 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java index df21f178989..2af344ef57b 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java index 064bcbaf556..d5bfa386909 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java index 8bc339c6dab..2903e5656d6 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java index 188b34ab183..e3e80d3836f 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/JShellConsole.java b/src/jdk.jshell/share/classes/jdk/jshell/JShellConsole.java index 014766f9ff7..09e0c25b974 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/JShellConsole.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/JShellConsole.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/KeyMap.java b/src/jdk.jshell/share/classes/jdk/jshell/KeyMap.java index e350cf4a7d7..ae8441f9abb 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/KeyMap.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/KeyMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/MaskCommentsAndModifiers.java b/src/jdk.jshell/share/classes/jdk/jshell/MaskCommentsAndModifiers.java index 5a6c1688dc0..becdb60129a 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/MaskCommentsAndModifiers.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/MaskCommentsAndModifiers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java index 3642ed3fc06..9691eaaa9c3 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/SnippetMaps.java b/src/jdk.jshell/share/classes/jdk/jshell/SnippetMaps.java index 0bbf2a5dceb..da3170e3948 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/SnippetMaps.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/SnippetMaps.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java b/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java index 5360e0d517f..c0e01f128b7 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/TreeDissector.java b/src/jdk.jshell/share/classes/jdk/jshell/TreeDissector.java index fc259b8bc7c..ef50f8ce71c 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/TreeDissector.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/TreeDissector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java index fb6378b24f9..0889fad6c71 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java b/src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java index 76f2e929e34..9e758bb1145 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/TypePrinter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/Wrap.java b/src/jdk.jshell/share/classes/jdk/jshell/Wrap.java index 57ed543ce25..990dbd8bece 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/Wrap.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/Wrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java b/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java index 54c4131ee3b..5f9b7f0ba3d 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/ExecutionControlForwarder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java index 889b8494bab..a9136e7e876 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java b/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java index 3076c0fa76d..1f4dae2df38 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/src/jdk.jshell/share/man/jshell.md b/src/jdk.jshell/share/man/jshell.md index b9f9fe577cf..62237f1447f 100644 --- a/src/jdk.jshell/share/man/jshell.md +++ b/src/jdk.jshell/share/man/jshell.md @@ -1,5 +1,5 @@ --- -# Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +# 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 diff --git a/test/langtools/ProblemList.txt b/test/langtools/ProblemList.txt index 6ac84faaf7d..1d8df78266a 100644 --- a/test/langtools/ProblemList.txt +++ b/test/langtools/ProblemList.txt @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 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 diff --git a/test/langtools/jdk/javadoc/doclet/testBreakIterator/TestBreakIterator.java b/test/langtools/jdk/javadoc/doclet/testBreakIterator/TestBreakIterator.java index 31f1d3a66da..ec5e2c214ed 100644 --- a/test/langtools/jdk/javadoc/doclet/testBreakIterator/TestBreakIterator.java +++ b/test/langtools/jdk/javadoc/doclet/testBreakIterator/TestBreakIterator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 diff --git a/test/langtools/jdk/javadoc/doclet/testBreakIterator/pkg/BreakIteratorTest.java b/test/langtools/jdk/javadoc/doclet/testBreakIterator/pkg/BreakIteratorTest.java index 3ea965377f6..04119bbb43a 100644 --- a/test/langtools/jdk/javadoc/doclet/testBreakIterator/pkg/BreakIteratorTest.java +++ b/test/langtools/jdk/javadoc/doclet/testBreakIterator/pkg/BreakIteratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 diff --git a/test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java b/test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java index 980a8622fa4..d1379d9656a 100644 --- a/test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java +++ b/test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/jdk/javadoc/doclet/testGenericTypeLink/TestGenericTypeLink.java b/test/langtools/jdk/javadoc/doclet/testGenericTypeLink/TestGenericTypeLink.java index b7f1a95ae1e..5b77a85a460 100644 --- a/test/langtools/jdk/javadoc/doclet/testGenericTypeLink/TestGenericTypeLink.java +++ b/test/langtools/jdk/javadoc/doclet/testGenericTypeLink/TestGenericTypeLink.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 diff --git a/test/langtools/jdk/javadoc/doclet/testHtmlDocument/TestHtmlDocument.java b/test/langtools/jdk/javadoc/doclet/testHtmlDocument/TestHtmlDocument.java index 03adf00ca73..a4466c711b9 100644 --- a/test/langtools/jdk/javadoc/doclet/testHtmlDocument/TestHtmlDocument.java +++ b/test/langtools/jdk/javadoc/doclet/testHtmlDocument/TestHtmlDocument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/jdk/javadoc/doclet/testHtmlTableStyles/TestHtmlTableStyles.java b/test/langtools/jdk/javadoc/doclet/testHtmlTableStyles/TestHtmlTableStyles.java index c11e6d5f720..f2e6e75ec07 100644 --- a/test/langtools/jdk/javadoc/doclet/testHtmlTableStyles/TestHtmlTableStyles.java +++ b/test/langtools/jdk/javadoc/doclet/testHtmlTableStyles/TestHtmlTableStyles.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java b/test/langtools/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java index 0b8ff056059..349c1608af3 100644 --- a/test/langtools/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java +++ b/test/langtools/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/jdk/javadoc/doclet/testInheritance/TestInheritance.java b/test/langtools/jdk/javadoc/doclet/testInheritance/TestInheritance.java index 5ebb5157ecb..1d29290a51b 100644 --- a/test/langtools/jdk/javadoc/doclet/testInheritance/TestInheritance.java +++ b/test/langtools/jdk/javadoc/doclet/testInheritance/TestInheritance.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java b/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java index 3a0f56962de..8d81b60e294 100644 --- a/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java +++ b/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java index 75853955cd3..8b26d3800a5 100644 --- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java +++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/jdk/javadoc/doclet/testVoidHtmlElements/TestVoidHtmlElements.java b/test/langtools/jdk/javadoc/doclet/testVoidHtmlElements/TestVoidHtmlElements.java index 518ecebd704..739564fd2eb 100644 --- a/test/langtools/jdk/javadoc/doclet/testVoidHtmlElements/TestVoidHtmlElements.java +++ b/test/langtools/jdk/javadoc/doclet/testVoidHtmlElements/TestVoidHtmlElements.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java b/test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java index afcbdbe1987..23754f72f22 100644 --- a/test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java +++ b/test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 diff --git a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApi.java b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApi.java index c3ec71e3fa7..29786dab6eb 100644 --- a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApi.java +++ b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/DocCommentGenerator.java b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/DocCommentGenerator.java index 0a97c0b7524..b5a7046a658 100644 --- a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/DocCommentGenerator.java +++ b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/DocCommentGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/Documentifier.java b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/Documentifier.java index 4b270e1754a..ac8d570ed44 100644 --- a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/Documentifier.java +++ b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/Documentifier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/ModuleGenerator.java b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/ModuleGenerator.java index ccc32720f6a..b84e98fc93c 100644 --- a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/ModuleGenerator.java +++ b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/ModuleGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/PackageGenerator.java b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/PackageGenerator.java index 9a59ade357d..4bcab1f0973 100644 --- a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/PackageGenerator.java +++ b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/PackageGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/util/SimpleMultiplier.java b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/util/SimpleMultiplier.java index 711644c0614..541f01b60ec 100644 --- a/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/util/SimpleMultiplier.java +++ b/test/langtools/jdk/javadoc/tool/sampleapi/lib/sampleapi/util/SimpleMultiplier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/jdk/javadoc/tool/testExternRedirects/TestExternRedirects.java b/test/langtools/jdk/javadoc/tool/testExternRedirects/TestExternRedirects.java index a2d98f4603e..144ec1f75bd 100644 --- a/test/langtools/jdk/javadoc/tool/testExternRedirects/TestExternRedirects.java +++ b/test/langtools/jdk/javadoc/tool/testExternRedirects/TestExternRedirects.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/jdk/jshell/CompletenessTest.java b/test/langtools/jdk/jshell/CompletenessTest.java index 06cbc6bd41f..c9fc5dc08c3 100644 --- a/test/langtools/jdk/jshell/CompletenessTest.java +++ b/test/langtools/jdk/jshell/CompletenessTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/jdk/jshell/ExceptionMessageTest.java b/test/langtools/jdk/jshell/ExceptionMessageTest.java index fe8eec57739..39cca56c612 100644 --- a/test/langtools/jdk/jshell/ExceptionMessageTest.java +++ b/test/langtools/jdk/jshell/ExceptionMessageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/jdk/jshell/ExecPtyGetFlagsToSetTest.java b/test/langtools/jdk/jshell/ExecPtyGetFlagsToSetTest.java index efd1cd010cd..ef55d9dab00 100644 --- a/test/langtools/jdk/jshell/ExecPtyGetFlagsToSetTest.java +++ b/test/langtools/jdk/jshell/ExecPtyGetFlagsToSetTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/test/langtools/jdk/jshell/ReplToolTesting.java b/test/langtools/jdk/jshell/ReplToolTesting.java index 589b7b5cf39..d08c1008386 100644 --- a/test/langtools/jdk/jshell/ReplToolTesting.java +++ b/test/langtools/jdk/jshell/ReplToolTesting.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/jdk/jshell/ShutdownTest.java b/test/langtools/jdk/jshell/ShutdownTest.java index da4e516f94c..d97b83950cc 100644 --- a/test/langtools/jdk/jshell/ShutdownTest.java +++ b/test/langtools/jdk/jshell/ShutdownTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/jdk/jshell/ToolProviderTest.java b/test/langtools/jdk/jshell/ToolProviderTest.java index e27ed410d52..ada5f34d8c0 100644 --- a/test/langtools/jdk/jshell/ToolProviderTest.java +++ b/test/langtools/jdk/jshell/ToolProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/test/langtools/jdk/jshell/ToolSimpleTest.java b/test/langtools/jdk/jshell/ToolSimpleTest.java index 60d4f369521..81f75a3863e 100644 --- a/test/langtools/jdk/jshell/ToolSimpleTest.java +++ b/test/langtools/jdk/jshell/ToolSimpleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/test/langtools/jdk/jshell/VariablesTest.java b/test/langtools/jdk/jshell/VariablesTest.java index 98a543e77a9..a7aabc0ead6 100644 --- a/test/langtools/jdk/jshell/VariablesTest.java +++ b/test/langtools/jdk/jshell/VariablesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/doclint/CoverageExtras.java b/test/langtools/tools/doclint/CoverageExtras.java index 55ac63d6ab3..9cf65164f6d 100644 --- a/test/langtools/tools/doclint/CoverageExtras.java +++ b/test/langtools/tools/doclint/CoverageExtras.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/4241573/T4241573.java b/test/langtools/tools/javac/4241573/T4241573.java index de832aef706..9f3240a1f3e 100644 --- a/test/langtools/tools/javac/4241573/T4241573.java +++ b/test/langtools/tools/javac/4241573/T4241573.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/6341866/T6341866.java b/test/langtools/tools/javac/6341866/T6341866.java index c04653ed58d..47d17f30ee2 100644 --- a/test/langtools/tools/javac/6341866/T6341866.java +++ b/test/langtools/tools/javac/6341866/T6341866.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 diff --git a/test/langtools/tools/javac/6402516/TestClass.java b/test/langtools/tools/javac/6402516/TestClass.java index 57131cddaf9..3b517db048f 100644 --- a/test/langtools/tools/javac/6402516/TestClass.java +++ b/test/langtools/tools/javac/6402516/TestClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 diff --git a/test/langtools/tools/javac/6402516/TestLocalElements.java b/test/langtools/tools/javac/6402516/TestLocalElements.java index 7b835bfdcc3..9dc8a572969 100644 --- a/test/langtools/tools/javac/6402516/TestLocalElements.java +++ b/test/langtools/tools/javac/6402516/TestLocalElements.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 diff --git a/test/langtools/tools/javac/6402516/TestMethod.java b/test/langtools/tools/javac/6402516/TestMethod.java index 304b0abd9cb..1175cf41ca6 100644 --- a/test/langtools/tools/javac/6402516/TestMethod.java +++ b/test/langtools/tools/javac/6402516/TestMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 diff --git a/test/langtools/tools/javac/7003595/T7003595.java b/test/langtools/tools/javac/7003595/T7003595.java index 3aafbf74b6a..ed676c0e4ec 100644 --- a/test/langtools/tools/javac/7003595/T7003595.java +++ b/test/langtools/tools/javac/7003595/T7003595.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/test/langtools/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java b/test/langtools/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java index 1fd3fb3fbcc..bdd9c709e40 100644 --- a/test/langtools/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java +++ b/test/langtools/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/8000518/DuplicateConstantPoolEntry.java b/test/langtools/tools/javac/8000518/DuplicateConstantPoolEntry.java index 99ad19203b5..dc63452745e 100644 --- a/test/langtools/tools/javac/8000518/DuplicateConstantPoolEntry.java +++ b/test/langtools/tools/javac/8000518/DuplicateConstantPoolEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 diff --git a/test/langtools/tools/javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java b/test/langtools/tools/javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java index 4ba8c7a6491..6c603c590d3 100644 --- a/test/langtools/tools/javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java +++ b/test/langtools/tools/javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/8009170/RedundantByteCodeInArrayTest.java b/test/langtools/tools/javac/8009170/RedundantByteCodeInArrayTest.java index 8b8eb23be4d..7bea6f6834a 100644 --- a/test/langtools/tools/javac/8009170/RedundantByteCodeInArrayTest.java +++ b/test/langtools/tools/javac/8009170/RedundantByteCodeInArrayTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/AnonymousClass/AnonymousClassFlags.java b/test/langtools/tools/javac/AnonymousClass/AnonymousClassFlags.java index e163a4350cd..f60cb33798b 100644 --- a/test/langtools/tools/javac/AnonymousClass/AnonymousClassFlags.java +++ b/test/langtools/tools/javac/AnonymousClass/AnonymousClassFlags.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/test/langtools/tools/javac/MethodParameters/AnnotationTest.java b/test/langtools/tools/javac/MethodParameters/AnnotationTest.java index c373de15e52..c2a74424ed4 100644 --- a/test/langtools/tools/javac/MethodParameters/AnnotationTest.java +++ b/test/langtools/tools/javac/MethodParameters/AnnotationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/MethodParameters/AnonymousClass.java b/test/langtools/tools/javac/MethodParameters/AnonymousClass.java index d0bf322b0c6..711fcaf2a53 100644 --- a/test/langtools/tools/javac/MethodParameters/AnonymousClass.java +++ b/test/langtools/tools/javac/MethodParameters/AnonymousClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/MethodParameters/ClassFileVisitor.java b/test/langtools/tools/javac/MethodParameters/ClassFileVisitor.java index 5a2f3dfd377..b3690e4305e 100644 --- a/test/langtools/tools/javac/MethodParameters/ClassFileVisitor.java +++ b/test/langtools/tools/javac/MethodParameters/ClassFileVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/MethodParameters/Constructors.java b/test/langtools/tools/javac/MethodParameters/Constructors.java index 27c146ad049..0c393fda56b 100644 --- a/test/langtools/tools/javac/MethodParameters/Constructors.java +++ b/test/langtools/tools/javac/MethodParameters/Constructors.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/MethodParameters/EnumTest.java b/test/langtools/tools/javac/MethodParameters/EnumTest.java index f7570644ecd..1a411393556 100644 --- a/test/langtools/tools/javac/MethodParameters/EnumTest.java +++ b/test/langtools/tools/javac/MethodParameters/EnumTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/MethodParameters/InstanceMethods.java b/test/langtools/tools/javac/MethodParameters/InstanceMethods.java index c3d45270c8e..6afb4e2fa0d 100644 --- a/test/langtools/tools/javac/MethodParameters/InstanceMethods.java +++ b/test/langtools/tools/javac/MethodParameters/InstanceMethods.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/MethodParameters/LambdaTest.java b/test/langtools/tools/javac/MethodParameters/LambdaTest.java index cad796a12fd..c1dbe70c8de 100644 --- a/test/langtools/tools/javac/MethodParameters/LambdaTest.java +++ b/test/langtools/tools/javac/MethodParameters/LambdaTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/MethodParameters/LocalClassTest.java b/test/langtools/tools/javac/MethodParameters/LocalClassTest.java index 554ed798316..7456092244a 100644 --- a/test/langtools/tools/javac/MethodParameters/LocalClassTest.java +++ b/test/langtools/tools/javac/MethodParameters/LocalClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/MethodParameters/MemberClassTest.java b/test/langtools/tools/javac/MethodParameters/MemberClassTest.java index b0ea9c9fbee..67e982c6f7e 100644 --- a/test/langtools/tools/javac/MethodParameters/MemberClassTest.java +++ b/test/langtools/tools/javac/MethodParameters/MemberClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/MethodParameters/StaticMethods.java b/test/langtools/tools/javac/MethodParameters/StaticMethods.java index 24cadb6ca36..b8cd80da867 100644 --- a/test/langtools/tools/javac/MethodParameters/StaticMethods.java +++ b/test/langtools/tools/javac/MethodParameters/StaticMethods.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/MethodParameters/UncommonParamNames.java b/test/langtools/tools/javac/MethodParameters/UncommonParamNames.java index f531db7a09a..8853a50f516 100644 --- a/test/langtools/tools/javac/MethodParameters/UncommonParamNames.java +++ b/test/langtools/tools/javac/MethodParameters/UncommonParamNames.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/NoStringToLower.java b/test/langtools/tools/javac/NoStringToLower.java index ed787c759f4..d5e9e0fdc01 100644 --- a/test/langtools/tools/javac/NoStringToLower.java +++ b/test/langtools/tools/javac/NoStringToLower.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/RequiredParameterFlags/ImplicitParameters.java b/test/langtools/tools/javac/RequiredParameterFlags/ImplicitParameters.java index b53238ce4e5..921d8490f2c 100644 --- a/test/langtools/tools/javac/RequiredParameterFlags/ImplicitParameters.java +++ b/test/langtools/tools/javac/RequiredParameterFlags/ImplicitParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/tools/javac/StringConcat/access/Test.java b/test/langtools/tools/javac/StringConcat/access/Test.java index d9d7332e876..d7e9203e93d 100644 --- a/test/langtools/tools/javac/StringConcat/access/Test.java +++ b/test/langtools/tools/javac/StringConcat/access/Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/test/langtools/tools/javac/SuperInit/SuperInitGood.java b/test/langtools/tools/javac/SuperInit/SuperInitGood.java index 1d0e928a0d0..11b845f7d32 100644 --- a/test/langtools/tools/javac/SuperInit/SuperInitGood.java +++ b/test/langtools/tools/javac/SuperInit/SuperInitGood.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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 diff --git a/test/langtools/tools/javac/T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java b/test/langtools/tools/javac/T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java index b842f1a54ff..b7f0aab11d5 100644 --- a/test/langtools/tools/javac/T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java +++ b/test/langtools/tools/javac/T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/T6970173/DebugPointerAtBadPositionTest.java b/test/langtools/tools/javac/T6970173/DebugPointerAtBadPositionTest.java index 070d45d2be3..e20d366a384 100644 --- a/test/langtools/tools/javac/T6970173/DebugPointerAtBadPositionTest.java +++ b/test/langtools/tools/javac/T6970173/DebugPointerAtBadPositionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/T7008643/InlinedFinallyConfuseDebuggersTest.java b/test/langtools/tools/javac/T7008643/InlinedFinallyConfuseDebuggersTest.java index 62bae68ad36..77ea804eeea 100644 --- a/test/langtools/tools/javac/T7008643/InlinedFinallyConfuseDebuggersTest.java +++ b/test/langtools/tools/javac/T7008643/InlinedFinallyConfuseDebuggersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/T7053059/DoubleCastTest.java b/test/langtools/tools/javac/T7053059/DoubleCastTest.java index 4353a119ec7..3567e7c88f7 100644 --- a/test/langtools/tools/javac/T7053059/DoubleCastTest.java +++ b/test/langtools/tools/javac/T7053059/DoubleCastTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/T7093325.java b/test/langtools/tools/javac/T7093325.java index 0b527794c1a..2dfb171ea70 100644 --- a/test/langtools/tools/javac/T7093325.java +++ b/test/langtools/tools/javac/T7093325.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/test/langtools/tools/javac/T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java b/test/langtools/tools/javac/T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java index 493dbab113d..a2c117fcdf8 100644 --- a/test/langtools/tools/javac/T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java +++ b/test/langtools/tools/javac/T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/T8003967/DetectMutableStaticFields.java b/test/langtools/tools/javac/T8003967/DetectMutableStaticFields.java index ee170ec939e..ef3e400481d 100644 --- a/test/langtools/tools/javac/T8003967/DetectMutableStaticFields.java +++ b/test/langtools/tools/javac/T8003967/DetectMutableStaticFields.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 diff --git a/test/langtools/tools/javac/T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java b/test/langtools/tools/javac/T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java index a72c768aaef..8194c1f6423 100644 --- a/test/langtools/tools/javac/T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java +++ b/test/langtools/tools/javac/T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java b/test/langtools/tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java index 4f32bc090c3..f4a2813b455 100644 --- a/test/langtools/tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java +++ b/test/langtools/tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/T8019486/WrongLNTForLambdaTest.java b/test/langtools/tools/javac/T8019486/WrongLNTForLambdaTest.java index c916089f4ed..33bb9bb598a 100644 --- a/test/langtools/tools/javac/T8019486/WrongLNTForLambdaTest.java +++ b/test/langtools/tools/javac/T8019486/WrongLNTForLambdaTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java b/test/langtools/tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java index 1870cc4cfa1..bbfe10b2524 100644 --- a/test/langtools/tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java +++ b/test/langtools/tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java b/test/langtools/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java index df6c32dcd48..381318ab621 100644 --- a/test/langtools/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java +++ b/test/langtools/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java b/test/langtools/tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java index 759b78cb929..6af82b27be8 100644 --- a/test/langtools/tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java +++ b/test/langtools/tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/T8180141/MissingLNTEntryForBreakContinueTest.java b/test/langtools/tools/javac/T8180141/MissingLNTEntryForBreakContinueTest.java index ad33759899f..6aaea53192f 100644 --- a/test/langtools/tools/javac/T8180141/MissingLNTEntryForBreakContinueTest.java +++ b/test/langtools/tools/javac/T8180141/MissingLNTEntryForBreakContinueTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/T8180660/MissingLNTEntryForFinalizerTest.java b/test/langtools/tools/javac/T8180660/MissingLNTEntryForFinalizerTest.java index 1da6fa5e121..ff3f2cf3200 100644 --- a/test/langtools/tools/javac/T8180660/MissingLNTEntryForFinalizerTest.java +++ b/test/langtools/tools/javac/T8180660/MissingLNTEntryForFinalizerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/T8187805/BogusRTTAForUnusedVarTest.java b/test/langtools/tools/javac/T8187805/BogusRTTAForUnusedVarTest.java index bf20746c738..486370f0eff 100644 --- a/test/langtools/tools/javac/T8187805/BogusRTTAForUnusedVarTest.java +++ b/test/langtools/tools/javac/T8187805/BogusRTTAForUnusedVarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/T8203892/CheckTargetIsNotAddedAsMarkerInterfaceTest.java b/test/langtools/tools/javac/T8203892/CheckTargetIsNotAddedAsMarkerInterfaceTest.java index 44e6564e49f..90c9a70b969 100644 --- a/test/langtools/tools/javac/T8203892/CheckTargetIsNotAddedAsMarkerInterfaceTest.java +++ b/test/langtools/tools/javac/T8203892/CheckTargetIsNotAddedAsMarkerInterfaceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/T8209173/CodeCompletionExceptTest.java b/test/langtools/tools/javac/T8209173/CodeCompletionExceptTest.java index e506340ab0a..6cb45581db3 100644 --- a/test/langtools/tools/javac/T8209173/CodeCompletionExceptTest.java +++ b/test/langtools/tools/javac/T8209173/CodeCompletionExceptTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/T8210435/NoLocalsMustBeReservedForDCEedVarsTest.java b/test/langtools/tools/javac/T8210435/NoLocalsMustBeReservedForDCEedVarsTest.java index 225b105664e..a3a2bf98787 100644 --- a/test/langtools/tools/javac/T8210435/NoLocalsMustBeReservedForDCEedVarsTest.java +++ b/test/langtools/tools/javac/T8210435/NoLocalsMustBeReservedForDCEedVarsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/T8222949/TestConstantDynamic.java b/test/langtools/tools/javac/T8222949/TestConstantDynamic.java index 007e7648d40..4578bfbf318 100644 --- a/test/langtools/tools/javac/T8222949/TestConstantDynamic.java +++ b/test/langtools/tools/javac/T8222949/TestConstantDynamic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/test/langtools/tools/javac/TryWithResources/TwrSimpleClose.java b/test/langtools/tools/javac/TryWithResources/TwrSimpleClose.java index 1f2230493e4..af3f4ea19ef 100644 --- a/test/langtools/tools/javac/TryWithResources/TwrSimpleClose.java +++ b/test/langtools/tools/javac/TryWithResources/TwrSimpleClose.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/annotations/ApplicableAnnotationsOnRecords.java b/test/langtools/tools/javac/annotations/ApplicableAnnotationsOnRecords.java index 75e8d57fdad..773271f8c91 100644 --- a/test/langtools/tools/javac/annotations/ApplicableAnnotationsOnRecords.java +++ b/test/langtools/tools/javac/annotations/ApplicableAnnotationsOnRecords.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 diff --git a/test/langtools/tools/javac/annotations/SyntheticParameters.java b/test/langtools/tools/javac/annotations/SyntheticParameters.java index 692499a0b8a..00be377ab1f 100644 --- a/test/langtools/tools/javac/annotations/SyntheticParameters.java +++ b/test/langtools/tools/javac/annotations/SyntheticParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/TypeAnnotationsPositionsOnRecords.java b/test/langtools/tools/javac/annotations/typeAnnotations/TypeAnnotationsPositionsOnRecords.java index 190c6372ebc..dfa266ef035 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/TypeAnnotationsPositionsOnRecords.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/TypeAnnotationsPositionsOnRecords.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/VariablesDeclaredWithVarTest.java b/test/langtools/tools/javac/annotations/typeAnnotations/VariablesDeclaredWithVarTest.java index 199e56fbf53..0837dde6754 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/VariablesDeclaredWithVarTest.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/VariablesDeclaredWithVarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/ClassfileTestHelper.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/ClassfileTestHelper.java index 11abffa8c91..93087c2a275 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/ClassfileTestHelper.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/ClassfileTestHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java index 7d3f42584ad..33685d66193 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java index dda964c3473..35715502770 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java index 16e2ed0bb5c..1a8a8cf8414 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/DeadCode.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/DeadCode.java index 3a9fdc9270a..ddb2b81ab56 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/DeadCode.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/DeadCode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/InstanceInitializer.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/InstanceInitializer.java index d6a775c2b6c..3c344b19e3d 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/InstanceInitializer.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/InstanceInitializer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NewTypeArguments.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NewTypeArguments.java index cbaebb4916e..d1cdb6fa2cb 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NewTypeArguments.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NewTypeArguments.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NoTargetAnnotations.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NoTargetAnnotations.java index 65d5a639f35..d28611f1dfd 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NoTargetAnnotations.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/NoTargetAnnotations.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Scopes.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Scopes.java index 4025a61be6a..a4a5388562b 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Scopes.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Scopes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/StaticInitializer.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/StaticInitializer.java index b44faa4d6cf..b42413ab0ac 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/StaticInitializer.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/StaticInitializer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/SyntheticParameters.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/SyntheticParameters.java index cc2dcf8277f..7cac702874f 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/SyntheticParameters.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/SyntheticParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008762.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008762.java index 4dbff9cd68f..b5fe81fab40 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008762.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008762.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008769.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008769.java index 0aa41def875..3ab0afde122 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008769.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8008769.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8010015.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8010015.java index 045c75fa39f..6c927f51d5c 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8010015.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/T8010015.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java index efb78c02ad3..7e5be2d47ae 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestNewCastArray.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestNewCastArray.java index ea4f69ecaca..803e0c8865b 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestNewCastArray.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TestNewCastArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeCasts.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeCasts.java index 9a0ed02ae28..2a33e256ae1 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeCasts.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/TypeCasts.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Wildcards.java b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Wildcards.java index 3295d0a513b..c05ddc7036b 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Wildcards.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/classfile/Wildcards.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassExtends.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassExtends.java index c4581fc1bf3..2ff841f5a06 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassExtends.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassExtends.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java index 2202766e450..40d00daabb0 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ConstructorInvocationTypeArgument.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ConstructorInvocationTypeArgument.java index f89ec2efce4..3b5ece66d5d 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ConstructorInvocationTypeArgument.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ConstructorInvocationTypeArgument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java index 89128a60888..d703e149933 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java index e179764a1e8..d493a0f1c1e 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Fields.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Fields.java index 089f32ae775..0d66907333b 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Fields.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Fields.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/FromSpecification.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/FromSpecification.java index b89517c4376..0066863bad5 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/FromSpecification.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/FromSpecification.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Initializers.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Initializers.java index 70af9591900..d8a1242725b 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Initializers.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Initializers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java index 1d78183e68e..29b2bafe3e3 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodInvocationTypeArgument.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodInvocationTypeArgument.java index 38026251a19..33cba2a41ab 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodInvocationTypeArgument.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodInvocationTypeArgument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java index edc9ae18a32..084b0ad01b0 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReceivers.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReceivers.java index d379301005f..610b4ca385f 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReceivers.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReceivers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReturns.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReturns.java index b174ea414c4..ffd524c6d7b 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReturns.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReturns.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodThrows.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodThrows.java index 69de815909e..e6603d8d211 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodThrows.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodThrows.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java index 05a8c09c1cf..91577abe80c 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java index a1883ff4864..c8395992568 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java index 37aedf75f62..34eed43751a 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java index ff90b8bb2da..c19029ec753 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/RepeatingTypeAnnotations.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/RepeatingTypeAnnotations.java index 1d78cfed508..c819292f968 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/RepeatingTypeAnnotations.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/RepeatingTypeAnnotations.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java index bb5944d400c..a6a54f60fc0 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java index 612601538b6..8d59bda04c5 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeTests.java b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeTests.java index e82c5f4009a..62dfd422c9b 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeTests.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/TypeTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/api/TestGetScopeResult.java b/test/langtools/tools/javac/api/TestGetScopeResult.java index daa3e761b2a..babc7a79170 100644 --- a/test/langtools/tools/javac/api/TestGetScopeResult.java +++ b/test/langtools/tools/javac/api/TestGetScopeResult.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/cast/intersection/DuplicatedCheckcastTest.java b/test/langtools/tools/javac/cast/intersection/DuplicatedCheckcastTest.java index 0bf600044b1..aed5b3c18e0 100644 --- a/test/langtools/tools/javac/cast/intersection/DuplicatedCheckcastTest.java +++ b/test/langtools/tools/javac/cast/intersection/DuplicatedCheckcastTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/classfiles/InnerClasses/SyntheticClasses.java b/test/langtools/tools/javac/classfiles/InnerClasses/SyntheticClasses.java index db06862d3ae..4585ef4fdef 100644 --- a/test/langtools/tools/javac/classfiles/InnerClasses/SyntheticClasses.java +++ b/test/langtools/tools/javac/classfiles/InnerClasses/SyntheticClasses.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/T8255757/T8255757.java b/test/langtools/tools/javac/classfiles/T8255757/T8255757.java index b165967bf5e..0ce6e87f4e3 100644 --- a/test/langtools/tools/javac/classfiles/T8255757/T8255757.java +++ b/test/langtools/tools/javac/classfiles/T8255757/T8255757.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultTest.java b/test/langtools/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultTest.java index f67fa87474e..10d66e18dd2 100644 --- a/test/langtools/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/EnclosingMethod/EnclosingMethodTest.java b/test/langtools/tools/javac/classfiles/attributes/EnclosingMethod/EnclosingMethodTest.java index 69a40ddbf45..9100073d300 100644 --- a/test/langtools/tools/javac/classfiles/attributes/EnclosingMethod/EnclosingMethodTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/EnclosingMethod/EnclosingMethodTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTest.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTest.java index 3d3d4f69d0a..d8fb460160b 100644 --- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTestBase.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTestBase.java index 531d5e617d0..32ec2e07f73 100644 --- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTestBase.java +++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/MultipleRecordPatterns.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/MultipleRecordPatterns.java index b2b3e1e8a2c..d71cc33cd23 100644 --- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/MultipleRecordPatterns.java +++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/MultipleRecordPatterns.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/RuleSwitchBreaks.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/RuleSwitchBreaks.java index a1bb8a6150c..852703b2a5a 100644 --- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/RuleSwitchBreaks.java +++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/RuleSwitchBreaks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/StringSwitchBreaks.java b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/StringSwitchBreaks.java index e445818553e..1fe952c6557 100644 --- a/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/StringSwitchBreaks.java +++ b/test/langtools/tools/javac/classfiles/attributes/LineNumberTable/StringSwitchBreaks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTableTest.java b/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTableTest.java index 2ce77364bea..df14b54bedb 100644 --- a/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTableTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTableTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTestBase.java b/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTestBase.java index 7bda1500b3e..8af31b2f49e 100644 --- a/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTestBase.java +++ b/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTypeTableTest.java b/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTypeTableTest.java index 0f4ed838edd..3bb2545ee6c 100644 --- a/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTypeTableTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTypeTableTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Module/ModuleFlagTest.java b/test/langtools/tools/javac/classfiles/attributes/Module/ModuleFlagTest.java index 2dcee4d16e1..82c3d8451f0 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Module/ModuleFlagTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Module/ModuleFlagTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTest.java b/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTest.java index cf09ce7ca39..29f0bf3e3a1 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTestBase.java b/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTestBase.java index 490e585e06a..8cbd32a0764 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTestBase.java +++ b/test/langtools/tools/javac/classfiles/attributes/Module/ModuleTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/ConstructorTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/ConstructorTest.java index 20012318ea7..90ff0fd5e78 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Signature/ConstructorTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Signature/ConstructorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/Driver.java b/test/langtools/tools/javac/classfiles/attributes/Signature/Driver.java index 7b75ffa5f9c..deaa0b3dbe0 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Signature/Driver.java +++ b/test/langtools/tools/javac/classfiles/attributes/Signature/Driver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/EnumTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/EnumTest.java index b7e6d2ca99a..ce9d213be84 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Signature/EnumTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Signature/EnumTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/ExceptionTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/ExceptionTest.java index 54706e2822b..997c3b2fbda 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Signature/ExceptionTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Signature/ExceptionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/FieldTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/FieldTest.java index 795a4d30bea..f813cdbec7c 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Signature/FieldTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Signature/FieldTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/InnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/InnerClassTest.java index 740607d56c0..7f7db6984eb 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Signature/InnerClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Signature/InnerClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/MethodParameterTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/MethodParameterTest.java index 6966ed1852c..54d62e7b526 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Signature/MethodParameterTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Signature/MethodParameterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/MethodTypeBoundTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/MethodTypeBoundTest.java index 2131b5a4f02..cb98ac9b898 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Signature/MethodTypeBoundTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Signature/MethodTypeBoundTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Signature/ReturnTypeTest.java b/test/langtools/tools/javac/classfiles/attributes/Signature/ReturnTypeTest.java index cce155bbb71..33f6505aa76 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Signature/ReturnTypeTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Signature/ReturnTypeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/AnonymousClassTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/AnonymousClassTest.java index 15696c89bee..0fe213f6798 100644 --- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/AnonymousClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/AnonymousClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/InnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/InnerClassTest.java index d8cd067408f..ab16f04af23 100644 --- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/InnerClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/InnerClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/LocalClassTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/LocalClassTest.java index dc45a92d407..3bb1b92efce 100644 --- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/LocalClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/LocalClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/MixTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/MixTest.java index d2079bb13f9..b934c6d190e 100644 --- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/MixTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/MixTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/ModuleInfoTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/ModuleInfoTest.java index d0b65e41cfe..2d2c6de538f 100644 --- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/ModuleInfoTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/ModuleInfoTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/NoSourceFileAttribute.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/NoSourceFileAttribute.java index 4e4b2faacd2..7f05686cad0 100644 --- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/NoSourceFileAttribute.java +++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/NoSourceFileAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/SourceFileTestBase.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/SourceFileTestBase.java index 0d81fc2c282..b8d5d7cf981 100644 --- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/SourceFileTestBase.java +++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/SourceFileTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/SourceFile/TopLevelClassesOneFileTest.java b/test/langtools/tools/javac/classfiles/attributes/SourceFile/TopLevelClassesOneFileTest.java index ee85b2dc650..7d562c3224d 100644 --- a/test/langtools/tools/javac/classfiles/attributes/SourceFile/TopLevelClassesOneFileTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/SourceFile/TopLevelClassesOneFileTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassConstructorsTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassConstructorsTest.java index 3072b641b69..e1e38c0d6dd 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassConstructorsTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassConstructorsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassMembersTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassMembersTest.java index 0440ec1a430..b3708f8b6c7 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassMembersTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateInnerClassMembersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateSiblingsTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateSiblingsTest.java index 720af8507a8..43687f551b3 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateSiblingsTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AccessToPrivateSiblingsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AssertFieldTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AssertFieldTest.java index 508bf245c47..04b47ea1bd7 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/AssertFieldTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/AssertFieldTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodForGenericMethodTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodForGenericMethodTest.java index 96c7a41fea9..d57772b77d1 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodForGenericMethodTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodForGenericMethodTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java index 5d26990d23d..0c12b997edf 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/EnumTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/EnumTest.java index d4cfbbe8d19..bae2fa0914e 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/EnumTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/EnumTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/PackageInfoTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/PackageInfoTest.java index 18a3c966546..bb7c1c4dfde 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/PackageInfoTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/PackageInfoTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/SyntheticTestDriver.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/SyntheticTestDriver.java index 4db2585355e..847fb5047f0 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/SyntheticTestDriver.java +++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/SyntheticTestDriver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/Synthetic/ThisFieldTest.java b/test/langtools/tools/javac/classfiles/attributes/Synthetic/ThisFieldTest.java index 7c07628afbd..e00c51de132 100644 --- a/test/langtools/tools/javac/classfiles/attributes/Synthetic/ThisFieldTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/Synthetic/ThisFieldTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForGenericMethodTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForGenericMethodTest.java index 7691bc54ba7..9bf66901626 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForGenericMethodTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForGenericMethodTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerAnnotationTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerAnnotationTest.java index c0ca6d2426d..fb959259684 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerAnnotationTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerAnnotationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerClassTest.java index 8fc1aadb276..ebe96e004f6 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerEnumTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerEnumTest.java index f699124dca9..cc32186f640 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerEnumTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerEnumTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerInterfaceTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerInterfaceTest.java index 553155fa9f2..55e001834f2 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerInterfaceTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForInnerInterfaceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForTopLevelClassTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForTopLevelClassTest.java index 6a80acd406e..d990854decb 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForTopLevelClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsForTopLevelClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsTestBase.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsTestBase.java index 970628be575..73ac7db6b74 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsTestBase.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeAnnotationsTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForGenericMethodTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForGenericMethodTest.java index 6e0671c2b23..42714664f19 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForGenericMethodTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForGenericMethodTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForLambdaTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForLambdaTest.java index c40ac214bd7..53d97bafe54 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForLambdaTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsForLambdaTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTest.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTest.java index 9443ccc5151..3174f90711e 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTestBase.java b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTestBase.java index b8c90faf52b..88099d6ca72 100644 --- a/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTestBase.java +++ b/test/langtools/tools/javac/classfiles/attributes/annotations/RuntimeParameterAnnotationsTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerAnnotationTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerAnnotationTest.java index a7d84a4a599..e0346be1cda 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerAnnotationTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerAnnotationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java index cdf2413eeec..441d70a27d4 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java index 1b78cbeccec..8ae5054ea1b 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerInterfaceTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerInterfaceTest.java index c40b7161d6d..aed539005d3 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerInterfaceTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerInterfaceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java index a6210b8455a..05b48e47013 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java index fb6003752f6..f75b08d571b 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java index f69b0d1a885..7572ee96157 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java index bd5d27e7307..be7891d2587 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java index 7bca5b5240f..ea400defaea 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java index 3e6d32044cb..9c1988f5dc1 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java index a2409c810d1..aeb8398a6ab 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesIndexTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesIndexTest.java index d8b78622185..1c71cbb9881 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesIndexTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesIndexTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java index 6225c89e591..f07476fa84c 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTestBase.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTestBase.java index aa46d8a9b9d..4b11dfdc944 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTestBase.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java index 43aa1462ca6..ed17e63a0e3 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java index 3c4775d22a7..f946aac791d 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java index 01beace40ca..d8c73ac5d48 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java index 413bee58f00..43aafed64b4 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerAnnotationTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerAnnotationTest.java index ca25c1028f6..0879beef2ab 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerAnnotationTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerAnnotationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java index c0dac827f81..80cb3672bf8 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java index 5e6051ddd75..632e32a332e 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerInterfaceTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerInterfaceTest.java index abf8e5987d7..3be3c38cd85 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerInterfaceTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerInterfaceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classfiles/attributes/innerclasses/NoInnerClassesTest.java b/test/langtools/tools/javac/classfiles/attributes/innerclasses/NoInnerClassesTest.java index e6f29a1d078..3ebd621e4b7 100644 --- a/test/langtools/tools/javac/classfiles/attributes/innerclasses/NoInnerClassesTest.java +++ b/test/langtools/tools/javac/classfiles/attributes/innerclasses/NoInnerClassesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/classwriter/IndyCorrectInvocationName.java b/test/langtools/tools/javac/classwriter/IndyCorrectInvocationName.java index 3a8be1f53ed..a4619782b09 100644 --- a/test/langtools/tools/javac/classwriter/IndyCorrectInvocationName.java +++ b/test/langtools/tools/javac/classwriter/IndyCorrectInvocationName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/code/CharImmediateValue.java b/test/langtools/tools/javac/code/CharImmediateValue.java index d96fb60a1b7..d72187ed18a 100644 --- a/test/langtools/tools/javac/code/CharImmediateValue.java +++ b/test/langtools/tools/javac/code/CharImmediateValue.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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 diff --git a/test/langtools/tools/javac/constDebug/ConstDebugTest.java b/test/langtools/tools/javac/constDebug/ConstDebugTest.java index c487ccea269..d13cafd4b3c 100644 --- a/test/langtools/tools/javac/constDebug/ConstDebugTest.java +++ b/test/langtools/tools/javac/constDebug/ConstDebugTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/defaultMethods/TestDefaultBody.java b/test/langtools/tools/javac/defaultMethods/TestDefaultBody.java index edf8427bc93..dafb6ae4f96 100644 --- a/test/langtools/tools/javac/defaultMethods/TestDefaultBody.java +++ b/test/langtools/tools/javac/defaultMethods/TestDefaultBody.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/test/langtools/tools/javac/defaultMethods/TestNoBridgeOnDefaults.java b/test/langtools/tools/javac/defaultMethods/TestNoBridgeOnDefaults.java index cff1b10a7e5..b0ca895b306 100644 --- a/test/langtools/tools/javac/defaultMethods/TestNoBridgeOnDefaults.java +++ b/test/langtools/tools/javac/defaultMethods/TestNoBridgeOnDefaults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/test/langtools/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java b/test/langtools/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java index 9aa52686bc4..bee5f837322 100644 --- a/test/langtools/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java +++ b/test/langtools/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/diags/CheckResourceKeys.java b/test/langtools/tools/javac/diags/CheckResourceKeys.java index b5f5b2031de..9f6f37dc23d 100644 --- a/test/langtools/tools/javac/diags/CheckResourceKeys.java +++ b/test/langtools/tools/javac/diags/CheckResourceKeys.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/tools/javac/diags/Example.java b/test/langtools/tools/javac/diags/Example.java index 8940032367d..91d3bace4d8 100644 --- a/test/langtools/tools/javac/diags/Example.java +++ b/test/langtools/tools/javac/diags/Example.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/tools/javac/diags/examples/BadConstantValueType/BadConstantValueType.java b/test/langtools/tools/javac/diags/examples/BadConstantValueType/BadConstantValueType.java index 1a9faf67547..c9eee39be17 100644 --- a/test/langtools/tools/javac/diags/examples/BadConstantValueType/BadConstantValueType.java +++ b/test/langtools/tools/javac/diags/examples/BadConstantValueType/BadConstantValueType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/test/langtools/tools/javac/diags/examples/CantAnnotateScoping.java b/test/langtools/tools/javac/diags/examples/CantAnnotateScoping.java index 8a1d9ad77bb..974a6d6c412 100644 --- a/test/langtools/tools/javac/diags/examples/CantAnnotateScoping.java +++ b/test/langtools/tools/javac/diags/examples/CantAnnotateScoping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/diags/examples/CantAnnotateScoping1.java b/test/langtools/tools/javac/diags/examples/CantAnnotateScoping1.java index 6762f0d1ea7..db3072a845d 100644 --- a/test/langtools/tools/javac/diags/examples/CantAnnotateScoping1.java +++ b/test/langtools/tools/javac/diags/examples/CantAnnotateScoping1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/diags/examples/IllegalDigitInBinaryLiteral.java b/test/langtools/tools/javac/diags/examples/IllegalDigitInBinaryLiteral.java index 4956114cac2..a4534a7e739 100644 --- a/test/langtools/tools/javac/diags/examples/IllegalDigitInBinaryLiteral.java +++ b/test/langtools/tools/javac/diags/examples/IllegalDigitInBinaryLiteral.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/diags/examples/IllegalDigitInOctalLiteral.java b/test/langtools/tools/javac/diags/examples/IllegalDigitInOctalLiteral.java index a5b3a747138..910f569e9fc 100644 --- a/test/langtools/tools/javac/diags/examples/IllegalDigitInOctalLiteral.java +++ b/test/langtools/tools/javac/diags/examples/IllegalDigitInOctalLiteral.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/diags/examples/InvalidBinaryNumber.java b/test/langtools/tools/javac/diags/examples/InvalidBinaryNumber.java index 941433be676..5024273cb4e 100644 --- a/test/langtools/tools/javac/diags/examples/InvalidBinaryNumber.java +++ b/test/langtools/tools/javac/diags/examples/InvalidBinaryNumber.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/tools/javac/diags/examples/InvalidDefaultInterface/InvalidDefaultInterface.java b/test/langtools/tools/javac/diags/examples/InvalidDefaultInterface/InvalidDefaultInterface.java index bae237b09d2..cc4f14fbd6f 100644 --- a/test/langtools/tools/javac/diags/examples/InvalidDefaultInterface/InvalidDefaultInterface.java +++ b/test/langtools/tools/javac/diags/examples/InvalidDefaultInterface/InvalidDefaultInterface.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/diags/examples/InvalidStaticInterface/InvalidStaticInterface.java b/test/langtools/tools/javac/diags/examples/InvalidStaticInterface/InvalidStaticInterface.java index ba739de15ec..2eb8c6aabc9 100644 --- a/test/langtools/tools/javac/diags/examples/InvalidStaticInterface/InvalidStaticInterface.java +++ b/test/langtools/tools/javac/diags/examples/InvalidStaticInterface/InvalidStaticInterface.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/diags/examples/ModifierNotAllowed/module-info.java b/test/langtools/tools/javac/diags/examples/ModifierNotAllowed/module-info.java index f2e5899a915..8eb25a864d7 100644 --- a/test/langtools/tools/javac/diags/examples/ModifierNotAllowed/module-info.java +++ b/test/langtools/tools/javac/diags/examples/ModifierNotAllowed/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/diags/examples/PrimitivePatternMatching.java b/test/langtools/tools/javac/diags/examples/PrimitivePatternMatching.java index 39c2ec7fe6d..a034119b6df 100644 --- a/test/langtools/tools/javac/diags/examples/PrimitivePatternMatching.java +++ b/test/langtools/tools/javac/diags/examples/PrimitivePatternMatching.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/tools/javac/diags/examples/ProcUseProcOrImplicit/ProcUseProcOrImplicit.java b/test/langtools/tools/javac/diags/examples/ProcUseProcOrImplicit/ProcUseProcOrImplicit.java index 6d9d9a70ee9..b1b8012c7c7 100644 --- a/test/langtools/tools/javac/diags/examples/ProcUseProcOrImplicit/ProcUseProcOrImplicit.java +++ b/test/langtools/tools/javac/diags/examples/ProcUseProcOrImplicit/ProcUseProcOrImplicit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/tools/javac/diags/examples/TypeReqClassArray.java b/test/langtools/tools/javac/diags/examples/TypeReqClassArray.java index ba7eacf2a82..7fd73b458cf 100644 --- a/test/langtools/tools/javac/diags/examples/TypeReqClassArray.java +++ b/test/langtools/tools/javac/diags/examples/TypeReqClassArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/tools/javac/diags/examples/TypeReqRef.java b/test/langtools/tools/javac/diags/examples/TypeReqRef.java index d9ada8672c4..d43b97cd51a 100644 --- a/test/langtools/tools/javac/diags/examples/TypeReqRef.java +++ b/test/langtools/tools/javac/diags/examples/TypeReqRef.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java b/test/langtools/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java index 57f4fcde3e7..3f222a65a28 100644 --- a/test/langtools/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java +++ b/test/langtools/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/file/SymLinkTest.java b/test/langtools/tools/javac/file/SymLinkTest.java index ea5295505e1..291af78da82 100644 --- a/test/langtools/tools/javac/file/SymLinkTest.java +++ b/test/langtools/tools/javac/file/SymLinkTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/flow/LVTHarness.java b/test/langtools/tools/javac/flow/LVTHarness.java index 3686323567b..7afe90c1991 100644 --- a/test/langtools/tools/javac/flow/LVTHarness.java +++ b/test/langtools/tools/javac/flow/LVTHarness.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/generics/bridges/BridgeHarness.java b/test/langtools/tools/javac/generics/bridges/BridgeHarness.java index 25414c8127c..ab2cf73cc0e 100644 --- a/test/langtools/tools/javac/generics/bridges/BridgeHarness.java +++ b/test/langtools/tools/javac/generics/bridges/BridgeHarness.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/generics/parametricException/ParametricException.java b/test/langtools/tools/javac/generics/parametricException/ParametricException.java index aa8bd61480c..5c6eef55c2a 100644 --- a/test/langtools/tools/javac/generics/parametricException/ParametricException.java +++ b/test/langtools/tools/javac/generics/parametricException/ParametricException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 diff --git a/test/langtools/tools/javac/importscope/T8193717.java b/test/langtools/tools/javac/importscope/T8193717.java index 6ca58eb8a89..bfe7c35772c 100644 --- a/test/langtools/tools/javac/importscope/T8193717.java +++ b/test/langtools/tools/javac/importscope/T8193717.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java b/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java index 3ea1f5b72bb..b905dedf327 100644 --- a/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java +++ b/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/lambda/ByteCodeTest.java b/test/langtools/tools/javac/lambda/ByteCodeTest.java index f273305925c..58a88c85cd3 100644 --- a/test/langtools/tools/javac/lambda/ByteCodeTest.java +++ b/test/langtools/tools/javac/lambda/ByteCodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/lambda/LocalVariableTable.java b/test/langtools/tools/javac/lambda/LocalVariableTable.java index cb243957287..d07a58ff651 100644 --- a/test/langtools/tools/javac/lambda/LocalVariableTable.java +++ b/test/langtools/tools/javac/lambda/LocalVariableTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/lambda/TestBootstrapMethodsCount.java b/test/langtools/tools/javac/lambda/TestBootstrapMethodsCount.java index 46a381c97c2..1dbb915c063 100644 --- a/test/langtools/tools/javac/lambda/TestBootstrapMethodsCount.java +++ b/test/langtools/tools/javac/lambda/TestBootstrapMethodsCount.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/lambda/TestInvokeDynamic.java b/test/langtools/tools/javac/lambda/TestInvokeDynamic.java index 9ad73564e23..b7e980d5726 100644 --- a/test/langtools/tools/javac/lambda/TestInvokeDynamic.java +++ b/test/langtools/tools/javac/lambda/TestInvokeDynamic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecode.java b/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecode.java index f7741921b70..4c779b2b6c3 100644 --- a/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecode.java +++ b/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecodeTargetRelease14.java b/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecodeTargetRelease14.java index 6970832c45b..ac67054d732 100644 --- a/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecodeTargetRelease14.java +++ b/test/langtools/tools/javac/lambda/bytecode/TestLambdaBytecodeTargetRelease14.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 diff --git a/test/langtools/tools/javac/lambda/lambdaNaming/TestNonSerializableLambdaNameStability.java b/test/langtools/tools/javac/lambda/lambdaNaming/TestNonSerializableLambdaNameStability.java index 7b418f6184d..2860e3fcd53 100644 --- a/test/langtools/tools/javac/lambda/lambdaNaming/TestNonSerializableLambdaNameStability.java +++ b/test/langtools/tools/javac/lambda/lambdaNaming/TestNonSerializableLambdaNameStability.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/launcher/GetResourceTest.java b/test/langtools/tools/javac/launcher/GetResourceTest.java index 8cb9ce9fe72..acdc1e5c429 100644 --- a/test/langtools/tools/javac/launcher/GetResourceTest.java +++ b/test/langtools/tools/javac/launcher/GetResourceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/launcher/MultiFileSourceLauncherTests.java b/test/langtools/tools/javac/launcher/MultiFileSourceLauncherTests.java index dbf6be5b121..d7510605131 100644 --- a/test/langtools/tools/javac/launcher/MultiFileSourceLauncherTests.java +++ b/test/langtools/tools/javac/launcher/MultiFileSourceLauncherTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/tools/javac/launcher/ProgramDescriptorTests.java b/test/langtools/tools/javac/launcher/ProgramDescriptorTests.java index 93dd7a42072..9d82f85ef79 100644 --- a/test/langtools/tools/javac/launcher/ProgramDescriptorTests.java +++ b/test/langtools/tools/javac/launcher/ProgramDescriptorTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/tools/javac/launcher/Run.java b/test/langtools/tools/javac/launcher/Run.java index f6fd6abb0e3..a7cfb87b0c2 100644 --- a/test/langtools/tools/javac/launcher/Run.java +++ b/test/langtools/tools/javac/launcher/Run.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/tools/javac/launcher/src/p/q/CLTest.java b/test/langtools/tools/javac/launcher/src/p/q/CLTest.java index 4ec90245659..71840d3f29d 100644 --- a/test/langtools/tools/javac/launcher/src/p/q/CLTest.java +++ b/test/langtools/tools/javac/launcher/src/p/q/CLTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/linenumbers/ConditionalLineNumberTest.java b/test/langtools/tools/javac/linenumbers/ConditionalLineNumberTest.java index 5e1cce76a28..4c4aae6ace4 100644 --- a/test/langtools/tools/javac/linenumbers/ConditionalLineNumberTest.java +++ b/test/langtools/tools/javac/linenumbers/ConditionalLineNumberTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javac/linenumbers/FinallyLineNumberTest.java b/test/langtools/tools/javac/linenumbers/FinallyLineNumberTest.java index d1fbadb6f2f..3823aedae74 100644 --- a/test/langtools/tools/javac/linenumbers/FinallyLineNumberTest.java +++ b/test/langtools/tools/javac/linenumbers/FinallyLineNumberTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/mandatoryWarnings/unchecked/Test.java b/test/langtools/tools/javac/mandatoryWarnings/unchecked/Test.java index 759c4090e1c..8d860535856 100644 --- a/test/langtools/tools/javac/mandatoryWarnings/unchecked/Test.java +++ b/test/langtools/tools/javac/mandatoryWarnings/unchecked/Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 diff --git a/test/langtools/tools/javac/meth/TestCP.java b/test/langtools/tools/javac/meth/TestCP.java index b01ac799b55..8762e65db65 100644 --- a/test/langtools/tools/javac/meth/TestCP.java +++ b/test/langtools/tools/javac/meth/TestCP.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/tools/javac/modules/ConvenientAccessErrorsTest.java b/test/langtools/tools/javac/modules/ConvenientAccessErrorsTest.java index f558ddb20ac..2958384ae94 100644 --- a/test/langtools/tools/javac/modules/ConvenientAccessErrorsTest.java +++ b/test/langtools/tools/javac/modules/ConvenientAccessErrorsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/test/langtools/tools/javac/modules/EdgeCases.java b/test/langtools/tools/javac/modules/EdgeCases.java index dd68a5142b2..a3825d9e3a6 100644 --- a/test/langtools/tools/javac/modules/EdgeCases.java +++ b/test/langtools/tools/javac/modules/EdgeCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/modules/ModuleVersion.java b/test/langtools/tools/javac/modules/ModuleVersion.java index c5368b394a1..6e68529e9b6 100644 --- a/test/langtools/tools/javac/modules/ModuleVersion.java +++ b/test/langtools/tools/javac/modules/ModuleVersion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/modules/RequiresTransitiveTest.java b/test/langtools/tools/javac/modules/RequiresTransitiveTest.java index 03f34e96113..41d1669824f 100644 --- a/test/langtools/tools/javac/modules/RequiresTransitiveTest.java +++ b/test/langtools/tools/javac/modules/RequiresTransitiveTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/multicatch/7005371/T7005371.java b/test/langtools/tools/javac/multicatch/7005371/T7005371.java index a8f71a1d078..ccf405ef0b3 100644 --- a/test/langtools/tools/javac/multicatch/7005371/T7005371.java +++ b/test/langtools/tools/javac/multicatch/7005371/T7005371.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/tools/javac/multicatch/Pos05.java b/test/langtools/tools/javac/multicatch/Pos05.java index b3e6882752f..eb749ff286f 100644 --- a/test/langtools/tools/javac/multicatch/Pos05.java +++ b/test/langtools/tools/javac/multicatch/Pos05.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/tools/javac/patterns/LocalVariableTable.java b/test/langtools/tools/javac/patterns/LocalVariableTable.java index 1b80743bb26..9483233f81a 100644 --- a/test/langtools/tools/javac/patterns/LocalVariableTable.java +++ b/test/langtools/tools/javac/patterns/LocalVariableTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/javac/patterns/MatchExceptionTest.java b/test/langtools/tools/javac/patterns/MatchExceptionTest.java index 1f761faaec1..cf51f93e8c8 100644 --- a/test/langtools/tools/javac/patterns/MatchExceptionTest.java +++ b/test/langtools/tools/javac/patterns/MatchExceptionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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 diff --git a/test/langtools/tools/javac/patterns/NestedPatternVariablesBytecode.java b/test/langtools/tools/javac/patterns/NestedPatternVariablesBytecode.java index ddec9fd2e56..5bb75c44805 100644 --- a/test/langtools/tools/javac/patterns/NestedPatternVariablesBytecode.java +++ b/test/langtools/tools/javac/patterns/NestedPatternVariablesBytecode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/patterns/NoUnnecessaryCast.java b/test/langtools/tools/javac/patterns/NoUnnecessaryCast.java index 84d4752671e..107b933e506 100644 --- a/test/langtools/tools/javac/patterns/NoUnnecessaryCast.java +++ b/test/langtools/tools/javac/patterns/NoUnnecessaryCast.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 diff --git a/test/langtools/tools/javac/patterns/PrimitiveInstanceOfComboTest.java b/test/langtools/tools/javac/patterns/PrimitiveInstanceOfComboTest.java index 113c1214452..82064bd4baf 100644 --- a/test/langtools/tools/javac/patterns/PrimitiveInstanceOfComboTest.java +++ b/test/langtools/tools/javac/patterns/PrimitiveInstanceOfComboTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/tools/javac/patterns/PrimitiveInstanceOfPatternOpWithRecordPatterns.java b/test/langtools/tools/javac/patterns/PrimitiveInstanceOfPatternOpWithRecordPatterns.java index dce025a0708..dc019f7eb36 100644 --- a/test/langtools/tools/javac/patterns/PrimitiveInstanceOfPatternOpWithRecordPatterns.java +++ b/test/langtools/tools/javac/patterns/PrimitiveInstanceOfPatternOpWithRecordPatterns.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/tools/javac/patterns/PrimitivePatternsSwitch.java b/test/langtools/tools/javac/patterns/PrimitivePatternsSwitch.java index 1d78fe98147..ef95399c8b4 100644 --- a/test/langtools/tools/javac/patterns/PrimitivePatternsSwitch.java +++ b/test/langtools/tools/javac/patterns/PrimitivePatternsSwitch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/tools/javac/patterns/SourceLevelChecks.java b/test/langtools/tools/javac/patterns/SourceLevelChecks.java index 3b0fece12bc..81a988d2a3c 100644 --- a/test/langtools/tools/javac/patterns/SourceLevelChecks.java +++ b/test/langtools/tools/javac/patterns/SourceLevelChecks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/patterns/Switches.java b/test/langtools/tools/javac/patterns/Switches.java index 7d7cb83e02f..2dd4ce7a697 100644 --- a/test/langtools/tools/javac/patterns/Switches.java +++ b/test/langtools/tools/javac/patterns/Switches.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javac/patterns/TranslationTest.java b/test/langtools/tools/javac/patterns/TranslationTest.java index f69783f6b85..107e0a5aa49 100644 --- a/test/langtools/tools/javac/patterns/TranslationTest.java +++ b/test/langtools/tools/javac/patterns/TranslationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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 diff --git a/test/langtools/tools/javac/platform/ModuleVersionTest.java b/test/langtools/tools/javac/platform/ModuleVersionTest.java index 457674cf45c..a204090caf8 100644 --- a/test/langtools/tools/javac/platform/ModuleVersionTest.java +++ b/test/langtools/tools/javac/platform/ModuleVersionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 diff --git a/test/langtools/tools/javac/plugin/AutostartPlugins.java b/test/langtools/tools/javac/plugin/AutostartPlugins.java index 5eb5b16bad5..1c6b9f895e5 100644 --- a/test/langtools/tools/javac/plugin/AutostartPlugins.java +++ b/test/langtools/tools/javac/plugin/AutostartPlugins.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/plugin/InternalAPI.java b/test/langtools/tools/javac/plugin/InternalAPI.java index 70bb024ede9..bd5f3d25d39 100644 --- a/test/langtools/tools/javac/plugin/InternalAPI.java +++ b/test/langtools/tools/javac/plugin/InternalAPI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/test/langtools/tools/javac/preview/PreviewAutoSuppress.java b/test/langtools/tools/javac/preview/PreviewAutoSuppress.java index 20e562fe2d9..c7cffda1f69 100644 --- a/test/langtools/tools/javac/preview/PreviewAutoSuppress.java +++ b/test/langtools/tools/javac/preview/PreviewAutoSuppress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/preview/PreviewErrors.java b/test/langtools/tools/javac/preview/PreviewErrors.java index 3ec1e99b2ed..eab5b2af9bf 100644 --- a/test/langtools/tools/javac/preview/PreviewErrors.java +++ b/test/langtools/tools/javac/preview/PreviewErrors.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/test/langtools/tools/javac/processing/model/TestSymtabItems.java b/test/langtools/tools/javac/processing/model/TestSymtabItems.java index ba9bb20230b..169adc45c36 100644 --- a/test/langtools/tools/javac/processing/model/TestSymtabItems.java +++ b/test/langtools/tools/javac/processing/model/TestSymtabItems.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/test/langtools/tools/javac/processing/model/element/TestFileObjectOf.java b/test/langtools/tools/javac/processing/model/element/TestFileObjectOf.java index 15d04e39d01..ad7c701fa5e 100644 --- a/test/langtools/tools/javac/processing/model/element/TestFileObjectOf.java +++ b/test/langtools/tools/javac/processing/model/element/TestFileObjectOf.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/processing/options/TestNoteOnImplicitProcessing.java b/test/langtools/tools/javac/processing/options/TestNoteOnImplicitProcessing.java index 9d23707c618..73089a9a3cf 100644 --- a/test/langtools/tools/javac/processing/options/TestNoteOnImplicitProcessing.java +++ b/test/langtools/tools/javac/processing/options/TestNoteOnImplicitProcessing.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 diff --git a/test/langtools/tools/javac/records/RecordsBinaryCompatibilityTests.java b/test/langtools/tools/javac/records/RecordsBinaryCompatibilityTests.java index 10ed2809bd0..cd6a52433c2 100644 --- a/test/langtools/tools/javac/records/RecordsBinaryCompatibilityTests.java +++ b/test/langtools/tools/javac/records/RecordsBinaryCompatibilityTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 diff --git a/test/langtools/tools/javac/records/recordComponent/RecordComponentTypeTest.java b/test/langtools/tools/javac/records/recordComponent/RecordComponentTypeTest.java index f7550cb5339..80cbf1dd872 100644 --- a/test/langtools/tools/javac/records/recordComponent/RecordComponentTypeTest.java +++ b/test/langtools/tools/javac/records/recordComponent/RecordComponentTypeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/recovery/AnnotationRecovery.java b/test/langtools/tools/javac/recovery/AnnotationRecovery.java index 1ef98901ddc..89c436912e9 100644 --- a/test/langtools/tools/javac/recovery/AnnotationRecovery.java +++ b/test/langtools/tools/javac/recovery/AnnotationRecovery.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/recovery/LambdaRecovery.java b/test/langtools/tools/javac/recovery/LambdaRecovery.java index cbf8c540c79..54569feabde 100644 --- a/test/langtools/tools/javac/recovery/LambdaRecovery.java +++ b/test/langtools/tools/javac/recovery/LambdaRecovery.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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 diff --git a/test/langtools/tools/javac/recovery/MethodModifiers.java b/test/langtools/tools/javac/recovery/MethodModifiers.java index a8220114700..db1568c1aef 100644 --- a/test/langtools/tools/javac/recovery/MethodModifiers.java +++ b/test/langtools/tools/javac/recovery/MethodModifiers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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 diff --git a/test/langtools/tools/javac/resolve/NoObjectToString.java b/test/langtools/tools/javac/resolve/NoObjectToString.java index dd743bd7784..5296ed3c66d 100644 --- a/test/langtools/tools/javac/resolve/NoObjectToString.java +++ b/test/langtools/tools/javac/resolve/NoObjectToString.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 diff --git a/test/langtools/tools/javac/sealed/BinaryCompatibilityTests.java b/test/langtools/tools/javac/sealed/BinaryCompatibilityTests.java index e505f2a291a..89255bf9fa9 100644 --- a/test/langtools/tools/javac/sealed/BinaryCompatibilityTests.java +++ b/test/langtools/tools/javac/sealed/BinaryCompatibilityTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 diff --git a/test/langtools/tools/javac/sealed/CheckSubtypesOfSealedTest.java b/test/langtools/tools/javac/sealed/CheckSubtypesOfSealedTest.java index f0f27470aef..1371b0dd93b 100644 --- a/test/langtools/tools/javac/sealed/CheckSubtypesOfSealedTest.java +++ b/test/langtools/tools/javac/sealed/CheckSubtypesOfSealedTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/sealed/SealedDiffConfigurationsTest.java b/test/langtools/tools/javac/sealed/SealedDiffConfigurationsTest.java index f2c40422edd..597d4b16e68 100644 --- a/test/langtools/tools/javac/sealed/SealedDiffConfigurationsTest.java +++ b/test/langtools/tools/javac/sealed/SealedDiffConfigurationsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 diff --git a/test/langtools/tools/javac/sym/ElementStructureTest.java b/test/langtools/tools/javac/sym/ElementStructureTest.java index 7a5db50c06a..f1cc3cd91fe 100644 --- a/test/langtools/tools/javac/sym/ElementStructureTest.java +++ b/test/langtools/tools/javac/sym/ElementStructureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 diff --git a/test/langtools/tools/javac/tree/TreeKindTest.java b/test/langtools/tools/javac/tree/TreeKindTest.java index 15b4ae37bbe..547d9deb1ad 100644 --- a/test/langtools/tools/javac/tree/TreeKindTest.java +++ b/test/langtools/tools/javac/tree/TreeKindTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 diff --git a/test/langtools/tools/javac/varargs/6199075/T6199075.java b/test/langtools/tools/javac/varargs/6199075/T6199075.java index 3b90295cb5e..250f740f5d7 100644 --- a/test/langtools/tools/javac/varargs/6199075/T6199075.java +++ b/test/langtools/tools/javac/varargs/6199075/T6199075.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 diff --git a/test/langtools/tools/javac/varargs/7042566/T7042566.java b/test/langtools/tools/javac/varargs/7042566/T7042566.java index b2b37c9d573..1f0e6b768ba 100644 --- a/test/langtools/tools/javac/varargs/7042566/T7042566.java +++ b/test/langtools/tools/javac/varargs/7042566/T7042566.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/test/langtools/tools/javap/T4459541.java b/test/langtools/tools/javap/T4459541.java index 7a05e9fc64c..b5649f264a7 100644 --- a/test/langtools/tools/javap/T4459541.java +++ b/test/langtools/tools/javap/T4459541.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 diff --git a/test/langtools/tools/javap/T6716452.java b/test/langtools/tools/javap/T6716452.java index c2f219a4597..74bfd3a96c7 100644 --- a/test/langtools/tools/javap/T6716452.java +++ b/test/langtools/tools/javap/T6716452.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 diff --git a/test/langtools/tools/javap/T8032814.java b/test/langtools/tools/javap/T8032814.java index 9472ff235dc..7cc263d2fc0 100644 --- a/test/langtools/tools/javap/T8032814.java +++ b/test/langtools/tools/javap/T8032814.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 diff --git a/test/langtools/tools/javap/TestClassNameWarning.java b/test/langtools/tools/javap/TestClassNameWarning.java index bed3c4a2cc3..d55bb29facd 100644 --- a/test/langtools/tools/javap/TestClassNameWarning.java +++ b/test/langtools/tools/javap/TestClassNameWarning.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/test/langtools/tools/javap/classfile/T6887895.java b/test/langtools/tools/javap/classfile/T6887895.java index b6c23a2d40e..01d85508064 100644 --- a/test/langtools/tools/javap/classfile/T6887895.java +++ b/test/langtools/tools/javap/classfile/T6887895.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javap/typeAnnotations/JSR175Annotations.java b/test/langtools/tools/javap/typeAnnotations/JSR175Annotations.java index 540d78acba8..69ca8828352 100644 --- a/test/langtools/tools/javap/typeAnnotations/JSR175Annotations.java +++ b/test/langtools/tools/javap/typeAnnotations/JSR175Annotations.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 diff --git a/test/langtools/tools/javap/typeAnnotations/NewArray.java b/test/langtools/tools/javap/typeAnnotations/NewArray.java index 05760d6a925..44bdb25e726 100644 --- a/test/langtools/tools/javap/typeAnnotations/NewArray.java +++ b/test/langtools/tools/javap/typeAnnotations/NewArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 diff --git a/test/langtools/tools/javap/typeAnnotations/Presence.java b/test/langtools/tools/javap/typeAnnotations/Presence.java index 5e1b2a05dca..bca18f7b671 100644 --- a/test/langtools/tools/javap/typeAnnotations/Presence.java +++ b/test/langtools/tools/javap/typeAnnotations/Presence.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 diff --git a/test/langtools/tools/javap/typeAnnotations/PresenceInner.java b/test/langtools/tools/javap/typeAnnotations/PresenceInner.java index d0cedc42db6..5cf90766873 100644 --- a/test/langtools/tools/javap/typeAnnotations/PresenceInner.java +++ b/test/langtools/tools/javap/typeAnnotations/PresenceInner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javap/typeAnnotations/TypeCasts.java b/test/langtools/tools/javap/typeAnnotations/TypeCasts.java index 8889d7e6db5..1cd8d5abc98 100644 --- a/test/langtools/tools/javap/typeAnnotations/TypeCasts.java +++ b/test/langtools/tools/javap/typeAnnotations/TypeCasts.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/javap/typeAnnotations/Visibility.java b/test/langtools/tools/javap/typeAnnotations/Visibility.java index 48bfbed343e..086e9cde8d8 100644 --- a/test/langtools/tools/javap/typeAnnotations/Visibility.java +++ b/test/langtools/tools/javap/typeAnnotations/Visibility.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 diff --git a/test/langtools/tools/javap/typeAnnotations/Wildcards.java b/test/langtools/tools/javap/typeAnnotations/Wildcards.java index a4e9b0609e8..7da81d1d5f7 100644 --- a/test/langtools/tools/javap/typeAnnotations/Wildcards.java +++ b/test/langtools/tools/javap/typeAnnotations/Wildcards.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * 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 diff --git a/test/langtools/tools/jdeps/listdeps/ListModuleDeps.java b/test/langtools/tools/jdeps/listdeps/ListModuleDeps.java index 63814220c03..b3f81ca1e1e 100644 --- a/test/langtools/tools/jdeps/listdeps/ListModuleDeps.java +++ b/test/langtools/tools/jdeps/listdeps/ListModuleDeps.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 diff --git a/test/langtools/tools/lib/toolbox/AbstractTask.java b/test/langtools/tools/lib/toolbox/AbstractTask.java index 778a5398605..a4d2832460d 100644 --- a/test/langtools/tools/lib/toolbox/AbstractTask.java +++ b/test/langtools/tools/lib/toolbox/AbstractTask.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/lib/toolbox/JavacTask.java b/test/langtools/tools/lib/toolbox/JavacTask.java index ed056099e84..49d14de2d1e 100644 --- a/test/langtools/tools/lib/toolbox/JavacTask.java +++ b/test/langtools/tools/lib/toolbox/JavacTask.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/test/langtools/tools/lib/toolbox/ToolBox.java b/test/langtools/tools/lib/toolbox/ToolBox.java index 8f1f8d3ce4a..0763da16ee5 100644 --- a/test/langtools/tools/lib/toolbox/ToolBox.java +++ b/test/langtools/tools/lib/toolbox/ToolBox.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 From ef6e987a006ef81fb0cc6c12a88ee954738ec5d0 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Thu, 12 Dec 2024 12:48:06 +0000 Subject: [PATCH 07/93] 8346040: Zero interpreter build on Linux Aarch64 is broken Reviewed-by: kbarrett, dholmes --- src/hotspot/share/oops/compressedKlass.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/hotspot/share/oops/compressedKlass.hpp b/src/hotspot/share/oops/compressedKlass.hpp index f0615283f33..dd54c8130eb 100644 --- a/src/hotspot/share/oops/compressedKlass.hpp +++ b/src/hotspot/share/oops/compressedKlass.hpp @@ -258,9 +258,15 @@ class CompressedKlassPointers : public AllStatic { is_aligned(addr, klass_alignment_in_bytes()); } - // Check that with the given base, shift and range, aarch64 an encode and decode the klass pointer. - static bool check_klass_decode_mode(address base, int shift, const size_t range) NOT_AARCH64({ return true;}); - static bool set_klass_decode_mode() NOT_AARCH64({ return true;}); // can be called after initialization +#if defined(AARCH64) && !defined(ZERO) + // Check that with the given base, shift and range, aarch64 code can encode and decode the klass pointer. + static bool check_klass_decode_mode(address base, int shift, const size_t range); + // Called after initialization. + static bool set_klass_decode_mode(); +#else + static bool check_klass_decode_mode(address base, int shift, const size_t range) { return true; } + static bool set_klass_decode_mode() { return true; } +#endif }; #endif // SHARE_OOPS_COMPRESSEDKLASS_HPP From b8bb51e1f334c84a34e02e65e2e2789231465ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Walln=C3=B6fer?= Date: Thu, 12 Dec 2024 13:14:17 +0000 Subject: [PATCH 08/93] 8345908: Class links should be properly spaced Reviewed-by: prappo --- .../internal/doclets/formats/html/ClassWriter.java | 12 +++++------- .../doclet/testClassLinks/TestClassLinks.java | 14 +++++++------- .../doclet/testHiddenTag/TestHiddenTag.java | 6 +++--- .../doclet/testInterface/TestInterface.java | 4 ++-- .../TestNewLanguageFeatures.java | 4 ++-- .../testPrivateClasses/TestPrivateClasses.java | 11 +++++------ 6 files changed, 24 insertions(+), 27 deletions(-) diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriter.java index d934a9aab63..bef634b0ddb 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriter.java @@ -740,16 +740,14 @@ private Content getClassLinks(HtmlLinkInfo.Kind context, Collection list) { } // TODO: should we simply split this method up to avoid instanceof ? if (type instanceof TypeElement te) { - Content link = getLink( - new HtmlLinkInfo(configuration, context, te)); - content.add(HtmlTree.CODE(link)); + content.add(getLink( + new HtmlLinkInfo(configuration, context, te))); } else { - Content link = getLink( - new HtmlLinkInfo(configuration, context, ((TypeMirror)type))); - content.add(HtmlTree.CODE(link)); + content.add(getLink( + new HtmlLinkInfo(configuration, context, ((TypeMirror)type)))); } } - return content; + return HtmlTree.CODE(content); } /** diff --git a/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java b/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java index a2bffa15305..21bb4abb2e6 100644 --- a/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java +++ b/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 8163800 8175200 8186332 8182765 + * @bug 8163800 8175200 8186332 8182765 8345908 * @summary The fix for JDK-8072052 shows up other minor incorrect use of styles * @library ../../lib * @modules jdk.javadoc/jdk.javadoc.internal.tool @@ -66,10 +66,10 @@ public void test() { checkOutput("p/C3.html", true, """ - I1, I12, I2, IT1<\ - /a><T>, IT2<\ + I1, I12, I2, IT1<\ + /a><T>, IT2<\ java.lang.String>""", """ C3()"""); @@ -90,7 +90,7 @@ public void test() { """ C3""", """ - I1, I1, I2"""); checkOutput("p/IT1.html", true, diff --git a/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java b/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java index 0a92a489727..27e7d81398c 100644 --- a/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java +++ b/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -59,8 +59,8 @@ public void test1() { """
Direct Known Subclasses:
A.VisibleInner\ - , A.VisibleInnerExtendsInvisibleInner
"""); + , A.Vis\ + ibleInnerExtendsInvisibleInner
"""); checkOutput("pkg1/A.html", false, "invisibleField", diff --git a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java index 214f134f3ad..5fcf2c6cb58 100644 --- a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java +++ b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java @@ -76,8 +76,8 @@ public void test() { """
All Known Implementing Classes:
-
Child, Parent
+
Child, Parent
"""); checkOutput("pkg/Child.html", true, diff --git a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java index 531fed92bc2..af98f1fd07a 100644 --- a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java +++ b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java @@ -218,8 +218,8 @@ void checkTypeParameters() {
All Implemented Interfaces:
SubInterface&\ - lt;E>, Su\ - perInterface<E>
+ lt;E>, SuperInterface<\ + /a><E>
"""); checkOutput("pkg/SuperInterface.html", true, diff --git a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java index bf715f895a3..5bf6a73a7cc 100644 --- a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java +++ b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -187,8 +187,8 @@ public void testPrivate() {
All Implemented Interfaces:
PrivateInterf\ - ace, Pu\ - blicInterface
+ ace, PublicInterface\ +
""", """
public class
All Known Implementing Classes:
-
PrivateParent, PublicChild
+
PrivateParent, <\ + a href="PublicChild.html" title="class in pkg">PublicChild
"""); checkOutput("pkg/PrivateInterface.html", true, From f71d51502673bc95d66aa568e98e4801613497a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Walln=C3=B6fer?= Date: Thu, 12 Dec 2024 13:28:58 +0000 Subject: [PATCH 09/93] 8345777: Improve sections for inherited members Reviewed-by: prappo --- .../html/AbstractExecutableMemberWriter.java | 13 ++- .../formats/html/AbstractMemberWriter.java | 17 +++- .../doclets/formats/html/FieldWriter.java | 3 +- .../doclets/formats/html/HtmlLinkFactory.java | 33 ++++--- .../doclets/formats/html/HtmlLinkInfo.java | 42 +++++---- .../doclets/formats/html/MethodWriter.java | 3 +- .../formats/html/NestedClassWriter.java | 4 +- .../doclets/formats/html/PropertyWriter.java | 3 +- .../doclet/testHiddenTag/TestHiddenTag.java | 9 +- .../doclet/testInterface/TestInterface.java | 19 ++-- .../javadoc/doclet/testJavaFX/TestJavaFX.java | 4 +- .../TestMemberInheritance.java | 16 ++-- .../TestMultiInheritance.java | 14 +-- .../TestOverriddenDeprecatedMethods.java | 4 +- .../TestOverrideMethods.java | 86 +++++++++++-------- .../TestPrivateClasses.java | 10 +-- 16 files changed, 153 insertions(+), 127 deletions(-) diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java index 7efaec87692..15f55d18cc0 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java @@ -31,7 +31,6 @@ import javax.lang.model.element.ElementKind; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.TypeElement; -import javax.lang.model.element.TypeParameterElement; import javax.lang.model.element.VariableElement; import javax.lang.model.type.DeclaredType; import javax.lang.model.type.ExecutableType; @@ -43,7 +42,6 @@ import jdk.javadoc.internal.html.Content; import jdk.javadoc.internal.html.ContentBuilder; import jdk.javadoc.internal.html.Entity; -import jdk.javadoc.internal.html.HtmlTag; import jdk.javadoc.internal.html.HtmlTree; import jdk.javadoc.internal.html.Text; @@ -94,7 +92,6 @@ protected AbstractExecutableMemberWriter(SubWriterHolderWriter writer) { */ protected Content getTypeParameters(ExecutableElement member) { HtmlLinkInfo linkInfo = new HtmlLinkInfo(configuration, LINK_TYPE_PARAMS_AND_BOUNDS, member) - .addLineBreaksInTypeParameters(true) .showTypeParameterAnnotations(true); return writer.getTypeParameterLinks(linkInfo); } @@ -129,7 +126,15 @@ protected void addSummaryLink(HtmlLinkInfo.Kind context, TypeElement te, Element @Override protected void addInheritedSummaryLink(TypeElement te, Element member, Content target) { - target.add(writer.getDocLink(PLAIN, te, member, name(member))); + // Use method name as link label, but add signature as title attribute + String name = name(member); + ExecutableElement ee = (ExecutableElement) member; + String title = name + utils.makeSignature(ee, typeElement, false, true); + target.add(writer.getLink(new HtmlLinkInfo(configuration, PLAIN, te) + .label(name) + .fragment(htmlIds.forMember(ee).getFirst().name()) + .targetMember(member) + .title(title))); } /** diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java index 59a8f589230..4f2e17aa876 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java @@ -52,8 +52,8 @@ import jdk.javadoc.internal.html.Content; import jdk.javadoc.internal.html.ContentBuilder; import jdk.javadoc.internal.html.Entity; -import jdk.javadoc.internal.html.HtmlTag; import jdk.javadoc.internal.html.HtmlTree; +import jdk.javadoc.internal.html.Text; import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.ANNOTATION_TYPE_MEMBER; import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.ANNOTATION_TYPE_MEMBER_OPTIONAL; @@ -717,4 +717,19 @@ protected Content getMemberListItem(Content memberContent) { return writer.getMemberListItem(memberContent); } + /** + * {@return a link to the member summary section of class or interface {@code element} indicated + * by {@code summaryKind} with the simple type name as link label, or the fully qualified type name + * if the class or interface is not linkable} + */ + protected Content getMemberSummaryLinkOrFQN(TypeElement element, VisibleMemberTable.Kind summaryKind) { + if (utils.isLinkable(element)) { + return writer.getLink((new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.PLAIN, element) + .label(utils.getSimpleName(element)) + .fragment(HtmlIds.forMemberSummary(summaryKind).name()))); + } else { + return Text.of(utils.getFullyQualifiedName(element)); + } + } + } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriter.java index 213078712eb..c71d62d57e4 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriter.java @@ -230,8 +230,7 @@ protected Table createSummaryTable() { @Override public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { - Content classLink = writer.getPreQualifiedClassLink( - HtmlLinkInfo.Kind.PLAIN, typeElement); + Content classLink = getMemberSummaryLinkOrFQN(typeElement, VisibleMemberTable.Kind.FIELDS); Content label; if (options.summarizeOverriddenMethods()) { label = Text.of(utils.isClass(typeElement) diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java index 54da5af14a9..3dce7920db9 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java @@ -236,20 +236,16 @@ public Content visitDeclared(DeclaredType type, HtmlLinkInfo linkInfo) { protected Content getClassLink(HtmlLinkInfo linkInfo) { BaseConfiguration configuration = m_writer.configuration; TypeElement typeElement = linkInfo.getTypeElement(); - // Create a tool tip if we are linking to a class or interface. Don't - // create one if we are linking to a member. - String title = ""; - String fragment = linkInfo.getFragment(); - boolean hasFragment = fragment != null && !fragment.isEmpty(); - if (!hasFragment) { - boolean isTypeLink = linkInfo.getType() != null && - utils.isTypeVariable(utils.getComponentType(linkInfo.getType())); - title = getClassToolTip(typeElement, isTypeLink); - if (isTypeLink) { - linkInfo.fragment(m_writer.configuration.htmlIds.forTypeParam( - utils.getTypeName(utils.getComponentType(linkInfo.getType()), false), - typeElement).name()); - } + // Create a tool tip if we are linking to a class or interface, or one of + // its summary sections. Don't create one if we are linking to a member. + boolean isPageOrSummaryLink = linkInfo.isPageOrSummaryLink(); + TypeMirror type = linkInfo.getType(); + if (type != null && utils.isTypeVariable(utils.getComponentType(type))) { + linkInfo.fragment(m_writer.configuration.htmlIds.forTypeParam( + utils.getTypeName(utils.getComponentType(type), false), typeElement).name()) + .title(getClassToolTip(typeElement, true)); + } else if (isPageOrSummaryLink) { + linkInfo.title(getClassToolTip(typeElement, false)); } Content label = linkInfo.getClassLinkLabel(configuration); if (linkInfo.getContext() == HtmlLinkInfo.Kind.SHOW_TYPE_PARAMS_IN_LABEL) { @@ -261,7 +257,7 @@ protected Content getClassLink(HtmlLinkInfo linkInfo) { Element previewTarget; ExecutableElement restrictedTarget; boolean showPreview = !linkInfo.isSkipPreview(); - if (!hasFragment && showPreview) { + if (isPageOrSummaryLink && showPreview) { flags = utils.elementFlags(typeElement); previewTarget = typeElement; restrictedTarget = null; @@ -301,7 +297,7 @@ protected Content getClassLink(HtmlLinkInfo linkInfo) { if (linkInfo.linkToSelf() || typeElement != m_writer.getCurrentPageElement()) { link.add(m_writer.links.createLink( fileName.fragment(linkInfo.getFragment()), - label, linkInfo.getStyle(), title)); + label, linkInfo.getStyle(), linkInfo.getTitle())); addSuperscript(link, flags, fileName, null, previewTarget, restrictedTarget); return link; } @@ -461,11 +457,12 @@ private HtmlLinkInfo getBoundsLinkInfo(HtmlLinkInfo linkInfo, TypeMirror bound) * Given a class, return the appropriate tool tip. * * @param typeElement the class to get the tool tip for. + * @param isTypeParamLink true if link target is a type parameter * @return the tool tip for the appropriate class. */ - private String getClassToolTip(TypeElement typeElement, boolean isTypeLink) { + private String getClassToolTip(TypeElement typeElement, boolean isTypeParamLink) { Resources resources = m_writer.configuration.getDocResources(); - if (isTypeLink) { + if (isTypeParamLink) { return resources.getText("doclet.Href_Type_Param_Title", utils.getSimpleName(typeElement)); } else if (utils.isPlainInterface(typeElement)){ diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkInfo.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkInfo.java index 0b7be8fe656..9b568673191 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkInfo.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkInfo.java @@ -31,7 +31,6 @@ import javax.lang.model.type.DeclaredType; import javax.lang.model.type.TypeMirror; -import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyles; import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration; import jdk.javadoc.internal.doclets.toolkit.util.Utils; import jdk.javadoc.internal.html.Content; @@ -110,6 +109,9 @@ public enum Kind { // The label for the link. private Content label; + // The title attribute for the link + private String title; + // True if we should print the type bounds for the type parameter. private boolean showTypeBounds = true; @@ -123,9 +125,6 @@ public enum Kind { // True iff the preview flags should be skipped for this link. private boolean skipPreview; - // True if type parameters should be separated by hard line breaks. - private boolean addLineBreaksInTypeParameters = false; - // True if additional tags should be added to type parameters private boolean addLineBreakOpportunitiesInTypeParameters = false; @@ -183,7 +182,6 @@ public HtmlLinkInfo forType(TypeMirror type) { linkInfo.showTypeBounds = showTypeBounds; linkInfo.linkTypeParameters = linkTypeParameters; linkInfo.linkToSelf = linkToSelf; - linkInfo.addLineBreaksInTypeParameters = addLineBreaksInTypeParameters; linkInfo.showTypeParameterAnnotations = showTypeParameterAnnotations; linkInfo.skipPreview = skipPreview; return linkInfo; @@ -264,6 +262,23 @@ public HtmlStyle getStyle() { return style; } + /** + * Sets the title attribute for the link. + * @param title the value of the title attribute + * @return this object + */ + public HtmlLinkInfo title(String title) { + this.title = title; + return this; + } + + /** + * {@return the value of the title attribute} + */ + public String getTitle() { + return title; + } + /** * Set whether or not this is a link to a varargs parameter. * @param varargs the new value @@ -299,20 +314,10 @@ public String getFragment() { } /** - * Sets the addLineBreaksInTypeParameters flag for this link. - * @param addLineBreaksInTypeParameters the new value - * @return this object - */ - public HtmlLinkInfo addLineBreaksInTypeParameters(boolean addLineBreaksInTypeParameters) { - this.addLineBreaksInTypeParameters = addLineBreaksInTypeParameters; - return this; - } - - /** - * {@return true if type parameters should be separated by line breaks} + * {@return {@code true} if the link target is the top level page or one of its summary sections} */ - public boolean addLineBreaksInTypeParameters() { - return addLineBreaksInTypeParameters; + public boolean isPageOrSummaryLink() { + return fragment == null || fragment.isEmpty() || fragment.endsWith("-summary"); } /** @@ -506,7 +511,6 @@ public String toString() { ", showTypeBounds=" + showTypeBounds + ", linkTypeParameters=" + linkTypeParameters + ", linkToSelf=" + linkToSelf + - ", addLineBreaksInTypeParameters=" + addLineBreaksInTypeParameters + ", showTypeParameterAnnotations=" + showTypeParameterAnnotations + ", context=" + context + ", fragment=" + fragment + diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriter.java index 9325bc07a6d..1f3cfe26801 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriter.java @@ -306,8 +306,7 @@ protected Table createSummaryTable() { @Override public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { - Content classLink = writer.getPreQualifiedClassLink( - HtmlLinkInfo.Kind.PLAIN, typeElement); + Content classLink = getMemberSummaryLinkOrFQN(typeElement, VisibleMemberTable.Kind.METHODS); Content label; if (options.summarizeOverriddenMethods()) { label = Text.of(utils.isClass(typeElement) diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java index fdd250f4f01..8368172430e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriter.java @@ -105,7 +105,7 @@ protected Table createSummaryTable() { @Override public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { - Content classLink = writer.getPreQualifiedClassLink(HtmlLinkInfo.Kind.PLAIN, typeElement); + Content classLink = getMemberSummaryLinkOrFQN(typeElement, VisibleMemberTable.Kind.NESTED_CLASSES); Content label; if (options.summarizeOverriddenMethods()) { label = Text.of(utils.isPlainInterface(typeElement) @@ -135,7 +135,7 @@ protected void addSummaryLink(HtmlLinkInfo.Kind context, TypeElement typeElement @Override protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content target) { target.add( - writer.getLink(new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.LINK_TYPE_PARAMS_AND_BOUNDS, + writer.getLink(new HtmlLinkInfo(configuration, HtmlLinkInfo.Kind.SHOW_TYPE_PARAMS, (TypeElement)member))); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriter.java index 7365b9b3b8f..294923f43a1 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriter.java @@ -259,8 +259,7 @@ protected Table createSummaryTable() { @Override public void addInheritedSummaryLabel(TypeElement typeElement, Content content) { - Content classLink = writer.getPreQualifiedClassLink( - HtmlLinkInfo.Kind.PLAIN, typeElement); + Content classLink = getMemberSummaryLinkOrFQN(typeElement, VisibleMemberTable.Kind.PROPERTIES); Content label; if (options.summarizeOverriddenMethods()) { label = Text.of(utils.isClass(typeElement) diff --git a/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java b/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java index 27e7d81398c..3ffb8b36ba3 100644 --- a/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java +++ b/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java @@ -70,10 +70,11 @@ public void test1() { """ visibleField""", """ - visibleMethod""", + visibleMethod""", """

Nested classes/interfaces in\ - herited from class pkg1.A

+ herited from class A A.VisibleInner, A.Visible\ InnerExtendsInvisibleInner
@@ -92,7 +93,7 @@ public void test1() { """ visibleField""", """ - visibleMethod"""); + visibleMethod"""); checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", false, "invisibleField", @@ -127,7 +128,7 @@ public void test1() { """ visibleMethod""", """ - visibleDefaultMethod""", + visibleDefaultMethod""", // Invisible return or parameter types must not be linked """ pkg1.InvisibleParent""", diff --git a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java index 5fcf2c6cb58..3b6d2fee06d 100644 --- a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java +++ b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java @@ -205,22 +205,13 @@ public void test2() { // Ensure the correct type parameters are displayed correctly """

Nested classes/int\ - erfaces inherited from interface pkg2.Spliterator

+ erfaces inherited from interface Spliterator Spliterator.\ OfDouble, Spliter\ - ator.OfInt<Integer>, Spliterator.OfPrimitive<T, T_C\ - ONS, T_SPLITR extends Spliterator.OfPrimitive<T,<\ - a href="Spliterator.OfPrimitive.html#type-param-T_CONS" title="type parameter in Spliterator.OfPri\ - mitive">T_CONS,T_SPLITR>>"""); + ator.OfInt<Integer>, Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>"""); checkOutput("pkg2/Spliterator.html", true, """
Nested Classes
diff --git a/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java b/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java index be7afd303a5..cc1706bb17d 100644 --- a/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java +++ b/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -240,7 +240,7 @@ public void test1() { checkOutput("pkg1/D.html", true, """

Properties inherited from class&\ - nbsp;pkg1.C

+ nbsp;C paused, rate"""); checkOutput("pkg1/D.html", false, "shouldNotAppear"); diff --git a/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java b/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java index ab1142f6a23..91eda7db191 100644 --- a/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java +++ b/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java @@ -56,7 +56,7 @@ public void test() { """, // Public method should be inherited """ - """, + """, // Public inner class should be inherited. """ """, @@ -65,16 +65,17 @@ public void test() { """, // Protected method should be inherited """ - """, + """, // Protected inner class should be inherited. """ """, // New labels as of 1.5.0 """ - Nested classes/interfaces inherited from class pkg.BaseClass""", + Nested classes/interfaces inherited from class BaseClass""", """ - Nested classes/interfaces inherited from interface pkg.BaseInterface"""); + Nested classes/interfaces inherited from interface BaseInterface"""); checkOutput("pkg/BaseClass.html", true, // Test overriding/implementing methods with generic parameters. @@ -89,7 +90,7 @@ interface in pkg">BaseInterface
checkOutput("diamond/Z.html", true, // Test diamond inheritance member summary (6256068) """ - aMethod"""); + aMethod"""); checkOutput("inheritDist/C.html", true, // Test that doc is inherited from closed parent (6270645) @@ -112,7 +113,8 @@ interface in pkg">BaseInterface
checkOutput("pkg1/Implementer.html", false, """ -

Methods inherited from interface pkg1.Interface

+

Methods inherited from interface Interface

between""" ); diff --git a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestMultiInheritance.java b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestMultiInheritance.java index ccd28448866..5ff7e83811e 100644 --- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestMultiInheritance.java +++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestMultiInheritance.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -52,24 +52,24 @@ public void test() { checkOutput("pkg3/I1.html", true, """ - Methods inherited from interface pkg3.I2""", + Methods inherited from interface I2""", """ - Methods inherited from interface pkg3.I3"""); + Methods inherited from interface I3"""); checkOutput("pkg3/I0.html", true, """ - Methods inherited from interface pkg3.I2""", + Methods inherited from interface I2""", """ - Methods inherited from interface pkg3.I3"""); + Methods inherited from interface I3"""); // Method foo() is NOT inherited from I4 because it is overridden by I3. checkOutput("pkg3/I1.html", false, """ - Methods inherited from interface pkg3.I4"""); + Methods inherited from interface I4"""); checkOutput("pkg3/I0.html", false, """ - Methods inherited from interface pkg3.I4"""); + Methods inherited from interface I4"""); } } diff --git a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java index 23e56b22c5c..af6313abd65 100644 --- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java +++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -53,7 +53,7 @@ public void test() { checkOrder("pkg1/SubClass.html", "Method Summary", """ - Methods declared in class pkg1.BaseClass""", + Methods declared in class BaseClass""", """ func3"""); diff --git a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java index 8b26d3800a5..8a4aa614cd2 100644 --- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java +++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8157000 8192850 8182765 8223607 8261976 8281376 8313204 + * @bug 8157000 8192850 8182765 8223607 8261976 8281376 8313204 8345777 * @summary test the behavior of --override-methods option * @library ../../lib * @modules jdk.javadoc/jdk.javadoc.internal.tool @@ -79,25 +79,22 @@ public void testSummary() { checkOrder("pkg5/Classes.C.html", // Check nested classes - "Nested classes/interfaces declared in class pkg5.", - "Classes.P", - "Classes.P.PN.html", + "Nested classes/interfaces declared in class ", + "Classes.P.html#nested-class-summary", "Classes.P.PN.html", - """ - type parameter in Classes.P.PN">K""", - "type parameter in Classes.P.PN", + "K", "V", // Check properties """ - Properties declared in class pkg5.rate""", // Check fields """ - Fields declared in class pkg5.field0", @@ -116,9 +113,16 @@ public void testSummary() { // Check footnotes """ - Methods declared in class pkg5.m0", + """ + Classes.GP.html#m0()" title="m0()">m0""", + + // Check methods from java.lang.Object + """ + Methods declared in class java.lang.Object""", + """ + clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait""", // Check method details for override """ @@ -132,16 +136,20 @@ public void testSummary() { checkOrder("pkg5/Classes.C.html", // Check footnotes 2 - "Methods declared in class pkg5.", """ - Classes.P.html#getRate()">getRate""", - "Classes.P.html#m2()\">m2", - "Classes.P.html#m3()\">m3", - "Classes.P.html#m4(K,V)\">m4", + Methods declared in class rateProperty""", + Classes.P.html#getRate()" title="getRate()">getRate""", """ - Classes.P.html#setRate(double)">setRate""", + Classes.P.html#m2()" title="m2()">m2""", + """ + Classes.P.html#m3()" title="m3()">m3""", + """ + Classes.P.html#m4(K,V)" title="m4(Object, Object)">m4""", + """ + Classes.P.html#rateProperty()" title="rateProperty()">rateProperty""", + """ + Classes.P.html#setRate(double)" title="setRate(double)">setRate""", // Check @link """ @@ -221,18 +229,19 @@ public void testSummary() { Interfaces.C.html#o()">Interfaces.C.o()""", // Check nested classes - "Nested classes/interfaces declared in interface pkg5.", + "Nested classes/interfaces declared in interface ", "Interfaces.A", "Interfaces.A.AA.html", "Interfaces.A.AA", // Check properties """ - Properties declared in interface pkg5.Interfaces.A""", + Properties declared in interface Interfaces.A""", // Check Fields """ - Fields declared in interface pkg5.QUOTE", "Interfaces.A.html#rate\">rate", @@ -244,20 +253,23 @@ public void testSummary() { // Check footnotes """ - Methods declared in interface pkg5.getRate""", + """ + Interfaces.A.html#rateProperty()" title="rateProperty()">rateProperty""", + """ + Interfaces.A.html#setRate(double)" title="setRate(double)">setRate""", """ - Interfaces.A.html#getRate()">getRate""", + Methods declared in interface rateProperty""", - "Interfaces.A.html#setRate(double)", + Interfaces.B.html#m1()" title="m1()">m1""", """ - Methods declared in interface pkg5.m1", - "Interfaces.B.html#m3()\">m3", + Interfaces.B.html#m3()" title="m3()">m3""", """ - Methods declared in interface pkg5.o""" + o""" ); // Test synthetic values and valuesof of an enum. @@ -376,9 +388,10 @@ public void testSummary() { """, """
-

Methods declared in class p\ - kg6.Base

- m1, m3, m9
+

Methods declared in class <\ + a href="Base.html#method-summary" title="class in pkg6">Base

+ m1, m3, m9 """); } @@ -399,9 +412,10 @@ public void testSummaryAnnotations() { """

Methods declared in int\ - erface pkg7.Annotate\ - dBase

- m1
"""); + erface AnnotatedBase + m1"""); checkOutput("pkg7/AnnotatedSub2.html", true, """ diff --git a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java index 5bf6a73a7cc..d9117864c34 100644 --- a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java +++ b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java @@ -158,14 +158,14 @@ public void testPrivate() { checkOutput("pkg/PublicChild.html", true, // Field inheritance from non-public superclass. """ - Fields inherited from class pkg.PrivateParent""", + Fields inherited from class PrivateParent""", """ fieldInheritedFromParent""", // Method inheritance from non-public superclass. """ - Methods inherited from class pkg.PrivateParent""", + Methods inherited from class PrivateParent""", """ - methodInheritedFromParent""", + methodInheritedFromParent""", // Should document that a method overrides method from private class. """
Overrides:
@@ -197,12 +197,12 @@ public void testPrivate() { checkOutput("pkg/PublicInterface.html", true, // Field inheritance from non-public superinterface. """ - Fields inherited from interface pkg.PrivateInterface""", + Fields inherited from interface PrivateInterface""", """ fieldInheritedFromInterface""", // Method inheritance from non-public superinterface. """ - Methods inherited from interface pkg.PrivateInterface""", + Methods inherited from interface PrivateInterface""", // Extend documented private classes or interfaces "extends", "All Superinterfaces", From 22845a77a2175202876d0029f75fa32271e07b91 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Thu, 12 Dec 2024 14:40:04 +0000 Subject: [PATCH 10/93] 8337995: ZUtils::fill uses std::fill_n Reviewed-by: mli, stefank, jwaters, tschatzl --- src/hotspot/share/gc/z/zUtils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/gc/z/zUtils.cpp b/src/hotspot/share/gc/z/zUtils.cpp index 3804baad595..7997242f391 100644 --- a/src/hotspot/share/gc/z/zUtils.cpp +++ b/src/hotspot/share/gc/z/zUtils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -25,8 +25,6 @@ #include "gc/z/zUtils.hpp" #include "runtime/nonJavaThread.hpp" -#include - const char* ZUtils::thread_name() { const Thread* const thread = Thread::current(); if (thread->is_Named_thread()) { @@ -38,5 +36,7 @@ const char* ZUtils::thread_name() { } void ZUtils::fill(uintptr_t* addr, size_t count, uintptr_t value) { - std::fill_n(addr, count, value); + for (size_t i = 0; i < count; ++i) { + addr[i] = value; + } } From 11cd639842b61952755ad83e88446c91237c19f5 Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Thu, 12 Dec 2024 17:58:05 +0000 Subject: [PATCH 11/93] 8345573: Module dependencies not resolved from run-time image when --limit-module is being used Reviewed-by: mchung --- .../jdk/tools/jlink/internal/JlinkTask.java | 276 ++++++++---------- test/jdk/tools/jlink/IntegrationTest.java | 6 +- .../jlink/bindservices/BindServices.java | 46 +-- .../jlink/bindservices/SuggestProviders.java | 53 ++-- .../AbstractLinkableRuntimeTest.java | 3 +- 5 files changed, 184 insertions(+), 200 deletions(-) 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 0eda0b5d455..6717d5517d1 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 @@ -49,7 +49,6 @@ 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.Date; import java.util.HashMap; @@ -378,43 +377,61 @@ public static void createImage(JlinkConfiguration config, // the token for "all modules on the module path" private static final String ALL_MODULE_PATH = "ALL-MODULE-PATH"; private JlinkConfiguration initJlinkConfig() throws BadArgs { - Set roots = new HashSet<>(); - for (String mod : options.addMods) { - if (mod.equals(ALL_MODULE_PATH) && options.modulePath.size() > 0) { - ModuleFinder finder = newModuleFinder(options.modulePath, options.limitMods, Set.of()); - // all observable modules are roots - finder.findAll() - .stream() - .map(ModuleReference::descriptor) - .map(ModuleDescriptor::name) - .forEach(mn -> roots.add(mn)); - } else { - roots.add(mod); - } - } - - ModuleFinder finder = newModuleFinder(options.modulePath, options.limitMods, roots); - if (finder.find("java.base").isEmpty()) { + ModuleFinder appModuleFinder = newModuleFinder(options.modulePath); + ModuleFinder finder = appModuleFinder; + boolean isLinkFromRuntime = false; + if (!appModuleFinder.find("java.base").isPresent()) { + // If the application module finder doesn't contain the + // java.base module we have one of two cases: + // 1. A custom module is being linked into a runtime, but the JDK + // modules have not been provided on the module path. + // 2. We have a run-time image based link. + // + // Distinguish case 2 by adding the default 'jmods' folder and try + // the look-up again. For case 1 this will now find java.base, but + // not for case 2, since the jmods folder is not there or doesn't + // include the java.base module. Path defModPath = getDefaultModulePath(); if (defModPath != null) { options.modulePath.add(defModPath); + finder = newModuleFinder(options.modulePath); + } + // We've just added the default module path ('jmods'). If we still + // don't find java.base, we must resolve JDK modules from the + // current run-time image. + if (!finder.find("java.base").isPresent()) { + // If we don't have a linkable run-time image this is an error + if (!LinkableRuntimeImage.isLinkableRuntime()) { + throw taskHelper.newBadArgs("err.runtime.link.not.linkable.runtime"); + } + isLinkFromRuntime = true; + // JDK modules come from the system module path + finder = ModuleFinder.compose(ModuleFinder.ofSystem(), appModuleFinder); } - finder = newModuleFinder(options.modulePath, options.limitMods, roots); } - boolean isLinkFromRuntime = options.modulePath.isEmpty(); - // In case of custom modules outside the JDK we may - // have a non-empty module path, which must not include - // java.base. If it did, we link using packaged modules from that - // module path. If the module path does not include java.base, we have - // the case where we link from the run-time image. In that case, we take - // the JDK modules from the run-time image (ModuleFinder.ofSystem()). - if (finder.find("java.base").isEmpty()) { - isLinkFromRuntime = true; - ModuleFinder runtimeImageFinder = ModuleFinder.ofSystem(); - finder = combinedFinders(runtimeImageFinder, finder, options.limitMods, roots); + // Sanity check version if we use JMODs + if (!isLinkFromRuntime) { + checkJavaBaseVersion(finder); } + // Determine the roots set + Set roots = new HashSet<>(); + for (String mod : options.addMods) { + if (mod.equals(ALL_MODULE_PATH)) { + ModuleFinder mf = newLimitedFinder(finder, options.limitMods, + Set.of()); + mf.findAll() + .stream() + .map(ModuleReference::descriptor) + .map(ModuleDescriptor::name) + .forEach(mn -> roots.add(mn)); + } else { + roots.add(mod); + } + } + finder = newLimitedFinder(finder, options.limitMods, roots); + // --keep-packaged-modules doesn't make sense as we are not linking // from packaged modules to begin with. if (isLinkFromRuntime && options.packagedModulesPath != null) { @@ -429,48 +446,13 @@ private JlinkConfiguration initJlinkConfig() throws BadArgs { options.generateLinkableRuntime); } - /** - * Creates a combined module finder of {@code finder} and - * {@code runtimeImageFinder} that first looks-up modules in the - * {@code runtimeImageFinder} and if not present in {@code finder}. - * - * @param runtimeImageFinder A system modules finder. - * @param finder A module finder based on packaged modules. - * @param limitMods The set of limited modules for the resulting - * finder (if any). - * @param roots All module roots. - * - * @return A combined finder, or the input finder, potentially applying - * module limits. + /* + * Creates a ModuleFinder for the given module paths. */ - private ModuleFinder combinedFinders(ModuleFinder runtimeImageFinder, - ModuleFinder finder, - Set limitMods, - Set roots) { - ModuleFinder combined = new ModuleFinder() { - - @Override - public Optional find(String name) { - Optional mref = runtimeImageFinder.find(name); - if (mref.isEmpty()) { - return finder.find(name); - } - return mref; - } - - @Override - public Set findAll() { - Set all = new HashSet<>(); - all.addAll(runtimeImageFinder.findAll()); - all.addAll(finder.findAll()); - return Collections.unmodifiableSet(all); - } - }; - // if limitmods is specified then limit the universe - if (limitMods != null && !limitMods.isEmpty()) { - return limitFinder(combined, limitMods, Objects.requireNonNull(roots)); - } - return combined; + public static ModuleFinder newModuleFinder(List paths) { + Runtime.Version version = Runtime.version(); + Path[] entries = paths.toArray(new Path[0]); + return ModulePath.of(version, true, entries); } private void createImage(JlinkConfiguration config) throws Exception { @@ -510,48 +492,81 @@ public static Path getDefaultModulePath() { } /* - * Returns a module finder of the given module path or the system modules - * if the module path is empty that limits the observable modules to those - * in the transitive closure of the modules specified in {@code limitMods} - * plus other modules specified in the {@code roots} set. + * Returns a module finder of the given module finder that limits the + * observable modules to those in the transitive closure of the modules + * specified in {@code limitMods} plus other modules specified in the + * {@code roots} set. + */ + public static ModuleFinder newLimitedFinder(ModuleFinder finder, + Set limitMods, + Set roots) { + // if limitMods is specified then limit the universe + if (limitMods != null && !limitMods.isEmpty()) { + Objects.requireNonNull(roots); + // resolve all root modules + Configuration cf = Configuration.empty() + .resolve(finder, + ModuleFinder.of(), + limitMods); + + // module name -> reference + Map map = new HashMap<>(); + cf.modules().forEach(m -> { + ModuleReference mref = m.reference(); + map.put(mref.descriptor().name(), mref); + }); + + // add the other modules + roots.stream() + .map(finder::find) + .flatMap(Optional::stream) + .forEach(mref -> map.putIfAbsent(mref.descriptor().name(), mref)); + + // set of modules that are observable + Set mrefs = new HashSet<>(map.values()); + + return new ModuleFinder() { + @Override + public Optional find(String name) { + return Optional.ofNullable(map.get(name)); + } + + @Override + public Set findAll() { + return mrefs; + } + }; + } + return finder; + } + + /* + * Checks the version of the module descriptor of java.base for compatibility + * with the current runtime version. * - * @throws IllegalArgumentException if java.base module is present - * but its descriptor has no version + * @throws IllegalArgumentException the descriptor of java.base has no + * version or the java.base version is not the same as the current runtime's + * version. */ - public static ModuleFinder newModuleFinder(List paths, - Set limitMods, - Set roots) - { - Runtime.Version version = Runtime.version(); - Path[] entries = paths.toArray(new Path[0]); - ModuleFinder finder = paths.isEmpty() ? ModuleFinder.ofSystem() - : ModulePath.of(version, true, entries); - if (finder.find("java.base").isPresent()) { - // use the version of java.base module, if present, as - // the release version for multi-release JAR files - ModuleDescriptor.Version v = finder.find("java.base").get() + private static void checkJavaBaseVersion(ModuleFinder finder) { + assert finder.find("java.base").isPresent(); + + // use the version of java.base module, if present, as + // the release version for multi-release JAR files + ModuleDescriptor.Version v = finder.find("java.base").get() .descriptor().version().orElseThrow(() -> - new IllegalArgumentException("No version in java.base descriptor") - ); - - // java.base version is different than the current runtime version - version = Runtime.Version.parse(v.toString()); - if (Runtime.version().feature() != version.feature() || - Runtime.version().interim() != version.interim()) - { - // jlink version and java.base version do not match. - // We do not (yet) support this mode. - throw new IllegalArgumentException(taskHelper.getMessage("err.jlink.version.mismatch", + new IllegalArgumentException("No version in java.base descriptor") + ); + + Runtime.Version version = Runtime.Version.parse(v.toString()); + if (Runtime.version().feature() != version.feature() || + Runtime.version().interim() != version.interim()) { + // jlink version and java.base version do not match. + // We do not (yet) support this mode. + throw new IllegalArgumentException(taskHelper.getMessage("err.jlink.version.mismatch", Runtime.version().feature(), Runtime.version().interim(), version.feature(), version.interim())); - } - } - - // if limitmods is specified then limit the universe - if (limitMods != null && !limitMods.isEmpty()) { - finder = limitFinder(finder, limitMods, Objects.requireNonNull(roots)); } - return finder; } private static void deleteDirectory(Path dir) throws IOException { @@ -611,10 +626,6 @@ private static ImageHelper createImageProvider(JlinkConfiguration config, // Perform some sanity checks for linking from the run-time image if (config.linkFromRuntimeImage()) { - if (!LinkableRuntimeImage.isLinkableRuntime()) { - String msg = taskHelper.getMessage("err.runtime.link.not.linkable.runtime"); - throw new IllegalArgumentException(msg); - } // Do not permit linking from run-time image and also including jdk.jlink module if (cf.findModule(JlinkTask.class.getModule().getName()).isPresent()) { String msg = taskHelper.getMessage("err.runtime.link.jdk.jlink.prohibited"); @@ -773,49 +784,6 @@ private static String findModuleName(Path modInfoPath) { } } - /* - * Returns a ModuleFinder that limits observability to the given root - * modules, their transitive dependences, plus a set of other modules. - */ - public static ModuleFinder limitFinder(ModuleFinder finder, - Set roots, - Set otherMods) { - - // resolve all root modules - Configuration cf = Configuration.empty() - .resolve(finder, - ModuleFinder.of(), - roots); - - // module name -> reference - Map map = new HashMap<>(); - cf.modules().forEach(m -> { - ModuleReference mref = m.reference(); - map.put(mref.descriptor().name(), mref); - }); - - // add the other modules - otherMods.stream() - .map(finder::find) - .flatMap(Optional::stream) - .forEach(mref -> map.putIfAbsent(mref.descriptor().name(), mref)); - - // set of modules that are observable - Set mrefs = new HashSet<>(map.values()); - - return new ModuleFinder() { - @Override - public Optional find(String name) { - return Optional.ofNullable(map.get(name)); - } - - @Override - public Set findAll() { - return mrefs; - } - }; - } - private static Platform targetPlatform(Configuration cf, Map modsPaths, boolean runtimeImageLink) throws IOException { diff --git a/test/jdk/tools/jlink/IntegrationTest.java b/test/jdk/tools/jlink/IntegrationTest.java index d79752f6d56..7f3dc223461 100644 --- a/test/jdk/tools/jlink/IntegrationTest.java +++ b/test/jdk/tools/jlink/IntegrationTest.java @@ -154,9 +154,13 @@ private static void test() throws Exception { mods.add("java.management"); Set limits = new HashSet<>(); limits.add("java.management"); + boolean linkFromRuntime = false; JlinkConfiguration config = new Jlink.JlinkConfiguration(output, mods, - JlinkTask.newModuleFinder(modulePaths, limits, mods), false, false, false); + JlinkTask.newLimitedFinder(JlinkTask.newModuleFinder(modulePaths), limits, mods), + linkFromRuntime, + false /* ignore modified runtime */, + false /* generate run-time image */); List lst = new ArrayList<>(); diff --git a/test/jdk/tools/jlink/bindservices/BindServices.java b/test/jdk/tools/jlink/bindservices/BindServices.java index 02f8bfd52d2..89095631040 100644 --- a/test/jdk/tools/jlink/bindservices/BindServices.java +++ b/test/jdk/tools/jlink/bindservices/BindServices.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -21,6 +21,9 @@ * questions. */ +import static jdk.test.lib.process.ProcessTools.executeProcess; +import static org.testng.Assert.assertTrue; + import java.io.File; import java.io.PrintWriter; import java.io.StringWriter; @@ -33,21 +36,20 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import jdk.test.lib.compiler.CompilerUtils; -import static jdk.test.lib.process.ProcessTools.*; - import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; -import static org.testng.Assert.*; + +import jdk.test.lib.compiler.CompilerUtils; +import jdk.tools.jlink.internal.LinkableRuntimeImage; /** * @test - * @bug 8174826 + * @bug 8174826 8345573 * @library /test/lib - * @modules jdk.compiler jdk.jlink + * @modules jdk.compiler jdk.jlink/jdk.tools.jlink.internal * @build BindServices jdk.test.lib.process.ProcessTools * jdk.test.lib.compiler.CompilerUtils - * @run testng BindServices + * @run testng/othervm BindServices */ public class BindServices { @@ -56,21 +58,23 @@ public class BindServices { private static final Path SRC_DIR = Paths.get(TEST_SRC, "src"); private static final Path MODS_DIR = Paths.get("mods"); + private static final boolean LINKABLE_RUNTIME = LinkableRuntimeImage.isLinkableRuntime(); + private static final boolean JMODS_EXIST = Files.exists(Paths.get(JAVA_HOME, "jmods")); - private static final String MODULE_PATH = - Paths.get(JAVA_HOME, "jmods").toString() + - File.pathSeparator + MODS_DIR.toString(); + private static final String MODULE_PATH = (JMODS_EXIST ? Paths.get(JAVA_HOME, "jmods").toString() + + File.pathSeparator : "") + + MODS_DIR.toString(); // the names of the modules in this test private static String[] modules = new String[] {"m1", "m2", "m3"}; - private static boolean hasJmods() { - if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) { - System.err.println("Test skipped. NO jmods directory"); - return false; + private static boolean isExplodedJDKImage() { + if (!JMODS_EXIST && !LINKABLE_RUNTIME) { + System.err.println("Test skipped. Not a linkable runtime and no JMODs"); + return true; } - return true; + return false; } /* @@ -78,7 +82,7 @@ private static boolean hasJmods() { */ @BeforeTest public void compileAll() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; for (String mn : modules) { Path msrc = SRC_DIR.resolve(mn); @@ -89,7 +93,7 @@ public void compileAll() throws Throwable { @Test public void noServiceBinding() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; Path dir = Paths.get("noServiceBinding"); @@ -103,7 +107,7 @@ public void noServiceBinding() throws Throwable { @Test public void fullServiceBinding() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; Path dir = Paths.get("fullServiceBinding"); @@ -122,7 +126,7 @@ public void fullServiceBinding() throws Throwable { @Test public void testVerbose() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; Path dir = Paths.get("verbose"); @@ -153,7 +157,7 @@ public void testVerbose() throws Throwable { @Test public void testVerboseAndNoBindServices() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; Path dir = Paths.get("verboseNoBind"); diff --git a/test/jdk/tools/jlink/bindservices/SuggestProviders.java b/test/jdk/tools/jlink/bindservices/SuggestProviders.java index 9685f927f8d..794d22fc570 100644 --- a/test/jdk/tools/jlink/bindservices/SuggestProviders.java +++ b/test/jdk/tools/jlink/bindservices/SuggestProviders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -21,6 +21,9 @@ * questions. */ +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; + import java.io.File; import java.io.PrintWriter; import java.io.StringWriter; @@ -32,17 +35,18 @@ import java.util.spi.ToolProvider; import java.util.stream.Collectors; import java.util.stream.Stream; -import jdk.test.lib.compiler.CompilerUtils; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; -import static org.testng.Assert.*; + +import jdk.test.lib.compiler.CompilerUtils; +import jdk.tools.jlink.internal.LinkableRuntimeImage; /** * @test - * @bug 8174826 + * @bug 8174826 8345573 * @library /lib/testlibrary /test/lib - * @modules jdk.charsets jdk.compiler jdk.jlink + * @modules jdk.charsets jdk.compiler jdk.jlink/jdk.tools.jlink.internal * @build SuggestProviders jdk.test.lib.compiler.CompilerUtils * @run testng SuggestProviders */ @@ -54,20 +58,23 @@ public class SuggestProviders { private static final Path SRC_DIR = Paths.get(TEST_SRC, "src"); private static final Path MODS_DIR = Paths.get("mods"); - private static final String MODULE_PATH = - Paths.get(JAVA_HOME, "jmods").toString() + - File.pathSeparator + MODS_DIR.toString(); + private static final boolean LINKABLE_RUNTIME = LinkableRuntimeImage.isLinkableRuntime(); + private static final boolean JMODS_EXIST = Files.exists(Paths.get(JAVA_HOME, "jmods")); + + private static final String MODULE_PATH = (JMODS_EXIST ? Paths.get(JAVA_HOME, "jmods").toString() + + File.pathSeparator : "") + + MODS_DIR.toString(); // the names of the modules in this test private static String[] modules = new String[] {"m1", "m2", "m3"}; - private static boolean hasJmods() { - if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) { - System.err.println("Test skipped. NO jmods directory"); - return false; + private static boolean isExplodedJDKImage() { + if (!JMODS_EXIST && !LINKABLE_RUNTIME) { + System.err.println("Test skipped. Not a linkable runtime and no JMODs"); + return true; } - return true; + return false; } /* @@ -75,7 +82,7 @@ private static boolean hasJmods() { */ @BeforeTest public void compileAll() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; for (String mn : modules) { Path msrc = SRC_DIR.resolve(mn); @@ -125,7 +132,7 @@ public void compileAll() throws Throwable { @Test public void suggestProviders() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; List output = JLink.run("--module-path", MODULE_PATH, "--suggest-providers").output(); @@ -145,7 +152,7 @@ public void suggestProviders() throws Throwable { */ @Test public void observableModules() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; List output = JLink.run("--module-path", MODULE_PATH, "--add-modules", "m1", @@ -165,7 +172,7 @@ public void observableModules() throws Throwable { */ @Test public void limitModules() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; List output = JLink.run("--module-path", MODULE_PATH, "--limit-modules", "m1", @@ -184,7 +191,7 @@ public void limitModules() throws Throwable { @Test public void providersForServices() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; List output = JLink.run("--module-path", MODULE_PATH, @@ -203,7 +210,7 @@ public void providersForServices() throws Throwable { @Test public void unusedService() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; List output = JLink.run("--module-path", MODULE_PATH, @@ -221,7 +228,7 @@ public void unusedService() throws Throwable { @Test public void nonExistentService() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; List output = JLink.run("--module-path", MODULE_PATH, @@ -236,7 +243,7 @@ public void nonExistentService() throws Throwable { @Test public void noSuggestProviders() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; List output = JLink.run("--module-path", MODULE_PATH, @@ -250,7 +257,7 @@ public void noSuggestProviders() throws Throwable { @Test public void suggestTypeNotRealProvider() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; List output = JLink.run("--module-path", MODULE_PATH, @@ -268,7 +275,7 @@ public void suggestTypeNotRealProvider() throws Throwable { @Test public void addNonObservableModule() throws Throwable { - if (!hasJmods()) return; + if (isExplodedJDKImage()) return; List output = JLink.run("--module-path", MODULE_PATH, diff --git a/test/jdk/tools/jlink/runtimeImage/AbstractLinkableRuntimeTest.java b/test/jdk/tools/jlink/runtimeImage/AbstractLinkableRuntimeTest.java index e7d5340e3b0..1df4455bc7d 100644 --- a/test/jdk/tools/jlink/runtimeImage/AbstractLinkableRuntimeTest.java +++ b/test/jdk/tools/jlink/runtimeImage/AbstractLinkableRuntimeTest.java @@ -192,7 +192,8 @@ protected Path jlinkUsingImage(JlinkSpec spec, OutputAnalyzerHandler handler, Pr // if the exit checker failed, we expected the other outcome // i.e. fail for success and success for fail. boolean successExit = analyzer.getExitValue() == 0; - String msg = String.format("Expected jlink to %s given a jmodless image. Exit code was: %d", + String msg = String.format("Expected jlink to %s given a linkable run-time image. " + + "Exit code was: %d", (successExit ? "fail" : "pass"), analyzer.getExitValue()); throw new AssertionError(msg); } From ff85865b752b7a2e765e2035d372a4dbb9279fea Mon Sep 17 00:00:00 2001 From: Sonia Zaldana Calles Date: Thu, 12 Dec 2024 18:15:18 +0000 Subject: [PATCH 12/93] 8346008: Fix recent NULL usage backsliding in Shenandoah Reviewed-by: kbarrett, wkemper --- src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp | 2 +- .../gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp index 3aaa23adca7..89a04d23cec 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp @@ -792,7 +792,7 @@ HeapWord* ShenandoahFreeSet::allocate_single(ShenandoahAllocRequest& req, bool& // Free set maintains mutator and collector partitions. Normally, each allocates only from its partition, // except in special cases when the collector steals regions from the mutator partition. - // Overwrite with non-zero (non-NULL) values only if necessary for allocation bookkeeping. + // Overwrite with non-zero (non-null) values only if necessary for allocation bookkeeping. switch (req.type()) { case ShenandoahAllocRequest::_alloc_tlab: diff --git a/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp b/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp index 81bb5c56a86..9dcdf002b7e 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp @@ -202,7 +202,7 @@ void ShenandoahGenerationalEvacuationTask::promote_in_place(ShenandoahHeapRegion while (obj_addr < tams) { oop obj = cast_to_oop(obj_addr); if (marking_context->is_marked(obj)) { - assert(obj->klass() != nullptr, "klass should not be NULL"); + assert(obj->klass() != nullptr, "klass should not be null"); // This thread is responsible for registering all objects in this region. No need for lock. scanner->register_object_without_lock(obj_addr); obj_addr += obj->size(); From e9ad27fcdcb59be573ffd20811e82bced7c78948 Mon Sep 17 00:00:00 2001 From: Thomas Stuefe Date: Thu, 12 Dec 2024 18:53:33 +0000 Subject: [PATCH 13/93] 8339313: 32-bit build broken Reviewed-by: coleenp, mbaesken, szaldana --- .../NoClassDefFoundError/libNoClassDefFoundErrorTest.c | 9 +++++++++ test/hotspot/jtreg/serviceability/sa/libupcall.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c b/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c index 023f299a5d4..ad2a85ec0ba 100644 --- a/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c +++ b/test/hotspot/jtreg/runtime/exceptionMsgs/NoClassDefFoundError/libNoClassDefFoundErrorTest.c @@ -47,6 +47,7 @@ Java_NoClassDefFoundErrorTest_callFindClass(JNIEnv *env, jclass klass, jstring c static char* giant_string() { +#ifdef _LP64 size_t len = ((size_t)INT_MAX) + 3; char* c_name = malloc(len * sizeof(char)); if (c_name != NULL) { @@ -54,6 +55,14 @@ static char* giant_string() { c_name[len - 1] = '\0'; } return c_name; +#else + /* On 32-bit, gcc warns us against using values larger than ptrdiff_t for malloc, + * memset and as array subscript. Since the chance of a 2GB allocation to be + * successful is slim (would typically reach or exceed the user address space + * size), lets just not bother. Returning NULL will cause the test to be silently + * skipped. */ + return NULL; +#endif } JNIEXPORT jboolean JNICALL diff --git a/test/hotspot/jtreg/serviceability/sa/libupcall.c b/test/hotspot/jtreg/serviceability/sa/libupcall.c index 2139e717fef..210c03587f1 100644 --- a/test/hotspot/jtreg/serviceability/sa/libupcall.c +++ b/test/hotspot/jtreg/serviceability/sa/libupcall.c @@ -22,11 +22,12 @@ */ #include +#include typedef void (*upcall_func)(void); JNIEXPORT void JNICALL Java_LingeredAppWithFFMUpcall_callJNI(JNIEnv *env, jclass cls, jlong upcallAddr) { - upcall_func upcall = (upcall_func)upcallAddr; + upcall_func upcall = (upcall_func)(uintptr_t)upcallAddr; upcall(); } From 18e0b343ab002b193d4db3be226394ee7dbe9f19 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Thu, 12 Dec 2024 18:57:46 +0000 Subject: [PATCH 14/93] 8344137: Update XML Security for Java to 3.0.5 Reviewed-by: mullan --- .../security/algorithms/JCEMapper.java | 16 +++ .../algorithms/MessageDigestAlgorithm.java | 2 +- .../algorithms/SignatureAlgorithm.java | 12 ++ .../implementations/ECDSAUtils.java | 40 +++++++ .../implementations/SignatureBaseRSA.java | 3 +- .../implementations/SignatureECDSA.java | 104 ++++++++++++++++++ .../xml/internal/security/keys/KeyInfo.java | 40 ++++--- .../keys/content/DEREncodedKeyValue.java | 6 +- .../security/keys/content/KeyValue.java | 15 ++- .../keys/content/keyvalues/ECKeyValue.java | 53 ++++++++- .../resource/xmlsecurity_de.properties | 2 +- .../security/signature/XMLSignature.java | 17 +++ .../internal/security/utils/Constants.java | 6 + .../internal/security/utils/ElementProxy.java | 3 + .../xml/crypto/dsig/SignatureMethod.java | 38 ++++++- .../dsig/internal/dom/DOMKeyInfoFactory.java | 2 +- .../xml/dsig/internal/dom/DOMKeyValue.java | 77 ++++++++++++- .../dsig/internal/dom/DOMSignatureMethod.java | 104 ++++++++++++++++++ .../internal/dom/DOMXMLSignatureFactory.java | 8 ++ .../jcp/xml/dsig/internal/dom/XMLDSigRI.java | 2 +- src/java.xml.crypto/share/legal/santuario.md | 6 +- .../xml/crypto/dsig/GenerationTests.java | 45 +++++++- test/jdk/javax/xml/crypto/dsig/PSS.java | 61 ++++++++++ test/lib/jdk/test/lib/security/XMLUtils.java | 46 ++++++-- 24 files changed, 666 insertions(+), 42 deletions(-) create mode 100644 test/jdk/javax/xml/crypto/dsig/PSS.java diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java index e4c1a30d525..68cb86eb7fd 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java @@ -207,6 +207,22 @@ public static void registerDefaultAlgorithms() { XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA512, new Algorithm("EC", "SHA512withECDSA", "Signature") ); + algorithmsMap.put( + XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_224, + new Algorithm("EC", "SHA3-224withECDSA", "Signature") + ); + algorithmsMap.put( + XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_256, + new Algorithm("EC", "SHA3-256withECDSA", "Signature") + ); + algorithmsMap.put( + XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_384, + new Algorithm("EC", "SHA3-384withECDSA", "Signature") + ); + algorithmsMap.put( + XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_512, + new Algorithm("EC", "SHA3-512withECDSA", "Signature") + ); algorithmsMap.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_RIPEMD160, new Algorithm("EC", "RIPEMD160withECDSA", "Signature") diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java index 17351f0211e..931f3d5553c 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java @@ -103,7 +103,7 @@ public static MessageDigestAlgorithm getInstance( return new MessageDigestAlgorithm(doc, algorithmURI); } - private static MessageDigest getDigestInstance(String algorithmURI) throws XMLSignatureException { + public static MessageDigest getDigestInstance(String algorithmURI) throws XMLSignatureException { String algorithmID = JCEMapper.translateURItoJCEID(algorithmURI); if (algorithmID == null) { diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java index 439eefb10dc..a74d373244c 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java @@ -494,6 +494,18 @@ public static void registerDefaultAlgorithms() { algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA512, SignatureECDSA.SignatureECDSASHA512.class ); + algorithmHash.put( + XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_224, SignatureECDSA.SignatureECDSASHA3_224.class + ); + algorithmHash.put( + XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_256, SignatureECDSA.SignatureECDSASHA3_256.class + ); + algorithmHash.put( + XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_384, SignatureECDSA.SignatureECDSASHA3_384.class + ); + algorithmHash.put( + XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_512, SignatureECDSA.SignatureECDSASHA3_512.class + ); algorithmHash.put( XMLSignature.ALGO_ID_SIGNATURE_ECDSA_RIPEMD160, SignatureECDSA.SignatureECDSARIPEMD160.class ); diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/ECDSAUtils.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/ECDSAUtils.java index 73e02864bd9..4d38b2f07bd 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/ECDSAUtils.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/ECDSAUtils.java @@ -770,6 +770,46 @@ public static byte[] convertXMLDSIGtoASN1(byte[] xmldsigBytes) throws IOExceptio "0340340340340340340340340340340340340340340340340340340323c313fab50589703b5ec68d3587fec60d161cc149c1ad4a91", 0x2760) ); + + ecCurveDefinitions.add( + new ECCurveDefinition( + "brainpoolP256r1 [RFC 5639]", + "1.3.36.3.3.2.8.1.1.7", + "a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5377", + "7d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6ce94a4b44f330b5d9", + "26dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7e1ce6bccdc18ff8c07b6", + "8bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27e1e3bd23c23a4453bd9ace3262", + "547ef835c3dac4fd97f8461a14611dc9c27745132ded8e545c1d54c72f046997", + "a9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a7", + 1) + ); + + ecCurveDefinitions.add( + new ECCurveDefinition( + "brainpoolP384r1 [RFC 5639]", + "1.3.36.3.3.2.8.1.1.11", + "8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123acd3a729901d1a71874700133107ec53", + "7bc382c63d8c150c3c72080ace05afa0c2bea28e4fb22787139165efba91f90f8aa5814a503ad4eb04a8c7dd22ce2826", + "04a8c7dd22ce28268b39b55416f0447c2fb77de107dcd2a62e880ea53eeb62d57cb4390295dbc9943ab78696fa504c11", + "1d1c64f068cf45ffa2a63a81b7c13f6b8847a3e77ef14fe3db7fcafe0cbd10e8e826e03436d646aaef87b2e247d4af1e", + "8abe1d7520f9c2a45cb1eb8e95cfd55262b70b29feec5864e19c054ff99129280e4646217791811142820341263c5315", + "8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e9046565", + 1) + ); + + ecCurveDefinitions.add( + new ECCurveDefinition( + "brainpoolP512r1 [RFC 5639]", + "1.3.36.3.3.2.8.1.1.13", + "aadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca703308717d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f3", + "7830a3318b603b89e2327145ac234cc594cbdd8d3df91610a83441caea9863bc2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a72bf2c7b9e7c1ac4d77fc94ca", + "3df91610a83441caea9863bc2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a72bf2c7b9e7c1ac4d77fc94cadc083e67984050b75ebae5dd2809bd638016f723", + "81aee4bdd82ed9645a21322e9c4c6a9385ed9f70b5d916c1b43b62eef4d0098eff3b1f78e2d0d48d50d1687b93b97d5f7c6d5047406a5e688b352209bcb9f822", + "7dde385d566332ecc0eabfa9cf7822fdf209f70024a57b1aa000c55b881f8111b2dcde494a5f485e5bca4bd88a2763aed1ca2b2fa8f0540678cd1e0f3ad80892", + "aadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90069", + 1) + ); + } public static String getOIDFromPublicKey(ECPublicKey ecPublicKey) { diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java index 45dafc3ad38..fc79e0c774e 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java @@ -66,8 +66,7 @@ public SignatureBaseRSA() throws XMLSignatureException { public SignatureBaseRSA(Provider provider) throws XMLSignatureException { String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI()); this.signatureAlgorithm = getSignature(provider, algorithmID); - LOG.debug("Created SignatureRSA using {0} and provider {1}", - algorithmID, signatureAlgorithm.getProvider()); + LOG.debug("Created SignatureRSA using {0}", algorithmID); } Signature getSignature(Provider provider, String algorithmID) diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.java index 75a88b8eb13..a90a314ade2 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.java @@ -371,6 +371,110 @@ public String engineGetURI() { } } + /** + * Class SignatureECDSASHA3-224 + * + */ + public static class SignatureECDSASHA3_224 extends SignatureECDSA { + + /** + * Constructor SignatureECDSASHA3-224 + * + * @throws XMLSignatureException + */ + public SignatureECDSASHA3_224() throws XMLSignatureException { + super(); + } + + public SignatureECDSASHA3_224(Provider provider) throws XMLSignatureException { + super(provider); + } + + /** {@inheritDoc} */ + @Override + public String engineGetURI() { + return XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_224; + } + } + + /** + * Class SignatureECDSASHA3-256 + * + */ + public static class SignatureECDSASHA3_256 extends SignatureECDSA { + + /** + * Constructor SignatureECDSASHA3-256 + * + * @throws XMLSignatureException + */ + public SignatureECDSASHA3_256() throws XMLSignatureException { + super(); + } + + public SignatureECDSASHA3_256(Provider provider) throws XMLSignatureException { + super(provider); + } + + /** {@inheritDoc} */ + @Override + public String engineGetURI() { + return XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_256; + } + } + + /** + * Class SignatureECDSASHA3-384 + * + */ + public static class SignatureECDSASHA3_384 extends SignatureECDSA { + + /** + * Constructor SignatureECDSASHA3-384 + * + * @throws XMLSignatureException + */ + public SignatureECDSASHA3_384() throws XMLSignatureException { + super(); + } + + public SignatureECDSASHA3_384(Provider provider) throws XMLSignatureException { + super(provider); + } + + /** {@inheritDoc} */ + @Override + public String engineGetURI() { + return XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_384; + } + } + + /** + * Class SignatureECDSASHA3-512 + * + */ + public static class SignatureECDSASHA3_512 extends SignatureECDSA { + + /** + * Constructor SignatureECDSASHA3-512 + * + * @throws XMLSignatureException + */ + public SignatureECDSASHA3_512() throws XMLSignatureException { + super(); + } + + public SignatureECDSASHA3_512(Provider provider) throws XMLSignatureException { + super(provider); + } + + /** {@inheritDoc} */ + @Override + public String engineGetURI() { + return XMLSignature.ALGO_ID_SIGNATURE_ECDSA_SHA3_512; + } + } + /** * Class SignatureECDSARIPEMD160 */ diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java index 62f25d1298d..01dd2ed16d7 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java @@ -32,15 +32,7 @@ import javax.crypto.SecretKey; import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException; -import com.sun.org.apache.xml.internal.security.keys.content.DEREncodedKeyValue; -import com.sun.org.apache.xml.internal.security.keys.content.KeyInfoReference; -import com.sun.org.apache.xml.internal.security.keys.content.KeyName; -import com.sun.org.apache.xml.internal.security.keys.content.KeyValue; -import com.sun.org.apache.xml.internal.security.keys.content.MgmtData; -import com.sun.org.apache.xml.internal.security.keys.content.PGPData; -import com.sun.org.apache.xml.internal.security.keys.content.RetrievalMethod; -import com.sun.org.apache.xml.internal.security.keys.content.SPKIData; -import com.sun.org.apache.xml.internal.security.keys.content.X509Data; +import com.sun.org.apache.xml.internal.security.keys.content.*; import com.sun.org.apache.xml.internal.security.keys.content.keyvalues.DSAKeyValue; import com.sun.org.apache.xml.internal.security.keys.content.keyvalues.RSAKeyValue; import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolver; @@ -50,7 +42,6 @@ import com.sun.org.apache.xml.internal.security.transforms.Transforms; import com.sun.org.apache.xml.internal.security.utils.Constants; import com.sun.org.apache.xml.internal.security.utils.ElementProxy; -import com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy; import com.sun.org.apache.xml.internal.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; @@ -88,7 +79,7 @@ * contains the corresponding type. * */ -public class KeyInfo extends SignatureElementProxy { +public class KeyInfo extends ElementProxy { private static final com.sun.org.slf4j.internal.Logger LOG = com.sun.org.slf4j.internal.LoggerFactory.getLogger(KeyInfo.class); @@ -231,12 +222,24 @@ public void add(RSAKeyValue rsakeyvalue) { } /** - * Method add + * Method adds public key encoded as KeyValue. If public key type is not supported by KeyValue, then + * DEREncodedKeyValue is used. If public key type is not supported by DEREncodedKeyValue, then + * IllegalArgumentException is thrown. * - * @param pk + * @param pk public key to be added to KeyInfo */ - public void add(PublicKey pk) { - this.add(new KeyValue(getDocument(), pk)); + public void add(PublicKey pk) { + + if (KeyValue.isSupportedKeyType(pk)) { + this.add(new KeyValue(getDocument(), pk)); + return; + } + + try { + this.add(new DEREncodedKeyValue(getDocument(), pk)); + } catch (XMLSecurityException ex) { + throw new IllegalArgumentException(ex); + } } /** @@ -772,6 +775,7 @@ public boolean containsKeyInfoReference() { return this.lengthKeyInfoReference() > 0; } + /** * This method returns the public key. * @@ -1188,4 +1192,10 @@ public void addStorageResolver(StorageResolver storageResolver) { public String getBaseLocalName() { return Constants._TAG_KEYINFO; } + + /** {@inheritDoc} */ + @Override + public String getBaseNamespace() { + return Constants.SignatureSpecNS; + } } diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java index 823a5036680..2b5b55a3d04 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java @@ -41,7 +41,10 @@ public class DEREncodedKeyValue extends Signature11ElementProxy implements KeyInfoContent { /** JCA algorithm key types supported by this implementation. */ - private static final String[] supportedKeyTypes = { "RSA", "DSA", "EC"}; + private static final String[] supportedKeyTypes = { "RSA", "DSA", "EC", + "DiffieHellman", "DH", "XDH", "X25519", "X448", + "EdDSA", "Ed25519", "Ed448", + "RSASSA-PSS"}; /** * Constructor DEREncodedKeyValue @@ -144,5 +147,4 @@ protected byte[] getEncodedDER(PublicKey publicKey) throws XMLSecurityException throw new XMLSecurityException(e, "DEREncodedKeyValue.UnsupportedPublicKey", exArgs); } } - } diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java index ee999e65783..d1eb890f885 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java @@ -41,7 +41,6 @@ * (section 6.4). The KeyValue element may include externally defined public * keys values represented as PCDATA or element types from an external * namespace. - * */ public class KeyValue extends SignatureElementProxy implements KeyInfoContent { @@ -120,6 +119,20 @@ public KeyValue(Document doc, PublicKey pk) { } } + /** + * Verifies that the XML KeyValue encoding is supported for the given key type. If the + * encoding is supported, it returns true else false. + * + * @return true if the public key has a KeyValue encoding, false otherwise. + */ + public static boolean isSupportedKeyType(PublicKey publicKey) { + + return publicKey instanceof java.security.interfaces.DSAPublicKey + || publicKey instanceof java.security.interfaces.RSAPublicKey + || publicKey instanceof java.security.interfaces.ECPublicKey; + + } + /** * Constructor KeyValue * diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/ECKeyValue.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/ECKeyValue.java index 839d9e4285d..9bc6e55d7e5 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/ECKeyValue.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/ECKeyValue.java @@ -91,6 +91,45 @@ public class ECKeyValue extends Signature11ElementProxy implements KeyValueConte 1 ); + /* Supported curve brainpoolP256r1 */ + private static final Curve BRAINPOOLP256R1 = initializeCurve( + "brainpoolP256r1 [RFC 5639]", + "1.3.36.3.3.2.8.1.1.7", + "A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377", + "7D5A0975FC2C3057EEF67530417AFFE7FB8055C126DC5C6CE94A4B44F330B5D9", + "26DC5C6CE94A4B44F330B5D9BBD77CBF958416295CF7E1CE6BCCDC18FF8C07B6", + "8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262", + "547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997", + "A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7", + 1 + ); + + /* Supported curve brainpoolP384r1 */ + private static final Curve BRAINPOOLP384R1 = initializeCurve( + "brainpoolP384r1 [RFC 5639]", + "1.3.36.3.3.2.8.1.1.11", + "8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53", + "7BC382C63D8C150C3C72080ACE05AFA0C2BEA28E4FB22787139165EFBA91F90F8AA5814A503AD4EB04A8C7DD22CE2826", + "04A8C7DD22CE28268B39B55416F0447C2FB77DE107DCD2A62E880EA53EEB62D57CB4390295DBC9943AB78696FA504C11", + "1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E", + "8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315", + "8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565", + 1 + ); + + /* Supported curve brainpoolP512r1 */ + private static final Curve BRAINPOOLP512R1 = initializeCurve( + "brainpoolP512r1 [RFC 5639]", + "1.3.36.3.3.2.8.1.1.13", + "AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3", + "7830A3318B603B89E2327145AC234CC594CBDD8D3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CA", + "3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CADC083E67984050B75EBAE5DD2809BD638016F723", + "81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822", + "7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892", + "AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069", + 1 + ); + private static Curve initializeCurve(String name, String oid, String sfield, String a, String b, String x, String y, String n, int h) { @@ -264,7 +303,13 @@ private static String getCurveOid(ECParameterSpec params) { match = SECP384R1; } else if (matchCurve(params, SECP521R1)) { match = SECP521R1; - } else { + } else if (matchCurve(params, BRAINPOOLP256R1)) { + match = BRAINPOOLP256R1; + } else if (matchCurve(params, BRAINPOOLP384R1)) { + match = BRAINPOOLP384R1; + } else if (matchCurve(params, BRAINPOOLP512R1)) { + match = BRAINPOOLP512R1; + }else { return null; } return match.getObjectId(); @@ -332,6 +377,12 @@ private static ECParameterSpec getECParameterSpec(String oid) { return SECP384R1; } else if (oid.equals(SECP521R1.getObjectId())) { return SECP521R1; + } else if (oid.equals(BRAINPOOLP256R1.getObjectId())) { + return BRAINPOOLP256R1; + } else if (oid.equals(BRAINPOOLP384R1.getObjectId())) { + return BRAINPOOLP384R1; + } else if (oid.equals(BRAINPOOLP512R1.getObjectId())) { + return BRAINPOOLP512R1; } else { return null; } diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_de.properties b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_de.properties index 3d4306e988f..0871ffdaffa 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_de.properties +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_de.properties @@ -30,7 +30,7 @@ algorithms.HMACOutputLengthMax = HMACOutputLength darf nicht grosser als {0} sei algorithms.HMACOutputLengthMin = HMACOutputLength darf nicht kleiner als {0} sein algorithms.HMACOutputLengthOnlyForHMAC = Die HMACOutputLength kann nur bei HMAC integrit\u00e4ts Algorithmen angegeben werden algorithms.MissingRSAPSSParams = RSAPSSParams is a required Element for http://www.w3.org/2007/05/xmldsig-more#rsa-pss -algorithms.NoSuchAlgorithm = Der Algorithmus {0} ist nicht verf\u00fcgbar. +algorithms.NoSuchAlgorithmNoEx = Der Algorithmus {0} ist nicht verf\u00fcgbar. algorithms.NoSuchAlgorithm = Der Algorithmus {0} ist nicht verf\u00fcgbar. Original Nachricht war\: {1} algorithms.NoSuchMap = Algorithmus URI "{0}" konnte auf keinen JCE Algorithmus gemappt werden algorithms.NoSuchProvider = Der angegebene Provider {0} existiert nicht. Original Nachricht war\: {1} diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java index cfa545e5826..b84556de077 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java @@ -209,6 +209,23 @@ public final class XMLSignature extends SignatureElementProxy { public static final String ALGO_ID_SIGNATURE_EDDSA_ED448 = "http://www.w3.org/2021/04/xmldsig-more#eddsa-ed448"; + + /**Signature - SHA3-224withECDSA */ + public static final String ALGO_ID_SIGNATURE_ECDSA_SHA3_224 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-224"; + + /**Signature - SHA3-256withECDSA */ + public static final String ALGO_ID_SIGNATURE_ECDSA_SHA3_256 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-256"; + + /**Signature - SHA3-384withECDSA */ + public static final String ALGO_ID_SIGNATURE_ECDSA_SHA3_384 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-384"; + + /**Signature - SHA3-512withECDSA */ + public static final String ALGO_ID_SIGNATURE_ECDSA_SHA3_512 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-512"; + /** Signature - Optional RSASSA-PSS */ public static final String ALGO_ID_SIGNATURE_RSA_PSS = Constants.XML_DSIG_NS_MORE_07_05 + "rsa-pss"; diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Constants.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Constants.java index d584eac32d1..5ec3e293252 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Constants.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/Constants.java @@ -71,6 +71,9 @@ public final class Constants { /** The (newer) URL for more algorithms **/ public static final String XML_DSIG_NS_MORE_07_05 = "http://www.w3.org/2007/05/xmldsig-more#"; + /** The 2021 xmldsig-more URL for Internet Engineering Task Force (IETF) algorithms **/ + public static final String XML_DSIG_NS_MORE_21_04 = "http://www.w3.org/2021/04/xmldsig-more#"; + /** The URI for XML spec*/ public static final String XML_LANG_SPACE_SpecNS = "http://www.w3.org/XML/1998/namespace"; @@ -144,6 +147,9 @@ public final class Constants { /** Tag of Element MaskGenerationFunction **/ public static final String _TAG_MGF = "MaskGenerationFunction"; + /** Tag of Element Salt **/ + public static final String _TAG_SALT = "Salt"; + /** Tag of Element SaltLength **/ public static final String _TAG_SALTLENGTH = "SaltLength"; diff --git a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java index 6f061fc9772..b68a56fd8b9 100644 --- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java +++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java @@ -512,6 +512,9 @@ public static void registerDefaultPrefixes() throws XMLSecurityException { "http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter", "xx" ); setNamespacePrefix("http://www.w3.org/2009/xmldsig11#", "dsig11"); + setNamespacePrefix("http://www.w3.org/2001/04/xmldsig-more", "rfc4051"); + setNamespacePrefix("http://www.w3.org/2007/05/xmldsig-more#", "rfc6931"); + setNamespacePrefix("http://www.w3.org/2021/04/xmldsig-more#", "rfc9231"); } /** diff --git a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignatureMethod.java b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignatureMethod.java index bf7bb59c9e1..f9b683c838c 100644 --- a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignatureMethod.java +++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignatureMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -312,6 +312,42 @@ public interface SignatureMethod extends XMLStructure, AlgorithmMethod { "http://www.w3.org/2007/05/xmldsig-more#sha3-512-rsa-MGF1"; + /** + * The + * ECDSA-SHA3-224 signature method algorithm URI. + * + * @since 25 + */ + String ECDSA_SHA3_224 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-224"; + + /** + * The + * ECDSA-SHA3-256 signature method algorithm URI. + * + * @since 25 + */ + String ECDSA_SHA3_256 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-256"; + + /** + * The + * ECDSA-SHA3-384 signature method algorithm URI. + * + * @since 25 + */ + String ECDSA_SHA3_384 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-384"; + + /** + * The + * ECDSA-SHA3-512 signature method algorithm URI. + * + * @since 25 + */ + String ECDSA_SHA3_512 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-512"; + /** * Returns the algorithm-specific input parameters of this * SignatureMethod. diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java index cec1224affa..2ce4858bc81 100644 --- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java +++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java @@ -81,7 +81,7 @@ public KeyValue newKeyValue(PublicKey key) throws KeyException { String algorithm = key.getAlgorithm(); if ("DSA".equals(algorithm)) { return new DOMKeyValue.DSA((DSAPublicKey) key); - } else if ("RSA".equals(algorithm)) { + } else if ("RSA".equals(algorithm) || "RSASSA-PSS".equals(algorithm)) { return new DOMKeyValue.RSA((RSAPublicKey) key); } else if ("EC".equals(algorithm)) { return new DOMKeyValue.EC((ECPublicKey) key); diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java index 0933c21bfd3..738ab64693c 100644 --- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java +++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java @@ -241,6 +241,33 @@ RSAPublicKey unmarshalKeyValue(Element kvtElem) RSAPublicKeySpec spec = new RSAPublicKeySpec(modulus, exponent); return (RSAPublicKey) generatePublicKey(rsakf, spec); } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof KeyValue)) { + return false; + } + // This equality test allows RSA keys that have different + // algorithms (ex: RSA and RSASSA-PSS) to be equal as long + // as the key is the same. + try { + PublicKey otherKey = ((KeyValue)obj).getPublicKey(); + if (!(otherKey instanceof RSAPublicKey)) { + return false; + } + RSAPublicKey otherRSAKey = (RSAPublicKey)otherKey; + RSAPublicKey rsaKey = (RSAPublicKey)getPublicKey(); + return rsaKey.getPublicExponent().equals( + otherRSAKey.getPublicExponent()) + && rsaKey.getModulus().equals(otherRSAKey.getModulus()); + } catch (KeyException ke) { + // no practical way to determine if the keys are equal + return false; + } + } } static final class DSA extends DOMKeyValue { @@ -369,6 +396,42 @@ static final class EC extends DOMKeyValue { 1 ); + private static final Curve BRAINPOOLP256R1 = initializeCurve( + "brainpoolP256r1 [RFC 5639]", + "1.3.36.3.3.2.8.1.1.7", + "A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377", + "7D5A0975FC2C3057EEF67530417AFFE7FB8055C126DC5C6CE94A4B44F330B5D9", + "26DC5C6CE94A4B44F330B5D9BBD77CBF958416295CF7E1CE6BCCDC18FF8C07B6", + "8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262", + "547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997", + "A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7", + 1 + ); + + private static final Curve BRAINPOOLP384R1 = initializeCurve( + "brainpoolP384r1 [RFC 5639]", + "1.3.36.3.3.2.8.1.1.11", + "8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53", + "7BC382C63D8C150C3C72080ACE05AFA0C2BEA28E4FB22787139165EFBA91F90F8AA5814A503AD4EB04A8C7DD22CE2826", + "04A8C7DD22CE28268B39B55416F0447C2FB77DE107DCD2A62E880EA53EEB62D57CB4390295DBC9943AB78696FA504C11", + "1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E", + "8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315", + "8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565", + 1 + ); + + private static final Curve BRAINPOOLP512R1 = initializeCurve( + "brainpoolP512r1 [RFC 5639]", + "1.3.36.3.3.2.8.1.1.13", + "AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3", + "7830A3318B603B89E2327145AC234CC594CBDD8D3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CA", + "3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CADC083E67984050B75EBAE5DD2809BD638016F723", + "81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822", + "7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892", + "AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069", + 1 + ); + private static Curve initializeCurve(String name, String oid, String sfield, String a, String b, String x, String y, String n, int h) { @@ -448,6 +511,12 @@ private static String getCurveOid(ECParameterSpec params) { match = SECP384R1; } else if (matchCurve(params, SECP521R1)) { match = SECP521R1; + } else if (matchCurve(params, BRAINPOOLP256R1)) { + match = BRAINPOOLP256R1; + } else if (matchCurve(params, BRAINPOOLP384R1)) { + match = BRAINPOOLP384R1; + } else if (matchCurve(params, BRAINPOOLP512R1)) { + match = BRAINPOOLP512R1; } else { return null; } @@ -485,7 +554,7 @@ void marshalPublicKey(Node parent, Document doc, String dsPrefix, DOMUtils.setAttribute(namedCurveElem, "URI", "urn:oid:" + oid); String qname = (prefix == null || prefix.length() == 0) ? "xmlns" : "xmlns:" + prefix; - namedCurveElem.setAttributeNS("http://www.w3.org/2000/xmlns/", + ecKeyValueElem.setAttributeNS("http://www.w3.org/2000/xmlns/", qname, XMLDSIG_11_XMLNS); ecKeyValueElem.appendChild(namedCurveElem); String encoded = XMLUtils.encodeToString(ecPublicKey); @@ -555,6 +624,12 @@ private static ECParameterSpec getECParameterSpec(String oid) { return SECP384R1; } else if (oid.equals(SECP521R1.getObjectId())) { return SECP521R1; + } else if (oid.equals(BRAINPOOLP256R1.getObjectId())) { + return BRAINPOOLP256R1; + } else if (oid.equals(BRAINPOOLP384R1.getObjectId())) { + return BRAINPOOLP384R1; + } else if (oid.equals(BRAINPOOLP512R1.getObjectId())) { + return BRAINPOOLP512R1; } else { return null; } diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java index 5e44ccaeae8..6523b93935d 100644 --- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java +++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java @@ -100,6 +100,14 @@ public abstract class DOMSignatureMethod extends AbstractDOMSignatureMethod { "http://www.w3.org/2021/04/xmldsig-more#eddsa-ed25519"; static final String ED448 = "http://www.w3.org/2021/04/xmldsig-more#eddsa-ed448"; + static final String ECDSA_SHA3_224 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-224"; + static final String ECDSA_SHA3_256 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-256"; + static final String ECDSA_SHA3_384 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-384"; + static final String ECDSA_SHA3_512 = + "http://www.w3.org/2021/04/xmldsig-more#ecdsa-sha3-512"; // see RFC 6931 for these algorithm definitions static final String ECDSA_RIPEMD160 = @@ -241,6 +249,14 @@ static SignatureMethod unmarshal(Element smElem) throws MarshalException { return new SHA384withECDSA(smElem); } else if (alg.equals(ECDSA_SHA512)) { return new SHA512withECDSA(smElem); + } else if (alg.equals(ECDSA_SHA3_224)) { + return new SHA3_224withECDSA(smElem); + } else if (alg.equals(ECDSA_SHA3_256)) { + return new SHA3_256withECDSA(smElem); + } else if (alg.equals(ECDSA_SHA3_384)) { + return new SHA3_384withECDSA(smElem); + } else if (alg.equals(ECDSA_SHA3_512)) { + return new SHA3_512withECDSA(smElem); } else if (alg.equals(ECDSA_RIPEMD160)) { return new RIPEMD160withECDSA(smElem); } else if (alg.equals(SignatureMethod.HMAC_SHA1)) { @@ -1160,6 +1176,94 @@ String getJCAFallbackAlgorithm() { } } + static final class SHA3_224withECDSA extends AbstractECDSASignatureMethod { + SHA3_224withECDSA(AlgorithmParameterSpec params) + throws InvalidAlgorithmParameterException { + super(params); + } + SHA3_224withECDSA(Element dmElem) throws MarshalException { + super(dmElem); + } + @Override + public String getAlgorithm() { + return ECDSA_SHA3_224; + } + @Override + String getJCAAlgorithm() { + return "SHA3-224withECDSAinP1363Format"; + } + @Override + String getJCAFallbackAlgorithm() { + return "SHA3-224withECDSA"; + } + } + + static final class SHA3_256withECDSA extends AbstractECDSASignatureMethod { + SHA3_256withECDSA(AlgorithmParameterSpec params) + throws InvalidAlgorithmParameterException { + super(params); + } + SHA3_256withECDSA(Element dmElem) throws MarshalException { + super(dmElem); + } + @Override + public String getAlgorithm() { + return ECDSA_SHA3_256; + } + @Override + String getJCAAlgorithm() { + return "SHA3-256withECDSAinP1363Format"; + } + @Override + String getJCAFallbackAlgorithm() { + return "SHA3-256withECDSA"; + } + } + + static final class SHA3_384withECDSA extends AbstractECDSASignatureMethod { + SHA3_384withECDSA(AlgorithmParameterSpec params) + throws InvalidAlgorithmParameterException { + super(params); + } + SHA3_384withECDSA(Element dmElem) throws MarshalException { + super(dmElem); + } + @Override + public String getAlgorithm() { + return ECDSA_SHA3_384; + } + @Override + String getJCAAlgorithm() { + return "SHA3-384withECDSAinP1363Format"; + } + @Override + String getJCAFallbackAlgorithm() { + return "SHA3-384withECDSA"; + } + } + + static final class SHA3_512withECDSA extends AbstractECDSASignatureMethod { + SHA3_512withECDSA(AlgorithmParameterSpec params) + throws InvalidAlgorithmParameterException { + super(params); + } + SHA3_512withECDSA(Element dmElem) throws MarshalException { + super(dmElem); + } + @Override + public String getAlgorithm() { + return ECDSA_SHA3_512; + } + @Override + String getJCAAlgorithm() { + return "SHA3-512withECDSAinP1363Format"; + } + @Override + String getJCAFallbackAlgorithm() { + return "SHA3-512withECDSA"; + } + } + static final class RIPEMD160withECDSA extends AbstractECDSASignatureMethod { RIPEMD160withECDSA(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java index 119bf16bc32..52ccc84d1d0 100644 --- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java +++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java @@ -345,6 +345,14 @@ public SignatureMethod newSignatureMethod(String algorithm, return new DOMSignatureMethod.SHA384withECDSA(params); } else if (algorithm.equals(DOMSignatureMethod.ECDSA_SHA512)) { return new DOMSignatureMethod.SHA512withECDSA(params); + } else if (algorithm.equals(DOMSignatureMethod.ECDSA_SHA3_224)) { + return new DOMSignatureMethod.SHA3_224withECDSA(params); + } else if (algorithm.equals(DOMSignatureMethod.ECDSA_SHA3_256)) { + return new DOMSignatureMethod.SHA3_256withECDSA(params); + } else if (algorithm.equals(DOMSignatureMethod.ECDSA_SHA3_384)) { + return new DOMSignatureMethod.SHA3_384withECDSA(params); + } else if (algorithm.equals(DOMSignatureMethod.ECDSA_SHA3_512)) { + return new DOMSignatureMethod.SHA3_512withECDSA(params); } else if (algorithm.equals(DOMSignatureMethod.ECDSA_RIPEMD160)) { return new DOMSignatureMethod.RIPEMD160withECDSA(params); } else if (algorithm.equals(DOMSignatureMethod.ED25519)) { diff --git a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java index 2982291c8e2..670d7b0c867 100644 --- a/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java +++ b/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java @@ -142,7 +142,7 @@ public Object newInstance(Object ctrParamObj) @SuppressWarnings("removal") public XMLDSigRI() { // This is the JDK XMLDSig provider, synced from - // Apache Santuario XML Security for Java, version 3.0.3 + // Apache Santuario XML Security for Java, version 3.0.5 super("XMLDSig", VER, INFO); final Provider p = this; diff --git a/src/java.xml.crypto/share/legal/santuario.md b/src/java.xml.crypto/share/legal/santuario.md index 768f0c7b144..4421e16df25 100644 --- a/src/java.xml.crypto/share/legal/santuario.md +++ b/src/java.xml.crypto/share/legal/santuario.md @@ -1,4 +1,4 @@ -## Apache Santuario v3.0.3 +## Apache Santuario v3.0.5 ### Apache 2.0 License ``` @@ -211,7 +211,7 @@ limitations under the License. ``` Apache Santuario - XML Security for Java -Copyright 1999-2023 The Apache Software Foundation +Copyright 1999-2024 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). @@ -223,5 +223,5 @@ The development of this software was partly funded by the European Commission in the project in the ISIS Programme. This product contains software that is -copyright (c) 2021, Oracle and/or its affiliates. +copyright (c) 2021, 2023, Oracle and/or its affiliates. ``` diff --git a/test/jdk/javax/xml/crypto/dsig/GenerationTests.java b/test/jdk/javax/xml/crypto/dsig/GenerationTests.java index 7ab2c7f4e93..668a5a50a0a 100644 --- a/test/jdk/javax/xml/crypto/dsig/GenerationTests.java +++ b/test/jdk/javax/xml/crypto/dsig/GenerationTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -24,7 +24,7 @@ /** * @test * @bug 4635230 6283345 6303830 6824440 6867348 7094155 8038184 8038349 8046949 - * 8046724 8079693 8177334 8205507 8210736 8217878 8241306 8305972 + * 8046724 8079693 8177334 8205507 8210736 8217878 8241306 8305972 8344137 * @summary Basic unit tests for generating XML Signatures with JSR 105 * @modules java.base/sun.security.util * java.base/sun.security.x509 @@ -99,6 +99,7 @@ public class GenerationTests { private static SignatureMethod dsaSha1, dsaSha256, rsaSha1, rsaSha224, rsaSha256, rsaSha384, rsaSha512, ecdsaSha1, ecdsaSha224, ecdsaSha256, ecdsaSha384, ecdsaSha512, + ecdsaSha3_224, ecdsaSha3_256, ecdsaSha3_384, ecdsaSha3_512, hmacSha1, hmacSha224, hmacSha256, hmacSha384, hmacSha512, rsaSha1mgf1, rsaSha224mgf1, rsaSha256mgf1, rsaSha384mgf1, rsaSha512mgf1, rsaSha3_224mgf1, rsaSha3_256mgf1, rsaSha3_384mgf1, rsaSha3_512mgf1, @@ -244,9 +245,9 @@ public class GenerationTests { }) .toArray(String[]::new); - // As of JDK 22, the number of defined algorithms are... + // As of JDK 25, the number of defined algorithms are... static { - if (allSignatureMethods.length != 29 + if (allSignatureMethods.length != 33 || allDigestMethods.length != 9) { System.out.println(Arrays.toString(allSignatureMethods)); System.out.println(Arrays.toString(allDigestMethods)); @@ -305,6 +306,10 @@ public static void main(String args[]) throws Exception { test_create_signature_enveloping_p256_sha256(); test_create_signature_enveloping_p256_sha384(); test_create_signature_enveloping_p256_sha512(); + test_create_signature_enveloping_p256_sha3_224(); + test_create_signature_enveloping_p256_sha3_256(); + test_create_signature_enveloping_p256_sha3_384(); + test_create_signature_enveloping_p256_sha3_512(); test_create_signature_enveloping_p384_sha1(); test_create_signature_enveloping_p521_sha1(); test_create_signature_enveloping_ed25519(); @@ -559,6 +564,10 @@ private static void setup() throws Exception { ecdsaSha256 = fac.newSignatureMethod(SignatureMethod.ECDSA_SHA256, null); ecdsaSha384 = fac.newSignatureMethod(SignatureMethod.ECDSA_SHA384, null); ecdsaSha512 = fac.newSignatureMethod(SignatureMethod.ECDSA_SHA512, null); + ecdsaSha3_224 = fac.newSignatureMethod(SignatureMethod.ECDSA_SHA3_224, null); + ecdsaSha3_256 = fac.newSignatureMethod(SignatureMethod.ECDSA_SHA3_256, null); + ecdsaSha3_384 = fac.newSignatureMethod(SignatureMethod.ECDSA_SHA3_384, null); + ecdsaSha3_512 = fac.newSignatureMethod(SignatureMethod.ECDSA_SHA3_512, null); ed25519 = fac.newSignatureMethod(SignatureMethod.ED25519, null); ed448 = fac.newSignatureMethod(SignatureMethod.ED448, null); @@ -892,6 +901,34 @@ static void test_create_signature_enveloping_p256_sha512() throws Exception { System.out.println(); } + static void test_create_signature_enveloping_p256_sha3_224() throws Exception { + System.out.println("* Generating signature-enveloping-p256-sha3_224.xml"); + test_create_signature_enveloping(sha1, ecdsaSha3_224, p256ki, + getECPrivateKey("P256"), kvks, false, true); + System.out.println(); + } + + static void test_create_signature_enveloping_p256_sha3_256() throws Exception { + System.out.println("* Generating signature-enveloping-p256-sha3_256.xml"); + test_create_signature_enveloping(sha1, ecdsaSha3_256, p256ki, + getECPrivateKey("P256"), kvks, false, true); + System.out.println(); + } + + static void test_create_signature_enveloping_p256_sha3_384() throws Exception { + System.out.println("* Generating signature-enveloping-p256-sha3_384.xml"); + test_create_signature_enveloping(sha1, ecdsaSha3_384, p256ki, + getECPrivateKey("P256"), kvks, false, true); + System.out.println(); + } + + static void test_create_signature_enveloping_p256_sha3_512() throws Exception { + System.out.println("* Generating signature-enveloping-p256-sha3_512.xml"); + test_create_signature_enveloping(sha1, ecdsaSha3_512, p256ki, + getECPrivateKey("P256"), kvks, false, true); + System.out.println(); + } + static void test_create_signature_enveloping_p384_sha1() throws Exception { System.out.println("* Generating signature-enveloping-p384-sha1.xml"); test_create_signature_enveloping(sha1, ecdsaSha1, p384ki, diff --git a/test/jdk/javax/xml/crypto/dsig/PSS.java b/test/jdk/javax/xml/crypto/dsig/PSS.java new file mode 100644 index 00000000000..3b5730577fb --- /dev/null +++ b/test/jdk/javax/xml/crypto/dsig/PSS.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 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. + */ + +import jdk.test.lib.Asserts; +import jdk.test.lib.security.XMLUtils; + +import javax.xml.crypto.dsig.DigestMethod; +import javax.xml.crypto.dsig.SignatureMethod; +import javax.xml.crypto.dsig.spec.RSAPSSParameterSpec; +import java.security.KeyPairGenerator; +import java.security.spec.MGF1ParameterSpec; +import java.security.spec.PSSParameterSpec; + +/** + * @test + * @bug 8344137 + * @summary check RSASSA-PSS key + * @library /test/lib + * @modules java.xml.crypto + */ +public class PSS { + + public static void main(String[] args) throws Exception { + + var doc = XMLUtils.string2doc("TextRaw"); + var kpg = KeyPairGenerator.getInstance("RSASSA-PSS"); + kpg.initialize(2048); + var keyPair = kpg.generateKeyPair(); + + var pspec = new PSSParameterSpec("SHA-384", "MGF1", + MGF1ParameterSpec.SHA512, 48, + PSSParameterSpec.TRAILER_FIELD_BC); + + var signed = XMLUtils.signer(keyPair.getPrivate(), keyPair.getPublic()) + .dm(DigestMethod.SHA384) + .sm(SignatureMethod.RSA_PSS, new RSAPSSParameterSpec(pspec)) + .sign(doc); + + Asserts.assertTrue(XMLUtils.validator().validate(signed)); + } +} diff --git a/test/lib/jdk/test/lib/security/XMLUtils.java b/test/lib/jdk/test/lib/security/XMLUtils.java index 6e6495789d6..efc8f6d5449 100644 --- a/test/lib/jdk/test/lib/security/XMLUtils.java +++ b/test/lib/jdk/test/lib/security/XMLUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 @@ -198,6 +198,7 @@ public static class Signer { String dm = DigestMethod.SHA256; String cm = CanonicalizationMethod.EXCLUSIVE; String tr = Transform.ENVELOPED; + Map props = new HashMap<>(); public Signer(PrivateKey privateKey) { this.privateKey = Objects.requireNonNull(privateKey); @@ -247,6 +248,11 @@ public Signer sm(String method) throws Exception { return sm(method, null); } + public Signer prop(String name, Object o) { + props.put(name, o); + return this; + } + // Signs different sources // Signs an XML file in detached mode @@ -254,7 +260,7 @@ public Document sign(URI uri) throws Exception { Document newDocument = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); FAC.newXMLSignature(buildSignedInfo(uri.toString()), buildKeyInfo()).sign( - new DOMSignContext(privateKey, newDocument)); + withProps(new DOMSignContext(privateKey, newDocument))); return newDocument; } @@ -264,7 +270,8 @@ public Document sign(URI base, URI ref) throws Exception { .newDocumentBuilder().newDocument(); DOMSignContext ctxt = new DOMSignContext(privateKey, newDocument); ctxt.setBaseURI(base.toString()); - FAC.newXMLSignature(buildSignedInfo(ref.toString()), buildKeyInfo()).sign(ctxt); + FAC.newXMLSignature(buildSignedInfo(ref.toString()), buildKeyInfo()) + .sign(withProps(ctxt)); return newDocument; } @@ -275,7 +282,7 @@ public Document sign(Document document) throws Exception { .transform(new DOMSource(document), result); Document newDocument = (Document) result.getNode(); FAC.newXMLSignature(buildSignedInfo(""), buildKeyInfo()).sign( - new DOMSignContext(privateKey, newDocument.getDocumentElement())); + withProps(new DOMSignContext(privateKey, newDocument.getDocumentElement()))); return newDocument; } @@ -290,7 +297,7 @@ public Document signEnveloping(Document document, String id, String ref) throws id, null, null)), null, null) - .sign(new DOMSignContext(privateKey, newDocument)); + .sign(withProps(new DOMSignContext(privateKey, newDocument))); return newDocument; } @@ -308,7 +315,7 @@ public Document sign(byte[] data) throws Exception { "object", null, null)), null, null) - .sign(new DOMSignContext(privateKey, newDocument)); + .sign(withProps(new DOMSignContext(privateKey, newDocument))); return newDocument; } @@ -325,10 +332,18 @@ public Document sign(String str) throws Exception { "object", null, null)), null, null) - .sign(new DOMSignContext(privateKey, newDocument)); + .sign(withProps(new DOMSignContext(privateKey, newDocument))); return newDocument; } + // Add props to a context + private DOMSignContext withProps(DOMSignContext ctxt) { + for (var e : props.entrySet()) { + ctxt.setProperty(e.getKey(), e.getValue()); + } + return ctxt; + } + // Builds a SignedInfo for a string reference private SignedInfo buildSignedInfo(String ref) throws Exception { return buildSignedInfo(FAC.newReference( @@ -426,6 +441,7 @@ public static class Validator { private Boolean secureValidation = null; private String baseURI = null; private final KeyStore ks; + Map props = new HashMap<>(); public Validator(KeyStore ks) { this.ks = ks; @@ -441,6 +457,11 @@ public Validator baseURI(String base) { return this; } + public Validator prop(String name, Object o) { + props.put(name, o); + return this; + } + public boolean validate(Document document) throws Exception { return validate(document, null); } @@ -471,12 +492,21 @@ public KeySelectorResult select(KeyInfo ki, Purpose p, secureValidation); } return XMLSignatureFactory.getInstance("DOM") - .unmarshalXMLSignature(valContext).validate(valContext); + .unmarshalXMLSignature(valContext) + .validate(withProps(valContext)); } } return false; } + // Add props to a context + private DOMValidateContext withProps(DOMValidateContext ctxt) { + for (var e : props.entrySet()) { + ctxt.setProperty(e.getKey(), e.getValue()); + } + return ctxt; + } + // Find public key from KeyInfo, ks will be used if it's KeyName private static class MyKeySelector extends KeySelector { private final KeyStore ks; From db9eab3f29e9cb26a8c0a7c31c55aaf140f21bed Mon Sep 17 00:00:00 2001 From: David Holmes Date: Thu, 12 Dec 2024 23:15:48 +0000 Subject: [PATCH 15/93] 8311542: Consolidate the native stack printing code Reviewed-by: kbarrett, jwaters --- src/hotspot/share/oops/instanceKlass.cpp | 14 +-- src/hotspot/share/runtime/frame.cpp | 33 ++++++ src/hotspot/share/runtime/frame.hpp | 1 + src/hotspot/share/runtime/javaThread.cpp | 12 +- src/hotspot/share/utilities/debug.cpp | 17 ++- .../share/utilities/nativeStackPrinter.cpp | 81 +++++++++++++ .../share/utilities/nativeStackPrinter.hpp | 108 ++++++++++++++++++ src/hotspot/share/utilities/vmError.cpp | 98 +++------------- src/hotspot/share/utilities/vmError.hpp | 10 +- 9 files changed, 256 insertions(+), 118 deletions(-) create mode 100644 src/hotspot/share/utilities/nativeStackPrinter.cpp create mode 100644 src/hotspot/share/utilities/nativeStackPrinter.hpp diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp index 9cf48da91b6..5fd51ffd6b7 100644 --- a/src/hotspot/share/oops/instanceKlass.cpp +++ b/src/hotspot/share/oops/instanceKlass.cpp @@ -97,8 +97,9 @@ #include "utilities/dtrace.hpp" #include "utilities/events.hpp" #include "utilities/macros.hpp" -#include "utilities/stringUtils.hpp" +#include "utilities/nativeStackPrinter.hpp" #include "utilities/pair.hpp" +#include "utilities/stringUtils.hpp" #ifdef COMPILER1 #include "c1/c1_Compiler.hpp" #endif @@ -4009,14 +4010,9 @@ void InstanceKlass::print_class_load_cause_logging() const { stringStream stack_stream; char buf[O_BUFLEN]; address lastpc = nullptr; - if (os::platform_print_native_stack(&stack_stream, nullptr, buf, O_BUFLEN, lastpc)) { - // We have printed the native stack in platform-specific code, - // so nothing else to do in this case. - } else { - frame f = os::current_frame(); - VMError::print_native_stack(&stack_stream, f, current, true /*print_source_info */, - -1 /* max stack_stream */, buf, O_BUFLEN); - } + NativeStackPrinter nsp(current); + nsp.print_stack(&stack_stream, buf, sizeof(buf), lastpc, + true /* print_source_info */, -1 /* max stack */); LogMessage(class, load, cause, native) msg; NonInterleavingLogStream info_stream{LogLevelType::Info, msg}; diff --git a/src/hotspot/share/runtime/frame.cpp b/src/hotspot/share/runtime/frame.cpp index 738b89e77bd..0029a555d26 100644 --- a/src/hotspot/share/runtime/frame.cpp +++ b/src/hotspot/share/runtime/frame.cpp @@ -1558,6 +1558,39 @@ void frame::describe(FrameValues& values, int frame_no, const RegisterMap* reg_m #endif +/** + * Gets the caller frame of `fr` for thread `t`. + * + * @returns an invalid frame (i.e. fr.pc() === 0) if the caller cannot be obtained + */ +frame frame::next_frame(frame fr, Thread* t) { + // Compiled code may use EBP register on x86 so it looks like + // non-walkable C frame. Use frame.sender() for java frames. + frame invalid; + if (t != nullptr && t->is_Java_thread()) { + // Catch very first native frame by using stack address. + // For JavaThread stack_base and stack_size should be set. + if (!t->is_in_full_stack((address)(fr.real_fp() + 1))) { + return invalid; + } + if (fr.is_interpreted_frame() || (fr.cb() != nullptr && fr.cb()->frame_size() > 0)) { + RegisterMap map(JavaThread::cast(t), + RegisterMap::UpdateMap::skip, + RegisterMap::ProcessFrames::include, + RegisterMap::WalkContinuation::skip); // No update + return fr.sender(&map); + } else { + // is_first_C_frame() does only simple checks for frame pointer, + // it will pass if java compiled code has a pointer in EBP. + if (os::is_first_C_frame(&fr)) return invalid; + return os::get_sender_for_C_frame(&fr); + } + } else { + if (os::is_first_C_frame(&fr)) return invalid; + return os::get_sender_for_C_frame(&fr); + } +} + #ifndef PRODUCT void FrameValues::describe(int owner, intptr_t* location, const char* description, int priority) { diff --git a/src/hotspot/share/runtime/frame.hpp b/src/hotspot/share/runtime/frame.hpp index 0363d7305d2..1c24e5b63c7 100644 --- a/src/hotspot/share/runtime/frame.hpp +++ b/src/hotspot/share/runtime/frame.hpp @@ -440,6 +440,7 @@ class frame { void interpreter_frame_print_on(outputStream* st) const; void print_on_error(outputStream* st, char* buf, int buflen, bool verbose = false) const; static void print_C_frame(outputStream* st, char* buf, int buflen, address pc); + static frame next_frame(frame fr, Thread* t); // For native stack walking #ifndef PRODUCT // Add annotated descriptions of memory locations belonging to this frame to values diff --git a/src/hotspot/share/runtime/javaThread.cpp b/src/hotspot/share/runtime/javaThread.cpp index 7f332638ee0..86aa62fd3fb 100644 --- a/src/hotspot/share/runtime/javaThread.cpp +++ b/src/hotspot/share/runtime/javaThread.cpp @@ -100,6 +100,7 @@ #include "utilities/dtrace.hpp" #include "utilities/events.hpp" #include "utilities/macros.hpp" +#include "utilities/nativeStackPrinter.hpp" #include "utilities/preserveException.hpp" #include "utilities/spinYield.hpp" #include "utilities/vmError.hpp" @@ -1772,15 +1773,10 @@ void JavaThread::print_jni_stack() { tty->print_cr("Unable to print native stack - out of memory"); return; } + NativeStackPrinter nsp(this); address lastpc = nullptr; - if (os::platform_print_native_stack(tty, nullptr, buf, O_BUFLEN, lastpc)) { - // We have printed the native stack in platform-specific code, - // so nothing else to do in this case. - } else { - frame f = os::current_frame(); - VMError::print_native_stack(tty, f, this, true /*print_source_info */, - -1 /* max stack */, buf, O_BUFLEN); - } + nsp.print_stack(tty, buf, O_BUFLEN, lastpc, + true /*print_source_info */, -1 /* max stack */ ); } else { print_active_stack_on(tty); } diff --git a/src/hotspot/share/utilities/debug.cpp b/src/hotspot/share/utilities/debug.cpp index 07e93ca5710..61743be7dfc 100644 --- a/src/hotspot/share/utilities/debug.cpp +++ b/src/hotspot/share/utilities/debug.cpp @@ -61,6 +61,7 @@ #include "utilities/formatBuffer.hpp" #include "utilities/globalDefinitions.hpp" #include "utilities/macros.hpp" +#include "utilities/nativeStackPrinter.hpp" #include "utilities/unsigned5.hpp" #include "utilities/vmError.hpp" @@ -645,10 +646,11 @@ void help() { extern "C" DEBUGEXPORT void pns(void* sp, void* fp, void* pc) { // print native stack Command c("pns"); static char buf[O_BUFLEN]; - Thread* t = Thread::current_or_null(); // Call generic frame constructor (certain arguments may be ignored) frame fr(sp, fp, pc); - VMError::print_native_stack(tty, fr, t, false, -1, buf, sizeof(buf)); + NativeStackPrinter nsp(Thread::current_or_null()); + nsp.print_stack_from_frame(tty, fr, buf, sizeof(buf), + false /* print_source_info */, -1 /* max stack */); } // @@ -663,14 +665,9 @@ extern "C" DEBUGEXPORT void pns2() { // print native stack Command c("pns2"); static char buf[O_BUFLEN]; address lastpc = nullptr; - if (os::platform_print_native_stack(tty, nullptr, buf, sizeof(buf), lastpc)) { - // We have printed the native stack in platform-specific code, - // so nothing else to do in this case. - } else { - Thread* t = Thread::current_or_null(); - frame fr = os::current_frame(); - VMError::print_native_stack(tty, fr, t, false, -1, buf, sizeof(buf)); - } + NativeStackPrinter nsp(Thread::current_or_null()); + nsp.print_stack(tty, buf, sizeof(buf), lastpc, + false /* print_source_info */, -1 /* max stack */); } #endif diff --git a/src/hotspot/share/utilities/nativeStackPrinter.cpp b/src/hotspot/share/utilities/nativeStackPrinter.cpp new file mode 100644 index 00000000000..6f94722213c --- /dev/null +++ b/src/hotspot/share/utilities/nativeStackPrinter.cpp @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2003, 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. + * + */ + +#include "precompiled.hpp" +#include "runtime/frame.inline.hpp" +#include "runtime/os.inline.hpp" +#include "utilities/decoder.hpp" +#include "utilities/globalDefinitions.hpp" +#include "utilities/nativeStackPrinter.hpp" +#include "utilities/ostream.hpp" + +bool NativeStackPrinter::print_stack(outputStream* st, char* buf, int buf_size, + address& lastpc, bool print_source_info, + int max_frames) { + if (os::platform_print_native_stack(st, _context, buf, buf_size, lastpc)) { + return true; + } else { + print_stack_from_frame(st, buf, buf_size, print_source_info, max_frames); + return false; + } +} + +void NativeStackPrinter::print_stack_from_frame(outputStream* st, frame fr, + char* buf, int buf_size, + bool print_source_info, int max_frames) { + // see if it's a valid frame + if (fr.pc()) { + st->print_cr("Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)"); + const int limit = max_frames == -1 ? StackPrintLimit + : MIN2(max_frames, StackPrintLimit); + int count = 0; + while (count++ < limit) { + fr.print_on_error(st, buf, buf_size); + if (fr.pc()) { // print source file and line, if available + char filename[128]; + int line_no; + if (count == 1 && _lineno != 0) { + // We have source information for the first frame for internal errors, + // there is no need to parse it from the symbols. + st->print(" (%s:%d)", _filename, _lineno); + } else if (print_source_info && + Decoder::get_source_info(fr.pc(), filename, sizeof(filename), &line_no, count != 1)) { + st->print(" (%s:%d)", filename, line_no); + } + } + st->cr(); + fr = frame::next_frame(fr, _current); + if (fr.pc() == nullptr) { + break; + } + } + + if (count > limit) { + st->print_cr("......"); + } + + } else { + st->print_cr("Native frames: "); + } +} diff --git a/src/hotspot/share/utilities/nativeStackPrinter.hpp b/src/hotspot/share/utilities/nativeStackPrinter.hpp new file mode 100644 index 00000000000..45413381079 --- /dev/null +++ b/src/hotspot/share/utilities/nativeStackPrinter.hpp @@ -0,0 +1,108 @@ +/* + * Copyright (c) 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. + * + */ +#ifndef SHARE_UTILITIES_NATIVESTACKPRINTER_HPP +#define SHARE_UTILITIES_NATIVESTACKPRINTER_HPP + +#include "memory/allocation.hpp" +#include "runtime/frame.hpp" +#include "runtime/os.hpp" +#include "utilities/globalDefinitions.hpp" + +// Forward declarations +class outputStream; +class Thread; + +// Helper class to do native stack printing from various contexts +// including during crash reporting. +// The NativeStackPrinter is created with the basic context information +// available from the caller. Then the print_stack function is called +// to do the actual printing. +class NativeStackPrinter : public StackObj { + Thread* _current; // Current thread if known + const void* _context; // OS crash context if known + const char* _filename; // Source file name if known + int _lineno; // Source file line number if known + + public: + // Creates a NativeStackPrinter using the given additional context + // information: + // - the current thread is used for frame-based stack walking + // - context is the crash context from the OS and can be used to get a frame; + // otherwise os::current_frame() will be used + // - filename and lineno provide details from the fatal error handler so we + // can skip use of the Decoder for the first line (optimization) + NativeStackPrinter(Thread* current_or_null, + const void* context, + const char* filename, + int lineno) : + _current(current_or_null), + _context(context), + _filename(filename), + _lineno(lineno) { + assert((_lineno == 0 && _filename == nullptr) || + (_lineno > 0 && _filename != nullptr), + "file name and line number need to be provided together"); + } + + NativeStackPrinter(Thread* current_or_null) + : NativeStackPrinter(current_or_null, nullptr, nullptr, 0) {} + + // Prints the stack of the current thread to the given stream. + // We first try to print via os::platform_print_native_stack. If that + // succeeds then lastpc is set and we return true. Otherwise we do a + // frame walk to print the stack, and return false. + // - st: the stream to print to + // - buf, buf_size: temporary buffer to use for formatting output + // - print_source_info: see print_stack_from_frame + // - max_frames: see print_stack_from_frame + // + bool print_stack(outputStream* st, char* buf, int buf_size, + address& lastpc, bool print_source_info, + int max_frames); + + // Prints the stack to st by walking the frames starting from + // either the context frame, else the current frame. + // - st: the stream to print to + // - buf, buf_size: temporary buffer to use when printing frames + // - print_source_info: if true obtains source information from the Decoder + // if available. (Useful but may slow down, timeout or + // misfunction in error situations) + // - max_frames: the maximum number of frames to print. -1 means print all. + // However, StackPrintLimit sets a hard limit on the maximum. + void print_stack_from_frame(outputStream* st, frame fr, + char* buf, int buf_size, + bool print_source_info, int max_frames); + + // Prints the stack to st by walking the frames starting from + // either the context frame, else the current frame. + void print_stack_from_frame(outputStream* st, + char* buf, int buf_size, + bool print_source_info, int max_frames) { + frame fr = _context != nullptr ? os::fetch_frame_from_context(_context) + : os::current_frame(); + print_stack_from_frame(st, fr, buf, buf_size, print_source_info, max_frames); + } +}; + +#endif // SHARE_UTILITIES_NATIVESTACKPRINTER_HPP diff --git a/src/hotspot/share/utilities/vmError.cpp b/src/hotspot/share/utilities/vmError.cpp index bb57c19c528..b0a9016ffc2 100644 --- a/src/hotspot/share/utilities/vmError.cpp +++ b/src/hotspot/share/utilities/vmError.cpp @@ -67,6 +67,7 @@ #include "utilities/events.hpp" #include "utilities/globalDefinitions.hpp" #include "utilities/macros.hpp" +#include "utilities/nativeStackPrinter.hpp" #include "utilities/ostream.hpp" #include "utilities/vmError.hpp" #if INCLUDE_JFR @@ -97,7 +98,7 @@ Thread* VMError::_thread; address VMError::_pc; const void* VMError::_siginfo; const void* VMError::_context; -bool VMError::_print_native_stack_used = false; +bool VMError::_print_stack_from_frame_used = false; const char* VMError::_filename; int VMError::_lineno; size_t VMError::_size; @@ -418,75 +419,6 @@ static const char* find_code_name(address pc) { return nullptr; } -/** - * Gets the caller frame of `fr`. - * - * @returns an invalid frame (i.e. fr.pc() === 0) if the caller cannot be obtained - */ -static frame next_frame(frame fr, Thread* t) { - // Compiled code may use EBP register on x86 so it looks like - // non-walkable C frame. Use frame.sender() for java frames. - frame invalid; - if (t != nullptr && t->is_Java_thread()) { - // Catch very first native frame by using stack address. - // For JavaThread stack_base and stack_size should be set. - if (!t->is_in_full_stack((address)(fr.real_fp() + 1))) { - return invalid; - } - if (fr.is_interpreted_frame() || (fr.cb() != nullptr && fr.cb()->frame_size() > 0)) { - RegisterMap map(JavaThread::cast(t), - RegisterMap::UpdateMap::skip, - RegisterMap::ProcessFrames::include, - RegisterMap::WalkContinuation::skip); // No update - return fr.sender(&map); - } else { - // is_first_C_frame() does only simple checks for frame pointer, - // it will pass if java compiled code has a pointer in EBP. - if (os::is_first_C_frame(&fr)) return invalid; - return os::get_sender_for_C_frame(&fr); - } - } else { - if (os::is_first_C_frame(&fr)) return invalid; - return os::get_sender_for_C_frame(&fr); - } -} - -void VMError::print_native_stack(outputStream* st, frame fr, Thread* t, bool print_source_info, int max_frames, char* buf, int buf_size) { - - // see if it's a valid frame - if (fr.pc()) { - st->print_cr("Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)"); - const int limit = max_frames == -1 ? StackPrintLimit : MIN2(max_frames, StackPrintLimit); - int count = 0; - while (count++ < limit) { - fr.print_on_error(st, buf, buf_size); - if (fr.pc()) { // print source file and line, if available - char filename[128]; - int line_no; - if (count == 1 && _lineno != 0) { - // We have source information of the first frame for internal errors. There is no need to parse it from the symbols. - st->print(" (%s:%d)", get_filename_only(), _lineno); - } else if (print_source_info && - Decoder::get_source_info(fr.pc(), filename, sizeof(filename), &line_no, count != 1)) { - st->print(" (%s:%d)", filename, line_no); - } - } - st->cr(); - fr = next_frame(fr, t); - if (fr.pc() == nullptr) { - break; - } - } - - if (count > limit) { - st->print_cr("......"); - } - - } else { - st->print_cr("Native frames: "); - } -} - static void print_oom_reasons(outputStream* st) { st->print_cr("# Possible reasons:"); st->print_cr("# The system is out of physical RAM or swap space"); @@ -1008,7 +940,10 @@ void VMError::report(outputStream* st, bool _verbose) { st->cr(); STEP_IF("printing native stack (with source info)", _verbose) - if (os::platform_print_native_stack(st, _context, buf, sizeof(buf), lastpc)) { + + NativeStackPrinter nsp(_thread, _context, _filename != nullptr ? get_filename_only() : nullptr, _lineno); + if (nsp.print_stack(st, buf, sizeof(buf), lastpc, + true /*print_source_info */, -1 /* max stack */)) { // We have printed the native stack in platform-specific code // Windows/x64 needs special handling. // Stack walking may get stuck. Try to find the calling code. @@ -1019,19 +954,16 @@ void VMError::report(outputStream* st, bool _verbose) { } } } else { - frame fr = _context ? os::fetch_frame_from_context(_context) - : os::current_frame(); - - print_native_stack(st, fr, _thread, true, -1, buf, sizeof(buf)); - _print_native_stack_used = true; + _print_stack_from_frame_used = true; // frame-based native stack walk done } REATTEMPT_STEP_IF("retry printing native stack (no source info)", _verbose) st->cr(); st->print_cr("Retrying call stack printing without source information..."); - frame fr = _context ? os::fetch_frame_from_context(_context) : os::current_frame(); - print_native_stack(st, fr, _thread, false, -1, buf, sizeof(buf)); - _print_native_stack_used = true; + NativeStackPrinter nsp(_thread, _context, get_filename_only(), _lineno); + nsp.print_stack_from_frame(st, buf, sizeof(buf), + false /*print_source_info */, -1 /* max stack */); + _print_stack_from_frame_used = true; STEP_IF("printing Java stack", _verbose && _thread && _thread->is_Java_thread()) if (_verbose && _thread && _thread->is_Java_thread()) { @@ -1141,7 +1073,7 @@ void VMError::report(outputStream* st, bool _verbose) { } // Scan the native stack - if (!_print_native_stack_used) { + if (!_print_stack_from_frame_used) { // Only try to print code of the crashing frame since // the native stack cannot be walked with next_frame. if (print_code(st, _thread, _pc, true, printed, printed_capacity)) { @@ -1154,7 +1086,7 @@ void VMError::report(outputStream* st, bool _verbose) { if (print_code(st, _thread, fr.pc(), fr.pc() == _pc, printed, printed_capacity)) { printed_len++; } - fr = next_frame(fr, _thread); + fr = frame::next_frame(fr, _thread); } } @@ -1786,12 +1718,12 @@ void VMError::report_and_die(int id, const char* message, const char* detail_fmt st->print_cr("]"); } st->print("[stack: "); - frame fr = context ? os::fetch_frame_from_context(context) : os::current_frame(); + NativeStackPrinter nsp(_thread, context, _filename != nullptr ? get_filename_only() : nullptr, _lineno); // Subsequent secondary errors build up stack; to avoid flooding the hs-err file with irrelevant // call stacks, limit the stack we print here (we are only interested in what happened before the // last assert/fault). const int max_stack_size = 15; - print_native_stack(st, fr, _thread, true, max_stack_size, tmp, sizeof(tmp)); + nsp.print_stack_from_frame(st, tmp, sizeof(tmp), true /* print_source_info */, max_stack_size); st->print_cr("]"); } // !recursed recursed = false; // Note: reset outside !recursed diff --git a/src/hotspot/share/utilities/vmError.hpp b/src/hotspot/share/utilities/vmError.hpp index 405cb515896..832f44223be 100644 --- a/src/hotspot/share/utilities/vmError.hpp +++ b/src/hotspot/share/utilities/vmError.hpp @@ -51,9 +51,9 @@ class VMError : public AllStatic { static const void* _context; // ContextRecord on Windows, // ucontext_t on Solaris/Linux - // records if VMError::print_native_stack was used to + // records if frame-based stack walking was used to // print the native stack instead of os::platform_print_native_stack - static bool _print_native_stack_used; + static bool _print_stack_from_frame_used; // additional info for VM internal errors static const char* _filename; @@ -148,12 +148,6 @@ class VMError : public AllStatic { public: - // print_source_info: if true, we try to resolve the source information on platforms that support it - // (useful but may slow down, timeout or misfunction in error situations) - // max_frames: if not -1, overrides StackPrintLimit - static void print_native_stack(outputStream* st, frame fr, Thread* t, bool print_source_info, - int max_frames, char* buf, int buf_size); - // return a string to describe the error static char* error_string(char* buf, int buflen); From 28e49e978a40f3fdff08c5e309cea739ecc870dc Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Fri, 13 Dec 2024 04:49:11 +0000 Subject: [PATCH 16/93] 8345505: Fix -Wzero-as-null-pointer-constant warnings in zero code Reviewed-by: dholmes --- src/hotspot/cpu/zero/frame_zero.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/cpu/zero/frame_zero.cpp b/src/hotspot/cpu/zero/frame_zero.cpp index f049c4bda25..7c65387f238 100644 --- a/src/hotspot/cpu/zero/frame_zero.cpp +++ b/src/hotspot/cpu/zero/frame_zero.cpp @@ -125,10 +125,10 @@ bool frame::safe_for_sender(JavaThread *thread) { bool frame::is_interpreted_frame_valid(JavaThread *thread) const { assert(is_interpreted_frame(), "Not an interpreted frame"); // These are reasonable sanity checks - if (fp() == 0 || (intptr_t(fp()) & (wordSize-1)) != 0) { + if (fp() == nullptr || (intptr_t(fp()) & (wordSize-1)) != 0) { return false; } - if (sp() == 0 || (intptr_t(sp()) & (wordSize-1)) != 0) { + if (sp() == nullptr || (intptr_t(sp()) & (wordSize-1)) != 0) { return false; } // These are hacks to keep us out of trouble. From 09c29d1d4274d9c36e1af98f02e6fc5b3f35133f Mon Sep 17 00:00:00 2001 From: Sorna Sarathi Date: Fri, 13 Dec 2024 05:01:37 +0000 Subject: [PATCH 17/93] 8346069: Add missing Classpath exception statements Reviewed-by: amitkumar, asemenyuk, iris, kcr --- .../jdk/jpackage/internal/util/PrettyPrintHandler.java | 4 +++- .../share/classes/jdk/jpackage/internal/util/XmlConsumer.java | 4 +++- .../share/classes/jdk/jpackage/internal/util/XmlUtils.java | 4 +++- .../jdk/jpackage/internal/util/function/ExceptionBox.java | 4 +++- .../jpackage/internal/util/function/ThrowingBiConsumer.java | 4 +++- .../jpackage/internal/util/function/ThrowingBiFunction.java | 4 +++- .../jdk/jpackage/internal/util/function/ThrowingConsumer.java | 4 +++- .../jdk/jpackage/internal/util/function/ThrowingFunction.java | 4 +++- .../jdk/jpackage/internal/util/function/ThrowingRunnable.java | 4 +++- .../jdk/jpackage/internal/util/function/ThrowingSupplier.java | 4 +++- .../internal/util/function/ThrowingUnaryOperator.java | 4 +++- 11 files changed, 33 insertions(+), 11 deletions(-) diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/PrettyPrintHandler.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/PrettyPrintHandler.java index ffd5b764103..1fb7c7ff7da 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/PrettyPrintHandler.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/PrettyPrintHandler.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/XmlConsumer.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/XmlConsumer.java index 429be6aba05..a77c93e9383 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/XmlConsumer.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/XmlConsumer.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/XmlUtils.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/XmlUtils.java index ff4168e5d0c..57ad1759bf4 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/XmlUtils.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/XmlUtils.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ExceptionBox.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ExceptionBox.java index 55f2964445f..8428d5d1e7f 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ExceptionBox.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ExceptionBox.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingBiConsumer.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingBiConsumer.java index e5b7704a92e..3ed0fd67d84 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingBiConsumer.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingBiConsumer.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingBiFunction.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingBiFunction.java index a8119f25bdb..8c2df773eb5 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingBiFunction.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingBiFunction.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingConsumer.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingConsumer.java index 5ca33c22d92..ef1b0a61df7 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingConsumer.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingConsumer.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingFunction.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingFunction.java index db6b1d26005..2b5eae43842 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingFunction.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingFunction.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingRunnable.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingRunnable.java index 7f3fcda536c..7c75c4d9753 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingRunnable.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingRunnable.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingSupplier.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingSupplier.java index 2f5ef135875..c69c4729190 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingSupplier.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingSupplier.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingUnaryOperator.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingUnaryOperator.java index 27a3e2f30f5..7a2a0fd67cf 100644 --- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingUnaryOperator.java +++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/function/ThrowingUnaryOperator.java @@ -4,7 +4,9 @@ * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. + * 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 From 31ceec7cd55b455cddf0953cc23aaa64612bd6e7 Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Fri, 13 Dec 2024 05:50:07 +0000 Subject: [PATCH 18/93] 8346055: javax/swing/text/StyledEditorKit/4506788/bug4506788.java fails in ubuntu22.04 Reviewed-by: tr --- .../StyledEditorKit/4506788/bug4506788.java | 133 ++++++++---------- 1 file changed, 60 insertions(+), 73 deletions(-) diff --git a/test/jdk/javax/swing/text/StyledEditorKit/4506788/bug4506788.java b/test/jdk/javax/swing/text/StyledEditorKit/4506788/bug4506788.java index e7c31a26d0f..1df40e5714e 100644 --- a/test/jdk/javax/swing/text/StyledEditorKit/4506788/bug4506788.java +++ b/test/jdk/javax/swing/text/StyledEditorKit/4506788/bug4506788.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -29,98 +29,85 @@ * @run main bug4506788 */ -import java.awt.*; -import java.awt.event.*; -import java.lang.reflect.InvocationTargetException; -import javax.swing.*; -import javax.swing.event.*; -import javax.swing.text.*; +import java.awt.Dimension; +import java.awt.Point; +import java.awt.Robot; +import java.awt.event.KeyEvent; +import java.awt.event.InputEvent; +import javax.swing.JEditorPane; +import javax.swing.JFrame; +import javax.swing.SwingUtilities; +import javax.swing.event.CaretEvent; +import javax.swing.event.CaretListener; +import javax.swing.text.DefaultStyledDocument; +import javax.swing.text.MutableAttributeSet; +import javax.swing.text.SimpleAttributeSet; +import javax.swing.text.StyleConstants; +import javax.swing.text.StyledEditorKit; public class bug4506788 { - private volatile boolean passed = false; - private JEditorPane jep; + private static volatile boolean passed; + private static volatile Point p; + private static volatile Dimension dim; + private static JEditorPane jep; + private static JFrame f; - public static void main(final String[] args) { - bug4506788 app = new bug4506788(); - app.init(); - app.start(); - } - - public void init() { - try { - SwingUtilities.invokeAndWait(new Runnable() { - @Override - public void run() { - createAndShowGUI(); - } - }); - } catch (InterruptedException | InvocationTargetException ex) { - ex.printStackTrace(); - throw new RuntimeException("FAILED: SwingUtilities.invokeAndWait method failed then creating and showing GUI"); - } - } - - public void start() { - Robot robot; + public static void main(final String[] args) throws Exception { try { - robot = new Robot(); + Robot robot = new Robot(); robot.setAutoDelay(100); - } catch (AWTException e) { - throw new RuntimeException("Robot could not be created"); - } - - robot.waitForIdle(); - - Point p; - try { - p = getJEPLocOnScreen(); - } catch (Exception e) { - throw new RuntimeException("Could not get JEditorPane location on screen"); - } - - robot.mouseMove(p.x, p.y); - robot.mousePress(InputEvent.BUTTON1_MASK); - robot.mouseRelease(InputEvent.BUTTON1_MASK); - robot.keyPress(KeyEvent.VK_HOME); - robot.keyRelease(KeyEvent.VK_HOME); - robot.keyPress(KeyEvent.VK_RIGHT); - robot.keyRelease(KeyEvent.VK_RIGHT); - robot.keyPress(KeyEvent.VK_X); - robot.keyRelease(KeyEvent.VK_X); - robot.keyPress(KeyEvent.VK_RIGHT); - robot.keyRelease(KeyEvent.VK_RIGHT); - - robot.waitForIdle(); - if (!passed) { - throw new RuntimeException("Test failed."); - } - } + SwingUtilities.invokeAndWait(() -> createAndShowGUI()); - private Point getJEPLocOnScreen() throws Exception { + robot.waitForIdle(); + robot.delay(1000); - final Point[] result = new Point[1]; + SwingUtilities.invokeAndWait(() -> { + p = jep.getLocationOnScreen(); + dim = jep.getSize(); + }); - SwingUtilities.invokeAndWait(new Runnable() { - @Override - public void run() { - result[0] = jep.getLocationOnScreen(); + robot.mouseMove(p.x + dim.width / 2, p.y + dim.height / 2); + robot.waitForIdle(); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.waitForIdle(); + robot.keyPress(KeyEvent.VK_HOME); + robot.keyRelease(KeyEvent.VK_HOME); + robot.waitForIdle(); + robot.keyPress(KeyEvent.VK_RIGHT); + robot.keyRelease(KeyEvent.VK_RIGHT); + robot.waitForIdle(); + robot.keyPress(KeyEvent.VK_X); + robot.keyRelease(KeyEvent.VK_X); + robot.waitForIdle(); + robot.keyPress(KeyEvent.VK_RIGHT); + robot.keyRelease(KeyEvent.VK_RIGHT); + robot.waitForIdle(); + + if (!passed) { + throw new RuntimeException("Test failed."); } - }); - - return result[0]; + } finally { + SwingUtilities.invokeAndWait(() -> { + if (f != null) { + f.dispose(); + } + }); + } } - private void createAndShowGUI() { + private static void createAndShowGUI() { jep = new JEditorPane(); String text = "abc"; - JFrame f = new JFrame(); + f = new JFrame("bug4506788"); jep.setEditorKit(new StyledEditorKit()); jep.setText(text); jep.addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { + System.out.println("getDot " + e.getDot()); passed = (e.getDot() == 3); } }); From 367c3041272d43b0474b433c555f22a3e15579f6 Mon Sep 17 00:00:00 2001 From: SendaoYan Date: Fri, 13 Dec 2024 08:34:10 +0000 Subject: [PATCH 19/93] 8346059: [ASAN] awt_LoadLibrary.c reported compile warning ignoring return value of function by clang17 Reviewed-by: ihse --- src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c b/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c index f24a4eb9a2c..d6ff51f8018 100644 --- a/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c +++ b/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c @@ -137,7 +137,9 @@ AWT_OnLoad(JavaVM *vm, void *reserved) } else { /* Get address of this library and the directory containing it. */ dladdr((void *)AWT_OnLoad, &dlinfo); - realpath((char *)dlinfo.dli_fname, buf); + if (realpath((char *)dlinfo.dli_fname, buf) == NULL) { + perror((char *)dlinfo.dli_fname); + } len = strlen(buf); p = strrchr(buf, '/'); From a9a5f7cb0a75b82d613ecd9018e13e5337e90363 Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Fri, 13 Dec 2024 11:43:32 +0000 Subject: [PATCH 20/93] 8345323: Parallel GC does not handle UseLargePages and UseNUMA gracefully Reviewed-by: sjohanss, tschatzl --- src/hotspot/share/gc/shared/genArguments.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/gc/shared/genArguments.cpp b/src/hotspot/share/gc/shared/genArguments.cpp index 76f9f6d4052..c94ca56722f 100644 --- a/src/hotspot/share/gc/shared/genArguments.cpp +++ b/src/hotspot/share/gc/shared/genArguments.cpp @@ -37,7 +37,11 @@ size_t MinNewSize = 0; size_t MinOldSize = 0; size_t MaxOldSize = 0; -size_t OldSize = 0; +// If InitialHeapSize or MinHeapSize is not set on cmdline, this variable, +// together with NewSize, is used to derive them. +// Using the same value when it was a configurable flag to avoid breakage. +// See more in JDK-8346005 +size_t OldSize = ScaleForWordSize(4*M); size_t GenAlignment = 0; From 1d2ccaeaa316029772b5de3dc5579ee7b1363b60 Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Fri, 13 Dec 2024 12:14:07 +0000 Subject: [PATCH 21/93] 8345569: [ubsan] adjustments to filemap.cpp and virtualspace.cpp for macOS aarch64 Reviewed-by: mdoerr, lucy, dholmes --- src/hotspot/share/cds/filemap.cpp | 4 ++-- src/hotspot/share/memory/virtualspace.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp index 594d8817322..06298949e0a 100644 --- a/src/hotspot/share/cds/filemap.cpp +++ b/src/hotspot/share/cds/filemap.cpp @@ -2219,7 +2219,7 @@ address FileMapInfo::heap_region_dumptime_address() { assert(CDSConfig::is_using_archive(), "runtime only"); assert(is_aligned(r->mapping_offset(), sizeof(HeapWord)), "must be"); if (UseCompressedOops) { - return /*dumptime*/ narrow_oop_base() + r->mapping_offset(); + return /*dumptime*/ (address)((uintptr_t)narrow_oop_base() + r->mapping_offset()); } else { return heap_region_requested_address(); } @@ -2245,7 +2245,7 @@ address FileMapInfo::heap_region_requested_address() { // Runtime base = 0x4000 and shift is also 0. If we map this region at 0x5000, then // the value P can remain 0x1200. The decoded address = (0x4000 + (0x1200 << 0)) = 0x5200, // which is the runtime location of the referenced object. - return /*runtime*/ CompressedOops::base() + r->mapping_offset(); + return /*runtime*/ (address)((uintptr_t)CompressedOops::base() + r->mapping_offset()); } else { // This was the hard-coded requested base address used at dump time. With uncompressed oops, // the heap range is assigned by the OS so we will most likely have to relocate anyway, no matter diff --git a/src/hotspot/share/memory/virtualspace.cpp b/src/hotspot/share/memory/virtualspace.cpp index 0e4e4a4660d..69b39fcbdeb 100644 --- a/src/hotspot/share/memory/virtualspace.cpp +++ b/src/hotspot/share/memory/virtualspace.cpp @@ -443,7 +443,7 @@ void ReservedHeapSpace::try_reserve_range(char *highest_start, while (attach_point >= lowest_start && attach_point <= highest_start && // Avoid wrap around. ((_base == nullptr) || - (_base < aligned_heap_base_min_address || _base + size > upper_bound))) { + (_base < aligned_heap_base_min_address || size > (uintptr_t)(upper_bound - _base)))) { try_reserve_heap(size, alignment, page_size, attach_point); attach_point -= stepsize; } From 266e3d0decc09b9c17c455e2c754cd39114fa31a Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Fri, 13 Dec 2024 12:18:49 +0000 Subject: [PATCH 22/93] 8345590: AIX 'make all' fails after JDK-8339480 Reviewed-by: clanger, jkern, mdoerr, lucy --- make/Main.gmk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/make/Main.gmk b/make/Main.gmk index ddcc0c7f674..7675fe6fcf7 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -1310,7 +1310,10 @@ endif ################################################################################ # all-images builds all our deliverables as images. -all-images: product-images static-jdk-image test-image all-docs-images +all-images: product-images test-image all-docs-images +ifeq ($(call isTargetOs, linux macosx windows), true) + all-images: static-jdk-image +endif # all-bundles packages all our deliverables as tar.gz bundles. all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles From 2ce53e88481659734bc5424c643c5e31c116bc5d Mon Sep 17 00:00:00 2001 From: William Kemper Date: Fri, 13 Dec 2024 17:41:26 +0000 Subject: [PATCH 23/93] 8345970: pthread_getcpuclockid related crashes in shenandoah tests Reviewed-by: ysr --- .../share/gc/shenandoah/shenandoahGenerationalHeap.cpp | 2 +- src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp | 6 +++++- src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.cpp | 6 +++++- src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.hpp | 4 ++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp b/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp index 5b8afc52b93..2ad35fcb288 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp @@ -180,8 +180,8 @@ void ShenandoahGenerationalHeap::gc_threads_do(ThreadClosure* tcl) const { } void ShenandoahGenerationalHeap::stop() { - regulator_thread()->stop(); ShenandoahHeap::stop(); + regulator_thread()->stop(); } void ShenandoahGenerationalHeap::evacuate_collection_set(bool concurrent) { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp index c1bc9dc6616..cdcc5dbd267 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp @@ -545,7 +545,6 @@ ShenandoahHeap::ShenandoahHeap(ShenandoahCollectorPolicy* policy) : _pacer(nullptr), _verifier(nullptr), _phase_timings(nullptr), - _mmu_tracker(), _monitoring_support(nullptr), _memory_pool(nullptr), _stw_memory_manager("Shenandoah Pauses"), @@ -639,6 +638,8 @@ class ShenandoahInitWorkerGCLABClosure : public ThreadClosure { void ShenandoahHeap::post_initialize() { CollectedHeap::post_initialize(); + + // Schedule periodic task to report on gc thread CPU utilization _mmu_tracker.initialize(); MutexLocker ml(Threads_lock); @@ -2050,6 +2051,9 @@ void ShenandoahHeap::stop() { // Step 0. Notify policy to disable event recording and prevent visiting gc threads during shutdown _shenandoah_policy->record_shutdown(); + // Step 0a. Stop reporting on gc thread cpu utilization + mmu_tracker()->stop(); + // Step 1. Notify control thread that we are in shutdown. // Note that we cannot do that with stop(), because stop() is blocking and waits for the actual shutdown. // Doing stop() here would wait for the normal GC cycle to complete, never falling through to cancel below. diff --git a/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.cpp b/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.cpp index f4cbdbdd493..d9cec36e6c9 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.cpp @@ -48,6 +48,7 @@ class ThreadTimeAccumulator : public ThreadClosure { size_t total_time; ThreadTimeAccumulator() : total_time(0) {} void do_thread(Thread* thread) override { + assert(!thread->has_terminated(), "Cannot get cpu time for terminated thread: " UINTX_FORMAT, thread->osthread()->thread_id_for_printing()); total_time += os::thread_cpu_time(thread); } }; @@ -65,7 +66,6 @@ ShenandoahMmuTracker::ShenandoahMmuTracker() : } ShenandoahMmuTracker::~ShenandoahMmuTracker() { - _mmu_periodic_task->disenroll(); delete _mmu_periodic_task; } @@ -175,6 +175,10 @@ void ShenandoahMmuTracker::report() { log_debug(gc)("Periodic Sample: GCU = %.3f%%, MU = %.3f%% during most recent %.1fs", gcu * 100, mu * 100, time_delta); } +void ShenandoahMmuTracker::stop() const { + _mmu_periodic_task->disenroll(); +} + void ShenandoahMmuTracker::initialize() { // initialize static data _active_processors = os::initial_active_processor_count(); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.hpp b/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.hpp index 53b6fdada55..89dbf921cd4 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.hpp @@ -101,6 +101,10 @@ class ShenandoahMmuTracker { // GCPauseIntervalMillis and defaults to 5 seconds. This method computes // the MMU over the elapsed interval and records it in a running average. void report(); + + // Unenrolls the periodic task that collects CPU utilization for GC threads. This must happen _before_ the + // gc threads are stopped and terminated. + void stop() const; }; #endif //SHARE_GC_SHENANDOAH_SHENANDOAHMMUTRACKER_HPP From cfa04d31ddff49cbf5dfdfedd61264d5556a283c Mon Sep 17 00:00:00 2001 From: William Kemper Date: Fri, 13 Dec 2024 18:14:01 +0000 Subject: [PATCH 24/93] 8346051: MemoryTest fails when Shenandoah's generational mode is enabled Reviewed-by: lmesnik, ysr --- .../management/MemoryMXBean/MemoryTest.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/test/jdk/java/lang/management/MemoryMXBean/MemoryTest.java b/test/jdk/java/lang/management/MemoryMXBean/MemoryTest.java index 699be54ec89..72c4655b6d8 100644 --- a/test/jdk/java/lang/management/MemoryMXBean/MemoryTest.java +++ b/test/jdk/java/lang/management/MemoryMXBean/MemoryTest.java @@ -46,17 +46,29 @@ */ /* - * @test + * @test id=Shenandoah * @bug 4530538 - * @summary Basic unit test of MemoryMXBean.getMemoryPools() and - * MemoryMXBean.getMemoryManager(). - * @requires vm.gc == "Shenandoah" + * @summary Shenandoah has a gc mgr bean for cycles and another + * for pauses, they both have one pool. + * @requires vm.gc == "Shenandoah" & vm.opt.ShenandoahGCMode != "generational" * @author Mandy Chung * * @modules jdk.management * @run main MemoryTest 2 1 */ +/* + * @test id=Genshen + * @bug 4530538 + * @summary Shenandoah's generational mode has a gc mgr bean for cycles + * and another for pauses. They both reference the young and old pools. + * @requires vm.gc == "Shenandoah" & vm.opt.ShenandoahGCMode == "generational" + * @author Mandy Chung + * + * @modules jdk.management + * @run main MemoryTest 2 2 + */ + /* * @test * @bug 4530538 From f647d4d908a6760c116a3a762c4dc09e3ed95796 Mon Sep 17 00:00:00 2001 From: Calvin Cheung Date: Fri, 13 Dec 2024 19:19:42 +0000 Subject: [PATCH 25/93] 8345936: Call ClassLoader.getResourceAsByteArray only for multi-release jar Reviewed-by: iklam, dholmes --- src/hotspot/share/cds/filemap.cpp | 5 +++-- src/hotspot/share/cds/filemap.hpp | 4 +++- src/hotspot/share/classfile/classLoader.cpp | 10 ++++++---- src/hotspot/share/classfile/classLoader.hpp | 10 ++++++++-- src/hotspot/share/classfile/classLoaderExt.cpp | 5 +++++ 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp index 06298949e0a..c87081d9d14 100644 --- a/src/hotspot/share/cds/filemap.cpp +++ b/src/hotspot/share/cds/filemap.cpp @@ -347,6 +347,7 @@ void SharedClassPathEntry::init(bool is_modules_image, _type = jar_entry; _timestamp = st.st_mtime; _from_class_path_attr = cpe->from_class_path_attr(); + _is_multi_release = cpe->is_multi_release_jar(); } _filesize = st.st_size; _is_module_path = is_module_path; @@ -2680,7 +2681,7 @@ ClassPathEntry* FileMapInfo::get_classpath_entry_for_jvmti(int i, TRAPS) { jio_snprintf(msg, strlen(path) + 127, "error in finding JAR file %s", path); THROW_MSG_(vmSymbols::java_io_IOException(), msg, nullptr); } else { - ent = ClassLoader::create_class_path_entry(THREAD, path, &st, false, false); + ent = ClassLoader::create_class_path_entry(THREAD, path, &st, false, false, scpe->is_multi_release()); if (ent == nullptr) { char *msg = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, strlen(path) + 128); jio_snprintf(msg, strlen(path) + 127, "error in opening JAR file %s", path); @@ -2715,7 +2716,7 @@ ClassFileStream* FileMapInfo::open_stream_for_jvmti(InstanceKlass* ik, Handle cl name->utf8_length()); ClassLoaderData* loader_data = ClassLoaderData::class_loader_data(class_loader()); ClassFileStream* cfs; - if (class_loader() != nullptr && !cpe->is_modules_image()) { + if (class_loader() != nullptr && !cpe->is_modules_image() && cpe->is_multi_release_jar()) { cfs = get_stream_from_class_loader(class_loader, cpe, file_name, CHECK_NULL); } else { cfs = cpe->open_stream_for_loader(THREAD, file_name, loader_data); diff --git a/src/hotspot/share/cds/filemap.hpp b/src/hotspot/share/cds/filemap.hpp index cabb54769fe..6759b4a5020 100644 --- a/src/hotspot/share/cds/filemap.hpp +++ b/src/hotspot/share/cds/filemap.hpp @@ -64,6 +64,7 @@ class SharedClassPathEntry : public MetaspaceObj { u1 _type; bool _is_module_path; bool _from_class_path_attr; + bool _is_multi_release; time_t _timestamp; // jar timestamp, 0 if is directory, modules image or other int64_t _filesize; // jar/jimage file size, -1 if is directory, -2 if other Array* _name; @@ -71,7 +72,7 @@ class SharedClassPathEntry : public MetaspaceObj { public: SharedClassPathEntry() : _type(0), _is_module_path(false), - _from_class_path_attr(false), _timestamp(0), + _from_class_path_attr(false), _is_multi_release(false), _timestamp(0), _filesize(0), _name(nullptr), _manifest(nullptr) {} static int size() { static_assert(is_aligned(sizeof(SharedClassPathEntry), wordSize), "must be"); @@ -92,6 +93,7 @@ class SharedClassPathEntry : public MetaspaceObj { bool is_jar() const { return _type == jar_entry; } bool is_non_existent() const { return _type == non_existent_entry; } bool from_class_path_attr() { return _from_class_path_attr; } + bool is_multi_release() { return _is_multi_release; } time_t timestamp() const { return _timestamp; } const char* name() const; const char* manifest() const { diff --git a/src/hotspot/share/classfile/classLoader.cpp b/src/hotspot/share/classfile/classLoader.cpp index aac312c36a3..83d0e803ee1 100644 --- a/src/hotspot/share/classfile/classLoader.cpp +++ b/src/hotspot/share/classfile/classLoader.cpp @@ -303,10 +303,11 @@ ClassFileStream* ClassPathDirEntry::open_stream(JavaThread* current, const char* } ClassPathZipEntry::ClassPathZipEntry(jzfile* zip, const char* zip_name, - bool is_boot_append, bool from_class_path_attr) : ClassPathEntry() { + bool is_boot_append, bool from_class_path_attr, bool multi_release) : ClassPathEntry() { _zip = zip; _zip_name = copy_path(zip_name); _from_class_path_attr = from_class_path_attr; + _multi_release = multi_release; } ClassPathZipEntry::~ClassPathZipEntry() { @@ -750,7 +751,8 @@ jzfile* ClassLoader::open_zip_file(const char* canonical_path, char** error_msg, ClassPathEntry* ClassLoader::create_class_path_entry(JavaThread* current, const char *path, const struct stat* st, bool is_boot_append, - bool from_class_path_attr) { + bool from_class_path_attr, + bool is_multi_release) { ClassPathEntry* new_entry = nullptr; if ((st->st_mode & S_IFMT) == S_IFREG) { ResourceMark rm(current); @@ -763,7 +765,7 @@ ClassPathEntry* ClassLoader::create_class_path_entry(JavaThread* current, char* error_msg = nullptr; jzfile* zip = open_zip_file(canonical_path, &error_msg, current); if (zip != nullptr && error_msg == nullptr) { - new_entry = new ClassPathZipEntry(zip, path, is_boot_append, from_class_path_attr); + new_entry = new ClassPathZipEntry(zip, path, is_boot_append, from_class_path_attr, is_multi_release); } else { #if INCLUDE_CDS ClassLoaderExt::set_has_non_jar_in_classpath(); @@ -796,7 +798,7 @@ ClassPathZipEntry* ClassLoader::create_class_path_zip_entry(const char *path, bo jzfile* zip = open_zip_file(canonical_path, &error_msg, thread); if (zip != nullptr && error_msg == nullptr) { // create using canonical path - return new ClassPathZipEntry(zip, canonical_path, is_boot_append, false); + return new ClassPathZipEntry(zip, canonical_path, is_boot_append, false, false); } } } diff --git a/src/hotspot/share/classfile/classLoader.hpp b/src/hotspot/share/classfile/classLoader.hpp index d6780054904..8eb6593f07a 100644 --- a/src/hotspot/share/classfile/classLoader.hpp +++ b/src/hotspot/share/classfile/classLoader.hpp @@ -58,6 +58,8 @@ class ClassPathEntry : public CHeapObj { virtual bool is_modules_image() const { return false; } virtual bool is_jar_file() const { return false; } + virtual bool is_multi_release_jar() const { return false; } + virtual void set_multi_release_jar() {} // Is this entry created from the "Class-path" attribute from a JAR Manifest? virtual bool from_class_path_attr() const { return false; } virtual const char* name() const = 0; @@ -91,11 +93,14 @@ class ClassPathZipEntry: public ClassPathEntry { jzfile* _zip; // The zip archive const char* _zip_name; // Name of zip archive bool _from_class_path_attr; // From the "Class-path" attribute of a jar file + bool _multi_release; // multi-release jar public: bool is_jar_file() const { return true; } + bool is_multi_release_jar() const { return _multi_release; } + void set_multi_release_jar() { _multi_release = true; } bool from_class_path_attr() const { return _from_class_path_attr; } const char* name() const { return _zip_name; } - ClassPathZipEntry(jzfile* zip, const char* zip_name, bool is_boot_append, bool from_class_path_attr); + ClassPathZipEntry(jzfile* zip, const char* zip_name, bool is_boot_append, bool from_class_path_attr, bool multi_release); virtual ~ClassPathZipEntry(); u1* open_entry(JavaThread* current, const char* name, jint* filesize, bool nul_terminate); ClassFileStream* open_stream(JavaThread* current, const char* name); @@ -260,7 +265,8 @@ class ClassLoader: AllStatic { static ClassPathEntry* create_class_path_entry(JavaThread* current, const char *path, const struct stat* st, bool is_boot_append, - bool from_class_path_attr); + bool from_class_path_attr, + bool is_multi_release = false); // Canonicalizes path names, so strcmp will work properly. This is mainly // to avoid confusing the zip library diff --git a/src/hotspot/share/classfile/classLoaderExt.cpp b/src/hotspot/share/classfile/classLoaderExt.cpp index b9e420899c2..f7b2906394d 100644 --- a/src/hotspot/share/classfile/classLoaderExt.cpp +++ b/src/hotspot/share/classfile/classLoaderExt.cpp @@ -244,6 +244,10 @@ void ClassLoaderExt::process_jar_manifest(JavaThread* current, ClassPathEntry* e vm_exit_during_cds_dumping(err_msg("-Xshare:dump does not support Extension-List in JAR manifest: %s", entry->name())); } + if (strstr(manifest, "Multi-Release: true") != nullptr) { + entry->set_multi_release_jar(); + } + char* cp_attr = get_class_path_attr(entry->name(), manifest, manifest_size); if (cp_attr != nullptr && strlen(cp_attr) > 0) { @@ -299,6 +303,7 @@ void ClassLoaderExt::process_jar_manifest(JavaThread* current, ClassPathEntry* e file_start = file_end; } } + return; } void ClassLoaderExt::setup_search_paths(JavaThread* current) { From e7fc0eb522f14ee28ac40cf89268767cb7b6dfcf Mon Sep 17 00:00:00 2001 From: Kevin Walls Date: Fri, 13 Dec 2024 20:39:18 +0000 Subject: [PATCH 26/93] 8345987: java.management has two Util.newObjectName methods (remove one) Reviewed-by: cjplummer, amenkov, lmesnik --- .../jmx/interceptor/DefaultMBeanServerInterceptor.java | 3 ++- .../classes/com/sun/jmx/mbeanserver/Repository.java | 7 +++---- .../share/classes/com/sun/jmx/mbeanserver/Util.java | 9 +-------- .../classes/javax/management/MBeanServerDelegate.java | 2 +- .../share/classes/javax/management/ObjectName.java | 4 ++-- 5 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/java.management/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java b/src/java.management/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java index 555dfdc918b..43606144cd0 100644 --- a/src/java.management/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java +++ b/src/java.management/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java @@ -35,7 +35,6 @@ import com.sun.jmx.mbeanserver.NamedObject; import com.sun.jmx.mbeanserver.Repository; import com.sun.jmx.mbeanserver.Repository.RegistrationContext; -import com.sun.jmx.mbeanserver.Util; import com.sun.jmx.remote.util.EnvHelp; import java.lang.ref.WeakReference; @@ -81,6 +80,8 @@ import javax.management.RuntimeOperationsException; import javax.management.loading.ClassLoaderRepository; +import sun.management.Util; + /** * This is the default class for MBean manipulation on the agent side. It * contains the methods necessary for the creation, registration, and diff --git a/src/java.management/share/classes/com/sun/jmx/mbeanserver/Repository.java b/src/java.management/share/classes/com/sun/jmx/mbeanserver/Repository.java index ffd4d758759..882fcaf809b 100644 --- a/src/java.management/share/classes/com/sun/jmx/mbeanserver/Repository.java +++ b/src/java.management/share/classes/com/sun/jmx/mbeanserver/Repository.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -281,7 +281,7 @@ public void addMBean(final DynamicMBean object, ObjectName name, // Set domain to default if domain is empty and not already set if (dom.length() == 0) - name = Util.newObjectName(domain + name.toString()); + name = sun.management.Util.newObjectName(domain + name.toString()); // Do we have default domain ? if (dom == domain) { // ES: OK (dom & domain are interned) @@ -438,10 +438,9 @@ public Set query(ObjectName pattern, QueryExp query) { if (allNames) result.addAll(moiTb.values()); else - addAllMatching(moiTb, result, Util.newObjectName(domain + name.getCanonicalName())); + addAllMatching(moiTb, result, sun.management.Util.newObjectName(domain + name.getCanonicalName())); return result; } - if (!name.isDomainPattern()) { final Map moiTb = domainTb.get(dom2Match); if (moiTb == null) return Collections.emptySet(); diff --git a/src/java.management/share/classes/com/sun/jmx/mbeanserver/Util.java b/src/java.management/share/classes/com/sun/jmx/mbeanserver/Util.java index 81f306e1dbb..8ef1c99052e 100644 --- a/src/java.management/share/classes/com/sun/jmx/mbeanserver/Util.java +++ b/src/java.management/share/classes/com/sun/jmx/mbeanserver/Util.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -43,13 +43,6 @@ import javax.management.ObjectName; public class Util { - public static ObjectName newObjectName(String string) { - try { - return new ObjectName(string); - } catch (MalformedObjectNameException e) { - throw new IllegalArgumentException(e); - } - } static Map newMap() { return new HashMap<>(); diff --git a/src/java.management/share/classes/javax/management/MBeanServerDelegate.java b/src/java.management/share/classes/javax/management/MBeanServerDelegate.java index f2346a04d5e..df75fdce9ef 100644 --- a/src/java.management/share/classes/javax/management/MBeanServerDelegate.java +++ b/src/java.management/share/classes/javax/management/MBeanServerDelegate.java @@ -28,7 +28,7 @@ import java.lang.System.Logger.Level; import com.sun.jmx.defaults.JmxProperties; import com.sun.jmx.defaults.ServiceName; -import com.sun.jmx.mbeanserver.Util; +import sun.management.Util; /** * Represents the MBean server from the management point of view. diff --git a/src/java.management/share/classes/javax/management/ObjectName.java b/src/java.management/share/classes/javax/management/ObjectName.java index 4bcda7f0252..f51037cbaf1 100644 --- a/src/java.management/share/classes/javax/management/ObjectName.java +++ b/src/java.management/share/classes/javax/management/ObjectName.java @@ -1222,7 +1222,7 @@ public static ObjectName getInstance(String domain, public static ObjectName getInstance(ObjectName name) { if (name.getClass().equals(ObjectName.class)) return name; - return Util.newObjectName(name.getSerializedNameString()); + return sun.management.Util.newObjectName(name.getSerializedNameString()); } /** @@ -1813,7 +1813,7 @@ public static String unquote(String q) { * * @since 1.6 */ - public static final ObjectName WILDCARD = Util.newObjectName("*:*"); + public static final ObjectName WILDCARD = sun.management.Util.newObjectName("*:*"); // Category : Utilities <=================================== From 4b21fb9df99918fe1adf84e80148a2076a52a276 Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Fri, 13 Dec 2024 22:40:42 +0000 Subject: [PATCH 27/93] 8343467: Remove unnecessary @SuppressWarnings annotations (security) Reviewed-by: mullan --- .../com/sun/crypto/provider/PBES2Parameters.java | 3 --- .../crypto/provider/SealedObjectForKeyProtector.java | 1 - src/java.base/share/classes/java/security/Key.java | 1 - .../share/classes/java/security/PrivateKey.java | 3 +-- .../share/classes/java/security/Provider.java | 10 +++++----- .../share/classes/java/security/PublicKey.java | 3 +-- .../java/security/interfaces/DSAPrivateKey.java | 1 - .../classes/java/security/interfaces/DSAPublicKey.java | 1 - .../classes/java/security/interfaces/ECPrivateKey.java | 1 - .../classes/java/security/interfaces/ECPublicKey.java | 1 - .../interfaces/RSAMultiPrimePrivateCrtKey.java | 1 - .../java/security/interfaces/RSAPrivateCrtKey.java | 1 - .../java/security/interfaces/RSAPrivateKey.java | 1 - .../classes/java/security/interfaces/RSAPublicKey.java | 1 - .../share/classes/javax/crypto/SecretKey.java | 3 +-- .../classes/javax/crypto/interfaces/DHPrivateKey.java | 1 - .../classes/javax/crypto/interfaces/DHPublicKey.java | 1 - .../share/classes/javax/crypto/interfaces/PBEKey.java | 3 +-- .../security/internal/interfaces/TlsMasterSecret.java | 3 +-- .../share/classes/sun/security/jca/ProviderConfig.java | 1 - .../classes/sun/security/jgss/krb5/SubjectComber.java | 3 +-- .../sun/security/pkcs11/P11TlsPrfGenerator.java | 3 +-- src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java | 2 +- 23 files changed, 13 insertions(+), 36 deletions(-) diff --git a/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java b/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java index d6b7d00d360..64b276a1c79 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java @@ -206,7 +206,6 @@ protected void engineInit(AlgorithmParameterSpec paramSpec) this.cipherParam = ((PBEParameterSpec)paramSpec).getParameterSpec(); } - @SuppressWarnings("deprecation") protected void engineInit(byte[] encoded) throws IOException { @@ -239,7 +238,6 @@ protected void engineInit(byte[] encoded) this.pbes2AlgorithmName = "PBEWith" + kdfAlgo + "And" + cipherAlgo; } - @SuppressWarnings("deprecation") private String parseKDF(DerValue keyDerivationFunc) throws IOException { if (!pkcs5PBKDF2_OID.equals(keyDerivationFunc.data.getOID())) { @@ -299,7 +297,6 @@ private String parseKDF(DerValue keyDerivationFunc) throws IOException { return kdfAlgo; } - @SuppressWarnings("deprecation") private String parseES(DerValue encryptionScheme) throws IOException { String cipherAlgo; diff --git a/src/java.base/share/classes/com/sun/crypto/provider/SealedObjectForKeyProtector.java b/src/java.base/share/classes/com/sun/crypto/provider/SealedObjectForKeyProtector.java index b5f5bc89f23..feaeee48836 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/SealedObjectForKeyProtector.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/SealedObjectForKeyProtector.java @@ -81,7 +81,6 @@ final Key getKey(Cipher c, int maxLength) .getExtObjectInputStream(this, c)) { ois.setObjectInputFilter(new DeserializationChecker(maxLength)); try { - @SuppressWarnings("unchecked") Key t = (Key) ois.readObject(); return t; } catch (InvalidClassException ice) { diff --git a/src/java.base/share/classes/java/security/Key.java b/src/java.base/share/classes/java/security/Key.java index 28c0098c064..190a3db2999 100644 --- a/src/java.base/share/classes/java/security/Key.java +++ b/src/java.base/share/classes/java/security/Key.java @@ -115,7 +115,6 @@ public interface Key extends java.io.Serializable { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = 6603384152749567654L; diff --git a/src/java.base/share/classes/java/security/PrivateKey.java b/src/java.base/share/classes/java/security/PrivateKey.java index 045670ca008..70b6f854592 100644 --- a/src/java.base/share/classes/java/security/PrivateKey.java +++ b/src/java.base/share/classes/java/security/PrivateKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -68,7 +68,6 @@ public interface PrivateKey extends AsymmetricKey, javax.security.auth.Destroyab * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = 6034044314589513430L; } diff --git a/src/java.base/share/classes/java/security/Provider.java b/src/java.base/share/classes/java/security/Provider.java index da3f53b9632..203ffa82345 100644 --- a/src/java.base/share/classes/java/security/Provider.java +++ b/src/java.base/share/classes/java/security/Provider.java @@ -827,7 +827,7 @@ private Object implReplace(Object key, Object value) { return o; } - @SuppressWarnings("unchecked") // Function must actually operate over strings + // Function must actually operate over strings private void implReplaceAll(BiFunction function) { @@ -847,7 +847,7 @@ private void implReplaceAll(BiFunction remappingFunction) { @@ -864,7 +864,7 @@ private Object implMerge(Object key, Object value, return o; } - @SuppressWarnings("unchecked") // Function must actually operate over strings + // Function must actually operate over strings private Object implCompute(Object key, BiFunction remappingFunction) { @@ -881,7 +881,7 @@ private Object implCompute(Object key, BiFunction mappingFunction) { if (!checkLegacy(key)) return null; @@ -893,7 +893,7 @@ private Object implComputeIfAbsent(Object key, Function remappingFunction) { if (!checkLegacy(key)) return null; diff --git a/src/java.base/share/classes/java/security/PublicKey.java b/src/java.base/share/classes/java/security/PublicKey.java index e93efaf1c5b..9b79cd6908c 100644 --- a/src/java.base/share/classes/java/security/PublicKey.java +++ b/src/java.base/share/classes/java/security/PublicKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -54,7 +54,6 @@ public interface PublicKey extends AsymmetricKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = 7187392471159151072L; } diff --git a/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java b/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java index efef7daca29..d3f042f2137 100644 --- a/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java +++ b/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java @@ -52,7 +52,6 @@ public interface DSAPrivateKey extends DSAKey, java.security.PrivateKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = 7776497482533790279L; diff --git a/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java b/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java index a58333b38ba..d7fa55a8c8f 100644 --- a/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java +++ b/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java @@ -52,7 +52,6 @@ public interface DSAPublicKey extends DSAKey, java.security.PublicKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = 1234526332779022332L; diff --git a/src/java.base/share/classes/java/security/interfaces/ECPrivateKey.java b/src/java.base/share/classes/java/security/interfaces/ECPrivateKey.java index 53c1f358d52..cdb31a90ba0 100644 --- a/src/java.base/share/classes/java/security/interfaces/ECPrivateKey.java +++ b/src/java.base/share/classes/java/security/interfaces/ECPrivateKey.java @@ -48,7 +48,6 @@ public interface ECPrivateKey extends PrivateKey, ECKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = -7896394956925609184L; diff --git a/src/java.base/share/classes/java/security/interfaces/ECPublicKey.java b/src/java.base/share/classes/java/security/interfaces/ECPublicKey.java index d78f863cc76..5cfdab999b1 100644 --- a/src/java.base/share/classes/java/security/interfaces/ECPublicKey.java +++ b/src/java.base/share/classes/java/security/interfaces/ECPublicKey.java @@ -50,7 +50,6 @@ public interface ECPublicKey extends PublicKey, ECKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = -3314988629879632826L; diff --git a/src/java.base/share/classes/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java b/src/java.base/share/classes/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java index a523d36ac70..a15d6db4133 100644 --- a/src/java.base/share/classes/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java +++ b/src/java.base/share/classes/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java @@ -57,7 +57,6 @@ public interface RSAMultiPrimePrivateCrtKey extends RSAPrivateKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = 618058533534628008L; diff --git a/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java b/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java index 7a8bea29e7e..025145fa625 100644 --- a/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java +++ b/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java @@ -52,7 +52,6 @@ public interface RSAPrivateCrtKey extends RSAPrivateKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = -5682214253527700368L; diff --git a/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java b/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java index 8f74b476f99..dad9b375e00 100644 --- a/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java +++ b/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java @@ -50,7 +50,6 @@ public interface RSAPrivateKey extends java.security.PrivateKey, RSAKey * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = 5187144804936595022L; diff --git a/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java b/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java index a02b454abb2..03fe109db5d 100644 --- a/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java +++ b/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java @@ -47,7 +47,6 @@ public interface RSAPublicKey extends java.security.PublicKey, RSAKey * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = -8727434096241101194L; diff --git a/src/java.base/share/classes/javax/crypto/SecretKey.java b/src/java.base/share/classes/javax/crypto/SecretKey.java index 6dd6a9be19a..5fa6f7fd44d 100644 --- a/src/java.base/share/classes/javax/crypto/SecretKey.java +++ b/src/java.base/share/classes/javax/crypto/SecretKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -68,6 +68,5 @@ public interface SecretKey extends * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") long serialVersionUID = -4795878709595146952L; } diff --git a/src/java.base/share/classes/javax/crypto/interfaces/DHPrivateKey.java b/src/java.base/share/classes/javax/crypto/interfaces/DHPrivateKey.java index 49a93c02b42..8a252c7f82b 100644 --- a/src/java.base/share/classes/javax/crypto/interfaces/DHPrivateKey.java +++ b/src/java.base/share/classes/javax/crypto/interfaces/DHPrivateKey.java @@ -47,7 +47,6 @@ public interface DHPrivateKey extends DHKey, java.security.PrivateKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = 2211791113380396553L; diff --git a/src/java.base/share/classes/javax/crypto/interfaces/DHPublicKey.java b/src/java.base/share/classes/javax/crypto/interfaces/DHPublicKey.java index 631d8a20e66..f1a748cff24 100644 --- a/src/java.base/share/classes/javax/crypto/interfaces/DHPublicKey.java +++ b/src/java.base/share/classes/javax/crypto/interfaces/DHPublicKey.java @@ -47,7 +47,6 @@ public interface DHPublicKey extends DHKey, java.security.PublicKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = -6628103563352519193L; diff --git a/src/java.base/share/classes/javax/crypto/interfaces/PBEKey.java b/src/java.base/share/classes/javax/crypto/interfaces/PBEKey.java index 20f1e64798f..162d4d85b45 100644 --- a/src/java.base/share/classes/javax/crypto/interfaces/PBEKey.java +++ b/src/java.base/share/classes/javax/crypto/interfaces/PBEKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -44,7 +44,6 @@ public interface PBEKey extends javax.crypto.SecretKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = -1430015993304333921L; diff --git a/src/java.base/share/classes/sun/security/internal/interfaces/TlsMasterSecret.java b/src/java.base/share/classes/sun/security/internal/interfaces/TlsMasterSecret.java index 2f91a445ace..36306c26862 100644 --- a/src/java.base/share/classes/sun/security/internal/interfaces/TlsMasterSecret.java +++ b/src/java.base/share/classes/sun/security/internal/interfaces/TlsMasterSecret.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -49,7 +49,6 @@ public interface TlsMasterSecret extends SecretKey { * ineffectual. Do not use; no replacement. */ @Deprecated - @SuppressWarnings("serial") @java.io.Serial long serialVersionUID = -461748105810469773L; diff --git a/src/java.base/share/classes/sun/security/jca/ProviderConfig.java b/src/java.base/share/classes/sun/security/jca/ProviderConfig.java index ce954b3b6a5..830b18e8fef 100644 --- a/src/java.base/share/classes/sun/security/jca/ProviderConfig.java +++ b/src/java.base/share/classes/sun/security/jca/ProviderConfig.java @@ -149,7 +149,6 @@ public String toString() { /** * Get the provider object. Loads the provider if it is not already loaded. */ - @SuppressWarnings("deprecation") Provider getProvider() { // volatile variable load Provider p = provider; diff --git a/src/java.security.jgss/share/classes/sun/security/jgss/krb5/SubjectComber.java b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/SubjectComber.java index f6597bbfeec..26bfe936d0f 100644 --- a/src/java.security.jgss/share/classes/sun/security/jgss/krb5/SubjectComber.java +++ b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/SubjectComber.java @@ -151,8 +151,7 @@ private static Object findAux(Subject subject, String serverPrincipal, Iterator iterator = pcs.iterator(); while (iterator.hasNext()) { Object obj = iterator.next(); - if (!(obj instanceof @SuppressWarnings("unchecked") - KerberosTicket ticket)) { + if (!(obj instanceof KerberosTicket ticket)) { continue; } if (DEBUG != null) { diff --git a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11TlsPrfGenerator.java b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11TlsPrfGenerator.java index ed08978c0ea..32f99b3fd5a 100644 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11TlsPrfGenerator.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11TlsPrfGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -107,7 +107,6 @@ protected void engineInit(AlgorithmParameterSpec params, // compatibility, it is nonsensical for an anonymous class to define a // serialVersionUID. Suppress warnings relative to missing serialVersionUID // field in the anonymous subclass of serializable SecretKey. - @SuppressWarnings("serial") private static final SecretKey NULL_KEY = new SecretKey() { public byte[] getEncoded() { return new byte[0]; diff --git a/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java b/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java index a12049cbcf0..0be28f52625 100644 --- a/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java +++ b/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java @@ -304,7 +304,7 @@ static native void setInitMsgOption0(int fd, int arg1, int arg2) loadSctpLibrary(); } - @SuppressWarnings({"removal", "restricted"}) + @SuppressWarnings("restricted") private static void loadSctpLibrary() { IOUtil.load(); // loads nio & net native libraries System.loadLibrary("sctp"); From c2f0ef5f4822e7e558fe2b4077d57634d380aa11 Mon Sep 17 00:00:00 2001 From: Ioi Lam Date: Sat, 14 Dec 2024 00:16:08 +0000 Subject: [PATCH 28/93] 8346159: Disable CDS AOTClassLinking tests for JVMCI due to JDK-8345635 Reviewed-by: dnsimon, dholmes --- .../runtime/cds/appcds/LambdaWithUseImplMethodHandle.java | 3 +++ .../runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java | 4 ++++ .../runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java | 3 +++ .../cds/appcds/resolvedConstants/AOTLinkedLambdas.java | 2 ++ .../cds/appcds/resolvedConstants/AOTLinkedVarHandles.java | 2 ++ 5 files changed, 14 insertions(+) diff --git a/test/hotspot/jtreg/runtime/cds/appcds/LambdaWithUseImplMethodHandle.java b/test/hotspot/jtreg/runtime/cds/appcds/LambdaWithUseImplMethodHandle.java index 360fce5879a..0c747168945 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/LambdaWithUseImplMethodHandle.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/LambdaWithUseImplMethodHandle.java @@ -27,6 +27,9 @@ * @bug 8290417 * @summary CDS cannot archive lambda proxy with useImplMethodHandle * @requires vm.cds + * @requires vm.cds.supports.aot.class.linking + * @comment work around JDK-8345635 + * @requires !vm.jvmci.enabled * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @build pkg1.BaseWithProtectedMethod * @build pkg2.Child diff --git a/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java b/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java index 6e7473c59c1..25361403481 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java @@ -29,6 +29,8 @@ /* * @test id=static * @requires vm.cds.supports.aot.class.linking + * @comment work around JDK-8345635 + * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib * @build InitiatingLoaderTester * @build BulkLoaderTest @@ -39,6 +41,8 @@ /* * @test id=dynamic * @requires vm.cds.supports.aot.class.linking + * @comment work around JDK-8345635 + * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib * @build InitiatingLoaderTester * @build jdk.test.whitebox.WhiteBox BulkLoaderTest diff --git a/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java b/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java index 1603d8430b2..ca5a08d20af 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java @@ -27,6 +27,9 @@ * @bug 8214781 8293187 * @summary Test for the -XX:ArchiveHeapTestClass flag * @requires vm.debug == true & vm.cds.write.archived.java.heap + * @requires vm.cds.supports.aot.class.linking + * @comment work around JDK-8345635 + * @requires !vm.jvmci.enabled * @modules java.logging * @library /test/jdk/lib/testlibrary /test/lib * /test/hotspot/jtreg/runtime/cds/appcds diff --git a/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedLambdas.java b/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedLambdas.java index 5fb0a30cd61..d015498ed04 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedLambdas.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedLambdas.java @@ -28,6 +28,8 @@ * @bug 8340836 * @requires vm.cds * @requires vm.cds.supports.aot.class.linking + * @comment work around JDK-8345635 + * @requires !vm.jvmci.enabled * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes/ * @build AOTLinkedLambdas * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar diff --git a/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedVarHandles.java b/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedVarHandles.java index 2098ebc2c71..886e0424c9a 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedVarHandles.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedVarHandles.java @@ -28,6 +28,8 @@ * @bug 8343245 * @requires vm.cds * @requires vm.cds.supports.aot.class.linking + * @comment work around JDK-8345635 + * @requires !vm.jvmci.enabled * @library /test/lib * @build AOTLinkedVarHandles * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar From ebb27c2e8f47d35d4f030cca4126c39e24d456bd Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Sat, 14 Dec 2024 01:48:05 +0000 Subject: [PATCH 29/93] 8346139: test_memset_with_concurrent_readers.cpp should not use Reviewed-by: stefank, tschatzl --- .../test_memset_with_concurrent_readers.cpp | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/test/hotspot/gtest/gc/shared/test_memset_with_concurrent_readers.cpp b/test/hotspot/gtest/gc/shared/test_memset_with_concurrent_readers.cpp index 875186b83d0..8033643b53b 100644 --- a/test/hotspot/gtest/gc/shared/test_memset_with_concurrent_readers.cpp +++ b/test/hotspot/gtest/gc/shared/test_memset_with_concurrent_readers.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -24,13 +24,7 @@ #include "precompiled.hpp" #include "gc/shared/memset_with_concurrent_readers.hpp" #include "utilities/globalDefinitions.hpp" - -#include "utilities/vmassert_uninstall.hpp" -#include -#include -#include -#include "utilities/vmassert_reinstall.hpp" - +#include "utilities/ostream.hpp" #include "unittest.hpp" static unsigned line_byte(const char* line, size_t i) { @@ -71,29 +65,31 @@ TEST(gc, memset_with_concurrent_readers) { bool middle_set = !memcmp(set_block, block + set_start, set_size); bool tail_clear = !memcmp(clear_block, block + set_end, block_size - set_end); if (!(head_clear && middle_set && tail_clear)) { - std::ostringstream err_stream; - err_stream << "*** memset_with_concurrent_readers failed: set start " - << set_start << ", set end " << set_end << std::endl; + stringStream err_stream{}; + err_stream.print_cr("*** memset_with_concurrent_readers failed: " + "set start %zu, set end %zu", + set_start, set_end); for (unsigned chunk = 0; chunk < (block_size / chunk_size); ++chunk) { for (unsigned line = 0; line < (chunk_size / BytesPerWord); ++line) { const char* lp = &block[chunk * chunk_size + line * BytesPerWord]; - err_stream << std::dec << chunk << "," << line << ": " << std::hex - << std::setw(2) << line_byte(lp, 0) << " " - << std::setw(2) << line_byte(lp, 1) << " " - << std::setw(2) << line_byte(lp, 2) << " " - << std::setw(2) << line_byte(lp, 3) << " " - << std::setw(2) << line_byte(lp, 4) << " " - << std::setw(2) << line_byte(lp, 5) << " " - << std::setw(2) << line_byte(lp, 6) << " " - << std::setw(2) << line_byte(lp, 7) << std::endl; + err_stream.print_cr("%u, %u: " + "%02x %02x " + "%02x %02x " + "%02x %02x " + "%02x %02x", + chunk, line, + line_byte(lp, 0), line_byte(lp, 1), + line_byte(lp, 2), line_byte(lp, 3), + line_byte(lp, 4), line_byte(lp, 5), + line_byte(lp, 6), line_byte(lp, 7)); } } EXPECT_TRUE(head_clear) << "leading byte not clear"; EXPECT_TRUE(middle_set) << "memset byte not set"; EXPECT_TRUE(tail_clear) << "trailing bye not clear"; - ASSERT_TRUE(head_clear && middle_set && tail_clear) << err_stream.str(); + ASSERT_TRUE(head_clear && middle_set && tail_clear) << err_stream.freeze(); } } } From 3b9de117e83a7875df7fd2ddcc9d896f027e2c92 Mon Sep 17 00:00:00 2001 From: Simon Tooke Date: Sat, 14 Dec 2024 06:13:26 +0000 Subject: [PATCH 30/93] 8319875: Add macOS implementation for jcmd System.map Reviewed-by: stuefe, szaldana --- src/hotspot/os/bsd/memMapPrinter_macosx.cpp | 383 ++++++++++++++++++ .../os/windows/memMapPrinter_windows.cpp | 3 +- src/hotspot/share/nmt/memMapPrinter.cpp | 2 +- src/hotspot/share/nmt/memMapPrinter.hpp | 2 +- .../share/services/diagnosticCommand.cpp | 6 +- .../share/services/diagnosticCommand.hpp | 8 +- .../dcmd/vm/SystemDumpMapTest.java | 2 +- .../serviceability/dcmd/vm/SystemMapTest.java | 2 +- .../dcmd/vm/SystemMapTestBase.java | 213 +++++++--- 9 files changed, 543 insertions(+), 78 deletions(-) create mode 100644 src/hotspot/os/bsd/memMapPrinter_macosx.cpp diff --git a/src/hotspot/os/bsd/memMapPrinter_macosx.cpp b/src/hotspot/os/bsd/memMapPrinter_macosx.cpp new file mode 100644 index 00000000000..33c30ab6f70 --- /dev/null +++ b/src/hotspot/os/bsd/memMapPrinter_macosx.cpp @@ -0,0 +1,383 @@ +/* + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Red Hat, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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(__APPLE__) + +#include "precompiled.hpp" + +#include "nmt/memMapPrinter.hpp" +#include "runtime/os.hpp" +#include "utilities/align.hpp" +#include "utilities/globalDefinitions.hpp" +#include "utilities/powerOfTwo.hpp" + +#include +#include +#include +#include +#include + +#include +#include +#include + +// maximum number of mapping records returned +static const int MAX_REGIONS_RETURNED = 1000000; + +// ::mmap() on MacOS is a layer on top of Mach system calls, and will allocate in 128MB chunks. +// This code will coalesce a series of identical 128GB chunks (maybe followed by one smaller chunk +// with identical flags) into one. +// Unfortunately, two or more identically allocated contiguous sections will appear as one, if the +// first section is size 128MB. vmmap(1) has the same issue. +static const int MACOS_PARTIAL_ALLOCATION_SIZE = 128 * M; + +class MappingInfo { + proc_regioninfo _rinfo; +public: + const char* _address; + size_t _size; + stringStream _share_buffer; + stringStream _type_buffer; + stringStream _protect_buffer; + stringStream _file_name; + const char* _tag_text; + + MappingInfo() : _address(nullptr), _size(0), _tag_text(nullptr) {} + + void reset() { + _share_buffer.reset(); + _protect_buffer.reset(); + _type_buffer.reset(); + _file_name.reset(); + _tag_text = nullptr; + } + + bool canCombine(const proc_regionwithpathinfo& mem_info) { + const proc_regioninfo& n = mem_info.prp_prinfo; + bool cc = _rinfo.pri_size == MACOS_PARTIAL_ALLOCATION_SIZE + && n.pri_address == (_rinfo.pri_address + _size) + && n.pri_protection == _rinfo.pri_protection + && n.pri_max_protection == _rinfo.pri_max_protection + && n.pri_user_tag == _rinfo.pri_user_tag + && n.pri_share_mode == _rinfo.pri_share_mode + && n.pri_offset == 0; + return cc; + } + + void combineWithFollowing(const proc_regionwithpathinfo& mem_info) { + _size += mem_info.prp_prinfo.pri_size; + } + + void process(const proc_regionwithpathinfo& mem_info) { + reset(); + + _rinfo = mem_info.prp_prinfo; + + _address = (const char*) _rinfo.pri_address; + _size = _rinfo.pri_size; + + if (mem_info.prp_vip.vip_path[0] != '\0') { + _file_name.print_raw(mem_info.prp_vip.vip_path); + } + // proc_regionfilename() seems to give bad results, so we don't try to use it here. + + char prot[4]; + char maxprot[4]; + rwbits(_rinfo.pri_protection, prot); + rwbits(_rinfo.pri_max_protection, maxprot); + _protect_buffer.print("%s/%s", prot, maxprot); + + get_share_mode(_share_buffer, _rinfo); + _tag_text = tagToStr(_rinfo.pri_user_tag); + } + + static void get_share_mode(outputStream& out, const proc_regioninfo& rinfo) { + static const char* share_strings[] = { + "cow", "pvt", "---", "shr", "tsh", "p/a", "s/a", "lpg" + }; + assert(SM_COW == 1 && SM_LARGE_PAGE == (sizeof(share_strings)/sizeof(share_strings[0])), "share_mode contants are out of range"); // the +1 offset is intentional; see below + const bool valid_share_mode = rinfo.pri_share_mode >= SM_COW && rinfo.pri_share_mode <= SM_LARGE_PAGE; + if (valid_share_mode) { + int share_mode = rinfo.pri_share_mode; + out.print_raw(share_strings[share_mode - 1]); + } else { + out.print_cr("invalid pri_share_mode (%d)", rinfo.pri_share_mode); + assert(valid_share_mode, "invalid pri_share_mode (%d)", rinfo.pri_share_mode); + } + } + +#define X1(TAG, DESCR) X2(TAG, DESCR) +#define X2(TAG, DESCRIPTION) case VM_MEMORY_ ## TAG: return # DESCRIPTION; + static const char* tagToStr(uint32_t user_tag) { + switch (user_tag) { + case 0: + return 0; + X1(MALLOC, malloc); + X1(MALLOC_SMALL, malloc_small); + X1(MALLOC_LARGE, malloc_large); + X1(MALLOC_HUGE, malloc_huge); + X1(SBRK, sbrk); + X1(REALLOC, realloc); + X1(MALLOC_TINY, malloc_tiny); + X1(MALLOC_LARGE_REUSABLE, malloc_large_reusable); + X1(MALLOC_LARGE_REUSED, malloc_lage_reused); + X1(ANALYSIS_TOOL, analysis_tool); + X1(MALLOC_NANO, malloc_nano); + X1(MALLOC_MEDIUM, malloc_medium); + X1(MALLOC_PROB_GUARD, malloc_prob_guard); + X1(MACH_MSG, malloc_msg); + X1(IOKIT, IOKit); + X1(STACK, stack); + X1(GUARD, guard); + X1(SHARED_PMAP, shared_pmap); + X1(DYLIB, dylib); + X1(UNSHARED_PMAP, unshared_pmap); + X2(APPKIT, AppKit); + X2(FOUNDATION, Foundation); + X2(COREGRAPHICS, CoreGraphics); + X2(CORESERVICES, CoreServices); // is also VM_MEMORY_CARBON + X2(JAVA, Java); + X2(COREDATA, CoreData); + X1(COREDATA_OBJECTIDS, CodeData_objectids); + X1(ATS, ats); + X1(DYLD, dyld); + X1(DYLD_MALLOC, dyld_malloc); + X1(SQLITE, sqlite); + X1(JAVASCRIPT_CORE, javascript_core); + X1(JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR, javascript_jit_executable_allocator); + X1(JAVASCRIPT_JIT_REGISTER_FILE, javascript_jit_register_file); + X1(OPENCL, OpenCL); + X2(COREIMAGE, CoreImage); + X2(IMAGEIO, ImageIO); + X2(COREPROFILE, CoreProfile); + X1(APPLICATION_SPECIFIC_1, application_specific_1); + X1(APPLICATION_SPECIFIC_16, application_specific_16); + X1(OS_ALLOC_ONCE, os_alloc_once); + X1(GENEALOGY, genealogy); + default: + static char buffer[30]; + snprintf(buffer, sizeof(buffer), "user_tag=0x%x(%d)", user_tag, user_tag); + return buffer; + } + } + + static void rwbits(int rw, char bits[4]) { + bits[0] = rw & VM_PROT_READ ? 'r' : '-'; + bits[1] = rw & VM_PROT_WRITE ? 'w' : '-'; + bits[2] = rw & VM_PROT_EXECUTE ? 'x' : '-'; + bits[3] = 0; + } +}; + +class ProcSmapsSummary { + unsigned _num_mappings; + size_t _private; + size_t _committed; // combined committed size + size_t _reserved; // reserved but not committed + size_t _shared; // combined shared size + size_t _swapped_out; // combined amount of swapped-out memory +public: + ProcSmapsSummary() : _num_mappings(0), _private(0), + _committed(0), _shared(0), _swapped_out(0) {} + + void add_mapping(const proc_regioninfo& region_info) { + _num_mappings++; + + bool is_private = region_info.pri_share_mode == SM_PRIVATE + || region_info.pri_share_mode == SM_PRIVATE_ALIASED; + bool is_shared = region_info.pri_share_mode == SM_SHARED + || region_info.pri_share_mode == SM_SHARED_ALIASED + || region_info.pri_share_mode == SM_TRUESHARED + || region_info.pri_share_mode == SM_COW; + bool is_committed = region_info.pri_share_mode == SM_EMPTY + && region_info.pri_max_protection == VM_PROT_ALL + && ((region_info.pri_protection & VM_PROT_DEFAULT) == VM_PROT_DEFAULT); + bool is_reserved = region_info.pri_share_mode == SM_EMPTY + && region_info.pri_max_protection == VM_PROT_ALL + && region_info.pri_protection == VM_PROT_NONE; + + _private += is_private ? region_info.pri_size : 0; + _shared += is_shared ? region_info.pri_size : 0; + _swapped_out += region_info.pri_pages_swapped_out; + _committed += is_committed ? region_info.pri_size : 0; + _reserved += is_reserved ? region_info.pri_size : 0; + } + + void print_on(const MappingPrintSession& session) const { + outputStream* st = session.out(); + + st->print_cr("Number of mappings: %u", _num_mappings); + + task_vm_info vm_info; + mach_msg_type_number_t num_out = TASK_VM_INFO_COUNT; + kern_return_t err = task_info(mach_task_self(), TASK_VM_INFO, (task_info_t)(&vm_info), &num_out); + if (err == KERN_SUCCESS) { + st->print_cr(" vsize: %llu (%llu%s)", vm_info.virtual_size, PROPERFMTARGS(vm_info.virtual_size)); + st->print_cr(" rss: %llu (%llu%s)", vm_info.resident_size, PROPERFMTARGS(vm_info.resident_size)); + st->print_cr(" peak rss: %llu (%llu%s)", vm_info.resident_size_peak, PROPERFMTARGS(vm_info.resident_size_peak)); + st->print_cr(" page size: %d (%ld%s)", vm_info.page_size, PROPERFMTARGS((size_t)vm_info.page_size)); + } else { + st->print_cr("error getting vm_info %d", err); + } + st->print_cr(" reserved: %zu (" PROPERFMT ")", _reserved, PROPERFMTARGS(_reserved)); + st->print_cr(" committed: %zu (" PROPERFMT ")", _committed, PROPERFMTARGS(_committed)); + st->print_cr(" private: %zu (" PROPERFMT ")", _private, PROPERFMTARGS(_private)); + st->print_cr(" shared: %zu (" PROPERFMT ")", _shared, PROPERFMTARGS(_shared)); + st->print_cr(" swapped out: %zu (" PROPERFMT ")", _swapped_out * vm_info.page_size, PROPERFMTARGS(_swapped_out * vm_info.page_size)); + } +}; + +class ProcSmapsPrinter { + const MappingPrintSession& _session; +public: + ProcSmapsPrinter(const MappingPrintSession& session) : + _session(session) + {} + + void print_single_mapping(const proc_regioninfo& region_info, const MappingInfo& mapping_info) const { + outputStream* st = _session.out(); +#define INDENT_BY(n) \ + if (st->fill_to(n) == 0) { \ + st->print(" "); \ + } + st->print("%#014.12llx-%#014.12llx", (uint64_t)(mapping_info._address), (uint64_t)(mapping_info._address + mapping_info._size)); + INDENT_BY(38); + st->print("%12ld", mapping_info._size); + INDENT_BY(51); + st->print("%s", mapping_info._protect_buffer.base()); + INDENT_BY(59); + st->print("%s", mapping_info._share_buffer.base()); + st->print("%s", mapping_info._type_buffer.base()); + INDENT_BY(64); + st->print("%#11llx", region_info.pri_offset); + INDENT_BY(77); + if (_session.print_nmt_info_for_region((const void*)mapping_info._address, (const void*)(mapping_info._address + mapping_info._size))) { + st->print(" "); + } else { + const char* tag = mapping_info._tag_text; + if (tag != nullptr) { + st->print("[%s] ", tag); + } + } + + st->print_raw(mapping_info._file_name.base()); + st->cr(); + +#undef INDENT_BY + } + + void print_legend() const { + outputStream* st = _session.out(); + st->print_cr("from, to, vsize: address range and size"); + st->print_cr("prot: protection:"); + st->print_cr(" rwx: read / write / execute"); + st->print_cr("share: share mode:"); + st->print_cr(" cow: copy on write"); + st->print_cr(" pvt: private"); + st->print_cr(" shr: shared"); + st->print_cr(" tsh: true shared"); + st->print_cr(" p/a: private aliased"); + st->print_cr(" s/a: shared aliased"); + st->print_cr(" lpg: large page"); + st->print_cr("offset: offset from start of allocation block"); + st->print_cr("vminfo: VM information (requires NMT)"); + st->print_cr("file: file mapped, if mapping is not anonymous"); + { + streamIndentor si(st, 16); + _session.print_nmt_flag_legend(); + } + st->print_cr("file: file mapped, if mapping is not anonymous"); + } + + void print_header() const { + outputStream* st = _session.out(); + // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 + // 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 + // 0x000102890000-0x000102898000 32768 r--/r-- cow 0xc000 /Users/simont/dev/openjdk/jdk/build/macos-aarch64-fastdebug-shenandoah/images/jdk/bin/java + st->print_cr("from to vsize prot share offset vminfo/file"); + st->print_cr("=================================================================================================="); + } +}; + +static bool is_interesting(const proc_regionwithpathinfo& info) { + return info.prp_prinfo.pri_share_mode != SM_EMPTY + || info.prp_prinfo.pri_user_tag != 0 + || info.prp_vip.vip_path[0] != '\0' + || info.prp_prinfo.pri_protection != 0 + || info.prp_prinfo.pri_max_protection != 0; +} + +void MemMapPrinter::pd_print_all_mappings(const MappingPrintSession& session) { + + ProcSmapsPrinter printer(session); + ProcSmapsSummary summary; + outputStream* const st = session.out(); + const pid_t pid = getpid(); + + printer.print_legend(); + st->cr(); + printer.print_header(); + + proc_regionwithpathinfo region_info_with_path; + MappingInfo mapping_info; + uint64_t address = 0; + int region_count = 0; + while (true) { + if (++region_count > MAX_REGIONS_RETURNED) { + st->print_cr("limit of %d regions reached (results inaccurate)", region_count); + break; + } + ::bzero(®ion_info_with_path, sizeof(region_info_with_path)); + int retval = proc_pidinfo(pid, PROC_PIDREGIONPATHINFO, (uint64_t)address, ®ion_info_with_path, sizeof(region_info_with_path)); + if (retval <= 0) { + break; + } else if (retval < (int)sizeof(region_info_with_path)) { + st->print_cr("proc_pidinfo() returned %d", retval); + assert(false, "proc_pidinfo() returned %d", retval); + } + proc_regioninfo& region_info = region_info_with_path.prp_prinfo; + if (is_interesting(region_info_with_path)) { + if (mapping_info.canCombine(region_info_with_path)) { + mapping_info.combineWithFollowing(region_info_with_path); + } else { + // print previous mapping info + // avoid printing the empty info at the start + if (mapping_info._size != 0) { + printer.print_single_mapping(region_info, mapping_info); + } + summary.add_mapping(region_info); + mapping_info.process(region_info_with_path); + } + } + assert(region_info.pri_size > 0, "size of region is 0"); + address = region_info.pri_address + region_info.pri_size; + } + printer.print_single_mapping(region_info_with_path.prp_prinfo, mapping_info); + summary.add_mapping(region_info_with_path.prp_prinfo); + st->cr(); + summary.print_on(session); + st->cr(); +} +#endif // __APPLE__ \ No newline at end of file diff --git a/src/hotspot/os/windows/memMapPrinter_windows.cpp b/src/hotspot/os/windows/memMapPrinter_windows.cpp index eb6b24a9d13..ff27aea02c5 100644 --- a/src/hotspot/os/windows/memMapPrinter_windows.cpp +++ b/src/hotspot/os/windows/memMapPrinter_windows.cpp @@ -197,8 +197,9 @@ class MappingInfoPrinter { st->print_cr("state: region state and type:"); st->print_cr(" state: committed / reserved"); st->print_cr(" type: image / mapped / private"); + st->print_cr("offset: offset from start of allocation block"); + st->print_cr("vminfo: VM information (requires NMT)"); st->print_cr("file: file mapped, if mapping is not anonymous"); - st->print_cr("vm info: VM information (requires NMT)"); { streamIndentor si(st, 16); _session.print_nmt_flag_legend(); diff --git a/src/hotspot/share/nmt/memMapPrinter.cpp b/src/hotspot/share/nmt/memMapPrinter.cpp index 34ddb7a8713..5c164e19b57 100644 --- a/src/hotspot/share/nmt/memMapPrinter.cpp +++ b/src/hotspot/share/nmt/memMapPrinter.cpp @@ -25,7 +25,7 @@ #include "precompiled.hpp" -#if defined(LINUX) || defined(_WIN64) +#if defined(LINUX) || defined(_WIN64) || defined(__APPLE__) #include "gc/shared/collectedHeap.hpp" #include "logging/logAsyncWriter.hpp" diff --git a/src/hotspot/share/nmt/memMapPrinter.hpp b/src/hotspot/share/nmt/memMapPrinter.hpp index 7f3ef9abca8..34897a0c75c 100644 --- a/src/hotspot/share/nmt/memMapPrinter.hpp +++ b/src/hotspot/share/nmt/memMapPrinter.hpp @@ -30,7 +30,7 @@ #include "nmt/memTag.hpp" #include "utilities/globalDefinitions.hpp" -#if defined(LINUX) || defined(_WIN64) +#if defined(LINUX) || defined(_WIN64) || defined(__APPLE__) class outputStream; class CachedNMTInformation; diff --git a/src/hotspot/share/services/diagnosticCommand.cpp b/src/hotspot/share/services/diagnosticCommand.cpp index e4dff47c84f..3b52f0edc72 100644 --- a/src/hotspot/share/services/diagnosticCommand.cpp +++ b/src/hotspot/share/services/diagnosticCommand.cpp @@ -140,10 +140,10 @@ void DCmd::register_dcmds(){ DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); #endif // LINUX -#if defined(LINUX) || defined(_WIN64) +#if defined(LINUX) || defined(_WIN64) || defined(__APPLE__) DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true,false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true,false)); -#endif // LINUX or WINDOWS +#endif // LINUX or WINDOWS or MacOS DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); @@ -1158,7 +1158,7 @@ void CompilationMemoryStatisticDCmd::execute(DCmdSource source, TRAPS) { CompilationMemoryStatistic::print_all_by_size(output(), human_readable, minsize); } -#if defined(LINUX) || defined(_WIN64) +#if defined(LINUX) || defined(_WIN64) || defined(__APPLE__) SystemMapDCmd::SystemMapDCmd(outputStream* output, bool heap) : DCmd(output, heap) {} diff --git a/src/hotspot/share/services/diagnosticCommand.hpp b/src/hotspot/share/services/diagnosticCommand.hpp index 83e818e16d2..212a8996d0a 100644 --- a/src/hotspot/share/services/diagnosticCommand.hpp +++ b/src/hotspot/share/services/diagnosticCommand.hpp @@ -822,14 +822,14 @@ class CompilationMemoryStatisticDCmd: public DCmdWithParser { virtual void execute(DCmdSource source, TRAPS); }; -#if defined(LINUX) || defined(_WIN64) +#if defined(LINUX) || defined(_WIN64) || defined(__APPLE__) class SystemMapDCmd : public DCmd { public: SystemMapDCmd(outputStream* output, bool heap); static const char* name() { return "System.map"; } static const char* description() { - return "Prints an annotated process memory map of the VM process (linux and Windows only)."; + return "Prints an annotated process memory map of the VM process (linux, Windows and MacOS only)."; } static const char* impact() { return "Medium; can be high for very large java heaps."; } virtual void execute(DCmdSource source, TRAPS); @@ -842,12 +842,12 @@ class SystemDumpMapDCmd : public DCmdWithParser { SystemDumpMapDCmd(outputStream* output, bool heap); static const char* name() { return "System.dump_map"; } static const char* description() { - return "Dumps an annotated process memory map to an output file (linux and Windows only)."; + return "Dumps an annotated process memory map to an output file (linux, Windows and MacOS only)."; } static const char* impact() { return "Medium; can be high for very large java heaps."; } virtual void execute(DCmdSource source, TRAPS); }; -#endif // LINUX or WINDOWS +#endif // LINUX, WINDOWS or MACOS #endif // SHARE_SERVICES_DIAGNOSTICCOMMAND_HPP diff --git a/test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java b/test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java index eab69de0a51..1bfec79e9df 100644 --- a/test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java +++ b/test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java @@ -35,7 +35,7 @@ * @test * @summary Test of diagnostic command System.map * @library /test/lib - * @requires (os.family == "linux" | os.family == "windows") + * @requires (os.family == "linux" | os.family == "windows" | os.family == "mac") * @modules java.base/jdk.internal.misc * java.compiler * java.management diff --git a/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java b/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java index 6d589d17f8a..72283ca0120 100644 --- a/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java +++ b/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java @@ -31,7 +31,7 @@ * @test * @summary Test of diagnostic command System.map * @library /test/lib - * @requires (os.family == "linux" | os.family == "windows") + * @requires (os.family == "linux" | os.family == "windows" | os.family == "mac") * @modules java.base/jdk.internal.misc * java.compiler * java.management diff --git a/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java b/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java index 6507117df35..dbd82f0f208 100644 --- a/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java +++ b/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java @@ -33,80 +33,161 @@ public class SystemMapTestBase { private static final String someSize = "\\d+"; private static final String someNumber = "(0x\\p{XDigit}+|\\d+)"; private static final String pagesize = "(4K|8K|16K|64K|2M|16M|64M)"; - private static final String prot = "[rwsxp-]+"; - - private static final String regexBase = range + space + - someSize + space + - prot + space + - someSize + space + - someSize + space + - pagesize + space; - - private static final String regexBase_committed = regexBase + "com.*"; - private static final String regexBase_shared_and_committed = regexBase + "shrd,com.*"; - - // java heap is either committed, non-shared, or - in case of ZGC - committed and shared. - private static final String regexBase_java_heap = regexBase + "(shrd,)?com.*"; - - private static final String shouldMatchUnconditionally_linux[] = { - // java launcher - regexBase_committed + "/bin/java", - // libjvm - regexBase_committed + "/lib/.*/libjvm.so", - // heap segment, should be part of all user space apps on all architectures OpenJDK supports. - regexBase_committed + "\\[heap\\]", - // we should see the hs-perf data file, and it should appear as shared as well as committed - regexBase_shared_and_committed + "hsperfdata_.*" - }; - private static final String shouldMatchIfNMTIsEnabled_linux[] = { - regexBase_java_heap + "JAVAHEAP.*", - // metaspace - regexBase_committed + "META.*", - // parts of metaspace should be uncommitted - regexBase + "-" + space + "META.*", - // code cache - regexBase_committed + "CODE.*", - // Main thread stack - regexBase_committed + "STACK.*main.*" + interface MapPatterns { + String[] shouldMatchUnconditionally(); + String[] shouldMatchIfNMTIsEnabled(); }; - // windows: - private static final String winprot = "[\\-rwxcin]*"; - private static final String wintype = "[rc]-(img|map|pvt)"; + private final MapPatterns patternProvider; - private static final String winbase = range + space + someSize + space + winprot + space; + private static final boolean isWindows = Platform.isWindows(); + private static final boolean isMacOS = Platform.isOSX(); - private static final String winimage = winbase + "c-img" + space + someNumber + space; - private static final String wincommitted = winbase + "(c-pvt|c-map)" + space + someNumber + space; - private static final String winreserved = winbase + "r-pvt" + space + someNumber + space; + protected String[] shouldMatchUnconditionally() { + return patternProvider.shouldMatchUnconditionally(); + } - private static final String shouldMatchUnconditionally_windows[] = { - // java launcher - winimage + ".*[\\/\\\\]bin[\\/\\\\]java[.]exe", - // libjvm - winimage + ".*[\\/\\\\]bin[\\/\\\\].*[\\/\\\\]jvm.dll" - }; + protected String[] shouldMatchIfNMTIsEnabled() { + return patternProvider.shouldMatchIfNMTIsEnabled(); + } - private static final String shouldMatchIfNMTIsEnabled_windows[] = { - wincommitted + "JAVAHEAP.*", - // metaspace - wincommitted + "META.*", - // parts of metaspace should be uncommitted - winreserved + "META.*", - // code cache - wincommitted + "CODE.*", - // Main thread stack - wincommitted + "STACK-\\d+-main.*" - }; + protected SystemMapTestBase() { + if (Platform.isWindows()) { + patternProvider = new WindowsPatterns(); + } else if (Platform.isOSX()) { + patternProvider = new MacOSPatterns(); + } else { + patternProvider = new LinuxPatterns(); + } + } - private static final boolean isWindows = Platform.isWindows(); + private static class LinuxPatterns implements MapPatterns { + + private static final String prot = "[rwsxp-]+"; + + static final String regexBase = range + space + + someSize + space + + prot + space + + someSize + space + + someSize + space + + pagesize + space; + + static final String regexBase_committed = regexBase + "com.*"; + static final String regexBase_shared_and_committed = regexBase + "shrd,com.*"; + + // java heap is either committed, non-shared, or - in case of ZGC - committed and shared. + static final String regexBase_java_heap = regexBase + "(shrd,)?com.*"; + + static final String shouldMatchUnconditionally_linux[] = { + // java launcher + regexBase_committed + "/bin/java", + // libjvm + regexBase_committed + "/lib/.*/libjvm.so", + // heap segment, should be part of all user space apps on all architectures OpenJDK supports. + regexBase_committed + "\\[heap\\]", + // we should see the hs-perf data file, and it should appear as shared as well as committed + regexBase_shared_and_committed + "hsperfdata_.*" + }; + + static final String shouldMatchIfNMTIsEnabled_linux[] = { + regexBase_java_heap + "JAVAHEAP.*", + // metaspace + regexBase_committed + "META.*", + // parts of metaspace should be uncommitted + regexBase + "-" + space + "META.*", + // code cache + regexBase_committed + "CODE.*", + // Main thread stack + regexBase_committed + "STACK.*main.*" + }; + + public String[] shouldMatchUnconditionally() { + return shouldMatchUnconditionally_linux; + } + + public String[] shouldMatchIfNMTIsEnabled() { + return shouldMatchIfNMTIsEnabled_linux; + } + }; - protected static String[] shouldMatchUnconditionally() { - return isWindows ? shouldMatchUnconditionally_windows : shouldMatchUnconditionally_linux; - } - protected static String[] shouldMatchIfNMTIsEnabled() { - return isWindows ? shouldMatchIfNMTIsEnabled_windows : shouldMatchIfNMTIsEnabled_linux; - } + private static class WindowsPatterns implements MapPatterns { + + static final String winprot = "[\\-rwxcin]*"; + static final String wintype = "[rc]-(img|map|pvt)"; + + static final String winbase = range + space + someSize + space + winprot + space; + + static final String winimage = winbase + "c-img" + space + someNumber + space; + static final String wincommitted = winbase + "(c-pvt|c-map)" + space + someNumber + space; + static final String winreserved = winbase + "r-pvt" + space + someNumber + space; + + static final String shouldMatchUnconditionally_windows[] = { + // java launcher + winimage + ".*[\\/\\\\]bin[\\/\\\\]java[.]exe", + // libjvm + winimage + ".*[\\/\\\\]bin[\\/\\\\].*[\\/\\\\]jvm.dll" + }; + + static final String shouldMatchIfNMTIsEnabled_windows[] = { + wincommitted + "JAVAHEAP.*", + // metaspace + wincommitted + "META.*", + // parts of metaspace should be uncommitted + winreserved + "META.*", + // code cache + wincommitted + "CODE.*", + // Main thread stack + wincommitted + "STACK-\\d+-main.*" + }; + + public String[] shouldMatchUnconditionally() { + return shouldMatchUnconditionally_windows; + } + + public String[] shouldMatchIfNMTIsEnabled() { + return shouldMatchIfNMTIsEnabled_windows; + } + }; + private static class MacOSPatterns implements MapPatterns { + + // macOS: + static final String macprot = "[\\-rwx]*/[\\-rwx]*"; + + static final String macow = "cow"; + static final String macprivate = "pvt"; + static final String macprivate_or_shared = "(pvt|tsh-shared)"; + static final String macprivatealiased = "p/a"; + + static final String macOSbase = range + space + someSize + space + macprot + space; + + static final String shouldMatchUnconditionally_macOS[] = { + // java launcher + macOSbase + macow + space + someNumber + space + "/.*/bin/java", + // libjvm + macOSbase + macow + space + someNumber + space + "/.*/lib/server/libjvm.dylib", + // we should see the hs-perf data file, and it should appear as shared as well as committed + macOSbase + macprivate + space + someNumber + space + ".*/.*/hsperfdata_.*" + }; + + static final String shouldMatchIfNMTIsEnabled_macOS[] = { + // heap is private with G1GC, shared with ZGC + macOSbase + macprivate_or_shared + space + someNumber + space + "JAVAHEAP.*", + // metaspace + macOSbase + macprivate + space + someNumber + space + "META.*", + // code cache + macOSbase + macprivate + space + someNumber + space + "CODE.*", + // Main thread stack + macOSbase + macprivatealiased + space + someNumber + space + "STACK-.*-main.*" + }; + + public String[] shouldMatchUnconditionally() { + return shouldMatchUnconditionally_macOS; + } + + public String[] shouldMatchIfNMTIsEnabled() { + return shouldMatchIfNMTIsEnabled_macOS; + } + }; } From 6b022bb64b2109c8cd40ebd3b8b3226cf894544d Mon Sep 17 00:00:00 2001 From: Leonid Mesnik Date: Sat, 14 Dec 2024 19:08:19 +0000 Subject: [PATCH 31/93] 8344453: Test jdk/jfr/event/oldobject/TestSanityDefault.java timed out Reviewed-by: egahlin --- test/jdk/jdk/jfr/event/oldobject/TestSanityDefault.java | 1 + 1 file changed, 1 insertion(+) diff --git a/test/jdk/jdk/jfr/event/oldobject/TestSanityDefault.java b/test/jdk/jdk/jfr/event/oldobject/TestSanityDefault.java index 7480acb1d1d..30186db8def 100644 --- a/test/jdk/jdk/jfr/event/oldobject/TestSanityDefault.java +++ b/test/jdk/jdk/jfr/event/oldobject/TestSanityDefault.java @@ -35,6 +35,7 @@ * @test * @key jfr * @requires vm.hasJFR + * @requires vm.flagless * @library /test/lib /test/jdk * @summary Purpose of this test is to run leak profiler without command line tweaks or WhiteBox hacks until we succeed * @run main/othervm -Xmx1G jdk.jfr.event.oldobject.TestSanityDefault From ab1dbd4089a1a15bdf1b6b39994d5b1faacc40ab Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Sun, 15 Dec 2024 17:41:52 +0000 Subject: [PATCH 32/93] 8346202: Correct typo in SQLPermission Reviewed-by: mullan, rriggs, iris --- src/java.sql/share/classes/java/sql/SQLPermission.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java.sql/share/classes/java/sql/SQLPermission.java b/src/java.sql/share/classes/java/sql/SQLPermission.java index 863037502e5..84e41c51a33 100644 --- a/src/java.sql/share/classes/java/sql/SQLPermission.java +++ b/src/java.sql/share/classes/java/sql/SQLPermission.java @@ -32,7 +32,7 @@ * A {@code SQLPermission} object contains * a name (also referred to as a "target name") but no actions * list; there is either a named permission or there is not. - * The target name is the name of the permission (see below). The + * The target name is the name of the permission. The * naming convention follows the hierarchical property naming convention. * In addition, an asterisk * may appear at the end of the name, following a ".", or by itself, to From c88e081a6a0a00d7e7e5f2337f942a1d6c3b5110 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Mon, 16 Dec 2024 04:24:39 +0000 Subject: [PATCH 33/93] 8346160: Fix -Wzero-as-null-pointer-constant warnings from explicit casts Reviewed-by: stefank, dholmes --- src/hotspot/os/aix/attachListener_aix.cpp | 2 +- src/hotspot/os/posix/attachListener_posix.cpp | 2 +- src/hotspot/os/posix/perfMemory_posix.cpp | 4 ++-- src/hotspot/share/oops/compressedKlass.cpp | 2 +- src/hotspot/share/utilities/vmError.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hotspot/os/aix/attachListener_aix.cpp b/src/hotspot/os/aix/attachListener_aix.cpp index bf11d813e06..721901bb0e2 100644 --- a/src/hotspot/os/aix/attachListener_aix.cpp +++ b/src/hotspot/os/aix/attachListener_aix.cpp @@ -39,7 +39,7 @@ #include #ifndef UNIX_PATH_MAX -#define UNIX_PATH_MAX sizeof(((struct sockaddr_un *)0)->sun_path) +#define UNIX_PATH_MAX sizeof(sockaddr_un::sun_path) #endif // The attach mechanism on AIX uses a UNIX domain socket. An attach listener diff --git a/src/hotspot/os/posix/attachListener_posix.cpp b/src/hotspot/os/posix/attachListener_posix.cpp index bdd97afd47e..569c317caa7 100644 --- a/src/hotspot/os/posix/attachListener_posix.cpp +++ b/src/hotspot/os/posix/attachListener_posix.cpp @@ -43,7 +43,7 @@ #ifndef AIX #ifndef UNIX_PATH_MAX -#define UNIX_PATH_MAX sizeof(((struct sockaddr_un *)0)->sun_path) +#define UNIX_PATH_MAX sizeof(sockaddr_un::sun_path) #endif // The attach mechanism on Linux and BSD uses a UNIX domain socket. An attach diff --git a/src/hotspot/os/posix/perfMemory_posix.cpp b/src/hotspot/os/posix/perfMemory_posix.cpp index 4eb46169878..5fbd5e76c5a 100644 --- a/src/hotspot/os/posix/perfMemory_posix.cpp +++ b/src/hotspot/os/posix/perfMemory_posix.cpp @@ -1053,7 +1053,7 @@ static char* mmap_create_shared(size_t size) { return nullptr; } - mapAddress = (char*)::mmap((char*)0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + mapAddress = (char*)::mmap(nullptr, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); result = ::close(fd); assert(result != OS_ERR, "could not close file"); @@ -1208,7 +1208,7 @@ static void mmap_attach_shared(int vmid, char** addr, size_t* sizep, TRAPS) { assert(size > 0, "unexpected size <= 0"); - char* mapAddress = (char*)::mmap((char*)0, size, mmap_prot, MAP_SHARED, fd, 0); + char* mapAddress = (char*)::mmap(nullptr, size, mmap_prot, MAP_SHARED, fd, 0); int result = ::close(fd); assert(result != OS_ERR, "could not close file"); diff --git a/src/hotspot/share/oops/compressedKlass.cpp b/src/hotspot/share/oops/compressedKlass.cpp index 97415cf6e85..21c28af8766 100644 --- a/src/hotspot/share/oops/compressedKlass.cpp +++ b/src/hotspot/share/oops/compressedKlass.cpp @@ -278,7 +278,7 @@ void CompressedKlassPointers::initialize(address addr, size_t len) { if (!set_klass_decode_mode()) { // Give fatal error if this is a specified address - if ((address)CompressedClassSpaceBaseAddress == _base) { + if (CompressedClassSpaceBaseAddress == (size_t)_base) { vm_exit_during_initialization( err_msg("CompressedClassSpaceBaseAddress=" PTR_FORMAT " given with shift %d, cannot be used to encode class pointers", CompressedClassSpaceBaseAddress, _shift)); diff --git a/src/hotspot/share/utilities/vmError.cpp b/src/hotspot/share/utilities/vmError.cpp index b0a9016ffc2..66bc912e8e9 100644 --- a/src/hotspot/share/utilities/vmError.cpp +++ b/src/hotspot/share/utilities/vmError.cpp @@ -133,7 +133,7 @@ static const char* env_list[] = { // defined on Windows "OS", "PROCESSOR_IDENTIFIER", "_ALT_JAVA_HOME_DIR", "TMP", "TEMP", - (const char *)0 + nullptr // End marker. }; // A simple parser for -XX:OnError, usage: From 3518b4bd205f67a356bc6b531c0622ac1d97a962 Mon Sep 17 00:00:00 2001 From: Christian Hagedorn Date: Mon, 16 Dec 2024 06:21:22 +0000 Subject: [PATCH 34/93] 8344171: Clone and initialize Assertion Predicates in order instead of in reverse-order Reviewed-by: epeter, kvn --- src/hotspot/share/opto/loopTransform.cpp | 13 +---- src/hotspot/share/opto/loopnode.hpp | 6 ++ src/hotspot/share/opto/predicates.cpp | 73 +++++++++++++++++++++--- src/hotspot/share/opto/predicates.hpp | 32 ++--------- 4 files changed, 78 insertions(+), 46 deletions(-) diff --git a/src/hotspot/share/opto/loopTransform.cpp b/src/hotspot/share/opto/loopTransform.cpp index a33d89993ad..d8d7be5c89c 100644 --- a/src/hotspot/share/opto/loopTransform.cpp +++ b/src/hotspot/share/opto/loopTransform.cpp @@ -1748,20 +1748,11 @@ void PhaseIdealLoop::create_assertion_predicates_at_loop(CountedLoopNode* source CountedLoopNode* target_loop_head, const NodeInLoopBody& _node_in_loop_body, const bool clone_template) { - Node* init = target_loop_head->init_trip(); - Node* stride = target_loop_head->stride(); - LoopNode* target_outer_loop_head = target_loop_head->skip_strip_mined(); - Node* target_loop_entry = target_outer_loop_head->in(LoopNode::EntryControl); - CreateAssertionPredicatesVisitor create_assertion_predicates_visitor(init, stride, target_loop_entry, this, - _node_in_loop_body, clone_template); + CreateAssertionPredicatesVisitor create_assertion_predicates_visitor(target_loop_head, this, _node_in_loop_body, + clone_template); Node* source_loop_entry = source_loop_head->skip_strip_mined()->in(LoopNode::EntryControl); PredicateIterator predicate_iterator(source_loop_entry); predicate_iterator.for_each(create_assertion_predicates_visitor); - if (create_assertion_predicates_visitor.has_created_predicates()) { - IfTrueNode* last_created_predicate_success_proj = create_assertion_predicates_visitor.last_created_success_proj(); - _igvn.replace_input_of(target_outer_loop_head, LoopNode::EntryControl, last_created_predicate_success_proj); - set_idom(target_outer_loop_head, last_created_predicate_success_proj, dom_depth(target_outer_loop_head)); - } } //------------------------------do_unroll-------------------------------------- // Unroll the loop body one step - make each trip do 2 iterations. diff --git a/src/hotspot/share/opto/loopnode.hpp b/src/hotspot/share/opto/loopnode.hpp index da059f8c820..acafea3fce8 100644 --- a/src/hotspot/share/opto/loopnode.hpp +++ b/src/hotspot/share/opto/loopnode.hpp @@ -1367,6 +1367,12 @@ class PhaseIdealLoop : public PhaseTransform { public: void register_control(Node* n, IdealLoopTree *loop, Node* pred, bool update_body = true); + // Replace the control input of 'node' with 'new_control' and set the dom depth to the one of 'new_control'. + void replace_control(Node* node, Node* new_control) { + _igvn.replace_input_of(node, 0, new_control); + set_idom(node, new_control, dom_depth(new_control)); + } + void replace_loop_entry(LoopNode* loop_head, Node* new_entry) { _igvn.replace_input_of(loop_head, LoopNode::EntryControl, new_entry); set_idom(loop_head, new_entry, dom_depth(new_entry)); diff --git a/src/hotspot/share/opto/predicates.cpp b/src/hotspot/share/opto/predicates.cpp index 1a023d04b68..a9cd1e638c1 100644 --- a/src/hotspot/share/opto/predicates.cpp +++ b/src/hotspot/share/opto/predicates.cpp @@ -878,6 +878,19 @@ void Predicates::dump_for_loop(LoopNode* loop_node) { } #endif // NOT PRODUCT +CreateAssertionPredicatesVisitor::CreateAssertionPredicatesVisitor(CountedLoopNode* target_loop_head, + PhaseIdealLoop* phase, + const NodeInLoopBody& node_in_loop_body, + const bool clone_template) + : _init(target_loop_head->init_trip()), + _stride(target_loop_head->stride()), + _old_target_loop_entry(target_loop_head->skip_strip_mined()->in(LoopNode::EntryControl)), + _current_predicate_chain_head(target_loop_head->skip_strip_mined()), // Initially no predicates, yet. + _phase(phase), + _has_hoisted_check_parse_predicates(false), + _node_in_loop_body(node_in_loop_body), + _clone_template(clone_template) {} + // Keep track of whether we are in the correct Predicate Block where Template Assertion Predicates can be found. // The PredicateIterator will always start at the loop entry and first visits the Loop Limit Check Predicate Block. void CreateAssertionPredicatesVisitor::visit(const ParsePredicate& parse_predicate) { @@ -894,22 +907,27 @@ void CreateAssertionPredicatesVisitor::visit(const TemplateAssertionPredicate& t return; } if (_clone_template) { - _new_control = clone_template_and_replace_init_input(template_assertion_predicate); + IfTrueNode* cloned_template_success_proj = clone_template_and_replace_init_input(template_assertion_predicate); + initialize_from_template(template_assertion_predicate, cloned_template_success_proj); + _current_predicate_chain_head = cloned_template_success_proj->in(0); + } else { + IfTrueNode* initialized_success_proj = initialize_from_template(template_assertion_predicate, _old_target_loop_entry); + _current_predicate_chain_head = initialized_success_proj->in(0); } - _new_control = initialize_from_template(template_assertion_predicate); } // Create an Initialized Assertion Predicate from the provided Template Assertion Predicate. IfTrueNode* CreateAssertionPredicatesVisitor::initialize_from_template( - const TemplateAssertionPredicate& template_assertion_predicate) const { + const TemplateAssertionPredicate& template_assertion_predicate, Node* new_control) const { DEBUG_ONLY(template_assertion_predicate.verify();) IfNode* template_head = template_assertion_predicate.head(); InitializedAssertionPredicateCreator initialized_assertion_predicate_creator(_phase); IfTrueNode* initialized_predicate = initialized_assertion_predicate_creator.create_from_template(template_head, - _new_control, + new_control, _init, _stride); DEBUG_ONLY(InitializedAssertionPredicate::verify(initialized_predicate);) template_assertion_predicate.rewire_loop_data_dependencies(initialized_predicate, _node_in_loop_body, _phase); + rewire_to_old_predicate_chain_head(initialized_predicate); return initialized_predicate; } @@ -917,8 +935,46 @@ IfTrueNode* CreateAssertionPredicatesVisitor::initialize_from_template( IfTrueNode* CreateAssertionPredicatesVisitor::clone_template_and_replace_init_input( const TemplateAssertionPredicate& template_assertion_predicate) { OpaqueLoopInitNode* opaque_init = new OpaqueLoopInitNode(_phase->C, _init); - _phase->register_new_node(opaque_init, _new_control); - return template_assertion_predicate.clone_and_replace_init(_new_control, opaque_init, _phase); + _phase->register_new_node(opaque_init, _old_target_loop_entry); + return template_assertion_predicate.clone_and_replace_init(_old_target_loop_entry, opaque_init, _phase); +} + +// Rewire the newly created predicates to the old predicate chain head (i.e. '_current_predicate_chain_head') by +// rewiring the current control input of '_current_predicate_chain_head' from '_old_target_loop_entry' to +// 'initialized_assertion_predicate_success_proj'. This is required because we walk the predicate chain from the loop +// up and clone Template Assertion Predicates on the fly: +// +// x +// | old target +// Template Assertion loop entry +// Predicate 1 old target clone | \ +// | loop entry TAP 2 | cloned Template Assertion +// Template Assertion | ======> | Predicate 2 +// Predicate 2 target loop | +// | target loop #_current_predicate_chain_head +// source loop +// +// +// old target old target +// loop entry loop entry +// | \ rewire | +// | cloned Template Assertion to old cloned Template Assertion #current_predicate +// initialize | Predicate 2 predicate Predicate 2 _chain_head (new) +// TAP 2 | | chain head | +// ======> | Initialized Assertion ======> Initialized Assertion +// | Predicate 2 Predicate 2 +// | | +// target loop #_current_predicate_chain_head target loop +// +void CreateAssertionPredicatesVisitor::rewire_to_old_predicate_chain_head( + Node* initialized_assertion_predicate_success_proj) const { + if (_current_predicate_chain_head->is_Loop()) { + assert(_current_predicate_chain_head->in(LoopNode::EntryControl) == _old_target_loop_entry, "must be old loop entry"); + _phase->replace_loop_entry(_current_predicate_chain_head->as_Loop(), initialized_assertion_predicate_success_proj); + } else { + assert(_current_predicate_chain_head->in(0) == _old_target_loop_entry, "must be old loop entry"); + _phase->replace_control(_current_predicate_chain_head, initialized_assertion_predicate_success_proj); + } } // Clone the Template Assertion Predicate and set a new input for the OpaqueLoopStrideNode. @@ -951,9 +1007,8 @@ IfTrueNode* UpdateStrideForAssertionPredicates::initialize_from_updated_template void UpdateStrideForAssertionPredicates::connect_initialized_assertion_predicate( Node* new_control_out, IfTrueNode* initialized_success_proj) const { if (new_control_out->is_Loop()) { - _phase->igvn().replace_input_of(new_control_out, LoopNode::EntryControl, initialized_success_proj); + _phase->replace_loop_entry(new_control_out->as_Loop(), initialized_success_proj); } else { - _phase->igvn().replace_input_of(new_control_out, 0, initialized_success_proj); + _phase->replace_control(new_control_out, initialized_success_proj); } - _phase->set_idom(new_control_out, initialized_success_proj, _phase->dom_depth(new_control_out)); } diff --git a/src/hotspot/share/opto/predicates.hpp b/src/hotspot/share/opto/predicates.hpp index ef27c093290..bc8c1a8ebdc 100644 --- a/src/hotspot/share/opto/predicates.hpp +++ b/src/hotspot/share/opto/predicates.hpp @@ -984,46 +984,26 @@ class CreateAssertionPredicatesVisitor : public PredicateVisitor { Node* const _init; Node* const _stride; Node* const _old_target_loop_entry; - Node* _new_control; + Node* _current_predicate_chain_head; PhaseIdealLoop* const _phase; bool _has_hoisted_check_parse_predicates; const NodeInLoopBody& _node_in_loop_body; const bool _clone_template; IfTrueNode* clone_template_and_replace_init_input(const TemplateAssertionPredicate& template_assertion_predicate); - IfTrueNode* initialize_from_template(const TemplateAssertionPredicate& template_assertion_predicate) const; + IfTrueNode* initialize_from_template(const TemplateAssertionPredicate& template_assertion_predicate, + Node* new_control) const; + void rewire_to_old_predicate_chain_head(Node* initialized_assertion_predicate_success_proj) const; public: - CreateAssertionPredicatesVisitor(Node* init, Node* stride, Node* new_control, PhaseIdealLoop* phase, - const NodeInLoopBody& node_in_loop_body, const bool clone_template) - : _init(init), - _stride(stride), - _old_target_loop_entry(new_control), - _new_control(new_control), - _phase(phase), - _has_hoisted_check_parse_predicates(false), - _node_in_loop_body(node_in_loop_body), - _clone_template(clone_template) {} + CreateAssertionPredicatesVisitor(CountedLoopNode* target_loop_head, PhaseIdealLoop* phase, + const NodeInLoopBody& node_in_loop_body, bool clone_template); NONCOPYABLE(CreateAssertionPredicatesVisitor); using PredicateVisitor::visit; void visit(const ParsePredicate& parse_predicate) override; void visit(const TemplateAssertionPredicate& template_assertion_predicate) override; - - // Did we create any new Initialized Assertion Predicates? - bool has_created_predicates() const { - return _new_control != _old_target_loop_entry; - } - - // Return the last created node by this visitor or the originally provided 'new_control' to the visitor if there was - // no new node created (i.e. no Template Assertion Predicates found). - IfTrueNode* last_created_success_proj() const { - assert(has_created_predicates(), "should only be queried if new nodes have been created"); - assert(_new_control->unique_ctrl_out_or_null() == nullptr, "no control outputs, yet"); - assert(_new_control->is_IfTrue(), "Assertion Predicates only have IfTrue on success proj"); - return _new_control->as_IfTrue(); - } }; // This visitor collects all Template Assertion Predicates If nodes or the corresponding Opaque nodes, depending on the From ee1c5ad8fe99ec427604773a6f04baa0ad765c9e Mon Sep 17 00:00:00 2001 From: Richard Reingruber Date: Mon, 16 Dec 2024 07:16:40 +0000 Subject: [PATCH 35/93] 8345975: Update SAP SE copyright year to 2024 where it was missed Reviewed-by: mdoerr, clanger --- src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp | 2 +- src/hotspot/cpu/ppc/c2_init_ppc.cpp | 2 +- src/hotspot/cpu/ppc/frame_ppc.cpp | 2 +- src/hotspot/cpu/ppc/frame_ppc.hpp | 2 +- src/hotspot/cpu/ppc/frame_ppc.inline.hpp | 2 +- src/hotspot/cpu/ppc/globals_ppc.hpp | 2 +- src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp | 2 +- src/hotspot/cpu/ppc/nativeInst_ppc.cpp | 2 +- src/hotspot/cpu/ppc/nativeInst_ppc.hpp | 2 +- src/hotspot/cpu/ppc/ppc.ad | 2 +- src/hotspot/cpu/ppc/vm_version_ppc.cpp | 2 +- src/hotspot/cpu/ppc/vm_version_ppc.hpp | 2 +- src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp | 2 +- src/hotspot/cpu/s390/frame_s390.hpp | 2 +- src/hotspot/cpu/s390/frame_s390.inline.hpp | 2 +- src/hotspot/cpu/s390/nativeInst_s390.hpp | 2 +- src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp | 2 +- src/hotspot/os/aix/osThread_aix.cpp | 2 +- src/hotspot/os/aix/osThread_aix.hpp | 2 +- src/hotspot/os/aix/porting_aix.hpp | 2 +- src/hotspot/os_cpu/aix_ppc/javaThread_aix_ppc.cpp | 2 +- src/hotspot/os_cpu/linux_ppc/javaThread_linux_ppc.cpp | 2 +- src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp | 2 +- src/hotspot/share/utilities/vmError.cpp | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp b/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp index 451f3b7e9cd..4d3927dc644 100644 --- a/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp +++ b/src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2021 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/c2_init_ppc.cpp b/src/hotspot/cpu/ppc/c2_init_ppc.cpp index a02b9668c92..d570abc431a 100644 --- a/src/hotspot/cpu/ppc/c2_init_ppc.cpp +++ b/src/hotspot/cpu/ppc/c2_init_ppc.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2020 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/frame_ppc.cpp b/src/hotspot/cpu/ppc/frame_ppc.cpp index 07243ed1c8c..f698b14d312 100644 --- a/src/hotspot/cpu/ppc/frame_ppc.cpp +++ b/src/hotspot/cpu/ppc/frame_ppc.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2023 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/frame_ppc.hpp b/src/hotspot/cpu/ppc/frame_ppc.hpp index 67456158b97..560615089fe 100644 --- a/src/hotspot/cpu/ppc/frame_ppc.hpp +++ b/src/hotspot/cpu/ppc/frame_ppc.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2023 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/frame_ppc.inline.hpp b/src/hotspot/cpu/ppc/frame_ppc.inline.hpp index c390449dc33..19a90367353 100644 --- a/src/hotspot/cpu/ppc/frame_ppc.inline.hpp +++ b/src/hotspot/cpu/ppc/frame_ppc.inline.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2023 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/globals_ppc.hpp b/src/hotspot/cpu/ppc/globals_ppc.hpp index 50204d1ac89..7fefc856a47 100644 --- a/src/hotspot/cpu/ppc/globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/globals_ppc.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2023 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp index 632eb97e852..67b9bdc0414 100644 --- a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp +++ b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2023 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/nativeInst_ppc.cpp b/src/hotspot/cpu/ppc/nativeInst_ppc.cpp index 7577bdb9fdd..78ed81be9cb 100644 --- a/src/hotspot/cpu/ppc/nativeInst_ppc.cpp +++ b/src/hotspot/cpu/ppc/nativeInst_ppc.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2020 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/nativeInst_ppc.hpp b/src/hotspot/cpu/ppc/nativeInst_ppc.hpp index 29b8b1b891b..f4d570116a8 100644 --- a/src/hotspot/cpu/ppc/nativeInst_ppc.hpp +++ b/src/hotspot/cpu/ppc/nativeInst_ppc.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2021 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/ppc.ad b/src/hotspot/cpu/ppc/ppc.ad index b023ccae86d..808dd022738 100644 --- a/src/hotspot/cpu/ppc/ppc.ad +++ b/src/hotspot/cpu/ppc/ppc.ad @@ -1,6 +1,6 @@ // // Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. -// Copyright (c) 2012, 2023 SAP SE. All rights reserved. +// Copyright (c) 2012, 2024 SAP SE. All rights reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/vm_version_ppc.cpp b/src/hotspot/cpu/ppc/vm_version_ppc.cpp index a09d718287f..9a4f13e41a0 100644 --- a/src/hotspot/cpu/ppc/vm_version_ppc.cpp +++ b/src/hotspot/cpu/ppc/vm_version_ppc.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2023 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/vm_version_ppc.hpp b/src/hotspot/cpu/ppc/vm_version_ppc.hpp index 4c0954ebdd2..6096f8e4fd1 100644 --- a/src/hotspot/cpu/ppc/vm_version_ppc.hpp +++ b/src/hotspot/cpu/ppc/vm_version_ppc.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2021 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp b/src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp index 6a8c146aa9a..567cfae8d0a 100644 --- a/src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp +++ b/src/hotspot/cpu/ppc/vtableStubs_ppc_64.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2021 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/s390/frame_s390.hpp b/src/hotspot/cpu/s390/frame_s390.hpp index b6e4726cd45..3a6b3f33a55 100644 --- a/src/hotspot/cpu/s390/frame_s390.hpp +++ b/src/hotspot/cpu/s390/frame_s390.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016, 2023 SAP SE. All rights reserved. + * Copyright (c) 2016, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/s390/frame_s390.inline.hpp b/src/hotspot/cpu/s390/frame_s390.inline.hpp index 62e202337fe..d29106cfc40 100644 --- a/src/hotspot/cpu/s390/frame_s390.inline.hpp +++ b/src/hotspot/cpu/s390/frame_s390.inline.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016 SAP SE. All rights reserved. + * Copyright (c) 2016, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/s390/nativeInst_s390.hpp b/src/hotspot/cpu/s390/nativeInst_s390.hpp index 8003e1d42f2..fcae833769f 100644 --- a/src/hotspot/cpu/s390/nativeInst_s390.hpp +++ b/src/hotspot/cpu/s390/nativeInst_s390.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016 SAP SE. All rights reserved. + * Copyright (c) 2016, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp b/src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp index 4871706aadd..1c4089d5beb 100644 --- a/src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp +++ b/src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016, 2023 SAP SE. All rights reserved. + * Copyright (c) 2016, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/os/aix/osThread_aix.cpp b/src/hotspot/os/aix/osThread_aix.cpp index c424b044c09..86d9821e5a5 100644 --- a/src/hotspot/os/aix/osThread_aix.cpp +++ b/src/hotspot/os/aix/osThread_aix.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/os/aix/osThread_aix.hpp b/src/hotspot/os/aix/osThread_aix.hpp index 514e554101e..771c2c19e45 100644 --- a/src/hotspot/os/aix/osThread_aix.hpp +++ b/src/hotspot/os/aix/osThread_aix.hpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2013 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/os/aix/porting_aix.hpp b/src/hotspot/os/aix/porting_aix.hpp index 15f1e0afc54..a1a22d81471 100644 --- a/src/hotspot/os/aix/porting_aix.hpp +++ b/src/hotspot/os/aix/porting_aix.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/os_cpu/aix_ppc/javaThread_aix_ppc.cpp b/src/hotspot/os_cpu/aix_ppc/javaThread_aix_ppc.cpp index 3ec846460a1..94e0c387a81 100644 --- a/src/hotspot/os_cpu/aix_ppc/javaThread_aix_ppc.cpp +++ b/src/hotspot/os_cpu/aix_ppc/javaThread_aix_ppc.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * Copyright (c) 2022, IBM Corp. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/os_cpu/linux_ppc/javaThread_linux_ppc.cpp b/src/hotspot/os_cpu/linux_ppc/javaThread_linux_ppc.cpp index 71d3aaddaec..f9fc6cec7fa 100644 --- a/src/hotspot/os_cpu/linux_ppc/javaThread_linux_ppc.cpp +++ b/src/hotspot/os_cpu/linux_ppc/javaThread_linux_ppc.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2022 SAP SE. All rights reserved. + * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp b/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp index bc8e3d10431..d599359d529 100644 --- a/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp +++ b/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016, 2023 SAP SE. All rights reserved. + * Copyright (c) 2016, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/share/utilities/vmError.cpp b/src/hotspot/share/utilities/vmError.cpp index 66bc912e8e9..223d8ee8849 100644 --- a/src/hotspot/share/utilities/vmError.cpp +++ b/src/hotspot/share/utilities/vmError.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2017, 2020 SAP SE. All rights reserved. + * Copyright (c) 2017, 2024 SAP SE. All rights reserved. * Copyright (c) 2023, Red Hat, Inc. and/or its affiliates. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * From 4fc43b0b49c3d7c4351646f2580860495d8a0d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Walln=C3=B6fer?= Date: Mon, 16 Dec 2024 08:09:52 +0000 Subject: [PATCH 36/93] 8345770: javadoc: API documentation builds are not always reproducible Reviewed-by: nbenalla, liach --- .../doclets/formats/html/ClassUseWriter.java | 1 - .../internal/doclets/formats/html/ClassWriter.java | 3 +-- .../doclets/formats/html/HtmlConfiguration.java | 5 ----- .../doclets/formats/html/HtmlDocletWriter.java | 11 +++++------ .../doclets/formats/html/HtmlLinkFactory.java | 4 ++-- .../formats/html/taglets/InheritDocTaglet.java | 4 ++-- .../doclets/formats/html/taglets/LinkTaglet.java | 2 +- .../doclets/formats/html/taglets/ReturnTaglet.java | 2 +- .../doclets/formats/html/taglets/TagletWriter.java | 14 ++++++-------- .../doclets/formats/html/taglets/ThrowsTaglet.java | 4 ++-- .../javadoc/doclet/testModules/TestModules.java | 4 ++-- .../doclet/testUseOption/TestUseOption.java | 7 +++++-- .../doclet/testUseOption/pkg1/AnAbstract.java | 6 +++++- 13 files changed, 32 insertions(+), 35 deletions(-) diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java index d10478fb3ba..c2a63be654d 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java @@ -106,7 +106,6 @@ public ClassUseWriter(HtmlConfiguration configuration, pkgToPackageAnnotations = new TreeSet<>(comparators.classUseComparator()); pkgToPackageAnnotations.addAll(mapper.classToPackageAnnotations.get(typeElement)); } - configuration.currentTypeElement = typeElement; this.pkgSet = new TreeSet<>(comparators.packageComparator()); this.pkgToClassTypeParameter = pkgDivide(mapper.classToClassTypeParam); this.pkgToSubclassTypeParameter = pkgDivide(mapper.classToSubclassTypeParam); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriter.java index bef634b0ddb..d56616dfc91 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriter.java @@ -94,7 +94,6 @@ public ClassWriter(HtmlConfiguration configuration, TypeElement typeElement, ClassTree classTree) { super(configuration, configuration.docPaths.forClass(typeElement)); this.typeElement = typeElement; - configuration.currentTypeElement = typeElement; this.classTree = classTree; pHelper = new PropertyUtils.PropertyHelper(configuration, typeElement); @@ -506,7 +505,7 @@ protected Content getClassInfo(Content classInfo) { } @Override - public TypeElement getCurrentPageElement() { + public TypeElement getCurrentTypeElement() { return typeElement; } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java index 2794a13f9da..97c9e2669e0 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java @@ -104,11 +104,6 @@ public class HtmlConfiguration extends BaseConfiguration { */ public DocPath topFile = DocPath.empty; - /** - * The TypeElement for the class file getting generated. - */ - public TypeElement currentTypeElement = null; // Set this TypeElement in the ClassWriter. - /** * The collections of items for the main index. * This field is only initialized if {@code options.createIndex()} diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java index 3f20c7dfd76..c2b048b54e0 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java @@ -1024,11 +1024,10 @@ public String getEnclosingPackageName(TypeElement te) { } /** - * Return the main type element of the current page or null for pages that don't have one. - * - * @return the type element of the current page. + * {@return the type element documented by this writer if it is a {@code ClassWriter}, + * or null for any other kind of writer} */ - public TypeElement getCurrentPageElement() { + public TypeElement getCurrentTypeElement() { return null; } @@ -1912,7 +1911,7 @@ private boolean shouldRedirectRelativeLinks(Element element) { // Retrieve the element of this writer if it is a "primary" writer for an element. // Note: It would be nice to have getCurrentPageElement() return package and module elements // in their respective writers, but other uses of the method are only interested in TypeElements. - Element currentPageElement = getCurrentPageElement(); + Element currentPageElement = getCurrentTypeElement(); if (currentPageElement == null) { if (this instanceof PackageWriter packageWriter) { currentPageElement = packageWriter.packageElement; @@ -1951,7 +1950,7 @@ public Content invalidTagOutput(String summary, Optional detail) { */ private boolean inSamePackage(Element element) { Element currentPageElement = (this instanceof PackageWriter packageWriter) - ? packageWriter.packageElement : getCurrentPageElement(); + ? packageWriter.packageElement : getCurrentTypeElement(); return currentPageElement != null && !utils.isModule(element) && Objects.equals(utils.containingPackage(currentPageElement), utils.containingPackage(element)); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java index 3dce7920db9..d404fdaab94 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlLinkFactory.java @@ -270,7 +270,7 @@ protected Content getClassLink(HtmlLinkInfo linkInfo) { TypeElement enclosing = utils.getEnclosingTypeElement(linkInfo.getTargetMember()); Set enclosingFlags = utils.elementFlags(enclosing); if (flags.contains(ElementFlag.PREVIEW) && enclosingFlags.contains(ElementFlag.PREVIEW)) { - if (enclosing.equals(m_writer.getCurrentPageElement())) { + if (enclosing.equals(m_writer.getCurrentTypeElement())) { //skip the PREVIEW tag: flags = EnumSet.copyOf(flags); flags.remove(ElementFlag.PREVIEW); @@ -294,7 +294,7 @@ protected Content getClassLink(HtmlLinkInfo linkInfo) { if (utils.isIncluded(typeElement)) { if (configuration.isGeneratedDoc(typeElement) && !utils.hasHiddenTag(typeElement)) { DocPath fileName = getPath(linkInfo); - if (linkInfo.linkToSelf() || typeElement != m_writer.getCurrentPageElement()) { + if (linkInfo.linkToSelf() || typeElement != m_writer.getCurrentTypeElement()) { link.add(m_writer.links.createLink( fileName.fragment(linkInfo.getFragment()), label, linkInfo.getStyle(), linkInfo.getTitle())); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/InheritDocTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/InheritDocTaglet.java index 4ba730cca9c..7f8fd7ff741 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/InheritDocTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/InheritDocTaglet.java @@ -133,7 +133,7 @@ private Content retrieveInheritedDocumentation(TagletWriter writer, } } catch (DocFinder.NoOverriddenMethodFound e) { String signature = utils.getSimpleName(method) - + utils.flatSignature(method, writer.getCurrentPageElement()); + + utils.flatSignature(method, writer.getCurrentTypeElement()); messages.warning(method, "doclet.noInheritedDoc", signature); } return replacement; @@ -157,7 +157,7 @@ private Content retrieveInheritedDocumentation(TagletWriter writer, } } else { String signature = utils.getSimpleName(method) - + utils.flatSignature(method, writer.getCurrentPageElement()); + + utils.flatSignature(method, writer.getCurrentTypeElement()); messages.warning(method, "doclet.noInheritedDoc", signature); } return replacement; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LinkTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LinkTaglet.java index 69cabd5427d..1f34a466f0d 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LinkTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/LinkTaglet.java @@ -264,7 +264,7 @@ Content linkSeeReferenceOutput(Element holder, } } String refMemName = refFragment; - if (config.currentTypeElement != containing) { + if (htmlWriter.getCurrentTypeElement() != containing) { refMemName = (utils.isConstructor(refMem)) ? refMemName : utils.getSimpleName(containing) + "." + refMemName; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ReturnTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ReturnTaglet.java index 38ab48bb61f..994d45b8914 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ReturnTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ReturnTaglet.java @@ -94,7 +94,7 @@ public Content getAllBlockTagOutput(Element holder, TagletWriter tagletWriter) { List tags = utils.getReturnTrees(holder); // make sure we are not using @return on a method with the void return type - TypeMirror returnType = utils.getReturnType(tagletWriter.getCurrentPageElement(), method); + TypeMirror returnType = utils.getReturnType(tagletWriter.getCurrentTypeElement(), method); if (returnType != null && utils.isVoid(returnType)) { if (!tags.isEmpty() && !config.isDocLintReferenceGroupEnabled()) { messages.warning(holder, "doclet.Return_tag_on_void_method"); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/TagletWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/TagletWriter.java index 7b6c7060a6f..e0712e2f771 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/TagletWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/TagletWriter.java @@ -201,12 +201,10 @@ public Content invalidTagOutput(String summary, Optional detail) { } /** - * Returns the main type element of the current page or null for pages that don't have one. - * - * @return the type element of the current page or null. + * {@return the type element documented by the current {@code HtmlDocletWriter} (may be null)} */ - public TypeElement getCurrentPageElement() { - return htmlWriter.getCurrentPageElement(); + public TypeElement getCurrentTypeElement() { + return htmlWriter.getCurrentTypeElement(); } /** @@ -411,7 +409,7 @@ public String visitType(TypeElement e, Void p) { public String visitExecutable(ExecutableElement e, Void p) { return utils.getFullyQualifiedName(utils.getEnclosingTypeElement(e)) + "." + utils.getSimpleName(e) - + utils.flatSignature(e, htmlWriter.getCurrentPageElement()); + + utils.flatSignature(e, htmlWriter.getCurrentTypeElement()); } @Override @@ -476,11 +474,11 @@ private boolean isLongOrHasComma(Content c) { // Test if element is the same as or belongs to the current page element private boolean isDifferentTypeElement(Element element) { if (element.getKind().isDeclaredType()) { - return element != getCurrentPageElement(); + return element != getCurrentTypeElement(); } else if (element.getKind() == ElementKind.OTHER) { return false; } else { - return utils.getEnclosingTypeElement(element) != getCurrentPageElement(); + return utils.getEnclosingTypeElement(element) != getCurrentTypeElement(); } } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ThrowsTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ThrowsTaglet.java index 5a92bf42a04..8c60903d48c 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ThrowsTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/ThrowsTaglet.java @@ -211,7 +211,7 @@ public Content getAllBlockTagOutput(Element holder, TagletWriter tagletWriter) { // since {@inheritDoc} in @throws is processed by ThrowsTaglet (this taglet) rather than // InheritDocTaglet, we have to duplicate some of the behavior of the latter taglet String signature = utils.getSimpleName(holder) - + utils.flatSignature((ExecutableElement) holder, tagletWriter.getCurrentPageElement()); + + utils.flatSignature((ExecutableElement) holder, tagletWriter.getCurrentTypeElement()); messages.warning(holder, "doclet.noInheritedDoc", signature); } return tagletWriter.getOutputInstance(); // TODO: consider invalid rather than empty output @@ -235,7 +235,7 @@ private Content getAllBlockTagOutput0(Element holder) } var executable = (ExecutableElement) holder; ExecutableType instantiatedType = utils.asInstantiatedMethodType( - tagletWriter.getCurrentPageElement(), executable); + tagletWriter.getCurrentTypeElement(), executable); List substitutedExceptionTypes = instantiatedType.getThrownTypes(); List originalExceptionTypes = executable.getThrownTypes(); Map typeSubstitutions = getSubstitutedThrownTypes( diff --git a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java index 4d3628544f8..88ccac31580 100644 --- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java +++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java @@ -621,7 +621,7 @@ void checkModuleTags() { estpkgmdltags">TestClassInModuleTags.""", """ Member Link: testMethod(String).""", + lang.String)">TestClassInModuleTags.testMethod(String).""", """ Package Link: testpkgmdltags.""", """ @@ -892,7 +892,7 @@ void checkModuleModeCommon() { Type Link: TestClassInModuleTags.
Member Link: testMethod(String).
+ Method(java.lang.String)">TestClassInModuleTags.testMethod(String).
Package Link: testpkgmdltags.
"""); checkOutput("moduleA/module-summary.html", true, diff --git a/test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java b/test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java index f5f6ff213a0..d59aed41798 100644 --- a/test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java +++ b/test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java @@ -24,7 +24,7 @@ /* * @test * @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 8081854 8071982 8162363 8175200 8186332 - * 8182765 8196202 8202626 8261976 8323698 + * 8182765 8196202 8202626 8261976 8323698 8345770 * @summary A simple test to ensure class-use files are correct. * @library /tools/lib ../../lib * @modules jdk.javadoc/jdk.javadoc.internal.tool @@ -107,7 +107,10 @@ public void test1() { ); checkOutput("pkg1/class-use/UsedInterface.html", true, """ - AnAbstract""" + AnAbstract""", + """ + Link to interface method: Use\ + dInterface.doNothing().""" ); checkOutput("pkg1/class-use/UsedInterface.html", true, "../C10.html#withReturningTypeParameters()" diff --git a/test/langtools/jdk/javadoc/doclet/testUseOption/pkg1/AnAbstract.java b/test/langtools/jdk/javadoc/doclet/testUseOption/pkg1/AnAbstract.java index 4d31c6f36bd..ad7d8f3e719 100644 --- a/test/langtools/jdk/javadoc/doclet/testUseOption/pkg1/AnAbstract.java +++ b/test/langtools/jdk/javadoc/doclet/testUseOption/pkg1/AnAbstract.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -22,4 +22,8 @@ */ package pkg1; + +/** + * Link to interface method: {@link #doNothing}. + */ public abstract class AnAbstract implements UsedInterface {} From 92860186ec72dd5de55b310700a6b4f03d8b64fd Mon Sep 17 00:00:00 2001 From: Robbin Ehn Date: Mon, 16 Dec 2024 09:48:12 +0000 Subject: [PATCH 37/93] 8345322: RISC-V: Add concurrent gtests for cmpxchg variants Reviewed-by: mli, fyang --- .../gtest/riscv/test_assembler_riscv.cpp | 682 +++++++++++++----- 1 file changed, 484 insertions(+), 198 deletions(-) diff --git a/test/hotspot/gtest/riscv/test_assembler_riscv.cpp b/test/hotspot/gtest/riscv/test_assembler_riscv.cpp index 0192e77da94..41ca565b23d 100644 --- a/test/hotspot/gtest/riscv/test_assembler_riscv.cpp +++ b/test/hotspot/gtest/riscv/test_assembler_riscv.cpp @@ -29,9 +29,13 @@ #include "asm/assembler.inline.hpp" #include "asm/macroAssembler.hpp" #include "memory/resourceArea.hpp" +#include "metaprogramming/enableIf.hpp" #include "runtime/orderAccess.hpp" +#include "threadHelper.inline.hpp" #include "unittest.hpp" +#include + typedef int64_t (*zicond_func)(int64_t cmp1, int64_t cmp2, int64_t dst, int64_t src); typedef void (MacroAssembler::*cmov_func)(Register cmp1, Register cmp2, Register dst, Register src); @@ -54,7 +58,7 @@ class CmovTester { } }; -void run_cmov_tests() { +static void run_cmov_tests() { // If 42(a0) eq 42(a1): assign dest(a2/66) the src(a3/77), expect result: 77 CmovTester::test(&MacroAssembler::cmov_eq, 42, 42, 66, 77, 77); // If 41(a0) eq 42(a1): assign dest(a2/66) the src(a3/77), expect result: 66 @@ -107,211 +111,239 @@ TEST_VM(RiscV, cmov) { template class CmpxchgTester { - public: - typedef TESTSIZE (*cmpxchg_func)(intptr_t addr, TESTSIZE expected, TESTSIZE new_value, TESTSIZE result); + // The functions expect arguments to be type represented, not C-ABI argument representation. + // Hence an unsigned should be zero-extended, and the same goes for the return value. + typedef int64_t (*cmpxchg_func)(intptr_t addr, int64_t expected, int64_t new_value, int64_t result); - static TESTSIZE base_cmpxchg(int variant, intptr_t addr, TESTSIZE expected, TESTSIZE new_value, TESTSIZE result, bool boolean_result = false) { - BufferBlob* bb = BufferBlob::create("riscvTest", 128); - CodeBuffer code(bb); + typedef int64_t (*cmpxchg_narrow_func)(intptr_t addr, int64_t expected, int64_t new_value, int64_t result, + int64_t scratch0, int64_t scratch1, int64_t scratch2); + + BufferBlob* _bb; + cmpxchg_func _func; + cmpxchg_narrow_func _narrow; + + public: + CmpxchgTester(int variant, bool boolean_result) { + _bb = BufferBlob::create("riscvTest", 128); + CodeBuffer code(_bb); MacroAssembler _masm(&code); address entry = _masm.pc(); - { + if (ASMSIZE == Assembler::int8 || ASMSIZE == Assembler::int16) { + address entry = _masm.pc(); + _masm.cmpxchg_narrow_value(/*addr*/ c_rarg0, /*expected*/ c_rarg1, /*new_value*/c_rarg2, + ASMSIZE, Assembler::relaxed, Assembler::relaxed, + /*result*/ c_rarg3, boolean_result, c_rarg4, c_rarg5, c_rarg6); /* Uses also t0-t1, caller saved */ + _masm.mv(c_rarg0, c_rarg3); + _masm.ret(); + _narrow = ((cmpxchg_narrow_func)entry); + } else { switch(variant) { default: _masm.cmpxchg(/*addr*/ c_rarg0, /*expected*/ c_rarg1, /*new_value*/c_rarg2, - ASMSIZE, Assembler::relaxed, Assembler::relaxed, + ASMSIZE, Assembler::aq, Assembler::rl, /*result*/ c_rarg3, boolean_result); _masm.mv(c_rarg0, c_rarg3); break; case 1: // expected == result _masm.cmpxchg(/*addr*/ c_rarg0, /*expected*/ c_rarg1, /*new_value*/c_rarg2, - ASMSIZE, Assembler::relaxed, Assembler::relaxed, + ASMSIZE, Assembler::aq, Assembler::rl, /*result*/ c_rarg1, boolean_result); _masm.mv(c_rarg0, c_rarg1); break; case 2: // new_value == result _masm.cmpxchg(/*addr*/ c_rarg0, /*expected*/ c_rarg1, /*new_value*/c_rarg2, - ASMSIZE, Assembler::relaxed, Assembler::relaxed, + ASMSIZE, Assembler::aq, Assembler::rl, /*result*/ c_rarg2, boolean_result); _masm.mv(c_rarg0, c_rarg2); break; case 3: // expected == new_value _masm.cmpxchg(/*addr*/ c_rarg0, /*expected*/ c_rarg1, /*new_value*/ c_rarg1, - ASMSIZE, Assembler::relaxed, Assembler::relaxed, + ASMSIZE, Assembler::aq, Assembler::rl, /*result*/ c_rarg2, boolean_result); _masm.mv(c_rarg0, c_rarg2); break; } _masm.ret(); + _func = ((cmpxchg_func)entry); } _masm.flush(); // icache invalidate - TESTSIZE ret = ((cmpxchg_func)entry)(addr, expected, new_value, result); - BufferBlob::free(bb); - return ret; + } + + ~CmpxchgTester() { + BufferBlob::free(_bb); + } + + TESTSIZE cmpxchg(intptr_t addr, TESTSIZE expected, TESTSIZE new_value) { + if (ASMSIZE == Assembler::int8 || ASMSIZE == Assembler::int16) { + return _narrow(addr, expected, new_value, /* dummy result */ 67, -1, -1, -1); + } else { + return _func(addr, expected, new_value, /* dummy result */ 67); + } } }; template -void plain_cmpxchg_test(int variant, TESTSIZE dv, TESTSIZE ex, TESTSIZE nv, TESTSIZE eret, TESTSIZE edata, bool bv) { +static void plain_cmpxchg_test(int variant, TESTSIZE dv, TESTSIZE ex, TESTSIZE nv, TESTSIZE eret, TESTSIZE edata, bool bv) { + CmpxchgTester cmpxchg(variant, bv); TESTSIZE data = dv; - TESTSIZE ret = CmpxchgTester::base_cmpxchg(variant, (intptr_t)&data, ex, nv, /* dummy */ 67, bv); + TESTSIZE ret = cmpxchg.cmpxchg((intptr_t)&data, ex, nv); ASSERT_EQ(ret, eret); ASSERT_EQ(data, edata); } template -void run_plain_cmpxchg_tests() { - // Normal - plain_cmpxchg_test( 0 /* variant */ , 1337 /* start value*/, - 1337 /* expected */, 42 /* new value */, - 1337 /* return */ , 42 /* end value*/, false /* boolean ret*/); - - plain_cmpxchg_test( 0 /* variant */ , 1337 /* start value*/, - 1336 /* expected */, 42 /* new value */, - 1337 /* return */ , 1337 /* end value*/, false /* boolean ret*/); - - plain_cmpxchg_test( 0 /* variant */ , 1337 /* start value*/, - 1337 /* expected */, 42 /* new value */, - 1 /* return */ , 42 /* end value*/, true /* boolean ret*/); - - plain_cmpxchg_test( 0 /* variant */ , 1337 /* start value*/, - 1336 /* expected */, 42 /* new value */, - 0 /* return */ , 1337 /* end value*/, true /* boolean ret*/); - - // result == expected register - plain_cmpxchg_test( 1 /* variant */ , 1337 /* start value*/, - 1337 /* expected */, 42 /* new value */, - 1337 /* return */ , 42 /* end value*/, false /* boolean ret*/); - - plain_cmpxchg_test( 1 /* variant */ , 1337 /* start value*/, - 1336 /* expected */, 42 /* new value */, - 1337 /* return */ , 1337 /* end value*/, false /* boolean ret*/); - - plain_cmpxchg_test( 1 /* variant */ , 1337 /* start value*/, - 1337 /* expected */, 42 /* new value */, - 1 /* return */ , 42 /* end value*/, true /* boolean ret*/); - - plain_cmpxchg_test( 1 /* variant */ , 1337 /* start value*/, - 1336 /* expected */, 42 /* new value */, - 0 /* return */ , 1337 /* end value*/, true /* boolean ret*/); - - // new_value == result register - plain_cmpxchg_test( 2 /* variant */ , 1337 /* start value*/, - 1337 /* expected */, 42 /* new value */, - 1337 /* return */ , 42 /* end value*/, false /* boolean ret*/); - - plain_cmpxchg_test( 2 /* variant */ , 1337 /* start value*/, - 1336 /* expected */, 42 /* new value */, - 1337 /* return */ , 1337 /* end value*/, false /* boolean ret*/); - - plain_cmpxchg_test( 2 /* variant */ , 1337 /* start value*/, - 1337 /* expected */, 42 /* new value */, - 1 /* return */ , 42 /* end value*/, true /* boolean ret*/); - - plain_cmpxchg_test( 2 /* variant */ , 1337 /* start value*/, - 1336 /* expected */, 42 /* new value */, - 0 /* return */ , 1337 /* end value*/, true /* boolean ret*/); - - // expected == new_value register - plain_cmpxchg_test( 3 /* variant */ , 1337 /* start value*/, - 1337 /* expected */, 42 /* new value */, - 1337 /* return */ , 1337 /* end value*/, false /* boolean ret*/); - - plain_cmpxchg_test( 3 /* variant */ , 1337 /* start value*/, - 1336 /* expected */, 42 /* new value */, - 1337 /* return */ , 1337 /* end value*/, false /* boolean ret*/); - - plain_cmpxchg_test( 3 /* variant */ , 1337 /* start value*/, - 1337 /* expected */, 42 /* new value */, - 1 /* return */ , 1337 /* end value*/, true /* boolean ret*/); - - plain_cmpxchg_test( 3 /* variant */ , 1337 /* start value*/, - 1336 /* expected */, 42 /* new value */, - 0 /* return */ , 1337 /* end value*/, true /* boolean ret*/); +static void run_plain_cmpxchg_tests() { + TESTSIZE max = std::numeric_limits::max(); + TESTSIZE min = std::numeric_limits::min(); + TESTSIZE val[] = {1337, min, max}; + for (int i = 0; i < 3; i++) { + // Normal + plain_cmpxchg_test( 0 /* variant */ , val[i] /* start value */, + val[i] /* expected */, 42 /* new value */, + val[i] /* return */ , 42 /* end value*/, false /* boolean ret*/); + + plain_cmpxchg_test( 0 /* variant */ , val[i] /* start value */, + 1336 /* expected */, 42 /* new value */, + val[i] /* return */ , val[i] /* end value */, false /* boolean ret*/); + + plain_cmpxchg_test( 0 /* variant */ , val[i] /* start value */, + val[i] /* expected */, 42 /* new value */, + 1 /* return */ , 42 /* end value*/, true /* boolean ret*/); + + plain_cmpxchg_test( 0 /* variant */ , val[i] /* start value */, + 1336 /* expected */, 42 /* new value */, + 0 /* return */ , val[i] /* end value */, true /* boolean ret*/); + + // result == expected register + plain_cmpxchg_test( 1 /* variant */ , val[i] /* start value */, + val[i] /* expected */, 42 /* new value */, + val[i] /* return */ , 42 /* end value*/, false /* boolean ret*/); + + plain_cmpxchg_test( 1 /* variant */ , val[i] /* start value */, + 1336 /* expected */, 42 /* new value */, + val[i] /* return */ , val[i] /* end value */, false /* boolean ret*/); + + plain_cmpxchg_test( 1 /* variant */ , val[i] /* start value */, + val[i] /* expected */, 42 /* new value */, + 1 /* return */ , 42 /* end value*/, true /* boolean ret*/); + + plain_cmpxchg_test( 1 /* variant */ , val[i] /* start value */, + 1336 /* expected */, 42 /* new value */, + 0 /* return */ , val[i] /* end value */, true /* boolean ret*/); + + // new_value == result register + plain_cmpxchg_test( 2 /* variant */ , val[i] /* start value */, + val[i] /* expected */, 42 /* new value */, + val[i] /* return */ , 42 /* end value*/, false /* boolean ret*/); + + plain_cmpxchg_test( 2 /* variant */ , val[i] /* start value */, + 1336 /* expected */, 42 /* new value */, + val[i] /* return */ , val[i] /* end value */, false /* boolean ret*/); + + plain_cmpxchg_test( 2 /* variant */ , val[i] /* start value */, + val[i] /* expected */, 42 /* new value */, + 1 /* return */ , 42 /* end value*/, true /* boolean ret*/); + + plain_cmpxchg_test( 2 /* variant */ , val[i] /* start value */, + 1336 /* expected */, 42 /* new value */, + 0 /* return */ , val[i] /* end value */, true /* boolean ret*/); + + // expected == new_value register + plain_cmpxchg_test( 3 /* variant */ , val[i] /* start value */, + val[i] /* expected */, 42 /* new value */, + val[i] /* return */ , val[i] /* end value */, false /* boolean ret*/); + + plain_cmpxchg_test( 3 /* variant */ , val[i] /* start value */, + 1336 /* expected */, 42 /* new value */, + val[i] /* return */ , val[i] /* end value */, false /* boolean ret*/); + + plain_cmpxchg_test( 3 /* variant */ , val[i] /* start value */, + val[i] /* expected */, 42 /* new value */, + 1 /* return */ , val[i] /* end value */, true /* boolean ret*/); + + plain_cmpxchg_test( 3 /* variant */ , val[i] /* start value */, + 1336 /* expected */, 42 /* new value */, + 0 /* return */ , val[i] /* end value */, true /* boolean ret*/); + } } -TEST_VM(RiscV, cmpxchg_int64_plain_lr_sc) { +TEST_VM(RiscV, cmpxchg_int64_lr_sc) { bool zacas = UseZacas; UseZacas = false; run_plain_cmpxchg_tests(); UseZacas = zacas; } -TEST_VM(RiscV, cmpxchg_int64_plain_maybe_zacas) { +TEST_VM(RiscV, cmpxchg_int64_maybe_zacas) { if (UseZacas) { run_plain_cmpxchg_tests(); } } -TEST_VM(RiscV, cmpxchg_int32_plain_lr_sc) { +TEST_VM(RiscV, cmpxchg_int32_lr_sc) { bool zacas = UseZacas; UseZacas = false; run_plain_cmpxchg_tests(); UseZacas = zacas; } -TEST_VM(RiscV, cmpxchg_int32_plain_maybe_zacas) { +TEST_VM(RiscV, cmpxchg_int32_maybe_zacas) { if (UseZacas) { run_plain_cmpxchg_tests(); } } -template -class NarrowCmpxchgTester { - public: - typedef TESTSIZE (*cmpxchg_func)(intptr_t addr, TESTSIZE expected, TESTSIZE new_value, TESTSIZE result, - int64_t scratch0, int64_t scratch1, int64_t scratch2); +TEST_VM(RiscV, cmpxchg_uint32_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_plain_cmpxchg_tests(); + UseZacas = zacas; +} - static TESTSIZE narrow_cmpxchg(intptr_t addr, TESTSIZE expected, TESTSIZE new_value, TESTSIZE result, bool boolean_result = false) { - BufferBlob* bb = BufferBlob::create("riscvTest", 128); - CodeBuffer code(bb); - MacroAssembler _masm(&code); - address entry = _masm.pc(); - { - _masm.cmpxchg_narrow_value(/*addr*/ c_rarg0, /*expected*/ c_rarg1, /*new_value*/c_rarg2, - ASMSIZE, Assembler::relaxed, Assembler::relaxed, - /*result*/ c_rarg3, boolean_result, c_rarg4, c_rarg5, c_rarg6); /* Uses also t0-t1, caller saved */ - _masm.mv(c_rarg0, c_rarg3); - _masm.ret(); - } - _masm.flush(); // icache invalidate - TESTSIZE ret = ((cmpxchg_func)entry)(addr, expected, new_value, result, -1, -1, -1); - BufferBlob::free(bb); - return ret; +TEST_VM(RiscV, cmpxchg_uint32_maybe_zacas) { + if (UseZacas) { + run_plain_cmpxchg_tests(); } -}; +} template -void run_narrow_cmpxchg_tests() { +static void run_narrow_cmpxchg_tests() { + CmpxchgTester cmpxchg(0, false); + CmpxchgTester cmpxchg_bool(0, true); // Assume natural aligned TESTSIZE data[8]; TESTSIZE ret; - for (int i = 0; i < 7; i++) { - memset(data, -1, sizeof(data)); - - data[i] = 121; - ret = NarrowCmpxchgTester::narrow_cmpxchg((intptr_t)&data[i], 121, 42, /* result */ 67, false); - ASSERT_EQ(ret, 121); - ASSERT_EQ(data[i], 42); - - data[i] = 121; - ret = NarrowCmpxchgTester::narrow_cmpxchg((intptr_t)&data[i], 120, 42, /* result */ 67, false); - ASSERT_EQ(ret, 121); - ASSERT_EQ(data[i], 121); - - data[i] = 121; - ret = NarrowCmpxchgTester::narrow_cmpxchg((intptr_t)&data[i], 121, 42, /* result */ 67, true); - ASSERT_EQ(ret, 1); - ASSERT_EQ(data[i], 42); - - data[i] = 121; - ret = NarrowCmpxchgTester::narrow_cmpxchg((intptr_t)&data[i], 120, 42, /* result */ 67, true); - ASSERT_EQ(ret, 0); - ASSERT_EQ(data[i], 121); + TESTSIZE max = std::numeric_limits::max(); + TESTSIZE min = std::numeric_limits::min(); + TESTSIZE val[] = {121, min, max}; + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 7; j++) { + // printf("%lu %lX\n", (uint64_t)val[i], (uint64_t)val[i]); + memset(data, -1, sizeof(data)); + data[i] = val[i]; + ret = cmpxchg.cmpxchg((intptr_t)&data[i], val[i], 42); + ASSERT_EQ(ret, val[i]); + ASSERT_EQ(data[i], 42); + + data[i] = val[i]; + ret = cmpxchg.cmpxchg((intptr_t)&data[i], 120, 42); + ASSERT_EQ(ret, val[i]); + ASSERT_EQ(data[i], val[i]); + + data[i] = val[i]; + ret = cmpxchg_bool.cmpxchg((intptr_t)&data[i], val[i], 42); + ASSERT_EQ(ret, 1); + ASSERT_EQ(data[i], 42); + + data[i] = val[i]; + ret = cmpxchg_bool.cmpxchg((intptr_t)&data[i], 120, 42); + ASSERT_EQ(ret, 0); + ASSERT_EQ(data[i], val[i]); + } } } @@ -322,6 +354,12 @@ TEST_VM(RiscV, cmpxchg_int16_lr_sc) { UseZacas = zacas; } +TEST_VM(RiscV, cmpxchg_int16_maybe_zacas) { + if (UseZacas) { + run_narrow_cmpxchg_tests(); + } +} + TEST_VM(RiscV, cmpxchg_int8_lr_sc) { bool zacas = UseZacas; UseZacas = false; @@ -329,144 +367,392 @@ TEST_VM(RiscV, cmpxchg_int8_lr_sc) { UseZacas = zacas; } -TEST_VM(RiscV, cmpxchg_int16_maybe_zacas) { +TEST_VM(RiscV, cmpxchg_int8_maybe_zacas) { if (UseZacas) { - run_narrow_cmpxchg_tests(); + run_narrow_cmpxchg_tests(); } } -TEST_VM(RiscV, cmpxchg_int8_maybe_zacas) { +template +TESTSIZE next_count(TESTSIZE now, TESTSIZE add) { + if ((std::numeric_limits::max() - add) >= now) { + return now + add; + } + TESTSIZE diff = std::numeric_limits::max() - now; + add -= diff + 1; // add one to the diff for the wrap around. + return std::numeric_limits::min() + add; +} + +constexpr int64_t PAR_IT_END = 10000; +constexpr int64_t NUMBER_THREADS = 4; +constexpr int64_t TOTAL_ITERATIONS = NUMBER_THREADS * PAR_IT_END; + +template ::max() <= (std::numeric_limits::min() + TOTAL_ITERATIONS))> +constexpr TESTSIZE result_count() { + int64_t range = std::numeric_limits::max() - std::numeric_limits::min() + 1; + int64_t rest = TOTAL_ITERATIONS % range; + return std::numeric_limits::min() + rest; +} + +template ::max() > (std::numeric_limits::min() + TOTAL_ITERATIONS))> +constexpr TESTSIZE result_count() { + return std::numeric_limits::min() + TOTAL_ITERATIONS; +} + +template +static void run_concurrent_cmpxchg_tests() { + volatile TESTSIZE data = std::numeric_limits::min(); + int num_threads = NUMBER_THREADS; + CmpxchgTester cmpxchg(0, false); // variant 0, not bool ret + auto incThread = [&](Thread* _current, int _id) { // _id starts from 0..(CTHREAD-1) + TESTSIZE my_oldvalue = std::numeric_limits::min() + _id; + for (int64_t i = 0; i < PAR_IT_END ; i++) { + TESTSIZE newvalue = next_count(my_oldvalue, 1); + TESTSIZE ret; + do { + ret = cmpxchg.cmpxchg((intptr_t)&data, my_oldvalue, newvalue); + } while (ret != my_oldvalue); + my_oldvalue = next_count(my_oldvalue, num_threads); + } + }; + TestThreadGroup ttg(incThread, num_threads); + ttg.doit(); + ttg.join(); + ASSERT_EQ(data, result_count()); +} + +template +static void run_concurrent_alt_cmpxchg_tests() { + volatile TESTSIZE data = std::numeric_limits::min(); + int num_threads = NUMBER_THREADS; + CmpxchgTester cmpxchg(0, false); // variant 0, not bool ret + auto incThread = [&](Thread* _current, int _id) { // _id starts from 0..(CTHREAD-1) + for (int i = 0; i < PAR_IT_END; i++) { + TESTSIZE oldvalue; + TESTSIZE ret = 0; + do { + oldvalue = ret; + TESTSIZE newvalue = next_count(oldvalue, 1); + ret = cmpxchg.cmpxchg((intptr_t)&data, oldvalue, newvalue); + } while (ret != oldvalue); + } + }; + TestThreadGroup ttg(incThread, num_threads); + ttg.doit(); + ttg.join(); + ASSERT_EQ(data, result_count()); +} + +TEST_VM(RiscV, cmpxchg_int64_concurrent_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_concurrent_cmpxchg_tests(); + run_concurrent_alt_cmpxchg_tests(); + UseZacas = zacas; +} + +TEST_VM(RiscV, cmpxchg_int64_concurrent_maybe_zacas) { if (UseZacas) { - run_narrow_cmpxchg_tests(); + run_concurrent_cmpxchg_tests(); + run_concurrent_alt_cmpxchg_tests(); + } +} + +TEST_VM(RiscV, cmpxchg_int32_concurrent_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_concurrent_cmpxchg_tests(); + run_concurrent_alt_cmpxchg_tests(); + UseZacas = zacas; +} + +TEST_VM(RiscV, cmpxchg_int32_concurrent_maybe_zacas) { + if (UseZacas) { + run_concurrent_cmpxchg_tests(); + run_concurrent_alt_cmpxchg_tests(); + } +} + +TEST_VM(RiscV, cmpxchg_uint32_concurrent_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_concurrent_cmpxchg_tests(); + run_concurrent_alt_cmpxchg_tests(); + UseZacas = zacas; +} + +TEST_VM(RiscV, cmpxchg_uint32_concurrent_maybe_zacas) { + if (UseZacas) { + run_concurrent_cmpxchg_tests(); + run_concurrent_alt_cmpxchg_tests(); + } +} + +TEST_VM(RiscV, cmpxchg_int16_concurrent_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_concurrent_cmpxchg_tests(); + run_concurrent_alt_cmpxchg_tests(); + UseZacas = zacas; +} + +TEST_VM(RiscV, cmpxchg_int16_concurrent_maybe_zacas) { + if (UseZacas) { + run_concurrent_cmpxchg_tests(); + run_concurrent_alt_cmpxchg_tests(); + } +} + +TEST_VM(RiscV, cmpxchg_int8_concurrent_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_concurrent_cmpxchg_tests(); + run_concurrent_alt_cmpxchg_tests(); + UseZacas = zacas; +} + +TEST_VM(RiscV, cmpxchg_int8_concurrent_maybe_zacas) { + if (UseZacas) { + run_concurrent_cmpxchg_tests(); + run_concurrent_alt_cmpxchg_tests(); } } template class WeakCmpxchgTester { - public: - typedef TESTSIZE (*cmpxchg_narrow)(intptr_t addr, TESTSIZE expected, TESTSIZE new_value, TESTSIZE result, + // The functions expect arguments to be type represented, not C-ABI argument representation. + // Hence an unsigned should be zero-extended, and the same goes for the return value. + typedef int64_t (*weak_cmpxchg_narrow_func)(intptr_t addr, int64_t expected, int64_t new_value, int64_t result, int64_t scratch0, int64_t scratch1, int64_t scratch2); - typedef TESTSIZE (*cmpxchg_func)(intptr_t addr, TESTSIZE expected, TESTSIZE new_value, TESTSIZE result); + typedef int64_t (*weak_cmpxchg_func)(intptr_t addr, int64_t expected, int64_t new_value, int64_t result); - static TESTSIZE weak_narrow_cmpxchg(intptr_t addr, TESTSIZE expected, TESTSIZE new_value) { - BufferBlob* bb = BufferBlob::create("riscvTest", 128); - CodeBuffer code(bb); + BufferBlob* _bb; + weak_cmpxchg_narrow_func _narrow_weak; + weak_cmpxchg_func _weak; + + public: + WeakCmpxchgTester() : _bb(nullptr), _narrow_weak(nullptr), _weak(nullptr) { + _bb = BufferBlob::create("riscvTest", 128); + CodeBuffer code(_bb); MacroAssembler _masm(&code); - address entry = _masm.pc(); - { + if (ASMSIZE == Assembler::int8 || ASMSIZE == Assembler::int16) { + address entry = _masm.pc(); _masm.weak_cmpxchg_narrow_value(/*addr*/ c_rarg0, /*expected*/ c_rarg1, /*new_value*/ c_rarg2, ASMSIZE, Assembler::relaxed, Assembler::relaxed, /*result*/ c_rarg3, c_rarg4, c_rarg5, c_rarg6); /* Uses also t0-t1, caller saved */ _masm.mv(c_rarg0, c_rarg3); _masm.ret(); - } - _masm.flush(); // icache invalidate - TESTSIZE ret = ((cmpxchg_narrow)entry)(addr, expected, new_value, /*result*/ 67, -1, -1, -1); - BufferBlob::free(bb); - return ret; - } - - static TESTSIZE weak_cmpxchg(intptr_t addr, TESTSIZE expected, TESTSIZE new_value) { - BufferBlob* bb = BufferBlob::create("riscvTest", 128); - CodeBuffer code(bb); - MacroAssembler _masm(&code); - address entry = _masm.pc(); - { + _narrow_weak = ((weak_cmpxchg_narrow_func)entry); + } else { + address entry = _masm.pc(); _masm.weak_cmpxchg(/*addr*/ c_rarg0, /*expected*/ c_rarg1, /*new_value*/ c_rarg2, ASMSIZE, Assembler::relaxed, Assembler::relaxed, /*result*/ c_rarg3); _masm.mv(c_rarg0, c_rarg3); _masm.ret(); + _weak = ((weak_cmpxchg_func)entry); } _masm.flush(); // icache invalidate - TESTSIZE ret = ((cmpxchg_func)entry)(addr, expected, new_value, /*result*/ 67); - BufferBlob::free(bb); - return ret; + } + + TESTSIZE weak_cmpxchg(intptr_t addr, TESTSIZE expected, TESTSIZE new_value) { + if (ASMSIZE == Assembler::int8 || ASMSIZE == Assembler::int16) { + return _narrow_weak(addr, expected, new_value, /* dummy result */ 67, -1, -1, -1); + } else { + return _weak(addr, expected, new_value, /* dummy result */ 67); + } + } + + ~WeakCmpxchgTester() { + BufferBlob::free(_bb); } }; template -void run_weak_cmpxchg_narrow_value_tests() { - // Assume natural aligned - TESTSIZE data[8]; - TESTSIZE ret; - for (int i = 0; i < 7; i++) { - memset(data, -1, sizeof(data)); - - data[i] = 121; - ret = WeakCmpxchgTester::weak_narrow_cmpxchg((intptr_t)&data[i], 121, 42); - ASSERT_EQ(ret, 1); - ASSERT_EQ(data[i], 42); - - data[i] = 121; - ret = WeakCmpxchgTester::weak_narrow_cmpxchg((intptr_t)&data[i], 120, 42); - ASSERT_EQ(ret, 0); - ASSERT_EQ(data[i], 121); +void run_weak_cmpxchg_tests() { + TESTSIZE max = std::numeric_limits::max(); + TESTSIZE min = std::numeric_limits::min(); + TESTSIZE val[] = {121, min, max}; + for (int i = 0; i < 3; i++) { + WeakCmpxchgTester cmpxchg; + TESTSIZE data = val[i]; + TESTSIZE ret = cmpxchg.weak_cmpxchg((intptr_t)&data, val[i], 42); + ASSERT_EQ(ret, (TESTSIZE)1); + ASSERT_EQ(data, (TESTSIZE)42); + + data = val[i]; + ret = cmpxchg.weak_cmpxchg((intptr_t)&data, 120, 42); + ASSERT_EQ(ret, (TESTSIZE)0); + ASSERT_EQ(data, (TESTSIZE)val[i]); + } +} + +TEST_VM(RiscV, weak_cmpxchg_int64_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_weak_cmpxchg_tests(); + UseZacas = zacas; +} + +TEST_VM(RiscV, weak_cmpxchg_int64_maybe_zacas) { + if (UseZacas) { + run_weak_cmpxchg_tests(); + } +} + +TEST_VM(RiscV, weak_cmpxchg_int32_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_weak_cmpxchg_tests(); + UseZacas = zacas; +} + +TEST_VM(RiscV, weak_cmpxchg_int32_maybe_zacas) { + if (UseZacas) { + run_weak_cmpxchg_tests(); + } +} + +TEST_VM(RiscV, weak_cmpxchg_uint32_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_weak_cmpxchg_tests(); + UseZacas = zacas; +} + +TEST_VM(RiscV, weak_cmpxchg_uint32_maybe_zacas) { + if (UseZacas) { + run_weak_cmpxchg_tests(); } } TEST_VM(RiscV, weak_cmpxchg_int16_lr_sc) { bool zacas = UseZacas; UseZacas = false; - run_weak_cmpxchg_narrow_value_tests(); + run_weak_cmpxchg_tests(); UseZacas = zacas; } TEST_VM(RiscV, weak_cmpxchg_int8_lr_sc) { bool zacas = UseZacas; UseZacas = false; - run_weak_cmpxchg_narrow_value_tests(); + run_weak_cmpxchg_tests(); UseZacas = zacas; } TEST_VM(RiscV, weak_cmpxchg_int16_maybe_zacas) { if (UseZacas) { - run_weak_cmpxchg_narrow_value_tests(); + run_weak_cmpxchg_tests(); } } TEST_VM(RiscV, weak_cmpxchg_int8_maybe_zacas) { if (UseZacas) { - run_weak_cmpxchg_narrow_value_tests(); + run_weak_cmpxchg_tests(); } } template -void run_weak_cmpxchg_tests() { - TESTSIZE data = 121; - TESTSIZE ret = WeakCmpxchgTester::weak_cmpxchg((intptr_t)&data, 121, 42); - ASSERT_EQ(ret, 1); - ASSERT_EQ(data, 42); +static void run_concurrent_weak_cmpxchg_tests() { + volatile TESTSIZE data = std::numeric_limits::min(); + int num_threads = NUMBER_THREADS; + WeakCmpxchgTester cmpxchg; // not bool ret + auto incThread = [&](Thread* _current, int _id) { // _id starts from 0..(CTHREAD-1) + TESTSIZE my_oldvalue = std::numeric_limits::min() + _id; + for (int64_t i = 0; i < PAR_IT_END; i++) { + TESTSIZE newvalue = next_count(my_oldvalue, 1); + TESTSIZE ret; + do { + ret = cmpxchg.weak_cmpxchg((intptr_t)&data, my_oldvalue, newvalue); + } while (ret != 1); + my_oldvalue = next_count(my_oldvalue, num_threads); + } + }; + TestThreadGroup ttg(incThread, num_threads); + ttg.doit(); + ttg.join(); + ASSERT_EQ(data, result_count()); +} - data = 121; - ret = WeakCmpxchgTester::weak_cmpxchg((intptr_t)&data, 120, 42); - ASSERT_EQ(ret, 0); - ASSERT_EQ(data, 121); +template +static void run_concurrent_alt_weak_cmpxchg_tests() { + volatile TESTSIZE data = std::numeric_limits::min(); + int num_threads = NUMBER_THREADS; + WeakCmpxchgTester cmpxchg; // not bool ret + auto incThread = [&](Thread* _current, int _id) { // _id starts from 0..(CTHREAD-1) + for (int i = 0; i < PAR_IT_END; i++) { + TESTSIZE oldvalue; + TESTSIZE ret = 0; + do { + oldvalue = data; + TESTSIZE newvalue = next_count(oldvalue, 1); + ret = cmpxchg.weak_cmpxchg((intptr_t)&data, oldvalue, newvalue); + } while (ret != 1); + } + }; + TestThreadGroup ttg(incThread, num_threads); + ttg.doit(); + ttg.join(); + ASSERT_EQ(data, result_count()); } -TEST_VM(RiscV, weak_cmpxchg_int64_lr_sc) { +TEST_VM(RiscV, weak_cmpxchg_int64_concurrent_lr_sc) { bool zacas = UseZacas; UseZacas = false; - run_weak_cmpxchg_tests(); + run_concurrent_weak_cmpxchg_tests(); + run_concurrent_alt_weak_cmpxchg_tests(); UseZacas = zacas; } -TEST_VM(RiscV, weak_cmpxchg_int64_maybe_zacas) { +TEST_VM(RiscV, weak_cmpxchg_int64_concurrent_maybe_zacas) { if (UseZacas) { - run_weak_cmpxchg_tests(); + run_concurrent_weak_cmpxchg_tests(); + run_concurrent_alt_weak_cmpxchg_tests(); } } -TEST_VM(RiscV, weak_cmpxchg_int32_lr_sc) { +TEST_VM(RiscV, weak_cmpxchg_int32_concurrent_lr_sc) { bool zacas = UseZacas; UseZacas = false; - run_weak_cmpxchg_tests(); + run_concurrent_weak_cmpxchg_tests(); + run_concurrent_alt_weak_cmpxchg_tests(); UseZacas = zacas; } -TEST_VM(RiscV, weak_cmpxchg_int32_maybe_zacas) { +TEST_VM(RiscV, weak_cmpxchg_int32_concurrent_maybe_zacas) { if (UseZacas) { - run_weak_cmpxchg_tests(); + run_concurrent_weak_cmpxchg_tests(); + run_concurrent_alt_weak_cmpxchg_tests(); + } +} + +TEST_VM(RiscV, weak_cmpxchg_int16_concurrent_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_concurrent_weak_cmpxchg_tests(); + run_concurrent_alt_weak_cmpxchg_tests(); + UseZacas = zacas; +} + +TEST_VM(RiscV, weak_cmpxchg_int16_concurrent_maybe_zacas) { + if (UseZacas) { + run_concurrent_weak_cmpxchg_tests(); + run_concurrent_alt_weak_cmpxchg_tests(); + } +} + +TEST_VM(RiscV, weak_cmpxchg_int8_concurrent_lr_sc) { + bool zacas = UseZacas; + UseZacas = false; + run_concurrent_weak_cmpxchg_tests(); + run_concurrent_alt_weak_cmpxchg_tests(); + UseZacas = zacas; +} + +TEST_VM(RiscV, weak_cmpxchg_int8_concurrent_maybe_zacas) { + if (UseZacas) { + run_concurrent_weak_cmpxchg_tests(); + run_concurrent_alt_weak_cmpxchg_tests(); } } From 32c8195c3acce2d220829bf5b81e3cef907fff3c Mon Sep 17 00:00:00 2001 From: Christian Hagedorn Date: Mon, 16 Dec 2024 09:53:38 +0000 Subject: [PATCH 38/93] 8345801: C2: Clean up include statements to speed up compilation when touching type.hpp Reviewed-by: kvn, dlong, jwaters --- src/hotspot/cpu/x86/c2_intelJccErratum_x86.cpp | 1 - src/hotspot/share/c1/c1_Compilation.hpp | 2 -- src/hotspot/share/c1/c1_FrameMap.hpp | 2 -- src/hotspot/share/c1/c1_GraphBuilder.cpp | 4 ---- src/hotspot/share/c1/c1_IR.hpp | 2 -- src/hotspot/share/c1/c1_LIRAssembler.cpp | 1 - src/hotspot/share/c1/c1_LIRGenerator.hpp | 2 -- src/hotspot/share/c1/c1_Optimizer.cpp | 2 -- src/hotspot/share/c1/c1_RangeCheckElimination.cpp | 4 ---- src/hotspot/share/c1/c1_Runtime1.cpp | 5 ----- src/hotspot/share/c1/c1_Runtime1.hpp | 1 - src/hotspot/share/c1/c1_ValueMap.cpp | 2 +- src/hotspot/share/c1/c1_ValueSet.hpp | 2 -- src/hotspot/share/c1/c1_ValueType.hpp | 2 -- src/hotspot/share/ci/ciTypeFlow.cpp | 1 - src/hotspot/share/classfile/vmIntrinsics.cpp | 4 +++- src/hotspot/share/code/compiledIC.hpp | 1 - src/hotspot/share/code/vtableStubs.cpp | 3 --- src/hotspot/share/compiler/compilerDefinitions.inline.hpp | 2 -- src/hotspot/share/compiler/compilerDirectives.hpp | 2 -- src/hotspot/share/interpreter/interpreterRuntime.cpp | 3 --- src/hotspot/share/opto/c2compiler.hpp | 7 ++++++- src/hotspot/share/opto/compile.hpp | 6 ++---- src/hotspot/share/opto/library_call.cpp | 1 + src/hotspot/share/opto/mathexactnode.hpp | 3 --- src/hotspot/share/opto/node.hpp | 4 ++++ src/hotspot/share/opto/output.cpp | 5 ----- src/hotspot/share/opto/output.hpp | 5 ----- src/hotspot/share/opto/runtime.hpp | 2 -- src/hotspot/share/runtime/vframeArray.cpp | 3 --- src/hotspot/share/runtime/vframe_hp.cpp | 4 ---- 31 files changed, 17 insertions(+), 71 deletions(-) diff --git a/src/hotspot/cpu/x86/c2_intelJccErratum_x86.cpp b/src/hotspot/cpu/x86/c2_intelJccErratum_x86.cpp index e03e04339a1..f726a831c9f 100644 --- a/src/hotspot/cpu/x86/c2_intelJccErratum_x86.cpp +++ b/src/hotspot/cpu/x86/c2_intelJccErratum_x86.cpp @@ -25,7 +25,6 @@ #include "precompiled.hpp" #include "asm/macroAssembler.hpp" #include "c2_intelJccErratum_x86.hpp" -#include "opto/cfgnode.hpp" #include "opto/compile.hpp" #include "opto/machnode.hpp" #include "opto/node.hpp" diff --git a/src/hotspot/share/c1/c1_Compilation.hpp b/src/hotspot/share/c1/c1_Compilation.hpp index 0ac0a4d4169..5f554496f93 100644 --- a/src/hotspot/share/c1/c1_Compilation.hpp +++ b/src/hotspot/share/c1/c1_Compilation.hpp @@ -30,8 +30,6 @@ #include "code/exceptionHandlerTable.hpp" #include "compiler/compiler_globals.hpp" #include "compiler/compilerDefinitions.inline.hpp" -#include "compiler/compilerDirectives.hpp" -#include "memory/resourceArea.hpp" #include "runtime/deoptimization.hpp" class CompilationFailureInfo; diff --git a/src/hotspot/share/c1/c1_FrameMap.hpp b/src/hotspot/share/c1/c1_FrameMap.hpp index 2a7533e499f..1fd7dd3edff 100644 --- a/src/hotspot/share/c1/c1_FrameMap.hpp +++ b/src/hotspot/share/c1/c1_FrameMap.hpp @@ -25,13 +25,11 @@ #ifndef SHARE_C1_C1_FRAMEMAP_HPP #define SHARE_C1_C1_FRAMEMAP_HPP -#include "asm/macroAssembler.hpp" #include "c1/c1_Defs.hpp" #include "c1/c1_LIR.hpp" #include "code/vmreg.hpp" #include "memory/allocation.hpp" #include "runtime/frame.hpp" -#include "runtime/synchronizer.hpp" #include "utilities/globalDefinitions.hpp" #include "utilities/macros.hpp" diff --git a/src/hotspot/share/c1/c1_GraphBuilder.cpp b/src/hotspot/share/c1/c1_GraphBuilder.cpp index 0179923bc30..9925c592f6f 100644 --- a/src/hotspot/share/c1/c1_GraphBuilder.cpp +++ b/src/hotspot/share/c1/c1_GraphBuilder.cpp @@ -41,12 +41,8 @@ #include "interpreter/bytecode.hpp" #include "jfr/jfrEvents.hpp" #include "memory/resourceArea.hpp" -#include "oops/oop.inline.hpp" #include "runtime/sharedRuntime.hpp" -#include "runtime/vm_version.hpp" -#include "utilities/bitMap.inline.hpp" #include "utilities/checkedCast.hpp" -#include "utilities/powerOfTwo.hpp" #include "utilities/macros.hpp" #if INCLUDE_JFR #include "jfr/jfr.hpp" diff --git a/src/hotspot/share/c1/c1_IR.hpp b/src/hotspot/share/c1/c1_IR.hpp index 48286315df8..9dfcb8419c3 100644 --- a/src/hotspot/share/c1/c1_IR.hpp +++ b/src/hotspot/share/c1/c1_IR.hpp @@ -27,8 +27,6 @@ #include "c1/c1_Instruction.hpp" #include "ci/ciExceptionHandler.hpp" -#include "ci/ciMethod.hpp" -#include "ci/ciStreams.hpp" #include "memory/allocation.hpp" // An XHandler is a C1 internal description for an exception handler diff --git a/src/hotspot/share/c1/c1_LIRAssembler.cpp b/src/hotspot/share/c1/c1_LIRAssembler.cpp index 51fb851d00c..0fa4b3a4c93 100644 --- a/src/hotspot/share/c1/c1_LIRAssembler.cpp +++ b/src/hotspot/share/c1/c1_LIRAssembler.cpp @@ -30,7 +30,6 @@ #include "c1/c1_LIRAssembler.hpp" #include "c1/c1_MacroAssembler.hpp" #include "c1/c1_ValueStack.hpp" -#include "ci/ciInstance.hpp" #include "compiler/compilerDefinitions.inline.hpp" #include "compiler/oopMap.hpp" #include "runtime/os.hpp" diff --git a/src/hotspot/share/c1/c1_LIRGenerator.hpp b/src/hotspot/share/c1/c1_LIRGenerator.hpp index 518cd5fa5e7..a66758054d7 100644 --- a/src/hotspot/share/c1/c1_LIRGenerator.hpp +++ b/src/hotspot/share/c1/c1_LIRGenerator.hpp @@ -28,9 +28,7 @@ #include "c1/c1_Decorators.hpp" #include "c1/c1_Instruction.hpp" #include "c1/c1_LIR.hpp" -#include "ci/ciMethodData.hpp" #include "gc/shared/barrierSet.hpp" -#include "jfr/support/jfrIntrinsics.hpp" #include "utilities/macros.hpp" #include "utilities/sizes.hpp" diff --git a/src/hotspot/share/c1/c1_Optimizer.cpp b/src/hotspot/share/c1/c1_Optimizer.cpp index dd428a5895b..d33e4d28bd0 100644 --- a/src/hotspot/share/c1/c1_Optimizer.cpp +++ b/src/hotspot/share/c1/c1_Optimizer.cpp @@ -23,9 +23,7 @@ */ #include "precompiled.hpp" -#include "c1/c1_Canonicalizer.hpp" #include "c1/c1_Optimizer.hpp" -#include "c1/c1_ValueMap.hpp" #include "c1/c1_ValueSet.hpp" #include "c1/c1_ValueStack.hpp" #include "memory/resourceArea.hpp" diff --git a/src/hotspot/share/c1/c1_RangeCheckElimination.cpp b/src/hotspot/share/c1/c1_RangeCheckElimination.cpp index c2397d4a399..a4c2976d26f 100644 --- a/src/hotspot/share/c1/c1_RangeCheckElimination.cpp +++ b/src/hotspot/share/c1/c1_RangeCheckElimination.cpp @@ -26,13 +26,9 @@ #include "c1/c1_ValueStack.hpp" #include "c1/c1_RangeCheckElimination.hpp" #include "c1/c1_IR.hpp" -#include "c1/c1_Canonicalizer.hpp" -#include "c1/c1_ValueMap.hpp" #include "ci/ciMethodData.hpp" #include "runtime/deoptimization.hpp" -#ifdef ASSERT #include "utilities/bitMap.inline.hpp" -#endif // Macros for the Trace and the Assertion flag #ifdef ASSERT diff --git a/src/hotspot/share/c1/c1_Runtime1.cpp b/src/hotspot/share/c1/c1_Runtime1.cpp index 3ebd1f42f36..4ef2f8f3b0a 100644 --- a/src/hotspot/share/c1/c1_Runtime1.cpp +++ b/src/hotspot/share/c1/c1_Runtime1.cpp @@ -26,7 +26,6 @@ #include "asm/codeBuffer.hpp" #include "c1/c1_CodeStubs.hpp" #include "c1/c1_Defs.hpp" -#include "c1/c1_FrameMap.hpp" #include "c1/c1_LIRAssembler.hpp" #include "c1/c1_MacroAssembler.hpp" #include "c1/c1_Runtime1.hpp" @@ -35,7 +34,6 @@ #include "classfile/vmSymbols.hpp" #include "code/codeBlob.hpp" #include "code/compiledIC.hpp" -#include "code/pcDesc.hpp" #include "code/scopeDesc.hpp" #include "code/vtableStubs.hpp" #include "compiler/compilationPolicy.hpp" @@ -48,12 +46,10 @@ #include "interpreter/interpreter.hpp" #include "jfr/support/jfrIntrinsics.hpp" #include "logging/log.hpp" -#include "memory/allocation.inline.hpp" #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.hpp" #include "oops/access.inline.hpp" -#include "oops/klass.inline.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/objArrayKlass.hpp" #include "oops/oop.inline.hpp" @@ -67,7 +63,6 @@ #include "runtime/sharedRuntime.hpp" #include "runtime/stackWatermarkSet.hpp" #include "runtime/stubRoutines.hpp" -#include "runtime/threadCritical.hpp" #include "runtime/vframe.inline.hpp" #include "runtime/vframeArray.hpp" #include "runtime/vm_version.hpp" diff --git a/src/hotspot/share/c1/c1_Runtime1.hpp b/src/hotspot/share/c1/c1_Runtime1.hpp index 6aed71fdfe5..5f1ae4333bc 100644 --- a/src/hotspot/share/c1/c1_Runtime1.hpp +++ b/src/hotspot/share/c1/c1_Runtime1.hpp @@ -29,7 +29,6 @@ #include "code/stubs.hpp" #include "interpreter/interpreter.hpp" #include "memory/allStatic.hpp" -#include "runtime/deoptimization.hpp" #include "runtime/stubDeclarations.hpp" class StubAssembler; diff --git a/src/hotspot/share/c1/c1_ValueMap.cpp b/src/hotspot/share/c1/c1_ValueMap.cpp index e7993a8db5b..d9e1e11a3b8 100644 --- a/src/hotspot/share/c1/c1_ValueMap.cpp +++ b/src/hotspot/share/c1/c1_ValueMap.cpp @@ -23,11 +23,11 @@ */ #include "precompiled.hpp" -#include "c1/c1_Canonicalizer.hpp" #include "c1/c1_IR.hpp" #include "c1/c1_ValueMap.hpp" #include "c1/c1_ValueSet.hpp" #include "c1/c1_ValueStack.hpp" +#include "utilities/bitMap.inline.hpp" #ifndef PRODUCT diff --git a/src/hotspot/share/c1/c1_ValueSet.hpp b/src/hotspot/share/c1/c1_ValueSet.hpp index afd8d081dc5..442261def0a 100644 --- a/src/hotspot/share/c1/c1_ValueSet.hpp +++ b/src/hotspot/share/c1/c1_ValueSet.hpp @@ -26,9 +26,7 @@ #define SHARE_C1_C1_VALUESET_HPP #include "c1/c1_Instruction.hpp" -#include "memory/allocation.hpp" #include "utilities/bitMap.hpp" -#include "utilities/bitMap.inline.hpp" // A ValueSet is a simple abstraction on top of a BitMap representing // a set of Instructions. Currently it assumes that the number of diff --git a/src/hotspot/share/c1/c1_ValueType.hpp b/src/hotspot/share/c1/c1_ValueType.hpp index 488b3372518..62757ddc1a1 100644 --- a/src/hotspot/share/c1/c1_ValueType.hpp +++ b/src/hotspot/share/c1/c1_ValueType.hpp @@ -26,8 +26,6 @@ #define SHARE_C1_C1_VALUETYPE_HPP #include "c1/c1_Compilation.hpp" -#include "ci/ciConstant.hpp" -#include "ci/ciMethodData.hpp" // type hierarchy class ValueType; diff --git a/src/hotspot/share/ci/ciTypeFlow.cpp b/src/hotspot/share/ci/ciTypeFlow.cpp index 942b866eb51..36b4a2991cc 100644 --- a/src/hotspot/share/ci/ciTypeFlow.cpp +++ b/src/hotspot/share/ci/ciTypeFlow.cpp @@ -38,7 +38,6 @@ #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" #include "opto/compile.hpp" -#include "opto/node.hpp" #include "runtime/deoptimization.hpp" #include "utilities/growableArray.hpp" diff --git a/src/hotspot/share/classfile/vmIntrinsics.cpp b/src/hotspot/share/classfile/vmIntrinsics.cpp index 5e352e42efb..407cdafaf20 100644 --- a/src/hotspot/share/classfile/vmIntrinsics.cpp +++ b/src/hotspot/share/classfile/vmIntrinsics.cpp @@ -28,10 +28,12 @@ #include "compiler/compilerDirectives.hpp" #include "jvm_constants.h" #include "jvm_io.h" +#ifdef COMPILER2 +#include "opto/c2_globals.hpp" +#endif #include "runtime/vm_version.hpp" #include "utilities/checkedCast.hpp" #include "utilities/tribool.hpp" -#include "utilities/xmlstream.hpp" // These are flag-matching functions: inline bool match_F_R(jshort flags) { diff --git a/src/hotspot/share/code/compiledIC.hpp b/src/hotspot/share/code/compiledIC.hpp index 22b93c1760a..37ca090fa9c 100644 --- a/src/hotspot/share/code/compiledIC.hpp +++ b/src/hotspot/share/code/compiledIC.hpp @@ -28,7 +28,6 @@ #include "code/nativeInst.hpp" #include "interpreter/linkResolver.hpp" #include "runtime/safepointVerifiers.hpp" -#include "opto/c2_MacroAssembler.hpp" //----------------------------------------------------------------------------- // The CompiledIC represents a compiled inline cache. diff --git a/src/hotspot/share/code/vtableStubs.cpp b/src/hotspot/share/code/vtableStubs.cpp index aa9319db63b..6a0c52ae828 100644 --- a/src/hotspot/share/code/vtableStubs.cpp +++ b/src/hotspot/share/code/vtableStubs.cpp @@ -40,9 +40,6 @@ #include "runtime/sharedRuntime.hpp" #include "utilities/align.hpp" #include "utilities/powerOfTwo.hpp" -#ifdef COMPILER2 -#include "opto/matcher.hpp" -#endif // ----------------------------------------------------------------------------------------- // Implementation of VtableStub diff --git a/src/hotspot/share/compiler/compilerDefinitions.inline.hpp b/src/hotspot/share/compiler/compilerDefinitions.inline.hpp index 5557892669d..5d04ef307d0 100644 --- a/src/hotspot/share/compiler/compilerDefinitions.inline.hpp +++ b/src/hotspot/share/compiler/compilerDefinitions.inline.hpp @@ -32,9 +32,7 @@ #include "opto/c2compiler.hpp" #endif #include "compiler/compilerDefinitions.hpp" - #include "compiler/compiler_globals.hpp" -#include "compiler/compilerDefinitions.hpp" #include "runtime/arguments.hpp" inline bool CompilerConfig::is_interpreter_only() { diff --git a/src/hotspot/share/compiler/compilerDirectives.hpp b/src/hotspot/share/compiler/compilerDirectives.hpp index e960fdb1e53..620874508f4 100644 --- a/src/hotspot/share/compiler/compilerDirectives.hpp +++ b/src/hotspot/share/compiler/compilerDirectives.hpp @@ -26,9 +26,7 @@ #define SHARE_COMPILER_COMPILERDIRECTIVES_HPP #include "classfile/vmIntrinsics.hpp" -#include "ci/ciMetadata.hpp" #include "ci/ciMethod.hpp" -#include "compiler/compiler_globals.hpp" #include "compiler/methodMatcher.hpp" #include "opto/phasetype.hpp" #include "utilities/bitMap.hpp" diff --git a/src/hotspot/share/interpreter/interpreterRuntime.cpp b/src/hotspot/share/interpreter/interpreterRuntime.cpp index cb85513eed0..9d953d9db54 100644 --- a/src/hotspot/share/interpreter/interpreterRuntime.cpp +++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp @@ -77,9 +77,6 @@ #include "utilities/checkedCast.hpp" #include "utilities/copy.hpp" #include "utilities/events.hpp" -#ifdef COMPILER2 -#include "opto/runtime.hpp" -#endif // Helper class to access current interpreter state class LastFrameAccessor : public StackObj { diff --git a/src/hotspot/share/opto/c2compiler.hpp b/src/hotspot/share/opto/c2compiler.hpp index 01c7de3a971..868372568af 100644 --- a/src/hotspot/share/opto/c2compiler.hpp +++ b/src/hotspot/share/opto/c2compiler.hpp @@ -26,7 +26,12 @@ #define SHARE_OPTO_C2COMPILER_HPP #include "compiler/abstractCompiler.hpp" -#include "opto/output.hpp" + +// Define the initial sizes for allocation of the resizable code buffer +enum { + initial_const_capacity = 4 * 1024 +}; + class C2Compiler : public AbstractCompiler { private: diff --git a/src/hotspot/share/opto/compile.hpp b/src/hotspot/share/opto/compile.hpp index 7c251bd4bd9..223e7033761 100644 --- a/src/hotspot/share/opto/compile.hpp +++ b/src/hotspot/share/opto/compile.hpp @@ -946,11 +946,9 @@ class Compile : public Phase { Node_Notes* default_node_notes() const { return _default_node_notes; } void set_default_node_notes(Node_Notes* n) { _default_node_notes = n; } - Node_Notes* node_notes_at(int idx) { - return locate_node_notes(_node_note_array, idx, false); - } - inline bool set_node_notes_at(int idx, Node_Notes* value); + Node_Notes* node_notes_at(int idx); + inline bool set_node_notes_at(int idx, Node_Notes* value); // Copy notes from source to dest, if they exist. // Overwrite dest only if source provides something. // Return true if information was moved. diff --git a/src/hotspot/share/opto/library_call.cpp b/src/hotspot/share/opto/library_call.cpp index 096f0a20bd1..40b19eecd9f 100644 --- a/src/hotspot/share/opto/library_call.cpp +++ b/src/hotspot/share/opto/library_call.cpp @@ -50,6 +50,7 @@ #include "opto/runtime.hpp" #include "opto/rootnode.hpp" #include "opto/subnode.hpp" +#include "opto/vectornode.hpp" #include "prims/jvmtiExport.hpp" #include "prims/jvmtiThreadState.hpp" #include "prims/unsafe.hpp" diff --git a/src/hotspot/share/opto/mathexactnode.hpp b/src/hotspot/share/opto/mathexactnode.hpp index cc15b2ad983..a324110c6f1 100644 --- a/src/hotspot/share/opto/mathexactnode.hpp +++ b/src/hotspot/share/opto/mathexactnode.hpp @@ -25,11 +25,8 @@ #ifndef SHARE_OPTO_MATHEXACTNODE_HPP #define SHARE_OPTO_MATHEXACTNODE_HPP -#include "opto/multnode.hpp" -#include "opto/node.hpp" #include "opto/addnode.hpp" #include "opto/subnode.hpp" -#include "opto/type.hpp" class PhaseGVN; diff --git a/src/hotspot/share/opto/node.hpp b/src/hotspot/share/opto/node.hpp index bb95601f9e7..8ff778ed493 100644 --- a/src/hotspot/share/opto/node.hpp +++ b/src/hotspot/share/opto/node.hpp @@ -1999,6 +1999,10 @@ Compile::locate_node_notes(GrowableArray* arr, return arr->at(block_idx) + (idx & (_node_notes_block_size-1)); } +inline Node_Notes* Compile::node_notes_at(int idx) { + return locate_node_notes(_node_note_array, idx, false); +} + inline bool Compile::set_node_notes_at(int idx, Node_Notes* value) { if (value == nullptr || value->is_clear()) diff --git a/src/hotspot/share/opto/output.cpp b/src/hotspot/share/opto/output.cpp index 260aa7e635d..eb91ff7ea64 100644 --- a/src/hotspot/share/opto/output.cpp +++ b/src/hotspot/share/opto/output.cpp @@ -24,7 +24,6 @@ #include "precompiled.hpp" #include "asm/assembler.inline.hpp" -#include "asm/macroAssembler.inline.hpp" #include "code/compiledIC.hpp" #include "code/debugInfo.hpp" #include "code/debugInfoRec.hpp" @@ -34,7 +33,6 @@ #include "compiler/oopMap.hpp" #include "gc/shared/barrierSet.hpp" #include "gc/shared/c2/barrierSetC2.hpp" -#include "memory/allocation.inline.hpp" #include "memory/allocation.hpp" #include "opto/ad.hpp" #include "opto/block.hpp" @@ -48,10 +46,7 @@ #include "opto/optoreg.hpp" #include "opto/output.hpp" #include "opto/regalloc.hpp" -#include "opto/runtime.hpp" -#include "opto/subnode.hpp" #include "opto/type.hpp" -#include "runtime/handles.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "utilities/macros.hpp" #include "utilities/powerOfTwo.hpp" diff --git a/src/hotspot/share/opto/output.hpp b/src/hotspot/share/opto/output.hpp index 503f5414dc4..432ad3638b2 100644 --- a/src/hotspot/share/opto/output.hpp +++ b/src/hotspot/share/opto/output.hpp @@ -54,11 +54,6 @@ class PhaseCFG; #define DEBUG_ARG(x) #endif -// Define the initial sizes for allocation of the resizable code buffer -enum { - initial_const_capacity = 4 * 1024 -}; - class BufferSizingData { public: int _stub; diff --git a/src/hotspot/share/opto/runtime.hpp b/src/hotspot/share/opto/runtime.hpp index da08fc0f386..dc608cf746a 100644 --- a/src/hotspot/share/opto/runtime.hpp +++ b/src/hotspot/share/opto/runtime.hpp @@ -28,8 +28,6 @@ #include "code/codeBlob.hpp" #include "opto/machnode.hpp" #include "opto/optoreg.hpp" -#include "opto/type.hpp" -#include "runtime/deoptimization.hpp" #include "runtime/stubDeclarations.hpp" #include "runtime/vframe.hpp" diff --git a/src/hotspot/share/runtime/vframeArray.cpp b/src/hotspot/share/runtime/vframeArray.cpp index 1b26abf7402..bf195311f48 100644 --- a/src/hotspot/share/runtime/vframeArray.cpp +++ b/src/hotspot/share/runtime/vframeArray.cpp @@ -43,9 +43,6 @@ #include "runtime/vframe_hp.hpp" #include "utilities/copy.hpp" #include "utilities/events.hpp" -#ifdef COMPILER2 -#include "opto/runtime.hpp" -#endif int vframeArrayElement:: bci(void) const { return (_bci == SynchronizationEntryBCI ? 0 : _bci); } diff --git a/src/hotspot/share/runtime/vframe_hp.cpp b/src/hotspot/share/runtime/vframe_hp.cpp index 49ed47835d6..0c7e63d07fc 100644 --- a/src/hotspot/share/runtime/vframe_hp.cpp +++ b/src/hotspot/share/runtime/vframe_hp.cpp @@ -45,10 +45,6 @@ #include "runtime/stubRoutines.hpp" #include "runtime/vframeArray.hpp" #include "runtime/vframe_hp.hpp" -#ifdef COMPILER2 -#include "opto/matcher.hpp" -#endif - // ------------- compiledVFrame -------------- From dbffe33251da4472945d97ab54c7e3354d7f42d2 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Mon, 16 Dec 2024 10:20:13 +0000 Subject: [PATCH 39/93] 8345263: Make sure that lint categories are used correctly when logging lint warnings Reviewed-by: vromero, jlahoda --- .../propertiesparser/gen/ClassGenerator.java | 71 +++- .../propertiesparser/parser/Message.java | 5 +- .../propertiesparser/parser/MessageLine.java | 15 + .../resources/templates.properties | 13 + .../com/sun/tools/javac/code/Lint.java | 14 +- .../com/sun/tools/javac/code/Preview.java | 12 +- .../com/sun/tools/javac/comp/Attr.java | 25 +- .../com/sun/tools/javac/comp/Check.java | 340 ++++++++---------- .../com/sun/tools/javac/comp/Flow.java | 21 +- .../com/sun/tools/javac/comp/Modules.java | 16 +- .../tools/javac/comp/ThisEscapeAnalyzer.java | 10 +- .../sun/tools/javac/file/BaseFileManager.java | 8 +- .../com/sun/tools/javac/file/Locations.java | 28 +- .../com/sun/tools/javac/jvm/ClassReader.java | 13 +- .../com/sun/tools/javac/main/Arguments.java | 15 +- .../sun/tools/javac/parser/JavaTokenizer.java | 16 +- .../sun/tools/javac/parser/JavacParser.java | 5 +- .../tools/javac/processing/JavacFiler.java | 11 +- .../JavacProcessingEnvironment.java | 11 +- .../tools/javac/resources/compiler.properties | 122 +++++++ .../com/sun/tools/javac/util/AbstractLog.java | 45 +-- .../sun/tools/javac/util/JCDiagnostic.java | 88 +++-- .../javac/util/MandatoryWarningHandler.java | 8 +- .../tools/javac/6304921/TestLog.java | 10 +- 24 files changed, 530 insertions(+), 392 deletions(-) diff --git a/make/langtools/tools/propertiesparser/gen/ClassGenerator.java b/make/langtools/tools/propertiesparser/gen/ClassGenerator.java index e3ab548491b..e869d60bbc5 100644 --- a/make/langtools/tools/propertiesparser/gen/ClassGenerator.java +++ b/make/langtools/tools/propertiesparser/gen/ClassGenerator.java @@ -48,6 +48,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Properties; import java.util.Set; import java.util.TreeMap; @@ -87,9 +88,12 @@ enum StubKind { FACTORY_METHOD_DECL("factory.decl.method"), FACTORY_METHOD_ARG("factory.decl.method.arg"), FACTORY_METHOD_BODY("factory.decl.method.body"), + FACTORY_METHOD_BODY_LINT("factory.decl.method.body.lint"), FACTORY_FIELD("factory.decl.field"), + FACTORY_FIELD_LINT("factory.decl.field.lint"), WILDCARDS_EXTENDS("wildcards.extends"), - SUPPRESS_WARNINGS("suppress.warnings"); + SUPPRESS_WARNINGS("suppress.warnings"), + LINT_CATEGORY("lint.category"); /** stub key (as it appears in the property file) */ String key; @@ -114,6 +118,7 @@ String format(Object... args) { enum FactoryKind { ERR("err", "Error", "Errors"), WARN("warn", "Warning", "Warnings"), + LINT_WARN("warn", "LintWarning", "LintWarnings"), NOTE("note", "Note", "Notes"), MISC("misc", "Fragment", "Fragments"), OTHER(null, null, null); @@ -136,13 +141,24 @@ enum FactoryKind { /** * Utility method for parsing a factory kind from a resource key prefix. */ - static FactoryKind parseFrom(String prefix) { + static FactoryKind of(Entry messageEntry) { + String prefix = messageEntry.getKey().split("\\.")[1]; + FactoryKind selected = null; for (FactoryKind k : FactoryKind.values()) { if (k.prefix == null || k.prefix.equals(prefix)) { - return k; + selected = k; + break; } } - return null; + if (selected == WARN) { + for (MessageLine line : messageEntry.getValue().getLines(false)) { + if (line.isLint()) { + selected = LINT_WARN; + break; + } + } + } + return selected; } } @@ -155,7 +171,7 @@ public void generateFactory(MessageFile messageFile, File outDir) { messageFile.messages.entrySet().stream() .collect( Collectors.groupingBy( - e -> FactoryKind.parseFrom(e.getKey().split("\\.")[1]), + FactoryKind::of, TreeMap::new, toList())); //generate nested classes @@ -165,7 +181,7 @@ public void generateFactory(MessageFile messageFile, File outDir) { if (entry.getKey() == FactoryKind.OTHER) continue; //emit members String members = entry.getValue().stream() - .flatMap(e -> generateFactoryMethodsAndFields(e.getKey(), e.getValue()).stream()) + .flatMap(e -> generateFactoryMethodsAndFields(entry.getKey(), e.getKey(), e.getValue()).stream()) .collect(Collectors.joining("\n\n")); //emit nested class String factoryDecl = @@ -230,7 +246,7 @@ List generateImports(Set importedTypes) { /** * Generate a list of factory methods/fields to be added to a given factory nested class. */ - List generateFactoryMethodsAndFields(String key, Message msg) { + List generateFactoryMethodsAndFields(FactoryKind k, String key, Message msg) { MessageInfo msgInfo = msg.getMessageInfo(); List lines = msg.getLines(false); String javadoc = lines.stream() @@ -238,14 +254,27 @@ List generateFactoryMethodsAndFields(String key, Message msg) { .map(ml -> ml.text) .collect(Collectors.joining("\n *")); String[] keyParts = key.split("\\."); - FactoryKind k = FactoryKind.parseFrom(keyParts[1]); + String lintCategory = lines.stream() + .filter(MessageLine::isLint) + .map(MessageLine::lintCategory) + .findFirst().orElse(null); + //System.out.println("category for " + key + " = " + lintCategory); String factoryName = factoryName(key); if (msgInfo.getTypes().isEmpty()) { //generate field - String factoryField = StubKind.FACTORY_FIELD.format(k.keyClazz, factoryName, - "\"" + keyParts[0] + "\"", - "\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"", - javadoc); + String factoryField; + if (lintCategory == null) { + factoryField = StubKind.FACTORY_FIELD.format(k.keyClazz, factoryName, + "\"" + keyParts[0] + "\"", + "\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"", + javadoc); + } else { + factoryField = StubKind.FACTORY_FIELD_LINT.format(k.keyClazz, factoryName, + StubKind.LINT_CATEGORY.format("\"" + lintCategory + "\""), + "\"" + keyParts[0] + "\"", + "\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"", + javadoc); + } return Collections.singletonList(factoryField); } else { //generate method @@ -255,12 +284,22 @@ List generateFactoryMethodsAndFields(String key, Message msg) { List argNames = argNames(types.size()); String suppressionString = needsSuppressWarnings(msgTypes) ? StubKind.SUPPRESS_WARNINGS.format() : ""; + String methodBody; + if (lintCategory == null) { + methodBody = StubKind.FACTORY_METHOD_BODY.format(k.keyClazz, + "\"" + keyParts[0] + "\"", + "\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"", + argNames.stream().collect(Collectors.joining(", "))); + } else { + methodBody = StubKind.FACTORY_METHOD_BODY_LINT.format(k.keyClazz, + StubKind.LINT_CATEGORY.format("\"" + lintCategory + "\""), + "\"" + keyParts[0] + "\"", + "\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"", + argNames.stream().collect(Collectors.joining(", "))); + } String factoryMethod = StubKind.FACTORY_METHOD_DECL.format(suppressionString, k.keyClazz, factoryName, argDecls(types, argNames).stream().collect(Collectors.joining(", ")), - indent(StubKind.FACTORY_METHOD_BODY.format(k.keyClazz, - "\"" + keyParts[0] + "\"", - "\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"", - argNames.stream().collect(Collectors.joining(", "))), 1), + indent(methodBody, 1), javadoc); factoryMethods.add(factoryMethod); } diff --git a/make/langtools/tools/propertiesparser/parser/Message.java b/make/langtools/tools/propertiesparser/parser/Message.java index 02a2f5e4f5c..3c1191084ec 100644 --- a/make/langtools/tools/propertiesparser/parser/Message.java +++ b/make/langtools/tools/propertiesparser/parser/Message.java @@ -49,6 +49,9 @@ public final class Message { public MessageInfo getMessageInfo() { if (messageInfo == null) { MessageLine l = firstLine.prev; + if (l != null && l.isLint()) { + l = l.prev; + } if (l != null && l.isInfo()) messageInfo = new MessageInfo(l.text); else @@ -71,7 +74,7 @@ public List getLines(boolean includeAllPrecedingComments) { while (l.text.isEmpty()) l = l.next; } else { - if (l.prev != null && l.prev.isInfo()) + if (l.prev != null && (l.prev.isInfo() || l.prev.isLint())) l = l.prev; } diff --git a/make/langtools/tools/propertiesparser/parser/MessageLine.java b/make/langtools/tools/propertiesparser/parser/MessageLine.java index e370eefa38a..c73021e0827 100644 --- a/make/langtools/tools/propertiesparser/parser/MessageLine.java +++ b/make/langtools/tools/propertiesparser/parser/MessageLine.java @@ -25,6 +25,7 @@ package propertiesparser.parser; +import java.util.regex.Matcher; import java.util.regex.Pattern; /** @@ -37,6 +38,7 @@ public class MessageLine { static final Pattern typePattern = Pattern.compile("[-\\\\'A-Z\\.a-z ]+( \\([-A-Za-z 0-9]+\\))?"); static final Pattern infoPattern = Pattern.compile(String.format("# ([0-9]+: %s, )*[0-9]+: %s", typePattern.pattern(), typePattern.pattern())); + static final Pattern lintPattern = Pattern.compile("# lint: ([a-z\\-]+)"); public String text; MessageLine prev; @@ -54,6 +56,19 @@ public boolean isInfo() { return infoPattern.matcher(text).matches(); } + public boolean isLint() { + return lintPattern.matcher(text).matches(); + } + + public String lintCategory() { + Matcher matcher = lintPattern.matcher(text); + if (matcher.matches()) { + return matcher.group(1); + } else { + return null; + } + } + boolean hasContinuation() { return (next != null) && text.endsWith("\\"); } diff --git a/make/langtools/tools/propertiesparser/resources/templates.properties b/make/langtools/tools/propertiesparser/resources/templates.properties index b6685e68891..bb403238f80 100644 --- a/make/langtools/tools/propertiesparser/resources/templates.properties +++ b/make/langtools/tools/propertiesparser/resources/templates.properties @@ -29,8 +29,10 @@ toplevel.decl=\ {1}\n\ import com.sun.tools.javac.util.JCDiagnostic.Error;\n\ import com.sun.tools.javac.util.JCDiagnostic.Warning;\n\ + import com.sun.tools.javac.util.JCDiagnostic.LintWarning;\n\ import com.sun.tools.javac.util.JCDiagnostic.Note;\n\ import com.sun.tools.javac.util.JCDiagnostic.Fragment;\n\ + import com.sun.tools.javac.code.Lint.LintCategory;\n\ \n\ public class {2} '{'\n\ {3}\n\ @@ -58,16 +60,27 @@ factory.decl.method.arg=\ factory.decl.method.body=\ return new {0}({1}, {2}, {3}); +factory.decl.method.body.lint=\ + return new {0}({1}, {2}, {3}, {4}); + factory.decl.field=\ /**\n\ ' '* {4}\n\ ' '*/\n\ public static final {0} {1} = new {0}({2}, {3}); +factory.decl.field.lint=\ + /**\n\ + ' '* {5}\n\ + ' '*/\n\ + public static final {0} {1} = new {0}({2}, {3}, {4}); + wildcards.extends=\ {0} suppress.warnings=\ @SuppressWarnings("rawtypes")\n +lint.category=\ + LintCategory.get({0}) 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 622c13d8b47..c55830849c8 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 @@ -33,7 +33,10 @@ import com.sun.tools.javac.code.Symbol.*; import com.sun.tools.javac.main.Option; import com.sun.tools.javac.util.Context; +import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; +import com.sun.tools.javac.util.JCDiagnostic.LintWarning; import com.sun.tools.javac.util.List; +import com.sun.tools.javac.util.Log; import com.sun.tools.javac.util.Options; import com.sun.tools.javac.util.Pair; @@ -359,7 +362,7 @@ public enum LintCategory { map.put(option, this); } - static LintCategory get(String option) { + public static LintCategory get(String option) { return map.get(option); } @@ -385,6 +388,15 @@ public boolean isSuppressed(LintCategory lc) { return suppressedValues.contains(lc); } + /** + * Helper method. Log a lint warning if its lint category is enabled. + */ + public void logIfEnabled(Log log, DiagnosticPosition pos, LintWarning warning) { + if (isEnabled(warning.getLintCategory())) { + log.warning(pos, warning); + } + } + protected static class AugmentVisitor implements Attribute.Visitor { private final Context context; private Symtab syms; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java index c66e1758616..5a684a1cc59 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java @@ -30,11 +30,13 @@ import com.sun.tools.javac.code.Symbol.ModuleSymbol; import com.sun.tools.javac.jvm.Target; import com.sun.tools.javac.resources.CompilerProperties.Errors; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.util.Assert; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; import com.sun.tools.javac.util.JCDiagnostic.Error; +import com.sun.tools.javac.util.JCDiagnostic.LintWarning; import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition; import com.sun.tools.javac.util.JCDiagnostic.Warning; import com.sun.tools.javac.util.Log; @@ -175,8 +177,8 @@ public void warnPreview(DiagnosticPosition pos, Feature feature) { if (!lint.isSuppressed(LintCategory.PREVIEW)) { sourcesWithPreviewFeatures.add(log.currentSourceFile()); previewHandler.report(pos, feature.isPlural() ? - Warnings.PreviewFeatureUsePlural(feature.nameFragment()) : - Warnings.PreviewFeatureUse(feature.nameFragment())); + LintWarnings.PreviewFeatureUsePlural(feature.nameFragment()) : + LintWarnings.PreviewFeatureUse(feature.nameFragment())); } } @@ -188,8 +190,8 @@ public void warnPreview(DiagnosticPosition pos, Feature feature) { public void warnPreview(JavaFileObject classfile, int majorVersion) { Assert.check(isEnabled()); if (lint.isEnabled(LintCategory.PREVIEW)) { - log.mandatoryWarning(LintCategory.PREVIEW, null, - Warnings.PreviewFeatureUseClassfile(classfile, majorVersionToSource.get(majorVersion).name)); + log.mandatoryWarning(null, + LintWarnings.PreviewFeatureUseClassfile(classfile, majorVersionToSource.get(majorVersion).name)); } } @@ -197,7 +199,7 @@ public void markUsesPreview(DiagnosticPosition pos) { sourcesWithPreviewFeatures.add(log.currentSourceFile()); } - public void reportPreviewWarning(DiagnosticPosition pos, Warning warnKey) { + public void reportPreviewWarning(DiagnosticPosition pos, LintWarning warnKey) { previewHandler.report(pos, warnKey); } 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 2c3a79650b4..19379480643 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 @@ -58,6 +58,7 @@ import com.sun.tools.javac.resources.CompilerProperties.Errors; import com.sun.tools.javac.resources.CompilerProperties.Fragments; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.tree.*; import com.sun.tools.javac.tree.JCTree.*; @@ -1938,8 +1939,8 @@ private Symbol enumConstant(JCTree tree, Type enumType) { public void visitSynchronized(JCSynchronized tree) { chk.checkRefType(tree.pos(), attribExpr(tree.lock, env)); - if (env.info.lint.isEnabled(LintCategory.SYNCHRONIZATION) && isValueBased(tree.lock.type)) { - log.warning(LintCategory.SYNCHRONIZATION, tree.pos(), Warnings.AttemptToSynchronizeOnInstanceOfValueBasedClass); + if (isValueBased(tree.lock.type)) { + env.info.lint.logIfEnabled(log, tree.pos(), LintWarnings.AttemptToSynchronizeOnInstanceOfValueBasedClass); } attribStat(tree.body, env); result = null; @@ -2045,9 +2046,8 @@ void checkAutoCloseable(DiagnosticPosition pos, Env env, Type resou } if (close.kind == MTH && close.overrides(syms.autoCloseableClose, resource.tsym, types, true) && - chk.isHandled(syms.interruptedExceptionType, types.memberType(resource, close).getThrownTypes()) && - env.info.lint.isEnabled(LintCategory.TRY)) { - log.warning(LintCategory.TRY, pos, Warnings.TryResourceThrowsInterruptedExc(resource)); + chk.isHandled(syms.interruptedExceptionType, types.memberType(resource, close).getThrownTypes())) { + env.info.lint.logIfEnabled(log, pos, LintWarnings.TryResourceThrowsInterruptedExc(resource)); } } } @@ -4446,9 +4446,8 @@ public void visitSelect(JCFieldAccess tree) { ((VarSymbol)sitesym).isResourceVariable() && sym.kind == MTH && sym.name.equals(names.close) && - sym.overrides(syms.autoCloseableClose, sitesym.type.tsym, types, true) && - env.info.lint.isEnabled(LintCategory.TRY)) { - log.warning(LintCategory.TRY, tree, Warnings.TryExplicitCloseCall); + sym.overrides(syms.autoCloseableClose, sitesym.type.tsym, types, true)) { + env.info.lint.logIfEnabled(log, tree, LintWarnings.TryExplicitCloseCall); } // Disallow selecting a type from an expression @@ -4475,9 +4474,9 @@ public void visitSelect(JCFieldAccess tree) { // If the qualified item is not a type and the selected item is static, report // a warning. Make allowance for the class of an array type e.g. Object[].class) if (!sym.owner.isAnonymous()) { - chk.warnStatic(tree, Warnings.StaticNotQualifiedByType(sym.kind.kindName(), sym.owner)); + chk.lint.logIfEnabled(log, tree, LintWarnings.StaticNotQualifiedByType(sym.kind.kindName(), sym.owner)); } else { - chk.warnStatic(tree, Warnings.StaticNotQualifiedByType2(sym.kind.kindName())); + chk.lint.logIfEnabled(log, tree, LintWarnings.StaticNotQualifiedByType2(sym.kind.kindName())); } } @@ -4690,7 +4689,7 @@ else if (ownOuter.hasTag(CLASS) && site != ownOuter) { if (s != null && s.isRaw() && !types.isSameType(v.type, v.erasure(types))) { - chk.warnUnchecked(tree.pos(), Warnings.UncheckedAssignToVar(v, s)); + chk.warnUnchecked(tree.pos(), LintWarnings.UncheckedAssignToVar(v, s)); } } // The computed type of a variable is the type of the @@ -4888,7 +4887,7 @@ public Type checkMethod(Type site, if (s != null && s.isRaw() && !types.isSameTypes(sym.type.getParameterTypes(), sym.erasure(types).getParameterTypes())) { - chk.warnUnchecked(env.tree.pos(), Warnings.UncheckedCallMbrOfRawType(sym, s)); + chk.warnUnchecked(env.tree.pos(), LintWarnings.UncheckedCallMbrOfRawType(sym, s)); } } @@ -4938,7 +4937,7 @@ public Type checkMethod(Type site, argtypes = argtypes.map(checkDeferredMap); if (noteWarner.hasNonSilentLint(LintCategory.UNCHECKED)) { - chk.warnUnchecked(env.tree.pos(), Warnings.UncheckedMethInvocationApplied(kindName(sym), + chk.warnUnchecked(env.tree.pos(), LintWarnings.UncheckedMethInvocationApplied(kindName(sym), sym.name, rs.methodArguments(sym.type.getParameterTypes()), rs.methodArguments(argtypes.map(checkDeferredMap)), 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 3f675cad651..a5b4186659b 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 @@ -28,7 +28,6 @@ import java.util.*; import java.util.function.BiConsumer; import java.util.function.BiPredicate; -import java.util.function.Consumer; import java.util.function.Predicate; import java.util.function.Supplier; import java.util.function.ToIntBiFunction; @@ -50,13 +49,14 @@ import com.sun.tools.javac.resources.CompilerProperties.Errors; import com.sun.tools.javac.resources.CompilerProperties.Fragments; import com.sun.tools.javac.resources.CompilerProperties.Warnings; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.tree.*; import com.sun.tools.javac.util.*; import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag; import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; import com.sun.tools.javac.util.JCDiagnostic.Error; import com.sun.tools.javac.util.JCDiagnostic.Fragment; -import com.sun.tools.javac.util.JCDiagnostic.Warning; +import com.sun.tools.javac.util.JCDiagnostic.LintWarning; import com.sun.tools.javac.util.List; import com.sun.tools.javac.code.Lint; @@ -79,11 +79,8 @@ import static com.sun.tools.javac.tree.JCTree.Tag.*; import javax.lang.model.element.Element; -import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.TypeElement; import javax.lang.model.type.DeclaredType; -import javax.lang.model.type.TypeMirror; -import javax.lang.model.util.ElementFilter; import javax.lang.model.util.ElementKindVisitor14; /** Type checking helper class for the attribution phase. @@ -122,7 +119,7 @@ public class Check { // The set of lint options currently in effect. It is initialized // from the context, and then is set/reset as needed by Attr as it // visits all the various parts of the trees during attribution. - private Lint lint; + Lint lint; // The method being analyzed in Attr - it is set/reset as needed by // Attr as it visits new method declarations. @@ -251,16 +248,16 @@ void warnDeprecated(DiagnosticPosition pos, Symbol sym) { if (sym.isDeprecatedForRemoval()) { if (!lint.isSuppressed(LintCategory.REMOVAL)) { if (sym.kind == MDL) { - removalHandler.report(pos, Warnings.HasBeenDeprecatedForRemovalModule(sym)); + removalHandler.report(pos, LintWarnings.HasBeenDeprecatedForRemovalModule(sym)); } else { - removalHandler.report(pos, Warnings.HasBeenDeprecatedForRemoval(sym, sym.location())); + removalHandler.report(pos, LintWarnings.HasBeenDeprecatedForRemoval(sym, sym.location())); } } } else if (!lint.isSuppressed(LintCategory.DEPRECATION)) { if (sym.kind == MDL) { - deprecationHandler.report(pos, Warnings.HasBeenDeprecatedModule(sym)); + deprecationHandler.report(pos, LintWarnings.HasBeenDeprecatedModule(sym)); } else { - deprecationHandler.report(pos, Warnings.HasBeenDeprecated(sym, sym.location())); + deprecationHandler.report(pos, LintWarnings.HasBeenDeprecated(sym, sym.location())); } } } @@ -269,7 +266,7 @@ void warnDeprecated(DiagnosticPosition pos, Symbol sym) { * @param pos Position to be used for error reporting. * @param msg A Warning describing the problem. */ - public void warnPreviewAPI(DiagnosticPosition pos, Warning warnKey) { + public void warnPreviewAPI(DiagnosticPosition pos, LintWarning warnKey) { if (!lint.isSuppressed(LintCategory.PREVIEW)) preview.reportPreviewWarning(pos, warnKey); } @@ -280,7 +277,7 @@ public void warnPreviewAPI(DiagnosticPosition pos, Warning warnKey) { */ public void warnDeclaredUsingPreview(DiagnosticPosition pos, Symbol sym) { if (!lint.isSuppressed(LintCategory.PREVIEW)) - preview.reportPreviewWarning(pos, Warnings.DeclaredUsingPreview(kindName(sym), sym)); + preview.reportPreviewWarning(pos, LintWarnings.DeclaredUsingPreview(kindName(sym), sym)); } /** Log a preview warning. @@ -288,40 +285,18 @@ public void warnDeclaredUsingPreview(DiagnosticPosition pos, Symbol sym) { * @param msg A Warning describing the problem. */ public void warnRestrictedAPI(DiagnosticPosition pos, Symbol sym) { - if (lint.isEnabled(LintCategory.RESTRICTED)) - log.warning(LintCategory.RESTRICTED, pos, Warnings.RestrictedMethod(sym.enclClass(), sym)); + lint.logIfEnabled(log, pos, LintWarnings.RestrictedMethod(sym.enclClass(), sym)); } /** Warn about unchecked operation. * @param pos Position to be used for error reporting. * @param msg A string describing the problem. */ - public void warnUnchecked(DiagnosticPosition pos, Warning warnKey) { + public void warnUnchecked(DiagnosticPosition pos, LintWarning warnKey) { if (!lint.isSuppressed(LintCategory.UNCHECKED)) uncheckedHandler.report(pos, warnKey); } - /** Warn about unsafe vararg method decl. - * @param pos Position to be used for error reporting. - */ - void warnUnsafeVararg(DiagnosticPosition pos, Warning warnKey) { - if (lint.isEnabled(LintCategory.VARARGS)) - log.warning(LintCategory.VARARGS, pos, warnKey); - } - - public void warnStatic(DiagnosticPosition pos, Warning warnKey) { - if (lint.isEnabled(LintCategory.STATIC)) - log.warning(LintCategory.STATIC, pos, warnKey); - } - - /** Warn about division by integer constant zero. - * @param pos Position to be used for error reporting. - */ - void warnDivZero(DiagnosticPosition pos) { - if (lint.isEnabled(LintCategory.DIVZERO)) - log.warning(LintCategory.DIVZERO, pos, Warnings.DivZero); - } - /** * Report any deferred diagnostics. */ @@ -674,9 +649,7 @@ public void checkRedundantCast(Env env, final JCTypeCast tree) { && !(ignoreAnnotatedCasts && TreeInfo.containsTypeAnnotation(tree.clazz)) && !is292targetTypeCast(tree)) { deferredLintHandler.report(_l -> { - if (lint.isEnabled(LintCategory.CAST)) - log.warning(LintCategory.CAST, - tree.pos(), Warnings.RedundantCast(tree.clazz.type)); + lint.logIfEnabled(log, tree.pos(), LintWarnings.RedundantCast(tree.clazz.type)); }); } } @@ -981,13 +954,13 @@ void checkVarargsMethodDecl(Env env, JCMethodDecl tree) { } } else if (hasTrustMeAnno && varargElemType != null && types.isReifiable(varargElemType)) { - warnUnsafeVararg(tree, Warnings.VarargsRedundantTrustmeAnno( + lint.logIfEnabled(log, tree, LintWarnings.VarargsRedundantTrustmeAnno( syms.trustMeType.tsym, diags.fragment(Fragments.VarargsTrustmeOnReifiableVarargs(varargElemType)))); } else if (!hasTrustMeAnno && varargElemType != null && !types.isReifiable(varargElemType)) { - warnUnchecked(tree.params.head.pos(), Warnings.UncheckedVarargsNonReifiableType(varargElemType)); + warnUnchecked(tree.params.head.pos(), LintWarnings.UncheckedVarargsNonReifiableType(varargElemType)); } } //where @@ -1074,7 +1047,7 @@ Type checkMethod(final Type mtype, if (!types.isReifiable(argtype) && (sym.baseSymbol().attribute(syms.trustMeType.tsym) == null || !isTrustMeAllowedOnMethod(sym))) { - warnUnchecked(env.tree.pos(), Warnings.UncheckedGenericArrayCreation(argtype)); + warnUnchecked(env.tree.pos(), LintWarnings.UncheckedGenericArrayCreation(argtype)); } TreeInfo.setVarargsElement(env.tree, types.elemtype(argtype)); } @@ -1350,11 +1323,7 @@ && checkDisjoint(pos, flags, private void warnOnExplicitStrictfp(DiagnosticPosition pos) { DiagnosticPosition prevLintPos = deferredLintHandler.setPos(pos); try { - deferredLintHandler.report(_l -> { - if (lint.isEnabled(LintCategory.STRICTFP)) { - log.warning(LintCategory.STRICTFP, - pos, Warnings.Strictfp); } - }); + deferredLintHandler.report(_ -> lint.logIfEnabled(log, pos, LintWarnings.Strictfp)); } finally { deferredLintHandler.setPos(prevLintPos); } @@ -1569,13 +1538,11 @@ public void validateTrees(List trees, boolean checkRaw, boolea } void checkRaw(JCTree tree, Env env) { - if (lint.isEnabled(LintCategory.RAW) && - tree.type.hasTag(CLASS) && + if (tree.type.hasTag(CLASS) && !TreeInfo.isDiamond(tree) && !withinAnonConstr(env) && tree.type.isRaw()) { - log.warning(LintCategory.RAW, - tree.pos(), Warnings.RawClassUse(tree.type, tree.type.tsym.type)); + lint.logIfEnabled(log, tree.pos(), LintWarnings.RawClassUse(tree.type, tree.type.tsym.type)); } } //where @@ -1877,7 +1844,7 @@ void checkOverride(JCTree tree, return; } else if (overrideWarner.hasNonSilentLint(LintCategory.UNCHECKED)) { warnUnchecked(TreeInfo.diagnosticPositionFor(m, tree), - Warnings.OverrideUncheckedRet(uncheckedOverrides(m, other), mtres, otres)); + LintWarnings.OverrideUncheckedRet(uncheckedOverrides(m, other), mtres, otres)); } // Error if overriding method throws an exception not reported @@ -1893,17 +1860,16 @@ void checkOverride(JCTree tree, } else if (unhandledUnerased.nonEmpty()) { warnUnchecked(TreeInfo.diagnosticPositionFor(m, tree), - Warnings.OverrideUncheckedThrown(cannotOverride(m, other), unhandledUnerased.head)); + LintWarnings.OverrideUncheckedThrown(cannotOverride(m, other), unhandledUnerased.head)); return; } // Optional warning if varargs don't agree - if ((((m.flags() ^ other.flags()) & Flags.VARARGS) != 0) - && lint.isEnabled(LintCategory.OVERRIDES)) { - log.warning(TreeInfo.diagnosticPositionFor(m, tree), + if ((((m.flags() ^ other.flags()) & Flags.VARARGS) != 0)) { + lint.logIfEnabled(log, TreeInfo.diagnosticPositionFor(m, tree), ((m.flags() & Flags.VARARGS) != 0) - ? Warnings.OverrideVarargsMissing(varargsOverrides(m, other)) - : Warnings.OverrideVarargsExtra(varargsOverrides(m, other))); + ? LintWarnings.OverrideVarargsMissing(varargsOverrides(m, other)) + : LintWarnings.OverrideVarargsExtra(varargsOverrides(m, other))); } // Warn if instance method overrides bridge method (compiler spec ??) @@ -2247,8 +2213,8 @@ private void checkClassOverrideEqualsAndHash(DiagnosticPosition pos, someClass, false, equalsHasCodeFilter) != hashCodeAtObject; if (overridesEquals && !overridesHashCode) { - log.warning(LintCategory.OVERRIDES, pos, - Warnings.OverrideEqualsButNotHashcode(someClass)); + log.warning(pos, + LintWarnings.OverrideEqualsButNotHashcode(someClass)); } } } @@ -2310,7 +2276,7 @@ public void checkModuleName (JCModuleDecl tree) { String moduleNameComponentString = componentName.toString(); int nameLength = moduleNameComponentString.length(); if (nameLength > 0 && Character.isDigit(moduleNameComponentString.charAt(nameLength - 1))) { - log.warning(Lint.LintCategory.MODULE, pos, Warnings.PoorChoiceForModuleName(componentName)); + log.warning(pos, LintWarnings.PoorChoiceForModuleName(componentName)); } } } @@ -2781,8 +2747,8 @@ void checkPotentiallyAmbiguousOverloads(JCClassDecl tree, Type site) { tree.pos(); // Log the warning - log.warning(LintCategory.OVERLOADS, pos, - Warnings.PotentiallyAmbiguousOverload( + log.warning(pos, + LintWarnings.PotentiallyAmbiguousOverload( m1.asMemberOf(site, types), m1.location(), m2.asMemberOf(site, types), m2.location())); @@ -3002,12 +2968,12 @@ void checkAccessFromSerializableElement(final JCTree tree, boolean isLambda) { isEffectivelyNonPublic(sym)) { if (isLambda) { if (belongsToRestrictedPackage(sym)) { - log.warning(LintCategory.SERIAL, tree.pos(), - Warnings.AccessToMemberFromSerializableLambda(sym)); + log.warning(tree.pos(), + LintWarnings.AccessToMemberFromSerializableLambda(sym)); } } else { log.warning(tree.pos(), - Warnings.AccessToMemberFromSerializableElement(sym)); + LintWarnings.AccessToMemberFromSerializableElement(sym)); } } } @@ -3790,14 +3756,13 @@ void checkDeprecatedAnnotation(DiagnosticPosition pos, Symbol s) { (s.flags() & DEPRECATED) != 0 && !syms.deprecatedType.isErroneous() && s.attribute(syms.deprecatedType.tsym) == null) { - log.warning(LintCategory.DEP_ANN, - pos, Warnings.MissingDeprecatedAnnotation); + log.warning(pos, LintWarnings.MissingDeprecatedAnnotation); } // Note: @Deprecated has no effect on local variables, parameters and package decls. if (lint.isEnabled(LintCategory.DEPRECATION) && !s.isDeprecatableViaAnnotation()) { if (!syms.deprecatedType.isErroneous() && s.attribute(syms.deprecatedType.tsym) != null) { - log.warning(LintCategory.DEPRECATION, pos, - Warnings.DeprecatedAnnotationHasNoEffect(Kinds.kindName(s))); + log.warning(pos, + LintWarnings.DeprecatedAnnotationHasNoEffect(Kinds.kindName(s))); } } } @@ -3857,10 +3822,10 @@ void checkPreview(DiagnosticPosition pos, Symbol other, Type site, Symbol s) { log.error(pos, Errors.IsPreview(s)); } else { preview.markUsesPreview(pos); - deferredLintHandler.report(_l -> warnPreviewAPI(pos, Warnings.IsPreview(s))); + deferredLintHandler.report(_l -> warnPreviewAPI(pos, LintWarnings.IsPreview(s))); } } else { - deferredLintHandler.report(_l -> warnPreviewAPI(pos, Warnings.IsPreviewReflective(s))); + deferredLintHandler.report(_l -> warnPreviewAPI(pos, LintWarnings.IsPreviewReflective(s))); } } if (preview.declaredUsingPreviewFeature(s)) { @@ -4148,7 +4113,7 @@ void checkDivZero(final DiagnosticPosition pos, Symbol operator, Type operand) { int opc = ((OperatorSymbol)operator).opcode; if (opc == ByteCodes.idiv || opc == ByteCodes.imod || opc == ByteCodes.ldiv || opc == ByteCodes.lmod) { - deferredLintHandler.report(_l -> warnDivZero(pos)); + deferredLintHandler.report(_ -> lint.logIfEnabled(log, pos, LintWarnings.DivZero)); } } } @@ -4161,11 +4126,8 @@ void checkDivZero(final DiagnosticPosition pos, Symbol operator, Type operand) { */ void checkLossOfPrecision(final DiagnosticPosition pos, Type found, Type req) { if (found.isNumeric() && req.isNumeric() && !types.isAssignable(found, req)) { - deferredLintHandler.report(_l -> { - if (lint.isEnabled(LintCategory.LOSSY_CONVERSIONS)) - log.warning(LintCategory.LOSSY_CONVERSIONS, - pos, Warnings.PossibleLossOfPrecision(found, req)); - }); + deferredLintHandler.report(_ -> + lint.logIfEnabled(log, pos, LintWarnings.PossibleLossOfPrecision(found, req))); } } @@ -4173,9 +4135,9 @@ void checkLossOfPrecision(final DiagnosticPosition pos, Type found, Type req) { * Check for empty statements after if */ void checkEmptyIf(JCIf tree) { - if (tree.thenpart.hasTag(SKIP) && tree.elsepart == null && - lint.isEnabled(LintCategory.EMPTY)) - log.warning(LintCategory.EMPTY, tree.thenpart.pos(), Warnings.EmptyIf); + if (tree.thenpart.hasTag(SKIP) && tree.elsepart == null) { + lint.logIfEnabled(log, tree.thenpart.pos(), LintWarnings.EmptyIf); + } } /** Check that symbol is unique in given scope. @@ -4317,13 +4279,12 @@ private boolean isCanonical(JCTree tree) { /** Check that an auxiliary class is not accessed from any other file than its own. */ void checkForBadAuxiliaryClassAccess(DiagnosticPosition pos, Env env, ClassSymbol c) { - if (lint.isEnabled(Lint.LintCategory.AUXILIARYCLASS) && - (c.flags() & AUXILIARY) != 0 && + if ((c.flags() & AUXILIARY) != 0 && rs.isAccessible(env, c) && !fileManager.isSameFile(c.sourcefile, env.toplevel.sourcefile)) { - log.warning(pos, - Warnings.AuxiliaryClassAccessedFromOutsideOfItsSourceFile(c, c.sourcefile)); + lint.logIfEnabled(log, pos, + LintWarnings.AuxiliaryClassAccessedFromOutsideOfItsSourceFile(c, c.sourcefile)); } } @@ -4365,11 +4326,8 @@ void checkDefaultConstructor(ClassSymbol c, DiagnosticPosition pos) { // Warning may be suppressed by // annotations; check again for being // enabled in the deferred context. - deferredLintHandler.report(_l -> { - if (lint.isEnabled(LintCategory.MISSING_EXPLICIT_CTOR)) - log.warning(LintCategory.MISSING_EXPLICIT_CTOR, - pos, Warnings.MissingExplicitCtor(c, pkg, modle)); - }); + deferredLintHandler.report(_ -> + lint.logIfEnabled(log, pos, LintWarnings.MissingExplicitCtor(c, pkg, modle))); } else { return; } @@ -4398,14 +4356,14 @@ public void warn(LintCategory lint) { if (warned) return; // suppress redundant diagnostics switch (lint) { case UNCHECKED: - Check.this.warnUnchecked(pos(), Warnings.ProbFoundReq(diags.fragment(uncheckedKey), found, expected)); + Check.this.warnUnchecked(pos(), LintWarnings.ProbFoundReq(diags.fragment(uncheckedKey), found, expected)); break; case VARARGS: if (method != null && method.attribute(syms.trustMeType.tsym) != null && isTrustMeAllowedOnMethod(method) && !types.isReifiable(method.type.getParameterTypes().last())) { - Check.this.warnUnsafeVararg(pos(), Warnings.VarargsUnsafeUseVarargsParam(method.params.last())); + Check.this.lint.logIfEnabled(log, pos(), LintWarnings.VarargsUnsafeUseVarargsParam(method.params.last())); } break; default: @@ -4660,7 +4618,7 @@ private boolean isAPISymbol(Symbol sym) { } private void checkVisible(DiagnosticPosition pos, Symbol what, PackageSymbol inPackage, boolean inSuperType) { if (!isAPISymbol(what) && !inSuperType) { //package private/private element - log.warning(LintCategory.EXPORTS, pos, Warnings.LeaksNotAccessible(kindName(what), what, what.packge().modle)); + log.warning(pos, LintWarnings.LeaksNotAccessible(kindName(what), what, what.packge().modle)); return ; } @@ -4669,13 +4627,13 @@ private void checkVisible(DiagnosticPosition pos, Symbol what, PackageSymbol inP ExportsDirective inExport = findExport(inPackage); if (whatExport == null) { //package not exported: - log.warning(LintCategory.EXPORTS, pos, Warnings.LeaksNotAccessibleUnexported(kindName(what), what, what.packge().modle)); + log.warning(pos, LintWarnings.LeaksNotAccessibleUnexported(kindName(what), what, what.packge().modle)); return ; } if (whatExport.modules != null) { if (inExport.modules == null || !whatExport.modules.containsAll(inExport.modules)) { - log.warning(LintCategory.EXPORTS, pos, Warnings.LeaksNotAccessibleUnexportedQualified(kindName(what), what, what.packge().modle)); + log.warning(pos, LintWarnings.LeaksNotAccessibleUnexportedQualified(kindName(what), what, what.packge().modle)); } } @@ -4697,36 +4655,32 @@ private void checkVisible(DiagnosticPosition pos, Symbol what, PackageSymbol inP } } - log.warning(LintCategory.EXPORTS, pos, Warnings.LeaksNotAccessibleNotRequiredTransitive(kindName(what), what, what.packge().modle)); + log.warning(pos, LintWarnings.LeaksNotAccessibleNotRequiredTransitive(kindName(what), what, what.packge().modle)); } } void checkModuleExists(final DiagnosticPosition pos, ModuleSymbol msym) { if (msym.kind != MDL) { - deferredLintHandler.report(_l -> { - if (lint.isEnabled(LintCategory.MODULE)) - log.warning(LintCategory.MODULE, pos, Warnings.ModuleNotFound(msym)); - }); + deferredLintHandler.report(_ -> + lint.logIfEnabled(log, pos, LintWarnings.ModuleNotFound(msym))); } } void checkPackageExistsForOpens(final DiagnosticPosition pos, PackageSymbol packge) { if (packge.members().isEmpty() && ((packge.flags() & Flags.HAS_RESOURCE) == 0)) { - deferredLintHandler.report(_l -> { - if (lint.isEnabled(LintCategory.OPENS)) - log.warning(pos, Warnings.PackageEmptyOrNotFound(packge)); - }); + deferredLintHandler.report(_ -> + lint.logIfEnabled(log, pos, LintWarnings.PackageEmptyOrNotFound(packge))); } } void checkModuleRequires(final DiagnosticPosition pos, final RequiresDirective rd) { if ((rd.module.flags() & Flags.AUTOMATIC_MODULE) != 0) { - deferredLintHandler.report(_l -> { + deferredLintHandler.report(_ -> { if (rd.isTransitive() && lint.isEnabled(LintCategory.REQUIRES_TRANSITIVE_AUTOMATIC)) { - log.warning(pos, Warnings.RequiresTransitiveAutomatic); - } else if (lint.isEnabled(LintCategory.REQUIRES_AUTOMATIC)) { - log.warning(pos, Warnings.RequiresAutomatic); + log.warning(pos, LintWarnings.RequiresTransitiveAutomatic); + } else { + lint.logIfEnabled(log, pos, LintWarnings.RequiresAutomatic); } }); } @@ -5024,7 +4978,7 @@ public Void visitTypeAsClass(TypeElement e, } if (svuidSym == null) { - log.warning(LintCategory.SERIAL, p.pos(), Warnings.MissingSVUID(c)); + log.warning(p.pos(), LintWarnings.MissingSVUID(c)); } // Check for serialPersistentFields to gate checks for @@ -5051,9 +5005,9 @@ public Void visitTypeAsClass(TypeElement e, // Note per JLS arrays are // serializable even if the // component type is not. - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(enclosed, tree), - Warnings.NonSerializableInstanceField); + log.warning( + TreeInfo.diagnosticPositionFor(enclosed, tree), + LintWarnings.NonSerializableInstanceField); } else if (varType.hasTag(ARRAY)) { ArrayType arrayType = (ArrayType)varType; Type elementType = arrayType.elemtype; @@ -5062,9 +5016,9 @@ public Void visitTypeAsClass(TypeElement e, elementType = arrayType.elemtype; } if (!canBeSerialized(elementType)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(enclosed, tree), - Warnings.NonSerializableInstanceFieldArray(elementType)); + log.warning( + TreeInfo.diagnosticPositionFor(enclosed, tree), + LintWarnings.NonSerializableInstanceFieldArray(elementType)); } } } @@ -5147,8 +5101,8 @@ private void checkCtorAccess(JCClassDecl tree, ClassSymbol c) { } } } - log.warning(LintCategory.SERIAL, tree.pos(), - Warnings.ExternalizableMissingPublicNoArgCtor); + log.warning(tree.pos(), + LintWarnings.ExternalizableMissingPublicNoArgCtor); } else { // Approximate access to the no-arg constructor up in // the superclass chain by checking that the @@ -5175,8 +5129,8 @@ private void checkCtorAccess(JCClassDecl tree, ClassSymbol c) { // Handle nested classes and implicit this$0 (supertype.getNestingKind() == NestingKind.MEMBER && ((supertype.flags() & STATIC) == 0))) - log.warning(LintCategory.SERIAL, tree.pos(), - Warnings.SerializableMissingAccessNoArgCtor(supertype.getQualifiedName())); + log.warning(tree.pos(), + LintWarnings.SerializableMissingAccessNoArgCtor(supertype.getQualifiedName())); } } } @@ -5194,43 +5148,43 @@ private void checkSerialVersionUID(JCClassDecl tree, Element e, VarSymbol svuid) // fields. if ((svuid.flags() & (STATIC | FINAL)) != (STATIC | FINAL)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(svuid, tree), - Warnings.ImproperSVUID((Symbol)e)); + log.warning( + TreeInfo.diagnosticPositionFor(svuid, tree), + LintWarnings.ImproperSVUID((Symbol)e)); } // check svuid has type long if (!svuid.type.hasTag(LONG)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(svuid, tree), - Warnings.LongSVUID((Symbol)e)); + log.warning( + TreeInfo.diagnosticPositionFor(svuid, tree), + LintWarnings.LongSVUID((Symbol)e)); } if (svuid.getConstValue() == null) - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(svuid, tree), - Warnings.ConstantSVUID((Symbol)e)); + log.warning( + TreeInfo.diagnosticPositionFor(svuid, tree), + LintWarnings.ConstantSVUID((Symbol)e)); } private void checkSerialPersistentFields(JCClassDecl tree, Element e, VarSymbol spf) { // To be effective, serialPersisentFields must be private, static, and final. if ((spf.flags() & (PRIVATE | STATIC | FINAL)) != (PRIVATE | STATIC | FINAL)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(spf, tree), - Warnings.ImproperSPF); + log.warning( + TreeInfo.diagnosticPositionFor(spf, tree), + LintWarnings.ImproperSPF); } if (!types.isSameType(spf.type, OSF_TYPE)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(spf, tree), - Warnings.OSFArraySPF); + log.warning( + TreeInfo.diagnosticPositionFor(spf, tree), + LintWarnings.OSFArraySPF); } if (isExternalizable((Type)(e.asType()))) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(spf, tree), - Warnings.IneffectualSerialFieldExternalizable); + log.warning( + TreeInfo.diagnosticPositionFor(spf, tree), + LintWarnings.IneffectualSerialFieldExternalizable); } // Warn if serialPersistentFields is initialized to a @@ -5240,8 +5194,8 @@ private void checkSerialPersistentFields(JCClassDecl tree, Element e, VarSymbol JCVariableDecl variableDef = (JCVariableDecl) spfDecl; JCExpression initExpr = variableDef.init; if (initExpr != null && TreeInfo.isNull(initExpr)) { - log.warning(LintCategory.SERIAL, initExpr.pos(), - Warnings.SPFNullInit); + log.warning(initExpr.pos(), + LintWarnings.SPFNullInit); } } } @@ -5319,24 +5273,24 @@ private void checkReadExternalRecord(JCClassDecl tree, Element e, MethodSymbol m private void checkExternMethodRecord(JCClassDecl tree, Element e, MethodSymbol method, Type argType, boolean isExtern) { if (isExtern && isExternMethod(tree, e, method, argType)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.IneffectualExternalizableMethodRecord(method.getSimpleName().toString())); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.IneffectualExternalizableMethodRecord(method.getSimpleName().toString())); } } void checkPrivateNonStaticMethod(JCClassDecl tree, MethodSymbol method) { var flags = method.flags(); if ((flags & PRIVATE) == 0) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.SerialMethodNotPrivate(method.getSimpleName())); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.SerialMethodNotPrivate(method.getSimpleName())); } if ((flags & STATIC) != 0) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.SerialMethodStatic(method.getSimpleName())); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.SerialMethodStatic(method.getSimpleName())); } } @@ -5359,18 +5313,18 @@ public Void visitTypeAsEnum(TypeElement e, case FIELD -> { var field = (VarSymbol)enclosed; if (serialFieldNames.contains(name)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(field, tree), - Warnings.IneffectualSerialFieldEnum(name)); + log.warning( + TreeInfo.diagnosticPositionFor(field, tree), + LintWarnings.IneffectualSerialFieldEnum(name)); } } case METHOD -> { var method = (MethodSymbol)enclosed; if (serialMethodNames.contains(name)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.IneffectualSerialMethodEnum(name)); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.IneffectualSerialMethodEnum(name)); } if (isExtern) { @@ -5408,9 +5362,9 @@ private void checkReadExternalEnum(JCClassDecl tree, Element e, MethodSymbol met private void checkExternMethodEnum(JCClassDecl tree, Element e, MethodSymbol method, Type argType) { if (isExternMethod(tree, e, method, argType)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.IneffectualExternMethodEnum(method.getSimpleName().toString())); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.IneffectualExternMethodEnum(method.getSimpleName().toString())); } } @@ -5440,9 +5394,9 @@ public Void visitTypeAsInterface(TypeElement e, name = field.getSimpleName().toString(); switch(name) { case "serialPersistentFields" -> { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(field, tree), - Warnings.IneffectualSerialFieldInterface); + log.warning( + TreeInfo.diagnosticPositionFor(field, tree), + LintWarnings.IneffectualSerialFieldInterface); } case "serialVersionUID" -> { @@ -5480,9 +5434,9 @@ private void checkPrivateMethod(JCClassDecl tree, Element e, MethodSymbol method) { if ((method.flags() & PRIVATE) == 0) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.NonPrivateMethodWeakerAccess); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.NonPrivateMethodWeakerAccess); } } @@ -5490,9 +5444,9 @@ private void checkDefaultIneffective(JCClassDecl tree, Element e, MethodSymbol method) { if ((method.flags() & DEFAULT) == DEFAULT) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.DefaultIneffective); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.DefaultIneffective); } } @@ -5537,9 +5491,9 @@ public Void visitTypeAsRecord(TypeElement e, var field = (VarSymbol)enclosed; switch(name) { case "serialPersistentFields" -> { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(field, tree), - Warnings.IneffectualSerialFieldRecord); + log.warning( + TreeInfo.diagnosticPositionFor(field, tree), + LintWarnings.IneffectualSerialFieldRecord); } case "serialVersionUID" -> { @@ -5561,9 +5515,9 @@ public Void visitTypeAsRecord(TypeElement e, default -> { if (serialMethodNames.contains(name)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.IneffectualSerialMethodRecord(name)); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.IneffectualSerialMethodRecord(name)); } }} }}}); @@ -5575,9 +5529,9 @@ void checkConcreteInstanceMethod(JCClassDecl tree, Element enclosing, MethodSymbol method) { if ((method.flags() & (STATIC | ABSTRACT)) != 0) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.SerialConcreteInstanceMethod(method.getSimpleName())); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.SerialConcreteInstanceMethod(method.getSimpleName())); } } @@ -5592,9 +5546,9 @@ private void checkReturnType(JCClassDecl tree, // checking. Type rtype = method.getReturnType(); if (!types.isSameType(expectedReturnType, rtype)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.SerialMethodUnexpectedReturnType(method.getSimpleName(), + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.SerialMethodUnexpectedReturnType(method.getSimpleName(), rtype, expectedReturnType)); } } @@ -5608,17 +5562,17 @@ private void checkOneArg(JCClassDecl tree, var parameters= method.getParameters(); if (parameters.size() != 1) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.SerialMethodOneArg(method.getSimpleName(), parameters.size())); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.SerialMethodOneArg(method.getSimpleName(), parameters.size())); return; } Type parameterType = parameters.get(0).asType(); if (!types.isSameType(parameterType, expectedType)) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.SerialMethodParameterType(method.getSimpleName(), + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.SerialMethodParameterType(method.getSimpleName(), expectedType, parameterType)); } @@ -5637,18 +5591,18 @@ private boolean hasExactlyOneArgWithType(JCClassDecl tree, private void checkNoArgs(JCClassDecl tree, Element enclosing, MethodSymbol method) { var parameters = method.getParameters(); if (!parameters.isEmpty()) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(parameters.get(0), tree), - Warnings.SerialMethodNoArgs(method.getSimpleName())); + log.warning( + TreeInfo.diagnosticPositionFor(parameters.get(0), tree), + LintWarnings.SerialMethodNoArgs(method.getSimpleName())); } } private void checkExternalizable(JCClassDecl tree, Element enclosing, MethodSymbol method) { // If the enclosing class is externalizable, warn for the method if (isExternalizable((Type)enclosing.asType())) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.IneffectualSerialMethodExternalizable(method.getSimpleName())); + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.IneffectualSerialMethodExternalizable(method.getSimpleName())); } return; } @@ -5675,9 +5629,9 @@ private void checkExceptions(JCClassDecl tree, } } if (!declared) { - log.warning(LintCategory.SERIAL, - TreeInfo.diagnosticPositionFor(method, tree), - Warnings.SerialMethodUnexpectedException(method.getSimpleName(), + log.warning( + TreeInfo.diagnosticPositionFor(method, tree), + LintWarnings.SerialMethodUnexpectedException(method.getSimpleName(), thrownType)); } } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java index df28548152a..e167b81272b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java @@ -34,11 +34,11 @@ import java.util.Set; import java.util.function.Consumer; -import com.sun.source.tree.CaseTree; import com.sun.source.tree.LambdaExpressionTree.BodyKind; import com.sun.tools.javac.code.*; import com.sun.tools.javac.code.Scope.WriteableScope; import com.sun.tools.javac.resources.CompilerProperties.Errors; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.tree.*; import com.sun.tools.javac.util.*; @@ -60,8 +60,6 @@ import static com.sun.tools.javac.tree.JCTree.Tag.*; import com.sun.tools.javac.util.JCDiagnostic.Fragment; import java.util.Arrays; -import java.util.Collections; -import java.util.IdentityHashMap; import java.util.Iterator; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -726,11 +724,9 @@ public void visitSwitch(JCSwitch tree) { } // Warn about fall-through if lint switch fallthrough enabled. if (alive == Liveness.ALIVE && - lint.isEnabled(Lint.LintCategory.FALLTHROUGH) && c.stats.nonEmpty() && l.tail.nonEmpty()) - log.warning(Lint.LintCategory.FALLTHROUGH, - l.tail.head.pos(), - Warnings.PossibleFallThroughIntoCase); + lint.logIfEnabled(log, l.tail.head.pos(), + LintWarnings.PossibleFallThroughIntoCase); } tree.isExhaustive = tree.hasUnconditionalPattern || TreeInfo.isErrorEnumSwitch(tree.selector, tree.cases); @@ -1237,11 +1233,8 @@ public void visitTry(JCTry tree) { scanStat(tree.finalizer); tree.finallyCanCompleteNormally = alive != Liveness.DEAD; if (alive == Liveness.DEAD) { - if (lint.isEnabled(Lint.LintCategory.FINALLY)) { - log.warning(Lint.LintCategory.FINALLY, - TreeInfo.diagEndPos(tree.finalizer), - Warnings.FinallyCannotComplete); - } + lint.logIfEnabled(log, TreeInfo.diagEndPos(tree.finalizer), + LintWarnings.FinallyCannotComplete); } else { while (exits.nonEmpty()) { pendingExits.append(exits.next()); @@ -2863,8 +2856,8 @@ public void visitTry(JCTry tree) { lint.isEnabled(Lint.LintCategory.TRY)) { for (JCVariableDecl resVar : resourceVarDecls) { if (unrefdResources.includes(resVar.sym) && !resVar.sym.isUnnamedVariable()) { - log.warning(Lint.LintCategory.TRY, resVar.pos(), - Warnings.TryResourceNotReferenced(resVar.sym)); + log.warning(resVar.pos(), + LintWarnings.TryResourceNotReferenced(resVar.sym)); unrefdResources.remove(resVar.sym); } } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java index bfad334d194..97f961f09bf 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java @@ -52,7 +52,6 @@ import javax.tools.StandardLocation; import com.sun.source.tree.ModuleTree.ModuleKind; -import com.sun.tools.javac.code.ClassFinder; import com.sun.tools.javac.code.DeferredLintHandler; import com.sun.tools.javac.code.Directive; import com.sun.tools.javac.code.Directive.ExportsDirective; @@ -88,6 +87,7 @@ import com.sun.tools.javac.jvm.Target; import com.sun.tools.javac.main.Option; import com.sun.tools.javac.resources.CompilerProperties.Errors; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; @@ -1275,8 +1275,8 @@ private void setupAllModules() { if (lintOptions) { for (ModuleSymbol msym : limitMods) { if (!observable.contains(msym)) { - log.warning(LintCategory.OPTIONS, - Warnings.ModuleForOptionNotFound(Option.LIMIT_MODULES, msym)); + log.warning( + LintWarnings.ModuleForOptionNotFound(Option.LIMIT_MODULES, msym)); } } } @@ -1381,7 +1381,7 @@ private void setupAllModules() { .collect(Collectors.joining(",")); if (!incubatingModules.isEmpty()) { - log.warning(Warnings.IncubatingModules(incubatingModules)); + log.warning(LintWarnings.IncubatingModules(incubatingModules)); } } @@ -1731,8 +1731,8 @@ private boolean isKnownModule(ModuleSymbol msym, Set unknownModule if (!unknownModules.contains(msym)) { if (lintOptions) { - log.warning(LintCategory.OPTIONS, - Warnings.ModuleForOptionNotFound(Option.ADD_EXPORTS, msym)); + log.warning( + LintWarnings.ModuleForOptionNotFound(Option.ADD_EXPORTS, msym)); } unknownModules.add(msym); } @@ -1770,7 +1770,7 @@ private void initAddReads() { ModuleSymbol msym = syms.enterModule(names.fromString(sourceName)); if (!allModules.contains(msym)) { if (lintOptions) { - log.warning(Warnings.ModuleForOptionNotFound(Option.ADD_READS, msym)); + log.warning(LintWarnings.ModuleForOptionNotFound(Option.ADD_READS, msym)); } continue; } @@ -1790,7 +1790,7 @@ private void initAddReads() { targetModule = syms.enterModule(names.fromString(targetName)); if (!allModules.contains(targetModule)) { if (lintOptions) { - log.warning(LintCategory.OPTIONS, Warnings.ModuleForOptionNotFound(Option.ADD_READS, targetModule)); + log.warning(LintWarnings.ModuleForOptionNotFound(Option.ADD_READS, targetModule)); } continue; } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java index 0876aa0d5a0..e1bf92a7f7b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java @@ -31,12 +31,10 @@ import java.util.LinkedHashMap; import java.util.EnumSet; import java.util.HashSet; -import java.util.Map.Entry; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; -import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.BiPredicate; import java.util.function.Consumer; import java.util.function.Function; @@ -53,6 +51,7 @@ import com.sun.tools.javac.code.Symtab; import com.sun.tools.javac.code.Type; import com.sun.tools.javac.code.Types; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.JCTree.*; @@ -63,7 +62,6 @@ import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; import com.sun.tools.javac.util.List; import com.sun.tools.javac.util.Log; -import com.sun.tools.javac.util.Name; import com.sun.tools.javac.util.Names; import com.sun.tools.javac.util.Pair; @@ -424,12 +422,12 @@ private boolean currentClassIsExternallyExtendable() { previous = warning; // Emit warnings showing the entire stack trace - JCDiagnostic.Warning key = Warnings.PossibleThisEscape; + JCDiagnostic.Warning key = LintWarnings.PossibleThisEscape; int remain = warning.length; do { DiagnosticPosition pos = warning[--remain]; - log.warning(Lint.LintCategory.THIS_ESCAPE, pos, key); - key = Warnings.PossibleThisEscapeLocation; + log.warning(pos, key); + key = LintWarnings.PossibleThisEscapeLocation; } while (remain > 0); } warningList.clear(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java index 3999cf0c36b..646db6a6bf3 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java @@ -29,8 +29,6 @@ import java.io.InputStream; import java.lang.ref.SoftReference; import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.net.URL; import java.net.URLClassLoader; import java.nio.ByteBuffer; @@ -41,7 +39,6 @@ import java.nio.charset.CodingErrorAction; import java.nio.charset.IllegalCharsetNameException; import java.nio.charset.UnsupportedCharsetException; -import java.nio.file.Files; import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.util.Collection; @@ -56,13 +53,12 @@ import javax.tools.JavaFileObject; import javax.tools.JavaFileObject.Kind; -import com.sun.tools.javac.code.Lint.LintCategory; import com.sun.tools.javac.main.Option; import com.sun.tools.javac.main.OptionHelper; import com.sun.tools.javac.main.OptionHelper.GrumpyHelper; import com.sun.tools.javac.resources.CompilerProperties.Errors; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; -import com.sun.tools.javac.util.Abort; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.DefinedBy; import com.sun.tools.javac.util.DefinedBy.Api; @@ -529,6 +525,6 @@ synchronized void newOutputToPath(Path path) throws IOException { // Check whether we've already opened this file for output if (!outputFilesWritten.add(realPath)) - log.warning(LintCategory.OUTPUT_FILE_CLASH, Warnings.OutputFileClash(path)); + log.warning(LintWarnings.OutputFileClash(path)); } } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java index 9da2052b9f3..3a6ed52cc79 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java @@ -77,10 +77,10 @@ import javax.tools.StandardJavaFileManager.PathFactory; import javax.tools.StandardLocation; +import com.sun.tools.javac.code.Lint; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import jdk.internal.jmod.JmodFile; -import com.sun.tools.javac.code.Lint; -import com.sun.tools.javac.code.Lint.LintCategory; import com.sun.tools.javac.main.Option; import com.sun.tools.javac.resources.CompilerProperties.Errors; import com.sun.tools.javac.resources.CompilerProperties.Warnings; @@ -224,7 +224,7 @@ private Iterable getPathEntries(String searchPath, Path emptyPathDefault) entries.add(getPath(s)); } catch (IllegalArgumentException e) { if (warn) { - log.warning(LintCategory.PATH, Warnings.InvalidPath(s)); + log.warning(LintWarnings.InvalidPath(s)); } } } @@ -319,8 +319,8 @@ public SearchPath addDirectories(String dirs) { private void addDirectory(Path dir, boolean warn) { if (!Files.isDirectory(dir)) { if (warn) { - log.warning(Lint.LintCategory.PATH, - Warnings.DirPathElementNotFound(dir)); + log.warning( + LintWarnings.DirPathElementNotFound(dir)); } return; } @@ -365,8 +365,8 @@ public void addFile(Path file, boolean warn) { if (!fsInfo.exists(file)) { /* No such file or directory exists */ if (warn) { - log.warning(Lint.LintCategory.PATH, - Warnings.PathElementNotFound(file)); + log.warning( + LintWarnings.PathElementNotFound(file)); } super.add(file); return; @@ -388,14 +388,14 @@ public void addFile(Path file, boolean warn) { try { FileSystems.newFileSystem(file, (ClassLoader)null).close(); if (warn) { - log.warning(Lint.LintCategory.PATH, - Warnings.UnexpectedArchiveFile(file)); + log.warning( + LintWarnings.UnexpectedArchiveFile(file)); } } catch (IOException | ProviderNotFoundException e) { // FIXME: include e.getLocalizedMessage in warning if (warn) { - log.warning(Lint.LintCategory.PATH, - Warnings.InvalidArchiveFile(file)); + log.warning( + LintWarnings.InvalidArchiveFile(file)); } return; } @@ -1660,9 +1660,9 @@ void add(Map> map, Path prefix, Path suffix) { if (!Files.isDirectory(prefix)) { if (warn) { Warning key = Files.exists(prefix) - ? Warnings.DirPathElementNotDirectory(prefix) - : Warnings.DirPathElementNotFound(prefix); - log.warning(Lint.LintCategory.PATH, key); + ? LintWarnings.DirPathElementNotDirectory(prefix) + : LintWarnings.DirPathElementNotFound(prefix); + log.warning(key); } return; } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java index f70b96697b3..7147e972898 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java @@ -64,6 +64,7 @@ import com.sun.tools.javac.main.Option; import com.sun.tools.javac.resources.CompilerProperties.Errors; import com.sun.tools.javac.resources.CompilerProperties.Fragments; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.util.*; import com.sun.tools.javac.util.ByteBuffer.UnderflowException; @@ -855,8 +856,8 @@ protected boolean accepts(AttributeKind kind) { if (lintClassfile && !warnedAttrs.contains(name)) { JavaFileObject prev = log.useSource(currentClassFile); try { - log.warning(LintCategory.CLASSFILE, (DiagnosticPosition) null, - Warnings.FutureAttr(name, version.major, version.minor, majorVersion, minorVersion)); + log.warning((DiagnosticPosition) null, + LintWarnings.FutureAttr(name, version.major, version.minor, majorVersion, minorVersion)); } finally { log.useSource(prev); } @@ -1610,7 +1611,7 @@ void readParameterAnnotations(Symbol meth) { //the RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations //provide annotations for a different number of parameters, ignore: if (lintClassfile) { - log.warning(LintCategory.CLASSFILE, Warnings.RuntimeVisibleInvisibleParamAnnotationsMismatch(currentClassFile)); + log.warning(LintWarnings.RuntimeVisibleInvisibleParamAnnotationsMismatch(currentClassFile)); } for (int pnum = 0; pnum < numParameters; pnum++) { readAnnotations(); @@ -2078,9 +2079,9 @@ MethodSymbol findAccessMethod(Type container, Name name) { try { if (lintClassfile) { if (failure == null) { - log.warning(Warnings.AnnotationMethodNotFound(container, name)); + log.warning(LintWarnings.AnnotationMethodNotFound(container, name)); } else { - log.warning(Warnings.AnnotationMethodNotFoundReason(container, + log.warning(LintWarnings.AnnotationMethodNotFoundReason(container, name, failure.getDetailValue()));//diagnostic, if present } @@ -2960,7 +2961,7 @@ void adjustParameterAnnotations(MethodSymbol sym, Type methodDescriptor, private void dropParameterAnnotations() { parameterAnnotations = null; if (lintClassfile) { - log.warning(LintCategory.CLASSFILE, Warnings.RuntimeInvisibleParameterAnnotations(currentClassFile)); + log.warning(LintWarnings.RuntimeInvisibleParameterAnnotations(currentClassFile)); } } /** diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java index 2af50832f96..1e8b85eb143 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java @@ -63,6 +63,7 @@ import com.sun.tools.javac.platform.PlatformUtils; import com.sun.tools.javac.resources.CompilerProperties.Errors; import com.sun.tools.javac.resources.CompilerProperties.Fragments; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.JCDiagnostic; @@ -497,7 +498,7 @@ public boolean validate() { if (lintPaths) { Path outDirParent = outDir.getParent(); if (outDirParent != null && Files.exists(outDirParent.resolve("module-info.class"))) { - log.warning(LintCategory.PATH, Warnings.OutdirIsInExplodedModule(outDir)); + log.warning(LintWarnings.OutdirIsInExplodedModule(outDir)); } } } @@ -571,10 +572,10 @@ public boolean validate() { if (fm instanceof BaseFileManager baseFileManager) { if (source.compareTo(Source.JDK8) <= 0) { if (baseFileManager.isDefaultBootClassPath()) - log.warning(LintCategory.OPTIONS, Warnings.SourceNoBootclasspath(source.name, releaseNote(source, targetString))); + log.warning(LintWarnings.SourceNoBootclasspath(source.name, releaseNote(source, targetString))); } else { if (baseFileManager.isDefaultSystemModulesPath()) - log.warning(LintCategory.OPTIONS, Warnings.SourceNoSystemModulesPath(source.name, releaseNote(source, targetString))); + log.warning(LintWarnings.SourceNoSystemModulesPath(source.name, releaseNote(source, targetString))); } } } @@ -584,14 +585,14 @@ public boolean validate() { if (source.compareTo(Source.MIN) < 0) { log.error(Errors.OptionRemovedSource(source.name, Source.MIN.name)); } else if (source == Source.MIN && lintOptions) { - log.warning(LintCategory.OPTIONS, Warnings.OptionObsoleteSource(source.name)); + log.warning(LintWarnings.OptionObsoleteSource(source.name)); obsoleteOptionFound = true; } if (target.compareTo(Target.MIN) < 0) { log.error(Errors.OptionRemovedTarget(target, Target.MIN)); } else if (target == Target.MIN && lintOptions) { - log.warning(LintCategory.OPTIONS, Warnings.OptionObsoleteTarget(target)); + log.warning(LintWarnings.OptionObsoleteTarget(target)); obsoleteOptionFound = true; } @@ -625,7 +626,7 @@ public boolean validate() { } if (obsoleteOptionFound && lintOptions) { - log.warning(LintCategory.OPTIONS, Warnings.OptionObsoleteSuppression); + log.warning(LintWarnings.OptionObsoleteSuppression); } SourceVersion sv = Source.toSourceVersion(source); @@ -636,7 +637,7 @@ public boolean validate() { validateDefaultModuleForCreatedFiles(sv); if (lintOptions && options.isSet(Option.ADD_OPENS)) { - log.warning(LintCategory.OPTIONS, Warnings.AddopensIgnored); + log.warning(LintWarnings.AddopensIgnored); } return !errors && (log.nerrors == 0); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java index a38658a315e..b25ca99eb88 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java @@ -33,14 +33,13 @@ import com.sun.tools.javac.file.JavacFileManager; import com.sun.tools.javac.parser.Tokens.Comment.CommentStyle; import com.sun.tools.javac.resources.CompilerProperties.Errors; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.tree.EndPosTable; -import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.util.*; import com.sun.tools.javac.util.JCDiagnostic.*; import java.nio.CharBuffer; -import java.util.Iterator; import java.util.Set; import static com.sun.tools.javac.parser.Tokens.*; @@ -222,13 +221,12 @@ protected void lexError(DiagnosticFlag flags, int pos, JCDiagnostic.Error key) { /** * Report an error at the given position using the provided arguments. * - * @param lc lint category. * @param pos position in input buffer. * @param key error key to report. */ - protected void lexWarning(LintCategory lc, int pos, JCDiagnostic.Warning key) { + protected void lexWarning(int pos, JCDiagnostic.Warning key) { DiagnosticPosition dp = new SimpleDiagnosticPosition(pos) ; - log.warning(lc, dp, key); + log.warning(dp, key); } /** @@ -1075,12 +1073,12 @@ public Token readToken() { Set checks = TextBlockSupport.checkWhitespace(string); if (checks.contains(TextBlockSupport.WhitespaceChecks.INCONSISTENT)) { - lexWarning(LintCategory.TEXT_BLOCKS, pos, - Warnings.InconsistentWhiteSpaceIndentation); + lexWarning(pos, + LintWarnings.InconsistentWhiteSpaceIndentation); } if (checks.contains(TextBlockSupport.WhitespaceChecks.TRAILING)) { - lexWarning(LintCategory.TEXT_BLOCKS, pos, - Warnings.TrailingWhiteSpaceWillBeRemoved); + lexWarning(pos, + LintWarnings.TrailingWhiteSpaceWillBeRemoved); } } // Remove incidental indentation. 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 d975a6c927a..1413c511913 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 @@ -42,6 +42,7 @@ import com.sun.tools.javac.parser.Tokens.*; import com.sun.tools.javac.resources.CompilerProperties.Errors; import com.sun.tools.javac.resources.CompilerProperties.Fragments; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.tree.*; import com.sun.tools.javac.tree.JCTree.*; @@ -669,8 +670,8 @@ void reportDanglingDocComment(Comment c) { deferredLintHandler.report(lint -> { if (lint.isEnabled(Lint.LintCategory.DANGLING_DOC_COMMENTS) && !shebang(c, pos)) { - log.warning(Lint.LintCategory.DANGLING_DOC_COMMENTS, - pos, Warnings.DanglingDocComment); + log.warning( + pos, LintWarnings.DanglingDocComment); } }); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java index 1c3f8ba96f8..3f30bee31f9 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java @@ -57,6 +57,7 @@ import com.sun.tools.javac.code.Symtab; import com.sun.tools.javac.comp.Modules; import com.sun.tools.javac.model.JavacElements; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.util.*; import com.sun.tools.javac.util.DefinedBy.Api; @@ -492,7 +493,7 @@ private JavaFileObject createSourceOrClassFile(ModuleSymbol mod, boolean isSourc String base = name.substring(periodIndex); String extn = (isSourceFile ? ".java" : ".class"); if (base.equals(extn)) - log.warning(Warnings.ProcSuspiciousClassName(name, extn)); + log.warning(LintWarnings.ProcSuspiciousClassName(name, extn)); } } checkNameAndExistence(mod, name, isSourceFile); @@ -708,7 +709,7 @@ private void checkName(String name) throws FilerException { private void checkName(String name, boolean allowUnnamedPackageInfo) throws FilerException { if (!SourceVersion.isName(name) && !isPackageInfo(name, allowUnnamedPackageInfo)) { if (lint) - log.warning(Warnings.ProcIllegalFileName(name)); + log.warning(LintWarnings.ProcIllegalFileName(name)); throw new FilerException("Illegal name " + name); } } @@ -737,11 +738,11 @@ private void checkNameAndExistence(ModuleSymbol mod, String typename, boolean al containedInInitialInputs(typename); if (alreadySeen) { if (lint) - log.warning(Warnings.ProcTypeRecreate(typename)); + log.warning(LintWarnings.ProcTypeRecreate(typename)); throw new FilerException("Attempt to recreate a file for type " + typename); } if (lint && existing != null) { - log.warning(Warnings.ProcTypeAlreadyExists(typename)); + log.warning(LintWarnings.ProcTypeAlreadyExists(typename)); } if (!mod.isUnnamed() && !typename.contains(".")) { throw new FilerException("Attempt to create a type in unnamed package of a named module: " + typename); @@ -771,7 +772,7 @@ private boolean containedInInitialInputs(String typename) { private void checkFileReopening(FileObject fileObject, boolean forWriting) throws FilerException { if (isInFileObjectHistory(fileObject, forWriting)) { if (lint) - log.warning(Warnings.ProcFileReopening(fileObject.getName())); + log.warning(LintWarnings.ProcFileReopening(fileObject.getName())); throw new FilerException("Attempt to reopen a file for path " + fileObject.getName()); } if (forWriting) diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java index 4ea1c488875..23e1e348cf9 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java @@ -66,6 +66,7 @@ import com.sun.tools.javac.platform.PlatformDescription; import com.sun.tools.javac.platform.PlatformDescription.PluginInfo; import com.sun.tools.javac.resources.CompilerProperties.Errors; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.tree.*; import com.sun.tools.javac.tree.JCTree.*; @@ -648,7 +649,7 @@ static class ProcessorState { add(importStringToPattern(allowModules, annotationPattern, processor, log, lint)); if (lint && !patternAdded) { - log.warning(Warnings.ProcDuplicateSupportedAnnotation(annotationPattern, + log.warning(LintWarnings.ProcDuplicateSupportedAnnotation(annotationPattern, p.getClass().getName())); } } @@ -662,7 +663,7 @@ static class ProcessorState { if (lint && supportedAnnotationPatterns.contains(MatchingUtils.validImportStringToPattern("*")) && supportedAnnotationPatterns.size() > 1) { - log.warning(Warnings.ProcRedundantTypesWithWildcard(p.getClass().getName())); + log.warning(LintWarnings.ProcRedundantTypesWithWildcard(p.getClass().getName())); } supportedOptionNames = new LinkedHashSet<>(); @@ -670,7 +671,7 @@ static class ProcessorState { if (checkOptionName(optionName, log)) { boolean optionAdded = supportedOptionNames.add(optionName); if (lint && !optionAdded) { - log.warning(Warnings.ProcDuplicateOptionName(optionName, + log.warning(LintWarnings.ProcDuplicateOptionName(optionName, p.getClass().getName())); } } @@ -891,7 +892,7 @@ private void discoverAndRunProcs(Set annotationsPresent, // Remove annotations processed by javac unmatchedAnnotations.keySet().removeAll(platformAnnotations); if (unmatchedAnnotations.size() > 0) { - log.warning(Warnings.ProcAnnotationsWithoutProcessors(unmatchedAnnotations.keySet())); + log.warning(LintWarnings.ProcAnnotationsWithoutProcessors(unmatchedAnnotations.keySet())); } } @@ -1688,7 +1689,7 @@ private static Pattern importStringToPattern(boolean allowModules, String s, Pro private static Pattern warnAndNoMatches(String s, Processor p, Log log, boolean lint) { if (lint) { - log.warning(Warnings.ProcMalformedSupportedString(s, p.getClass().getName())); + log.warning(LintWarnings.ProcMalformedSupportedString(s, p.getClass().getName())); } return noMatches; // won't match any valid identifier } 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 96944f698dd..13041b44ac0 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 @@ -708,9 +708,11 @@ compiler.err.not.in.profile=\ compiler.warn.forward.ref=\ reference to variable ''{0}'' before it has been initialized +# lint: this-escape compiler.warn.possible.this.escape=\ possible ''this'' escape before subclass is fully initialized +# lint: this-escape compiler.warn.possible.this.escape.location=\ previous possible ''this'' escape happens here via invocation @@ -731,9 +733,11 @@ compiler.err.illegal.line.end.in.char.lit=\ compiler.err.illegal.text.block.open=\ illegal text block open delimiter sequence, missing line terminator +# lint: text-blocks compiler.warn.inconsistent.white.space.indentation=\ inconsistent white space indentation +# lint: text-blocks compiler.warn.trailing.white.space.will.be.removed=\ trailing white space will be removed @@ -1591,6 +1595,7 @@ compiler.err.multi-module.outdir.cannot.be.exploded.module=\ in multi-module mode, the output directory cannot be an exploded module: {0} # 0: path +# lint: path compiler.warn.outdir.is.in.exploded.module=\ the output directory is within an exploded module: {0} @@ -1658,6 +1663,7 @@ compiler.warn.file.from.future=\ Modification date is in the future for file {0} # 0: path +# lint: output-file-clash compiler.warn.output.file.clash=\ output file written more than once: {0} @@ -1870,47 +1876,59 @@ compiler.warn.lintOption=\ [{0}]\u0020 # 0: symbol +# lint: serial compiler.warn.constant.SVUID=\ serialVersionUID must be constant in class {0} +# lint: dangling compiler.warn.dangling.doc.comment=\ documentation comment is not attached to any declaration # 0: path +# lint: path compiler.warn.dir.path.element.not.found=\ bad path element "{0}": no such directory # 0: file name +# lint: path compiler.warn.dir.path.element.not.directory=\ bad path element "{0}": not a directory # 0: symbol, 1: symbol, 2: symbol +# lint: missing-explicit-ctor compiler.warn.missing-explicit-ctor=\ class {0} in exported package {1} declares no explicit constructors, thereby exposing a default constructor to clients of module {2} +# lint: strictfp compiler.warn.strictfp=\ as of release 17, all floating-point expressions are evaluated strictly and ''strictfp'' is not required +# lint: finally compiler.warn.finally.cannot.complete=\ finally clause cannot complete normally # 0: name +# lint: module compiler.warn.poor.choice.for.module.name=\ module name component {0} should avoid terminal digits # 0: string +# lint: incubating compiler.warn.incubating.modules=\ using incubating module(s): {0} # 0: symbol, 1: symbol +# lint: deprecation compiler.warn.has.been.deprecated=\ {0} in {1} has been deprecated # 0: symbol, 1: symbol +# lint: removal compiler.warn.has.been.deprecated.for.removal=\ {0} in {1} has been deprecated and marked for removal # 0: symbol +# lint: preview compiler.warn.is.preview=\ {0} is a preview API and may be removed in a future release. @@ -1920,19 +1938,23 @@ compiler.err.is.preview=\ (use --enable-preview to enable preview APIs) # 0: symbol +# lint: preview compiler.warn.is.preview.reflective=\ {0} is a reflective preview API and may be removed in a future release. # 0: symbol, 1: symbol +# lint: restricted compiler.warn.restricted.method=\ {0}.{1} is a restricted method.\n\ (Restricted methods are unsafe and, if used incorrectly, might crash the Java runtime or corrupt memory) # 0: symbol +# lint: deprecation compiler.warn.has.been.deprecated.module=\ module {0} has been deprecated # 0: symbol +# lint: removal compiler.warn.has.been.deprecated.for.removal.module=\ module {0} has been deprecated and marked for removal @@ -1944,12 +1966,15 @@ compiler.warn.illegal.char.for.encoding=\ unmappable character for encoding {0} # 0: symbol +# lint: serial compiler.warn.improper.SVUID=\ serialVersionUID must be declared static final in class {0} +# lint: serial compiler.warn.improper.SPF=\ serialPersistentFields must be declared private static final to be effective +# lint: serial compiler.warn.SPF.null.init=\ serialPersistentFields ineffective if initialized to null.\n\ Initialize to an empty array to indicate no fields @@ -1972,112 +1997,141 @@ compiler.warn.unreachable.catch.1=\ thrown types {0} have already been caught # 0: symbol +# lint: serial compiler.warn.long.SVUID=\ serialVersionUID must be of type long in class {0} +# lint: serial compiler.warn.OSF.array.SPF=\ serialPersistentFields must be of type java.io.ObjectStreamField[] to be effective # 0: symbol +# lint: serial compiler.warn.missing.SVUID=\ serializable class {0} has no definition of serialVersionUID # 0: name +# lint: serial compiler.warn.serializable.missing.access.no.arg.ctor=\ cannot access a no-arg constructor in first non-serializable superclass {0} # 0: name +# lint: serial compiler.warn.serial.method.not.private=\ serialization-related method {0} not declared private # 0: name +# lint: serial compiler.warn.serial.concrete.instance.method=\ serialization-related method {0} must be a concrete instance method to be effective, neither abstract nor static # 0: name +# lint: serial compiler.warn.serial.method.static=\ serialization-related method {0} declared static; must instead be an instance method to be effective # 0: name +# lint: serial compiler.warn.serial.method.no.args=\ to be effective serialization-related method {0} must have no parameters # 0: name, 1: number +# lint: serial compiler.warn.serial.method.one.arg=\ to be effective serialization-related method {0} must have exactly one parameter rather than {1} parameters # 0: name, 1: type, 2: type +# lint: serial compiler.warn.serial.method.parameter.type=\ sole parameter of serialization-related method {0} must have type {1} to be effective rather than type {2} # 0: name, 1: type, 2: type +# lint: serial compiler.warn.serial.method.unexpected.return.type=\ serialization-related method {0} declared with a return type of {1} rather than expected type {2}.\n\ As declared, the method will be ineffective for serialization # 0: name, 1: type +# lint: serial compiler.warn.serial.method.unexpected.exception=\ serialization-related method {0} declared to throw an unexpected type {1} +# lint: serial compiler.warn.ineffectual.serial.field.interface=\ serialPersistentFields is not effective in an interface # 0: string +# lint: serial compiler.warn.ineffectual.serial.field.enum=\ serialization-related field {0} is not effective in an enum class # 0: string +# lint: serial compiler.warn.ineffectual.serial.method.enum=\ serialization-related method {0} is not effective in an enum class # 0: string +# lint: serial compiler.warn.ineffectual.extern.method.enum=\ externalization-related method {0} is not effective in an enum class +# lint: serial compiler.warn.ineffectual.serial.field.record=\ serialPersistentFields is not effective in a record class # 0: string +# lint: serial compiler.warn.ineffectual.serial.method.record=\ serialization-related method {0} is not effective in a record class # 0: string +# lint: serial compiler.warn.ineffectual.externalizable.method.record=\ externalization-related method {0} is not effective in a record class # 0: name +# lint: serial compiler.warn.ineffectual.serial.method.externalizable=\ serialization-related method {0} is not effective in an Externalizable class +# lint: serial compiler.warn.ineffectual.serial.field.externalizable=\ serialPersistentFields is not effective in an Externalizable class +# lint: serial compiler.warn.externalizable.missing.public.no.arg.ctor=\ an Externalizable class needs a public no-arg constructor +# lint: serial compiler.warn.non.serializable.instance.field=\ non-transient instance field of a serializable class declared with a non-serializable type # 0: type +# lint: serial compiler.warn.non.serializable.instance.field.array=\ non-transient instance field of a serializable class declared with an array having a non-serializable base component type {0} +# lint: serial compiler.warn.non.private.method.weaker.access=\ serialization-related method declared non-private in an interface will prevent\n\ classes implementing the interface from declaring the method as private +# lint: serial compiler.warn.default.ineffective=\ serialization-related default method from an interface will not be run by serialization for an implementing class # 0: symbol, 1: symbol, 2: symbol, 3: symbol +# lint: overloads compiler.warn.potentially.ambiguous.overload=\ {0} in {1} is potentially ambiguous with {2} in {3} # 0: message segment +# lint: overrides compiler.warn.override.varargs.missing=\ {0}; overridden method has no ''...'' # 0: message segment +# lint: overrides compiler.warn.override.varargs.extra=\ {0}; overriding method is missing ''...'' @@ -2090,13 +2144,16 @@ compiler.warn.pkg-info.already.seen=\ a package-info.java file has already been seen for package {0} # 0: path +# lint: path compiler.warn.path.element.not.found=\ bad path element "{0}": no such file or directory +# lint: fallthrough compiler.warn.possible.fall-through.into.case=\ possible fall-through into case # 0: type +# lint: cast compiler.warn.redundant.cast=\ redundant cast to {0} @@ -2114,18 +2171,22 @@ compiler.warn.invalid.utf8.in.classfile=\ {0}: classfile contains invalid UTF-8: {1} # 0: kind name, 1: symbol +# lint: static compiler.warn.static.not.qualified.by.type=\ static {0} should be qualified by type name, {1}, instead of by an expression # 0: kind name +# lint: static compiler.warn.static.not.qualified.by.type2=\ static {0} should not be used as a member of an anonymous class # 0: string, 1: fragment +# lint: options compiler.warn.source.no.bootclasspath=\ bootstrap class path is not set in conjunction with -source {0}\n{1} # 0: string, 1: fragment +# lint: options compiler.warn.source.no.system.modules.path=\ location of system modules is not set in conjunction with -source {0}\n{1} @@ -2150,10 +2211,12 @@ compiler.misc.source.no.system.modules.path.with.target=\ --release {0} is recommended instead of -source {0} -target {1} because it sets the location of system modules automatically # 0: string +# lint: options compiler.warn.option.obsolete.source=\ source value {0} is obsolete and will be removed in a future release # 0: target +# lint: options compiler.warn.option.obsolete.target=\ target value {0} is obsolete and will be removed in a future release @@ -2165,16 +2228,20 @@ compiler.err.option.removed.source=\ compiler.err.option.removed.target=\ Target option {0} is no longer supported. Use {1} or later. +# lint: options compiler.warn.option.obsolete.suppression=\ To suppress warnings about obsolete options, use -Xlint:-options. # 0: name, 1: number, 2: number, 3: number, 4: number +# lint: classfile compiler.warn.future.attr=\ {0} attribute introduced in version {1}.{2} class files is ignored in version {3}.{4} class files +# lint: requires-automatic compiler.warn.requires.automatic=\ requires directive for an automatic module +# lint: requires-transitive-automatic compiler.warn.requires.transitive.automatic=\ requires transitive directive for an automatic module @@ -2184,22 +2251,27 @@ compiler.warn.proc.package.does.not.exist=\ package {0} does not exist # 0: string +# lint: processing compiler.warn.proc.file.reopening=\ Attempt to create a file for ''{0}'' multiple times # 0: string +# lint: processing compiler.warn.proc.type.already.exists=\ A file for type ''{0}'' already exists on the sourcepath or classpath # 0: string +# lint: processing compiler.warn.proc.type.recreate=\ Attempt to create a file for type ''{0}'' multiple times # 0: string +# lint: processing compiler.warn.proc.illegal.file.name=\ Cannot create file for illegal name ''{0}''. # 0: string, 1: string +# lint: processing compiler.warn.proc.suspicious.class.name=\ Creating file for a type whose name ends in {1}: ''{0}'' @@ -2208,10 +2280,12 @@ compiler.warn.proc.file.create.last.round=\ File for type ''{0}'' created in the last round will not be subject to annotation processing. # 0: string, 1: string +# lint: processing compiler.warn.proc.malformed.supported.string=\ Malformed string ''{0}'' for a supported annotation interface returned by processor ''{1}'' # 0: set of string +# lint: processing compiler.warn.proc.annotations.without.processors=\ No processor claimed any of these annotations: {0} @@ -2220,15 +2294,18 @@ compiler.warn.proc.processor.incompatible.source.version=\ Supported source version ''{0}'' from annotation processor ''{1}'' less than -source ''{2}'' # 0: string, 1: string +# lint: processing compiler.warn.proc.duplicate.option.name=\ Duplicate supported option ''{0}'' returned by annotation processor ''{1}'' # 0: string, 1: string +# lint: processing compiler.warn.proc.duplicate.supported.annotation=\ Duplicate supported annotation interface ''{0}'' returned by annotation processor ''{1}'' # 0: string +# lint: processing compiler.warn.proc.redundant.types.with.wildcard=\ Annotation processor ''{0}'' redundantly supports both ''*'' and other annotation interfaces @@ -2256,57 +2333,71 @@ compiler.warn.proc.unclosed.type.files=\ compiler.warn.proc.unmatched.processor.options=\ The following options were not recognized by any processor: ''{0}'' +# lint: try compiler.warn.try.explicit.close.call=\ explicit call to close() on an auto-closeable resource # 0: symbol +# lint: try compiler.warn.try.resource.not.referenced=\ auto-closeable resource {0} is never referenced in body of corresponding try statement # 0: type +# lint: try compiler.warn.try.resource.throws.interrupted.exc=\ auto-closeable resource {0} has a member method close() that could throw InterruptedException +# lint: unchecked compiler.warn.unchecked.assign=\ unchecked assignment: {0} to {1} # 0: symbol, 1: type +# lint: unchecked compiler.warn.unchecked.assign.to.var=\ unchecked assignment to variable {0} as member of raw type {1} # 0: symbol, 1: type +# lint: unchecked compiler.warn.unchecked.call.mbr.of.raw.type=\ unchecked call to {0} as a member of the raw type {1} +# lint: unchecked compiler.warn.unchecked.cast.to.type=\ unchecked cast to type {0} # 0: kind name, 1: name, 2: object, 3: object, 4: kind name, 5: symbol +# lint: unchecked compiler.warn.unchecked.meth.invocation.applied=\ unchecked method invocation: {0} {1} in {4} {5} is applied to given types\n\ required: {2}\n\ found: {3} # 0: type +# lint: unchecked compiler.warn.unchecked.generic.array.creation=\ unchecked generic array creation for varargs parameter of type {0} # 0: type +# lint: unchecked compiler.warn.unchecked.varargs.non.reifiable.type=\ Possible heap pollution from parameterized vararg type {0} # 0: symbol +# lint: varargs compiler.warn.varargs.unsafe.use.varargs.param=\ Varargs method could cause heap pollution from non-reifiable varargs parameter {0} +# lint: dep-ann compiler.warn.missing.deprecated.annotation=\ deprecated item is not annotated with @Deprecated # 0: kind name +# lint: deprecation compiler.warn.deprecated.annotation.has.no.effect=\ @Deprecated annotation has no effect on this {0} declaration # 0: string +# lint: path compiler.warn.invalid.path=\ Invalid filename: {0} @@ -2319,10 +2410,12 @@ compiler.err.invalid.path=\ # 0: path +# lint: path compiler.warn.invalid.archive.file=\ Unexpected file on path: {0} # 0: path +# lint: path compiler.warn.unexpected.archive.file=\ Unexpected extension for archive file: {0} @@ -2330,17 +2423,21 @@ compiler.warn.unexpected.archive.file=\ compiler.err.no.zipfs.for.archive=\ No file system provider is available to handle this file: {0} +# lint: divzero compiler.warn.div.zero=\ division by zero +# lint: empty compiler.warn.empty.if=\ empty statement after if # 0: type, 1: name +# lint: classfile compiler.warn.annotation.method.not.found=\ Cannot find annotation method ''{1}()'' in type ''{0}'' # 0: type, 1: name, 2: message segment +# lint: classfile compiler.warn.annotation.method.not.found.reason=\ Cannot find annotation method ''{1}()'' in type ''{0}'': {2} @@ -2359,6 +2456,7 @@ compiler.warn.unknown.enum.constant.reason=\ reason: {3} # 0: type, 1: type +# lint: rawtypes compiler.warn.raw.class.use=\ found raw type: {0}\n\ missing type arguments for generic class {1} @@ -2376,14 +2474,17 @@ compiler.warn.method.redundant.typeargs=\ Redundant type arguments in method call. # 0: symbol, 1: message segment +# lint: varargs compiler.warn.varargs.redundant.trustme.anno=\ Redundant {0} annotation. {1} # 0: symbol +# lint: serial compiler.warn.access.to.member.from.serializable.element=\ access to member {0} from serializable element can be publicly accessible to untrusted code # 0: symbol +# lint: serial compiler.warn.access.to.member.from.serializable.lambda=\ access to member {0} from serializable lambda can be publicly accessible to untrusted code @@ -2541,12 +2642,14 @@ compiler.misc.bad.enclosing.method=\ bad enclosing method attribute for class {0} # 0: file name +# lint: classfile compiler.warn.runtime.visible.invisible.param.annotations.mismatch=\ the length of parameters in RuntimeVisibleParameterAnnotations attribute and \ RuntimeInvisibleParameterAnnotations attribute in: {0} \ do not match, ignoring both attributes # 0: file name +# lint: classfile compiler.warn.runtime.invisible.parameter.annotations=\ the RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes \ in: {0} \ @@ -2673,6 +2776,7 @@ compiler.misc.prob.found.req=\ incompatible types: {0} # 0: message segment, 1: type, 2: type +# lint: unchecked compiler.warn.prob.found.req=\ {0}\n\ required: {2}\n\ @@ -2687,6 +2791,7 @@ compiler.misc.possible.loss.of.precision=\ possible lossy conversion from {0} to {1} # 0: type, 1: type +# lint: lossy-conversions compiler.warn.possible.loss.of.precision=\ implicit cast from {0} to {1} in compound assignment is possibly lossy @@ -2862,6 +2967,7 @@ compiler.misc.varargs.argument.mismatch=\ ##### # 0: symbol or type, 1: file name +# lint: auxiliaryclass compiler.warn.auxiliary.class.accessed.from.outside.of.its.source.file=\ auxiliary class {0} in {1} should not be accessed from outside its own source file @@ -3066,16 +3172,19 @@ compiler.err.override.incompatible.ret=\ return type {1} is not compatible with {2} # 0: message segment, 1: type, 2: type +# lint: unchecked compiler.warn.override.unchecked.ret=\ {0}\n\ return type requires unchecked conversion from {1} to {2} # 0: message segment, 1: type +# lint: unchecked compiler.warn.override.unchecked.thrown=\ {0}\n\ overridden method does not throw {1} # 0: symbol +# lint: overrides compiler.warn.override.equals.but.not.hashcode=\ Class {0} overrides equals, but neither it nor any superclass overrides hashCode method @@ -3168,14 +3277,17 @@ compiler.err.preview.feature.disabled.classfile=\ (use --enable-preview to allow loading of class files which contain preview features) # 0: message segment (feature) +# lint: preview compiler.warn.preview.feature.use=\ {0} is a preview feature and may be removed in a future release. # 0: message segment (feature) +# lint: preview compiler.warn.preview.feature.use.plural=\ {0} are a preview feature and may be removed in a future release. # 0: file object (classfile), 1: string (expected version) +# lint: preview compiler.warn.preview.feature.use.classfile=\ class file for {0} uses preview features of Java SE {1}. @@ -3558,6 +3670,7 @@ compiler.err.module.not.found=\ module not found: {0} # 0: symbol +# lint: module compiler.warn.module.not.found=\ module not found: {0} @@ -3653,6 +3766,7 @@ compiler.err.package.empty.or.not.found=\ package is empty or does not exist: {0} # 0: symbol +# lint: opens compiler.warn.package.empty.or.not.found=\ package is empty or does not exist: {0} @@ -3736,6 +3850,7 @@ compiler.err.bad.name.for.option=\ bad name in value for {0} option: ''{1}'' # 0: option name, 1: symbol +# lint: options compiler.warn.module.for.option.not.found=\ module name in {0} option not found: {1} @@ -3751,6 +3866,7 @@ compiler.err.add.exports.with.release=\ compiler.err.add.reads.with.release=\ adding read edges for system module {0} is not allowed with --release +# lint: options compiler.warn.addopens.ignored=\ --add-opens has no effect at compile time @@ -3781,15 +3897,19 @@ compiler.warn.service.provided.but.not.exported.or.used=\ service interface provided but not exported or used # 0: kind name, 1: symbol, 2: symbol +# lint: exports compiler.warn.leaks.not.accessible=\ {0} {1} in module {2} is not accessible to clients that require this module # 0: kind name, 1: symbol, 2: symbol +# lint: exports compiler.warn.leaks.not.accessible.unexported=\ {0} {1} in module {2} is not exported # 0: kind name, 1: symbol, 2: symbol +# lint: exports compiler.warn.leaks.not.accessible.not.required.transitive=\ {0} {1} in module {2} is not indirectly exported using ''requires transitive'' # 0: kind name, 1: symbol, 2: symbol +# lint: exports compiler.warn.leaks.not.accessible.unexported.qualified=\ {0} {1} in module {2} may not be visible to all clients that require this module @@ -4119,9 +4239,11 @@ compiler.err.incorrect.number.of.nested.patterns=\ found: {1} # 0: kind name, 1: symbol +# lint: preview compiler.warn.declared.using.preview=\ {0} {1} is declared using a preview feature, which may be removed in a future release. +# lint: synchronization compiler.warn.attempt.to.synchronize.on.instance.of.value.based.class=\ attempt to synchronize on an instance of a value-based class diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractLog.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractLog.java index d303b5f710f..59730448bf5 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractLog.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractLog.java @@ -29,7 +29,6 @@ import java.util.Map; import javax.tools.JavaFileObject; -import com.sun.tools.javac.code.Lint.LintCategory; import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag; import com.sun.tools.javac.util.JCDiagnostic.Error; import com.sun.tools.javac.util.JCDiagnostic.Note; @@ -155,21 +154,14 @@ public void error(DiagnosticFlag flag, int pos, Error errorKey) { report(diags.error(flag, source, wrap(pos), errorKey)); } - /** Report a warning, unless suppressed by the -nowarn option or the - * maximum number of warnings has been reached. - * @param warningKey The key for the localized warning message. + /** + * Report a lint warning, unless suppressed by the -nowarn option or the + * maximum number of warnings has been reached. + * + * @param warningKey The key for the localized warning message. */ public void warning(Warning warningKey) { - report(diags.warning(null, source, null, warningKey)); - } - - /** Report a lint warning, unless suppressed by the -nowarn option or the - * maximum number of warnings has been reached. - * @param lc The lint category for the diagnostic - * @param warningKey The key for the localized warning message. - */ - public void warning(LintCategory lc, Warning warningKey) { - report(diags.warning(lc, null, null, warningKey)); + report(diags.warning(source, null, warningKey)); } /** Report a warning, unless suppressed by the -nowarn option or the @@ -178,17 +170,7 @@ public void warning(LintCategory lc, Warning warningKey) { * @param warningKey The key for the localized warning message. */ public void warning(DiagnosticPosition pos, Warning warningKey) { - report(diags.warning(null, source, pos, warningKey)); - } - - /** Report a lint warning, unless suppressed by the -nowarn option or the - * maximum number of warnings has been reached. - * @param lc The lint category for the diagnostic - * @param pos The source position at which to report the warning. - * @param warningKey The key for the localized warning message. - */ - public void warning(LintCategory lc, DiagnosticPosition pos, Warning warningKey) { - report(diags.warning(lc, source, pos, warningKey)); + report(diags.warning(source, pos, warningKey)); } /** Report a warning, unless suppressed by the -nowarn option or the @@ -197,7 +179,7 @@ public void warning(LintCategory lc, DiagnosticPosition pos, Warning warningKey) * @param warningKey The key for the localized warning message. */ public void warning(int pos, Warning warningKey) { - report(diags.warning(null, source, wrap(pos), warningKey)); + report(diags.warning(source, wrap(pos), warningKey)); } /** Report a warning. @@ -205,16 +187,7 @@ public void warning(int pos, Warning warningKey) { * @param warningKey The key for the localized warning message. */ public void mandatoryWarning(DiagnosticPosition pos, Warning warningKey) { - report(diags.mandatoryWarning(null, source, pos, warningKey)); - } - - /** Report a warning. - * @param lc The lint category for the diagnostic - * @param pos The source position at which to report the warning. - * @param warningKey The key for the localized warning message. - */ - public void mandatoryWarning(LintCategory lc, DiagnosticPosition pos, Warning warningKey) { - report(diags.mandatoryWarning(lc, source, pos, warningKey)); + report(diags.mandatoryWarning(source, pos, warningKey)); } /** Provide a non-fatal notification, unless suppressed by the -nowarn option. diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java index 907539d540e..053a24e39ce 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java @@ -111,7 +111,7 @@ public JCDiagnostic error( */ public JCDiagnostic error( DiagnosticFlag flag, DiagnosticSource source, DiagnosticPosition pos, Error errorKey) { - JCDiagnostic diag = create(null, EnumSet.copyOf(defaultErrorFlags), source, pos, errorKey); + JCDiagnostic diag = create(EnumSet.copyOf(defaultErrorFlags), source, pos, errorKey); if (flag != null) { diag.setFlag(flag); } @@ -130,21 +130,19 @@ public JCDiagnostic error( public JCDiagnostic mandatoryWarning( LintCategory lc, DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { - return mandatoryWarning(lc, source, pos, warningKey(key, args)); + return mandatoryWarning(source, pos, warningKey(lc, key, args)); } /** * Create a warning diagnostic that will not be hidden by the -nowarn or -Xlint:none options. - * @param lc The lint category for the diagnostic * @param source The source of the compilation unit, if any, in which to report the warning. * @param pos The source position at which to report the warning. * @param warningKey The key for the localized warning message. * @see MandatoryWarningHandler */ public JCDiagnostic mandatoryWarning( - LintCategory lc, DiagnosticSource source, DiagnosticPosition pos, Warning warningKey) { - return create(lc, EnumSet.of(DiagnosticFlag.MANDATORY), source, pos, warningKey); + return create(EnumSet.of(DiagnosticFlag.MANDATORY), source, pos, warningKey); } /** @@ -158,20 +156,19 @@ public JCDiagnostic mandatoryWarning( */ public JCDiagnostic warning( LintCategory lc, DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { - return warning(lc, source, pos, warningKey(key, args)); + return warning(source, pos, warningKey(lc, key, args)); } /** * Create a warning diagnostic. - * @param lc The lint category for the diagnostic * @param source The source of the compilation unit, if any, in which to report the warning. * @param pos The source position at which to report the warning. * @param warningKey The key for the localized warning message. * @see MandatoryWarningHandler */ public JCDiagnostic warning( - LintCategory lc, DiagnosticSource source, DiagnosticPosition pos, Warning warningKey) { - return create(lc, EnumSet.noneOf(DiagnosticFlag.class), source, pos, warningKey); + DiagnosticSource source, DiagnosticPosition pos, Warning warningKey) { + return create(EnumSet.noneOf(DiagnosticFlag.class), source, pos, warningKey); } /** @@ -191,7 +188,7 @@ public JCDiagnostic mandatoryNote(DiagnosticSource source, String key, Object... * @see MandatoryWarningHandler */ public JCDiagnostic mandatoryNote(DiagnosticSource source, Note noteKey) { - return create(null, EnumSet.of(DiagnosticFlag.MANDATORY), source, null, noteKey); + return create(EnumSet.of(DiagnosticFlag.MANDATORY), source, null, noteKey); } /** @@ -212,7 +209,7 @@ public JCDiagnostic note( */ public JCDiagnostic note( DiagnosticSource source, DiagnosticPosition pos, Note noteKey) { - return create(null, EnumSet.noneOf(DiagnosticFlag.class), source, pos, noteKey); + return create(EnumSet.noneOf(DiagnosticFlag.class), source, pos, noteKey); } /** @@ -229,7 +226,7 @@ public JCDiagnostic fragment(String key, Object... args) { * @param fragmentKey The key for the localized subdiagnostic message. */ public JCDiagnostic fragment(Fragment fragmentKey) { - return create(null, EnumSet.noneOf(DiagnosticFlag.class), null, null, fragmentKey); + return create(EnumSet.noneOf(DiagnosticFlag.class), null, null, fragmentKey); } /** @@ -243,7 +240,7 @@ public JCDiagnostic fragment(Fragment fragmentKey) { */ public JCDiagnostic create( DiagnosticType kind, DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { - return create(null, EnumSet.noneOf(DiagnosticFlag.class), source, pos, DiagnosticInfo.of(kind, prefix, key, args)); + return create(EnumSet.noneOf(DiagnosticFlag.class), source, pos, DiagnosticInfo.of(kind, prefix, key, args)); } /** @@ -258,7 +255,7 @@ public JCDiagnostic create( */ public JCDiagnostic create( DiagnosticType kind, DiagnosticSource source, DiagnosticPosition pos, String key, UnaryOperator rewriter, Object... args) { - return create(null, EnumSet.noneOf(DiagnosticFlag.class), source, pos, DiagnosticInfo.of(kind, prefix, key, args), rewriter); + return create(EnumSet.noneOf(DiagnosticFlag.class), source, pos, DiagnosticInfo.of(kind, prefix, key, args), rewriter); } /** @@ -270,7 +267,7 @@ public JCDiagnostic create( */ public JCDiagnostic create( DiagnosticSource source, DiagnosticPosition pos, DiagnosticInfo diagnosticInfo) { - return create(null, EnumSet.noneOf(DiagnosticFlag.class), source, pos, diagnosticInfo); + return create(EnumSet.noneOf(DiagnosticFlag.class), source, pos, diagnosticInfo); } /** @@ -285,30 +282,31 @@ public JCDiagnostic create( */ public JCDiagnostic create(DiagnosticType kind, LintCategory lc, Set flags, DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { - return create(lc, flags, source, pos, DiagnosticInfo.of(kind, prefix, key, args)); + return create(flags, source, pos, DiagnosticInfo.of(kind, lc, prefix, key, args)); } /** * Create a new diagnostic with given key. - * @param lc The lint category, if applicable, or null * @param flags The set of flags for the diagnostic * @param source The source of the compilation unit, if any, in which to report the message. * @param pos The source position at which to report the message. * @param diagnosticInfo The key for the localized message. */ public JCDiagnostic create( - LintCategory lc, Set flags, DiagnosticSource source, DiagnosticPosition pos, DiagnosticInfo diagnosticInfo) { - return new JCDiagnostic(formatter, normalize(diagnosticInfo), lc, flags, source, pos); + Set flags, DiagnosticSource source, DiagnosticPosition pos, DiagnosticInfo diagnosticInfo) { + return new JCDiagnostic(formatter, normalize(diagnosticInfo), flags, source, pos); } public JCDiagnostic create( - LintCategory lc, Set flags, DiagnosticSource source, DiagnosticPosition pos, DiagnosticInfo diagnosticInfo, UnaryOperator rewriter) { - return new JCDiagnostic(formatter, normalize(diagnosticInfo), lc, flags, source, pos, rewriter); + Set flags, DiagnosticSource source, DiagnosticPosition pos, DiagnosticInfo diagnosticInfo, UnaryOperator rewriter) { + return new JCDiagnostic(formatter, normalize(diagnosticInfo), flags, source, pos, rewriter); } //where DiagnosticInfo normalize(DiagnosticInfo diagnosticInfo) { //replace all nested FragmentKey with full-blown JCDiagnostic objects - return DiagnosticInfo.of(diagnosticInfo.type, diagnosticInfo.prefix, diagnosticInfo.code, + LintCategory category = diagnosticInfo instanceof LintWarning lintWarning ? + lintWarning.category : null; + return DiagnosticInfo.of(diagnosticInfo.type, category, diagnosticInfo.prefix, diagnosticInfo.code, Stream.of(diagnosticInfo.args).map(o -> { return (o instanceof Fragment frag) ? fragment(frag) : o; @@ -325,8 +323,8 @@ public Error errorKey(String code, Object... args) { /** * Create a new warning key. */ - Warning warningKey(String code, Object... args) { - return (Warning)DiagnosticInfo.of(WARNING, prefix, code, args); + Warning warningKey(LintCategory lintCategory, String code, Object... args) { + return (Warning)DiagnosticInfo.of(WARNING, lintCategory, prefix, code, args); } /** @@ -356,10 +354,10 @@ Fragment fragmentKey(String code, Object... args) { public static JCDiagnostic fragment(String key, Object... args) { return new JCDiagnostic(getFragmentFormatter(), DiagnosticInfo.of(FRAGMENT, + null, "compiler", key, args), - null, EnumSet.noneOf(DiagnosticFlag.class), null, null); @@ -464,7 +462,6 @@ public enum DiagnosticFlag { private final DiagnosticPosition position; private final DiagnosticInfo diagnosticInfo; private final Set flags; - private final LintCategory lintCategory; /** source line position (set lazily) */ private SourcePosition sourcePosition; @@ -537,11 +534,17 @@ public String key() { * Static factory method; build a custom diagnostic key using given kind, prefix, code and args. */ public static DiagnosticInfo of(DiagnosticType type, String prefix, String code, Object... args) { + return of(type, null, prefix, code, args); + } + + public static DiagnosticInfo of(DiagnosticType type, LintCategory lc, String prefix, String code, Object... args) { switch (type) { case ERROR: return new Error(prefix, code, args); case WARNING: - return new Warning(prefix, code, args); + return lc == null ? + new Warning(prefix, code, args) : + new LintWarning(lc, prefix, code, args); case NOTE: return new Note(prefix, code, args); case FRAGMENT: @@ -583,12 +586,28 @@ public Error(String prefix, String key, Object... args) { /** * Class representing warning diagnostic keys. */ - public static final class Warning extends DiagnosticInfo { + public static sealed class Warning extends DiagnosticInfo { public Warning(String prefix, String key, Object... args) { super(DiagnosticType.WARNING, prefix, key, args); } } + /** + * Class representing lint warning diagnostic keys. + */ + public static final class LintWarning extends Warning { + final LintCategory category; + + public LintWarning(LintCategory category, String prefix, String key, Object... args) { + super(prefix, key, args); + this.category = category; + } + + public LintCategory getLintCategory() { + return category; + } + } + /** * Class representing note diagnostic keys. */ @@ -614,31 +633,27 @@ public record AnnotatedType(Type type) {} * Create a diagnostic object. * @param formatter the formatter to use for the diagnostic * @param diagnosticInfo the diagnostic key - * @param lc the lint category for the diagnostic * @param source the name of the source file, or null if none. * @param pos the character offset within the source file, if given. */ protected JCDiagnostic(DiagnosticFormatter formatter, DiagnosticInfo diagnosticInfo, - LintCategory lc, Set flags, DiagnosticSource source, DiagnosticPosition pos) { - this(formatter, diagnosticInfo, lc, flags, source, pos, null); + this(formatter, diagnosticInfo, flags, source, pos, null); } /** * Create a diagnostic object. * @param formatter the formatter to use for the diagnostic * @param diagnosticInfo the diagnostic key - * @param lc the lint category for the diagnostic * @param source the name of the source file, or null if none. * @param pos the character offset within the source file, if given. * @param rewriter the rewriter function used if this diagnostic needs to be rewritten */ protected JCDiagnostic(DiagnosticFormatter formatter, DiagnosticInfo diagnosticInfo, - LintCategory lc, Set flags, DiagnosticSource source, DiagnosticPosition pos, @@ -648,7 +663,6 @@ protected JCDiagnostic(DiagnosticFormatter formatter, this.defaultFormatter = formatter; this.diagnosticInfo = diagnosticInfo; - this.lintCategory = lc; this.flags = flags; this.source = source; this.position = pos; @@ -687,14 +701,15 @@ public boolean isMandatory() { * Check whether this diagnostic has an associated lint category. */ public boolean hasLintCategory() { - return (lintCategory != null); + return getLintCategory() != null; } /** * Get the associated lint category, or null if none. */ public LintCategory getLintCategory() { - return lintCategory; + return diagnosticInfo instanceof LintWarning lintWarning ? + lintWarning.category : null; } /** @@ -870,7 +885,6 @@ public static class MultilineDiagnostic extends JCDiagnostic { public MultilineDiagnostic(JCDiagnostic other, List subdiagnostics) { super(other.defaultFormatter, other.diagnosticInfo, - other.getLintCategory(), other.flags, other.getDiagnosticSource(), other.position); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java index 9fe9590ef35..636563621a4 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java @@ -33,6 +33,7 @@ import com.sun.tools.javac.code.Lint.LintCategory; import com.sun.tools.javac.code.Source; import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; +import com.sun.tools.javac.util.JCDiagnostic.LintWarning; import com.sun.tools.javac.util.JCDiagnostic.Note; import com.sun.tools.javac.util.JCDiagnostic.Warning; @@ -126,8 +127,9 @@ public MandatoryWarningHandler(Log log, Source source, boolean verbose, /** * Report a mandatory warning. */ - public void report(DiagnosticPosition pos, Warning warnKey) { + public void report(DiagnosticPosition pos, LintWarning warnKey) { JavaFileObject currentSource = log.currentSourceFile(); + Assert.check(warnKey.getLintCategory() == lintCategory); if (verbose) { if (sourcesWithReportedWarnings == null) @@ -259,9 +261,9 @@ public void reportDeferredDiagnostic() { private void logMandatoryWarning(DiagnosticPosition pos, Warning warnKey) { // Note: the following log methods are safe if lintCategory is null. if (enforceMandatory) - log.mandatoryWarning(lintCategory, pos, warnKey); + log.mandatoryWarning(pos, warnKey); else - log.warning(lintCategory, pos, warnKey); + log.warning(pos, warnKey); } /** diff --git a/test/langtools/tools/javac/6304921/TestLog.java b/test/langtools/tools/javac/6304921/TestLog.java index 3d88aa6fdfd..41695554a88 100644 --- a/test/langtools/tools/javac/6304921/TestLog.java +++ b/test/langtools/tools/javac/6304921/TestLog.java @@ -41,6 +41,7 @@ import com.sun.tools.javac.file.JavacFileManager; import com.sun.tools.javac.parser.Parser; import com.sun.tools.javac.parser.ParserFactory; +import com.sun.tools.javac.resources.CompilerProperties.LintWarnings; import com.sun.tools.javac.tree.EndPosTable; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.TreeScanner; @@ -51,7 +52,6 @@ import com.sun.tools.javac.util.JCDiagnostic.Factory; import com.sun.tools.javac.util.Options; import com.sun.tools.javac.resources.CompilerProperties.Errors; -import com.sun.tools.javac.resources.CompilerProperties.Warnings; public class TestLog { @@ -130,10 +130,10 @@ public void visitIf(JCTree.JCIf tree) { log.error(tree.pos(), Errors.NotStmt); log.error(nil, Errors.NotStmt); - log.warning(Warnings.DivZero); - log.warning(tree.pos, Warnings.DivZero); - log.warning(tree.pos(), Warnings.DivZero); - log.warning(nil, Warnings.DivZero); + log.warning(LintWarnings.DivZero); + log.warning(tree.pos, LintWarnings.DivZero); + log.warning(tree.pos(), LintWarnings.DivZero); + log.warning(nil, LintWarnings.DivZero); } private Log log; From 45a329790b844139010c95f981c72ad43b08369a Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Mon, 16 Dec 2024 13:43:55 +0000 Subject: [PATCH 40/93] 8346248: serviceability/dcmd/vm/{SystemMapTest.java,SystemMapTest.java} failing on macos-aarch64 Reviewed-by: eosterlund --- .../hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java b/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java index dbd82f0f208..dbaa5b18e2e 100644 --- a/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java +++ b/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java @@ -157,7 +157,7 @@ private static class MacOSPatterns implements MapPatterns { static final String macow = "cow"; static final String macprivate = "pvt"; - static final String macprivate_or_shared = "(pvt|tsh-shared)"; + static final String macprivate_or_shared = "(pvt|tsh)"; static final String macprivatealiased = "p/a"; static final String macOSbase = range + space + someSize + space + macprot + space; From 8133eb2c28f967d7e04fbd20fbe143d5bb393afe Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Mon, 16 Dec 2024 14:34:46 +0000 Subject: [PATCH 41/93] 8346150: Jib dependency on autoconf missing for 'docs' profile Reviewed-by: jwaters, dholmes --- make/conf/jib-profiles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js index 2dae9b06895..e6204d2995e 100644 --- a/make/conf/jib-profiles.js +++ b/make/conf/jib-profiles.js @@ -780,7 +780,7 @@ var getJibProfilesProfiles = function (input, common, data) { target_os: input.build_os, target_cpu: input.build_cpu, dependencies: [ - "boot_jdk", "devkit", "graphviz", "pandoc", buildJdkDep, + "autoconf", "boot_jdk", "devkit", "graphviz", "pandoc", buildJdkDep, ], configure_args: concat( "--enable-full-docs", From d737978924f08f1aae280867e5106f2cfd0e9d31 Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Mon, 16 Dec 2024 14:52:42 +0000 Subject: [PATCH 42/93] 8343477: Remove unnecessary @SuppressWarnings annotations (compiler) Reviewed-by: darcy, mcimadamore --- make/jdk/src/classes/build/tools/depend/Depend.java | 4 ++-- .../classes/build/tools/symbolgenerator/CreateSymbols.java | 2 -- .../share/classes/com/sun/tools/javac/code/ClassFinder.java | 1 - .../share/classes/com/sun/tools/javac/code/Symbol.java | 1 - .../share/classes/com/sun/tools/javac/code/Type.java | 2 -- .../share/classes/com/sun/tools/javac/comp/Analyzer.java | 3 +-- .../share/classes/com/sun/tools/javac/comp/Flow.java | 2 -- .../share/classes/com/sun/tools/javac/comp/Modules.java | 2 +- .../share/classes/com/sun/tools/javac/comp/Operators.java | 3 +-- .../share/classes/com/sun/tools/javac/comp/Resolve.java | 1 - .../share/classes/com/sun/tools/javac/jvm/JNIWriter.java | 4 +--- .../com/sun/tools/javac/model/AnnotationProxyMaker.java | 4 ++-- .../share/classes/com/sun/tools/javac/parser/JavacParser.java | 2 -- .../classes/com/sun/tools/javac/parser/UnicodeReader.java | 3 +-- .../share/classes/com/sun/tools/javac/tree/JCTree.java | 1 - .../share/classes/com/sun/tools/javac/util/List.java | 4 ++-- .../com/sun/tools/javac/util/RichDiagnosticFormatter.java | 1 - 17 files changed, 11 insertions(+), 29 deletions(-) diff --git a/make/jdk/src/classes/build/tools/depend/Depend.java b/make/jdk/src/classes/build/tools/depend/Depend.java index def3265b213..09595e43238 100644 --- a/make/jdk/src/classes/build/tools/depend/Depend.java +++ b/make/jdk/src/classes/build/tools/depend/Depend.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -446,7 +446,7 @@ public Void visitType(TypeElement e, Void p) { } @Override - public Void visitRecordComponent(@SuppressWarnings("preview")RecordComponentElement e, Void p) { + public Void visitRecordComponent(RecordComponentElement e, Void p) { update(e.getSimpleName()); visit(e.asType()); return null; diff --git a/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java b/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java index 114c82c5229..6faefecd424 100644 --- a/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java +++ b/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java @@ -228,7 +228,6 @@ public class CreateSymbols { /**Create sig files for ct.sym reading the classes description from the directory that contains * {@code ctDescriptionFile}, using the file as a recipe to create the sigfiles. */ - @SuppressWarnings("unchecked") public void createSymbols(String ctDescriptionFileExtra, String ctDescriptionFile, String ctSymLocation, long timestamp, String currentVersion, String preReleaseTag, String moduleClasses, String includedModulesFile) throws IOException { @@ -4634,7 +4633,6 @@ private static AnnotationDescription parseAnnotation(String value, int[] valuePo /**Create sig files for ct.sym reading the classes description from the directory that contains * {@code ctDescriptionFile}, using the file as a recipe to create the sigfiles. */ - @SuppressWarnings("unchecked") public void createJavadocData(String ctDescriptionFileExtra, String ctDescriptionFile, String targetDir, int startVersion) throws IOException { LoadDescriptions data = load(ctDescriptionFileExtra != null ? Paths.get(ctDescriptionFileExtra) diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java index 6aa47ae3617..655f58bfee5 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java @@ -719,7 +719,6 @@ private void scanPlatformPath(PackageSymbol p) throws IOException { EnumSet.of(JavaFileObject.Kind.CLASS))); } // where - @SuppressWarnings("fallthrough") private void fillIn(PackageSymbol p, Location location, Iterable files) diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java index 96d601cf0db..ec71f71f6fa 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java @@ -1694,7 +1694,6 @@ public List getPermittedSubclasses() { /** A class for variable symbols */ - @SuppressWarnings("preview") public static class VarSymbol extends Symbol implements VariableElement { /** The variable's declaration position. diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java index 7bcef30a3f9..bd2ea704831 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java @@ -361,7 +361,6 @@ public List getMetadata() { /** * Get the type metadata of the given kind associated with this type (if any). */ - @SuppressWarnings("unchecked") public M getMetadata(Class metadataClass) { return getMetadata(metadataClass, Function.identity(), null); } @@ -2133,7 +2132,6 @@ public final void addBound(InferenceBound ib, Type bound, Types types) { addBound(ib, bound, types, false); } - @SuppressWarnings("fallthrough") private void addBound(InferenceBound ib, Type bound, Types types, boolean update) { if (kind == Kind.CAPTURED && !update) { //Captured inference variables bounds must not be updated during incorporation, diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java index d117573ce9d..6a6e345365c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -611,7 +611,6 @@ public void scan() { } @Override - @SuppressWarnings("unchecked") public void scan(JCTree tree) { if (tree != null) { for (StatementAnalyzer analyzer : analyzers) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java index e167b81272b..175cceeeb7f 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java @@ -3282,7 +3282,6 @@ void markDead() { //do nothing } - @SuppressWarnings("fallthrough") void checkEffectivelyFinal(DiagnosticPosition pos, VarSymbol sym) { if (currentTree != null && sym.owner.kind == MTH && @@ -3303,7 +3302,6 @@ int getCurrentTreeStartPosition() { : currentTree.getStartPosition(); } - @SuppressWarnings("fallthrough") void letInit(JCTree tree) { tree = TreeInfo.skipParens(tree); if (tree.hasTag(IDENT) || tree.hasTag(SELECT)) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java index 97f961f09bf..f389134c477 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java @@ -1023,7 +1023,7 @@ public UsesProvidesVisitor(ModuleSymbol msym, Env env) { this.env = env; } - @Override @SuppressWarnings("unchecked") + @Override public void visitModuleDef(JCModuleDecl tree) { msym.directives = List.nil(); msym.provides = List.nil(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java index ee487f2a034..0eea70195da 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -274,7 +274,6 @@ abstract class OperatorHelper { /** An array of operator symbol suppliers (used to lazily populate the symbol list). */ List> operatorSuppliers = List.nil(); - @SuppressWarnings("varargs") OperatorHelper(Tag tag) { this.name = operatorName(tag); } 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 855b8a4b234..82a419e3265 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 @@ -5193,7 +5193,6 @@ DeferredAttrContext deferredAttrContext(Symbol sym, InferenceContext inferenceCo * while inapplicable candidates contain further details about the * reason why the method has been considered inapplicable. */ - @SuppressWarnings("overrides") class Candidate { final MethodResolutionPhase step; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/JNIWriter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/JNIWriter.java index 2de0e330796..0d6f2a6e9e1 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/JNIWriter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/JNIWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -339,7 +339,6 @@ && isNative(md2)) { } } } - @SuppressWarnings("fallthrough") protected final String jniType(Type t) { switch (t.getKind()) { case ARRAY: { @@ -442,7 +441,6 @@ static enum EncoderType { JNI, SIGNATURE } - @SuppressWarnings("fallthrough") static String encode(CharSequence name, EncoderType mtype) { StringBuilder result = new StringBuilder(100); int length = name.length(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java index b02150c738c..0e73bbebf7a 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -220,7 +220,7 @@ public void visitArray(Attribute.Array a) { } } - @SuppressWarnings({"unchecked", "rawtypes"}) + @SuppressWarnings("unchecked") public void visitEnum(Attribute.Enum e) { if (returnClass.isEnum()) { String constName = e.value.toString(); 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 1413c511913..703c510675c 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 @@ -2834,7 +2834,6 @@ public JCBlock block() { * LocalVariableDeclarationStatement * = { FINAL | '@' Annotation } Type VariableDeclarators ";" */ - @SuppressWarnings("fallthrough") List blockStatements() { //todo: skip to anchor on error(?) int lastErrPos = -1; @@ -2892,7 +2891,6 @@ JCStatement parseStatementAsBlock() { /**This method parses a statement appearing inside a block. */ - @SuppressWarnings("fallthrough") List blockStatement() { //todo: skip to anchor on error(?) Comment dc; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java index d4121080506..c78694082c8 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -107,7 +107,6 @@ public class UnicodeReader { * @param array array containing contents of source. * @param length length of meaningful content in buffer. */ - @SuppressWarnings("this-escape") protected UnicodeReader(ScannerFactory sf, char[] array, int length) { this(sf.log, array, length); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java index a2837013506..de86b7e2c57 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java @@ -886,7 +886,6 @@ public List getTypeParameters() { public List getImplementsClause() { return implementing; } - @SuppressWarnings("removal") @DefinedBy(Api.COMPILER_TREE) public List getPermitsClause() { return permitting; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/List.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/List.java index ceb5614ed0f..d2d726f3f26 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/List.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/List.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -151,7 +151,7 @@ public static List of(A x1, A x2, A x3) { /** Construct a list consisting of given elements. */ - @SuppressWarnings({"varargs", "unchecked"}) + @SuppressWarnings("unchecked") public static List of(A x1, A x2, A x3, A... rest) { return new List<>(x1, new List<>(x2, new List<>(x3, from(rest)))); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java index 9809212dc28..fa81ce7ba75 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java @@ -652,7 +652,6 @@ public static class RichConfiguration extends ForwardingDiagnosticFormatter.Forw /** set of enabled rich formatter's features */ protected java.util.EnumSet features; - @SuppressWarnings("fallthrough") public RichConfiguration(Options options, AbstractDiagnosticFormatter formatter) { super(formatter.getConfiguration()); features = formatter.isRaw() ? EnumSet.noneOf(RichFormatterFeature.class) : From cb92595599a8a22a807a29bf56f1e02e792386a9 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Mon, 16 Dec 2024 16:10:16 +0000 Subject: [PATCH 43/93] 8336356: [s390x] preserve Vector Register before using for string compress / expand Reviewed-by: aph, lucy --- .../cpu/s390/c2_MacroAssembler_s390.cpp | 84 ++++----- .../cpu/s390/c2_MacroAssembler_s390.hpp | 12 +- src/hotspot/cpu/s390/s390.ad | 175 ++++++++++++++++-- 3 files changed, 205 insertions(+), 66 deletions(-) diff --git a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp index c8393fe0e60..faa24bc8807 100644 --- a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp +++ b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp @@ -83,9 +83,11 @@ void C2_MacroAssembler::load_narrow_klass_compact_c2(Register dst, Address src) // Exactly the number of characters indicated by the return value have been written to dst. // If precise is false, a few characters more than indicated by the return value may have been // written to the dst array. In any failure case, The result value indexes the first invalid character. -unsigned int C2_MacroAssembler::string_compress(Register result, Register src, Register dst, Register cnt, - Register tmp, bool precise, bool toASCII) { - assert_different_registers(Z_R0, Z_R1, result, src, dst, cnt, tmp); +unsigned int C2_MacroAssembler::string_compress(Register result, Register Rsrc, Register Rdst, Register Rcnt, + Register tmp, bool precise, bool toASCII, VectorRegister Vtmp1, VectorRegister Vtmp2, + VectorRegister Vmask, VectorRegister Vzero, VectorRegister Vsrc_first, VectorRegister v21, + VectorRegister v22, VectorRegister Vsrc_last) { + assert_different_registers(Z_R0, Z_R1, result, Rsrc, Rdst, Rcnt, tmp); unsigned short char_mask = 0xff00; // all selected bits must be '0' for a char to be valid unsigned int mask_ix_l = 0; // leftmost one bit pos in mask @@ -104,10 +106,7 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R } int block_start = offset(); - Register Rsrc = src; - Register Rdst = dst; Register Rix = tmp; - Register Rcnt = cnt; Register Rmask = result; // holds incompatibility check mask until result value is stored. Label ScalarShortcut, AllDone; @@ -169,7 +168,6 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R #endif clear_reg(Z_R0); // make sure register is properly initialized. -#if 0 if (VM_Version::has_VectorFacility()) { const int min_vcnt = 32; // Minimum #characters required to use vector instructions. // Otherwise just do nothing in vector mode. @@ -178,13 +176,6 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R const int log_min_vcnt = exact_log2(min_vcnt); Label VectorLoop, VectorDone, VectorBreak; - VectorRegister Vtmp1 = Z_V16; - VectorRegister Vtmp2 = Z_V17; - VectorRegister Vmask = Z_V18; - VectorRegister Vzero = Z_V19; - VectorRegister Vsrc_first = Z_V20; - VectorRegister Vsrc_last = Z_V23; - assert((Vsrc_last->encoding() - Vsrc_first->encoding() + 1) == min_vcnt/8, "logic error"); assert(VM_Version::has_DistinctOpnds(), "Assumption when has_VectorFacility()"); z_srak(Rix, Rcnt, log_min_vcnt); // # vector loop iterations @@ -199,8 +190,8 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R add2reg(Rsrc, min_vcnt*2); //---< check for incompatible character >--- - z_vo(Vtmp1, Z_V20, Z_V21); - z_vo(Vtmp2, Z_V22, Z_V23); + z_vo(Vtmp1, Vsrc_first, v21); + z_vo(Vtmp2, v22, Vsrc_last); z_vo(Vtmp1, Vtmp1, Vtmp2); z_vn(Vtmp1, Vtmp1, Vmask); z_vceqhs(Vtmp1, Vtmp1, Vzero); // all bits selected by mask must be zero for successful compress. @@ -208,8 +199,8 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R // re-process data from current iteration in break handler. //---< pack & store characters >--- - z_vpkh(Vtmp1, Z_V20, Z_V21); // pack (src1, src2) -> tmp1 - z_vpkh(Vtmp2, Z_V22, Z_V23); // pack (src3, src4) -> tmp2 + z_vpkh(Vtmp1, Vsrc_first, v21); // pack (src1, src2) -> tmp1 + z_vpkh(Vtmp2, v22, Vsrc_last); // pack (src3, src4) -> tmp2 z_vstm(Vtmp1, Vtmp2, 0, Rdst); // store packed string add2reg(Rdst, min_vcnt); @@ -224,7 +215,6 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R bind(VectorDone); } -#endif { const int min_cnt = 8; // Minimum #characters required to use unrolled loop. @@ -419,7 +409,9 @@ unsigned int C2_MacroAssembler::string_inflate_trot(Register src, Register dst, // Note: // cnt is signed int. Do not rely on high word! // counts # characters, not bytes. -unsigned int C2_MacroAssembler::string_inflate(Register src, Register dst, Register cnt, Register tmp) { +unsigned int C2_MacroAssembler::string_inflate(Register src, Register dst, Register cnt, Register tmp, + VectorRegister v20, VectorRegister v21, VectorRegister v22, + VectorRegister v23, VectorRegister v24, VectorRegister v25) { assert_different_registers(Z_R0, Z_R1, src, dst, cnt, tmp); BLOCK_COMMENT("string_inflate {"); @@ -463,7 +455,6 @@ unsigned int C2_MacroAssembler::string_inflate(Register src, Register dst, Regis #endif clear_reg(Z_R0); // make sure register is properly initialized. -#if 0 if (VM_Version::has_VectorFacility()) { const int min_vcnt = 32; // Minimum #characters required to use vector instructions. // Otherwise just do nothing in vector mode. @@ -478,21 +469,20 @@ unsigned int C2_MacroAssembler::string_inflate(Register src, Register dst, Regis z_sllg(Z_R0, Rix, log_min_vcnt); // remember #chars that will be processed by vector loop bind(VectorLoop); - z_vlm(Z_V20, Z_V21, 0, Rsrc); // get next 32 characters (single-byte) + z_vlm(v20, v21, 0, Rsrc); // get next 32 characters (single-byte) add2reg(Rsrc, min_vcnt); - z_vuplhb(Z_V22, Z_V20); // V2 <- (expand) V0(high) - z_vupllb(Z_V23, Z_V20); // V3 <- (expand) V0(low) - z_vuplhb(Z_V24, Z_V21); // V4 <- (expand) V1(high) - z_vupllb(Z_V25, Z_V21); // V5 <- (expand) V1(low) - z_vstm(Z_V22, Z_V25, 0, Rdst); // store next 32 bytes + z_vuplhb(v22, v20); // V2 <- (expand) V0(high) + z_vupllb(v23, v20); // V3 <- (expand) V0(low) + z_vuplhb(v24, v21); // V4 <- (expand) V1(high) + z_vupllb(v25, v21); // V5 <- (expand) V1(low) + z_vstm(v22, v25, 0, Rdst); // store next 32 bytes add2reg(Rdst, min_vcnt*2); z_brct(Rix, VectorLoop); bind(VectorDone); } -#endif const int min_cnt = 8; // Minimum #characters required to use unrolled scalar loop. // Otherwise just do nothing in unrolled scalar mode. @@ -611,7 +601,9 @@ unsigned int C2_MacroAssembler::string_inflate(Register src, Register dst, Regis // Kills: tmp, Z_R0, Z_R1. // Note: // len is signed int. Counts # characters, not bytes. -unsigned int C2_MacroAssembler::string_inflate_const(Register src, Register dst, Register tmp, int len) { +unsigned int C2_MacroAssembler::string_inflate_const(Register src, Register dst, Register tmp, int len , + VectorRegister v20, VectorRegister v21, VectorRegister v22, + VectorRegister v23, VectorRegister v24, VectorRegister v25) { assert_different_registers(Z_R0, Z_R1, src, dst, tmp); BLOCK_COMMENT("string_inflate_const {"); @@ -627,7 +619,6 @@ unsigned int C2_MacroAssembler::string_inflate_const(Register src, Register dst, bool restore_inputs = false; bool workreg_clear = false; -#if 0 if ((len >= 32) && VM_Version::has_VectorFacility()) { const int min_vcnt = 32; // Minimum #characters required to use vector instructions. // Otherwise just do nothing in vector mode. @@ -638,12 +629,12 @@ unsigned int C2_MacroAssembler::string_inflate_const(Register src, Register dst, Label VectorLoop; if (iterations == 1) { - z_vlm(Z_V20, Z_V21, 0+src_off, Rsrc); // get next 32 characters (single-byte) - z_vuplhb(Z_V22, Z_V20); // V2 <- (expand) V0(high) - z_vupllb(Z_V23, Z_V20); // V3 <- (expand) V0(low) - z_vuplhb(Z_V24, Z_V21); // V4 <- (expand) V1(high) - z_vupllb(Z_V25, Z_V21); // V5 <- (expand) V1(low) - z_vstm(Z_V22, Z_V25, 0+dst_off, Rdst); // store next 32 bytes + z_vlm(v20, v21, 0+src_off, Rsrc); // get next 32 characters (single-byte) + z_vuplhb(v22, v20); // V2 <- (expand) V0(high) + z_vupllb(v23, v20); // V3 <- (expand) V0(low) + z_vuplhb(v24, v21); // V4 <- (expand) V1(high) + z_vupllb(v25, v21); // V5 <- (expand) V1(low) + z_vstm(v22, v25, 0+dst_off, Rdst); // store next 32 bytes src_off += min_vcnt; dst_off += min_vcnt*2; @@ -652,14 +643,14 @@ unsigned int C2_MacroAssembler::string_inflate_const(Register src, Register dst, z_lgfi(Rix, len>>log_min_vcnt); bind(VectorLoop); - z_vlm(Z_V20, Z_V21, 0, Rsrc); // get next 32 characters (single-byte) + z_vlm(v20, v21, 0, Rsrc); // get next 32 characters (single-byte) add2reg(Rsrc, min_vcnt); - z_vuplhb(Z_V22, Z_V20); // V2 <- (expand) V0(high) - z_vupllb(Z_V23, Z_V20); // V3 <- (expand) V0(low) - z_vuplhb(Z_V24, Z_V21); // V4 <- (expand) V1(high) - z_vupllb(Z_V25, Z_V21); // V5 <- (expand) V1(low) - z_vstm(Z_V22, Z_V25, 0, Rdst); // store next 32 bytes + z_vuplhb(v22, v20); // V2 <- (expand) V0(high) + z_vupllb(v23, v20); // V3 <- (expand) V0(low) + z_vuplhb(v24, v21); // V4 <- (expand) V1(high) + z_vupllb(v25, v21); // V5 <- (expand) V1(low) + z_vstm(v22, v25, 0, Rdst); // store next 32 bytes add2reg(Rdst, min_vcnt*2); z_brct(Rix, VectorLoop); @@ -675,15 +666,14 @@ unsigned int C2_MacroAssembler::string_inflate_const(Register src, Register dst, nprocessed += iterations << log_min_vcnt; assert(iterations == 1, "must be!"); - z_vl(Z_V20, 0+src_off, Z_R0, Rsrc); // get next 16 characters (single-byte) - z_vuplhb(Z_V22, Z_V20); // V2 <- (expand) V0(high) - z_vupllb(Z_V23, Z_V20); // V3 <- (expand) V0(low) - z_vstm(Z_V22, Z_V23, 0+dst_off, Rdst); // store next 32 bytes + z_vl(v20, 0+src_off, Z_R0, Rsrc); // get next 16 characters (single-byte) + z_vuplhb(v22, v20); // V2 <- (expand) V0(high) + z_vupllb(v23, v20); // V3 <- (expand) V0(low) + z_vstm(v22, v23, 0+dst_off, Rdst); // store next 32 bytes src_off += min_vcnt; dst_off += min_vcnt*2; } -#endif if ((len-nprocessed) > 8) { const int min_cnt = 8; // Minimum #characters required to use unrolled scalar loop. diff --git a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp index 26c3c9a2bb5..abf0db8e520 100644 --- a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp +++ b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp @@ -44,8 +44,10 @@ // Kills: tmp, Z_R0, Z_R1. // Early clobber: result. // Boolean precise controls accuracy of result value. - unsigned int string_compress(Register result, Register src, Register dst, Register cnt, - Register tmp, bool precise, bool toASCII); + unsigned int string_compress(Register result, Register Rsrc, Register Rdst, Register Rcnt, + Register tmp, bool precise, bool toASCII, VectorRegister Vtmp1, VectorRegister Vtmp2, + VectorRegister Vmask, VectorRegister Vzero, VectorRegister Vsrc_first, VectorRegister v21, + VectorRegister v22, VectorRegister Vsrc_last); // Inflate byte[] to char[]. unsigned int string_inflate_trot(Register src, Register dst, Register cnt, Register tmp); @@ -54,14 +56,16 @@ // Restores: src, dst // Uses: cnt // Kills: tmp, Z_R0, Z_R1. - unsigned int string_inflate(Register src, Register dst, Register cnt, Register tmp); + unsigned int string_inflate(Register src, Register dst, Register cnt, Register tmp, VectorRegister v20, VectorRegister v21, + VectorRegister v22, VectorRegister v23, VectorRegister v24, VectorRegister v25); // Inflate byte[] to char[], length known at compile time. // Restores: src, dst // Kills: tmp, Z_R0, Z_R1. // Note: // len is signed int. Counts # characters, not bytes. - unsigned int string_inflate_const(Register src, Register dst, Register tmp, int len); + unsigned int string_inflate_const(Register src, Register dst, Register tmp, int len , VectorRegister v20, VectorRegister v21, + VectorRegister v22, VectorRegister v23, VectorRegister v24, VectorRegister v25); unsigned int count_positives(Register result, Register src, Register cnt, Register tmp); diff --git a/src/hotspot/cpu/s390/s390.ad b/src/hotspot/cpu/s390/s390.ad index 6fb73a0e64c..d6ab89a61d2 100644 --- a/src/hotspot/cpu/s390/s390.ad +++ b/src/hotspot/cpu/s390/s390.ad @@ -762,6 +762,56 @@ reg_class z_v_reg( Z_VR31, Z_VR31_H, Z_VR31_J, Z_VR31_K ); +// class for vector register v16 +reg_class z_vreg_16( + Z_VR16, Z_VR16_H, Z_VR16_J, Z_VR16_K +); + +// class for vector register v17 +reg_class z_vreg_17( + Z_VR17, Z_VR17_H, Z_VR17_J, Z_VR17_K +); + +// class for vector register v18 +reg_class z_vreg_18( + Z_VR18, Z_VR18_H, Z_VR18_J, Z_VR18_K +); + +// class for vector register v19 +reg_class z_vreg_19( + Z_VR19, Z_VR19_H, Z_VR19_J, Z_VR19_K +); + +// class for vector register v20 +reg_class z_vreg_20( + Z_VR20, Z_VR20_H, Z_VR20_J, Z_VR20_K +); + +// class for vector register v21 +reg_class z_vreg_21( + Z_VR21, Z_VR21_H, Z_VR21_J, Z_VR21_K +); + +// class for vector register v22 +reg_class z_vreg_22( + Z_VR22, Z_VR22_H, Z_VR22_J, Z_VR22_K +); + +// class for vector register v23 +reg_class z_vreg_23( + Z_VR23, Z_VR23_H, Z_VR23_J, Z_VR23_K +); + +// class for vector register v24 +reg_class z_vreg_24( + Z_VR24, Z_VR24_H, Z_VR24_J, Z_VR24_K +); + +// class for vector register v25 +reg_class z_vreg_25( + Z_VR25, Z_VR25_H, Z_VR25_J, Z_VR25_K +); + %} //----------DEFINITION BLOCK--------------------------------------------------- @@ -2690,11 +2740,89 @@ ins_attrib ins_should_rematerialize(false); operand vecX() %{ constraint(ALLOC_IN_RC(z_v_reg)); match(VecX); + match(v16TempReg); + match(v17TempReg); + match(v18TempReg); + match(v19TempReg); + match(v20TempReg); + match(v21TempReg); + match(v22TempReg); + match(v23TempReg); + match(v24TempReg); + match(v25TempReg); + format %{ %} + interface(REG_INTER); +%} + +operand v16TempReg() %{ + constraint(ALLOC_IN_RC(z_vreg_16)); + match(VecX); + format %{ %} + interface(REG_INTER); +%} +operand v17TempReg() %{ + constraint(ALLOC_IN_RC(z_vreg_17)); + match(VecX); format %{ %} interface(REG_INTER); %} +operand v18TempReg() %{ + constraint(ALLOC_IN_RC(z_vreg_18)); + match(VecX); + format %{ %} + interface(REG_INTER); +%} + +operand v19TempReg() %{ + constraint(ALLOC_IN_RC(z_vreg_19)); + match(VecX); + format %{ %} + interface(REG_INTER); +%} + +operand v20TempReg() %{ + constraint(ALLOC_IN_RC(z_vreg_20)); + match(VecX); + format %{ %} + interface(REG_INTER); +%} + +operand v21TempReg() %{ + constraint(ALLOC_IN_RC(z_vreg_21)); + match(VecX); + format %{ %} + interface(REG_INTER); +%} + +operand v22TempReg() %{ + constraint(ALLOC_IN_RC(z_vreg_22)); + match(VecX); + format %{ %} + interface(REG_INTER); +%} + +operand v23TempReg() %{ + constraint(ALLOC_IN_RC(z_vreg_23)); + match(VecX); + format %{ %} + interface(REG_INTER); +%} + +operand v24TempReg() %{ + constraint(ALLOC_IN_RC(z_vreg_24)); + match(VecX); + format %{ %} + interface(REG_INTER); +%} + +operand v25TempReg() %{ + constraint(ALLOC_IN_RC(z_vreg_25)); + match(VecX); + format %{ %} + interface(REG_INTER); +%} //---------------------------------------------- // SIGNED (shorter than INT) immediate operands @@ -10477,14 +10605,17 @@ instruct indexOf_UL(iRegP haystack, rarg2RegI haycnt, iRegP needle, rarg5RegI ne %} // char[] to byte[] compression -instruct string_compress(iRegP src, iRegP dst, iRegI result, iRegI len, iRegI tmp, flagsReg cr) %{ +instruct string_compress(iRegP src, iRegP dst, iRegI result, iRegI len, iRegI tmp, v16TempReg v16, v17TempReg v17, v18TempReg v18, + v19TempReg v19, v20TempReg v20, v21TempReg v21, v22TempReg v22, v23TempReg v23, flagsReg cr) %{ match(Set result (StrCompressedCopy src (Binary dst len))); - effect(TEMP_DEF result, TEMP tmp, KILL cr); // R0, R1 are killed, too. + effect(TEMP_DEF result, TEMP tmp, TEMP v16, TEMP v17, TEMP v18, TEMP v19, TEMP v20, TEMP v21, TEMP v22, TEMP v23, KILL cr); // R0, R1 are killed, too. ins_cost(300); format %{ "String Compress $src->$dst($len) -> $result" %} ins_encode %{ __ string_compress($result$$Register, $src$$Register, $dst$$Register, $len$$Register, - $tmp$$Register, true, false); + $tmp$$Register, true, false, $v16$$VectorRegister, $v17$$VectorRegister, $v18$$VectorRegister, + $v19$$VectorRegister, $v20$$VectorRegister, $v21$$VectorRegister, $v22$$VectorRegister, + $v23$$VectorRegister); %} ins_pipe(pipe_class_dummy); %} @@ -10503,25 +10634,31 @@ instruct string_compress(iRegP src, iRegP dst, iRegI result, iRegI len, iRegI tm //%} // byte[] to char[] inflation -instruct string_inflate(Universe dummy, iRegP src, iRegP dst, iRegI len, iRegI tmp, flagsReg cr) %{ +instruct string_inflate(Universe dummy, iRegP src, iRegP dst, iRegI len, iRegI tmp, v20TempReg v20, v21TempReg v21, v22TempReg v22, v23TempReg v23, + v24TempReg v24, v25TempReg v25, flagsReg cr) %{ match(Set dummy (StrInflatedCopy src (Binary dst len))); - effect(TEMP tmp, KILL cr); // R0, R1 are killed, too. + effect(TEMP tmp, TEMP v20, TEMP v21, TEMP v22, TEMP v23, TEMP v24, TEMP v25, KILL cr); // R0, R1 are killed, too. ins_cost(300); format %{ "String Inflate $src->$dst($len)" %} ins_encode %{ - __ string_inflate($src$$Register, $dst$$Register, $len$$Register, $tmp$$Register); + __ string_inflate($src$$Register, $dst$$Register, $len$$Register, $tmp$$Register, $v20$$VectorRegister, + $v21$$VectorRegister, $v22$$VectorRegister, $v23$$VectorRegister, $v24$$VectorRegister, + $v25$$VectorRegister); %} ins_pipe(pipe_class_dummy); %} // byte[] to char[] inflation -instruct string_inflate_const(Universe dummy, iRegP src, iRegP dst, iRegI tmp, immI len, flagsReg cr) %{ +instruct string_inflate_const(Universe dummy, iRegP src, iRegP dst, iRegI tmp, immI len, v20TempReg v20, v21TempReg v21, v22TempReg v22, v23TempReg v23, + v24TempReg v24, v25TempReg v25, flagsReg cr) %{ match(Set dummy (StrInflatedCopy src (Binary dst len))); - effect(TEMP tmp, KILL cr); // R0, R1 are killed, too. + effect(TEMP tmp, TEMP v20, TEMP v21, TEMP v22, TEMP v23, TEMP v24, TEMP v25, KILL cr); // R0, R1 are killed, too. ins_cost(300); format %{ "String Inflate (constLen) $src->$dst($len)" %} ins_encode %{ - __ string_inflate_const($src$$Register, $dst$$Register, $tmp$$Register, $len$$constant); + __ string_inflate_const($src$$Register, $dst$$Register, $tmp$$Register, $len$$constant , $v20$$VectorRegister, + $v21$$VectorRegister, $v22$$VectorRegister, $v23$$VectorRegister, $v24$$VectorRegister, + $v25$$VectorRegister); %} ins_pipe(pipe_class_dummy); %} @@ -10539,29 +10676,37 @@ instruct count_positives(iRegP ary1, iRegI len, iRegI result, iRegI tmp, flagsRe %} // encode char[] to byte[] in ISO_8859_1 -instruct encode_iso_array(iRegP src, iRegP dst, iRegI result, iRegI len, iRegI tmp, flagsReg cr) %{ +instruct encode_iso_array(iRegP src, iRegP dst, iRegI result, iRegI len, iRegI tmp, v16TempReg v16, v17TempReg v17, v18TempReg v18, v19TempReg v19, v20TempReg v20, v21TempReg v21, + v22TempReg v22, v23TempReg v23, flagsReg cr) %{ predicate(!((EncodeISOArrayNode*)n)->is_ascii()); match(Set result (EncodeISOArray src (Binary dst len))); - effect(TEMP_DEF result, TEMP tmp, KILL cr); // R0, R1 are killed, too. + effect(TEMP_DEF result, TEMP tmp, TEMP v16, TEMP v17, TEMP v18, TEMP v19, + TEMP v20, TEMP v21, TEMP v22, TEMP v23, KILL cr); // R0, R1 are killed, too. ins_cost(300); format %{ "Encode iso array $src->$dst($len) -> $result" %} ins_encode %{ __ string_compress($result$$Register, $src$$Register, $dst$$Register, $len$$Register, - $tmp$$Register, true, false); + $tmp$$Register, true, false, $v16$$VectorRegister, $v17$$VectorRegister, $v18$$VectorRegister, + $v19$$VectorRegister, $v20$$VectorRegister, $v21$$VectorRegister, $v22$$VectorRegister, + $v23$$VectorRegister); %} ins_pipe(pipe_class_dummy); %} // encode char[] to byte[] in ASCII -instruct encode_ascii_array(iRegP src, iRegP dst, iRegI result, iRegI len, iRegI tmp, flagsReg cr) %{ +instruct encode_ascii_array(iRegP src, iRegP dst, iRegI result, iRegI len, iRegI tmp, v16TempReg v16, v17TempReg v17, v18TempReg v18, v19TempReg v19, v20TempReg v20, v21TempReg v21, + v22TempReg v22, v23TempReg v23, flagsReg cr) %{ predicate(((EncodeISOArrayNode*)n)->is_ascii()); match(Set result (EncodeISOArray src (Binary dst len))); - effect(TEMP_DEF result, TEMP tmp, KILL cr); // R0, R1 are killed, too. + effect(TEMP_DEF result, TEMP tmp, TEMP v16, TEMP v17, TEMP v18, TEMP v19, + TEMP v20, TEMP v21, TEMP v22, TEMP v23, KILL cr); // R0, R1 are killed, too. ins_cost(300); format %{ "Encode ascii array $src->$dst($len) -> $result" %} ins_encode %{ __ string_compress($result$$Register, $src$$Register, $dst$$Register, $len$$Register, - $tmp$$Register, true, true); + $tmp$$Register, true, true, $v16$$VectorRegister, $v17$$VectorRegister, $v18$$VectorRegister, + $v19$$VectorRegister, $v20$$VectorRegister, $v21$$VectorRegister, $v22$$VectorRegister, + $v23$$VectorRegister); %} ins_pipe(pipe_class_dummy); %} From e7d21fcf4949106e89afd413e9abc47d622dd47a Mon Sep 17 00:00:00 2001 From: Matthew Donovan Date: Mon, 16 Dec 2024 16:18:57 +0000 Subject: [PATCH 44/93] 8346285: Update jarsigner compatibility test for change in default digest algorithm Reviewed-by: weijun --- .../jarsigner/compatibility/Compatibility.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/jdk/sun/security/tools/jarsigner/compatibility/Compatibility.java b/test/jdk/sun/security/tools/jarsigner/compatibility/Compatibility.java index 7fab7d828ae..9b84f548c70 100644 --- a/test/jdk/sun/security/tools/jarsigner/compatibility/Compatibility.java +++ b/test/jdk/sun/security/tools/jarsigner/compatibility/Compatibility.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -67,6 +67,7 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; +import jdk.security.jarsigner.JarSigner; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.util.JarUtils; @@ -1430,7 +1431,9 @@ private SignItem digestAlgorithm(String digestAlgorithm) { String expectedDigestAlg() { return digestAlgorithm != null ? digestAlgorithm - : jdkInfo.majorVersion >= 20 ? "SHA-384" : "SHA-256"; + : jdkInfo.majorVersion >= 20 + ? JarSigner.Builder.getDefaultDigestAlgorithm() + : "SHA-256"; } private SignItem tsaDigestAlgorithm(String tsaDigestAlgorithm) { @@ -1439,7 +1442,11 @@ private SignItem tsaDigestAlgorithm(String tsaDigestAlgorithm) { } String expectedTsaDigestAlg() { - return tsaDigestAlgorithm != null ? tsaDigestAlgorithm : "SHA-256"; + return tsaDigestAlgorithm != null + ? tsaDigestAlgorithm + : jdkInfo.majorVersion >= 20 + ? JarSigner.Builder.getDefaultDigestAlgorithm() + : "SHA-256"; } private SignItem tsaIndex(int tsaIndex) { From f8974ba718b3a631abafa8987d3fb98164fb35e5 Mon Sep 17 00:00:00 2001 From: Calvin Cheung Date: Mon, 16 Dec 2024 16:54:31 +0000 Subject: [PATCH 45/93] 8345838: Remove the appcds/javaldr/AnonVmClassesDuringDump.java test Reviewed-by: iklam, dholmes --- test/hotspot/jtreg/TEST.groups | 1 - .../javaldr/AnonVmClassesDuringDump.java | 92 ------------------- .../AnonVmClassesDuringDumpTransformer.java | 67 -------------- .../AnonVmClassesDuringDumpTransformer.mf | 5 - 4 files changed, 165 deletions(-) delete mode 100644 test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDump.java delete mode 100644 test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDumpTransformer.java delete mode 100644 test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDumpTransformer.mf diff --git a/test/hotspot/jtreg/TEST.groups b/test/hotspot/jtreg/TEST.groups index f738f1806a9..99a34c1ef83 100644 --- a/test/hotspot/jtreg/TEST.groups +++ b/test/hotspot/jtreg/TEST.groups @@ -527,7 +527,6 @@ hotspot_aot_classlinking = \ -runtime/cds/appcds/dynamicArchive/LambdaInBaseArchive.java \ -runtime/cds/appcds/dynamicArchive/LambdasInTwoArchives.java \ -runtime/cds/appcds/HelloExtTest.java \ - -runtime/cds/appcds/javaldr/AnonVmClassesDuringDump.java \ -runtime/cds/appcds/javaldr/GCDuringDump.java \ -runtime/cds/appcds/javaldr/LockDuringDump.java \ -runtime/cds/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java \ diff --git a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDump.java b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDump.java deleted file mode 100644 index 4b603224a7f..00000000000 --- a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDump.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -/* - * @test - * @summary When dumping the CDS archive, try to load VM anonymous classes to make sure they - * are handled properly. Note: these are not "anonymous inner classes" in the Java source code, - * but rather classes that are not recorded in any ClassLoaderData::dictionary(), - * such as classes that are generated for Lambda expressions. - * See https://blogs.oracle.com/jrose/anonymous-classes-in-the-vm. - * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes - * @requires vm.cds - * @requires vm.jvmti - * @run driver AnonVmClassesDuringDump - */ - -import jdk.test.lib.helpers.ClassFileInstaller; - -public class AnonVmClassesDuringDump { - public static String appClasses[] = { - Hello.class.getName(), - }; - public static String agentClasses[] = { - AnonVmClassesDuringDumpTransformer.class.getName(), - }; - - public static String cdsDiagnosticOption = "-XX:+AllowArchivingWithJavaAgent"; - - public static final boolean dynamicMode = - Boolean.getBoolean(System.getProperty("test.dynamic.cds.archive", "false")); - - public static void main(String[] args) throws Throwable { - String agentJar = - ClassFileInstaller.writeJar("AnonVmClassesDuringDumpTransformer.jar", - ClassFileInstaller.Manifest.fromSourceFile("AnonVmClassesDuringDumpTransformer.mf"), - agentClasses); - - String appJar = - ClassFileInstaller.writeJar("AnonVmClassesDuringDumpApp.jar", appClasses); - - TestCommon.testDump(appJar, TestCommon.list(Hello.class.getName()), - "-javaagent:" + agentJar, - "-XX:+UnlockDiagnosticVMOptions", cdsDiagnosticOption, - // Set the following property to see logs for dynamically generated classes - // in STDOUT - "-Djava.lang.invoke.MethodHandle.DUMP_CLASS_FILES=true"); - - String prefix = ".class.load. "; - // class name pattern like the following: - // jdk.internal.loader.BuiltinClassLoader$$Lambda/1816757085 - // java.lang.invoke.LambdaForm$MH/1585787493 - String class_pattern = ".*Lambda/([0-9]+).*"; - String suffix = ".*source: shared objects file.*"; - String pattern = prefix + class_pattern + suffix; - // during run time, anonymous classes shouldn't be loaded from the archive - TestCommon.run("-cp", appJar, - "-XX:+UnlockDiagnosticVMOptions", cdsDiagnosticOption, Hello.class.getName()) - .assertNormalExit(dynamicMode ? - output -> output.shouldMatch(pattern) : - output -> output.shouldNotMatch(pattern)); - - // inspect the archive and make sure no anonymous class is in there - TestCommon.run("-cp", appJar, - "-XX:+UnlockDiagnosticVMOptions", cdsDiagnosticOption, - "-XX:+PrintSharedArchiveAndExit", Hello.class.getName()) - .assertNormalExit(dynamicMode ? - output -> output.shouldMatch(pattern) : - output -> output.shouldNotMatch(pattern)); - } -} - diff --git a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDumpTransformer.java b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDumpTransformer.java deleted file mode 100644 index 056111ee328..00000000000 --- a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDumpTransformer.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -import java.lang.instrument.ClassFileTransformer; -import java.lang.instrument.Instrumentation; -import java.lang.instrument.IllegalClassFormatException; -import java.security.ProtectionDomain; - -public class AnonVmClassesDuringDumpTransformer implements ClassFileTransformer { - public byte[] transform(ClassLoader loader, String name, Class classBeingRedefined, - ProtectionDomain pd, byte[] buffer) throws IllegalClassFormatException { - return null; - } - - private static Instrumentation savedInstrumentation; - - public static void premain(String agentArguments, Instrumentation instrumentation) { - System.out.println("ClassFileTransformer.premain() is called"); - instrumentation.addTransformer(new AnonVmClassesDuringDumpTransformer(), /*canRetransform=*/true); - savedInstrumentation = instrumentation; - - // This will create a Lambda, which will result in some Anonymous VM Classes - // being generated. - // - // Look for something like these in the STDOUT: - // ---------------- - // ClassFileTransformer.premain() is called - // Dumping class files to DUMP_CLASS_FILES/... - // dump: DUMP_CLASS_FILES/java/lang/invoke/LambdaForm$MH000.class - // dump: DUMP_CLASS_FILES/java/lang/invoke/LambdaForm$MH001.class - // Invoked inside a Lambda - // ---------------- - Runnable r = () -> { - System.out.println("Invoked inside a Lambda"); - }; - r.run(); - } - - public static Instrumentation getInstrumentation() { - return savedInstrumentation; - } - - public static void agentmain(String args, Instrumentation inst) throws Exception { - premain(args, inst); - } -} diff --git a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDumpTransformer.mf b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDumpTransformer.mf deleted file mode 100644 index a2140595dba..00000000000 --- a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDumpTransformer.mf +++ /dev/null @@ -1,5 +0,0 @@ -Manifest-Version: 1.0 -Premain-Class: AnonVmClassesDuringDumpTransformer -Agent-Class: AnonVmClassesDuringDumpTransformer -Can-Retransform-Classes: true -Can-Redefine-Classes: true From 23708d01668e3c9154a73d8c84da4704457d43d6 Mon Sep 17 00:00:00 2001 From: Kevin Walls Date: Mon, 16 Dec 2024 17:02:29 +0000 Subject: [PATCH 46/93] 8346257: Problemlist jdp tests for macosx-aarch64 Reviewed-by: cjplummer --- test/jdk/ProblemList.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index 7e4191a734f..4fb60642290 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -547,9 +547,9 @@ java/lang/management/MemoryMXBean/Pending.java 8158837 generic- java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 generic-all java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java 8247426 generic-all -sun/management/jdp/JdpDefaultsTest.java 8308807 aix-ppc64 -sun/management/jdp/JdpJmxRemoteDynamicPortTest.java 8308807 aix-ppc64 -sun/management/jdp/JdpSpecificAddressTest.java 8308807 aix-ppc64 +sun/management/jdp/JdpDefaultsTest.java 8308807,8241865 aix-ppc64,macosx-aarch64 +sun/management/jdp/JdpJmxRemoteDynamicPortTest.java 8308807,8241865 aix-ppc64,macosx-aarch64 +sun/management/jdp/JdpSpecificAddressTest.java 8308807,8241865 aix-ppc64,macosx-aarch64 sun/management/jdp/JdpOffTest.java 8308807 aix-ppc64 ############################################################################ From 57adf64ab4e50fd1739eb8ed14331d49f943b5e5 Mon Sep 17 00:00:00 2001 From: Kevin Walls Date: Mon, 16 Dec 2024 17:18:20 +0000 Subject: [PATCH 47/93] 8346261: Cleanup in JDP tests Reviewed-by: cjplummer --- .../jdk/sun/management/jdp/ClientConnection.java | 6 +++--- test/jdk/sun/management/jdp/DynamicLauncher.java | 8 ++------ test/jdk/sun/management/jdp/JdpDefaultsTest.java | 4 ++-- .../jdp/JdpJmxRemoteDynamicPortTest.java | 4 ++-- .../jdp/JdpJmxRemoteDynamicPortTestCase.java | 4 ++-- test/jdk/sun/management/jdp/JdpOffTest.java | 4 ++-- test/jdk/sun/management/jdp/JdpOffTestCase.java | 6 +++--- test/jdk/sun/management/jdp/JdpOnTestCase.java | 6 +++--- .../management/jdp/JdpSpecificAddressTest.java | 4 ++-- test/jdk/sun/management/jdp/JdpTestCase.java | 16 +++++++++------- 10 files changed, 30 insertions(+), 32 deletions(-) diff --git a/test/jdk/sun/management/jdp/ClientConnection.java b/test/jdk/sun/management/jdp/ClientConnection.java index 9c74517e49a..77d133106be 100644 --- a/test/jdk/sun/management/jdp/ClientConnection.java +++ b/test/jdk/sun/management/jdp/ClientConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -53,10 +53,10 @@ public ClientConnection() } - public MulticastSocket connectWithTimeout(int msTimeOut) throws IOException { + public MulticastSocket connectWithTimeout(int msTimeout) throws IOException { MulticastSocket socket = new MulticastSocket(port); socket.joinGroup(address); - socket.setSoTimeout(msTimeOut); + socket.setSoTimeout(msTimeout); return socket; } } diff --git a/test/jdk/sun/management/jdp/DynamicLauncher.java b/test/jdk/sun/management/jdp/DynamicLauncher.java index b79672211b1..8f29e774893 100644 --- a/test/jdk/sun/management/jdp/DynamicLauncher.java +++ b/test/jdk/sun/management/jdp/DynamicLauncher.java @@ -37,7 +37,7 @@ */ public abstract class DynamicLauncher { - private static final int MAX_RETRY_ATTEMPTS = 10; + private static final int MAX_PORT_RETRY_ATTEMPTS = 10; final String jdpName = UUID.randomUUID().toString(); OutputAnalyzer output; @@ -54,7 +54,7 @@ protected void run() throws Exception { try { output.shouldNotContain("Port already in use"); } catch (RuntimeException e) { - if (retries < MAX_RETRY_ATTEMPTS) { + if (retries < MAX_PORT_RETRY_ATTEMPTS) { retries++; tryAgain = true; } @@ -77,8 +77,4 @@ protected OutputAnalyzer runVM() throws Exception { } protected abstract String[] options(); - - protected OutputAnalyzer getProcessOutpoutAnalyzer() { - return output; - } } diff --git a/test/jdk/sun/management/jdp/JdpDefaultsTest.java b/test/jdk/sun/management/jdp/JdpDefaultsTest.java index 1cf76aa58b7..7c17efe0fd0 100644 --- a/test/jdk/sun/management/jdp/JdpDefaultsTest.java +++ b/test/jdk/sun/management/jdp/JdpDefaultsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -58,7 +58,7 @@ protected String[] options() { "-Dcom.sun.management.jmxremote.autodiscovery=true", "-Dcom.sun.management.jdp.pause=1", "-Dcom.sun.management.jdp.name=" + jdpName, - "-Djava.util.logging.SimpleFormatter.format='%1$tF %1$tT %4$-7s %5$s %n'", + "-Djava.util.logging.SimpleFormatter.format=%1$tF %1$tT %4$-7s %5$s %n", testName }; return options; diff --git a/test/jdk/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java b/test/jdk/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java index edf65a79b19..55558a5d88e 100644 --- a/test/jdk/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java +++ b/test/jdk/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -52,7 +52,7 @@ protected String[] options() { "-Dcom.sun.management.jmxremote.autodiscovery=true", "-Dcom.sun.management.jdp.pause=1", "-Dcom.sun.management.jdp.name=" + jdpName, - "-Djava.util.logging.SimpleFormatter.format='%1$tF %1$tT %4$-7s %5$s %n'", + "-Djava.util.logging.SimpleFormatter.format=%1$tF %1$tT %4$-7s %5$s %n", testName }; return options; diff --git a/test/jdk/sun/management/jdp/JdpJmxRemoteDynamicPortTestCase.java b/test/jdk/sun/management/jdp/JdpJmxRemoteDynamicPortTestCase.java index bb5485ed073..fbc8087a7a5 100644 --- a/test/jdk/sun/management/jdp/JdpJmxRemoteDynamicPortTestCase.java +++ b/test/jdk/sun/management/jdp/JdpJmxRemoteDynamicPortTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -64,7 +64,7 @@ protected void packetFromThisVMReceived(Map payload) throws Exce * It is set to wait for 10 times the defined pause between Jdp packet. See JdpOnTestCase.TIME_OUT_FACTOR. */ @Override - protected void onSocketTimeOut(SocketTimeoutException e) throws Exception { + protected void onSocketTimeout(SocketTimeoutException e) throws Exception { String message = "Timed out waiting for JDP packet. Should arrive within " + connection.pauseInSeconds + " seconds, but waited for " + timeOut + " seconds."; diff --git a/test/jdk/sun/management/jdp/JdpOffTest.java b/test/jdk/sun/management/jdp/JdpOffTest.java index c5f9af4984d..b52222562fe 100644 --- a/test/jdk/sun/management/jdp/JdpOffTest.java +++ b/test/jdk/sun/management/jdp/JdpOffTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -60,7 +60,7 @@ protected String[] options() { "-Dcom.sun.management.jmxremote.autodiscovery=false", "-Dcom.sun.management.jdp.pause=1", "-Dcom.sun.management.jdp.name=" + jdpName, - "-Djava.util.logging.SimpleFormatter.format='%1$tF %1$tT %4$-7s %5$s %n'", + "-Djava.util.logging.SimpleFormatter.format=%1$tF %1$tT %4$-7s %5$s %n", testName }; return options; diff --git a/test/jdk/sun/management/jdp/JdpOffTestCase.java b/test/jdk/sun/management/jdp/JdpOffTestCase.java index 54bb2bd3c31..6ddeebb8d00 100644 --- a/test/jdk/sun/management/jdp/JdpOffTestCase.java +++ b/test/jdk/sun/management/jdp/JdpOffTestCase.java @@ -49,8 +49,8 @@ protected String initialLogMessage() { * The socket has not received anything, and this is the expected behavior. */ @Override - protected void onSocketTimeOut(SocketTimeoutException e) throws Exception { - log.fine("No packages received. Test passed!"); + protected void onSocketTimeout(SocketTimeoutException e) throws Exception { + log.fine("No packets received. Test passed!"); testPassed = true; } @@ -77,7 +77,7 @@ protected void packetFromThisVMReceived(Map payload) throws Exce /** - * The test should stop after the socket has timed out. See onSocketTimeOut {@link}. + * The test should stop after the socket has timed out. See onSocketTimeout {@link}. */ @Override protected boolean shouldContinue() { diff --git a/test/jdk/sun/management/jdp/JdpOnTestCase.java b/test/jdk/sun/management/jdp/JdpOnTestCase.java index c6d2c30a162..00856bb4f5d 100644 --- a/test/jdk/sun/management/jdp/JdpOnTestCase.java +++ b/test/jdk/sun/management/jdp/JdpOnTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -64,10 +64,10 @@ protected void packetFromThisVMReceived(Map payload) { /** * The socket should not timeout. - * It is set to wait for 10 times the defined pause between Jdp packet. See JdpOnTestCase.TIME_OUT_FACTOR. + * It is set to wait for a multiple of the defined pause between Jdp packets. See JdpTestCase.TIME_OUT_FACTOR. */ @Override - protected void onSocketTimeOut(SocketTimeoutException e) throws Exception { + protected void onSocketTimeout(SocketTimeoutException e) throws Exception { String message = "Timed out waiting for JDP packet. Should arrive within " + connection.pauseInSeconds + " seconds, but waited for " + timeOut + " seconds."; diff --git a/test/jdk/sun/management/jdp/JdpSpecificAddressTest.java b/test/jdk/sun/management/jdp/JdpSpecificAddressTest.java index 1bc0cd01dcc..5134321a5c2 100644 --- a/test/jdk/sun/management/jdp/JdpSpecificAddressTest.java +++ b/test/jdk/sun/management/jdp/JdpSpecificAddressTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -61,7 +61,7 @@ protected String[] options() { "-Dcom.sun.management.jdp.name=" + jdpName, "-Dcom.sun.management.jdp.address=224.0.1.2", "-Dcom.sun.management.jdp.port=1234", - "-Djava.util.logging.SimpleFormatter.format='%1$tF %1$tT %4$-7s %5$s %n'", + "-Djava.util.logging.SimpleFormatter.format=%1$tF %1$tT %4$-7s %5$s %n", testName }; return options; diff --git a/test/jdk/sun/management/jdp/JdpTestCase.java b/test/jdk/sun/management/jdp/JdpTestCase.java index f9178b5f07c..71277e1d2ad 100644 --- a/test/jdk/sun/management/jdp/JdpTestCase.java +++ b/test/jdk/sun/management/jdp/JdpTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -40,10 +40,12 @@ import java.util.logging.Logger; public abstract class JdpTestCase { + + private static final int MAGIC = 0xC0FFEE42; // Jdp magic number. + private static final int BUFFER_LENGTH = 64 * 1024; // max UDP size, except for IPv6 jumbograms. + private static final int TIME_OUT_FACTOR = 10; // Socket times out after a multiple of the jdp pause. + final Logger log = Logger.getLogger("sun.management.jdp"); - final int MAGIC = 0xC0FFEE42; // Jdp magic number. - private static final int BUFFER_LENGTH = 64 * 1024; // max UDP size, except for IPv6 jumbograms. - private final int TIME_OUT_FACTOR = 10; // Socket times out after 10 times the jdp pause. protected int timeOut; private long startTime; protected ClientConnection connection; @@ -74,7 +76,7 @@ public void run() throws Exception { socket.receive(datagram); onReceived(extractUDPpayload(datagram)); } catch (SocketTimeoutException e) { - onSocketTimeOut(e); + onSocketTimeout(e); } if (!shouldContinue()) { @@ -117,7 +119,7 @@ private void onReceived(byte[] packet) throws Exception { /** * This method is executed when the socket has not received any packet for timeOut seconds. */ - abstract protected void onSocketTimeOut(SocketTimeoutException e) throws Exception; + abstract protected void onSocketTimeout(SocketTimeoutException e) throws Exception; /** * This method is executed after a correct Jdp packet has been received. @@ -156,7 +158,7 @@ protected void packetFromOtherVMReceived(Map payload) { * The test should stop if it has been 12 times the jdp.pause. * jdp.pause is how many seconds in between packets. *

- * This timeout (12 times)is slightly longer than the socket timeout (10 times) on purpose. + * This timeout (12 times) is slightly longer than the socket timeout (10 times) on purpose. * In the off test case, the socket should time out first. * * @return From d3359417f3cb853b078041d07b8459b7b29a0a94 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Mon, 16 Dec 2024 17:46:43 +0000 Subject: [PATCH 48/93] 8345678: compute_modifiers should not be in create_mirror Reviewed-by: fparain, dholmes --- src/hotspot/share/classfile/classFileParser.cpp | 7 ++++++- src/hotspot/share/classfile/javaClasses.cpp | 6 ------ src/hotspot/share/oops/arrayKlass.cpp | 4 ---- src/hotspot/share/oops/arrayKlass.hpp | 4 ---- src/hotspot/share/oops/objArrayKlass.cpp | 9 +++++---- src/hotspot/share/oops/typeArrayKlass.cpp | 7 +++++++ src/hotspot/share/oops/typeArrayKlass.hpp | 4 +++- src/hotspot/share/prims/jvmtiEnv.cpp | 2 +- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp index a26831cd783..050359056ee 100644 --- a/src/hotspot/share/classfile/classFileParser.cpp +++ b/src/hotspot/share/classfile/classFileParser.cpp @@ -3747,6 +3747,12 @@ void ClassFileParser::apply_parsed_class_metadata( this_klass->set_annotations(_combined_annotations); this_klass->set_permitted_subclasses(_permitted_subclasses); this_klass->set_record_components(_record_components); + + // Initialize cached modifier_flags to support Class.getModifiers(). + // This must follow setting inner_class attributes. + int computed_modifiers = this_klass->compute_modifier_flags(); + this_klass->set_modifier_flags(computed_modifiers); + // Delay the setting of _local_interfaces and _transitive_interfaces until after // initialize_supers() in fill_instance_klass(). It is because the _local_interfaces could // be shared with _transitive_interfaces and _transitive_interfaces may be shared with @@ -5167,7 +5173,6 @@ void ClassFileParser::fill_instance_klass(InstanceKlass* ik, Handle module_handle(THREAD, module_entry->module()); // Allocate mirror and initialize static fields - // The create_mirror() call will also call compute_modifiers() java_lang_Class::create_mirror(ik, Handle(THREAD, _loader_data->class_loader()), module_handle, diff --git a/src/hotspot/share/classfile/javaClasses.cpp b/src/hotspot/share/classfile/javaClasses.cpp index c8f6276cb01..1aedb43973c 100644 --- a/src/hotspot/share/classfile/javaClasses.cpp +++ b/src/hotspot/share/classfile/javaClasses.cpp @@ -1113,12 +1113,6 @@ void java_lang_Class::create_mirror(Klass* k, Handle class_loader, assert(k != nullptr, "Use create_basic_type_mirror for primitive types"); assert(k->java_mirror() == nullptr, "should only assign mirror once"); - // Use this moment of initialization to cache modifier_flags also, - // to support Class.getModifiers(). Instance classes recalculate - // the cached flags after the class file is parsed, but before the - // class is put into the system dictionary. - int computed_modifiers = k->compute_modifier_flags(); - k->set_modifier_flags(computed_modifiers); // Class_klass has to be loaded because it is used to allocate // the mirror. if (vmClasses::Class_klass_loaded()) { diff --git a/src/hotspot/share/oops/arrayKlass.cpp b/src/hotspot/share/oops/arrayKlass.cpp index fd362ae8a06..54b02cfd948 100644 --- a/src/hotspot/share/oops/arrayKlass.cpp +++ b/src/hotspot/share/oops/arrayKlass.cpp @@ -198,10 +198,6 @@ objArrayOop ArrayKlass::allocate_arrayArray(int n, int length, TRAPS) { return o; } -jint ArrayKlass::compute_modifier_flags() const { - return JVM_ACC_ABSTRACT | JVM_ACC_FINAL | JVM_ACC_PUBLIC; -} - // JVMTI support jint ArrayKlass::jvmti_class_status() const { diff --git a/src/hotspot/share/oops/arrayKlass.hpp b/src/hotspot/share/oops/arrayKlass.hpp index 1c1d01fc32a..5bfe46573d3 100644 --- a/src/hotspot/share/oops/arrayKlass.hpp +++ b/src/hotspot/share/oops/arrayKlass.hpp @@ -118,10 +118,6 @@ class ArrayKlass: public Klass { // Return a handle. static void complete_create_array_klass(ArrayKlass* k, Klass* super_klass, ModuleEntry* module, TRAPS); - - // jvm support - jint compute_modifier_flags() const; - // JVMTI support jint jvmti_class_status() const; diff --git a/src/hotspot/share/oops/objArrayKlass.cpp b/src/hotspot/share/oops/objArrayKlass.cpp index 0697901d174..04bc374e522 100644 --- a/src/hotspot/share/oops/objArrayKlass.cpp +++ b/src/hotspot/share/oops/objArrayKlass.cpp @@ -140,6 +140,9 @@ ObjArrayKlass::ObjArrayKlass(int n, Klass* element_klass, Symbol* name) : ArrayK set_layout_helper(array_layout_helper(T_OBJECT)); assert(is_array_klass(), "sanity"); assert(is_objArray_klass(), "sanity"); + + // Compute modifier flags after bottom_klass and element_klass are initialized. + set_modifier_flags(compute_modifier_flags()); } size_t ObjArrayKlass::oop_size(oop obj) const { @@ -340,10 +343,8 @@ void ObjArrayKlass::metaspace_pointers_do(MetaspaceClosure* it) { jint ObjArrayKlass::compute_modifier_flags() const { // The modifier for an objectArray is the same as its element - if (element_klass() == nullptr) { - assert(Universe::is_bootstrapping(), "partial objArray only at startup"); - return JVM_ACC_ABSTRACT | JVM_ACC_FINAL | JVM_ACC_PUBLIC; - } + assert (element_klass() != nullptr, "should be initialized"); + // Return the flags of the bottom element type. jint element_flags = bottom_klass()->compute_modifier_flags(); diff --git a/src/hotspot/share/oops/typeArrayKlass.cpp b/src/hotspot/share/oops/typeArrayKlass.cpp index ddf60d4382e..8ca6a49fc46 100644 --- a/src/hotspot/share/oops/typeArrayKlass.cpp +++ b/src/hotspot/share/oops/typeArrayKlass.cpp @@ -75,6 +75,10 @@ TypeArrayKlass* TypeArrayKlass::allocate(ClassLoaderData* loader_data, BasicType return new (loader_data, size, THREAD) TypeArrayKlass(type, name); } +jint TypeArrayKlass::compute_modifier_flags() const { + return JVM_ACC_ABSTRACT | JVM_ACC_FINAL | JVM_ACC_PUBLIC; +} + TypeArrayKlass::TypeArrayKlass(BasicType type, Symbol* name) : ArrayKlass(name, Kind) { set_layout_helper(array_layout_helper(type)); assert(is_array_klass(), "sanity"); @@ -84,6 +88,9 @@ TypeArrayKlass::TypeArrayKlass(BasicType type, Symbol* name) : ArrayKlass(name, assert(size() >= TypeArrayKlass::header_size(), "bad size"); set_class_loader_data(ClassLoaderData::the_null_class_loader_data()); + + // Compute modifier flags. + set_modifier_flags(compute_modifier_flags()); } typeArrayOop TypeArrayKlass::allocate_common(int length, bool do_zero, TRAPS) { diff --git a/src/hotspot/share/oops/typeArrayKlass.hpp b/src/hotspot/share/oops/typeArrayKlass.hpp index ae23c5324af..9dc3ed607fe 100644 --- a/src/hotspot/share/oops/typeArrayKlass.hpp +++ b/src/hotspot/share/oops/typeArrayKlass.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -73,6 +73,8 @@ class TypeArrayKlass : public ArrayKlass { // Copying void copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS); + jint compute_modifier_flags() const; + // Oop iterators. Since there are no oops in TypeArrayKlasses, // these functions only return the size of the object. diff --git a/src/hotspot/share/prims/jvmtiEnv.cpp b/src/hotspot/share/prims/jvmtiEnv.cpp index ff3dad67960..554b4baf7b2 100644 --- a/src/hotspot/share/prims/jvmtiEnv.cpp +++ b/src/hotspot/share/prims/jvmtiEnv.cpp @@ -2696,7 +2696,7 @@ JvmtiEnv::GetClassModifiers(oop k_mirror, jint* modifiers_ptr) { if (!java_lang_Class::is_primitive(k_mirror)) { Klass* k = java_lang_Class::as_Klass(k_mirror); NULL_CHECK(k, JVMTI_ERROR_INVALID_CLASS); - result = k->compute_modifier_flags(); + result = k->modifier_flags(); // Reset the deleted ACC_SUPER bit (deleted in compute_modifier_flags()). if (k->is_super()) { From 51662c2384326749fb4ee7a792d98b01d64e56f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eirik=20Bj=C3=B8rsn=C3=B8s?= Date: Mon, 16 Dec 2024 18:03:21 +0000 Subject: [PATCH 49/93] 8346232: Remove leftovers of the jar --normalize feature Reviewed-by: alanb, jpai --- src/jdk.jartool/share/classes/sun/tools/jar/Main.java | 1 - .../share/classes/sun/tools/jar/resources/jar.properties | 4 ---- .../share/classes/sun/tools/jar/resources/jar_de.properties | 3 +-- .../share/classes/sun/tools/jar/resources/jar_es.properties | 3 +-- .../share/classes/sun/tools/jar/resources/jar_fr.properties | 3 +-- .../share/classes/sun/tools/jar/resources/jar_it.properties | 3 +-- .../share/classes/sun/tools/jar/resources/jar_ja.properties | 3 +-- .../share/classes/sun/tools/jar/resources/jar_ko.properties | 3 +-- .../classes/sun/tools/jar/resources/jar_pt_BR.properties | 3 +-- .../share/classes/sun/tools/jar/resources/jar_sv.properties | 3 +-- .../classes/sun/tools/jar/resources/jar_zh_CN.properties | 3 +-- .../classes/sun/tools/jar/resources/jar_zh_TW.properties | 3 +-- 12 files changed, 10 insertions(+), 25 deletions(-) diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/Main.java b/src/jdk.jartool/share/classes/sun/tools/jar/Main.java index d6cc2dbcdde..132c73b6084 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/Main.java +++ b/src/jdk.jartool/share/classes/sun/tools/jar/Main.java @@ -152,7 +152,6 @@ public int hashCode() { * flag0: no zip compression (store only) * Mflag: DO NOT generate a manifest file (just ZIP) * iflag: generate jar index - * nflag: Perform jar normalization at the end * pflag: preserve/don't strip leading slash and .. component from file name * dflag: print module descriptor * kflag: keep existing file diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties index c7b34abb340..51e4299abc6 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties +++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties @@ -282,10 +282,6 @@ main.help.opt.any.verbose=\ \ -v, --verbose Generate verbose output on standard output main.help.opt.create=\ \ Operation modifiers valid only in create mode:\n -main.help.opt.create.normalize=\ -\ -n, --normalize Normalize information in the new jar archive\n\ -\ after creation. This option is deprecated, and is\n\ -\ planned for removal in a future JDK release main.help.opt.create.update=\ \ Operation modifiers valid only in create and update mode:\n main.help.opt.create.update.main-class=\ diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties index 85f8bb9fe29..65e86457ca3 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties +++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -115,7 +115,6 @@ main.help.opt.any=\ In jedem Modus gültige Vorgangsmodifikatoren:\n\n -C DIR main.help.opt.any.file=\ -f, --file=FILE Der Name der Archivdatei. Wenn Sie dies auslassen, wird entweder stdin oder\n stdout verwendet, je nach Vorgang\n --release VERSION Speichert alle der folgenden Dateien in einem versionierten Verzeichnis\n der JAR-Datei (d.h. META-INF/versions/VERSION/) main.help.opt.any.verbose=\ -v, --verbose Verbose-Ausgabe bei Standardausgabe generieren main.help.opt.create=\ Vorgangsmodifikatoren, die nur im Erstellungsmodus gültig sind:\n -main.help.opt.create.normalize=\ -n, --normalize Normalisiert Informationen im neuen JAR-Archiv\n nach der Erstellung. Diese Option ist veraltet, und ihre\n Entfernung in einem künftigen JDK-Release ist geplant main.help.opt.create.update=\ Vorgangsmodifikatoren, die nur im Erstellungs- und Aktualisierungsmodus gültig sind:\n main.help.opt.create.update.main-class=\ -e, --main-class=CLASSNAME Der Anwendungseinstiegspunkt für Standalone-\n Anwendungen, die in einem modularen oder ausführbaren\n JAR-Archiv gebündelt sind main.help.opt.create.update.manifest=\ -m, --manifest=FILE Die Manifestinformationen aus der angegebenen\n Manifestdatei aufnehmen 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 index 481259dfb1c..0e392cf9b7e 100644 --- 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 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -106,7 +106,6 @@ main.help.opt.any=\ Modificadores de operación válidos en cualquier modo:\n\n 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.normalize=\ -n, --normalize Normalizar información en el nuevo archivo jar\n después de la creació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 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 index 4a1a8ce4c1b..cc1886eb18c 100644 --- 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 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -106,7 +106,6 @@ main.help.opt.any=\ Modificateurs d'opération valides pour tous les modes :\n\n 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.normalize=\ -n, --normalize Normaliser des informations dans la nouvelle archive JAR\n après la création 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é 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 index ff36367cfe9..4d70d1a8835 100644 --- 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 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -106,7 +106,6 @@ main.help.opt.any=\ Modificatori di funzionamento validi in qualsiasi modalità: 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.normalize=\ -n, --normalize Normalizza le informazioni nel nuovo archivio jar\n dopo la creazione 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 diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties index 0444689acd3..586802d251c 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties +++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -115,7 +115,6 @@ main.help.opt.any=\ どのモードでも有効な操作修飾子:\n\n -C DIR main.help.opt.any.file=\ -f、--file=FILE アーカイブ・ファイル名。省略した場合、stdinまたは\n 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.normalize=\ -n, --normalize 新しいjarアーカイブの作成後、含まれる情報を\n 正規化します。このオプションは非推奨であり、\n 今後のJDKリリースで削除される予定です 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 指定のマニフェスト・ファイルからマニフェスト情報を\n 取り込みます 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 index e16815575ec..22fb3d99f8d 100644 --- 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 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -106,7 +106,6 @@ main.help.opt.any=\ 모든 모드에서 적합한 작업 수정자:\n\n -C DIR 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.normalize=\ -n, --normalize 생성 후 새 jar 아카이브에서 정보를\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 포함합니다. 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 index ec2b82ae603..a306a064afe 100644 --- 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 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -106,7 +106,6 @@ main.help.opt.any=\ Modificadores de operação válidos em qualquer modo:\n\n 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.normalize=\ -n, --normalize Normaliza as informações no novo arquivo compactado jar\n após a criação 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 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 index dda86c486a3..d42d77d5dc7 100644 --- 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 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -106,7 +106,6 @@ main.help.opt.any=\ Åtgärdsmodifierare som är giltiga i alla lägen:\n\n -C 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.normalize=\ -n, --normalize Normalisera informationen i det nya jar-arkivet\n när det har skapats 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 diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties index 06167a5b895..81d78000445 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties +++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -115,7 +115,6 @@ main.help.opt.any=\ 在任意模式下有效的操作修饰符:\n\n -C DIR main.help.opt.any.file=\ -f, --file=FILE 档案文件名。省略时, 基于操作\n 使用 stdin 或 stdout\n --release VERSION 将下面的所有文件都放在\n jar 的版本化目录中 (即 META-INF/versions/VERSION/) main.help.opt.any.verbose=\ -v, --verbose 在标准输出中生成详细输出 main.help.opt.create=\ 仅在创建模式下有效的操作修饰符:\n -main.help.opt.create.normalize=\ -n, --normalize 创建后在新的 jar 档案中\n 规范化信息。此选项已过时,\n 计划在未来的 JDK 发行版中删除 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 清单信息 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 index d1251510bda..4dc23a09389 100644 --- 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 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -106,7 +106,6 @@ main.help.opt.any=\ 可在任何模式下使用的作業修飾條件:\n\n -C DI 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.normalize=\ -n, --normalize 建立新的 jar 存檔之後,將其中的資訊\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 資訊 From c75b1d4bf65d927e18b10ea6de263a331b78e13a Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Mon, 16 Dec 2024 18:24:15 +0000 Subject: [PATCH 50/93] 8346082: Output JVMTI agent information in hserr files Reviewed-by: mdoerr, dholmes, stuefe --- src/hotspot/share/prims/jvmtiAgentList.hpp | 2 +- src/hotspot/share/runtime/os.cpp | 26 ++++++++++++++++++++++ src/hotspot/share/runtime/os.hpp | 1 + src/hotspot/share/utilities/vmError.cpp | 11 +++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/prims/jvmtiAgentList.hpp b/src/hotspot/share/prims/jvmtiAgentList.hpp index d53f5e63d9b..9aaa12cdd5c 100644 --- a/src/hotspot/share/prims/jvmtiAgentList.hpp +++ b/src/hotspot/share/prims/jvmtiAgentList.hpp @@ -61,7 +61,6 @@ class JvmtiAgentList : AllStatic { private: static JvmtiAgent* _list; - static Iterator all(); static void initialize(); static void convert_xrun_agents(); @@ -82,6 +81,7 @@ class JvmtiAgentList : AllStatic { static JvmtiAgent* lookup(JvmtiEnv* env, void* f_ptr); + static Iterator all(); static Iterator agents() NOT_JVMTI({ Iterator it; return it; }); static Iterator java_agents(); static Iterator native_agents(); diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp index f631556858f..f9f3c4e1458 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -49,6 +49,7 @@ #include "oops/oop.inline.hpp" #include "prims/jvm_misc.hpp" #include "prims/jvmtiAgent.hpp" +#include "prims/jvmtiAgentList.hpp" #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" #include "runtime/frame.inline.hpp" @@ -1121,6 +1122,31 @@ void os::print_environment_variables(outputStream* st, const char** env_list) { } } +void os::print_jvmti_agent_info(outputStream* st) { +#if INCLUDE_JVMTI + const JvmtiAgentList::Iterator it = JvmtiAgentList::all(); + if (it.has_next()) { + st->print_cr("JVMTI agents:"); + } else { + st->print_cr("JVMTI agents: none"); + } + while (it.has_next()) { + const JvmtiAgent* agent = it.next(); + if (agent != nullptr) { + const char* dyninfo = agent->is_dynamic() ? "dynamic " : ""; + const char* instrumentinfo = agent->is_instrument_lib() ? "instrumentlib " : ""; + const char* loadinfo = agent->is_loaded() ? "loaded" : "not loaded"; + const char* initinfo = agent->is_initialized() ? "initialized" : "not initialized"; + const char* optionsinfo = agent->options(); + const char* pathinfo = agent->os_lib_path(); + if (optionsinfo == nullptr) optionsinfo = "none"; + if (pathinfo == nullptr) pathinfo = "none"; + st->print_cr("%s path:%s, %s, %s, %s%soptions:%s", agent->name(), pathinfo, loadinfo, initinfo, dyninfo, instrumentinfo, optionsinfo); + } + } +#endif +} + void os::print_register_info(outputStream* st, const void* context) { int continuation = 0; print_register_info(st, context, continuation); diff --git a/src/hotspot/share/runtime/os.hpp b/src/hotspot/share/runtime/os.hpp index 8bfda7db653..242959034af 100644 --- a/src/hotspot/share/runtime/os.hpp +++ b/src/hotspot/share/runtime/os.hpp @@ -813,6 +813,7 @@ class os: AllStatic { static void print_summary_info(outputStream* st, char* buf, size_t buflen); static void print_memory_info(outputStream* st); static void print_dll_info(outputStream* st); + static void print_jvmti_agent_info(outputStream* st); static void print_environment_variables(outputStream* st, const char** env_list); static void print_context(outputStream* st, const void* context); static void print_tos_pc(outputStream* st, const void* context); diff --git a/src/hotspot/share/utilities/vmError.cpp b/src/hotspot/share/utilities/vmError.cpp index 223d8ee8849..b15d6f5fa73 100644 --- a/src/hotspot/share/utilities/vmError.cpp +++ b/src/hotspot/share/utilities/vmError.cpp @@ -1207,6 +1207,12 @@ void VMError::report(outputStream* st, bool _verbose) { os::print_dll_info(st); st->cr(); +#if INCLUDE_JVMTI + STEP_IF("printing jvmti agent info", _verbose) + os::print_jvmti_agent_info(st); + st->cr(); +#endif + STEP_IF("printing native decoder state", _verbose) Decoder::print_state_on(st); st->cr(); @@ -1385,6 +1391,11 @@ void VMError::print_vm_info(outputStream* st) { os::print_dll_info(st); st->cr(); +#if INCLUDE_JVMTI + os::print_jvmti_agent_info(st); + st->cr(); +#endif + // STEP("printing VM options") // VM options From 31c3b191745b5c97ae4e757323355fb9831da9fe Mon Sep 17 00:00:00 2001 From: Paul Sandoz Date: Mon, 16 Dec 2024 18:53:05 +0000 Subject: [PATCH 51/93] 8346174: UMAX/UMIN are missing from XXXVector::reductionOperations Reviewed-by: qamai, jbhateja --- src/hotspot/share/opto/vectorIntrinsics.cpp | 3 +- .../jdk/incubator/vector/ByteVector.java | 4 + .../jdk/incubator/vector/IntVector.java | 4 + .../jdk/incubator/vector/LongVector.java | 4 + .../jdk/incubator/vector/ShortVector.java | 4 + .../incubator/vector/X-Vector.java.template | 6 + .../incubator/vector/Byte128VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Byte256VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Byte512VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Byte64VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/ByteMaxVectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Int128VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Int256VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Int512VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Int64VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/IntMaxVectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Long128VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Long256VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Long512VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Long64VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/LongMaxVectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Short128VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Short256VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Short512VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/Short64VectorTests.java | 178 ++++++++++++++++++ .../incubator/vector/ShortMaxVectorTests.java | 178 ++++++++++++++++++ test/jdk/jdk/incubator/vector/gen-template.sh | 2 + 27 files changed, 3586 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/opto/vectorIntrinsics.cpp b/src/hotspot/share/opto/vectorIntrinsics.cpp index ce37e5604fa..51b320c8047 100644 --- a/src/hotspot/share/opto/vectorIntrinsics.cpp +++ b/src/hotspot/share/opto/vectorIntrinsics.cpp @@ -1386,8 +1386,9 @@ bool LibraryCallKit::inline_vector_reduction() { int opc = VectorSupport::vop2ideal(opr->get_con(), elem_bt); int sopc = ReductionNode::opcode(opc, elem_bt); + // Ensure reduction operation for lanewise operation // When using mask, mask use type needs to be VecMaskUseLoad. - if (!arch_supports_vector(sopc, num_elem, elem_bt, is_masked_op ? VecMaskUseLoad : VecMaskNotUsed)) { + if (sopc == opc || !arch_supports_vector(sopc, num_elem, elem_bt, is_masked_op ? VecMaskUseLoad : VecMaskNotUsed)) { log_if_needed(" ** not supported: arity=1 op=%d/reduce vlen=%d etype=%s is_masked_op=%d", sopc, num_elem, type2name(elem_bt), is_masked_op ? 1 : 0); return false; 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 eab5d5c15ae..7a2dbf247f7 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 @@ -2868,6 +2868,10 @@ private static ReductionOperation> reductionOperati toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (byte) Math.min(a, b))); case VECTOR_OP_MAX: return (v, m) -> toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (byte) Math.max(a, b))); + case VECTOR_OP_UMIN: return (v, m) -> + toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (byte) VectorMath.minUnsigned(a, b))); + case VECTOR_OP_UMAX: return (v, m) -> + toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (byte) VectorMath.maxUnsigned(a, b))); case VECTOR_OP_AND: return (v, m) -> toBits(v.rOp((byte)-1, m, (i, a, b) -> (byte)(a & b))); case VECTOR_OP_OR: return (v, m) -> 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 063b0c0d8e8..01ac8d1c414 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 @@ -2853,6 +2853,10 @@ private static ReductionOperation> reductionOpera toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (int) Math.min(a, b))); case VECTOR_OP_MAX: return (v, m) -> toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (int) Math.max(a, b))); + case VECTOR_OP_UMIN: return (v, m) -> + toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (int) VectorMath.minUnsigned(a, b))); + case VECTOR_OP_UMAX: return (v, m) -> + toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (int) VectorMath.maxUnsigned(a, b))); case VECTOR_OP_AND: return (v, m) -> toBits(v.rOp((int)-1, m, (i, a, b) -> (int)(a & b))); case VECTOR_OP_OR: return (v, m) -> 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 cde68c8fb38..fcc104d3ae6 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 @@ -2719,6 +2719,10 @@ private static ReductionOperation> reductionOperati toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (long) Math.min(a, b))); case VECTOR_OP_MAX: return (v, m) -> toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (long) Math.max(a, b))); + case VECTOR_OP_UMIN: return (v, m) -> + toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (long) VectorMath.minUnsigned(a, b))); + case VECTOR_OP_UMAX: return (v, m) -> + toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (long) VectorMath.maxUnsigned(a, b))); case VECTOR_OP_AND: return (v, m) -> toBits(v.rOp((long)-1, m, (i, a, b) -> (long)(a & b))); case VECTOR_OP_OR: return (v, m) -> 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 3cf848f31d0..cac04060a19 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 @@ -2869,6 +2869,10 @@ private static ReductionOperation> reductionOpera toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (short) Math.min(a, b))); case VECTOR_OP_MAX: return (v, m) -> toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (short) Math.max(a, b))); + case VECTOR_OP_UMIN: return (v, m) -> + toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> (short) VectorMath.minUnsigned(a, b))); + case VECTOR_OP_UMAX: return (v, m) -> + toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> (short) VectorMath.maxUnsigned(a, b))); case VECTOR_OP_AND: return (v, m) -> toBits(v.rOp((short)-1, m, (i, a, b) -> (short)(a & b))); case VECTOR_OP_OR: return (v, m) -> 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 835868e61cd..169f116afe9 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 @@ -3406,6 +3406,12 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> { toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> ($type$) Math.min(a, b))); case VECTOR_OP_MAX: return (v, m) -> toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> ($type$) Math.max(a, b))); +#if[!FP] + case VECTOR_OP_UMIN: return (v, m) -> + toBits(v.rOp(MAX_OR_INF, m, (i, a, b) -> ($type$) VectorMath.minUnsigned(a, b))); + case VECTOR_OP_UMAX: return (v, m) -> + toBits(v.rOp(MIN_OR_INF, m, (i, a, b) -> ($type$) VectorMath.maxUnsigned(a, b))); +#end[!FP] #if[BITWISE] case VECTOR_OP_AND: return (v, m) -> toBits(v.rOp(($type$)-1, m, (i, a, b) -> ($type$)(a & b))); diff --git a/test/jdk/jdk/incubator/vector/Byte128VectorTests.java b/test/jdk/jdk/incubator/vector/Byte128VectorTests.java index 36a140c474a..7c8265169f4 100644 --- a/test/jdk/jdk/incubator/vector/Byte128VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Byte128VectorTests.java @@ -3912,6 +3912,184 @@ static void MAXReduceByte128VectorTestsMasked(IntFunction fa, IntFunctio Byte128VectorTests::MAXReduceMasked, Byte128VectorTests::MAXReduceAllMasked); } + static byte UMINReduce(byte[] a, int idx) { + byte res = Byte.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (byte) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static byte UMINReduceAll(byte[] a) { + byte res = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpProvider") + static void UMINReduceByte128VectorTests(IntFunction fa) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + byte ra = Byte.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Byte128VectorTests::UMINReduce, Byte128VectorTests::UMINReduceAll); + } + + static byte UMINReduceMasked(byte[] a, int idx, boolean[] mask) { + byte res = Byte.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (byte) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static byte UMINReduceAllMasked(byte[] a, boolean[] mask) { + byte res = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpMaskProvider") + static void UMINReduceByte128VectorTestsMasked(IntFunction fa, IntFunction fm) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + byte ra = Byte.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Byte128VectorTests::UMINReduceMasked, Byte128VectorTests::UMINReduceAllMasked); + } + + static byte UMAXReduce(byte[] a, int idx) { + byte res = Byte.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (byte) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static byte UMAXReduceAll(byte[] a) { + byte res = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpProvider") + static void UMAXReduceByte128VectorTests(IntFunction fa) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + byte ra = Byte.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Byte128VectorTests::UMAXReduce, Byte128VectorTests::UMAXReduceAll); + } + + static byte UMAXReduceMasked(byte[] a, int idx, boolean[] mask) { + byte res = Byte.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (byte) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static byte UMAXReduceAllMasked(byte[] a, boolean[] mask) { + byte res = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpMaskProvider") + static void UMAXReduceByte128VectorTestsMasked(IntFunction fa, IntFunction fm) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + byte ra = Byte.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Byte128VectorTests::UMAXReduceMasked, Byte128VectorTests::UMAXReduceAllMasked); + } + static byte FIRST_NONZEROReduce(byte[] a, int idx) { byte res = (byte) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Byte256VectorTests.java b/test/jdk/jdk/incubator/vector/Byte256VectorTests.java index 0ad567b5ee4..0fbbca79f5d 100644 --- a/test/jdk/jdk/incubator/vector/Byte256VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Byte256VectorTests.java @@ -3912,6 +3912,184 @@ static void MAXReduceByte256VectorTestsMasked(IntFunction fa, IntFunctio Byte256VectorTests::MAXReduceMasked, Byte256VectorTests::MAXReduceAllMasked); } + static byte UMINReduce(byte[] a, int idx) { + byte res = Byte.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (byte) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static byte UMINReduceAll(byte[] a) { + byte res = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpProvider") + static void UMINReduceByte256VectorTests(IntFunction fa) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + byte ra = Byte.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Byte256VectorTests::UMINReduce, Byte256VectorTests::UMINReduceAll); + } + + static byte UMINReduceMasked(byte[] a, int idx, boolean[] mask) { + byte res = Byte.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (byte) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static byte UMINReduceAllMasked(byte[] a, boolean[] mask) { + byte res = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpMaskProvider") + static void UMINReduceByte256VectorTestsMasked(IntFunction fa, IntFunction fm) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + byte ra = Byte.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Byte256VectorTests::UMINReduceMasked, Byte256VectorTests::UMINReduceAllMasked); + } + + static byte UMAXReduce(byte[] a, int idx) { + byte res = Byte.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (byte) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static byte UMAXReduceAll(byte[] a) { + byte res = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpProvider") + static void UMAXReduceByte256VectorTests(IntFunction fa) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + byte ra = Byte.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Byte256VectorTests::UMAXReduce, Byte256VectorTests::UMAXReduceAll); + } + + static byte UMAXReduceMasked(byte[] a, int idx, boolean[] mask) { + byte res = Byte.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (byte) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static byte UMAXReduceAllMasked(byte[] a, boolean[] mask) { + byte res = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpMaskProvider") + static void UMAXReduceByte256VectorTestsMasked(IntFunction fa, IntFunction fm) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + byte ra = Byte.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Byte256VectorTests::UMAXReduceMasked, Byte256VectorTests::UMAXReduceAllMasked); + } + static byte FIRST_NONZEROReduce(byte[] a, int idx) { byte res = (byte) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Byte512VectorTests.java b/test/jdk/jdk/incubator/vector/Byte512VectorTests.java index 0edc66dfccc..a17e621a0e6 100644 --- a/test/jdk/jdk/incubator/vector/Byte512VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Byte512VectorTests.java @@ -3912,6 +3912,184 @@ static void MAXReduceByte512VectorTestsMasked(IntFunction fa, IntFunctio Byte512VectorTests::MAXReduceMasked, Byte512VectorTests::MAXReduceAllMasked); } + static byte UMINReduce(byte[] a, int idx) { + byte res = Byte.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (byte) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static byte UMINReduceAll(byte[] a) { + byte res = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpProvider") + static void UMINReduceByte512VectorTests(IntFunction fa) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + byte ra = Byte.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Byte512VectorTests::UMINReduce, Byte512VectorTests::UMINReduceAll); + } + + static byte UMINReduceMasked(byte[] a, int idx, boolean[] mask) { + byte res = Byte.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (byte) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static byte UMINReduceAllMasked(byte[] a, boolean[] mask) { + byte res = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpMaskProvider") + static void UMINReduceByte512VectorTestsMasked(IntFunction fa, IntFunction fm) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + byte ra = Byte.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Byte512VectorTests::UMINReduceMasked, Byte512VectorTests::UMINReduceAllMasked); + } + + static byte UMAXReduce(byte[] a, int idx) { + byte res = Byte.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (byte) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static byte UMAXReduceAll(byte[] a) { + byte res = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpProvider") + static void UMAXReduceByte512VectorTests(IntFunction fa) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + byte ra = Byte.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Byte512VectorTests::UMAXReduce, Byte512VectorTests::UMAXReduceAll); + } + + static byte UMAXReduceMasked(byte[] a, int idx, boolean[] mask) { + byte res = Byte.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (byte) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static byte UMAXReduceAllMasked(byte[] a, boolean[] mask) { + byte res = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpMaskProvider") + static void UMAXReduceByte512VectorTestsMasked(IntFunction fa, IntFunction fm) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + byte ra = Byte.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Byte512VectorTests::UMAXReduceMasked, Byte512VectorTests::UMAXReduceAllMasked); + } + static byte FIRST_NONZEROReduce(byte[] a, int idx) { byte res = (byte) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Byte64VectorTests.java b/test/jdk/jdk/incubator/vector/Byte64VectorTests.java index 98c8382c526..58f1d6295a0 100644 --- a/test/jdk/jdk/incubator/vector/Byte64VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Byte64VectorTests.java @@ -3912,6 +3912,184 @@ static void MAXReduceByte64VectorTestsMasked(IntFunction fa, IntFunction Byte64VectorTests::MAXReduceMasked, Byte64VectorTests::MAXReduceAllMasked); } + static byte UMINReduce(byte[] a, int idx) { + byte res = Byte.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (byte) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static byte UMINReduceAll(byte[] a) { + byte res = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpProvider") + static void UMINReduceByte64VectorTests(IntFunction fa) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + byte ra = Byte.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Byte64VectorTests::UMINReduce, Byte64VectorTests::UMINReduceAll); + } + + static byte UMINReduceMasked(byte[] a, int idx, boolean[] mask) { + byte res = Byte.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (byte) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static byte UMINReduceAllMasked(byte[] a, boolean[] mask) { + byte res = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpMaskProvider") + static void UMINReduceByte64VectorTestsMasked(IntFunction fa, IntFunction fm) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + byte ra = Byte.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Byte64VectorTests::UMINReduceMasked, Byte64VectorTests::UMINReduceAllMasked); + } + + static byte UMAXReduce(byte[] a, int idx) { + byte res = Byte.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (byte) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static byte UMAXReduceAll(byte[] a) { + byte res = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpProvider") + static void UMAXReduceByte64VectorTests(IntFunction fa) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + byte ra = Byte.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Byte64VectorTests::UMAXReduce, Byte64VectorTests::UMAXReduceAll); + } + + static byte UMAXReduceMasked(byte[] a, int idx, boolean[] mask) { + byte res = Byte.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (byte) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static byte UMAXReduceAllMasked(byte[] a, boolean[] mask) { + byte res = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpMaskProvider") + static void UMAXReduceByte64VectorTestsMasked(IntFunction fa, IntFunction fm) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + byte ra = Byte.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Byte64VectorTests::UMAXReduceMasked, Byte64VectorTests::UMAXReduceAllMasked); + } + static byte FIRST_NONZEROReduce(byte[] a, int idx) { byte res = (byte) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/ByteMaxVectorTests.java b/test/jdk/jdk/incubator/vector/ByteMaxVectorTests.java index 2d9d49f32ad..9aaf1b6db95 100644 --- a/test/jdk/jdk/incubator/vector/ByteMaxVectorTests.java +++ b/test/jdk/jdk/incubator/vector/ByteMaxVectorTests.java @@ -3917,6 +3917,184 @@ static void MAXReduceByteMaxVectorTestsMasked(IntFunction fa, IntFunctio ByteMaxVectorTests::MAXReduceMasked, ByteMaxVectorTests::MAXReduceAllMasked); } + static byte UMINReduce(byte[] a, int idx) { + byte res = Byte.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (byte) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static byte UMINReduceAll(byte[] a) { + byte res = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpProvider") + static void UMINReduceByteMaxVectorTests(IntFunction fa) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + byte ra = Byte.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + ByteMaxVectorTests::UMINReduce, ByteMaxVectorTests::UMINReduceAll); + } + + static byte UMINReduceMasked(byte[] a, int idx, boolean[] mask) { + byte res = Byte.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (byte) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static byte UMINReduceAllMasked(byte[] a, boolean[] mask) { + byte res = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpMaskProvider") + static void UMINReduceByteMaxVectorTestsMasked(IntFunction fa, IntFunction fm) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + byte ra = Byte.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + ByteMaxVectorTests::UMINReduceMasked, ByteMaxVectorTests::UMINReduceAllMasked); + } + + static byte UMAXReduce(byte[] a, int idx) { + byte res = Byte.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (byte) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static byte UMAXReduceAll(byte[] a) { + byte res = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpProvider") + static void UMAXReduceByteMaxVectorTests(IntFunction fa) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + byte ra = Byte.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + ByteMaxVectorTests::UMAXReduce, ByteMaxVectorTests::UMAXReduceAll); + } + + static byte UMAXReduceMasked(byte[] a, int idx, boolean[] mask) { + byte res = Byte.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (byte) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static byte UMAXReduceAllMasked(byte[] a, boolean[] mask) { + byte res = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (byte) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "byteUnaryOpMaskProvider") + static void UMAXReduceByteMaxVectorTestsMasked(IntFunction fa, IntFunction fm) { + byte[] a = fa.apply(SPECIES.length()); + byte[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + byte ra = Byte.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Byte.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ByteVector av = ByteVector.fromArray(SPECIES, a, i); + ra = (byte) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + ByteMaxVectorTests::UMAXReduceMasked, ByteMaxVectorTests::UMAXReduceAllMasked); + } + static byte FIRST_NONZEROReduce(byte[] a, int idx) { byte res = (byte) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Int128VectorTests.java b/test/jdk/jdk/incubator/vector/Int128VectorTests.java index 028e757e853..4f8f296c519 100644 --- a/test/jdk/jdk/incubator/vector/Int128VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Int128VectorTests.java @@ -3956,6 +3956,184 @@ static void MAXReduceInt128VectorTestsMasked(IntFunction fa, IntFunction< Int128VectorTests::MAXReduceMasked, Int128VectorTests::MAXReduceAllMasked); } + static int UMINReduce(int[] a, int idx) { + int res = Integer.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (int) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static int UMINReduceAll(int[] a) { + int res = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpProvider") + static void UMINReduceInt128VectorTests(IntFunction fa) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + int ra = Integer.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Int128VectorTests::UMINReduce, Int128VectorTests::UMINReduceAll); + } + + static int UMINReduceMasked(int[] a, int idx, boolean[] mask) { + int res = Integer.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (int) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static int UMINReduceAllMasked(int[] a, boolean[] mask) { + int res = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpMaskProvider") + static void UMINReduceInt128VectorTestsMasked(IntFunction fa, IntFunction fm) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + int ra = Integer.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Int128VectorTests::UMINReduceMasked, Int128VectorTests::UMINReduceAllMasked); + } + + static int UMAXReduce(int[] a, int idx) { + int res = Integer.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (int) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static int UMAXReduceAll(int[] a) { + int res = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpProvider") + static void UMAXReduceInt128VectorTests(IntFunction fa) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + int ra = Integer.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Int128VectorTests::UMAXReduce, Int128VectorTests::UMAXReduceAll); + } + + static int UMAXReduceMasked(int[] a, int idx, boolean[] mask) { + int res = Integer.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (int) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static int UMAXReduceAllMasked(int[] a, boolean[] mask) { + int res = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpMaskProvider") + static void UMAXReduceInt128VectorTestsMasked(IntFunction fa, IntFunction fm) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + int ra = Integer.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Int128VectorTests::UMAXReduceMasked, Int128VectorTests::UMAXReduceAllMasked); + } + static int FIRST_NONZEROReduce(int[] a, int idx) { int res = (int) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Int256VectorTests.java b/test/jdk/jdk/incubator/vector/Int256VectorTests.java index 6dab8a39873..312227c54e1 100644 --- a/test/jdk/jdk/incubator/vector/Int256VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Int256VectorTests.java @@ -3956,6 +3956,184 @@ static void MAXReduceInt256VectorTestsMasked(IntFunction fa, IntFunction< Int256VectorTests::MAXReduceMasked, Int256VectorTests::MAXReduceAllMasked); } + static int UMINReduce(int[] a, int idx) { + int res = Integer.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (int) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static int UMINReduceAll(int[] a) { + int res = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpProvider") + static void UMINReduceInt256VectorTests(IntFunction fa) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + int ra = Integer.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Int256VectorTests::UMINReduce, Int256VectorTests::UMINReduceAll); + } + + static int UMINReduceMasked(int[] a, int idx, boolean[] mask) { + int res = Integer.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (int) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static int UMINReduceAllMasked(int[] a, boolean[] mask) { + int res = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpMaskProvider") + static void UMINReduceInt256VectorTestsMasked(IntFunction fa, IntFunction fm) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + int ra = Integer.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Int256VectorTests::UMINReduceMasked, Int256VectorTests::UMINReduceAllMasked); + } + + static int UMAXReduce(int[] a, int idx) { + int res = Integer.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (int) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static int UMAXReduceAll(int[] a) { + int res = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpProvider") + static void UMAXReduceInt256VectorTests(IntFunction fa) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + int ra = Integer.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Int256VectorTests::UMAXReduce, Int256VectorTests::UMAXReduceAll); + } + + static int UMAXReduceMasked(int[] a, int idx, boolean[] mask) { + int res = Integer.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (int) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static int UMAXReduceAllMasked(int[] a, boolean[] mask) { + int res = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpMaskProvider") + static void UMAXReduceInt256VectorTestsMasked(IntFunction fa, IntFunction fm) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + int ra = Integer.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Int256VectorTests::UMAXReduceMasked, Int256VectorTests::UMAXReduceAllMasked); + } + static int FIRST_NONZEROReduce(int[] a, int idx) { int res = (int) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Int512VectorTests.java b/test/jdk/jdk/incubator/vector/Int512VectorTests.java index 0c86655ff22..3e5b51180b6 100644 --- a/test/jdk/jdk/incubator/vector/Int512VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Int512VectorTests.java @@ -3956,6 +3956,184 @@ static void MAXReduceInt512VectorTestsMasked(IntFunction fa, IntFunction< Int512VectorTests::MAXReduceMasked, Int512VectorTests::MAXReduceAllMasked); } + static int UMINReduce(int[] a, int idx) { + int res = Integer.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (int) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static int UMINReduceAll(int[] a) { + int res = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpProvider") + static void UMINReduceInt512VectorTests(IntFunction fa) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + int ra = Integer.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Int512VectorTests::UMINReduce, Int512VectorTests::UMINReduceAll); + } + + static int UMINReduceMasked(int[] a, int idx, boolean[] mask) { + int res = Integer.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (int) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static int UMINReduceAllMasked(int[] a, boolean[] mask) { + int res = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpMaskProvider") + static void UMINReduceInt512VectorTestsMasked(IntFunction fa, IntFunction fm) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + int ra = Integer.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Int512VectorTests::UMINReduceMasked, Int512VectorTests::UMINReduceAllMasked); + } + + static int UMAXReduce(int[] a, int idx) { + int res = Integer.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (int) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static int UMAXReduceAll(int[] a) { + int res = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpProvider") + static void UMAXReduceInt512VectorTests(IntFunction fa) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + int ra = Integer.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Int512VectorTests::UMAXReduce, Int512VectorTests::UMAXReduceAll); + } + + static int UMAXReduceMasked(int[] a, int idx, boolean[] mask) { + int res = Integer.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (int) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static int UMAXReduceAllMasked(int[] a, boolean[] mask) { + int res = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpMaskProvider") + static void UMAXReduceInt512VectorTestsMasked(IntFunction fa, IntFunction fm) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + int ra = Integer.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Int512VectorTests::UMAXReduceMasked, Int512VectorTests::UMAXReduceAllMasked); + } + static int FIRST_NONZEROReduce(int[] a, int idx) { int res = (int) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Int64VectorTests.java b/test/jdk/jdk/incubator/vector/Int64VectorTests.java index b2cb3698f62..fccad11d4d6 100644 --- a/test/jdk/jdk/incubator/vector/Int64VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Int64VectorTests.java @@ -3956,6 +3956,184 @@ static void MAXReduceInt64VectorTestsMasked(IntFunction fa, IntFunction fa) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + int ra = Integer.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Int64VectorTests::UMINReduce, Int64VectorTests::UMINReduceAll); + } + + static int UMINReduceMasked(int[] a, int idx, boolean[] mask) { + int res = Integer.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (int) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static int UMINReduceAllMasked(int[] a, boolean[] mask) { + int res = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpMaskProvider") + static void UMINReduceInt64VectorTestsMasked(IntFunction fa, IntFunction fm) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + int ra = Integer.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Int64VectorTests::UMINReduceMasked, Int64VectorTests::UMINReduceAllMasked); + } + + static int UMAXReduce(int[] a, int idx) { + int res = Integer.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (int) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static int UMAXReduceAll(int[] a) { + int res = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpProvider") + static void UMAXReduceInt64VectorTests(IntFunction fa) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + int ra = Integer.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Int64VectorTests::UMAXReduce, Int64VectorTests::UMAXReduceAll); + } + + static int UMAXReduceMasked(int[] a, int idx, boolean[] mask) { + int res = Integer.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (int) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static int UMAXReduceAllMasked(int[] a, boolean[] mask) { + int res = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpMaskProvider") + static void UMAXReduceInt64VectorTestsMasked(IntFunction fa, IntFunction fm) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + int ra = Integer.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Int64VectorTests::UMAXReduceMasked, Int64VectorTests::UMAXReduceAllMasked); + } + static int FIRST_NONZEROReduce(int[] a, int idx) { int res = (int) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/IntMaxVectorTests.java b/test/jdk/jdk/incubator/vector/IntMaxVectorTests.java index fc0f6c1c139..3254c2fb86c 100644 --- a/test/jdk/jdk/incubator/vector/IntMaxVectorTests.java +++ b/test/jdk/jdk/incubator/vector/IntMaxVectorTests.java @@ -3961,6 +3961,184 @@ static void MAXReduceIntMaxVectorTestsMasked(IntFunction fa, IntFunction< IntMaxVectorTests::MAXReduceMasked, IntMaxVectorTests::MAXReduceAllMasked); } + static int UMINReduce(int[] a, int idx) { + int res = Integer.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (int) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static int UMINReduceAll(int[] a) { + int res = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpProvider") + static void UMINReduceIntMaxVectorTests(IntFunction fa) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + int ra = Integer.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + IntMaxVectorTests::UMINReduce, IntMaxVectorTests::UMINReduceAll); + } + + static int UMINReduceMasked(int[] a, int idx, boolean[] mask) { + int res = Integer.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (int) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static int UMINReduceAllMasked(int[] a, boolean[] mask) { + int res = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpMaskProvider") + static void UMINReduceIntMaxVectorTestsMasked(IntFunction fa, IntFunction fm) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + int ra = Integer.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + IntMaxVectorTests::UMINReduceMasked, IntMaxVectorTests::UMINReduceAllMasked); + } + + static int UMAXReduce(int[] a, int idx) { + int res = Integer.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (int) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static int UMAXReduceAll(int[] a) { + int res = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpProvider") + static void UMAXReduceIntMaxVectorTests(IntFunction fa) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + int ra = Integer.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + IntMaxVectorTests::UMAXReduce, IntMaxVectorTests::UMAXReduceAll); + } + + static int UMAXReduceMasked(int[] a, int idx, boolean[] mask) { + int res = Integer.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (int) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static int UMAXReduceAllMasked(int[] a, boolean[] mask) { + int res = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (int) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "intUnaryOpMaskProvider") + static void UMAXReduceIntMaxVectorTestsMasked(IntFunction fa, IntFunction fm) { + int[] a = fa.apply(SPECIES.length()); + int[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + int ra = Integer.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Integer.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + IntVector av = IntVector.fromArray(SPECIES, a, i); + ra = (int) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + IntMaxVectorTests::UMAXReduceMasked, IntMaxVectorTests::UMAXReduceAllMasked); + } + static int FIRST_NONZEROReduce(int[] a, int idx) { int res = (int) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Long128VectorTests.java b/test/jdk/jdk/incubator/vector/Long128VectorTests.java index 3694128877a..09fdc3c1979 100644 --- a/test/jdk/jdk/incubator/vector/Long128VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Long128VectorTests.java @@ -3978,6 +3978,184 @@ static void MAXReduceLong128VectorTestsMasked(IntFunction fa, IntFunctio Long128VectorTests::MAXReduceMasked, Long128VectorTests::MAXReduceAllMasked); } + static long UMINReduce(long[] a, int idx) { + long res = Long.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (long) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static long UMINReduceAll(long[] a) { + long res = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpProvider") + static void UMINReduceLong128VectorTests(IntFunction fa) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + long ra = Long.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Long128VectorTests::UMINReduce, Long128VectorTests::UMINReduceAll); + } + + static long UMINReduceMasked(long[] a, int idx, boolean[] mask) { + long res = Long.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (long) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static long UMINReduceAllMasked(long[] a, boolean[] mask) { + long res = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpMaskProvider") + static void UMINReduceLong128VectorTestsMasked(IntFunction fa, IntFunction fm) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + long ra = Long.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Long128VectorTests::UMINReduceMasked, Long128VectorTests::UMINReduceAllMasked); + } + + static long UMAXReduce(long[] a, int idx) { + long res = Long.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (long) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static long UMAXReduceAll(long[] a) { + long res = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpProvider") + static void UMAXReduceLong128VectorTests(IntFunction fa) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + long ra = Long.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Long128VectorTests::UMAXReduce, Long128VectorTests::UMAXReduceAll); + } + + static long UMAXReduceMasked(long[] a, int idx, boolean[] mask) { + long res = Long.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (long) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static long UMAXReduceAllMasked(long[] a, boolean[] mask) { + long res = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpMaskProvider") + static void UMAXReduceLong128VectorTestsMasked(IntFunction fa, IntFunction fm) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + long ra = Long.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Long128VectorTests::UMAXReduceMasked, Long128VectorTests::UMAXReduceAllMasked); + } + static long FIRST_NONZEROReduce(long[] a, int idx) { long res = (long) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Long256VectorTests.java b/test/jdk/jdk/incubator/vector/Long256VectorTests.java index 1fc441680fd..7dd0da772ed 100644 --- a/test/jdk/jdk/incubator/vector/Long256VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Long256VectorTests.java @@ -3978,6 +3978,184 @@ static void MAXReduceLong256VectorTestsMasked(IntFunction fa, IntFunctio Long256VectorTests::MAXReduceMasked, Long256VectorTests::MAXReduceAllMasked); } + static long UMINReduce(long[] a, int idx) { + long res = Long.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (long) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static long UMINReduceAll(long[] a) { + long res = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpProvider") + static void UMINReduceLong256VectorTests(IntFunction fa) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + long ra = Long.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Long256VectorTests::UMINReduce, Long256VectorTests::UMINReduceAll); + } + + static long UMINReduceMasked(long[] a, int idx, boolean[] mask) { + long res = Long.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (long) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static long UMINReduceAllMasked(long[] a, boolean[] mask) { + long res = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpMaskProvider") + static void UMINReduceLong256VectorTestsMasked(IntFunction fa, IntFunction fm) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + long ra = Long.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Long256VectorTests::UMINReduceMasked, Long256VectorTests::UMINReduceAllMasked); + } + + static long UMAXReduce(long[] a, int idx) { + long res = Long.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (long) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static long UMAXReduceAll(long[] a) { + long res = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpProvider") + static void UMAXReduceLong256VectorTests(IntFunction fa) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + long ra = Long.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Long256VectorTests::UMAXReduce, Long256VectorTests::UMAXReduceAll); + } + + static long UMAXReduceMasked(long[] a, int idx, boolean[] mask) { + long res = Long.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (long) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static long UMAXReduceAllMasked(long[] a, boolean[] mask) { + long res = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpMaskProvider") + static void UMAXReduceLong256VectorTestsMasked(IntFunction fa, IntFunction fm) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + long ra = Long.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Long256VectorTests::UMAXReduceMasked, Long256VectorTests::UMAXReduceAllMasked); + } + static long FIRST_NONZEROReduce(long[] a, int idx) { long res = (long) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Long512VectorTests.java b/test/jdk/jdk/incubator/vector/Long512VectorTests.java index 81d538a55c4..360e822e121 100644 --- a/test/jdk/jdk/incubator/vector/Long512VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Long512VectorTests.java @@ -3978,6 +3978,184 @@ static void MAXReduceLong512VectorTestsMasked(IntFunction fa, IntFunctio Long512VectorTests::MAXReduceMasked, Long512VectorTests::MAXReduceAllMasked); } + static long UMINReduce(long[] a, int idx) { + long res = Long.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (long) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static long UMINReduceAll(long[] a) { + long res = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpProvider") + static void UMINReduceLong512VectorTests(IntFunction fa) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + long ra = Long.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Long512VectorTests::UMINReduce, Long512VectorTests::UMINReduceAll); + } + + static long UMINReduceMasked(long[] a, int idx, boolean[] mask) { + long res = Long.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (long) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static long UMINReduceAllMasked(long[] a, boolean[] mask) { + long res = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpMaskProvider") + static void UMINReduceLong512VectorTestsMasked(IntFunction fa, IntFunction fm) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + long ra = Long.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Long512VectorTests::UMINReduceMasked, Long512VectorTests::UMINReduceAllMasked); + } + + static long UMAXReduce(long[] a, int idx) { + long res = Long.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (long) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static long UMAXReduceAll(long[] a) { + long res = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpProvider") + static void UMAXReduceLong512VectorTests(IntFunction fa) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + long ra = Long.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Long512VectorTests::UMAXReduce, Long512VectorTests::UMAXReduceAll); + } + + static long UMAXReduceMasked(long[] a, int idx, boolean[] mask) { + long res = Long.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (long) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static long UMAXReduceAllMasked(long[] a, boolean[] mask) { + long res = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpMaskProvider") + static void UMAXReduceLong512VectorTestsMasked(IntFunction fa, IntFunction fm) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + long ra = Long.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Long512VectorTests::UMAXReduceMasked, Long512VectorTests::UMAXReduceAllMasked); + } + static long FIRST_NONZEROReduce(long[] a, int idx) { long res = (long) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Long64VectorTests.java b/test/jdk/jdk/incubator/vector/Long64VectorTests.java index 1d85fc510d9..31f6fafea7c 100644 --- a/test/jdk/jdk/incubator/vector/Long64VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Long64VectorTests.java @@ -3978,6 +3978,184 @@ static void MAXReduceLong64VectorTestsMasked(IntFunction fa, IntFunction Long64VectorTests::MAXReduceMasked, Long64VectorTests::MAXReduceAllMasked); } + static long UMINReduce(long[] a, int idx) { + long res = Long.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (long) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static long UMINReduceAll(long[] a) { + long res = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpProvider") + static void UMINReduceLong64VectorTests(IntFunction fa) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + long ra = Long.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Long64VectorTests::UMINReduce, Long64VectorTests::UMINReduceAll); + } + + static long UMINReduceMasked(long[] a, int idx, boolean[] mask) { + long res = Long.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (long) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static long UMINReduceAllMasked(long[] a, boolean[] mask) { + long res = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpMaskProvider") + static void UMINReduceLong64VectorTestsMasked(IntFunction fa, IntFunction fm) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + long ra = Long.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Long64VectorTests::UMINReduceMasked, Long64VectorTests::UMINReduceAllMasked); + } + + static long UMAXReduce(long[] a, int idx) { + long res = Long.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (long) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static long UMAXReduceAll(long[] a) { + long res = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpProvider") + static void UMAXReduceLong64VectorTests(IntFunction fa) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + long ra = Long.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Long64VectorTests::UMAXReduce, Long64VectorTests::UMAXReduceAll); + } + + static long UMAXReduceMasked(long[] a, int idx, boolean[] mask) { + long res = Long.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (long) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static long UMAXReduceAllMasked(long[] a, boolean[] mask) { + long res = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpMaskProvider") + static void UMAXReduceLong64VectorTestsMasked(IntFunction fa, IntFunction fm) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + long ra = Long.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Long64VectorTests::UMAXReduceMasked, Long64VectorTests::UMAXReduceAllMasked); + } + static long FIRST_NONZEROReduce(long[] a, int idx) { long res = (long) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/LongMaxVectorTests.java b/test/jdk/jdk/incubator/vector/LongMaxVectorTests.java index bae5b968d79..a3cacbe3251 100644 --- a/test/jdk/jdk/incubator/vector/LongMaxVectorTests.java +++ b/test/jdk/jdk/incubator/vector/LongMaxVectorTests.java @@ -3983,6 +3983,184 @@ static void MAXReduceLongMaxVectorTestsMasked(IntFunction fa, IntFunctio LongMaxVectorTests::MAXReduceMasked, LongMaxVectorTests::MAXReduceAllMasked); } + static long UMINReduce(long[] a, int idx) { + long res = Long.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (long) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static long UMINReduceAll(long[] a) { + long res = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpProvider") + static void UMINReduceLongMaxVectorTests(IntFunction fa) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + long ra = Long.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + LongMaxVectorTests::UMINReduce, LongMaxVectorTests::UMINReduceAll); + } + + static long UMINReduceMasked(long[] a, int idx, boolean[] mask) { + long res = Long.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (long) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static long UMINReduceAllMasked(long[] a, boolean[] mask) { + long res = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpMaskProvider") + static void UMINReduceLongMaxVectorTestsMasked(IntFunction fa, IntFunction fm) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + long ra = Long.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + LongMaxVectorTests::UMINReduceMasked, LongMaxVectorTests::UMINReduceAllMasked); + } + + static long UMAXReduce(long[] a, int idx) { + long res = Long.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (long) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static long UMAXReduceAll(long[] a) { + long res = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpProvider") + static void UMAXReduceLongMaxVectorTests(IntFunction fa) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + long ra = Long.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + LongMaxVectorTests::UMAXReduce, LongMaxVectorTests::UMAXReduceAll); + } + + static long UMAXReduceMasked(long[] a, int idx, boolean[] mask) { + long res = Long.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (long) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static long UMAXReduceAllMasked(long[] a, boolean[] mask) { + long res = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (long) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "longUnaryOpMaskProvider") + static void UMAXReduceLongMaxVectorTestsMasked(IntFunction fa, IntFunction fm) { + long[] a = fa.apply(SPECIES.length()); + long[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + long ra = Long.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Long.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + LongVector av = LongVector.fromArray(SPECIES, a, i); + ra = (long) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + LongMaxVectorTests::UMAXReduceMasked, LongMaxVectorTests::UMAXReduceAllMasked); + } + static long FIRST_NONZEROReduce(long[] a, int idx) { long res = (long) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Short128VectorTests.java b/test/jdk/jdk/incubator/vector/Short128VectorTests.java index 2d6a1fd0a5f..967418181bf 100644 --- a/test/jdk/jdk/incubator/vector/Short128VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Short128VectorTests.java @@ -3903,6 +3903,184 @@ static void MAXReduceShort128VectorTestsMasked(IntFunction fa, IntFunct Short128VectorTests::MAXReduceMasked, Short128VectorTests::MAXReduceAllMasked); } + static short UMINReduce(short[] a, int idx) { + short res = Short.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (short) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static short UMINReduceAll(short[] a) { + short res = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpProvider") + static void UMINReduceShort128VectorTests(IntFunction fa) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + short ra = Short.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Short128VectorTests::UMINReduce, Short128VectorTests::UMINReduceAll); + } + + static short UMINReduceMasked(short[] a, int idx, boolean[] mask) { + short res = Short.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (short) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static short UMINReduceAllMasked(short[] a, boolean[] mask) { + short res = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpMaskProvider") + static void UMINReduceShort128VectorTestsMasked(IntFunction fa, IntFunction fm) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + short ra = Short.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Short128VectorTests::UMINReduceMasked, Short128VectorTests::UMINReduceAllMasked); + } + + static short UMAXReduce(short[] a, int idx) { + short res = Short.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (short) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static short UMAXReduceAll(short[] a) { + short res = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpProvider") + static void UMAXReduceShort128VectorTests(IntFunction fa) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + short ra = Short.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Short128VectorTests::UMAXReduce, Short128VectorTests::UMAXReduceAll); + } + + static short UMAXReduceMasked(short[] a, int idx, boolean[] mask) { + short res = Short.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (short) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static short UMAXReduceAllMasked(short[] a, boolean[] mask) { + short res = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpMaskProvider") + static void UMAXReduceShort128VectorTestsMasked(IntFunction fa, IntFunction fm) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + short ra = Short.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Short128VectorTests::UMAXReduceMasked, Short128VectorTests::UMAXReduceAllMasked); + } + static short FIRST_NONZEROReduce(short[] a, int idx) { short res = (short) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Short256VectorTests.java b/test/jdk/jdk/incubator/vector/Short256VectorTests.java index fa8ec1f31b6..2386d89e53b 100644 --- a/test/jdk/jdk/incubator/vector/Short256VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Short256VectorTests.java @@ -3903,6 +3903,184 @@ static void MAXReduceShort256VectorTestsMasked(IntFunction fa, IntFunct Short256VectorTests::MAXReduceMasked, Short256VectorTests::MAXReduceAllMasked); } + static short UMINReduce(short[] a, int idx) { + short res = Short.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (short) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static short UMINReduceAll(short[] a) { + short res = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpProvider") + static void UMINReduceShort256VectorTests(IntFunction fa) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + short ra = Short.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Short256VectorTests::UMINReduce, Short256VectorTests::UMINReduceAll); + } + + static short UMINReduceMasked(short[] a, int idx, boolean[] mask) { + short res = Short.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (short) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static short UMINReduceAllMasked(short[] a, boolean[] mask) { + short res = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpMaskProvider") + static void UMINReduceShort256VectorTestsMasked(IntFunction fa, IntFunction fm) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + short ra = Short.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Short256VectorTests::UMINReduceMasked, Short256VectorTests::UMINReduceAllMasked); + } + + static short UMAXReduce(short[] a, int idx) { + short res = Short.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (short) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static short UMAXReduceAll(short[] a) { + short res = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpProvider") + static void UMAXReduceShort256VectorTests(IntFunction fa) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + short ra = Short.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Short256VectorTests::UMAXReduce, Short256VectorTests::UMAXReduceAll); + } + + static short UMAXReduceMasked(short[] a, int idx, boolean[] mask) { + short res = Short.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (short) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static short UMAXReduceAllMasked(short[] a, boolean[] mask) { + short res = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpMaskProvider") + static void UMAXReduceShort256VectorTestsMasked(IntFunction fa, IntFunction fm) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + short ra = Short.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Short256VectorTests::UMAXReduceMasked, Short256VectorTests::UMAXReduceAllMasked); + } + static short FIRST_NONZEROReduce(short[] a, int idx) { short res = (short) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Short512VectorTests.java b/test/jdk/jdk/incubator/vector/Short512VectorTests.java index ba6a7dadebd..cb9fc1830b9 100644 --- a/test/jdk/jdk/incubator/vector/Short512VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Short512VectorTests.java @@ -3903,6 +3903,184 @@ static void MAXReduceShort512VectorTestsMasked(IntFunction fa, IntFunct Short512VectorTests::MAXReduceMasked, Short512VectorTests::MAXReduceAllMasked); } + static short UMINReduce(short[] a, int idx) { + short res = Short.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (short) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static short UMINReduceAll(short[] a) { + short res = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpProvider") + static void UMINReduceShort512VectorTests(IntFunction fa) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + short ra = Short.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Short512VectorTests::UMINReduce, Short512VectorTests::UMINReduceAll); + } + + static short UMINReduceMasked(short[] a, int idx, boolean[] mask) { + short res = Short.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (short) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static short UMINReduceAllMasked(short[] a, boolean[] mask) { + short res = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpMaskProvider") + static void UMINReduceShort512VectorTestsMasked(IntFunction fa, IntFunction fm) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + short ra = Short.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Short512VectorTests::UMINReduceMasked, Short512VectorTests::UMINReduceAllMasked); + } + + static short UMAXReduce(short[] a, int idx) { + short res = Short.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (short) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static short UMAXReduceAll(short[] a) { + short res = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpProvider") + static void UMAXReduceShort512VectorTests(IntFunction fa) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + short ra = Short.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Short512VectorTests::UMAXReduce, Short512VectorTests::UMAXReduceAll); + } + + static short UMAXReduceMasked(short[] a, int idx, boolean[] mask) { + short res = Short.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (short) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static short UMAXReduceAllMasked(short[] a, boolean[] mask) { + short res = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpMaskProvider") + static void UMAXReduceShort512VectorTestsMasked(IntFunction fa, IntFunction fm) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + short ra = Short.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Short512VectorTests::UMAXReduceMasked, Short512VectorTests::UMAXReduceAllMasked); + } + static short FIRST_NONZEROReduce(short[] a, int idx) { short res = (short) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/Short64VectorTests.java b/test/jdk/jdk/incubator/vector/Short64VectorTests.java index 939da11d53a..64bb5f52329 100644 --- a/test/jdk/jdk/incubator/vector/Short64VectorTests.java +++ b/test/jdk/jdk/incubator/vector/Short64VectorTests.java @@ -3903,6 +3903,184 @@ static void MAXReduceShort64VectorTestsMasked(IntFunction fa, IntFuncti Short64VectorTests::MAXReduceMasked, Short64VectorTests::MAXReduceAllMasked); } + static short UMINReduce(short[] a, int idx) { + short res = Short.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (short) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static short UMINReduceAll(short[] a) { + short res = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpProvider") + static void UMINReduceShort64VectorTests(IntFunction fa) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + short ra = Short.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + Short64VectorTests::UMINReduce, Short64VectorTests::UMINReduceAll); + } + + static short UMINReduceMasked(short[] a, int idx, boolean[] mask) { + short res = Short.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (short) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static short UMINReduceAllMasked(short[] a, boolean[] mask) { + short res = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpMaskProvider") + static void UMINReduceShort64VectorTestsMasked(IntFunction fa, IntFunction fm) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + short ra = Short.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Short64VectorTests::UMINReduceMasked, Short64VectorTests::UMINReduceAllMasked); + } + + static short UMAXReduce(short[] a, int idx) { + short res = Short.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (short) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static short UMAXReduceAll(short[] a) { + short res = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpProvider") + static void UMAXReduceShort64VectorTests(IntFunction fa) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + short ra = Short.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + Short64VectorTests::UMAXReduce, Short64VectorTests::UMAXReduceAll); + } + + static short UMAXReduceMasked(short[] a, int idx, boolean[] mask) { + short res = Short.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (short) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static short UMAXReduceAllMasked(short[] a, boolean[] mask) { + short res = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpMaskProvider") + static void UMAXReduceShort64VectorTestsMasked(IntFunction fa, IntFunction fm) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + short ra = Short.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + Short64VectorTests::UMAXReduceMasked, Short64VectorTests::UMAXReduceAllMasked); + } + static short FIRST_NONZEROReduce(short[] a, int idx) { short res = (short) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/ShortMaxVectorTests.java b/test/jdk/jdk/incubator/vector/ShortMaxVectorTests.java index ade78e1f3f5..6445443b9d6 100644 --- a/test/jdk/jdk/incubator/vector/ShortMaxVectorTests.java +++ b/test/jdk/jdk/incubator/vector/ShortMaxVectorTests.java @@ -3908,6 +3908,184 @@ static void MAXReduceShortMaxVectorTestsMasked(IntFunction fa, IntFunct ShortMaxVectorTests::MAXReduceMasked, ShortMaxVectorTests::MAXReduceAllMasked); } + static short UMINReduce(short[] a, int idx) { + short res = Short.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (short) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static short UMINReduceAll(short[] a) { + short res = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.minUnsigned(res, UMINReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpProvider") + static void UMINReduceShortMaxVectorTests(IntFunction fa) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + short ra = Short.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN)); + } + } + + assertReductionArraysEquals(r, ra, a, + ShortMaxVectorTests::UMINReduce, ShortMaxVectorTests::UMINReduceAll); + } + + static short UMINReduceMasked(short[] a, int idx, boolean[] mask) { + short res = Short.MAX_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (short) VectorMath.minUnsigned(res, a[i]); + } + + return res; + } + + static short UMINReduceAllMasked(short[] a, boolean[] mask) { + short res = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.minUnsigned(res, UMINReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpMaskProvider") + static void UMINReduceShortMaxVectorTestsMasked(IntFunction fa, IntFunction fm) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + short ra = Short.MAX_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMIN, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MAX_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.minUnsigned(ra, av.reduceLanes(VectorOperators.UMIN, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + ShortMaxVectorTests::UMINReduceMasked, ShortMaxVectorTests::UMINReduceAllMasked); + } + + static short UMAXReduce(short[] a, int idx) { + short res = Short.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + res = (short) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static short UMAXReduceAll(short[] a) { + short res = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.maxUnsigned(res, UMAXReduce(a, i)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpProvider") + static void UMAXReduceShortMaxVectorTests(IntFunction fa) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + short ra = Short.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX)); + } + } + + assertReductionArraysEquals(r, ra, a, + ShortMaxVectorTests::UMAXReduce, ShortMaxVectorTests::UMAXReduceAll); + } + + static short UMAXReduceMasked(short[] a, int idx, boolean[] mask) { + short res = Short.MIN_VALUE; + for (int i = idx; i < (idx + SPECIES.length()); i++) { + if (mask[i % SPECIES.length()]) + res = (short) VectorMath.maxUnsigned(res, a[i]); + } + + return res; + } + + static short UMAXReduceAllMasked(short[] a, boolean[] mask) { + short res = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + res = (short) VectorMath.maxUnsigned(res, UMAXReduceMasked(a, i, mask)); + } + + return res; + } + + @Test(dataProvider = "shortUnaryOpMaskProvider") + static void UMAXReduceShortMaxVectorTestsMasked(IntFunction fa, IntFunction fm) { + short[] a = fa.apply(SPECIES.length()); + short[] r = fr.apply(SPECIES.length()); + boolean[] mask = fm.apply(SPECIES.length()); + VectorMask vmask = VectorMask.fromArray(SPECIES, mask, 0); + short ra = Short.MIN_VALUE; + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + r[i] = av.reduceLanes(VectorOperators.UMAX, vmask); + } + } + + for (int ic = 0; ic < INVOC_COUNT; ic++) { + ra = Short.MIN_VALUE; + for (int i = 0; i < a.length; i += SPECIES.length()) { + ShortVector av = ShortVector.fromArray(SPECIES, a, i); + ra = (short) VectorMath.maxUnsigned(ra, av.reduceLanes(VectorOperators.UMAX, vmask)); + } + } + + assertReductionArraysEqualsMasked(r, ra, a, mask, + ShortMaxVectorTests::UMAXReduceMasked, ShortMaxVectorTests::UMAXReduceAllMasked); + } + static short FIRST_NONZEROReduce(short[] a, int idx) { short res = (short) 0; for (int i = idx; i < (idx + SPECIES.length()); i++) { diff --git a/test/jdk/jdk/incubator/vector/gen-template.sh b/test/jdk/jdk/incubator/vector/gen-template.sh index 232de04ba7c..06e89b824cd 100644 --- a/test/jdk/jdk/incubator/vector/gen-template.sh +++ b/test/jdk/jdk/incubator/vector/gen-template.sh @@ -484,6 +484,8 @@ gen_reduction_op "ADD" "+" "" "0" gen_reduction_op "MUL" "*" "" "1" gen_reduction_op_func "MIN" "(\$type\$) Math.min" "" "\$Wideboxtype\$.\$MaxValue\$" gen_reduction_op_func "MAX" "(\$type\$) Math.max" "" "\$Wideboxtype\$.\$MinValue\$" +gen_reduction_op_func "UMIN" "(\$type\$) VectorMath.minUnsigned" "BITWISE" "\$Wideboxtype\$.\$MaxValue\$" +gen_reduction_op_func "UMAX" "(\$type\$) VectorMath.maxUnsigned" "BITWISE" "\$Wideboxtype\$.\$MinValue\$" gen_reduction_op_func "FIRST_NONZERO" "firstNonZero" "" "(\$type\$) 0" # Boolean reductions. From fd0207d59309ae1af9539580f5bfcbc7627789cb Mon Sep 17 00:00:00 2001 From: Justin Lu Date: Mon, 16 Dec 2024 21:00:56 +0000 Subject: [PATCH 52/93] 8345327: JDK 24 RDP1 L10n resource files update Reviewed-by: naoto, dnguyen, joehw, almatvee, sgehwolf, jlahoda, prappo, asemenyuk --- .../launcher/resources/launcher_de.properties | 13 ++++--- .../launcher/resources/launcher_ja.properties | 17 +++++---- .../resources/launcher_zh_CN.properties | 13 ++++--- .../sun/security/util/Resources_de.java | 37 +------------------ .../sun/security/util/Resources_ja.java | 37 +------------------ .../sun/security/util/Resources_zh_CN.java | 37 +------------------ .../impl/msg/XMLMessages_de.properties | 4 +- .../impl/msg/XMLMessages_ja.properties | 4 +- .../impl/msg/XMLMessages_zh_CN.properties | 4 +- .../tools/javac/resources/compiler.properties | 1 + .../javac/resources/compiler_de.properties | 30 +++++++++++---- .../javac/resources/compiler_ja.properties | 30 +++++++++++---- .../javac/resources/compiler_zh_CN.properties | 32 ++++++++++++---- .../tools/javac/resources/javac_de.properties | 4 +- .../tools/javac/resources/javac_ja.properties | 6 +-- .../javac/resources/javac_zh_CN.properties | 10 ++--- .../tools/jarsigner/Resources_de.java | 2 + .../tools/jarsigner/Resources_ja.java | 2 + .../tools/jarsigner/Resources_zh_CN.java | 2 + .../sun/tools/jar/resources/jar_de.properties | 15 ++++++-- .../sun/tools/jar/resources/jar_ja.properties | 15 ++++++-- .../tools/jar/resources/jar_zh_CN.properties | 15 ++++++-- .../html/resources/standard_de.properties | 24 ++++++++---- .../html/resources/standard_ja.properties | 22 +++++++---- .../html/resources/standard_zh_CN.properties | 24 ++++++++---- .../toolkit/resources/doclets_ja.properties | 2 +- .../resources/doclets_zh_CN.properties | 2 +- .../tool/resources/javadoc_de.properties | 6 +-- .../tool/resources/javadoc_ja.properties | 6 +-- .../tool/resources/javadoc_zh_CN.properties | 6 +-- .../tools/javap/resources/javap_de.properties | 2 +- .../tools/javap/resources/javap_ja.properties | 2 +- .../javap/resources/javap_zh_CN.properties | 2 +- .../tools/jlink/resources/jlink_de.properties | 14 ++++++- .../tools/jlink/resources/jlink_ja.properties | 14 ++++++- .../jlink/resources/jlink_zh_CN.properties | 14 ++++++- .../tools/jmod/resources/jmod_ja.properties | 4 +- .../jmod/resources/jmod_zh_CN.properties | 4 +- .../resources/MacResources_de.properties | 2 +- .../resources/MacResources_ja.properties | 2 +- .../resources/MacResources_zh_CN.properties | 2 +- .../resources/WinResources_de.properties | 6 +-- .../resources/WinResources_ja.properties | 6 +-- .../resources/WinResources_zh_CN.properties | 6 +-- .../jshell/tool/resources/l10n_de.properties | 6 +-- .../tool/resources/l10n_zh_CN.properties | 4 +- 46 files changed, 279 insertions(+), 233 deletions(-) diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties index 12ab942f91f..1f922b4cf73 100644 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties +++ b/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties @@ -24,22 +24,25 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Verwendung: {0} [Optionen] [args...]\n (zur Ausführung einer Klasse)\n oder {0} [Optionen] -jar [args...]\n (zur Ausführung einer JAR-Datei)\n oder {0} [Optionen] -m [/] [args...]\n {0} [Optionen] --module [/] [args...]\n (zur Ausführung der Hauptklasse in einem Modul)\n oder {0} [Optionen] [args]\n (zur Ausführung eines Programms mit einer Quelldatei)\n\n Argumente, die auf die Hauptklasse, die Quelldatei, -jar , -m oder --module\n / folgen, werden als Argumente für die\nHauptklasse übergeben.\n\n Dabei umfasst "Optionen" Folgendes:\n\n +java.launcher.opt.header = Verwendung: {0} [Optionen] [Argumente...]\n (zur Ausführung einer Klasse)\n oder {0} [Optionen] -jar .jar [Argumente...]\n (zur Ausführung einer JAR-Datei)\n oder {0} [Optionen] -m [/] [Argumente...]\n {0} [Optionen] --module [/] [Argumente...]\n (zur Ausführung der Hauptklasse in einem Modul)\n oder {0} [Optionen] .java [Argumente]\n (zur Ausführung eines Programms mit einer Quelldatei)\n\n Argumente, die auf die Hauptklasse, die Quelldatei, -jar .jar, -m oder --module\n / folgen, werden als Argumente für die\nHauptklasse übergeben.\n\n Dabei umfasst "Optionen" Folgendes:\n\n java.launcher.opt.vmselect =\ {0}\t zur Auswahl der "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t ist ein Synonym für die "{1}" VM [verworfen]\n # Translators please note do not translate the options themselves -java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n -p \n --module-path ...\n Eine durch {0} getrennte Liste mit Elementen, von denen jedes Element ein Dateipfad\n zu einem Modul oder einem Verzeichnis mit Modulen ist. Jedes Modul ist entweder\n ein modulares JAR oder ein entpacktes Modulverzeichnis.\n --upgrade-module-path ...\n Eine durch {0} getrennte Liste mit Elementen, von denen jedes Element ein Dateipfad\n zu einem Modul oder einem Verzeichnis mit Modulen ist,\n um upgradefähige Module im Laufzeitimage zu ersetzen. Jedes Modul ist entweder\n ein modulares JAR oder ein entpacktes Modulverzeichnis.\n --add-modules [,...]\n Root-Module, die zusätzlich zum anfänglichen Modul aufgelöst werden sollen.\n kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --enable-native-access [,...]\n Damit kann der Code in Modulen auf Code und Daten außerhalb der JRE zugreifen.\n kann auch ALL-UNNAMED sein, um den Code im Classpath anzugeben.\n --list-modules\n Listet beobachtbare Module auf und beendet den Vorgang\n -d \n --describe-module \n Beschreibt ein Modul und beendet den Vorgang\n --dry-run Erstellt eine VM und lädt die Hauptklasse, führt aber nicht die Hauptmethode aus.\n Die Option "--dry-run" kann nützlich sein, um die\n Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n --validate-modules\n Validiert alle Module und beendet den Vorgang\n Die Option "--validate-modules" kann nützlich sein, um\n Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n -D=\n Legt eine Systemeigenschaft fest\n -verbose:[class|module|gc|jni]\n Aktiviert die Verbose-Ausgabe für das angegebene Subsystem\n -version Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n --version Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n -showversion Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n --show-version\n Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n --show-module-resolution\n Zeigt die Modulauflösungsausgabe beim Start an\n -? -h -help\n Gibt diese Hilfemeldung an den Fehlerstream aus\n --help Gibt diese Hilfemeldung an den Outputstream aus\n -X Gibt Hilfe zu zusätzlichen Optionen an den Fehlerstream aus\n --help-extra Gibt Hilfe zu zusätzlichen Optionen an den Outputstream aus\n -ea[:...|:]\n -enableassertions[:...|:]\n Aktiviert Assertions mit angegebener Granularität\n -da[:...|:]\n -disableassertions[:...|:]\n Deaktiviert Assertions mit angegebener Granularität\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:[=]\n Lädt die \ -native Agent Library . Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:[=]\n Lädt die native Agent Library mit dem vollständigen Pfadnamen\n -javaagent:[=]\n Lädt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:\n Zeigt den Startbildschirm mit einem angegebenen Bild an\n Skalierte HiDPI-Bilder werden automatisch unterstützt und verwendet,\n falls verfügbar. Der nicht skalierte Bilddateiname (Beispiel: image.ext)\n muss immer als Argument an die Option "-splash" übergeben werden.\n Das am besten geeignete angegebene skalierte Bild wird\n automatisch ausgewählt.\n Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API\n @argument files\n Eine oder mehrere Argumentdateien mit Optionen\n --disable-@files\n Verhindert die weitere Erweiterung von Argumentdateien\n --enable-preview\n Lässt zu, das Klassen von Vorschaufeatures dieses Release abhängig sind\nUm ein Argument für eine lange Option anzugeben, können Sie --= oder\n-- verwenden.\n +java.launcher.opt.footer = \ -cp \n -classpath \n --class-path \n Eine durch "{0}" getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n -p \n --module-path ...\n Eine durch "{0}" getrennte Liste mit Elementen, von denen jedes Element ein Dateipfad ist\n zu einem Modul oder einem Verzeichnis mit Modulen ist. Jedes Modul ist entweder\n ein modulares JAR oder ein entpacktes Modulverzeichnis.\n --upgrade-module-path ...\n Eine durch "{0}" getrennte Liste mit Elementen, von denen jedes Element ein Dateipfad ist\n zu einem Modul oder einem Verzeichnis mit Modulen ist,\n um upgradefähige Module im Laufzeitimage zu ersetzen. Jedes Modul ist entweder\n ein modulares JAR oder ein entpacktes Modulverzeichnis.\n --add-modules [,...]\n Root-Module, die zusätzlich zum anfänglichen Modul aufgelöst werden sollen.\n kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --enable-native-access [,...]\n Damit kann der Code in Modulen auf Code und Daten außerhalb der JRE zugreifen.\n kann auch ALL-UNNAMED sein, um den Code im Classpath anzugeben.\n --illegal-native-access=\n Zugriff auf Code und Daten außerhalb der JRE\n durch Code in Modulen zulassen oder verweigern, für die der native Zugriff nicht explizit aktiviert ist.\n ist "deny", "warn" oder "allow". Der Standardwert ist "warn".\n Diese Option wird in einem zukünftigen Release entfernt.\n --list-modules\n Listet beobachtbare Module auf und beendet den Vorgang\n -d \n --describe-module \n Beschreibt ein Modul und beendet den Vorgang\n --dry-run Erstellt eine VM und lädt die Hauptklasse, führt aber nicht die Hauptmethode aus.\n Die Option "--dry-run" kann nützlich sein, um die\n Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n --validate-modules\n Validiert alle Module und beendet den Vorgang\n Die Option "--validate-modules" kann nützlich sein, um\n Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n -D=\n Legt eine Systemeigenschaft fest\n -verbose:[class|module|gc|jni]\n Aktiviert die Verbose-Ausgabe für das angegebene Subsystem\n -version Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n --version Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n -showversion Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n --show-version\n Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n --show-module-resolution\n Zeigt die Modulauflösungsausgabe beim Start an\n -? -h -help\n Gibt diese Hilfemeldung an den Fehlerstream aus\n --help Gibt diese Hilfemeldung an den Outputstream aus\n -X Gibt Hilfe zu zusätzlichen Optionen an den Fehlerstream aus\n --help-extra Gibt Hilfe zu zusätzlichen Optionen an den Outputstream aus\n -ea[:...|:]\n -enableassertions[:...|:]\n Aktiviert Assertions mit angegebener \ +Granularität\n -da[:...|:]\n -disableassertions[:...|:]\n Deaktiviert Assertions mit angegebener Granularität\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:[=]\n Lädt die native Agent Library . Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:[=]\n Lädt die native Agent Library mit dem vollständigen Pfadnamen\n -javaagent:[=]\n Lädt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:\n Zeigt den Startbildschirm mit einem angegebenen Bild an\n Skalierte HiDPI-Bilder werden automatisch unterstützt und verwendet,\n falls verfügbar. Der nicht skalierte Bilddateiname (Beispiel: image.ext)\n muss immer als Argument an die Option "-splash" übergeben werden.\n Das am besten geeignete angegebene skalierte Bild wird\n automatisch ausgewählt.\n Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API\n @argument files\n Eine oder mehrere Argumentdateien mit Optionen\n --disable-@files\n Verhindert die weitere Erweiterung von Argumentdateien\n --enable-preview\n Lässt zu, das Klassen von Vorschaufeatures dieses Release abhängig sind\nUm ein Argument für eine lange Option anzugeben, können Sie --= oder\n-- verwenden.\n # Translators please note do not translate the options themselves -java.launcher.X.usage=\n -Xbatch Deaktiviert die Hintergrundkompilierung\n -Xbootclasspath/a:\n An das Ende des Bootstrap Classpaths anhängen\n -Xcheck:jni Führt zusätzliche Prüfungen für JNI-Funktionen aus\n -Xcomp Erzwingt die Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Führt keine Aktion aus. Ist veraltet und wird in einem zukünftigen Release entfernt.\n -Xdiag Zeigt zusätzliche Diagnosemeldungen an\n -Xfuture Aktiviert strengste Prüfungen, als möglicher zukünftiger Standardwert erwartet.\n Diese Option ist veraltet und kann in einem\n zukünftigen Release entfernt werden.\n -Xint Nur Ausführung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n Option -version\n -Xlog: Konfiguriert oder aktiviert Logging mit dem einheitlichen Java Virtual\n Machine-(JVM-)Logging-Framework. Verwenden Sie -Xlog:help\n für weitere Einzelheiten.\n -Xloggc: Protokolliert den GC-Status in einer Datei mit Zeitstempeln.\n Diese Option ist veraltet und kann in einem\n zukünftigen Release entfernt werden. Wird durch -Xlog:gc: ersetzt.\n -Xmixed Ausführung im gemischten Modus (Standard)\n -Xmn Legt die anfängliche und maximale Größe (in Byte) des Heaps\n für die Young Generation (Nursery) fest\n -Xms Legt die anfängliche Java-Heap-Größe fest\n -Xmx Legt die maximale Java-Heap-Größe fest\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet freigegebene Klassendaten, wenn möglich (Standard)\n -Xshare:off Versucht nicht, freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung freigegebener Klassendaten, verläuft sonst nicht erfolgreich.\n Diese Testoption kann zeitweise zu\n Fehlern führen. Sie darf nicht in Produktionsumgebungen verwendet werden.\n -XshowSettings Zeigt alle Einstellungen an und fährt fort\n -XshowSettings:all\n Zeigt alle Einstellungen als Verbose-Ausgabe an und fährt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen an und fährt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen an und fährt fort\n -XshowSettings:vm\n Zeigt alle VM-bezogenen Einstellungen an und fährt fort\n -XshowSettings:security\n Zeigt alle Sicherheitseinstellungen an und fährt fort\n -XshowSettings:security:all\n Zeigt alle Sicherheitseinstellungen an und fährt fort\n -XshowSettings:security:properties\n Zeigt Sicherheitseigenschaften an und fährt fort\n -XshowSettings:security:providers\n Zeigt statische Sicherheitsprovidereinstellungen an und fährt fort\n -XshowSettings:security:tls\n Zeigt TLS-bezogene Sicherheitseinstellungen an und fährt fort\n -XshowSettings:system\n (Nur Linux) Zeigt die Konfiguration des Hostsystems oder Containers an\n und fährt fort\n -Xss Legt die Stackgröße des Java-Threads fest\n Die tatsächliche \ -Größe kann auf ein Vielfaches der\n Systemseitengröße aufgerundet werden, wenn für das Betriebssystem erforderlich.\n -Xverify Legt den Modus der Bytecodeverifizierung fest\n Beachten Sie, dass die Option -Xverify:none veraltet ist und\n in einem zukünftigen Release entfernt werden kann.\n --add-reads =(,)*\n Aktualisiert , damit gelesen wird, ungeachtet\n der Moduldeklaration. \n kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports /=(,)*\n Aktualisiert , um in zu exportieren,\n ungeachtet der Moduldeklaration.\n kann ALL-UNNAMED sein, um in alle\n unbenannten Module zu exportieren.\n --add-opens /=(,)*\n Aktualisiert , um in\n zu öffnen, ungeachtet der Moduldeklaration.\n --limit-modules [,...]\n Grenzt die Gesamtmenge der beobachtbaren Module ein\n --patch-module =({0})*\n Überschreibt oder erweitert ein Modul mit Klassen und Ressourcen\n in JAR-Dateien oder Verzeichnissen.\n --source \n Legt die Version der Quelle im Quelldateimodus fest.\n --finalization=\n Steuert, ob die JVM Objekte finalisiert.\n Dabei ist entweder "enabled" oder "disabled".\n Die Finalisierung ist standardmäßig aktiviert.\n --sun-misc-unsafe-memory-access=\n Verwendung der nicht unterstützten API sun.misc.Unsafe zulassen oder verweigern\n ist "allow", "warn", "debug" oder "deny".\n Der Standardwert ist "allow".\n\nDiese zusätzlichen Optionen können jederzeit ohne vorherige Ankündigung geändert werden.\n +java.launcher.X.usage=\n -Xbatch Deaktiviert die Hintergrundkompilierung\n -Xbootclasspath/a:\n An das Ende des Bootstrap Classpaths anhängen\n -Xcheck:jni Führt zusätzliche Prüfungen für JNI-Funktionen aus\n -Xcomp Erzwingt die Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Führt keine Aktion aus. Ist veraltet und wird in einem zukünftigen Release entfernt.\n -Xdiag Zeigt zusätzliche Diagnosemeldungen an\n -Xint Nur Ausführung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n Option -version\n -Xlog: Konfiguriert oder aktiviert Logging mit dem einheitlichen Java Virtual\n Machine-(JVM-)Logging-Framework. Verwenden Sie -Xlog:help\n für weitere Einzelheiten.\n -Xloggc: Protokolliert den GC-Status in einer Datei mit Zeitstempeln.\n Diese Option ist veraltet und kann in einem\n zukünftigen Release entfernt werden. Wird durch -Xlog:gc: ersetzt.\n -Xmixed Ausführung im gemischten Modus (Standard)\n -Xmn Legt die anfängliche und maximale Größe (in Byte) des Heaps\n für die Young Generation (Nursery) fest\n -Xms Legt die anfängliche Java-Heap-Größe fest\n -Xmx Legt die maximale Java-Heap-Größe fest\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet freigegebene Klassendaten, wenn möglich (Standard)\n -Xshare:off Versucht nicht, freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung freigegebener Klassendaten, verläuft sonst nicht erfolgreich.\n Diese Testoption kann zeitweise zu\n Fehlern führen. Sie darf nicht in Produktionsumgebungen verwendet werden.\n -XshowSettings Zeigt alle Einstellungen an und fährt fort\n -XshowSettings:all\n Zeigt alle Einstellungen als Verbose-Ausgabe an und fährt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen an und fährt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen an und fährt fort\n -XshowSettings:vm\n Zeigt alle VM-bezogenen Einstellungen an und fährt fort\n -XshowSettings:security\n Zeigt alle Sicherheitseinstellungen an und fährt fort\n -XshowSettings:security:all\n Zeigt alle Sicherheitseinstellungen an und fährt fort\n -XshowSettings:security:properties\n Zeigt Sicherheitseigenschaften an und fährt fort\n -XshowSettings:security:providers\n Zeigt statische Sicherheitsprovidereinstellungen an und fährt fort\n -XshowSettings:security:tls\n Zeigt TLS-bezogene Sicherheitseinstellungen an und fährt fort\n -XshowSettings:system\n (Nur Linux) Zeigt die Konfiguration des Hostsystems oder Containers an\n und fährt fort\n -Xss Legt die Stackgröße des Java-Threads fest\n Die tatsächliche Größe kann auf ein Vielfaches der\n Systemseitengröße aufgerundet werden, wenn für das Betriebssystem erforderlich.\n -Xverify Legt den Modus der Bytecodeverifizierung fest\n \ + Beachten Sie, dass die Option -Xverify:none veraltet ist und\n in einem zukünftigen Release entfernt werden kann.\n --add-reads =(,)*\n Aktualisiert , damit gelesen wird, ungeachtet\n der Moduldeklaration. \n kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports /=(,)*\n Aktualisiert , um in zu exportieren,\n ungeachtet der Moduldeklaration.\n kann ALL-UNNAMED sein, um in alle\n unbenannten Module zu exportieren.\n --add-opens /=(,)*\n Aktualisiert , um in\n zu öffnen, ungeachtet der Moduldeklaration.\n --limit-modules [,...]\n Grenzt die Gesamtmenge der beobachtbaren Module ein\n --patch-module =({0})*\n Überschreibt oder erweitert ein Modul mit Klassen und Ressourcen\n in JAR-Dateien oder Verzeichnissen.\n --source \n Legt die Version der Quelle im Quelldateimodus fest.\n --finalization=\n Steuert, ob die JVM Objekte finalisiert.\n Dabei ist entweder "enabled" oder "disabled".\n Die Finalisierung ist standardmäßig aktiviert.\n --sun-misc-unsafe-memory-access=\n Verwendung der nicht unterstützten API sun.misc.Unsafe zulassen oder verweigern\n ist "allow", "warn", "debug" oder "deny".\n Der Standardwert ist "warn".\n\nDiese zusätzlichen Optionen können jederzeit ohne vorherige Ankündigung geändert werden.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nDie folgenden Optionen sind für macOS spezifisch:\n -XstartOnFirstThread\n Führt die main()-Methode für den ersten (AppKit-)Thread aus\n -Xdock:name=\n Setzt den im Dock angezeigten Standardanwendungsnamen außer Kraft\n -Xdock:icon=\n Setzt das im Dock angezeigte Standardsymbol außer Kraft\n\n +# Translators please note do not translate the options themselves +java.launcher.opt.concise.header = Verwendung: java [Java-Optionen...] [Anwendungsargumente...]\n\nDabei ist einer der folgenden Werte:\n Zum Ausführen der Hauptmethode einer kompilierten Hauptklasse\n -jar .jar Zum Ausführen der Hauptklasse eines JAR-Archivs\n -m [/] Zum Ausführen der Hauptklasse eines Moduls\n .java Zum Kompilieren und Ausführen eines Quelldateiprogramms\n\nDabei sind die folgenden wichtigen Java-Optionen verfügbar:\n --class-path \n ist eine durch "{0}" getrennte Liste der Verzeichnisse und JAR-Archive, in denen nach Klassendateien gesucht werden soll\n --module-path \n ist eine durch "{0}" getrennte Liste der Verzeichnisse und JAR-Archive, in denen nach Modulen gesucht werden soll\n -version\n Zum Ausgeben der Produktversion in den Fehlerstream und Beenden des Vorgangs\n\nFür weitere Verwendungshilfe: java --help\nFür eine interaktive Java-Umgebung: jshell + java.launcher.bad.option=\nNicht erkannte showSettings-Option: {0}\nGültige Werte: "all", "locale", "properties", "security", "system"(nur Linux), "vm"\nGültige Werte für Unteroption "security": "all", "properties", "providers", "tls"\nSiehe "java -X"\n java.launcher.cls.error1=Fehler: Hauptklasse {0} konnte nicht gefunden oder geladen werden\nUrsache: {1}: {2} java.launcher.cls.error2=Fehler: Hauptmethode in Klasse {0} nicht gefunden. Definieren Sie die Hauptmethode als:\n public static void main(String[] args):\noder eine JavaFX-Anwendung muss {1} erweitern diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties index 5d5223d49c6..c6f1b8b330a 100644 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties +++ b/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties @@ -24,24 +24,27 @@ # # 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 または {0} [options] [args]\n (ソースファイル・プログラムを実行する場合)\n\n メイン・クラス、ソース・ファイル、-jar 、\n -mまたは--module /に続く引数は、メイン・クラスへの引数として\n 渡されます。\n\n オプションは次のとおりです:\n\n +java.launcher.opt.header = 使用方法: {0} [options] [args...]\n (クラスを実行する場合)\n または {0} [options] -jar .jar [args...]\n (jarファイルを実行する場合)\n または {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (モジュールのメイン・クラスを実行する場合)\n または {0} [options] .java [args]\n (ソースファイル・プログラムを実行する場合)\n\n メイン・クラス、ソース・ファイル、-jar .jar、\n-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 モジュラJARまたは展開形式のモジュール・ディレクトリ。\n --upgrade-module-path ...\n 要素を{0}で区切ったリストで、各要素は次へのファイル・パスです:\n モジュール、またはモジュールが格納されているディレクトリで、次のものを置き換えます:\n ランタイム・イメージのアップグレード可能なモジュール。各モジュールは次のいずれかです:\n モジュラJARまたは展開形式のモジュール・ディレクトリ。\n --add-modules [,...]\n 初期モジュールに加えて解決するルート・モジュール。\n には次も指定できます: ALL-DEFAULT、ALL-SYSTEM、\n ALL-MODULE-PATH.\n --enable-native-access [,...]\n モジュール内のコードをJavaランタイムの外のコードおよびデータにアクセスさせることができます。\n は、クラス・パス上のコードを指定するためにALL-UNNAMEDにもできます。\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ファイル\n オプションを含む1つ以上の引数ファイル\n --disable-@files\n さらなる引数ファイル拡張を無効にします\n --enable-preview\n クラスをこのリリースのプレビュー機能に依存させることができます\n長いオプションの引数を指定する場合、--=または\n-- を使用できます。\n +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 モジュラJARまたは展開形式のモジュール・ディレクトリ。\n --upgrade-module-path ...\n 要素を"{0}"で区切ったリストで、各要素は次へのファイル・パスです:\n モジュール、またはモジュールが格納されているディレクトリで、次のものを置き換えます:\n ランタイム・イメージのアップグレード可能なモジュール。各モジュールは次のいずれかです:\n モジュラJARまたは展開形式のモジュール・ディレクトリ。\n --add-modules [,...]\n 初期モジュールに加えて解決するルート・モジュール。\n には次も指定できます: ALL-DEFAULT、ALL-SYSTEM、\n ALL-MODULE-PATH.\n --enable-native-access [,...]\n モジュール内のコードをJavaランタイムの外のコードおよびデータにアクセスさせることができます。\n は、クラス・パス上のコードを指定するためにALL-UNNAMEDにもできます。\n --illegal-native-access=\n Javaランタイムの外のコードおよびデータへのアクセスを許可または拒否します\n (ネイティブ・アクセスが明示的に有効化されていないモジュール内のコードによる)。\n \ +は、"deny"、"warn"または"allow"のいずれかです。デフォルト値は"warn"です。\n このオプションは、将来のリリースで削除される予定です。\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ファイル\n オプションを含む1つ以上の引数ファイル\n --disable-@files\n さらなる引数ファイル拡張を無効にします\n --enable-preview\n クラスをこのリリースのプレビュー機能に依存させることができます\n長いオプションの引数を指定する場合、--=または\n-- を使用できます。\n # Translators please note do not translate the options themselves -java.launcher.X.usage=\n -Xbatch バックグラウンド・コンパイルを無効にします\n -Xbootclasspath/a:\n ブートストラップ・クラス・パスの最後に追加します\n -Xcheck:jni JNI関数に対する追加のチェックを実行します\n -Xcomp 初回呼出し時にメソッドのコンパイルを強制します\n -Xdebug 何も実行されません。将来のリリースで削除されるため、非推奨になりました。\n -Xdiag 追加の診断メッセージを表示します\n -Xfuture 将来のデフォルトを見越して、最も厳密なチェックを有効にします\n このオプションは非推奨であり、将来のリリースで削除される\n 可能性があります。\n -Xint インタプリタ・モードの実行のみ\n -Xinternalversion\n -versionオプションより詳細なJVMバージョン情報を\n 表示します\n -Xlog: Java Virtual Machine (JVM)統合ロギング・フレームワークでの\n ロギングを構成または有効化します。詳細は、-Xlog:helpを\n 使用してください。\n -Xloggc: タイムスタンプが付いたファイルにGCステータスのログを記録します\n このオプションは非推奨であり、将来のリリースで削除される\n 可能性があります。-Xlog:gc:で置換されています。\n -Xmixed 混合モードの実行(デフォルト)\n -Xmn 若い世代(ナーサリ)のヒープの初期サイズおよび最大サイズ\n (バイト単位)を設定します\n -Xms Javaの初期ヒープ・サイズを設定します\n -Xmx Javaの最大ヒープ・サイズを設定します\n -Xnoclassgc クラスのガベージ・コレクションを無効にします\n -Xrs Java/VMによるOSシグナルの使用を削減します(ドキュメントを参照)\n -Xshare:auto 可能であれば共有クラス・データを使用します(デフォルト)\n -Xshare:off \ -共有クラス・データの使用を試みません\n -Xshare:on 共有クラス・データの使用を必須にし、できなければ失敗します。\n これはテスト・オプションであり、断続的な失敗につながる\n 可能性があります。本番環境では使用しないでください。\n -XshowSettings すべての設定を表示して続行します\n -XshowSettings:all\n すべての設定を詳細に表示して続行します\n -XshowSettings:locale\n すべてのロケール関連の設定を表示して続行します\n -XshowSettings:properties\n すべてのプロパティ設定を表示して続行します\n -XshowSettings:vm\n すべてのVM関連の設定を表示して続行します\n -XshowSettings:security\n すべてのセキュリティ設定を表示して続行します\n -XshowSettings:security:all\n すべてのセキュリティ設定を表示して続行します\n -XshowSettings:security:properties\n セキュリティ・プロパティを表示して続行します\n -XshowSettings:security:providers\n 静的セキュリティ・プロバイダ設定を表示して続行します\n -XshowSettings:security:tls\n TLS関連のセキュリティ設定を表示して続行します\n -XshowSettings:system\n (Linuxのみ)ホスト・システムまたはコンテナを表示します\n 構成して続行します\n -Xss javaスレッドのスタック・サイズを設定します\n 実際のサイズは、次の倍数に切り上げられる場合があります: \n オペレーティング・システムの要件に応じたシステム・ページ・サイズ。\n -Xverify バイトコード・ベリファイアのモードを設定します\n オプション-Xverify:noneは非推奨になり、\n 将来のリリースで削除される可能性があります。\n --add-reads =(,)*\n モジュール宣言に関係なく、を更新してを\n \ -読み取ります。 \n をALL-UNNAMEDに設定すると、すべての名前のないモジュールを\n 読み取ることができます。\n --add-exports /=(,)*\n モジュール宣言に関係なく、を更新してに\n エクスポートします。\n をALL-UNNAMEDに設定すると、すべての名前のないモジュールに\n エクスポートできます。\n --add-opens /=(,)*\n モジュール宣言に関係なく、を更新してを\n に開きます。\n --limit-modules [,...]\n 参照可能なモジュールの領域を制限します\n --patch-module =({0})*\n JARファイルまたはディレクトリのクラスおよびリソースで\n モジュールをオーバーライドまたは拡張します。\n --source \n ソースファイル・モードでソースのバージョンを設定します。\n --finalization=\n JVMがオブジェクトのファイナライズを実行するかどうかを制御します\n は"enabled"または"disabled"のいずれかです。\n ファイナライズはデフォルトで有効になっています。\n --sun-misc-unsafe-memory-access=\n サポートされていないAPI sun.misc.Unsafeの使用を許可または拒否します\n は"allow"、"warn"、"debug"または"deny"のいずれかです。\n デフォルト値は、"allow"です。\n\nこの追加オプションは予告なしに変更されることがあります。\n +java.launcher.X.usage=\n -Xbatch バックグラウンド・コンパイルを無効にします\n -Xbootclasspath/a:\n ブートストラップ・クラス・パスの最後に追加します\n -Xcheck:jni JNI関数に対する追加のチェックを実行します\n -Xcomp 初回呼出し時にメソッドのコンパイルを強制します\n -Xdebug 何も実行されません。将来のリリースで削除されるため、非推奨になりました。\n -Xdiag 追加の診断メッセージを表示します\n -Xint インタプリタ・モードの実行のみ\n -Xinternalversion\n -versionオプションより詳細なJVMバージョン情報を\n 表示します\n -Xlog: Java Virtual Machine (JVM)統合ロギング・フレームワークでの\n ロギングを構成または有効化します。詳細は、-Xlog:helpを\n 使用してください。\n -Xloggc: タイムスタンプが付いたファイルにGCステータスのログを記録します\n このオプションは非推奨であり、将来のリリースで削除される\n 可能性があります。-Xlog:gc:で置換されています。\n -Xmixed 混合モードの実行(デフォルト)\n -Xmn 若い世代(ナーサリ)のヒープの初期サイズおよび最大サイズ\n (バイト単位)を設定します\n -Xms Javaの初期ヒープ・サイズを設定します\n -Xmx Javaの最大ヒープ・サイズを設定します\n -Xnoclassgc クラスのガベージ・コレクションを無効にします\n -Xrs Java/VMによるOSシグナルの使用を削減します(ドキュメントを参照)\n -Xshare:auto 可能であれば共有クラス・データを使用します(デフォルト)\n -Xshare:off 共有クラス・データの使用を試みません\n -Xshare:on 共有クラス・データの使用を必須にし、できなければ失敗します。\n \ +これはテスト・オプションであり、断続的な失敗につながる\n 可能性があります。本番環境では使用しないでください。\n -XshowSettings すべての設定を表示して続行します\n -XshowSettings:all\n すべての設定を詳細に表示して続行します\n -XshowSettings:locale\n すべてのロケール関連の設定を表示して続行します\n -XshowSettings:properties\n すべてのプロパティ設定を表示して続行します\n -XshowSettings:vm\n すべてのVM関連の設定を表示して続行します\n -XshowSettings:security\n すべてのセキュリティ設定を表示して続行します\n -XshowSettings:security:all\n すべてのセキュリティ設定を表示して続行します\n -XshowSettings:security:properties\n セキュリティ・プロパティを表示して続行します\n -XshowSettings:security:providers\n 静的セキュリティ・プロバイダ設定を表示して続行します\n -XshowSettings:security:tls\n TLS関連のセキュリティ設定を表示して続行します\n -XshowSettings:system\n (Linuxのみ)ホスト・システムまたはコンテナを表示します\n 構成して続行します\n -Xss javaスレッドのスタック・サイズを設定します\n 実際のサイズは、次の倍数に切り上げられる場合があります: \n オペレーティング・システムの要件に応じたシステム・ページ・サイズ。\n -Xverify バイトコード・ベリファイアのモードを設定します\n オプション-Xverify:noneは非推奨になり、\n 将来のリリースで削除される可能性があります。\n --add-reads =(,)*\n モジュール宣言に関係なく、を更新してを\n 読み取ります。 \n をALL-UNNAMEDに設定すると、すべての名前のないモジュールを\n 読み取ることができます。\n --add-exports \ +/=(,)*\n モジュール宣言に関係なく、を更新してに\n エクスポートします。\n をALL-UNNAMEDに設定すると、すべての名前のないモジュールに\n エクスポートできます。\n --add-opens /=(,)*\n モジュール宣言に関係なく、を更新してを\n に開きます。\n --limit-modules [,...]\n 参照可能なモジュールの領域を制限します\n --patch-module =({0})*\n JARファイルまたはディレクトリのクラスおよびリソースで\n モジュールをオーバーライドまたは拡張します。\n --source \n ソースファイル・モードでソースのバージョンを設定します。\n --finalization=\n JVMがオブジェクトのファイナライズを実行するかどうかを制御します\n は"enabled"または"disabled"のいずれかです。\n ファイナライズはデフォルトで有効になっています。\n --sun-misc-unsafe-memory-access=\n サポートされていないAPI sun.misc.Unsafeの使用を許可または拒否します\n は"allow"、"warn"、"debug"または"deny"のいずれかです。\n デフォルト値は"warn"です。\n\nこの追加オプションは予告なしに変更されることがあります。\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n次のオプションはmacOS固有です:\n -XstartOnFirstThread\n main()メソッドを最初(AppKit)のスレッドで実行する\n -Xdock:name=\n Dockに表示されるデフォルト・アプリケーション名をオーバーライドする\n -Xdock:icon=\n Dockに表示されるデフォルト・アイコンをオーバーライドする\n\n +# Translators please note do not translate the options themselves +java.launcher.opt.concise.header = 使用方法: java [java options...] [application arguments...]\n\nは次のいずれかです:\n コンパイルされたメイン・クラスのメイン・メソッドを実行します\n -jar .jar JARアーカイブのメイン・クラスを実行します\n -m [/] モジュールのメイン・クラスを実行します\n .java ソースファイル・プログラムをコンパイルおよび実行します\n\n主要なjavaオプションには次が含まれます:\n --class-path \n は、クラス・ファイルを検索するためのディレクトリおよびJARアーカイブのリストであり、"{0}"で区切られます\n --module-path \n は、モジュールを検索するためのディレクトリおよびJARアーカイブのリストであり、"{0}"で区切られます\n -version\n 製品バージョンをエラー・ストリームに出力し終了します\n\n使用方法についての追加のヘルプの場合: java --help\n対話型のJava環境の場合: jshell + java.launcher.bad.option=\n認識されないshowSettingsオプション: {0}\n有効な値は"all"、"locale"、"properties"、"security"、"system"(Linuxのみ)、"vm"\n有効な"security"サブオプションの値は"all"、"properties"、"providers"、"tls"\n"java -X"を参照してください\n java.launcher.cls.error1=エラー: メイン・クラス{0}を検出およびロードできませんでした\n原因: {1}: {2} java.launcher.cls.error2=エラー: メイン・メソッドがクラス{0}で見つかりません。次のようにメイン・メソッドを定義してください。\n public static void main(String[] args)\nまたはJavaFXアプリケーション・クラスは{1}を拡張する必要があります diff --git a/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties b/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties index c156e234cef..56d774b47db 100644 --- a/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties +++ b/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties @@ -24,22 +24,25 @@ # # 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 或 {0} [options] [args]\n (执行源文件程序)\n\n 将主类、源文件、-jar 、-m 或\n --module / 后的参数作为参数\n 传递到主类。\n\n 其中,选项包括:\n\n +java.launcher.opt.header = 用法:{0} [options] [args...]\n (执行类)\n 或 {0} [options] -jar .jar [args...]\n (执行 jar 文件)\n 或 {0} [options] -m [/] [args...]\n {0} [options] --module [/] [args...]\n (执行模块中的主类)\n 或 {0} [options] .java [args]\n (执行源文件程序)\n\n 将主类、源文件、-jar .jar、-m 或\n --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 模块化 JAR 或展开的模块目录。\n --upgrade-module-path <模块路径>...\n {0} 分隔的元素列表,每个元素都是\n 模块或包含模块(用于替换运行时映像中的\n 可升级模块)的目录的文件路径。每个模块都是\n 模块化 JAR 或展开的模块目录。\n --add-modules <模块名称>[,<模块名称>...]\n 除了初始模块之外要解析的根模块。\n <模块名称> 还可以为 ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --enable-native-access [,...]\n 允许模块中的代码访问 Java 运行时之外的代码和数据。\n 也可以是 ALL-UNNAMED,以指示类路径上的代码。\n --list-modules\n 列出可观察模块并退出\n -d \n --describe-module <模块名称>\n 描述模块并退出\n --dry-run 创建 VM 并加载主类, 但不执行 main 方法。\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 文件\n 一个或多个包含选项的参数文件\n --disable-@files\n 阻止进一步扩展参数文件\n --enable-preview\n 允许类依赖于此发行版的预览功能\n要为长选项指定参数, 可以使用 --<名称>=<值> 或\n--<名称> <值>。\n +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 模块化 JAR 或展开的模块目录。\n --upgrade-module-path <模块路径>...\n 以 "{0}" 分隔的元素列表,每个元素都是\n 模块或包含模块(用于替换运行时映像中的\n 可升级模块)的目录的文件路径。每个模块都是\n 模块化 JAR 或展开的模块目录。\n --add-modules <模块名称>[,<模块名称>...]\n 除了初始模块之外要解析的根模块。\n <模块名称> 还可以为 ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --enable-native-access [,...]\n 允许模块中的代码访问 Java 运行时之外的代码和数据。\n 也可以是 ALL-UNNAMED,以指示类路径上的代码。\n --illegal-native-access=\n 允许或拒绝模块中没有明确为其启用本机访问的\n 代码访问 Java 运行时之外的代码和数据。\n 为 "deny"、"warn" 或 "allow" 之一。默认值为 "warn"。\n 此选项将在未来发行版中删除。\n --list-modules\n 列出可观察模块并退出\n -d \n --describe-module <模块名称>\n 描述模块并退出\n --dry-run 创建 VM 并加载主类, 但不执行 main 方法。\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 文件\n 一个或多个包含选项的参数文件\n --disable-@files\n 阻止进一步扩展参数文件\n --enable-preview\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 此选项已过时,可能会在\n 未来发行版中删除。\n -Xint 仅解释模式执行\n -Xinternalversion\n 显示比 -version 选项更详细的\n JVM 版本信息\n -Xlog: 配置或启用采用 Java 虚拟\n 机 (Java Virtual Machine, JVM) 统一记录框架进行事件记录。使用 -Xlog:help\n 可了解详细信息。\n -Xloggc: 将 GC 状态记录在文件中(带时间戳)。\n 此选项已过时,可能会在\n 将来的发行版中删除。它将替换为 -Xlog: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 这是一个测试选项,可能导致间歇性\n 故障。不应在生产环境中使用它。\n -XshowSettings 显示所有设置并继续\n -XshowSettings:all\n 详细显示所有设置并继续\n -XshowSettings:locale\n 显示所有与区域设置相关的设置并继续\n -XshowSettings:properties\n 显示所有属性设置并继续\n -XshowSettings:vm\n 显示所有与 vm 相关的设置并继续\n -XshowSettings:security\n 显示所有安全设置并继续\n -XshowSettings:security:all\n 显示所有安全设置并继续\n -XshowSettings:security:properties\n \ - 显示安全属性并继续\n -XshowSettings:security:providers\n 显示静态安全提供方设置并继续\n -XshowSettings:security:tls\n 显示与 TLS 相关的安全设置并继续\n -XshowSettings:system\n (仅 Linux)显示主机系统或容器\n 配置并继续\n -Xss 设置 Java 线程堆栈大小\n 实际大小可以舍入到\n 操作系统要求的系统页面大小的倍数。\n -Xverify 设置字节码验证器的模式\n 请注意,选项 -Xverify:none 已过时,\n 可能会在未来发行版中删除。\n --add-reads =(,)*\n 更新 以读取 ,而无论\n 模块如何声明。 \n 可以是 ALL-UNNAMED,将读取所有未命名\n 模块。\n --add-exports /=(,)*\n 更新 以将 导出到 ,\n 而无论模块如何声明。\n 可以是 ALL-UNNAMED,将导出到所有\n 未命名模块。\n --add-opens /=(,)*\n 更新 以在 中打开\n ,而无论模块如何声明。\n --limit-modules [,...]\n 限制可观察模块的领域\n --patch-module =({0})*\n 使用 JAR 文件或目录中的类和资源\n 覆盖或增强模块。\n --source \n 设置源文件模式中源的版本。\n --finalization=\n 控制 JVM 是否执行对象最终处理,\n 其中 为 "enabled" 或 "disabled" 之一。\n 默认情况下,最终处理处于启用状态。\n --sun-misc-unsafe-memory-access=\n 允许或拒绝使用不受支持的 API sun.misc.Unsafe\n 为 "allow"、"warn"、"debug" 或 "deny" 之一。\n 默认值为 "allow"。\n\n这些额外选项如有更改, 恕不另行通知。\n +java.launcher.X.usage=\n -Xbatch 禁用后台编译\n -Xbootclasspath/a:<以 {0} 分隔的目录和 zip/jar 文件>\n 附加在引导类路径末尾\n -Xcheck:jni 对 JNI 函数执行其他检查\n -Xcomp 强制在首次调用时编译方法\n -Xdebug 不执行任何操作;已过时,将在未来发行版中删除。\n -Xdiag 显示附加诊断消息\n -Xint 仅解释模式执行\n -Xinternalversion\n 显示比 -version 选项更详细的\n JVM 版本信息\n -Xlog: 配置或启用采用 Java 虚拟\n 机 (Java Virtual Machine, JVM) 统一记录框架进行事件记录。使用 -Xlog:help\n 可了解详细信息。\n -Xloggc: 将 GC 状态记录在文件中(带时间戳)。\n 此选项已过时,可能会在\n 将来的发行版中删除。它将替换为 -Xlog: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 这是一个测试选项,可能导致间歇性\n 故障。不应在生产环境中使用它。\n -XshowSettings 显示所有设置并继续\n -XshowSettings:all\n 详细显示所有设置并继续\n -XshowSettings:locale\n 显示所有与区域设置相关的设置并继续\n -XshowSettings:properties\n 显示所有属性设置并继续\n -XshowSettings:vm\n 显示所有与 vm 相关的设置并继续\n -XshowSettings:security\n 显示所有安全设置并继续\n -XshowSettings:security:all\n 显示所有安全设置并继续\n -XshowSettings:security:properties\n 显示安全属性并继续\n -XshowSettings:security:providers\n 显示静态安全提供方设置并继续\n -XshowSettings:security:tls\n 显示与 TLS \ +相关的安全设置并继续\n -XshowSettings:system\n (仅 Linux)显示主机系统或容器\n 配置并继续\n -Xss 设置 Java 线程堆栈大小\n 实际大小可以舍入到\n 操作系统要求的系统页面大小的倍数。\n -Xverify 设置字节码验证器的模式\n 请注意,选项 -Xverify:none 已过时,\n 可能会在未来发行版中删除。\n --add-reads =(,)*\n 更新 以读取 ,而无论\n 模块如何声明。 \n 可以是 ALL-UNNAMED,将读取所有未命名\n 模块。\n --add-exports /=(,)*\n 更新 以将 导出到 ,\n 而无论模块如何声明。\n 可以是 ALL-UNNAMED,将导出到所有\n 未命名模块。\n --add-opens /=(,)*\n 更新 以在 中打开\n ,而无论模块如何声明。\n --limit-modules [,...]\n 限制可观察模块的领域\n --patch-module =({0})*\n 使用 JAR 文件或目录中的类和资源\n 覆盖或增强模块。\n --source \n 设置源文件模式中源的版本。\n --finalization=\n 控制 JVM 是否执行对象最终处理,\n 其中 为 "enabled" 或 "disabled" 之一。\n 默认情况下,最终处理处于启用状态。\n --sun-misc-unsafe-memory-access=\n 允许或拒绝使用不受支持的 API sun.misc.Unsafe\n 为 "allow"、"warn"、"debug" 或 "deny" 之一。\n 默认值为 "warn"。\n\n这些额外选项如有更改, 恕不另行通知。\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n以下选项是特定于 macOS 的选项:\n -XstartOnFirstThread\n 在第一个 (AppKit) 线程上运行 main() 方法\n -Xdock:name=\n 覆盖停靠栏中显示的默认应用程序名称\n -Xdock:icon=\n 覆盖停靠栏中显示的默认图标\n\n +# Translators please note do not translate the options themselves +java.launcher.opt.concise.header = 用法:java [java options...] [application arguments...]\n\n其中, 为以下项之一:\n 执行编译的主类的 main 方法\n -jar .jar 执行 JAR 档案的主类\n -m [/] 执行模块的主类\n .java 编译和执行源文件程序\n\n其中,主要的 java 选项包括:\n --class-path \n 其中, 是用于搜索类文件的目录和 JAR 档案列表(以 "{0}" 分隔)\n --module-path \n 其中, 是用于搜索模块的目录和 JAR 档案列表(以 "{0}" 分隔)\n -version\n 将产品版本输出到错误流并退出\n\n获取有关用法的其他帮助: java --help\n获取交互式 Java 环境: jshell + java.launcher.bad.option=\n无法识别的 showSettings 选项:{0}\n有效值为 "all"、"locale"、"properties"、"security"、"system"(仅 Linux)、"vm"\n有效的 "security" 子选项值为 "all"、"properties"、"providers"、"tls"\n请参见 "java -X"\n java.launcher.cls.error1=错误: 找不到或无法加载主类 {0}\n原因: {1}: {2} java.launcher.cls.error2=错误: 在类 {0} 中找不到 main 方法, 请将 main 方法定义为:\n public static void main(String[] args)\n否则 JavaFX 应用程序类必须扩展{1} diff --git a/src/java.base/share/classes/sun/security/util/Resources_de.java b/src/java.base/share/classes/sun/security/util/Resources_de.java index 57e2c8da863..0ff218d6390 100644 --- a/src/java.base/share/classes/sun/security/util/Resources_de.java +++ b/src/java.base/share/classes/sun/security/util/Resources_de.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -59,8 +59,6 @@ public class Resources_de extends java.util.ListResourceBundle { // javax.security.auth.Subject {"NEWLINE", "\n"}, - {"invalid.null.AccessControlContext.provided", - "Ung\u00FCltiger Nullwert f\u00FCr AccessControlContext angegeben"}, {"invalid.null.action.provided", "Ung\u00FCltige Nullaktion angegeben"}, {"invalid.null.Class.provided", "Ung\u00FCltige Nullklasse angegeben"}, {"Subject.", "Subjekt:\n"}, @@ -90,40 +88,9 @@ public class Resources_de extends java.util.ListResourceBundle { {"Login.Failure.all.modules.ignored", "Anmeldefehler: Alle Module werden ignoriert"}, - // sun.security.provider.PolicyFile - - {"java.security.policy.error.parsing.policy.message", - "java.security.policy: Fehler beim Parsen von {0}:\n\t{1}"}, - {"java.security.policy.error.adding.Permission.perm.message", - "java.security.policy: Fehler beim Hinzuf\u00FCgen von Berechtigung, {0}:\n\t{1}"}, - {"java.security.policy.error.adding.Entry.message", - "java.security.policy: Fehler beim Hinzuf\u00FCgen von Eintrag:\n\t{0}"}, - {"alias.name.not.provided.pe.name.", "Aliasname nicht angegeben ({0})"}, - {"unable.to.perform.substitution.on.alias.suffix", - "Substitution f\u00FCr Alias {0} kann nicht ausgef\u00FChrt werden"}, - {"substitution.value.prefix.unsupported", - "Substitutionswert {0} nicht unterst\u00FCtzt"}, - {"SPACE", " "}, - {"LPARAM", "("}, - {"RPARAM", ")"}, - {"type.can.t.be.null","Typ kann nicht null sein"}, - // sun.security.provider.PolicyParser - {"keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore", - "keystorePasswordURL kann nicht ohne Keystore angegeben werden"}, - {"expected.keystore.type", "Keystore-Typ erwartet"}, - {"expected.keystore.provider", "Keystore-Provider erwartet"}, - {"multiple.Codebase.expressions", - "mehrere Codebase-Ausdr\u00FCcke"}, - {"multiple.SignedBy.expressions","mehrere SignedBy-Ausdr\u00FCcke"}, {"duplicate.keystore.domain.name","Keystore-Domainname doppelt vorhanden: {0}"}, {"duplicate.keystore.name","Keystore-Name doppelt vorhanden: {0}"}, - {"SignedBy.has.empty.alias","Leerer Alias in SignedBy"}, - {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name", - "Principal kann nicht mit einer Platzhalterklasse ohne Platzhalternamen angegeben werden"}, - {"expected.codeBase.or.SignedBy.or.Principal", - "codeBase oder SignedBy oder Principal erwartet"}, - {"expected.permission.entry", "Berechtigungseintrag erwartet"}, {"number.", "Nummer "}, {"expected.expect.read.end.of.file.", "[{0}] erwartet, [Dateiende] gelesen"}, @@ -132,8 +99,6 @@ public class Resources_de extends java.util.ListResourceBundle { {"line.number.msg", "Zeile {0}: {1}"}, {"line.number.expected.expect.found.actual.", "Zeile {0}: [{1}] erwartet, [{2}] gefunden"}, - {"null.principalClass.or.principalName", - "principalClass oder principalName null"}, // sun.security.pkcs11.SunPKCS11 {"PKCS11.Token.providerName.Password.", diff --git a/src/java.base/share/classes/sun/security/util/Resources_ja.java b/src/java.base/share/classes/sun/security/util/Resources_ja.java index 1293a48aabc..3cf3b91a62a 100644 --- a/src/java.base/share/classes/sun/security/util/Resources_ja.java +++ b/src/java.base/share/classes/sun/security/util/Resources_ja.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -59,8 +59,6 @@ public class Resources_ja extends java.util.ListResourceBundle { // javax.security.auth.Subject {"NEWLINE", "\n"}, - {"invalid.null.AccessControlContext.provided", - "\u7121\u52B9\u306Anull AccessControlContext\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F"}, {"invalid.null.action.provided", "\u7121\u52B9\u306Anull\u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F"}, {"invalid.null.Class.provided", "\u7121\u52B9\u306Anull\u30AF\u30E9\u30B9\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F"}, {"Subject.", "\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8:\n"}, @@ -90,40 +88,9 @@ public class Resources_ja extends java.util.ListResourceBundle { {"Login.Failure.all.modules.ignored", "\u30ED\u30B0\u30A4\u30F3\u5931\u6557: \u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306F\u7121\u8996\u3055\u308C\u307E\u3059"}, - // sun.security.provider.PolicyFile - - {"java.security.policy.error.parsing.policy.message", - "java.security.policy: {0}\u306E\u69CB\u6587\u89E3\u6790\u30A8\u30E9\u30FC:\n\t{1}"}, - {"java.security.policy.error.adding.Permission.perm.message", - "java.security.policy: \u30A2\u30AF\u30BB\u30B9\u6A29{0}\u306E\u8FFD\u52A0\u30A8\u30E9\u30FC:\n\t{1}"}, - {"java.security.policy.error.adding.Entry.message", - "java.security.policy: \u30A8\u30F3\u30C8\u30EA\u306E\u8FFD\u52A0\u30A8\u30E9\u30FC:\n\t{0}"}, - {"alias.name.not.provided.pe.name.", "\u5225\u540D\u306E\u6307\u5B9A\u304C\u3042\u308A\u307E\u305B\u3093({0})"}, - {"unable.to.perform.substitution.on.alias.suffix", - "\u5225\u540D{0}\u306B\u5BFE\u3057\u3066\u7F6E\u63DB\u64CD\u4F5C\u304C\u3067\u304D\u307E\u305B\u3093"}, - {"substitution.value.prefix.unsupported", - "\u7F6E\u63DB\u5024{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"}, - {"SPACE", " "}, - {"LPARAM", "("}, - {"RPARAM", ")"}, - {"type.can.t.be.null","\u5165\u529B\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"}, - // sun.security.provider.PolicyParser - {"keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore", - "\u30AD\u30FC\u30B9\u30C8\u30A2\u3092\u6307\u5B9A\u3057\u306A\u3044\u5834\u5408\u3001keystorePasswordURL\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093"}, - {"expected.keystore.type", "\u4E88\u60F3\u3055\u308C\u305F\u30AD\u30FC\u30B9\u30C8\u30A2\u30FB\u30BF\u30A4\u30D7"}, - {"expected.keystore.provider", "\u4E88\u60F3\u3055\u308C\u305F\u30AD\u30FC\u30B9\u30C8\u30A2\u30FB\u30D7\u30ED\u30D0\u30A4\u30C0"}, - {"multiple.Codebase.expressions", - "\u8907\u6570\u306ECodebase\u5F0F"}, - {"multiple.SignedBy.expressions","\u8907\u6570\u306ESignedBy\u5F0F"}, {"duplicate.keystore.domain.name","\u91CD\u8907\u3059\u308B\u30AD\u30FC\u30B9\u30C8\u30A2\u30FB\u30C9\u30E1\u30A4\u30F3\u540D: {0}"}, {"duplicate.keystore.name","\u91CD\u8907\u3059\u308B\u30AD\u30FC\u30B9\u30C8\u30A2\u540D: {0}"}, - {"SignedBy.has.empty.alias","SignedBy\u306F\u7A7A\u306E\u5225\u540D\u3092\u4FDD\u6301\u3057\u307E\u3059"}, - {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name", - "\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u540D\u306E\u306A\u3044\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u30FB\u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u3001\u30D7\u30EA\u30F3\u30B7\u30D1\u30EB\u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"}, - {"expected.codeBase.or.SignedBy.or.Principal", - "\u4E88\u60F3\u3055\u308C\u305FcodeBase\u3001SignedBy\u307E\u305F\u306FPrincipal"}, - {"expected.permission.entry", "\u4E88\u60F3\u3055\u308C\u305F\u30A2\u30AF\u30BB\u30B9\u6A29\u30A8\u30F3\u30C8\u30EA"}, {"number.", "\u6570 "}, {"expected.expect.read.end.of.file.", "[{0}]\u3067\u306F\u306A\u304F[\u30D5\u30A1\u30A4\u30EB\u306E\u7D42\u308F\u308A]\u304C\u8AAD\u307F\u8FBC\u307E\u308C\u307E\u3057\u305F"}, @@ -132,8 +99,6 @@ public class Resources_ja extends java.util.ListResourceBundle { {"line.number.msg", "\u884C{0}: {1}"}, {"line.number.expected.expect.found.actual.", "\u884C{0}: [{1}]\u3067\u306F\u306A\u304F[{2}]\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F"}, - {"null.principalClass.or.principalName", - "null\u306EprincipalClass\u307E\u305F\u306FprincipalName"}, // sun.security.pkcs11.SunPKCS11 {"PKCS11.Token.providerName.Password.", diff --git a/src/java.base/share/classes/sun/security/util/Resources_zh_CN.java b/src/java.base/share/classes/sun/security/util/Resources_zh_CN.java index 5376ff5efd3..b4f8f7b49df 100644 --- a/src/java.base/share/classes/sun/security/util/Resources_zh_CN.java +++ b/src/java.base/share/classes/sun/security/util/Resources_zh_CN.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -59,8 +59,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { // javax.security.auth.Subject {"NEWLINE", "\n"}, - {"invalid.null.AccessControlContext.provided", - "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A AccessControlContext"}, {"invalid.null.action.provided", "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A\u64CD\u4F5C"}, {"invalid.null.Class.provided", "\u63D0\u4F9B\u4E86\u65E0\u6548\u7684\u7A7A\u7C7B"}, {"Subject.", "\u4E3B\u4F53: \n"}, @@ -90,40 +88,9 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"Login.Failure.all.modules.ignored", "\u767B\u5F55\u5931\u8D25: \u5FFD\u7565\u6240\u6709\u6A21\u5757"}, - // sun.security.provider.PolicyFile - - {"java.security.policy.error.parsing.policy.message", - "java.security.policy: \u89E3\u6790{0}\u65F6\u51FA\u9519:\n\t{1}"}, - {"java.security.policy.error.adding.Permission.perm.message", - "java.security.policy: \u6DFB\u52A0\u6743\u9650{0}\u65F6\u51FA\u9519:\n\t{1}"}, - {"java.security.policy.error.adding.Entry.message", - "java.security.policy: \u6DFB\u52A0\u6761\u76EE\u65F6\u51FA\u9519:\n\t{0}"}, - {"alias.name.not.provided.pe.name.", "\u672A\u63D0\u4F9B\u522B\u540D ({0})"}, - {"unable.to.perform.substitution.on.alias.suffix", - "\u65E0\u6CD5\u5728\u522B\u540D {0} \u4E0A\u6267\u884C\u66FF\u4EE3"}, - {"substitution.value.prefix.unsupported", - "\u66FF\u4EE3\u503C{0}\u4E0D\u53D7\u652F\u6301"}, - {"SPACE", " "}, - {"LPARAM", "("}, - {"RPARAM", ")"}, - {"type.can.t.be.null","\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A\u503C"}, - // sun.security.provider.PolicyParser - {"keystorePasswordURL.can.not.be.specified.without.also.specifying.keystore", - "\u4E0D\u6307\u5B9A\u5BC6\u94A5\u5E93\u65F6\u65E0\u6CD5\u6307\u5B9A keystorePasswordURL"}, - {"expected.keystore.type", "\u5E94\u4E3A\u5BC6\u94A5\u5E93\u7C7B\u578B"}, - {"expected.keystore.provider", "\u5E94\u4E3A\u5BC6\u94A5\u5E93\u63D0\u4F9B\u65B9"}, - {"multiple.Codebase.expressions", - "\u591A\u4E2A\u4EE3\u7801\u5E93\u8868\u8FBE\u5F0F"}, - {"multiple.SignedBy.expressions","\u591A\u4E2A SignedBy \u8868\u8FBE\u5F0F"}, {"duplicate.keystore.domain.name","\u5BC6\u94A5\u5E93\u57DF\u540D\u91CD\u590D: {0}"}, {"duplicate.keystore.name","\u5BC6\u94A5\u5E93\u540D\u79F0\u91CD\u590D: {0}"}, - {"SignedBy.has.empty.alias","SignedBy \u6709\u7A7A\u522B\u540D"}, - {"can.not.specify.Principal.with.a.wildcard.class.without.a.wildcard.name", - "\u6CA1\u6709\u901A\u914D\u7B26\u540D\u79F0, \u65E0\u6CD5\u4F7F\u7528\u901A\u914D\u7B26\u7C7B\u6307\u5B9A\u4E3B\u7528\u6237"}, - {"expected.codeBase.or.SignedBy.or.Principal", - "\u5E94\u4E3A codeBase, SignedBy \u6216\u4E3B\u7528\u6237"}, - {"expected.permission.entry", "\u5E94\u4E3A\u6743\u9650\u6761\u76EE"}, {"number.", "\u7F16\u53F7 "}, {"expected.expect.read.end.of.file.", "\u5E94\u4E3A [{0}], \u8BFB\u53D6\u7684\u662F [\u6587\u4EF6\u7ED3\u5C3E]"}, @@ -132,8 +99,6 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"line.number.msg", "\u5217{0}: {1}"}, {"line.number.expected.expect.found.actual.", "\u884C\u53F7 {0}: \u5E94\u4E3A [{1}], \u627E\u5230 [{2}]"}, - {"null.principalClass.or.principalName", - "principalClass \u6216 principalName \u4E3A\u7A7A\u503C"}, // sun.security.pkcs11.SunPKCS11 {"PKCS11.Token.providerName.Password.", diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties index 1a915f243fb..9126efd4674 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties @@ -315,8 +315,8 @@ # Implementation limits - EntityExpansionLimit=JAXP00010001: Der Parser hat mehr als {0} Entityerweiterungen in diesem Dokument gefunden. Dies ist der von JDK vorgeschriebene Grenzwert. - ElementAttributeLimit=JAXP00010002: Element "{0}" hat mehr als {1} Attribute. "{1}" ist der von JDK vorgeschriebene Grenzwert. + EntityExpansionLimit=JAXP00010001: Der Parser hat mehr als {0} Entityerweiterungen in diesem Dokument gefunden. Das ist der von "{1}" vorgeschriebene Grenzwert. + ElementAttributeLimit=JAXP00010002: Element "{0}" hat mehr als {1} Attribute. "{1}" ist der von "{2}" vorgeschriebene Grenzwert. MaxEntitySizeLimit=JAXP00010003: Die Länge von Entity "{0}" ist "{1}" und überschreitet den Grenzwert "{2}", der von "{3}" festgelegt wurde. TotalEntitySizeLimit=JAXP00010004: Die akkumulierte Größe von Entitys ist "{0}" und überschreitet den Grenzwert "{1}", der von "{2}" festgelegt wurde. MaxXMLNameLimit=JAXP00010005: Die Länge von Entity "{0}" ist "{1}" und überschreitet den Grenzwert "{2}", der von "{3}" festgelegt wurde. diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties index bbfbb9c26f5..d474ef6423e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties @@ -315,8 +315,8 @@ # Implementation limits - EntityExpansionLimit=JAXP00010001: パーサーによって、このドキュメント内で"{0}"を超えるエンティティ拡張が検出されました。これは、JDKによる制限です。 - ElementAttributeLimit=JAXP00010002: 要素"{0}"に"{1}"を超える属性が存在します。"{1}"は、JDKによる制限です。 + EntityExpansionLimit=JAXP00010001: パーサーによって、このドキュメント内で"{0}"を超えるエンティティ拡張が検出されました。これは、"{1}"による制限です。 + ElementAttributeLimit=JAXP00010002: 要素"{0}"に"{1}"を超える属性が存在します。"{1}"は、"{2}"で設定された制限です。 MaxEntitySizeLimit=JAXP00010003: エンティティ"{0}"の長さは"{1}"で、"{3}"で設定された制限"{2}"を超えています。 TotalEntitySizeLimit=JAXP00010004: エンティティの累積サイズ"{0}"は、"{2}"で設定された制限"{1}"を超えました。 MaxXMLNameLimit=JAXP00010005: エンティティ"{0}"の長さは"{1}"で、"{3}"で設定された制限"{2}"を超えています。 diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties index af7fd26aa38..048442236e0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties @@ -315,8 +315,8 @@ # Implementation limits - EntityExpansionLimit=JAXP00010001: 解析器在此文档中遇到多个 "{0}" 实体扩展; 这是 JDK 施加的限制。 - ElementAttributeLimit=JAXP00010002: 元素 "{0}" 具有多个 "{1}" 属性, "{1}" 是 JDK 施加的限制。 + EntityExpansionLimit=JAXP00010001:解析器在此文档中遇到多个 "{0}" 实体扩展;这是 "{1}" 施加的限制。 + ElementAttributeLimit=JAXP00010002:元素 "{0}" 具有多个 "{1}" 属性,"{1}" 是 "{2}" 设置的限制。 MaxEntitySizeLimit=JAXP00010003: 实体 "{0}" 的长度为 "{1}", 超过了 "{3}" 设置的 "{2}" 限制。 TotalEntitySizeLimit=JAXP00010004: 实体的累计大小为 "{0}", 超过了 "{2}" 设置的 "{1}" 限制。 MaxXMLNameLimit=JAXP00010005: 实体 "{0}" 的长度为 "{1}", 超过了 "{3}" 设置的 "{2}" 限制。 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 13041b44ac0..99baf519958 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 @@ -3357,6 +3357,7 @@ compiler.misc.feature.flexible.constructors=\ compiler.misc.feature.module.imports=\ module imports +# L10N: do not localize: transitive compiler.misc.feature.java.base.transitive=\ transitive modifier for java.base diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties index 33063b6558d..130a644da94 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties @@ -635,6 +635,9 @@ compiler.err.limit.stack=Code erfordert zu viel Stack compiler.err.limit.string=Konstantenzeichenfolge zu lang +# 0: symbol +compiler.err.annotation.array.too.large=Annotationsarrayelement zu groß in "{0}" + # 0: string compiler.err.limit.string.overflow=UTF8-Darstellung für Zeichenfolge "{0}..." ist zu lang für den Konstantenpool @@ -656,9 +659,6 @@ compiler.misc.unexpected.ret.val=Unerwarteter Rückgabewert # 0: set of flag compiler.err.mod.not.allowed.here=Modifikator {0} hier nicht zulässig -# 0: name -compiler.err.modifier.not.allowed.here=Modifikator {0} hier nicht zulässig - compiler.err.intf.not.allowed.here=Schnittstelle hier nicht zulässig # 0: symbol, 1: symbol @@ -781,9 +781,6 @@ compiler.err.not.def.access.class.intf.cant.access.reason={1}.{0} in Package {2} # 0: symbol, 1: symbol, 2: symbol, 3: message segment compiler.misc.not.def.access.class.intf.cant.access.reason={1}.{0} in Package {2} ist nicht zugänglich\n({3}) -# 0: symbol, 1: list of type, 2: type -compiler.misc.cant.access.inner.cls.constr=Zugriff auf Konstruktor {0}({1}) nicht möglich\nEinschließende Instanz vom Typ {2} ist nicht im Geltungsbereich - # 0: symbol, 1: symbol compiler.err.not.def.public.cant.access={0} ist nicht öffentlich in {1}. Zugriff von externem Package nicht möglich @@ -1148,6 +1145,10 @@ compiler.err.file.sb.on.source.or.patch.path.for.module=Datei muss sich im Quell compiler.err.no.java.lang=Package java.lang kann in Plattformklassen nicht gefunden werden +compiler.err.statement.not.expected=Anweisungen werden außerhalb von Methoden und Initializern nicht erwartet + +compiler.err.class.method.or.field.expected=Klasse, Schnittstelle, Annotationstyp, Enumeration, Datensatz, Methode oder Feld erwartet + ##### # Fatal Errors @@ -1589,6 +1590,7 @@ compiler.warn.proc.duplicate.option.name=Doppelte unterstützte Option "{0}" von # 0: string, 1: string compiler.warn.proc.duplicate.supported.annotation=Doppelte unterstützte Annotationsschnittstelle "{0}" von Annotationsprozessor "{1}" zurückgegeben + # 0: string compiler.warn.proc.redundant.types.with.wildcard=Annotationsprozessor "{0}" unterstützt redundant sowohl "*" als auch andere Annotationsschnittstellen @@ -1671,6 +1673,9 @@ compiler.warn.annotation.method.not.found=Annotationsmethode "{1}()" kann nicht # 0: type, 1: name, 2: message segment compiler.warn.annotation.method.not.found.reason=Annotationsmethode "{1}()" kann nicht in Typ "{0}" gefunden werden: {2} +# 0: list of annotation, 1: symbol, 2: name, 3: message segment +compiler.err.cant.attach.type.annotations=Typannotationen {0} können nicht an {1}.{2} angehängt werden:\n{3} + # 0: file object, 1: symbol, 2: name compiler.warn.unknown.enum.constant=Unbekannte Enum-Konstante {1}.{2} @@ -1806,7 +1811,11 @@ compiler.misc.bad.enclosing.class=Ungültige einschließende Klasse für {0}: {1 # 0: symbol compiler.misc.bad.enclosing.method=Ungültiges einschließendes Methodenattribut für Klasse {0} -compiler.misc.bad.runtime.invisible.param.annotations=Ungültiges RuntimeInvisibleParameterAnnotations-Attribut: {0} +# 0: file name +compiler.warn.runtime.visible.invisible.param.annotations.mismatch=Die Längen der Parameter im RuntimeVisibleParameterAnnotations-Attribut und RuntimeInvisibleParameterAnnotations-Attribut in {0} stimmen nicht überein. Beide Attribute werden ignoriert + +# 0: file name +compiler.warn.runtime.invisible.parameter.annotations=Die Attribute RuntimeVisibleParameterAnnotations und RuntimeInvisibleParameterAnnotations in {0} können nicht den Parametern der Methode zugeordnet werden compiler.misc.bad.const.pool.tag=Ungültiges Konstantenpooltag: {0} @@ -2038,6 +2047,10 @@ compiler.err.abstract.cant.be.accessed.directly={0} {1} in {2} ist abstrakt und # 0: symbol kind, 1: symbol compiler.err.non-static.cant.be.ref={0} {1} ist nicht statisch und kann nicht aus einem statischen Kontext referenziert werden +## The first argument ({0}) is a "kindname". +# 0: symbol kind, 1: symbol +compiler.err.local.cant.be.inst.static={0} {1} ist lokal und kann nicht aus einem statischen Kontext instanziiert werden + # 0: symbol kind, 1: symbol compiler.misc.bad.static.method.in.unbound.lookup=Unerwartete statische {0} {1} in ungebundenem Lookup gefunden @@ -2286,6 +2299,9 @@ compiler.misc.feature.flexible.constructors=Flexible Konstruktoren compiler.misc.feature.module.imports=Modulimporte +# L10N: do not localize: transitive +compiler.misc.feature.java.base.transitive=transitive Modifikator für java.base + compiler.warn.underscore.as.identifier=Ab Release 9 ist "_" ein Schlüsselwort und kann nicht als ID verwendet werden compiler.err.underscore.as.identifier=Ab Release 9 ist "_" ein Schlüsselwort und kann nicht als ID verwendet werden diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties index 818b5fb7066..2c108edf692 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties @@ -635,6 +635,9 @@ compiler.err.limit.stack=コードが要求するスタックが多すぎます compiler.err.limit.string=定数文字列が長すぎます +# 0: symbol +compiler.err.annotation.array.too.large="{0}"の注釈配列要素が大きすぎます + # 0: string compiler.err.limit.string.overflow=文字列"{0}..."のUTF8表現が、定数プールに対して長すぎます @@ -656,9 +659,6 @@ compiler.misc.unexpected.ret.val=予期しない戻り値 # 0: set of flag compiler.err.mod.not.allowed.here=修飾子{0}をここで使用することはできません -# 0: name -compiler.err.modifier.not.allowed.here=修飾子{0}をここで使用することはできません - compiler.err.intf.not.allowed.here=ここではインタフェースは許可されません # 0: symbol, 1: symbol @@ -781,9 +781,6 @@ compiler.err.not.def.access.class.intf.cant.access.reason=パッケージ{2}の{ # 0: symbol, 1: symbol, 2: symbol, 3: message segment compiler.misc.not.def.access.class.intf.cant.access.reason=パッケージ{2}の{1}.{0}にはアクセスできません\n({3}) -# 0: symbol, 1: list of type, 2: type -compiler.misc.cant.access.inner.cls.constr=コンストラクタ{0}({1})にアクセスできません\n内部クラスを囲む型{2}のインスタンスがスコープ内にありません - # 0: symbol, 1: symbol compiler.err.not.def.public.cant.access={1}の{0}はpublicではありません。パッケージ外からはアクセスできません @@ -1148,6 +1145,10 @@ compiler.err.file.sb.on.source.or.patch.path.for.module=ファイルは、ソー compiler.err.no.java.lang=プラットフォーム・クラスでパッケージjava.langを検出できません +compiler.err.statement.not.expected=文はメソッドおよびイニシャライザの外では必要ありません + +compiler.err.class.method.or.field.expected=クラス、インタフェース、注釈型、列挙、レコード、メソッドまたはフィールドが必要です + ##### # Fatal Errors @@ -1589,6 +1590,7 @@ compiler.warn.proc.duplicate.option.name=重複するサポート対象オプシ # 0: string, 1: string compiler.warn.proc.duplicate.supported.annotation=重複するサポート対象注釈インタフェース''{0}''が注釈プロセッサ''{1}''によって返されました + # 0: string compiler.warn.proc.redundant.types.with.wildcard=注釈プロセッサ''{0}''は''*''と他の注釈インタフェースを重複してサポートします @@ -1671,6 +1673,9 @@ compiler.warn.annotation.method.not.found=タイプ''{0}''内に注釈メソッ # 0: type, 1: name, 2: message segment compiler.warn.annotation.method.not.found.reason=タイプ''{0}''内に注釈メソッド''{1}()''が見つかりません: {2} +# 0: list of annotation, 1: symbol, 2: name, 3: message segment +compiler.err.cant.attach.type.annotations=タイプ注釈{0}を{1}.{2}に添付できません:\n{3} + # 0: file object, 1: symbol, 2: name compiler.warn.unknown.enum.constant=不明な列挙型定数です{1}.{2} @@ -1806,7 +1811,11 @@ compiler.misc.bad.enclosing.class={0}の内部クラスが不正です: {1} # 0: symbol compiler.misc.bad.enclosing.method=クラス{0}の囲んでいるメソッド属性が不正です -compiler.misc.bad.runtime.invisible.param.annotations=RuntimeInvisibleParameterAnnotations属性が不正です: {0} +# 0: file name +compiler.warn.runtime.visible.invisible.param.annotations.mismatch={0}内のRuntimeVisibleParameterAnnotations属性およびRuntimeInvisibleParameterAnnotations属性内のパラメータの長さが一致しません。両方の属性を無視します + +# 0: file name +compiler.warn.runtime.invisible.parameter.annotations={0}内のRuntimeVisibleParameterAnnotationsおよびRuntimeInvisibleParameterAnnotations属性をメソッドのパラメータにマップできません compiler.misc.bad.const.pool.tag=定数プール・タグ{0}が不正です @@ -2038,6 +2047,10 @@ compiler.err.abstract.cant.be.accessed.directly=抽象{0}である{1}({2}内)に # 0: symbol kind, 1: symbol compiler.err.non-static.cant.be.ref=staticでない{0} {1}をstaticコンテキストから参照することはできません +## The first argument ({0}) is a "kindname". +# 0: symbol kind, 1: symbol +compiler.err.local.cant.be.inst.static=ローカル{0} {1}をstaticコンテキストからインスタンス化できません + # 0: symbol kind, 1: symbol compiler.misc.bad.static.method.in.unbound.lookup=非バインド検索で予期しない静的な{0} {1}が見つかりました @@ -2286,6 +2299,9 @@ compiler.misc.feature.flexible.constructors=柔軟なコンストラクタ compiler.misc.feature.module.imports=モジュール・インポート +# L10N: do not localize: transitive +compiler.misc.feature.java.base.transitive=java.baseの推移的修飾子 + compiler.warn.underscore.as.identifier=リリース9から''_''はキーワードなので識別子として使用することはできません compiler.err.underscore.as.identifier=リリース9から''_''はキーワードなので識別子として使用することはできません diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties index 54298cb23b9..c841c3715fc 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties @@ -635,6 +635,9 @@ compiler.err.limit.stack=代码需要过多堆栈 compiler.err.limit.string=常量字符串过长 +# 0: symbol +compiler.err.annotation.array.too.large="{0}" 中的批注数组元素太大 + # 0: string compiler.err.limit.string.overflow=对于常量池来说, 字符串 "{0}..." 的 UTF8 表示过长 @@ -656,9 +659,6 @@ compiler.misc.unexpected.ret.val=意外的返回值 # 0: set of flag compiler.err.mod.not.allowed.here=此处不允许使用修饰符{0} -# 0: name -compiler.err.modifier.not.allowed.here=此处不允许使用修饰符{0} - compiler.err.intf.not.allowed.here=此处不允许使用接口 # 0: symbol, 1: symbol @@ -781,9 +781,6 @@ compiler.err.not.def.access.class.intf.cant.access.reason=程序包 {2} 中的 { # 0: symbol, 1: symbol, 2: symbol, 3: message segment compiler.misc.not.def.access.class.intf.cant.access.reason=程序包 {2} 中的 {1}.{0} 不可访问\n({3}) -# 0: symbol, 1: list of type, 2: type -compiler.misc.cant.access.inner.cls.constr=无法访问构造器 {0}({1})\n作用域中没有类型为{2}的封闭实例 - # 0: symbol, 1: symbol compiler.err.not.def.public.cant.access={0}在{1}中不是公共的; 无法从外部程序包中对其进行访问 @@ -1148,6 +1145,10 @@ compiler.err.file.sb.on.source.or.patch.path.for.module=文件应在源路径或 compiler.err.no.java.lang=在平台类中找不到程序包 java.lang +compiler.err.statement.not.expected=语句不应在方法和初始化程序外部 + +compiler.err.class.method.or.field.expected=需要类、接口、批注类型、枚举、记录、方法或字段 + ##### # Fatal Errors @@ -1589,6 +1590,7 @@ compiler.warn.proc.duplicate.option.name=批注处理程序 ''{1}'' 返回重复 # 0: string, 1: string compiler.warn.proc.duplicate.supported.annotation=批注处理程序 ''{1}'' 返回重复的受支持批注接口 ''{0}'' + # 0: string compiler.warn.proc.redundant.types.with.wildcard=批注处理程序 ''{0}'' 重复支持 ''*'' 和其他批注接口 @@ -1671,6 +1673,9 @@ compiler.warn.annotation.method.not.found=无法找到类型 ''{0}'' 的批注 # 0: type, 1: name, 2: message segment compiler.warn.annotation.method.not.found.reason=无法找到类型 ''{0}'' 的批注方法 ''{1}()'': {2} +# 0: list of annotation, 1: symbol, 2: name, 3: message segment +compiler.err.cant.attach.type.annotations=无法将类型批注 {0} 附加到 {1}.{2}:\n{3} + # 0: file object, 1: symbol, 2: name compiler.warn.unknown.enum.constant=未知的枚举常量 {1}.{2} @@ -1806,7 +1811,11 @@ compiler.misc.bad.enclosing.class={0}的封闭类错误: {1} # 0: symbol compiler.misc.bad.enclosing.method=类 {0} 的封闭方法属性错误 -compiler.misc.bad.runtime.invisible.param.annotations=错误的 RuntimeInvisibleParameterAnnotations 属性: {0} +# 0: file name +compiler.warn.runtime.visible.invisible.param.annotations.mismatch={0} 中 RuntimeVisibleParameterAnnotations 属性和 RuntimeInvisibleParameterAnnotations 属性中的参数长度不匹配,将忽略这两个属性 + +# 0: file name +compiler.warn.runtime.invisible.parameter.annotations={0} 中的 RuntimeVisibleParameterAnnotations 属性和 RuntimeInvisibleParameterAnnotations 属性无法映射到方法的参数 compiler.misc.bad.const.pool.tag=错误的常量池标记: {0} @@ -2038,6 +2047,10 @@ compiler.err.abstract.cant.be.accessed.directly=无法直接访问{2}中的抽 # 0: symbol kind, 1: symbol compiler.err.non-static.cant.be.ref=无法从静态上下文中引用非静态 {0} {1} +## The first argument ({0}) is a "kindname". +# 0: symbol kind, 1: symbol +compiler.err.local.cant.be.inst.static=无法从静态上下文实例化本地 {0} {1} + # 0: symbol kind, 1: symbol compiler.misc.bad.static.method.in.unbound.lookup=在未绑定查找中找到意外的静态 {0} {1} @@ -2286,6 +2299,9 @@ compiler.misc.feature.flexible.constructors=灵活构造器 compiler.misc.feature.module.imports=模块导入 +# L10N: do not localize: transitive +compiler.misc.feature.java.base.transitive=java.base 的过渡修饰符 + compiler.warn.underscore.as.identifier=从发行版 9 开始, ''_'' 为关键字, 不能用作标识符 compiler.err.underscore.as.identifier=从发行版 9 开始, ''_'' 为关键字, 不能用作标识符 @@ -2738,7 +2754,7 @@ compiler.misc.local=本地 # errors related to records # record components -compiler.err.record.cant.declare.field.modifiers=记录组件不能具有限定符 +compiler.err.record.cant.declare.field.modifiers=记录组件不能具有修饰符 # 0: symbol compiler.err.illegal.record.component.name=记录组件名称 {0} 非法 diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties index 00b64b1f099..447695c9cf8 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties @@ -102,7 +102,7 @@ javac.opt.Xlint.all=Alle Warnungen aktivieren javac.opt.Xlint.none=Alle Warnungen deaktivieren #L10N: do not localize: -Xlint javac.opt.arg.Xlint=(,)* -javac.opt.Xlint.custom=Warnungen, die aktiviert oder deaktiviert werden sollen, durch Komma getrennt.\nStellen Sie einem Schlüssel "-" voran, um die angegebene Warnung zu deaktivieren.\nVerwenden Sie --help-lint, um die unterstützten Schlüssel zu sehen. +javac.opt.Xlint.custom=Warnungen, die aktiviert oder deaktiviert werden sollen, durch Komma getrennt.\nStellen Sie einem Schlüssel "-" voran, um die angegebene Warnung zu deaktivieren.\nVerwenden Sie "--help-lint", um die unterstützten Schlüssel anzuzeigen. javac.opt.Xlint.desc.auxiliaryclass=Warnt vor Auxiliary-Klassen, die in einer Quelldatei verborgen sind und aus anderen Dateien heraus verwendet werden. javac.opt.Xlint.desc.cast=Warnt vor unnötigen Umwandlungen mit Cast. @@ -187,7 +187,7 @@ javac.opt.Xdoclint.custom=Aktiviert oder deaktiviert bestimmte Prüfungen auf Pr javac.opt.Xdoclint.package.args = [-](,[-])* -javac.opt.Xdoclint.package.desc=Aktiviert oder deaktiviert Prüfungen in bestimmten Packages. Jedes ist entweder der\nqualifizierte Name eines Packages oder ein Packagenamenspräfix, gefolgt von ".*",\ndas sich auf alle Subpackages des angegebenen Packages bezieht. Jedem \nkann "-" vorangestellt werden, um Prüfungen für die angegebenen Packages zu deaktivieren. +javac.opt.Xdoclint.package.desc=Aktiviert oder deaktiviert Prüfungen in bestimmten Packages. Jedes ist entweder\nein qualifizierter Packagename oder ein Packagenamenspräfix, gefolgt von ".*",\ndas sich auf alle Subpackages des angegebenen Packages bezieht. Jedem \nkann "-" vorangestellt werden, um Prüfungen für die angegebenen Packages zu deaktivieren. javac.opt.Xstdout=Leitet die Standardausgabe um javac.opt.X=Gibt Hilfe zu zusätzlichen Optionen aus diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties index 4eb259b23cc..c215ad5eeba 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties @@ -102,7 +102,7 @@ javac.opt.Xlint.all=すべての警告を有効にします javac.opt.Xlint.none=すべての警告を無効にします #L10N: do not localize: -Xlint javac.opt.arg.Xlint=(,)* -javac.opt.Xlint.custom=有効または無効にする警告(カンマ区切り)。\n指定した警告を無効にするには、キーの前に'-'を指定します。\nサポートされているキーを表示するには--help-lintを使用します。 +javac.opt.Xlint.custom=有効または無効にする警告(カンマ区切り)。\n指定した警告を無効にするには、キーの前に''-''を指定します。\nサポートされているキーを表示するには--help-lintを使用します。 javac.opt.Xlint.desc.auxiliaryclass=ソース・ファイルで非表示になっているが他のファイルから使用されている補助クラスについて警告します。 javac.opt.Xlint.desc.cast=不要なキャストの使用について警告します。 @@ -187,7 +187,7 @@ javac.opt.Xdoclint.custom=javadocコメントの問題に関する特定のチ javac.opt.Xdoclint.package.args = [-](,[-])* -javac.opt.Xdoclint.package.desc=特定のパッケージのチェックを有効または無効にします。各は、\nパッケージの修飾された名前、またはパッケージ名の接頭辞の後に'.*'を\n指定(指定したパッケージのすべてのサブパッケージに拡張)したものです。各\nの前に'-'を指定すると、指定した1つ以上のパッケージに関するチェックを無効にできます。 +javac.opt.Xdoclint.package.desc=特定のパッケージのチェックを有効または無効にします。各は、\n修飾されたパッケージ名、またはパッケージ名の接頭辞の後に''.*''を\n指定(指定したパッケージのすべてのサブパッケージに拡張)したものです。各\nの前に''-''を指定すると、指定した1つ以上のパッケージに関するチェックを無効にできます。 javac.opt.Xstdout=標準出力をリダイレクトする javac.opt.X=追加オプションのヘルプを出力します @@ -216,7 +216,7 @@ javac.opt.module.version=コンパイルするモジュールのバージョン javac.opt.arg.module.version=<バージョン> javac.opt.inherit_runtime_environment=実行時環境からモジュール・システム構成オプションを継承します。 javac.opt.default.module.for.created.files=何も指定されていないか、推定型の場合、注釈プロセッサによって作成されるファイルのターゲット・モジュールをフォールバックします。 -javac.opt.lineDocComments='///'で行を開始すると、ドキュメンテーション・コメントのサポートが無効化されます +javac.opt.lineDocComments=''///''で行を開始すると、ドキュメンテーション・コメントのサポートが無効化されます ## messages diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties index 8cbddae86f6..1593280fd4d 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties @@ -87,7 +87,7 @@ javac.opt.arg.default.module.for.created.files= javac.opt.maxerrs=设置要输出的错误的最大数目 javac.opt.maxwarns=设置要输出的警告的最大数目 -javac.opt.nogj=语言中不接受泛型 +javac.opt.nogj=该语言不接受泛型 javac.opt.moreinfo=输出类型变量的扩展信息 javac.opt.printsearch=输出有关搜索类文件的位置的信息 javac.opt.prompt=在每次出错后停止 @@ -101,8 +101,8 @@ javac.opt.Xlint=启用建议的警告 javac.opt.Xlint.all=启用所有警告 javac.opt.Xlint.none=禁用所有警告 #L10N: do not localize: -Xlint -javac.opt.arg.Xlint=<密钥>(,<密钥>)* -javac.opt.Xlint.custom=要启用或禁用的警告,使用逗号分隔。\n在关键字前面加上 '-' 可禁用指定的警告。\n使用 --help-lint 可查看受支持的关键字。 +javac.opt.arg.Xlint=(,)* +javac.opt.Xlint.custom=要启用或禁用的警告(以逗号分隔)。\n在关键字前面加上 ''-'' 可禁用指定的警告。\n使用 --help-lint 可查看受支持的关键字。 javac.opt.Xlint.desc.auxiliaryclass=有关辅助类在源文件中隐藏, 但在其他文件中使用的警告。 javac.opt.Xlint.desc.cast=有关使用了不必要转换的警告。 @@ -187,7 +187,7 @@ javac.opt.Xdoclint.custom=为 javadoc 注释中的问题启用或禁用特定检 javac.opt.Xdoclint.package.args = [-]<程序包>(,[-]<程序包>)* -javac.opt.Xdoclint.package.desc=在特定的程序包中启用或禁用检查。每个 <程序包> 是\n程序包的限定名称,或程序包名称前缀后跟 '.*'\n(这将扩展到给定程序包的所有子程序包)。在每个 <程序包>\n前面加上 '-' 可以为指定程序包禁用检查。 +javac.opt.Xdoclint.package.desc=在特定的程序包中启用或禁用检查。每个 <程序包> 是\n限定的程序包名称,或程序包名称前缀后跟 ''.*''\n(这将扩展到给定程序包的所有子程序包)。在每个 <程序包>\n前面加上 ''-'' 可对指定程序包禁用检查。 javac.opt.Xstdout=重定向标准输出 javac.opt.X=输出额外选项的帮助 @@ -216,7 +216,7 @@ javac.opt.module.version=指定正在编译的模块版本 javac.opt.arg.module.version=<版本> javac.opt.inherit_runtime_environment=从运行时环境继承模块系统配置选项。 javac.opt.default.module.for.created.files=由批注处理程序创建的文件的备用目标模块 (如果未指定或推断任何模块)。 -javac.opt.lineDocComments=禁用对带有以 '///' 开头的行的文档注释的支持 +javac.opt.lineDocComments=禁用对带有以 ''///'' 开头的行的文档注释的支持 ## messages diff --git a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_de.java b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_de.java index b11c491be14..9e7e0c81b21 100644 --- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_de.java +++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_de.java @@ -164,6 +164,7 @@ public class Resources_de extends java.util.ListResourceBundle { {"history.with.ts", "- Von \"%1$s\" signiert\n Digestalgorithmus: %2$s\n Signaturalgorithmus: %3$s, %4$s\n Zeitstempel von \"%6$s\" am %5$tc\n Digestalgorithmus f\u00FCr Zeitstempel: %7$s\n Signaturalgorithmus f\u00FCr Zeitstempel: %8$s, %9$s"}, {"history.without.ts", "- Von \"%1$s\" signiert\n Digestalgorithmus: %2$s\n Signaturalgorithmus: %3$s, %4$s"}, + {"history.nonexistent.entries", " Warnung: Nicht vorhandene signierte Eintr\u00E4ge: "}, {"history.unparsable", "- Signaturbezogene Datei %s kann nicht geparst werden"}, {"history.nosf", "- Signaturbezogene Datei META-INF/%s.SF fehlt"}, {"history.nobk", "- Blockdatei f\u00FCr signaturbezogene Datei META-INF/%s.SF fehlt"}, @@ -178,6 +179,7 @@ public class Resources_de extends java.util.ListResourceBundle { {"key.bit.disabled", "%d-Bit-Schl\u00FCssel (deaktiviert)"}, {"key.bit.eccurve.disabled", "%1$d-Bit-%2$s-Schl\u00FCssel (deaktiviert)"}, {"unknown.size", "unbekannte Gr\u00F6\u00DFe"}, + {"nonexistent.entries.found", "Diese JAR-Datei enth\u00E4lt signierte Eintr\u00E4ge f\u00FCr Dateien, die nicht vorhanden sind. Weitere Details finden Sie in der Verbose-Ausgabe (-verbose)."}, {"external.file.attributes.detected", "POSIX-Dateiberechtigung und/oder Symlink-Attribute erkannt. Diese Attribute werden bei der Signatur ignoriert und sind nicht durch die Signatur gesch\u00FCtzt."}, {"jarsigner.", "jarsigner: "}, diff --git a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java index 3754d864ce1..315180339b2 100644 --- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java +++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java @@ -164,6 +164,7 @@ public class Resources_ja extends java.util.ListResourceBundle { {"history.with.ts", "- \u7F72\u540D\u8005: \"%1$s\"\n \u30C0\u30A4\u30B8\u30A7\u30B9\u30C8\u30FB\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %2$s\n \u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %3$s\u3001%4$s\n \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u4ED8\u52A0\u8005: \"%6$s\" \u65E5\u6642: %5$tc\n \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u306E\u30C0\u30A4\u30B8\u30A7\u30B9\u30C8\u30FB\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %7$s\n \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u306E\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %8$s\u3001%9$s"}, {"history.without.ts", "- \u7F72\u540D\u8005: \"%1$s\"\n \u30C0\u30A4\u30B8\u30A7\u30B9\u30C8\u30FB\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %2$s\n \u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %3$s\u3001%4$s"}, + {"history.nonexistent.entries", " \u8B66\u544A: \u5B58\u5728\u3057\u306A\u3044\u7F72\u540D\u6E08\u30A8\u30F3\u30C8\u30EA: "}, {"history.unparsable", "- \u7F72\u540D\u95A2\u9023\u30D5\u30A1\u30A4\u30EB%s\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093"}, {"history.nosf", "- \u7F72\u540D\u95A2\u9023\u30D5\u30A1\u30A4\u30EBMETA-INF/%s.SF\u304C\u3042\u308A\u307E\u305B\u3093"}, {"history.nobk", "- \u7F72\u540D\u95A2\u9023\u30D5\u30A1\u30A4\u30EBMETA-INF/%s.SF\u306E\u30D6\u30ED\u30C3\u30AF\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093"}, @@ -178,6 +179,7 @@ public class Resources_ja extends java.util.ListResourceBundle { {"key.bit.disabled", "%d\u30D3\u30C3\u30C8\u30FB\u30AD\u30FC (\u7121\u52B9)"}, {"key.bit.eccurve.disabled", "%1$d\u30D3\u30C3\u30C8%2$s\u30AD\u30FC(\u7121\u52B9)"}, {"unknown.size", "\u4E0D\u660E\u30B5\u30A4\u30BA"}, + {"nonexistent.entries.found", "\u3053\u306Ejar\u306B\u306F\u3001\u5B58\u5728\u3057\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u7F72\u540D\u6E08\u30A8\u30F3\u30C8\u30EA\u304C\u542B\u307E\u308C\u307E\u3059\u3002\u8A73\u7D30\u306F\u3001-verbose\u51FA\u529B\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}, {"external.file.attributes.detected", "POSIX\u30D5\u30A1\u30A4\u30EB\u6A29\u9650\u307E\u305F\u306Fsymlink(\u3042\u308B\u3044\u306F\u305D\u306E\u4E21\u65B9)\u306E\u5C5E\u6027\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002\u7F72\u540D\u4E2D\u306F\u3053\u308C\u3089\u306E\u5C5E\u6027\u306F\u7121\u8996\u3055\u308C\u3001\u7F72\u540D\u306B\u3088\u3063\u3066\u4FDD\u8B77\u3055\u308C\u307E\u305B\u3093\u3002"}, {"jarsigner.", "jarsigner: "}, diff --git a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java index 9e76346fca2..843ac92f6a7 100644 --- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java +++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java @@ -164,6 +164,7 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"history.with.ts", "- \u7531 \"%1$s\" \u7B7E\u540D\n \u6458\u8981\u7B97\u6CD5: %2$s\n \u7B7E\u540D\u7B97\u6CD5: %3$s, %4$s\n \u7531 \"%6$s\" \u4E8E %5$tc \u52A0\u65F6\u95F4\u6233\n \u65F6\u95F4\u6233\u6458\u8981\u7B97\u6CD5: %7$s\n \u65F6\u95F4\u6233\u7B7E\u540D\u7B97\u6CD5: %8$s, %9$s"}, {"history.without.ts", "- \u7531 \"%1$s\" \u7B7E\u540D\n \u6458\u8981\u7B97\u6CD5: %2$s\n \u7B7E\u540D\u7B97\u6CD5: %3$s, %4$s"}, + {"history.nonexistent.entries", "\u8B66\u544A\uFF1A\u4E0D\u5B58\u5728\u7684\u7B7E\u540D\u6761\u76EE\uFF1A "}, {"history.unparsable", "- \u65E0\u6CD5\u89E3\u6790\u7684\u4E0E\u7B7E\u540D\u76F8\u5173\u7684\u6587\u4EF6 %s"}, {"history.nosf", "- \u7F3A\u5C11\u4E0E\u7B7E\u540D\u76F8\u5173\u7684\u6587\u4EF6 META-INF/%s.SF"}, {"history.nobk", "- \u4E0E\u7B7E\u540D\u76F8\u5173\u7684\u6587\u4EF6 META-INF/%s.SF \u7F3A\u5C11\u5757\u6587\u4EF6"}, @@ -178,6 +179,7 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { {"key.bit.disabled", "%d \u4F4D\u5BC6\u94A5\uFF08\u7981\u7528\uFF09"}, {"key.bit.eccurve.disabled", "%1$d \u4F4D %2$s \u5BC6\u94A5\uFF08\u7981\u7528\uFF09"}, {"unknown.size", "\u672A\u77E5\u5927\u5C0F"}, + {"nonexistent.entries.found", "\u6B64 jar \u7684\u6587\u4EF6\u5305\u542B\u4E0D\u5B58\u5728\u7684\u7B7E\u540D\u6761\u76EE\u3002\u6709\u5173\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u8BF7\u53C2\u89C1 -verbose \u8F93\u51FA\u3002"}, {"external.file.attributes.detected", "\u68C0\u6D4B\u5230 POSIX \u6587\u4EF6\u6743\u9650\u548C/\u6216 symlink \u5C5E\u6027\u3002\u8FD9\u4E9B\u5C5E\u6027\u5728\u8FDB\u884C\u7B7E\u540D\u65F6\u4F1A\u88AB\u5FFD\u7565\uFF0C\u4E0D\u53D7\u8BE5\u7B7E\u540D\u7684\u4FDD\u62A4\u3002"}, {"jarsigner.", "jarsigner: "}, diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties index 65e86457ca3..e81bda89ef3 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties +++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties @@ -44,6 +44,8 @@ error.write.file=Fehler beim Schreiben in vorhandener JAR-Datei error.create.dir={0}: Verzeichnis konnte nicht erstellt werden error.incorrect.length=Falsche Länge bei der Verarbeitung: {0} error.create.tempfile=Es konnte keine temporäre Datei erstellt werden +error.extract.multiple.dest.dir=Sie können die Option "-C" oder "--dir" nicht mehrmals mit der Option "-x" angeben +error.extract.pflag.not.allowed=Sie können nicht "-Px" mit der Option "-C" oder "--dir" angeben error.hash.dep=Abhängigkeiten bei Hashing-Modul {0}. Modul {1} kann nicht im Modulpfad gefunden werden error.module.options.without.info=--module-version oder --hash-modules ohne module-info.class error.no.operative.descriptor=Kein operativer Deskriptor für Release: {0} @@ -83,6 +85,7 @@ warn.validator.concealed.public.class=Warnung: Eintrag {0} ist eine öffentliche warn.release.unexpected.versioned.entry=Unerwarteter versionierter Eintrag {0} warn.index.is.ignored=Der JAR-Index (META-INF/INDEX.LIST) wird seit JDK 18 zur Laufzeit ignoriert warn.flag.is.deprecated=Warnung: Die Option {0} ist veraltet und wird möglicherweise ignoriert oder in einem zukünftigen Release entfernt\n +warn.option.is.ignored=Warnung: Die Option "{0}" ist mit der aktuellen Verwendung nicht gültig und wird ignoriert. out.added.manifest=Manifest wurde hinzugefügt out.added.module-info=module-info hinzugefügt: {0} out.automodule=Kein Moduldeskriptor gefunden. Automatisches Modul wurde abgeleitet. @@ -94,10 +97,12 @@ out.deflated=({0} % verkleinert) out.stored=(0 % gespeichert) out.create=\ erstellt: {0} out.extracted=extrahiert: {0} +out.kept=\ übersprungen: {0} vorhanden out.inflated=\ vergrößert: {0} out.size=(ein = {0}) (aus = {1}) +out.extract.dir=Extrahieren in Verzeichnis: {0} -usage.compat=Kompatibilitätsschnittstelle\nVerwendung: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files] ...\nOptionen:\n -c erstellt ein neues Archiv (einschließlich fehlender übergeordneter Verzeichnisse)\n -t listet das Inhaltsverzeichnis für das Archiv auf\n -x extrahiert die benannten (oder alle) Dateien aus dem Archiv\n -u aktualisiert ein vorhandenes Archiv\n -v generiert Verbose-Ausgabe zur Standardausgabe\n -f gibt den Archivdateinamen an\n -m schließt Manifestinformationen aus der angegebenen Manifestdatei ein\n -e gibt den Anwendungseinstiegspunkt für Standalone-Anwendungen an,\n die in einer ausführbaren JAR-Datei gebündelt sind\n -0 speichert nur, keine ZIP-Komprimierung\n -P behält die vorangestellten Komponenten "/" (absoluter Pfad) und ".." (übergeordnetes Verzeichnis) aus Dateinamen bei\n -M generiert keine Manifestdatei für die Einträge\n -i generiert Indexinformationen für die angegebenen JAR-Dateien\n -C wechselt zum angegebenen Verzeichnis und schließt die folgende Datei ein\nDateien, die Verzeichnisse sind, werden rekursiv verarbeitet.\nDie Namen der Manifestdatei, der Archivdatei und des Einstiegspunkts werden\nin der gleichen Reihenfolge wie die Flags "m", "f" und "e" angegeben.\n\nBeispiel 1: Zwei Klassendateien in einem Archiv namens classes.jar archivieren: \n jar cvf classes.jar Foo.class Bar.class \nBeispiel 2: Die vorhandene Manifestdatei "mymanifest" verwenden und alle\n Dateien im Verzeichnis "foo/" in "classes.jar" archivieren: \n jar cvfm classes.jar mymanifest -C foo/ .\n +usage.compat=Kompatibilitätsschnittstelle\nVerwendung: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files] ...\nOptionen:\n -c erstellt ein neues Archiv (einschließlich fehlender übergeordneter Verzeichnisse)\n -t listet das Inhaltsverzeichnis für das Archiv auf\n -x extrahiert die benannten (oder alle) Dateien aus dem Archiv\n -u aktualisiert ein vorhandenes Archiv\n -v generiert Verbose-Ausgabe zur Standardausgabe\n -f gibt den Archivdateinamen an\n -m schließt Manifestinformationen aus der angegebenen Manifestdatei ein\n -e gibt den Anwendungseinstiegspunkt für Standalone-Anwendungen an,\n die in einer ausführbaren JAR-Datei gebündelt sind\n -0 speichert nur, ohne ZIP-Komprimierung\n -P behält die vorangestellten Komponenten "/" (absoluter Pfad) und ".." (übergeordnetes Verzeichnis) aus Dateinamen bei\n -M generiert keine Manifestdatei für die Einträge\n -i generiert Indexinformationen für die angegebenen JAR-Dateien\n -C wechselt zum angegebenen Verzeichnis und schließt die folgende Datei ein\nDateien, die Verzeichnisse sind, werden rekursiv verarbeitet.\nBei Verwendung im Extraktionsmodus wird die JAR-Datei in das angegebene Verzeichnis extrahiert\nDie Namen der Manifestdatei, der Archivdatei und des Einstiegspunkts werden\nin der gleichen Reihenfolge wie die Kennzeichen "m", "f" und "e" angegeben.\n\nBeispiel 1: Zwei Klassendateien in einem Archiv namens classes.jar archivieren: \n jar cvf classes.jar Foo.class Bar.class \nBeispiel 2: Die vorhandene Manifestdatei "mymanifest" verwenden und alle\n Dateien im Verzeichnis "foo/" in "classes.jar" archivieren: \n jar cvfm classes.jar mymanifest -C foo/ .\n main.usage.summary=Verwendung: jar [OPTION...] [ [--release VERSION] [-C dir] Dateien] ... main.usage.summary.try=Verwenden Sie "jar --help", um weitere Informationen anzuzeigen. @@ -108,10 +113,10 @@ main.help.opt.main.create=\ -c, --create Erstellt das Archiv. Wen main.help.opt.main.generate-index=\ -i, --generate-index=FILE Generiert Indexinformationen für die angegebenen\n JAR-Archive. Diese Option ist veraltet und wird möglicherweise in \n einem zukünftigen Release entfernt. main.help.opt.main.list=\ -t, --list Das Inhaltsverzeichnis für das Archiv auflisten main.help.opt.main.update=\ -u, --update Ein vorhandenes JAR-Archiv aktualisieren -main.help.opt.main.extract=\ -x, --extract Benannte (oder alle) Dateien aus dem Archiv extrahieren +main.help.opt.main.extract=\ -x, --extract Extrahiert benannte (oder alle) Dateien aus dem Archiv.\n Wenn eine Datei mit demselben Namen mehrmals im\n Archiv enthalten ist, wird jede Kopie extrahiert. Dabei überschreiben (ersetzen) neuere Kopien\n ältere Kopien, es sei denn, "-k" ist angegeben. main.help.opt.main.describe-module=\ -d, --describe-module Gibt den Moduldeskriptor oder automatischen Modulnamen aus main.help.opt.main.validate=\ --validate Validiert den Inhalt des JAR-Archivs. Diese Option\n validiert, dass die von einem Multi-Release-JAR-Archiv\n exportierte API über die verschiedenen Releaseversionen\n hinweg konsistent ist. -main.help.opt.any=\ In jedem Modus gültige Vorgangsmodifikatoren:\n\n -C DIR Zum angegebenen Verzeichnis wechseln und die folgende\n Datei aufnehmen +main.help.opt.any=\ In jedem Modus gültige Vorgangsmodifikatoren:\n\n -C DIR Zum angegebenen Verzeichnis wechseln und die folgende\n Datei aufnehmen. Bei Verwendung im Extraktionsmodus wird\n die JAR-Datei in das angegebene Verzeichnis extrahiert main.help.opt.any.file=\ -f, --file=FILE Der Name der Archivdatei. Wenn Sie dies auslassen, wird entweder stdin oder\n stdout verwendet, je nach Vorgang\n --release VERSION Speichert alle der folgenden Dateien in einem versionierten Verzeichnis\n der JAR-Datei (d.h. META-INF/versions/VERSION/) main.help.opt.any.verbose=\ -v, --verbose Verbose-Ausgabe bei Standardausgabe generieren main.help.opt.create=\ Vorgangsmodifikatoren, die nur im Erstellungsmodus gültig sind:\n @@ -127,8 +132,12 @@ main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Hinwe main.help.opt.create.update.index=\ Vorgangsmodifikatoren, die nur im Erstellungs-, Aktualisierungs- und Indexgenerierungsmodus gültig sind:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress Nur speichern, keine ZIP-Komprimierung verwenden main.help.opt.create.update.index.date=\ --date=TIMESTAMP Zeitstempel im erweiterten Datums-/Uhrzeitformat mit Zeitunterschied\n und optionaler Zeitzone nach ISO-8601, zur Verwendung für die Zeitstempel von\n Einträgen, z.B. "2022-02-12T12:30:00-05:00" +main.help.opt.extract=\ Vorgangsmodifikatoren, die nur im Extraktionsmodus gültig sind:\n +main.help.opt.extract.keep-old-files=\ -k, --keep-old-files Vorhandene Dateien nicht überschreiben.\n Wenn bereits ein JAR-Dateieintrag mit demselben Namen im\n Zielverzeichnis vorhanden ist, wird die vorhandene Datei nicht überschrieben.\n Wenn eine Datei also mehrmals in einem\n Archiv enthalten ist, werden ältere Kopien nicht durch neuere Kopien überschrieben.\n Beachten Sie zudem, dass bei einigen Dateisystemen die Groß-/Kleinschreibung ignoriert wird. main.help.opt.other=\ Weitere Optionen:\n main.help.opt.other.help=\ -?, -h, --help[:compat] Gibt diese Meldung oder optional die Kompatibilität, Hilfe an main.help.opt.other.help-extra=\ --help-extra Hilfe zu zusätzlichen Optionen main.help.opt.other.version=\ --version Programmversion ausgeben main.help.postopt=\ Ein Archiv ist ein modulares JAR-Archiv, wenn der Moduldeskriptor "module-info.class"\n in der Root der angegebenen Verzeichnisse oder in der Root des JAR-Archivs selbst\n vorhanden ist. Die folgenden Vorgänge sind nur gültig, wenn Sie ein modulares JAR-Archiv\n erstellen oder ein vorhandenes nicht modulares JAR-Archiv aktualisieren: "--module-version",\n "--hash-modules" und "--modulepath".\n\n Obligatorische oder optionale Argumente zu langen Optionen sind auch für die jeweils\n zugehörigen kurzen Optionen obligatorisch oder optional. +main.help.opt.extract=\ Vorgangsmodifikatoren, die nur im Extraktionsmodus gültig sind:\n +main.help.opt.extract.dir=\ --dir Verzeichnis, in das die JAR-Datei extrahiert wird diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties index 586802d251c..5be71c2e424 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties +++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties @@ -44,6 +44,8 @@ error.write.file=既存jarファイルの書込み中にエラーが発生しま error.create.dir=ディレクトリ{0}を作成できませんでした error.incorrect.length={0}の処理中に不正な長さがありました error.create.tempfile=一時ファイルを作成できませんでした +error.extract.multiple.dest.dir='-x'オプションでは複数の'-C'または'--dir'を指定できません +error.extract.pflag.not.allowed='-C'または'--dir'オプションでは'-Px'を指定できません error.hash.dep=モジュール{0}依存性のハッシュでモジュール{1}がモジュール・パスに見つかりません error.module.options.without.info=--module-versionまたは--hash-modulesのいずれかでmodule-info.classがありません error.no.operative.descriptor=リリースの操作ディスクリプタはありません: {0} @@ -83,6 +85,7 @@ warn.validator.concealed.public.class=警告 : エントリ{0}は、隠しパッ warn.release.unexpected.versioned.entry=予期しないバージョニング済エントリ{0} warn.index.is.ignored=JDK 18以降、JAR索引(META-INF/INDEX.LIST)は実行時に無視されます warn.flag.is.deprecated=警告: {0}オプションは非推奨であり、今後のリリースで無視または削除される可能性があります\n +warn.option.is.ignored=警告: {0}オプションは、現在の使用状況では有効ではありません。無視されます。 out.added.manifest=マニフェストが追加されました out.added.module-info=module-infoが追加されました: {0} out.automodule=モジュール・ディスクリプタが見つかりません。自動モジュールが導出されました。 @@ -94,10 +97,12 @@ out.deflated=({0}%収縮されました) out.stored=(0%格納されました) out.create=\ {0}が作成されました out.extracted={0}が抽出されました +out.kept=\ スキップされました: {0}が存在します out.inflated=\ {0}が展開されました out.size=(入={0})(出={1}) +out.extract.dir=ディレクトリに抽出しています: {0} -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 -e 実行可能jarファイルにバンドルされたスタンドアロン・アプリケーションの \n エントリ・ポイントを指定する\n -0 格納のみ。ZIP圧縮を使用しない\n -P ファイル名の先頭の'/' (絶対パス)および".." (親ディレクトリ)コンポーネントを保持する\n -M エントリのマニフェスト・ファイルを作成しない\n -i 指定のjarファイルの索引情報を生成する\n -C 指定のディレクトリに変更し、次のファイルを取り込む\nファイルがディレクトリの場合は再帰的に処理されます。\nマニフェスト・ファイル名、アーカイブ・ファイル名およびエントリ・ポイント名は、\nフラグ'm'、'f'、'e'の指定と同じ順番で指定する必要があります。\n\n例1: 2つのクラス・ファイルをアーカイブclasses.jarに保存する: \n jar cvf classes.jar Foo.class Bar.class \n例2: 既存のマニフェスト・ファイル'mymanifest'を使用し、foo/ディレクトリの\n 全ファイルを'classes.jar'にアーカイブする: \n jar cvfm classes.jar mymanifest -C foo/ .\n +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 -e 実行可能jarファイルにバンドルされたスタンドアロン・アプリケーションの \n エントリ・ポイントを指定する\n -0 格納のみ。ZIP圧縮を使用しない\n -P ファイル名の先頭の'/' (絶対パス)および".." (親ディレクトリ)コンポーネントを保持する\n -M エントリのマニフェスト・ファイルを作成しない\n -i 指定のjarファイルの索引情報を生成する\n -C 指定のディレクトリに変更し、次のファイルを取り込む\nファイルがディレクトリの場合は再帰的に処理されます。\n抽出モードで使用される場合、jarを指定のディレクトリに抽出します\nマニフェスト・ファイル名、アーカイブ・ファイル名およびエントリ・ポイント名は、\nフラグ'm'、'f'、'e'の指定と同じ順番で指定する必要があります。\n\n例1: 2つのクラス・ファイルをアーカイブclasses.jarに保存する: \n jar cvf classes.jar Foo.class Bar.class \n例2: 既存のマニフェスト・ファイル'mymanifest'を使用し、foo/ディレクトリの\n 全ファイルを'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'を実行してください。 @@ -108,10 +113,10 @@ main.help.opt.main.create=\ -c、--create アーカイブを作 main.help.opt.main.generate-index=\ -i, --generate-index=FILE 指定したjarアーカイブの索引情報を生成します。\n このオプションは非推奨であり、今後のリリースで\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.extract=\ -x、--extract 指定の(またはすべての)ファイルをアーカイブから抽出します。\n 同じ名前のファイルがアーカイブに複数回出現する場合、\n 各コピーが抽出され、後のコピーにより、前のコピーが\n 上書き(置換)されます(-kが指定されている場合以外)。 main.help.opt.main.describe-module=\ -d, --describe-module モジュール・ディスクリプタまたは自動モジュール名を出力します main.help.opt.main.validate=\ --validate jarアーカイブの内容を検証します。このオプションは\n 複数リリースのjarアーカイブでエクスポートされたAPIが\n すべての異なるリリース・バージョンで一貫していることを\n 検証します。 -main.help.opt.any=\ どのモードでも有効な操作修飾子:\n\n -C DIR 指定のディレクトリに変更し、次のファイルを\n 取り込みます +main.help.opt.any=\ どのモードでも有効な操作修飾子:\n\n -C DIR 指定のディレクトリに変更し、次のファイルを\n 取り込みます。抽出モードで使用されている場合、jarを\n 指定のディレクトリに抽出します main.help.opt.any.file=\ -f、--file=FILE アーカイブ・ファイル名。省略した場合、stdinまたは\n stdoutのいずれかが操作に基づいて使用されます\n --release VERSION 次のすべてのファイルをjarのバージョニングされたディレクトリ\n (つまり、META-INF/versions/VERSION/)に配置します main.help.opt.any.verbose=\ -v、--verbose 標準出力に詳細な出力を生成します main.help.opt.create=\ 作成モードでのみ有効な操作修飾子:\n @@ -127,8 +132,12 @@ main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved モ main.help.opt.create.update.index=\ 作成、更新および索引生成モードでのみ有効な操作修飾子:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress 格納のみ。ZIP圧縮を使用しません main.help.opt.create.update.index.date=\ --date=TIMESTAMP オプションのタイムゾーン形式を指定したISO-8601拡張オフセット\n の日時のタイムスタンプ。エントリのタイムスタンプの使用例は、\n "2022-02-12T12:30:00-05:00"です +main.help.opt.extract=\ 抽出モードでのみ有効な操作修飾子:\n +main.help.opt.extract.keep-old-files=\ -k、--keep-old-files 既存のファイルを上書きしません。\n 同じ名前のJarファイル・エントリがターゲット・ディレクトリに\n 存在する場合、既存のファイルは上書きされません。\n 結果として、ファイルがアーカイブ内に複数回出現する場合、\n 後のコピーによって前のコピーは上書きされません。\n また、一部のファイル・システムでは、大/小文字が区別される場合があることに注意してください。 main.help.opt.other=\ その他のオプション:\n main.help.opt.other.help=\ -?、-h、--help[:compat] これ(オプションで互換性)をhelpに指定します 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 ロング・オプションへの必須またはオプションの引数は、対応するショート・オプション\n に対しても必須またはオプションになります。 +main.help.opt.extract=\ 抽出モードでのみ有効な操作修飾子:\n +main.help.opt.extract.dir=\ --dir jarが抽出されるディレクトリ diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties index 81d78000445..1f652d87029 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties +++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties @@ -44,6 +44,8 @@ error.write.file=写入现有的 jar 文件时出错 error.create.dir={0}: 无法创建目录 error.incorrect.length=处理时遇到不正确的长度: {0} error.create.tempfile=无法创建临时文件 +error.extract.multiple.dest.dir=不能与 '-x' 选项一起多次指定 '-C' 或 '--dir' 选项 +error.extract.pflag.not.allowed=不能与 '-C' 或 '--dir' 选项一起指定 '-Px' error.hash.dep=正在对模块 {0} 的被依赖对象执行散列处理, 在模块路径中找不到模块 {1} error.module.options.without.info=--module-version 或 --hash-modules 之一没有 module-info.class error.no.operative.descriptor=没有发行版的有效描述符: {0} @@ -83,6 +85,7 @@ warn.validator.concealed.public.class=警告: 条目 {0} 是已隐藏程序包 warn.release.unexpected.versioned.entry=意外的版本化条目 {0} warn.index.is.ignored=自 JDK 18 起,在运行时忽略 JAR 索引 (META-INF/INDEX.LIST) warn.flag.is.deprecated=警告:{0} 选项已过时,可能会在未来发行版中忽略或删除。\n +warn.option.is.ignored=警告:{0} 选项对于当前用法无效,将忽略它。 out.added.manifest=已添加清单 out.added.module-info=已添加 module-info: {0} out.automodule=找不到模块描述符。已派生自动模块。 @@ -94,10 +97,12 @@ out.deflated=(压缩了 {0}%) out.stored=(存储了 0%) out.create=\ 已创建: {0} out.extracted=已提取: {0} +out.kept=\ 已跳过:{0} 已存在 out.inflated=\ 已解压: {0} out.size=(输入 = {0}) (输出 = {1}) +out.extract.dir=提取到目录:{0} -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 -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 +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 -e 为捆绑到可执行 jar 文件的独立应用程序\n 指定应用程序入口点\n -0 仅存储;不使用任何 ZIP 压缩\n -P 保留文件名中的前导 '/'(绝对路径)和 ".."(父目录)组成部分\n -M 不创建条目的清单文件\n -i 为指定的 jar 文件生成索引信息\n -C 更改为指定的目录并包含以下文件\n如果任何文件为目录,则对其进行递归处理。\n在提取模式下使用时,将 jar 提取到指定目录\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' 获取详细信息。 @@ -108,10 +113,10 @@ main.help.opt.main.create=\ -c, --create 创建档案。通过 -f main.help.opt.main.generate-index=\ -i, --generate-index=FILE 生成指定 jar 档案的索引信息。\n 此选项已过时,\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.extract=\ -x, --extract 从档案中提取指定的(或所有)文件。\n 如果某个同名的文件在档案中出现多次,\n 则将提取每个副本,除非指定 -k,否则\n 后面的副本将覆盖(替换)前面的副本。 main.help.opt.main.describe-module=\ -d, --describe-module 输出模块描述符或自动模块名称 main.help.opt.main.validate=\ --validate 验证 jar 档案的内容。此选项\n 将验证由多发行版 jar 档案导出\n 的 API 在所有不同的发行版本中\n 是否一致。 -main.help.opt.any=\ 在任意模式下有效的操作修饰符:\n\n -C DIR 更改为指定的目录并包含\n 以下文件 +main.help.opt.any=\ 在任意模式下有效的操作修饰符:\n\n -C DIR 更改为指定目录并包含\n 以下文件。在提取模式下使用时,\n 将 jar 提取到指定目录 main.help.opt.any.file=\ -f, --file=FILE 档案文件名。省略时, 基于操作\n 使用 stdin 或 stdout\n --release VERSION 将下面的所有文件都放在\n jar 的版本化目录中 (即 META-INF/versions/VERSION/) main.help.opt.any.verbose=\ -v, --verbose 在标准输出中生成详细输出 main.help.opt.create=\ 仅在创建模式下有效的操作修饰符:\n @@ -127,8 +132,12 @@ main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved 提 main.help.opt.create.update.index=\ 只在创建, 更新和生成索引模式下有效的操作修饰符:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress 仅存储; 不使用 ZIP 压缩 main.help.opt.create.update.index.date=\ --date=TIMESTAMP 具有可选时区的 ISO-8601 扩展偏移\n 日期时间格式的时间戳(用于条目的时间戳),\n 例如,"2022-02-12T12:30:00-05:00" +main.help.opt.extract=\ 仅在提取模式下有效的操作修饰符:\n +main.help.opt.extract.keep-old-files=\ -k, --keep-old-files 不覆盖现有文件。\n 如果目标目录中存在同名的 Jar 文件\n 条目,将不覆盖现有文件。\n 因此,如果某个文件在档案中出现多次,\n 后面的副本不会覆盖前面的副本。\n 另请注意,一些文件系统可能不区分大小写。 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 任何对应的短选项也是必需或可选的。 +main.help.opt.extract=\ 仅在提取模式下有效的操作修饰符:\n +main.help.opt.extract.dir=\ --dir jar 将提取到其中的目录 diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_de.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_de.properties index c444f387a65..b4d3f94bad5 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_de.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_de.properties @@ -135,6 +135,9 @@ doclet.Preview_Label=Vorschau doclet.Preview_Mark=PREVIEW doclet.Restricted_Methods=Eingeschränkte Methoden doclet.Restricted_Mark=RESTRICTED +doclet.searchTag=Suchtag +doclet.searchTags=Tags suchen +doclet.searchTagsSummary=Übersicht über Suchtags doclet.Terminally_Deprecated=Endgültig veraltet doclet.Terminally_Deprecated_Elements=Endgültig veraltete Elemente doclet.Terminally_Deprecated_In_Release=Endgültig veraltet in {0} @@ -169,6 +172,7 @@ doclet.Interfaces=Schnittstellen doclet.Enclosing_Class=Umschließende Klasse: doclet.Enclosing_Interface=Umschließende Schnittstelle: doclet.Inheritance_Tree=Vererbungsbaum +doclet.DefinedIn=Definiert in doclet.ReferencedIn=Referenziert in doclet.Section=Abschnitt doclet.External_Specification=Externe Spezifikation @@ -256,6 +260,8 @@ doclet.help.all_packages.body=Die Seite {0} enthält einen alphabetischen Index doclet.help.serial_form.body=Jede serialisierbare oder externalisierbare Klasse verfügt über eine Beschreibung der zugehörigen Serialisierungsfelder und -methoden. Diese Informationen sind eher für Implementierer als für Benutzer der API von Interesse. Die Navigationsleiste enthält zwar keinen Link, Sie können diese Informationen jedoch abrufen, indem Sie zu einer beliebigen serialisierten Klasse navigieren und im Abschnitt "Siehe auch" der Klassenbeschreibung auf "Serialisierte Form" klicken. # 0: link to Constant Values page doclet.help.constants.body=Auf der Seite {0} sind die statischen endgültigen Felder und deren Werte aufgeführt. +# 0: link to Search Tags page +doclet.help.searchTags.body=Auf der Seite "{0}" werden die in der Dokumentation definierten Suchtags aufgelistet. # 0: link to System Properties page doclet.help.systemProperties.body=Die Seite {0} listet Referenzen auf Systemeigenschaften auf. # 0: link to External Specifications page @@ -323,7 +329,9 @@ doclet.ReflectivePreviewAPI={0} bezieht sich auf mindestens eine reflektive Vors doclet.UsesDeclaredUsingPreview={0} bezieht sich auf mindestens einen Typ, der mit einem Vorschaufeature der Programmiersprache Java deklariert wird: {1}. doclet.PreviewTrailingNote1=Programme können {0} nur verwenden, wenn Vorschaufeatures aktiviert sind. doclet.PreviewTrailingNote2=Vorschaufeatures können in künftigen Releases entfernt oder zu permanenten Features der Java-Plattform hochgestuft werden. -doclet.RestrictedLeadingNote={0} ist eine eingeschränkte Methode der Java-Plattform. +doclet.PreviewJavaSERequiresTransitiveJavaBase=Indirekte Exporte aus dem Modul java.base sind mit der Direktive requires transitive java.base verknüpft. Das ist ein Vorschaufeature der Java-Sprache.
Programme können requires transitive java.base nur verwenden, wenn Vorschaufeatures aktiviert sind.
Vorschaufeatures können in einem zukünftigen Release entfernt oder zu permanenten Features der Java-Plattform hochgestuft werden.
+doclet.RestrictedMethod=eingeschränkte Methode +doclet.RestrictedLeadingNote={0} ist eine {1} der Java-Plattform. doclet.RestrictedTrailingNote1=Programme können {0} nur verwenden, wenn der Zugriff auf eingeschränkte Methoden aktiviert ist. doclet.RestrictedTrailingNote2=Eingeschränkte Methoden sind nicht sicher und können bei falscher Verwendung die JVM zum Absturz bringen oder zu einer Beschädigung des Arbeitsspeichers führen. doclet.Declared_Using_Preview.SEALED=Verschlüsselte Klassen @@ -362,7 +370,7 @@ doclet.usage.version.description=@version-Absätze aufnehmen doclet.usage.author.description=@author-Absätze aufnehmen -doclet.usage.docfilessubdirs.description=doc-file-Unterverzeichnisse rekursiv kopieren +doclet.usage.docfilessubdirs.description=Ermöglicht Deep Copying von "doc-files"-Verzeichnissen. Unterverzeichnisse und alle\nInhalte werden rekursiv in das Ziel kopiert doclet.usage.splitindex.description=Index in eine Datei pro Buchstabe aufteilen @@ -384,7 +392,7 @@ doclet.usage.header.description=Headertext für jede Seite aufnehmen doclet.usage.html5.description=Generiert eine HTML 5-Ausgabe. Diese Option wird nicht mehr benötigt. doclet.usage.footer.parameters= -doclet.usage.footer.description=Footertext für jede Seite aufnehmen +doclet.usage.footer.description=Diese Option wird nicht mehr unterstützt und gibt eine Warnung aus doclet.usage.top.parameters= doclet.usage.top.description=Oberen Text für jede Seite aufnehmen @@ -406,7 +414,7 @@ doclet.usage.link-platform-properties.parameters=< URL> doclet.usage.link-platform-properties.description=Link zu Plattformdokumentations-URLs, die in der Eigenschaftendatei auf deklariert sind doclet.usage.excludedocfilessubdir.parameters=,,... -doclet.usage.excludedocfilessubdir.description=doc-files-Unterverzeichnisse mit angegebenem Namen ausschließen.\n":" kann überall im Argument als Trennzeichen verwendet werden. +doclet.usage.excludedocfilessubdir.description=Schließen Sie alle "doc-files"-Unterverzeichnisse mit einem angegebenen Namen aus.\n":" kann überall im Argument als Trennzeichen verwendet werden. doclet.usage.group.parameters= ,... doclet.usage.group.description=Angegebene Elemente auf Überblickseite gruppieren.\n":" kann überall im Argument als Trennzeichen verwendet werden. @@ -443,7 +451,7 @@ doclet.usage.nonavbar.description=Navigationsleiste nicht generieren doclet.usage.nooverview.description=Überblickseiten nicht generieren -doclet.usage.serialwarn.description=Warnung wegen @serial-Tag generieren +doclet.usage.serialwarn.description=Gibt Warnungen zur Kompilierzeit für fehlende "@serial"-Tags aus doclet.usage.since.parameters=(,)* doclet.usage.since.description=Dokumentiert die neue und die veraltete API in den angegebenen Releases @@ -452,7 +460,7 @@ doclet.usage.since-label.parameters= doclet.usage.since-label.description=Liefert Text für die Überschrift der Seite "Neue API" doclet.usage.tag.parameters=::

-doclet.usage.tag.description=Benutzerdefinierte Tags mit einem Argument angeben +doclet.usage.tag.description=Gibt ein benutzerdefiniertes Tag mit einem einzelnen Argument an doclet.usage.taglet.description=Vollqualifizierter Name des zu registrierenden Taglets @@ -468,7 +476,7 @@ doclet.usage.charset.description=Zeichensatz für plattformübergreifende Anzeig doclet.usage.javafx.description=Aktiviert die JavaFX-Funktionalität doclet.usage.helpfile.parameters= -doclet.usage.helpfile.description=Datei aufnehmen, zu der der Hilfelink verlinkt +doclet.usage.helpfile.description=Gibt eine Datei an, die den Text enthält, der beim Klicken auf den\nHilfelink in der Navigationsleiste angezeigt wird doclet.usage.linksource.description=Quelle in HTML generieren @@ -491,7 +499,7 @@ doclet.usage.override-methods.parameters=(detail|summary) doclet.usage.override-methods.description=Außer Kraft gesetzte Methoden im Abschnitt "detail" oder "summary" dokumentieren.\nDer Standardwert ist "detail". -doclet.usage.allow-script-in-comments.description=JavaScript in Optionen und Kommentaren zulassen +doclet.usage.allow-script-in-comments.description=JavaScript in Dokumentationskommentaren und Optionen\nzulassen, die HTML-Code enthalten doclet.usage.xdocrootparent.parameters=< URL> doclet.usage.xdocrootparent.description=Ersetzt alle Vorkommen von @docRoot gefolgt von /.. in doc-Kommentaren durch\n diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties index ce56bc16325..31e745301b6 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties @@ -135,6 +135,9 @@ doclet.Preview_Label=プレビュー doclet.Preview_Mark=PREVIEW doclet.Restricted_Methods=制限されたメソッド doclet.Restricted_Mark=RESTRICTED +doclet.searchTag=検索タグ +doclet.searchTags=タグの検索 +doclet.searchTagsSummary=検索タグ・サマリー doclet.Terminally_Deprecated=最終的に非推奨 doclet.Terminally_Deprecated_Elements=最終的に非推奨になった要素 doclet.Terminally_Deprecated_In_Release={0}で最終的に非推奨 @@ -169,6 +172,7 @@ doclet.Interfaces=インタフェース doclet.Enclosing_Class=含まれているクラス: doclet.Enclosing_Interface=含まれているインタフェース: doclet.Inheritance_Tree=継承ツリー +doclet.DefinedIn=定義先 doclet.ReferencedIn=参照 doclet.Section=セクション doclet.External_Specification=外部仕様 @@ -256,6 +260,8 @@ doclet.help.all_packages.body={0}ページには、ドキュメントに含ま doclet.help.serial_form.body=直列化可能または外部化可能な各クラスは、直列化フィールドとメソッドの説明を含みます。この情報は、APIを使用するのではなく、実装するユーザーに役立ちます。ナビゲーション・バーにリンクがない場合、直列化されたクラスに移動して、クラス記述の「関連項目」セクションにある「直列化された形式」をクリックすることにより、この情報を表示できます。 # 0: link to Constant Values page doclet.help.constants.body={0}ページには、static finalフィールドとその値のリストがあります。 +# 0: link to Search Tags page +doclet.help.searchTags.body={0}ページには、ドキュメントに定義されている検索タグがあります。 # 0: link to System Properties page doclet.help.systemProperties.body={0}ページには、システム・プロパティへの参照のリストがあります。 # 0: link to External Specifications page @@ -323,7 +329,9 @@ doclet.ReflectivePreviewAPI={0}は1つ以上のリフレクティブ・プレビ doclet.UsesDeclaredUsingPreview={0}は、Java言語のプレビュー機能を使用して宣言されている、1つ以上のタイプを参照しています: {1}。 doclet.PreviewTrailingNote1=プログラムは、プレビュー機能が有効になっている場合にのみ{0}を使用できます。 doclet.PreviewTrailingNote2=プレビュー機能は将来のリリースで削除されるか、Javaプラットフォームの永続的な機能にアップグレードされる可能性があります。 -doclet.RestrictedLeadingNote={0}はJavaプラットフォームの制限されたメソッドです。 +doclet.PreviewJavaSERequiresTransitiveJavaBase=java.baseモジュールからの間接的エクスポートは、Java言語のプレビュー機能であるrequires transitive java.baseディレクティブに関連付けられています。
プログラムは、プレビュー機能が有効になっている場合にのみrequires transitive java.baseを使用できます。
プレビュー機能は将来のリリースで削除されるか、Javaプラットフォームの永続的な機能にアップグレードされる可能性があります。
+doclet.RestrictedMethod=制限されたメソッド +doclet.RestrictedLeadingNote={0}は、Javaプラットフォームの{1}です。 doclet.RestrictedTrailingNote1=プログラムは、制限されたメソッドへのアクセスが有効になっている場合にのみ{0}を使用できます。 doclet.RestrictedTrailingNote2=制限されたメソッドは安全ではありません。不適切に使用した場合、JVMがクラッシュまたはメモリーが破損する場合があります。 doclet.Declared_Using_Preview.SEALED=シール・クラス @@ -362,7 +370,7 @@ doclet.usage.version.description=@versionパラグラフを含めます doclet.usage.author.description=@authorパラグラフを含めます -doclet.usage.docfilessubdirs.description=doc-fileサブディレクトリを再帰的にコピーします +doclet.usage.docfilessubdirs.description='doc-files'ディレクトリのディープ・コピーを有効にします。\n宛先には、サブディレクトリとそのすべて内容が再帰的にコピーされます doclet.usage.splitindex.description=1字ごとに1ファイルに索引を分割します @@ -384,7 +392,7 @@ doclet.usage.header.description=各ページにヘッダー・テキストを含 doclet.usage.html5.description=HTML 5出力を生成します。このオプションは必須ではなくなりました。 doclet.usage.footer.parameters= -doclet.usage.footer.description=各ページにフッター・テキストを含めます +doclet.usage.footer.description=このオプションはされなくなったため、警告が報告されます doclet.usage.top.parameters= doclet.usage.top.description=各ページに上部テキストを含めます @@ -406,7 +414,7 @@ doclet.usage.link-platform-properties.parameters= doclet.usage.link-platform-properties.description=にあるプロパティ・ファイルで宣言されているプラットフォーム・ドキュメントのURLにリンクします doclet.usage.excludedocfilessubdir.parameters=,,... -doclet.usage.excludedocfilessubdir.description=指定された名前のdoc-filesサブディレクトリをすべて除外します。\n':'も、セパレータとして引数の任意の場所に使用できます。 +doclet.usage.excludedocfilessubdir.description=指定された名前の'doc-files'サブディレクトリをすべて除外します。\n':'も、セパレータとして引数の任意の場所に使用できます。 doclet.usage.group.parameters= ,... doclet.usage.group.description=指定する要素を概要ページにおいてグループ化します。\n':'も、セパレータとして引数の任意の場所に使用できます。 @@ -443,7 +451,7 @@ doclet.usage.nonavbar.description=ナビゲーション・バーを生成しま doclet.usage.nooverview.description=概要ページを生成しません -doclet.usage.serialwarn.description=@serialタグに関する警告を生成しません +doclet.usage.serialwarn.description='@serial'タグがない場合は、コンパイル時に警告を報告します doclet.usage.since.parameters=(,)* doclet.usage.since.description=指定されたリリースの新規および非推奨のAPIをドキュメント化します @@ -468,7 +476,7 @@ doclet.usage.charset.description=生成されるドキュメントのクロス doclet.usage.javafx.description=JavaFX機能を有効にします doclet.usage.helpfile.parameters= -doclet.usage.helpfile.description=ヘルプ・リンクのリンク先ファイルを含めます +doclet.usage.helpfile.description=ナビゲーション・バー内のヘルプ・リンクがクリックされたときに表示される\nテキストを含むファイルを指定します doclet.usage.linksource.description=HTML形式でソースを生成します @@ -491,7 +499,7 @@ doclet.usage.override-methods.parameters=(詳細|要約) doclet.usage.override-methods.description=オーバーライドされたメソッドを詳細または要約セクションでドキュメント化します。\nデフォルトは詳細です。 -doclet.usage.allow-script-in-comments.description=オプションおよびコメントでJavaScriptを許可します +doclet.usage.allow-script-in-comments.description=ドキュメント・コメント、および値がhtml-codeであるオプションで\nJavaScriptを許可します doclet.usage.xdocrootparent.parameters= doclet.usage.xdocrootparent.description=docコメント内の/..が後に続く@docRootのすべてをで置換します diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties index c109d4c4237..36e27355b63 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties @@ -135,6 +135,9 @@ doclet.Preview_Label=预览 doclet.Preview_Mark=PREVIEW doclet.Restricted_Methods=受限制的方法 doclet.Restricted_Mark=RESTRICTED +doclet.searchTag=搜索标记 +doclet.searchTags=搜索标记 +doclet.searchTagsSummary=搜索标记概要 doclet.Terminally_Deprecated=最终已过时 doclet.Terminally_Deprecated_Elements=最终已过时的元素 doclet.Terminally_Deprecated_In_Release=最终在 {0} 中已过时 @@ -169,6 +172,7 @@ doclet.Interfaces=接口 doclet.Enclosing_Class=封闭类: doclet.Enclosing_Interface=封闭接口: doclet.Inheritance_Tree=继承树 +doclet.DefinedIn=定义位置 doclet.ReferencedIn=参考位置 doclet.Section=节 doclet.External_Specification=外部规范 @@ -256,6 +260,8 @@ doclet.help.all_packages.body={0} 包含文档中所有程序包的按字母顺 doclet.help.serial_form.body=每个可序列化或可外部化的类都有其序列化字段和方法的说明。此信息对实施(而非使用)API 的人员有用。尽管导航栏中没有链接,但您可以通过下列方式获取此信息:转至任何序列化类,然后单击类说明的“另请参阅”部分中的“序列化形式”。 # 0: link to Constant Values page doclet.help.constants.body={0}页面列出了静态最终字段及其值。 +# 0: link to Search Tags page +doclet.help.searchTags.body={0} 页面列出了文档中定义的搜索标记。 # 0: link to System Properties page doclet.help.systemProperties.body={0} 页面列出了对系统属性的引用。 # 0: link to External Specifications page @@ -323,7 +329,9 @@ doclet.ReflectivePreviewAPI={0} 引用一个或多个反射预览 API:{1}。 doclet.UsesDeclaredUsingPreview={0} 引用一个或多个类型,这些类型是使用 Java 语言 {1} 的预览功能声明的。 doclet.PreviewTrailingNote1=只有在启用了预览功能时,程序才能使用 {0}。 doclet.PreviewTrailingNote2=预览功能可能会在未来发行版中删除,也可能会升级为 Java 平台的永久功能。 -doclet.RestrictedLeadingNote={0} 是 Java 平台的受限制方法。 +doclet.PreviewJavaSERequiresTransitiveJavaBase=来自 java.base 模块的间接导出项与 requires transitive java.base 指令关联,这是 Java 语言的预览功能。
仅在启用了预览功能时,程序才能使用 requires transitive java.base
预览功能可能会在未来发行版中删除,也可能会升级为 Java 平台的永久功能。
+doclet.RestrictedMethod=受限制方法 +doclet.RestrictedLeadingNote={0} 是 Java 平台的 {1}。 doclet.RestrictedTrailingNote1=只有在启用了对受限制方法的访问时,程序才能使用 {0}。 doclet.RestrictedTrailingNote2=受限制的方法不安全,如果使用不当,可能会导致 JVM 崩溃或内存损坏。 doclet.Declared_Using_Preview.SEALED=密封类 @@ -362,7 +370,7 @@ doclet.usage.version.description=包含 @version 段 doclet.usage.author.description=包含 @author 段 -doclet.usage.docfilessubdirs.description=递归复制文档文件子目录 +doclet.usage.docfilessubdirs.description=启用对 'doc-files' 目录的深层复制。\n子目录和所有内容将递归复制到目标 doclet.usage.splitindex.description=将索引分为每个字母对应一个文件 @@ -384,7 +392,7 @@ doclet.usage.header.description=包含每个页面的页眉文本 doclet.usage.html5.description=生成 HTML 5 输出。此选项不再是必需的。 doclet.usage.footer.parameters= -doclet.usage.footer.description=包含每个页面的页脚文本 +doclet.usage.footer.description=此选项不再受支持,并会报告警告 doclet.usage.top.parameters= doclet.usage.top.description=包含每个页面的顶部文本 @@ -406,7 +414,7 @@ doclet.usage.link-platform-properties.parameters= doclet.usage.link-platform-properties.description=链接到位于 的属性文件中声明的平台文档 URL doclet.usage.excludedocfilessubdir.parameters=,,... -doclet.usage.excludedocfilessubdir.description=排除包含给定名称的所有 doc-files 子目录。\n还可以将 ':' 作为分隔符用于参数中的任何位置。 +doclet.usage.excludedocfilessubdir.description=排除包含给定名称的所有 'doc-files' 子目录。\n还可以将 ':' 作为分隔符用于参数中的任何位置。 doclet.usage.group.parameters= ,... doclet.usage.group.description=在概览页面上将指定元素归到一组。\n还可以将 ':' 作为分隔符用于参数中的任何位置。 @@ -443,7 +451,7 @@ doclet.usage.nonavbar.description=不生成导航栏 doclet.usage.nooverview.description=不生成概览页面 -doclet.usage.serialwarn.description=生成有关 @serial 标记的警告 +doclet.usage.serialwarn.description=针对缺少 '@serial' 标记,报告编译时警告 doclet.usage.since.parameters=(,)* doclet.usage.since.description=记录所指定发行版中新增和已过时的 API @@ -452,7 +460,7 @@ doclet.usage.since-label.parameters= doclet.usage.since-label.description=提供要在“新增 API”页的标题中使用的文本 doclet.usage.tag.parameters=::
-doclet.usage.tag.description=指定单个参数定制标记 +doclet.usage.tag.description=使用单个参数指定定制标记 doclet.usage.taglet.description=要注册的 Taglet 的全限定名称 @@ -468,7 +476,7 @@ doclet.usage.charset.description=用于跨平台查看生成的文档的字符 doclet.usage.javafx.description=启用 JavaFX 功能 doclet.usage.helpfile.parameters= -doclet.usage.helpfile.description=包含帮助链接所链接到的文件 +doclet.usage.helpfile.description=指定一个文件,其中包含在单击导航栏中的\n帮助链接时将显示的文本 doclet.usage.linksource.description=以 HTML 格式生成源文件 @@ -491,7 +499,7 @@ doclet.usage.override-methods.parameters=(detail|summary) doclet.usage.override-methods.description=在详细信息部分或概要部分中记录被覆盖的方法。\n默认值为 'detail'。 -doclet.usage.allow-script-in-comments.description=允许在选项和注释中使用 JavaScript +doclet.usage.allow-script-in-comments.description=允许在文档注释和选项中使用 JavaScript\n其值为 html-code doclet.usage.xdocrootparent.parameters= doclet.usage.xdocrootparent.description=将文档注释中出现的所有后跟 /.. 的 @docRoot 替换为\n diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties index 1b00ea9fbc0..28126387ead 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties @@ -282,7 +282,7 @@ doclet.record_equals_doc.fullbody.tail.both=参照コンポーネントは{@link doclet.record_equals_doc.fullbody.tail.primitive=このレコード・クラスのすべてのコンポーネントは対応するラッパー・クラスのcompareメソッドで比較されます。 -doclet.record_equals_doc.fullbody.tail.reference=このレコード・クラスのすべてのコンポーネントは{@link java.util.Objects#equals(Object,Object) Objects::equals(Object,Object)}と比較されます。 +doclet.record_equals_doc.fullbody.tail.reference=このレコード・クラスのすべてのコンポーネントは{@link java.util.Objects#equals(Object,Object) Objects::equals(Object,Object)}で比較されます。 doclet.record_equals_doc.param_name=比較するオブジェクト diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties index e9786173c5f..e2722f1deab 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties @@ -218,7 +218,7 @@ doclet.Annotation_Type_Optional_Members=可选元素 doclet.Annotation_Type_Required_Members=所需元素 doclet.Enum_Constants=枚举常量 doclet.Nested_Classes=嵌套类 -doclet.Modifier=限定符 +doclet.Modifier=修饰符 doclet.Type=类型 doclet.Modifier_and_Type=修饰符和类型 doclet.Implementation=实现: diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_de.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_de.properties index 2192bfb3395..4d0e7bae176 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_de.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_de.properties @@ -50,18 +50,18 @@ main.opt.package.desc=Zeigt Package-/geschützte/öffentliche Typen und Mitglied main.opt.private.desc=Zeigt alle Typen und Mitglieder. Zeigt bei benannten Modulen\nalle Packages und alle Moduldetails. main.opt.show.members.arg= -main.opt.show.members.desc=Gibt an, welche Mitglieder (Felder, Methoden usw.) dokumentiert\nwerden, wobei der Wert "public", "protected",\n"package" oder "private" lauten kann. Der Standardwert ist "protected"\nund zeigt öffentliche und geschützte Mitglieder, "public" zeigt nur\nöffentliche Mitglieder, "package" zeigt öffentliche, geschützte und\nPackagemitglieder, und "private" zeigt alle Mitglieder. +main.opt.show.members.desc=Gibt an, welche Member (Felder, Methoden oder Konstruktoren) dokumentiert\nwerden, wobei der Wert "public", "protected",\n"package" oder "private" lauten kann. Der Standardwert ist "protected"\nund zeigt öffentliche und geschützte Member an. "public" zeigt nur\nöffentliche Member, "package" zeigt öffentliche, geschützte und\nPackage-Member, und "private" zeigt alle Member an. main.opt.show.types.arg= main.opt.show.types.desc=Gibt an, welche Typen (Klassen, Schnittstellen usw.) dokumentiert\nwerden, wobei der Wert "public", "protected",\n"package" oder "private" lauten kann. Der Standardwert ist "protected"\nund zeigt öffentliche und geschützte Typen, "public" zeigt nur\nöffentliche Typen, "package" zeigt öffentliche, geschützte und\nPackagetypen, und "private" zeigt alle Typen. main.opt.show.packages.arg= -main.opt.show.packages.desc=Gibt das Modul an, dessen Packages dokumentiert werden. Mögliche\nWerte sind "exported" oder "all" (exportierte oder alle Packages). +main.opt.show.packages.desc=Gibt an, welche Modulpackages dokumentiert werden. Mögliche\nWerte sind "exported" oder "all" (exportierte oder alle Packages). main.opt.show.module.contents.arg= main.opt.show.module.contents.desc=Gibt die Dokumentationsgranularität von Moduldeklarationen\nan. Mögliche Werte sind "api" oder "all". -main.opt.expand.requires.arg= +main.opt.expand.requires.arg=(transitive|all) main.opt.expand.requires.desc=Anweisungen im Tool zum Erweitern des zu dokumentierenden\nModulsets. Standardmäßig werden nur die Module dokumentiert,\ndie in der Befehlszeile ausdrücklich angegeben werden. Der Wert\n"transitive" schließt zusätzlich alle "requires transitive"-Abhängigkeiten\nder Module ein. Der Wert "all" schließt\nalle Abhängigkeiten der Module ein. main.opt.help.desc=Zeigt die Befehlszeilenoptionen an und beendet diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties index 1cafe4d6ad5..42765ab4ded 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties @@ -50,18 +50,18 @@ main.opt.package.desc=package/protected/publicタイプとメンバーを表示 main.opt.private.desc=すべてのタイプとメンバーを表示します。名前のあるモジュールの場合、\nすべてのパッケージとすべてのモジュール詳細を表示します。 main.opt.show.members.arg= -main.opt.show.members.desc=値が"public"、"protected"、"package"または"private"のいずれかの\nどのメンバー(フィールドやメソッドなど)をドキュメント化するかを指定する。\nデフォルトは"protected"で、publicおよびprotectedメンバーが表示され、\n"public"ではpublicメンバーのみが表示されます。"package"では\npublic、protectedおよびpackageメンバーが表示され、"private"\nではすべてのメンバーが表示されます。 +main.opt.show.members.desc=値が"public"、"protected"、"package"または"private"のいずれかの\nどのメンバー(フィールド、メソッドまたはコンストラクタ)をドキュメント化するかを指定する。\nデフォルトは"protected"で、publicおよびprotectedメンバーが表示され、\n"public"ではpublicメンバーのみが表示されます。"package"では\npublic、protectedおよびpackageメンバーが表示され、"private"\nではすべてのメンバーが表示されます。 main.opt.show.types.arg= main.opt.show.types.desc=値が"public"、"protected"、"package"または"private"のいずれかの\nどの型(クラスやインタフェースなど)をドキュメント化するかを指定する。\nデフォルトは"protected"で、publicおよびprotected型が表示され、\n"public"ではpublic型のみが表示されます。"package"では\npublic、protectedおよびpackage型が表示され、"private"\nではすべての型が表示されます。 main.opt.show.packages.arg= -main.opt.show.packages.desc=どのモジュールのパッケージをドキュメント化するかを指定する。使用可能な\n値は、"exported"または"all"パッケージです。 +main.opt.show.packages.desc=どのモジュール・パッケージをドキュメント化するかを指定する。使用可能な\n値は、"exported"または"all"パッケージです。 main.opt.show.module.contents.arg= main.opt.show.module.contents.desc=モジュール宣言のドキュメント化の粒度を指定する。\n使用可能な値は、"api"または"all"です。 -main.opt.expand.requires.arg= +main.opt.expand.requires.arg=(transitive|all) main.opt.expand.requires.desc=ドキュメント化するモジュールのセットを拡張するための\nツールを指定する。デフォルトでは、コマンドラインで明示的に\n指定されたモジュールのみがドキュメント化されます。"transitive"の値は、\nそれらのモジュールのすべての"requires transitive"依存性を追加で\n含めます。"all"の値は、それらのモジュールのすべての依存性を\n含めます。 main.opt.help.desc=コマンドライン・オプションを表示して終了する diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties index 4ad91361e06..27053b44753 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties @@ -50,18 +50,18 @@ main.opt.package.desc=显示程序包/受保护/公共类型和成员。对于 \ main.opt.private.desc=显示所有类型和成员。对于命名模块,\n显示所有程序包和所有模块详细信息。 main.opt.show.members.arg=<值> -main.opt.show.members.desc=指定将文档化的成员 (字段, 方法等), 其值可以\n为 "public", "protected", "package" 或 \n"private" 之一。默认值为 "protected", 该值将\n显示公共和受保护成员, "public" 将仅显示\n公共成员, "package" 将显示公共, 受保护和\n程序包成员, "private" 将显示所有成员。 +main.opt.show.members.desc=指定将文档化的成员(字段、方法或构造器),\n其值可以为 "public"、"protected"、"package" \n或 "private" 之一。默认值为 "protected",此时将\n显示公共和受保护成员,值为 "public" 时将仅显示\n公共成员,值为 "package" 时将显示公共、受保护\n和程序包成员,值为 "private" 时将显示所有成员。 main.opt.show.types.arg=<值> main.opt.show.types.desc=指定将文档化的类型 (类, 接口等), 其值可以\n为 "public", "protected", "package" 或 \n"private" 之一。默认值为 "protected", 该值将\n显示公共和受保护类型, "public" 将仅显示\n公共类型, "package" 将显示公共, 受保护和\n程序包类型, "private" 将显示所有类型。 main.opt.show.packages.arg=<值> -main.opt.show.packages.desc=指定将文档化的模块的程序包。\n可能的值为 "exported" 或 "all" 程序包。 +main.opt.show.packages.desc=指定将文档化的模块程序包。可能的\n值为 "exported" 或 "all" 程序包。 main.opt.show.module.contents.arg=<值> main.opt.show.module.contents.desc=指定模块声明的文档粒度。\n可能的值为 "api" 或 "all"。 -main.opt.expand.requires.arg=<值> +main.opt.expand.requires.arg=(transitive|all) main.opt.expand.requires.desc=指示工具展开要文档化的模块集。\n默认情况下, 将仅文档化命令行中明确\n指定的模块。值 "transitive" 将额外包含\n这些模块的所有 "requires transitive"\n被依赖对象。值 "all" 将包含这些模块\n的所有被依赖对象。 main.opt.help.desc=显示命令行选项并退出 diff --git a/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_de.properties b/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_de.properties index 3575f134dfc..23ccb0eec6c 100644 --- a/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_de.properties +++ b/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_de.properties @@ -66,7 +66,7 @@ main.opt.version=\ -version Versionsinformationen main.opt.v=\ -v -verbose Gibt zusätzliche Informationen aus -main.opt.l=\ -l Gibt die Zeilennummer und lokale Variablentabellen aus +main.opt.l=\ -l Gibt die Zeilennummer und lokale Variablentabellen aus, kann zusammen mit "-c" verwendet werden main.opt.public=\ -public Zeigt nur öffentliche Klassen und Mitglieder diff --git a/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_ja.properties b/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_ja.properties index a759117f727..fc16a539111 100644 --- a/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_ja.properties +++ b/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_ja.properties @@ -66,7 +66,7 @@ main.opt.version=\ -version バージョン情報 main.opt.v=\ -v -verbose 追加情報を出力する -main.opt.l=\ -l 行番号とローカル変数表を出力する +main.opt.l=\ -l 行番号とローカル変数表を出力する。-cとの組合せで動作します main.opt.public=\ -public publicクラスおよびメンバーのみを表示する diff --git a/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties b/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties index bc6137f7f13..3d08cd16755 100644 --- a/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties +++ b/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties @@ -66,7 +66,7 @@ main.opt.version=\ -version 版本信息 main.opt.v=\ -v -verbose 输出附加信息 -main.opt.l=\ -l 输出行号和本地变量表 +main.opt.l=\ -l 输出行号和本地变量表,与 -c 结合使用 main.opt.public=\ -public 仅显示公共类和成员 diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_de.properties b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_de.properties index 31ed02a693c..7c156a61b3a 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_de.properties +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_de.properties @@ -62,10 +62,19 @@ main.msg.bug=Eine Ausnahme ist in jlink aufgetreten. Melden Sie in der Java-Bugd main.extended.help=Liste der verfügbaren Plug-ins: main.extended.help.footer=Bei Optionen, die eine erfordern, ist der Wert eine kommagetrennte\nListe von Elementen, die jeweils eines der folgenden Formate verwenden:\n \n glob:\n regex:\n @, wobei der Dateiname der Name einer Datei mit zu verwendenden Mustern ist,\n ein Muster pro Zeile\n\n +main.runtime.image.linking.cap.enabled=aktiviert +main.runtime.image.linking.cap.disabled=deaktiviert +main.runtime.image.linking.cap.sect.header=Funktionen: +main.runtime.image.linking.cap.msg=\ Assemblierung von Laufzeitimage {0} error.prefix=Fehler: warn.prefix=Warnung: +err.runtime.link.not.linkable.runtime=Dieses JDK unterstützt keine Assemblierung vom aktuellen Laufzeitimage +err.runtime.link.jdk.jlink.prohibited=Dieses JDK enthält keine als Pakete verpackten Module und kann nicht verwendet werden, um ein anderes Image mit dem Modul jdk.jlink zu erstellen +err.runtime.link.packaged.mods=Dieses JDK enthält keine als Pakete verpackten Module. "--keep-packaged-modules" wird nicht unterstützt +err.runtime.link.modified.file={0} wurde modifiziert +err.runtime.link.patched.module=Datei {0} nicht im Modulimage gefunden. "--patch-module" wird beim Verknüpfen aus dem Laufzeitimage nicht unterstützt err.empty.module.path=leerer Modulpfad err.jlink.version.mismatch=jlink-Version {0}.{1} stimmt nicht mit Ziel-java.base-Version {2}.{3} überein err.automatic.module:automatisches Modul kann nicht mit jlink verwendet werden: {0} aus {1} @@ -74,7 +83,7 @@ err.launcher.main.class.empty:Launcher-Hauptklassenname darf nicht leer sein: {0 err.launcher.module.name.empty:Launcher-Modulname darf nicht leer sein: {0} err.launcher.value.format:Launcher-Wert muss folgendes Format haben: =[/]: {0} err.output.must.be.specified:--output muss angegeben werden -err.modulepath.must.be.specified:--module-path ist nicht angegeben, und dieses Laufzeitimage enthält nicht das jmods-Verzeichnis. +err.modulepath.must.be.specified:"--module-path" ist nicht angegeben, und dieses Laufzeitimage enthält kein jmods-Verzeichnis err.mods.must.be.specified:keine Module zum {0} angegeben err.path.not.found=Pfad nicht gefunden: {0} err.path.not.valid=ungültiger Pfad: {0} @@ -106,3 +115,6 @@ warn.provider.notfound=Kein Provider für Service angegeben für --suggest-provi no.suggested.providers=Option --bind-services ist angegeben. Keine weiteren Provider vorgeschlagen. suggested.providers.header=Vorgeschlagene Provider providers.header=Provider + +runtime.link.info=Assemblierung basierend auf dem aktuellen Laufzeitimage +runtime.link.jprt.path.extra=(Laufzeitimage) diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties index 2beac29ca54..66cf161c1fc 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties @@ -62,10 +62,19 @@ main.msg.bug=jlinkで例外が発生しました。データベースで重複 main.extended.help=使用可能なプラグインのリスト: main.extended.help.footer=を必要とするオプションの場合、値は、次の形式のいずれかを使用する、要素のカンマ区切りリストになります:\n \n glob:\n regex:\n @ filenameは、使用するパターンを含むファイル(1行ごとに1パターン)の名前です\n\n +main.runtime.image.linking.cap.enabled=有効 +main.runtime.image.linking.cap.disabled=無効 +main.runtime.image.linking.cap.sect.header=機能: +main.runtime.image.linking.cap.msg=\ ランタイム・イメージ{0}からのリンク error.prefix=エラー: warn.prefix=警告: +err.runtime.link.not.linkable.runtime=このJDKでは、現在のランタイム・イメージからのリンクをサポートしていません +err.runtime.link.jdk.jlink.prohibited=このJDKは、パッケージ化されたモジュールを含んでおらず、jdk.jlinkモジュールによる別のイメージの作成に使用できません +err.runtime.link.packaged.mods=このJDKにはパッケージ化されたモジュールがありません。--keep-packaged-modulesはサポートされていません +err.runtime.link.modified.file={0}が変更されました +err.runtime.link.patched.module=ファイル{0}がモジュール・イメージに見つかりません。ランタイム・イメージからリンクする際、--patch-moduleはサポートされていません err.empty.module.path=空のモジュール・パス err.jlink.version.mismatch=jlinkバージョン{0}.{1}がターゲットのjava.baseバージョン{2}.{3}と一致しません err.automatic.module:jlinkでは自動モジュールは使用できません: {1}からの{0} @@ -74,7 +83,7 @@ err.launcher.main.class.empty:起動ツールのメイン・クラス名は空 err.launcher.module.name.empty:起動ツールのモジュール名は空にできません: {0} err.launcher.value.format:起動ツールの値は=[/]の形式にしてください: {0} err.output.must.be.specified:--outputを指定する必要があります -err.modulepath.must.be.specified:--module-pathが指定されておらず、このランタイム・イメージにjmodsディレクトリが含まれていません。 +err.modulepath.must.be.specified:--module-pathが指定されておらず、このランタイム・イメージにjmodsディレクトリが含まれていません err.mods.must.be.specified:{0}にモジュールが指定されていません err.path.not.found=パスが見つかりません: {0} err.path.not.valid=無効なパス: {0} @@ -106,3 +115,6 @@ warn.provider.notfound=--suggest-providersに指定されたサービスにプ no.suggested.providers=--bind-servicesオプションが指定されています。追加のプロバイダは推奨されません。 suggested.providers.header=推奨プロバイダ providers.header=プロバイダ + +runtime.link.info=現在のランタイム・イメージに基づいてリンク +runtime.link.jprt.path.extra=(ランタイム・イメージ) diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties index 9bd20e1d843..532e981bfac 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties @@ -62,10 +62,19 @@ main.msg.bug=jlink 中出现异常错误。如果在 Java Bug Database (https:// main.extended.help=可用插件列表: main.extended.help.footer=对于需要 <模式列表> 的选项, 值将为逗号分隔的元素列表, 每个元素使用以下格式之一:\n \n glob:\n regex:<正则表达式模式>\n @<文件名>, 其中“文件名”是包含要使用的模式的文件名, 每行一个模式\n\n +main.runtime.image.linking.cap.enabled=启用 +main.runtime.image.linking.cap.disabled=禁用 +main.runtime.image.linking.cap.sect.header=功能: +main.runtime.image.linking.cap.msg=\ 从运行时映像 {0} 链接 error.prefix=错误: warn.prefix=警告: +err.runtime.link.not.linkable.runtime=此 JDK 不支持从当前运行时映像链接 +err.runtime.link.jdk.jlink.prohibited=此 JDK 不包含打包模块,无法用于使用 jdk.jlink 模块创建其他映像 +err.runtime.link.packaged.mods=此 JDK 没有打包模块。不支持 --keep-packaged-modules +err.runtime.link.modified.file=已修改 {0} +err.runtime.link.patched.module=在模块映像中未找到文件 {0}。从运行时映像链接时,不支持 --patch-module err.empty.module.path=空模块路径 err.jlink.version.mismatch=jlink 版本 {0}.{1} 与目标 java.base 版本 {2}.{3} 不匹配 err.automatic.module:自动模块不能用于来自 {1} 的 jlink: {0} @@ -74,7 +83,7 @@ err.launcher.main.class.empty:启动程序主类名不能为空: {0} err.launcher.module.name.empty:启动程序模块名称不能为空: {0} err.launcher.value.format:启动程序值应使用“<命令>=<模块>[/<主类>]”格式: {0} err.output.must.be.specified:必须指定 --output -err.modulepath.must.be.specified:未指定 --module-path,此运行时映像不包含 jmods 目录。 +err.modulepath.must.be.specified:未指定 --module-path,此运行时映像不包含 jmods 目录 err.mods.must.be.specified:没有将任何模块指定到{0} err.path.not.found=找不到路径: {0} err.path.not.valid=无效路径: {0} @@ -106,3 +115,6 @@ warn.provider.notfound=找不到为 --suggest-providers 指定的服务提供方 no.suggested.providers=指定了 --bind-services 选项。未建议其他提供方。 suggested.providers.header=建议的提供方 providers.header=提供方 + +runtime.link.info=基于当前运行时映像进行链接 +runtime.link.jprt.path.extra=(运行时映像) diff --git a/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties b/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties index 980c8eb2316..b346d3cde82 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties +++ b/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties @@ -96,8 +96,8 @@ err.module.resolution.fail=解決に失敗しました: {0} err.no.moduleToHash=ハッシュが記録されていません: {0}に一致し、ハッシュを記録するモジュールが見つかりません err.invalid.date=--date {0}は、オプションのタイムゾーン書式: {1}を指定した、有効なISO-8601の拡張オフセットの日時ではありません err.date.out.of.range=--date {0}は有効な範囲1980-01-01T00:00:02Zから2099-12-31T23:59:59Zにありません -err.compress.incorrect=--圧縮値が無効です: {0} -err.compress.wrong.mode=--圧縮を行えるのは作成モードのときのみです +err.compress.incorrect=--compress値が無効です: {0} +err.compress.wrong.mode=--compressを行えるのは作成モードのときのみです warn.invalid.arg=無効なクラス名またはパス名が存在しません: {0} warn.no.module.hashes=ハッシュが記録されていません: {0}に依存するハッシュに対してモジュールが指定されていません warn.ignore.entry=セクション{1}のエントリ{0}を無視します diff --git a/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties b/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties index 409081fc45b..1cf9d001fa3 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties +++ b/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties @@ -96,8 +96,8 @@ err.module.resolution.fail=解析失败: {0} err.no.moduleToHash=未记录散列:找不到与 {0} 匹配的模块来记录散列 err.invalid.date=--date {0} 不是具有可选时区的有效 ISO-8601 扩展偏移日期时间格式:{1} err.date.out.of.range=--date {0} 不在 1980-01-01T00:00:02Z 到 2099-12-31T23:59:59Z 这一有效范围内 -err.compress.incorrect=--压缩值无效:{0} -err.compress.wrong.mode=--仅在使用创建模式时接受压缩 +err.compress.incorrect=--compress 值无效:{0} +err.compress.wrong.mode=仅在使用创建模式时接受 --compress warn.invalid.arg=类名无效或路径名不存在: {0} warn.no.module.hashes=未记录任何散列: 没有为依赖于 {0} 的散列处理指定模块 warn.ignore.entry=正在忽略节 {1} 中的条目 {0} diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_de.properties b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_de.properties index c0aece573e0..f76d3a3743f 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_de.properties +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_de.properties @@ -93,6 +93,6 @@ message.signing.pkg=Warnung: Zum Signieren von PKG müssen Sie möglicherweise m message.setfile.dmg=Das Festlegen des benutzerdefinierten Symbols für die DMG-Datei wurde übersprungen, weil das Utility "SetFile" nicht gefunden wurde. Durch Installieren von Xcode mit Befehlszeilentools sollte dieses Problem behoben werden. message.install-dir-ignored=Warnung: "--install-dir" wird von DMG nicht unterstützt. Stattdessen wird standardmäßig /Applications verwendet. message.codesign.failed.reason.app.content="codesign" war nicht erfolgreich, und zusätzlicher Anwendungsinhalt wurde über den Parameter "--app-content" angegeben. Wahrscheinlich hat der zusätzliche Inhalt die Integrität des Anwendungs-Bundles beeinträchtigt und den Fehler verursacht. Stellen Sie sicher, das der über den Parameter "--app-content" angegebene Inhalt nicht die Integrität des Anwendungs-Bundles beeinträchtigt, oder fügen Sie ihn im Nachverarbeitungsschritt hinzu. -message.codesign.failed.reason.xcode.tools=Possible reason for "codesign" failure is missing Xcode with command line developer tools. Install Xcode with command line developer tools to see if it resolves the problem. +message.codesign.failed.reason.xcode.tools=Möglicher Grund für "codesign"-Fehler ist fehlender Xcode mit Befehlszeilen-Entwicklertools. Installieren Sie Xcode mit Befehlszeilen-Entwicklertools, und prüfen Sie, ob das Problem dadurch beseitigt wird. warning.unsigned.app.image=Warnung: Nicht signiertes app-image wird zum Erstellen von signiertem {0} verwendet. warning.per.user.app.image.signed=Warnung: Konfiguration der installierten Anwendung pro Benutzer wird nicht unterstützt, da "{0}" im vordefinierten signierten Anwendungsimage fehlt. diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties index 166e7ffb670..5ea13254e93 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties @@ -93,6 +93,6 @@ message.signing.pkg=警告: PKGへの署名の場合、「キーチェーン・ message.setfile.dmg='SetFile'ユーティリティが見つからないため、DMGファイルでのカスタム・アイコンの設定がスキップされました。Xcodeとコマンド・ライン・ツールをインストールすると、この問題は解決されます。 message.install-dir-ignored=警告: "--install-dir"はDMGでサポートされていません。/Applicationsにデフォルト設定されます。 message.codesign.failed.reason.app.content="codesign"が失敗したため、追加のアプリケーション・コンテンツが、"--app-content"パラメータを介して提供されました。追加のコンテンツにより、アプリケーション・バンドルの整合性が損われ、失敗の原因になった可能性があります。"--app-content"パラメータを介して提供されたコンテンツによって、アプリケーション・バンドルの整合性が損われていないことを確認するか、処理後のステップで追加してください。 -message.codesign.failed.reason.xcode.tools=Possible reason for "codesign" failure is missing Xcode with command line developer tools. Install Xcode with command line developer tools to see if it resolves the problem. +message.codesign.failed.reason.xcode.tools="codesign"失敗の考えられる理由は、Xcodeとコマンドライン・デベロッパ・ツールの欠落です。Xcodeとコマンドライン・デベロッパ・ツールをインストールして、問題が解決されるかを確認してください。 warning.unsigned.app.image=警告: 署名されていないapp-imageを使用して署名された{0}を作成します。 warning.per.user.app.image.signed=警告: 事前定義済の署名付きアプリケーション・イメージに"{0}"がないため、インストール済アプリケーションのユーザーごとの構成はサポートされません。 diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties index a620e8dacdd..1a262f461ac 100644 --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties @@ -93,6 +93,6 @@ message.signing.pkg=警告:要对 PKG 进行签名,可能需要使用“密 message.setfile.dmg=由于未找到 'SetFile' 实用程序,跳过了针对 DMG 文件设置定制图标的操作。安装带命令行工具的 Xcode 应能解决此问题。 message.install-dir-ignored=警告:"--install-dir" 不受 DMG 支持,将默认为 /Applications。 message.codesign.failed.reason.app.content="codesign" 失败,并通过 "--app-content" 参数提供了附加应用程序内容。可能是附加内容破坏了应用程序包的完整性,导致了故障。请确保通过 "--app-content" 参数提供的内容不会破坏应用程序包的完整性,或者在后处理步骤中添加该内容。 -message.codesign.failed.reason.xcode.tools=Possible reason for "codesign" failure is missing Xcode with command line developer tools. Install Xcode with command line developer tools to see if it resolves the problem. +message.codesign.failed.reason.xcode.tools="codesign" 失败可能是因为缺少带命令行开发人员工具的 Xcode。请安装带命令行开发人员工具的 Xcode,看看是否可以解决问题。 warning.unsigned.app.image=警告:使用未签名的 app-image 生成已签名的 {0}。 warning.per.user.app.image.signed=警告:由于预定义的已签名应用程序映像中缺少 "{0}",不支持对已安装应用程序的每用户配置提供支持。 diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_de.properties b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_de.properties index dce8ca6176d..31a0ebeab24 100644 --- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_de.properties +++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_de.properties @@ -40,9 +40,9 @@ resource.overrides-wix-file=Überschreibt WiX-Projektdatei resource.shortcutpromptdlg-wix-file=Dialogfeld für Verknüpfungs-Prompt der WiX-Projektdatei resource.installdirnotemptydlg-wix-file=Nicht leeres Installationsverzeichnis in Dialogfeld für WiX-Projektdatei resource.launcher-as-service-wix-file=WiX-Projektdatei für Serviceinstallationsprogramm -resource.wix-src-conv=XSLT stylesheet converting WiX sources from WiX v3 to WiX v4 format +resource.wix-src-conv=XSLT-Stylesheet zum Konvertieren von WiX-Quellen vom Format WiX v3 in WiX v4 -error.no-wix-tools=Can not find WiX tools. Was looking for WiX v3 light.exe and candle.exe or WiX v4/v5 wix.exe and none was found +error.no-wix-tools=WiX-Tools nicht gefunden. Gesucht wurden WiX v3 light.exe und candle.exe oder WiX v4/v5 wix.exe, aber keine der Dateien wurde gefunden error.no-wix-tools.advice=Laden Sie WiX 3.0 oder höher von https://wixtoolset.org herunter, und fügen Sie es zu PATH hinzu. error.version-string-wrong-format.advice=Setzen Sie den Wert des --app-version-Parameters auf eine gültige ProductVersion des Windows-Installationsprogramms. error.msi-product-version-components=Versionszeichenfolge [{0}] muss zwischen 2 und 4 Komponenten aufweisen. @@ -56,7 +56,7 @@ error.lock-resource=Sperren nicht erfolgreich: {0} error.unlock-resource=Aufheben der Sperre nicht erfolgreich: {0} error.read-wix-l10n-file=Datei {0} konnte nicht geparst werden error.extract-culture-from-wix-l10n-file=Kulturwert konnte nicht aus Datei {0} gelesen werden -error.short-path-conv-fail=Failed to get short version of "{0}" path +error.short-path-conv-fail=Kurze Version des Pfades "{0}" konnte nicht abgerufen werden message.icon-not-ico=Das angegebene Symbol "{0}" ist keine ICO-Datei und wird nicht verwendet. Stattdessen wird das Standardsymbol verwendet. message.potential.windows.defender.issue=Warnung: Windows Defender verhindert eventuell die korrekte Ausführung von jpackage. Wenn ein Problem auftritt, deaktivieren Sie das Echtzeitmonitoring, oder fügen Sie einen Ausschluss für das Verzeichnis "{0}" hinzu. diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties index 47e5b585869..57391db9087 100644 --- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties +++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties @@ -40,9 +40,9 @@ resource.overrides-wix-file=WiXプロジェクト・ファイルのオーバー resource.shortcutpromptdlg-wix-file=ショートカット・プロンプト・ダイアログWiXプロジェクト・ファイル resource.installdirnotemptydlg-wix-file=インストール・ディレクトリ・ダイアログのWiXプロジェクト・ファイルが空ではありません resource.launcher-as-service-wix-file=サービス・インストーラWiXプロジェクト・ファイル -resource.wix-src-conv=XSLT stylesheet converting WiX sources from WiX v3 to WiX v4 format +resource.wix-src-conv=WiXソースをWiX v3からWiX v4フォーマットに変換するXSLTスタイルシート -error.no-wix-tools=Can not find WiX tools. Was looking for WiX v3 light.exe and candle.exe or WiX v4/v5 wix.exe and none was found +error.no-wix-tools=WiXツールが見つかりません。WiX v3 light.exeとcandle.exeまたはWiX v4/v5 wix.exeを探しましたが、いずれも見つかりませんでした error.no-wix-tools.advice=WiX 3.0以降をhttps://wixtoolset.orgからダウンロードし、PATHに追加します。 error.version-string-wrong-format.advice=--app-versionパラメータの値を有効なWindows Installer ProductVersionに設定します。 error.msi-product-version-components=バージョン文字列[{0}]には、2から4つのコンポーネントが含まれている必要があります。 @@ -56,7 +56,7 @@ error.lock-resource=ロックに失敗しました: {0} error.unlock-resource=ロック解除に失敗しました: {0} error.read-wix-l10n-file={0}ファイルの解析に失敗しました error.extract-culture-from-wix-l10n-file={0}ファイルからのカルチャの値の読取りに失敗しました -error.short-path-conv-fail=Failed to get short version of "{0}" path +error.short-path-conv-fail="{0}"パスの短縮バージョンの取得に失敗しました message.icon-not-ico=指定したアイコン"{0}"はICOファイルではなく、使用されません。デフォルト・アイコンがその位置に使用されます。 message.potential.windows.defender.issue=警告: Windows Defenderが原因でjpackageが機能しないことがあります。問題が発生した場合は、リアルタイム・モニタリングを無効にするか、ディレクトリ"{0}"の除外を追加することにより、問題に対処できます。 diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties index abd3d13a667..bd93fc5951e 100644 --- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties +++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties @@ -40,9 +40,9 @@ resource.overrides-wix-file=覆盖 WiX 项目文件 resource.shortcutpromptdlg-wix-file=快捷方式提示对话框 WiX 项目文件 resource.installdirnotemptydlg-wix-file=安装目录对话框 WiX 项目文件非空 resource.launcher-as-service-wix-file=服务安装程序 WiX 项目文件 -resource.wix-src-conv=XSLT stylesheet converting WiX sources from WiX v3 to WiX v4 format +resource.wix-src-conv=将 WiX 源码从 WiX v3 格式转换为 WiX v4 格式的 XSLT 样式表 -error.no-wix-tools=Can not find WiX tools. Was looking for WiX v3 light.exe and candle.exe or WiX v4/v5 wix.exe and none was found +error.no-wix-tools=找不到 WiX 工具。已查找 WiX v3 light.exe 和 candle.exe 或 WiX v4/v5 wix.exe,但都未找到 error.no-wix-tools.advice=从 https://wixtoolset.org 下载 WiX 3.0 或更高版本,然后将其添加到 PATH。 error.version-string-wrong-format.advice=将 --app-version 参数的值设置为有效的 Windows Installer ProductVersion。 error.msi-product-version-components=版本字符串 [{0}] 必须包含 2 到 4 个组成部分。 @@ -56,7 +56,7 @@ error.lock-resource=无法锁定:{0} error.unlock-resource=无法解锁:{0} error.read-wix-l10n-file=无法解析 {0} 文件 error.extract-culture-from-wix-l10n-file=无法从 {0} 文件读取文化值 -error.short-path-conv-fail=Failed to get short version of "{0}" path +error.short-path-conv-fail=无法获取简短形式的 "{0}" 路径 message.icon-not-ico=指定的图标 "{0}" 不是 ICO 文件, 不会使用。将使用默认图标代替。 message.potential.windows.defender.issue=警告:Windows Defender 可能会阻止 jpackage 正常工作。如果存在问题,可以通过禁用实时监视或者为目录 "{0}" 添加排除项来解决。 diff --git a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_de.properties b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_de.properties index a275ab8a080..7554b380e5f 100644 --- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_de.properties +++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_de.properties @@ -180,7 +180,7 @@ jshell.console.empty = \nLeerer Eintrag. Ein einzelner gültiger Ausdruck oder e jshell.fix.wrong.shortcut =Unerwartetes Zeichen nach Umschalt+Tab.\nVerwenden Sie "I" für automatischen Import, "V" zur Variablenerstellung oder "M" zur Methodenerstellung.\nWeitere Informationen finden Sie unter:\n/help shortcuts -help.usage = Verwendung: jshell