diff --git a/0001-Drop-Assertions.callerIs.patch b/0001-Drop-Assertions.callerIs.patch new file mode 100644 index 0000000..fcaa540 --- /dev/null +++ b/0001-Drop-Assertions.callerIs.patch @@ -0,0 +1,36 @@ +From a723b73f85f586e855514cce078de3f153c9e201 Mon Sep 17 00:00:00 2001 +From: "Endi S. Dewata" +Date: Fri, 4 Jun 2021 15:59:34 -0500 +Subject: [PATCH] Drop Assertions.callerIs() + +--- + src/main/java/org/jboss/jdeparser/Assertions.java | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/src/main/java/org/jboss/jdeparser/Assertions.java b/src/main/java/org/jboss/jdeparser/Assertions.java +index 017c645..a8c0129 100644 +--- a/src/main/java/org/jboss/jdeparser/Assertions.java ++++ b/src/main/java/org/jboss/jdeparser/Assertions.java +@@ -18,19 +18,10 @@ + + package org.jboss.jdeparser; + +-import sun.reflect.Reflection; +- + /** + * @author David M. Lloyd + */ + class Assertions { +- static boolean callerIs(Class clazz) { +- try { +- return Reflection.getCallerClass(3) == clazz; +- } catch (Throwable ignored) {} +- // dunno +- return true; +- } + + @SuppressWarnings("ConstantConditions") + static boolean alwaysTrue(boolean expr) { +-- +2.31.1 + diff --git a/jdeparser.spec b/jdeparser.spec index f7f1975..b36bcf1 100644 --- a/jdeparser.spec +++ b/jdeparser.spec @@ -3,15 +3,16 @@ Name: jdeparser Version: 2.0.3 -Release: 6%{?dist} +Release: 7%{?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 +Patch1: 0001-Drop-Assertions.callerIs.patch + BuildArch: noarch -BuildRequires: java-1.8.0-openjdk-devel BuildRequires: maven-local BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.jboss:jboss-parent:pom:) @@ -29,11 +30,9 @@ Summary: Javadoc for %{name} This package contains the API documentation for %{name}. %prep -%setup -q -n jdeparser2-%{namedversion} +%autosetup -n jdeparser2-%{namedversion} -p 1 %build -# Use Java 8 as sun.reflect.Reflection is removed in Java 11. -export JAVA_HOME=%{_jvmdir}/java-1.8.0 %mvn_build %install @@ -46,6 +45,9 @@ export JAVA_HOME=%{_jvmdir}/java-1.8.0 %license LICENSE.txt %changelog +* Fri Jun 04 2021 Dogtag PKI Team - 2.0.3-7 +- Drop Assertions.callerIs() + * Tue Jan 26 2021 Fedora Release Engineering - 2.0.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild