diff options
author | Mehdi Houshmand <mehdi@apache.org> | 2012-09-03 08:38:26 +0000 |
---|---|---|
committer | Mehdi Houshmand <mehdi@apache.org> | 2012-09-03 08:38:26 +0000 |
commit | b3f537310f769816c8ced4f29485cff3ee2064f1 (patch) | |
tree | cb30a1a8a982b5abd676f8dbe7dc24ff4eff8c44 /src/java/org | |
parent | 008bf019ad96ab80f1b8b1897180e30dd3c56925 (diff) | |
download | xmlgraphics-fop-b3f537310f769816c8ced4f29485cff3ee2064f1.tar.gz xmlgraphics-fop-b3f537310f769816c8ced4f29485cff3ee2064f1.zip |
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
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/fop/events/CompositeEventListener.java | 14 | ||||
-rw-r--r-- | src/java/org/apache/fop/pdf/PDFEncoding.java | 4 |
2 files changed, 7 insertions, 11 deletions
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<EventListener> listeners = new ArrayList<EventListener>(); /** * 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, |