Accepting request 696968 from Java:packages
- Added patch: * javassist-java8-compat.patch - Allow building on systems that do not have java 9 or higher OBS-URL: https://build.opensuse.org/request/show/696968 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/javassist?expand=0&rev=15
This commit is contained in:
commit
6905b3aa1d
52
javassist-java8-compat.patch
Normal file
52
javassist-java8-compat.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
diff -urEbwB javassist-rel_3_23_1_ga/src/main/javassist/Loader.java javassist-rel_3_23_1_ga.new/src/main/javassist/Loader.java
|
||||||
|
--- javassist-rel_3_23_1_ga/src/main/javassist/Loader.java 2018-07-01 19:27:13.000000000 +0200
|
||||||
|
+++ javassist-rel_3_23_1_ga.new/src/main/javassist/Loader.java 2019-04-15 10:53:53.377698340 +0200
|
||||||
|
@@ -379,9 +379,6 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isDefinedPackage(String name) {
|
||||||
|
- if (ClassFile.MAJOR_VERSION >= ClassFile.JAVA_9)
|
||||||
|
- return getDefinedPackage(name) == null;
|
||||||
|
- else
|
||||||
|
return getPackage(name) == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff -urEbwB javassist-rel_3_23_1_ga/src/main/javassist/util/proxy/DefineClassHelper.java javassist-rel_3_23_1_ga.new/src/main/javassist/util/proxy/DefineClassHelper.java
|
||||||
|
--- javassist-rel_3_23_1_ga/src/main/javassist/util/proxy/DefineClassHelper.java 2018-07-01 19:27:13.000000000 +0200
|
||||||
|
+++ javassist-rel_3_23_1_ga.new/src/main/javassist/util/proxy/DefineClassHelper.java 2019-04-15 10:53:53.381698361 +0200
|
||||||
|
@@ -253,23 +253,5 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- /**
|
||||||
|
- * Loads a class file by {@code java.lang.invoke.MethodHandles.Lookup}.
|
||||||
|
- *
|
||||||
|
- * @since 3.22
|
||||||
|
- */
|
||||||
|
- static Class<?> toPublicClass(String className, byte[] bcode)
|
||||||
|
- throws CannotCompileException
|
||||||
|
- {
|
||||||
|
- try {
|
||||||
|
- Lookup lookup = MethodHandles.lookup();
|
||||||
|
- lookup = lookup.dropLookupMode(java.lang.invoke.MethodHandles.Lookup.PRIVATE);
|
||||||
|
- return lookup.defineClass(bcode);
|
||||||
|
- }
|
||||||
|
- catch (Throwable t) {
|
||||||
|
- throw new CannotCompileException(t);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
private DefineClassHelper() {}
|
||||||
|
}
|
||||||
|
diff -urEbwB javassist-rel_3_23_1_ga/src/main/javassist/util/proxy/FactoryHelper.java javassist-rel_3_23_1_ga.new/src/main/javassist/util/proxy/FactoryHelper.java
|
||||||
|
--- javassist-rel_3_23_1_ga/src/main/javassist/util/proxy/FactoryHelper.java 2018-07-01 19:27:13.000000000 +0200
|
||||||
|
+++ javassist-rel_3_23_1_ga.new/src/main/javassist/util/proxy/FactoryHelper.java 2019-04-15 10:56:19.942478868 +0200
|
||||||
|
@@ -123,8 +123,6 @@
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
byte[] b = toBytecode(cf);
|
||||||
|
- if (ProxyFactory.onlyPublicMethods)
|
||||||
|
- return DefineClassHelper.toPublicClass(cf.getName(), b);
|
||||||
|
return DefineClassHelper.toClass(cf.getName(), loader, domain, b);
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 15 08:57:00 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* javassist-java8-compat.patch
|
||||||
|
- Allow building on systems that do not have java 9 or higher
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 18 11:32:34 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
Thu Oct 18 11:32:34 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
#
|
#
|
||||||
# spec file for package javassist
|
# spec file for package javassist
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
# Copyright (c) 2000-2005, JPackage Project
|
# Copyright (c) 2000-2005, JPackage Project
|
||||||
# All rights reserved.
|
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -19,21 +18,19 @@
|
|||||||
|
|
||||||
|
|
||||||
%define tar_version rel_3_23_1_ga
|
%define tar_version rel_3_23_1_ga
|
||||||
Summary: Java Programming Assistant: bytecode manipulation
|
|
||||||
License: LGPL-2.1-or-later OR MPL-1.1
|
|
||||||
Group: Development/Libraries/Java
|
|
||||||
Name: javassist
|
Name: javassist
|
||||||
Version: 3.23.1
|
Version: 3.23.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: https://www.javassist.org/
|
Summary: Java Programming Assistant: bytecode manipulation
|
||||||
|
License: LGPL-2.1-or-later OR MPL-1.1
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
URL: https://www.javassist.org/
|
||||||
Source0: https://github.com/jboss-javassist/javassist/archive/%{tar_version}.tar.gz
|
Source0: https://github.com/jboss-javassist/javassist/archive/%{tar_version}.tar.gz
|
||||||
|
Patch0: javassist-java8-compat.patch
|
||||||
BuildRequires: ant >= 1.6
|
BuildRequires: ant >= 1.6
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: java-devel >= 9
|
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
BuildRequires: javapackages-tools
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Javassist (Java Programming Assistant) makes Java bytecode manipulation
|
Javassist (Java Programming Assistant) makes Java bytecode manipulation
|
||||||
@ -78,6 +75,9 @@ Tutorial for javassist.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{tar_version}
|
%setup -q -n %{name}-%{tar_version}
|
||||||
|
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 9}%{!?pkg_vcmp:1}
|
||||||
|
%patch0 -p1
|
||||||
|
%endif
|
||||||
for j in $(find . -name "*.jar"); do
|
for j in $(find . -name "*.jar"); do
|
||||||
mv $j $j.no
|
mv $j $j.no
|
||||||
done
|
done
|
||||||
@ -115,7 +115,7 @@ cp -p License.html %{buildroot}/%{_docdir}/%{name}-%{version}
|
|||||||
%files
|
%files
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%dir %{_docdir}/%{name}-%{version}
|
%dir %{_docdir}/%{name}-%{version}
|
||||||
%doc %{_docdir}/%{name}-%{version}/License.html
|
%license %{_docdir}/%{name}-%{version}/License.html
|
||||||
%{_javadir}/*.jar
|
%{_javadir}/*.jar
|
||||||
%{_mavenpomdir}/*
|
%{_mavenpomdir}/*
|
||||||
%if %{defined _maven_repository}
|
%if %{defined _maven_repository}
|
||||||
|
Loading…
Reference in New Issue
Block a user