Drop Assertions.callerIs()
This commit is contained in:
parent
e6fd371cd2
commit
6dc5cc2814
36
0001-Drop-Assertions.callerIs.patch
Normal file
36
0001-Drop-Assertions.callerIs.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From a723b73f85f586e855514cce078de3f153c9e201 Mon Sep 17 00:00:00 2001
|
||||
From: "Endi S. Dewata" <edewata@redhat.com>
|
||||
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 <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a>
|
||||
*/
|
||||
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
|
||||
|
||||
@ -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 <pki-devel@redhat.com> - 2.0.3-7
|
||||
- Drop Assertions.callerIs()
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user