Skip to content

Commit

Permalink
#62 Support Java 21
Browse files Browse the repository at this point in the history
* run CI build on Java 21 also
* use ObjectInputStream for testing with all Java versions
* update Maven JAR Plugin to 3.3.0
  • Loading branch information
oliverlietz committed Sep 29, 2023
1 parent a85b197 commit 385bf21
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java-version: [ 8, 11, 17 ]
java-version: [ 8, 11, 17, 21 ]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
package org.ops4j.pax.tinybundles.test;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;

import aQute.bnd.build.Container;
import org.junit.Before;
Expand Down Expand Up @@ -81,21 +81,22 @@ public void findAnonymousClasses() throws IOException {

@Test
public void findAllEmbeddedClassesFromJreClass() throws IOException {
final Class<?> clazz = Pattern.class;
final Class<?> clazz = ObjectInputStream.class;
final Collection<ClassDescriptor> descriptors = finder.findAllEmbeddedClasses(clazz);
verify(descriptors, false,
"java/util/regex/Pattern$1.class",
"java/util/regex/Pattern$CharProperty.class",
"java/util/regex/Pattern$Dollar.class"
"java/io/ObjectInputStream$1.class",
"java/io/ObjectInputStream$ValidationList$1.class",
"java/io/ObjectInputStream$ValidationList$Callback.class",
"java/io/ObjectInputStream$ValidationList.class"
);
}

@Test
public void findAnonymousClassesFromJreClass() throws IOException {
final Class<?> clazz = Pattern.class;
final Class<?> clazz = ObjectInputStream.class;
final Collection<ClassDescriptor> descriptors = finder.findAnonymousClasses(clazz);
verify(descriptors, false,
"java/util/regex/Pattern$1.class"
"java/io/ObjectInputStream$1.class"
);
}

Expand Down

0 comments on commit 385bf21

Please sign in to comment.