Skip to content

Commit

Permalink
Class "java.io.Bits" is not in Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 14, 2023
1 parent 9b1477c commit 76383a6
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 76383a6

Please sign in to comment.