This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pdfbox-jbig2.git
The following commit(s) were added to refs/heads/master by this push:
new 0a1f3d0 PDFBOX-6151: skip tests if file isn't available (e.g. when
doing "mvn clean")
0a1f3d0 is described below
commit 0a1f3d0eb5b896dc5b02c1f0710a85efbdc19518
Author: Tilman Hausherr <[email protected]>
AuthorDate: Thu May 14 14:48:44 2026 +0200
PDFBOX-6151: skip tests if file isn't available (e.g. when doing "mvn
clean")
---
src/test/java/org/apache/pdfbox/jbig2/SerenityTests.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/pdfbox/jbig2/SerenityTests.java
b/src/test/java/org/apache/pdfbox/jbig2/SerenityTests.java
index 28da5d2..4db5090 100644
--- a/src/test/java/org/apache/pdfbox/jbig2/SerenityTests.java
+++ b/src/test/java/org/apache/pdfbox/jbig2/SerenityTests.java
@@ -27,6 +27,7 @@ import javax.imageio.stream.ImageInputStream;
import org.apache.pdfbox.jbig2.err.JBIG2Exception;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assume.assumeTrue;
import org.junit.Test;
/**
@@ -42,7 +43,9 @@ public class SerenityTests
String targetDir = "target/output";
new File(targetDir).mkdirs();
File inputDir = new File("target/images");
- InputStream is = new FileInputStream(new
File(inputDir,"bitmap.jbig2"));
+ File expectedBitmapFile = new File(inputDir, "bitmap.jbig2");
+ assumeTrue(expectedBitmapFile.exists());
+ InputStream is = new FileInputStream(expectedBitmapFile);
ImageInputStream imageIIS = ImageIO.createImageInputStream(is);
JBIG2Document doc = new JBIG2Document(imageIIS);
JBIG2Page page = doc.getPage(1);