summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Pepping <spepping@apache.org>2005-12-09 12:46:23 +0000
committerSimon Pepping <spepping@apache.org>2005-12-09 12:46:23 +0000
commit2e0a5e70c9c2661cd2cfed76ad5424a029ade709 (patch)
tree9544afac4da120b73c7de635179ca94646c4beed
parent1c6a45bc0c6c37bd13e67d702f38b17d530d5675 (diff)
downloadxmlgraphics-fop-2e0a5e70c9c2661cd2cfed76ad5424a029ade709.tar.gz
xmlgraphics-fop-2e0a5e70c9c2661cd2cfed76ad5424a029ade709.zip
The result of some practice with Checkstyle
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@355471 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/Version.java4
-rw-r--r--src/java/org/apache/fop/apps/FOPException.java8
-rw-r--r--src/java/org/apache/fop/apps/Fop.java3
-rw-r--r--src/java/org/apache/fop/fo/FONode.java16
4 files changed, 17 insertions, 14 deletions
diff --git a/src/java/org/apache/fop/Version.java b/src/java/org/apache/fop/Version.java
index 31d463136..bad7ee8b6 100644
--- a/src/java/org/apache/fop/Version.java
+++ b/src/java/org/apache/fop/Version.java
@@ -23,7 +23,9 @@ package org.apache.fop;
* Note that this class can only find the version information if it's in the org.apache.fop package
* as this package equals the one specified in the manifest.
*/
-public class Version {
+public final class Version {
+
+ private Version() { }
/**
* Get the version of FOP
diff --git a/src/java/org/apache/fop/apps/FOPException.java b/src/java/org/apache/fop/apps/FOPException.java
index 10fe45fbe..4f9d3a3a9 100644
--- a/src/java/org/apache/fop/apps/FOPException.java
+++ b/src/java/org/apache/fop/apps/FOPException.java
@@ -43,7 +43,8 @@ public class FOPException extends SAXException {
/**
* Constructs a new FOP exception with the specified detail message and location.
* @param message the detail message
- * @param systemId the system id of the FO document which is associated with the exception. May be null.
+ * @param systemId the system id of the FO document which is associated with the exception
+ * may be null.
* @param line line number in the FO document which is associated with the exception.
* @param column clolumn number in the line which is associated with the exception.
*/
@@ -96,7 +97,8 @@ public class FOPException extends SAXException {
/**
* Set a location associated with the exception.
- * @param systemId the system id of the FO document which is associated with the exception. May be null.
+ * @param systemId the system id of the FO document which is associated with the exception;
+ * may be null.
* @param line line number in the FO document which is associated with the exception.
* @param column clolumn number in the line which is associated with the exception.
*/
@@ -108,6 +110,7 @@ public class FOPException extends SAXException {
/**
* Indicate whether a location was set.
+ * @return whether a location was set
*/
public boolean isLocationSet() {
// TODO: this is actually a dangerous assumption: A line
@@ -124,6 +127,7 @@ public class FOPException extends SAXException {
* SystemId:LL:CC: &amp;the message&amp;
* </pre>
* (the format used by most GNU tools)
+ * @return the detail message string of this FOP exception
*/
public String getMessage() {
if (isLocationSet()) {
diff --git a/src/java/org/apache/fop/apps/Fop.java b/src/java/org/apache/fop/apps/Fop.java
index e87c1aa4d..2694a7690 100644
--- a/src/java/org/apache/fop/apps/Fop.java
+++ b/src/java/org/apache/fop/apps/Fop.java
@@ -67,7 +67,6 @@ public class Fop implements Constants {
* output format (ex. "application/pdf" for PDF).
* @param outputFormat the MIME type of the output format to use (ex. "application/pdf").
* @param ua FOUserAgent object
- * @throws IllegalArgumentException if an unsupported renderer type was requested.
*/
public Fop(String outputFormat, FOUserAgent ua) {
this.outputFormat = outputFormat;
@@ -82,7 +81,6 @@ public class Fop implements Constants {
* Constructor for FOP with a default FOUserAgent. It uses MIME types to select the
* output format (ex. "application/pdf" for PDF).
* @param outputFormat the MIME type of the output format to use (ex. "application/pdf").
- * @throws IllegalArgumentException if an unsupported renderer type was requested.
*/
public Fop(String outputFormat) {
this(outputFormat, null);
@@ -106,7 +104,6 @@ public class Fop implements Constants {
* <li>Fop.RENDER_PNG</li>
* </ul>
* @param ua FOUserAgent object
- * @throws IllegalArgumentException if an unsupported renderer type was requested.
* @deprecated Use {@link org.apache.fop.apps.Fop#Fop(java.lang.String, FOUserAgent)} instead!
* This constructor will be removed.
*/
diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java
index 5832abe47..f321dc663 100644
--- a/src/java/org/apache/fop/fo/FONode.java
+++ b/src/java/org/apache/fop/fo/FONode.java
@@ -70,16 +70,16 @@ public abstract class FONode implements Cloneable {
/**
* Perform a shallow cloning operation,
* set its parent, and optionally clean the list of child nodes
- * @param parent the intended parent of the clone
+ * @param cloneparent the intended parent of the clone
* @param removeChildren if true, clean the list of child nodes
* @return the cloned FO node
* @throws FOPException if there's a problem while cloning the node
*/
- public FONode clone(FONode parent, boolean removeChildren)
+ public FONode clone(FONode cloneparent, boolean removeChildren)
throws FOPException {
FONode foNode = (FONode) clone();
- foNode.parent = parent;
- parent.addChildNode(foNode);
+ foNode.parent = cloneparent;
+ cloneparent.addChildNode(foNode);
return foNode;
}
@@ -146,11 +146,11 @@ public abstract class FONode implements Cloneable {
* @param elementName element name (e.g., "fo:block")
* @param locator Locator object (ignored by default)
* @param attlist Collection of attributes passed to us from the parser.
- * @param parent the property list of the parent node
+ * @param pList the property list of the parent node
* @throws FOPException for errors or inconsistencies in the attributes
*/
public void processNode(String elementName, Locator locator,
- Attributes attlist, PropertyList parent) throws FOPException {
+ Attributes attlist, PropertyList pList) throws FOPException {
if (log.isDebugEnabled()) {
log.debug("Unhandled element: " + elementName
+ (locator != null ? " at " + getLocatorString(locator) : ""));
@@ -160,13 +160,13 @@ public abstract class FONode implements Cloneable {
/**
* Create a property list for this node. Return null if the node does not
* need a property list.
- * @param parent the closest parent propertylist.
+ * @param pList the closest parent propertylist.
* @param foEventHandler The FOEventHandler where the PropertyListMaker
* instance can be found.
* @return A new property list.
* @throws FOPException if there's a problem during processing
*/
- protected PropertyList createPropertyList(PropertyList parent, FOEventHandler foEventHandler)
+ protected PropertyList createPropertyList(PropertyList pList, FOEventHandler foEventHandler)
throws FOPException {
return null;
}