]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Logger "LogFactory.getLog(PDFObject.class.getPackage().getName())" was
authorGlen Mazza <gmazza@apache.org>
Fri, 23 Apr 2004 03:05:11 +0000 (03:05 +0000)
committerGlen Mazza <gmazza@apache.org>
Fri, 23 Apr 2004 03:05:11 +0000 (03:05 +0000)
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

src/java/org/apache/fop/pdf/PDFFactory.java
src/java/org/apache/fop/pdf/PDFObject.java
src/java/org/apache/fop/pdf/PDFPages.java

index 93066498bd4c05cafc7502d932dd869eeb1310d7..501b22a4a3713283e27b569bb8c481e390a405d1 100644 (file)
@@ -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;
     }
index 95047be14456176e97572a30f8220d5fe6ba48c7..ffe1648712f24581199eeb1367a3099b8fc797c6 100644 (file)
@@ -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
@@ -54,13 +54,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
index 01e2e224156b2148f7f725eab3e74dd8705a4736..aae5c6c90c9552391207b3b0dc581cccd8057679 100644 (file)
@@ -54,7 +54,6 @@ public class PDFPages extends PDFObject {
      * @param objnum the object's number
      */
     public PDFPages(int objnum) {
-        super();
         setObjectNumber(objnum);
     }