import jdeparser-2.0.3-12.el9

This commit is contained in:
CentOS Sources 2022-05-17 05:33:10 -04:00 committed by Stepan Oksanichenko
commit 10247ac25d
4 changed files with 149 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/jdeparser-2.0.3.Final.tar.gz

1
.jdeparser.metadata Normal file
View File

@ -0,0 +1 @@
67a4608c75355338b3ba55594411077b8529ebea SOURCES/jdeparser-2.0.3.Final.tar.gz

View File

@ -0,0 +1,33 @@
From d839be75837da2bc51712af5ae123657c67de30d Mon Sep 17 00:00:00 2001
From: Chris Kelley <ckelley@redhat.com>
Date: Mon, 16 Aug 2021 21:22:27 +0100
Subject: [PATCH] Fix build error depending on class removed in Java 11
---
src/main/java/org/jboss/jdeparser/Assertions.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/main/java/org/jboss/jdeparser/Assertions.java b/src/main/java/org/jboss/jdeparser/Assertions.java
index 017c645..a931b88 100644
--- a/src/main/java/org/jboss/jdeparser/Assertions.java
+++ b/src/main/java/org/jboss/jdeparser/Assertions.java
@@ -18,15 +18,13 @@
package org.jboss.jdeparser;
-import sun.reflect.Reflection;
-
/**
* @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a>
*/
class Assertions {
static boolean callerIs(Class<?> clazz) {
try {
- return Reflection.getCallerClass(3) == clazz;
+ return StackWalker.getInstance().getCallerClass() == clazz;
} catch (Throwable ignored) {}
// dunno
return true;
--
2.31.1

114
SPECS/jdeparser.spec Normal file
View File

@ -0,0 +1,114 @@
%global namedreltag .Final
%global namedversion %{version}%{?namedreltag}
Name: jdeparser
Version: 2.0.3
Release: 12%{?dist}
Summary: Source generator library for Java
License: ASL 2.0
URL: https://github.com/jdeparser/jdeparser2
# old repos https://github.com/jdeparser/jdeparser
Source0: %{url}/archive/%{namedversion}/%{name}-%{namedversion}.tar.gz
Patch: 0001-Fix-build-error-depending-on-class-removed-in-Java-1.patch
BuildArch: noarch
BuildRequires: java-1.8.0-openjdk-devel
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.jboss:jboss-parent:pom:)
%description
This project is a fork of Sun's (now Oracle's) com.sun.codemodel project. We
decided to fork the project because by all evidence, the upstream project is
dead and not actively accepting outside contribution. All JBoss projects are
urged to use this project instead for source code generation.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n jdeparser2-%{namedversion}
%patch -p1
%build
# Use Java 8 as sun.reflect.Reflection is removed in Java 11.
export JAVA_HOME=%{_jvmdir}/java-1.8.0
%mvn_build
%install
%mvn_install
%files -f .mfiles
%license LICENSE.txt
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%changelog
* Tue Aug 17 2021 Red Hat PKI Team <rhcs-maint@redhat.com> 2.0.3-9
- Bug 1981014 - jdeparser: FTBFS due to access to internal class sun.reflect.Reflection
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.0.3-8
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.0.3-7
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Markku Korkeala <markku.korkeala@iki.fi> - 2.0.3-5
- Force Java 8 as sun.reflect.Reflection is removed in Java 11.
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 2.0.3-3
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Oct 08 2019 Dogtag PKI Team <pki-devel@redhat.com> - 2.0.3-1
- Rebuild as part of revival process
- BZ#1758686
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri May 27 2016 gil cattaneo <puntogil@libero.it> 2.0.0-1
- update to 2.0.0.Final
- introduce license macro
- fix some rpmlint problem
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed May 29 2013 Marek Goldmann <mgoldman@redhat.com> - 1.0.0-1
- Initial packaging