This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git

commit 76383a6f351d5492cb1b25d3ee74c421399e8588
Author: Gary David Gregory (Code signing key) <ggreg...@apache.org>
AuthorDate: Sat Oct 14 10:59:46 2023 -0400

    Class "java.io.Bits" is not in Java 21
---
 src/test/java/org/apache/bcel/generic/EmptyVisitorTestCase.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/test/java/org/apache/bcel/generic/EmptyVisitorTestCase.java 
b/src/test/java/org/apache/bcel/generic/EmptyVisitorTestCase.java
index 36ffcd5d..5159328f 100644
--- a/src/test/java/org/apache/bcel/generic/EmptyVisitorTestCase.java
+++ b/src/test/java/org/apache/bcel/generic/EmptyVisitorTestCase.java
@@ -17,11 +17,14 @@
 package org.apache.bcel.generic;
 
 import static org.junit.jupiter.api.Assertions.fail;
+import static org.junit.jupiter.api.Assumptions.assumeFalse;
 
 import org.apache.bcel.classfile.Code;
 import org.apache.bcel.classfile.JavaClass;
 import org.apache.bcel.classfile.Method;
 import org.apache.bcel.util.SyntheticRepository;
+import org.apache.commons.lang3.JavaVersion;
+import org.apache.commons.lang3.SystemUtils;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 
@@ -56,6 +59,8 @@ class EmptyVisitorTestCase {
     // @formatter:on
     })
     public void test(final String className) throws ClassNotFoundException {
+        // "java.io.Bits" is not in Java 21.
+        assumeFalse(SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_21) && 
className.equals("java.io.Bits"));
         final JavaClass javaClass = 
SyntheticRepository.getInstance().loadClass(className);
         for (final Method method : javaClass.getMethods()) {
             final Code code = method.getCode();

Reply via email to