From a6e8eea8153df672e94a9e4e7d2398b45a29b0bc Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Sat, 2 Oct 2010 18:30:00 +0000 Subject: [PATCH] Fixing a few checkstyle warnings git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1003850 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/apps/FopFactoryConfigurator.java | 12 +++++++----- src/java/org/apache/fop/hyphenation/Hyphenator.java | 5 ++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/java/org/apache/fop/apps/FopFactoryConfigurator.java b/src/java/org/apache/fop/apps/FopFactoryConfigurator.java index 3ccd8c518..ad0869ea1 100644 --- a/src/java/org/apache/fop/apps/FopFactoryConfigurator.java +++ b/src/java/org/apache/fop/apps/FopFactoryConfigurator.java @@ -92,7 +92,7 @@ public class FopFactoryConfigurator { * @param factory fop factory * @throws FOPException fop exception */ - public void configure(FopFactory factory) throws FOPException { + public void configure(FopFactory factory) throws FOPException { // CSOK: MethodLength // strict configuration if (cfg.getChild("strict-configuration", false) != null) { try { @@ -105,7 +105,7 @@ public class FopFactoryConfigurator { boolean strict = factory.validateUserConfigStrictly(); if (log.isDebugEnabled()) { log.debug("Initializing FopFactory Configuration" - + "with " + (strict?"strict":"permissive") + " validation"); + + "with " + (strict ? "strict" : "permissive") + " validation"); } if (cfg.getChild("accessibility", false) != null) { @@ -163,7 +163,8 @@ public class FopFactoryConfigurator { + " element must exist (" + location + ")", error); } else if (!lang.matches("[a-zA-Z]{2}")) { addError("The lang attribute of a hyphenation-pattern configuration" - + " element must consist of exactly two letters (" + location + ")", error); + + " element must consist of exactly two letters (" + + location + ")", error); } lang = lang.toLowerCase(); @@ -174,7 +175,8 @@ public class FopFactoryConfigurator { if (country != null) { if (!country.matches("[a-zA-Z]{2}")) { addError("The country attribute of a hyphenation-pattern configuration" - + " element must consist of exactly two letters (" + location + ")", error); + + " element must consist of exactly two letters (" + + location + ")", error); } country = country.toUpperCase(); } @@ -195,7 +197,7 @@ public class FopFactoryConfigurator { if (log.isDebugEnabled()) { log.debug("Using hyphenation pattern filename " + filename + " for lang=\"" + lang + "\"" - + (country != null?", country=\"" + country + "\"":"")); + + (country != null ? ", country=\"" + country + "\"" : "")); } } factory.setHyphPatNames(hyphPatNames); diff --git a/src/java/org/apache/fop/hyphenation/Hyphenator.java b/src/java/org/apache/fop/hyphenation/Hyphenator.java index 7dab56c98..a556fd7fe 100644 --- a/src/java/org/apache/fop/hyphenation/Hyphenator.java +++ b/src/java/org/apache/fop/hyphenation/Hyphenator.java @@ -40,7 +40,7 @@ import org.xml.sax.InputSource; * * @author Carlos Villegas */ -public class Hyphenator { +public final class Hyphenator { /** logging instance */ protected static Log log = LogFactory.getLog(Hyphenator.class); @@ -81,6 +81,7 @@ public class Hyphenator { * @param lang the language * @param country the country (may be null or "none") * @param resolver resolver to find the hyphenation files + * @param hyphPatNames the map with user-configured hyphenation pattern file names * @return the hyphenation tree */ public static HyphenationTree getHyphenationTree(String lang, @@ -328,6 +329,7 @@ public class Hyphenator { * @param lang the language * @param country the optional country code (may be null or "none") * @param resolver resolver to find the hyphenation files + * @param hyphPatNames the map with user-configured hyphenation pattern file names * @param word the word to hyphenate * @param leftMin the minimum number of characters before the hyphenation point * @param rightMin the minimum number of characters after the hyphenation point @@ -365,6 +367,7 @@ public class Hyphenator { * @param lang the language * @param country the optional country code (may be null or "none") * @param resolver resolver to find the hyphenation files + * @param hyphPatNames the map with user-configured hyphenation pattern file names * @param word the word to hyphenate * @param offset the offset of the first character in the "word" character array * @param len the length of the word -- 2.39.5