diff --git a/common.json b/common.json index 53802d633ac2..f3ebeab2b7ef 100644 --- a/common.json +++ b/common.json @@ -8,7 +8,7 @@ "COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet", "jdks": { - "galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+26-3319", "platformspecific": true, "extrabundles": ["static-libs"]}, + "galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-26+2-33", "platformspecific": true, "extrabundles": ["static-libs"]}, "oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "jdk-17.0.7+8", "platformspecific": true, "extrabundles": ["static-libs"]}, "labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.7+4-jvmci-23.1-b02", "platformspecific": true }, diff --git a/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/KnownTruffleTypes.java b/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/KnownTruffleTypes.java index 47c307754777..b7a92208c0b6 100644 --- a/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/KnownTruffleTypes.java +++ b/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/KnownTruffleTypes.java @@ -221,7 +221,7 @@ private static ResolvedJavaField getThrowableJFRTracingField(MetaAccessProvider ResolvedJavaType throwableType = metaAccess.lookupJavaType(Throwable.class); for (ResolvedJavaField staticField : throwableType.getStaticFields()) { if (staticField.getName().equals("jfrTracing") && - staticField.getType().equals(metaAccess.lookupJavaType(boolean.class)) && staticField.isVolatile()) { + staticField.getType().equals(metaAccess.lookupJavaType(boolean.class))) { return staticField; } } diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/localization/compression/utils/BundleSerializationUtils.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/localization/compression/utils/BundleSerializationUtils.java index 897f78b9ca6a..8ba1772e79c7 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/localization/compression/utils/BundleSerializationUtils.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/localization/compression/utils/BundleSerializationUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.ResourceBundle; +import java.util.function.Supplier; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; @@ -53,7 +54,11 @@ public static Map extractContent(ResourceBundle bundle) { Class clazz = bundle.getClass().getSuperclass(); while (clazz != null && ResourceBundle.class.isAssignableFrom(clazz)) { try { - return (Map) ReflectionUtil.lookupField(clazz, "lookup").get(bundle); + Object lookup = ReflectionUtil.lookupField(clazz, "lookup").get(bundle); + if (lookup instanceof Supplier) { + return ((Supplier>) lookup).get(); + } + return (Map) lookup; } catch (ReflectionUtil.ReflectionUtilError | ReflectiveOperationException e) { clazz = clazz.getSuperclass(); } diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/localization/substitutions/Target_sun_util_resources_OpenListResourceBundle_SubstituteLoadLookup.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/localization/substitutions/Target_sun_util_resources_OpenListResourceBundle_SubstituteLoadLookup.java deleted file mode 100644 index 7ca2a208241b..000000000000 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/localization/substitutions/Target_sun_util_resources_OpenListResourceBundle_SubstituteLoadLookup.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2021, 2021, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.svm.core.jdk.localization.substitutions; - -import java.util.Map; - -import org.graalvm.nativeimage.ImageSingletons; - -import com.oracle.svm.core.annotate.Alias; -import com.oracle.svm.core.annotate.Substitute; -import com.oracle.svm.core.annotate.TargetClass; -import com.oracle.svm.core.jdk.localization.LocalizationSupport; -import com.oracle.svm.core.jdk.localization.substitutions.modes.SubstituteLoadLookup; - -@TargetClass(value = sun.util.resources.OpenListResourceBundle.class, onlyWith = SubstituteLoadLookup.class) -@SuppressWarnings({"static-method"}) -final class Target_sun_util_resources_OpenListResourceBundle_SubstituteLoadLookup { - - @Alias private volatile Map lookup; - - @Substitute - private void loadLookup() { - LocalizationSupport support = ImageSingletons.lookup(LocalizationSupport.class); - Map content = support.getBundleContentOf(this); - // use the supplied map implementation specified by the factory method - Map tmp = createMap(content.size()); - tmp.putAll(content); - synchronized (this) { - if (lookup == null) { - lookup = content; - } - } - } - - @Alias - protected native Map createMap(int size); -}