aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-04-23 03:05:11 +0000
committerGlen Mazza <gmazza@apache.org>2004-04-23 03:05:11 +0000
commite620e691b2e558ee1bebad55fd2d93671ba83478 (patch)
tree6452381f1572ce9ee4d23c6d248d66f77572deaa
parent555277fae2845f17a259ae2309b5b5c95a6876ab (diff)
downloadxmlgraphics-fop-e620e691b2e558ee1bebad55fd2d93671ba83478.tar.gz
xmlgraphics-fop-e620e691b2e558ee1bebad55fd2d93671ba83478.zip
Logger "LogFactory.getLog(PDFObject.class.getPackage().getName())" was
causing null pointer exceptions when the Ant task is run (although not with command-line usage); switched to "LogFactory.getLog(PDFObject.class.getName())", which works for both command-line and Ant task. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197533 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/pdf/PDFFactory.java2
-rw-r--r--src/java/org/apache/fop/pdf/PDFObject.java9
-rw-r--r--src/java/org/apache/fop/pdf/PDFPages.java1
3 files changed, 2 insertions, 10 deletions
diff --git a/src/java/org/apache/fop/pdf/PDFFactory.java b/src/java/org/apache/fop/pdf/PDFFactory.java
index 93066498b..501b22a4a 100644
--- a/src/java/org/apache/fop/pdf/PDFFactory.java
+++ b/src/java/org/apache/fop/pdf/PDFFactory.java
@@ -92,7 +92,7 @@ public class PDFFactory {
* @return a new PDF Pages object for adding pages to
*/
public PDFPages makePages() {
- PDFPages pdfPages = new PDFPages(++this.document.objectcount);
+ PDFPages pdfPages = new PDFPages(++(this.document.objectcount));
getDocument().addTrailerObject(pdfPages);
return pdfPages;
}
diff --git a/src/java/org/apache/fop/pdf/PDFObject.java b/src/java/org/apache/fop/pdf/PDFObject.java
index 95047be14..ffe164871 100644
--- a/src/java/org/apache/fop/pdf/PDFObject.java
+++ b/src/java/org/apache/fop/pdf/PDFObject.java
@@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFactory;
public abstract class PDFObject {
/** logger for all PDFObjects (and descendants) */
- protected static Log log = LogFactory.getLog(PDFObject.class.getPackage().getName());
+ protected static Log log = LogFactory.getLog(PDFObject.class.getName());
/**
* the object's number
@@ -55,13 +55,6 @@ public abstract class PDFObject {
private PDFDocument document;
/**
- * Create a PDFObject
- */
- public PDFObject() {
- // do nothing
- }
-
- /**
* Returns the object's number.
* @return the PDF Object number
*/
diff --git a/src/java/org/apache/fop/pdf/PDFPages.java b/src/java/org/apache/fop/pdf/PDFPages.java
index 01e2e2241..aae5c6c90 100644
--- a/src/java/org/apache/fop/pdf/PDFPages.java
+++ b/src/java/org/apache/fop/pdf/PDFPages.java
@@ -54,7 +54,6 @@ public class PDFPages extends PDFObject {
* @param objnum the object's number
*/
public PDFPages(int objnum) {
- super();
setObjectNumber(objnum);
}