You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by ss...@apache.org on 2026/08/06 09:20:49 UTC

(xmlgraphics-fop) branch main updated: FOP-3332: Checkstyle

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/xmlgraphics-fop.git


The following commit(s) were added to refs/heads/main by this push:
     new 39efab15e FOP-3332: Checkstyle
39efab15e is described below

commit 39efab15e633907a486a38b5883e2be43aee67cf
Author: Simon Steiner <ss...@apache.org>
AuthorDate: Thu Aug 6 10:20:35 2026 +0100

    FOP-3332: Checkstyle
---
 fop-core/src/main/java/org/apache/fop/hyphenation/Hyphenator.java | 3 ++-
 fop-core/src/test/java/org/apache/fop/HyphenationTestCase.java    | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/fop-core/src/main/java/org/apache/fop/hyphenation/Hyphenator.java b/fop-core/src/main/java/org/apache/fop/hyphenation/Hyphenator.java
index c4901929e..ecfe9e763 100644
--- a/fop-core/src/main/java/org/apache/fop/hyphenation/Hyphenator.java
+++ b/fop-core/src/main/java/org/apache/fop/hyphenation/Hyphenator.java
@@ -143,7 +143,8 @@ public final class Hyphenator {
             ObjectInputStream ois = new ObjectInputStream(in) {
                 protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
                     String className = desc.getName();
-                    if (!className.startsWith("org.apache.fop.hyphenation.") && !className.startsWith("[") && !className.startsWith("java.")) {
+                    if (!className.startsWith("org.apache.fop.hyphenation.") && !className.startsWith("[")
+                            && !className.startsWith("java.")) {
                         throw new SecurityException("Unauthorized deserialization attempt: " + className);
                     }
                     return super.resolveClass(desc);
diff --git a/fop-core/src/test/java/org/apache/fop/HyphenationTestCase.java b/fop-core/src/test/java/org/apache/fop/HyphenationTestCase.java
index 33f5f5819..9009d8b3a 100644
--- a/fop-core/src/test/java/org/apache/fop/HyphenationTestCase.java
+++ b/fop-core/src/test/java/org/apache/fop/HyphenationTestCase.java
@@ -125,11 +125,13 @@ public class HyphenationTestCase {
         ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(hyp));
         out.writeObject(new Untrusted());
         out.close();
-        SecurityException ex = Assert.assertThrows(SecurityException.class, () -> Hyphenator.hyphenate("fr.hyp" + Hyphenator.HYPTYPE, null, resourceResolver, null,
+        SecurityException ex = Assert.assertThrows(SecurityException.class, () ->
+                Hyphenator.hyphenate("fr.hyp" + Hyphenator.HYPTYPE, null, resourceResolver, null,
                 "oello", 0, 0, fopFactory.newFOUserAgent()));
         hyp.delete();
         f.delete();
-        assertEquals("Unauthorized deserialization attempt: org.apache.fop.HyphenationTestCase$Untrusted", ex.getMessage());
+        assertEquals("Unauthorized deserialization attempt: org.apache.fop.HyphenationTestCase$Untrusted",
+                ex.getMessage());
     }
 
     static class Untrusted implements Serializable {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org