You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2026/06/14 13:56:43 UTC
svn commit: r1935297 - pdfbox/branches/3.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font
Author: tilman
Date: Sun Jun 14 13:56:43 2026
New Revision: 1935297
Log:
PDFBOX-5660: Sonar fix
Modified:
pdfbox/branches/3.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java
Modified: pdfbox/branches/3.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java
==============================================================================
--- pdfbox/branches/3.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java Sun Jun 14 13:40:52 2026 (r1935296)
+++ pdfbox/branches/3.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java Sun Jun 14 13:56:43 2026 (r1935297)
@@ -50,6 +50,7 @@ import static org.junit.jupiter.api.Asse
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import org.junit.jupiter.api.BeforeAll;
@@ -826,16 +827,10 @@ this.getClass().getResourceAsStream("/or
contents.beginText();
contents.setFont(font, 64);
contents.newLineAtOffset(100, 700);
- contents.showText(message);
+ Exception ex = assertThrows(IllegalStateException.class, () -> contents.showText(message));
+ assertEquals("could not find the glyphId for the character: あ, codePoint: 12354 (0x3042)", ex.getMessage());
contents.endText();
}
- catch (IllegalStateException e)
- {
- assertEquals("could not find the glyphId for the character: あ, codePoint: 12354 (0x3042)", e.getMessage());
- return;
- }
-
- fail();
}
}