commit:     d54439ca05bd3920b15bff3d2bab8c7934ad229f
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Sun Aug 24 08:25:16 2025 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Thu Sep 25 11:09:58 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d54439ca

dev-java/javassist: skip testDeprecatedAttribute from BytecodeTest

also restricts to max jdk:25 because of still using Applet

Closes: https://bugs.gentoo.org/946905
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Part-of: https://github.com/gentoo/gentoo/pull/43545
Closes: https://github.com/gentoo/gentoo/pull/43545
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 ...ssist-3.30.2-skip_testDeprecatedAttribute.patch | 24 ++++++++++++++++++++++
 ...st-3.30.2.ebuild => javassist-3.30.2-r1.ebuild} | 13 +++++++++---
 2 files changed, 34 insertions(+), 3 deletions(-)

diff --git 
a/dev-java/javassist/files/javassist-3.30.2-skip_testDeprecatedAttribute.patch 
b/dev-java/javassist/files/javassist-3.30.2-skip_testDeprecatedAttribute.patch
new file mode 100644
index 000000000000..a32c07c34df9
--- /dev/null
+++ 
b/dev-java/javassist/files/javassist-3.30.2-skip_testDeprecatedAttribute.patch
@@ -0,0 +1,24 @@
+There was 1 failure:
+1) testDeprecatedAttribute(javassist.bytecode.BytecodeTest)
+javassist.NotFoundException: suspend(..) is not found in java.lang.Thread
+       at javassist.CtClassType.getDeclaredMethod(CtClassType.java:1356)
+       at 
javassist.bytecode.BytecodeTest.testDeprecatedAttribute(BytecodeTest.java:315)
+
+FAILURES!!!
+Tests run: 434,  Failures: 1
+
+The failure occurs with jdk:25 and higher due to method 'suspend'
+being removed (https://bugs.openjdk.org/browse/JDK-8359053).
+The removal of 'suspend' only affects the test, so we skip the test.
+
+--- a/src/test/javassist/bytecode/BytecodeTest.java
++++ b/src/test/javassist/bytecode/BytecodeTest.java
+@@ -310,7 +310,7 @@ public class BytecodeTest extends TestCase {
+         assertEquals(0, invoke(obj, "test"));
+     }
+ 
+-    public void testDeprecatedAttribute() throws Exception {
++    public void noTestDeprecatedAttribute() throws Exception {
+         CtClass cc = loader.get("java.lang.Thread");
+         CtMethod m = cc.getDeclaredMethod("suspend");
+         MethodInfo minfo = m.getMethodInfo();

diff --git a/dev-java/javassist/javassist-3.30.2.ebuild 
b/dev-java/javassist/javassist-3.30.2-r1.ebuild
similarity index 69%
rename from dev-java/javassist/javassist-3.30.2.ebuild
rename to dev-java/javassist/javassist-3.30.2-r1.ebuild
index c18f7a90bca9..1c6b68352db9 100644
--- a/dev-java/javassist/javassist-3.30.2.ebuild
+++ b/dev-java/javassist/javassist-3.30.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -18,8 +18,12 @@ LICENSE="Apache-2.0 LGPL-2.1 MPL-1.1"
 SLOT="3"
 KEYWORDS="amd64 arm64 ppc64 ~amd64-linux ~x86-linux"
 
+# src/main/javassist/tools/rmi/ObjectImporter.java:99: error: package 
java.applet does not exist
+#     public ObjectImporter(@SuppressWarnings("deprecation") 
java.applet.Applet applet) {
+#                                                                       ^
+# See https://bugs.openjdk.org/browse/JDK-8359053 - so we exclude jdk:26
 DEPEND="
-       >=virtual/jdk-11:*
+       || ( virtual/jdk:25 virtual/jdk:21 virtual/jdk:17 virtual/jdk:11 )
        test? ( dev-java/hamcrest-library:1.3 )
 "
 
@@ -28,7 +32,10 @@ RDEPEND=">=virtual/jre-1.8:*"
 DOCS=( Changes.md README.md )
 HTML_DOCS=( tutorial/{brown.css,tutorial.html,tutorial2.html,tutorial3.html} )
 
-PATCHES=( "${FILESDIR}/javassist-3.29.2-gentoo.patch" )
+PATCHES=(
+       "${FILESDIR}/javassist-3.29.2-gentoo.patch"
+       "${FILESDIR}/javassist-3.30.2-skip_testDeprecatedAttribute.patch"
+)
 
 JAVA_AUTOMATIC_MODULE_NAME="org.javassist"
 JAVA_MAIN_CLASS="javassist.CtClass"

Reply via email to