From: Mehdi Houshmand Date: Mon, 3 Sep 2012 08:38:26 +0000 (+0000) Subject: Amended a couple javadocs and some trivial clean up X-Git-Tag: fop-2_0~299 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b3f537310f769816c8ced4f29485cff3ee2064f1;p=xmlgraphics-fop.git Amended a couple javadocs and some trivial clean up git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1380169 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/events/CompositeEventListener.java b/src/java/org/apache/fop/events/CompositeEventListener.java index 2b5cbffb2..d1f207c79 100644 --- a/src/java/org/apache/fop/events/CompositeEventListener.java +++ b/src/java/org/apache/fop/events/CompositeEventListener.java @@ -19,6 +19,7 @@ package org.apache.fop.events; +import java.util.ArrayList; import java.util.List; /** @@ -26,7 +27,7 @@ import java.util.List; */ public class CompositeEventListener implements EventListener { - private List listeners = new java.util.ArrayList(); + private List listeners = new ArrayList(); /** * Adds an event listener to the broadcaster. It is appended to the list of previously @@ -46,22 +47,17 @@ public class CompositeEventListener implements EventListener { this.listeners.remove(listener); } - private synchronized int getListenerCount() { - return this.listeners.size(); - } - /** * Indicates whether any listeners have been registered with the broadcaster. * @return true if listeners are present, false otherwise */ public boolean hasEventListeners() { - return (getListenerCount() > 0); + return !listeners.isEmpty(); } - /** {@inheritDoc} */ + /** {@inheritDoc } */ public synchronized void processEvent(Event event) { - for (int i = 0, c = getListenerCount(); i < c; i++) { - EventListener listener = (EventListener)this.listeners.get(i); + for (EventListener listener : listeners) { listener.processEvent(event); } } diff --git a/src/java/org/apache/fop/pdf/PDFEncoding.java b/src/java/org/apache/fop/pdf/PDFEncoding.java index 25e791e0d..64fd6f866 100644 --- a/src/java/org/apache/fop/pdf/PDFEncoding.java +++ b/src/java/org/apache/fop/pdf/PDFEncoding.java @@ -153,8 +153,8 @@ public class PDFEncoding extends PDFDictionary { /** * Creates an array containing the differences between two single-byte. * font encodings. - * @param encoding_A The first single-byte encoding - * @param encoding_B The second single-byte encoding + * @param encodingA The first single-byte encoding + * @param encodingB The second single-byte encoding * @return The PDFArray of differences between encodings */ public PDFArray buildDifferencesArray(SingleByteEncoding encodingA,