Skip to content

Commit

Permalink
Allow build to pass without exposed module jar files.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Dec 19, 2024
1 parent 0a40450 commit 071af3c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.io.Closeable;
import java.io.File;
import java.io.FileOutputStream;
import java.util.logging.Logger;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;
Expand Down Expand Up @@ -71,7 +72,13 @@ public void testZipFileClosable() throws Exception {
@Test
@JavaVersionRule.Enforce(9)
public void testBootJar() throws Exception {
ClassFileLocator classFileLocator = ClassFileLocator.ForModuleFile.ofBootPath();
ClassFileLocator classFileLocator;
try {
classFileLocator = ClassFileLocator.ForModuleFile.ofBootPath();
} catch (IllegalStateException exception) {
Logger.getLogger("net.bytebuddy").info("Module boot path not available as jmod files");
return;
}
try {
assertThat(classFileLocator.locate(Object.class.getName()).isResolved(), is(true));
} finally {
Expand Down

0 comments on commit 071af3c

Please sign in to comment.