diff options
Diffstat (limited to 'src/java/org/apache/fop/fonts/FontAdder.java')
-rw-r--r-- | src/java/org/apache/fop/fonts/FontAdder.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/fonts/FontAdder.java b/src/java/org/apache/fop/fonts/FontAdder.java index 884a874a8..c5e2b8b9f 100644 --- a/src/java/org/apache/fop/fonts/FontAdder.java +++ b/src/java/org/apache/fop/fonts/FontAdder.java @@ -20,7 +20,6 @@ package org.apache.fop.fonts; import java.net.URL; -import java.util.Iterator; import java.util.List; import org.apache.fop.fonts.autodetect.FontInfoFinder; @@ -29,9 +28,9 @@ import org.apache.fop.fonts.autodetect.FontInfoFinder; * Adds a list of fonts to a given font info list */ public class FontAdder { - private FontEventListener listener; - private FontResolver resolver; - private FontManager manager; + private final FontEventListener listener; + private final FontResolver resolver; + private final FontManager manager; /** * Main constructor @@ -50,14 +49,13 @@ public class FontAdder { * @param fontURLList font file list * @param fontInfoList a configured font info list */ - public void add(List/*<URL>*/ fontURLList, List/*<EmbedFontInfo>*/ fontInfoList) { + public void add(List<URL> fontURLList, List<EmbedFontInfo> fontInfoList) { FontCache cache = manager.getFontCache(); FontInfoFinder finder = new FontInfoFinder(); finder.setEventListener(listener); - for (Iterator iter = fontURLList.iterator(); iter.hasNext();) { - URL fontUrl = (URL)iter.next(); - EmbedFontInfo[] embedFontInfos = finder.find(fontUrl, resolver, cache); + for (URL fontURL : fontURLList) { + EmbedFontInfo[] embedFontInfos = finder.find(fontURL, resolver, cache); if (embedFontInfos == null) { continue; } |