From 2524b46b8ca36e3e71b09261b90f6a134cf69123 Mon Sep 17 00:00:00 2001 From: herengui Date: Mon, 8 Aug 2022 15:10:31 +0800 Subject: [PATCH] fix build issue with recent JDK version Signed-off-by: herengui (cherry picked from commit a23f4554e1596ab4edaa792c718829ad2d722ac8) --- ...grate-away-from-c.s.internal-package.patch | 34 +++++++++++++++++++ glassfish-hk2.spec | 7 +++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 0003-Migrate-away-from-c.s.internal-package.patch diff --git a/0003-Migrate-away-from-c.s.internal-package.patch b/0003-Migrate-away-from-c.s.internal-package.patch new file mode 100644 index 0000000..69d0977 --- /dev/null +++ b/0003-Migrate-away-from-c.s.internal-package.patch @@ -0,0 +1,34 @@ +From 9eae518a7e1e6984683f8c859ee866ddf9ddb758 Mon Sep 17 00:00:00 2001 +From: Piotrek Zygielo +Date: Fri, 1 Apr 2022 22:04:36 +0200 +Subject: [PATCH 21/36] Migrate away from c.s..internal package + +https://bugs.openjdk.java.net/browse/JDK-8132256 +JDK8u342: https://bugs.openjdk.java.net/browse/JDK-8283529 +--- + .../tools/verifier/apiscan/classfile/BCELClassFileLoader1.java | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dependency-verifier/src/main/java/com/sun/enterprise/tools/verifier/apiscan/classfile/BCELClassFileLoader1.java b/dependency-verifier/src/main/java/com/sun/enterprise/tools/verifier/apiscan/classfile/BCELClassFileLoader1.java +index 7ada612..30b2b29 100755 +--- a/dependency-verifier/src/main/java/com/sun/enterprise/tools/verifier/apiscan/classfile/BCELClassFileLoader1.java ++++ b/dependency-verifier/src/main/java/com/sun/enterprise/tools/verifier/apiscan/classfile/BCELClassFileLoader1.java +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2022 Contributors to Eclipse Foundation. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at +@@ -20,7 +21,7 @@ import java.io.IOException; + import java.io.InputStream; + import java.util.logging.Logger; + +-import com.sun.org.apache.bcel.internal.util.ClassPath; ++import org.apache.bcel.util.ClassPath; + + /** + * Yet another factory for {@link BCELClassFile}. This is not a public class, as +-- +2.20.1 + diff --git a/glassfish-hk2.spec b/glassfish-hk2.spec index c975625..19cac40 100644 --- a/glassfish-hk2.spec +++ b/glassfish-hk2.spec @@ -2,7 +2,7 @@ %global extra_version 1.0.3 Name: glassfish-hk2 Version: 2.5.0 -Release: 2 +Release: 3 Summary: Glassfish Hundred Kilobytes Kernel License: EPL-2.0 or GPLv2 with exceptions URL: https://github.com/eclipse-ee4j/glassfish-hk2/ @@ -11,6 +11,7 @@ Source1: https://github.com/eclipse-ee4j/glassfish-hk2-extra/archive Source2: hk2-inhabitant-generator-osgi.bundle Patch0: 0001-OSGi-metadata-fixes.patch Patch1: 0002-Fixed-tests.patch +Patch2: 0003-Migrate-away-from-c.s.internal-package.patch BuildRequires: maven-local mvn(aopalliance:aopalliance) BuildRequires: mvn(javax.annotation:javax.annotation-api) mvn(javax.enterprise:cdi-api) BuildRequires: mvn(javax.inject:javax.inject) mvn(junit:junit) mvn(org.apache.ant:ant) @@ -169,6 +170,7 @@ This package contains API documentation for %{name}. tar xf %{SOURCE1} --strip-components=1 \ %{name}-extra-%{extra_version}-RELEASE/osgi-resource-locator \ %{name}-extra-%{extra_version}-RELEASE/dependency-{verifier,visualizer} +%patch2 -p1 %pom_xpath_set "pom:dependency[pom:groupId ='org.glassfish.hk2']/pom:version" %{version} dependency-verifier for mod in osgi-resource-locator dependency-verifier dependency-visualizer ; do %pom_xpath_inject "pom:modules" "$mod" @@ -416,6 +418,9 @@ done %license LICENSE.md NOTICE.md %changelog +* Mon Aug 08 2022 herengui - 2.5.0-3 +- fix: build issue with jdk8u342(JDK-8132256) + * Tue Mar 23 2021 chengzihan - 2.5.0-2 - Remove a broken test to fix the build. -- Gitee