fix build issue with recent JDK version

Signed-off-by: herengui <herengui@uniontech.com>
(cherry picked from commit a23f4554e1596ab4edaa792c718829ad2d722ac8)
This commit is contained in:
herengui 2022-08-08 15:10:31 +08:00 committed by openeuler-sync-bot
parent 0992a131f9
commit e21bace427
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,34 @@
From 9eae518a7e1e6984683f8c859ee866ddf9ddb758 Mon Sep 17 00:00:00 2001
From: Piotrek Zygielo <piotr.zygielo@gmail.com>
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

View File

@ -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" "<module>$mod</module>"
@ -416,6 +418,9 @@ done
%license LICENSE.md NOTICE.md
%changelog
* Mon Aug 08 2022 herengui <herengui@uniontech.com> - 2.5.0-3
- fix: build issue with jdk8u342(JDK-8132256)
* Tue Mar 23 2021 chengzihan <chengzihan2@huawei.com> - 2.5.0-2
- Remove a broken test to fix the build.