pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1863655 - in /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure: PDAttributeObject.java PDMarkedContentReference.java PDObjectReference.java PDStructureNode.java Revisions.java
Date Tue, 23 Jul 2019 17:33:22 GMT
Author: tilman
Date: Tue Jul 23 17:33:22 2019
New Revision: 1863655

URL: http://svn.apache.org/viewvc?rev=1863655&view=rev
Log:
PDFBOX-4071: SonarQube fix - move constructors to top

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDAttributeObject.java
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDMarkedContentReference.java
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDObjectReference.java
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/Revisions.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDAttributeObject.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDAttributeObject.java?rev=1863655&r1=1863654&r2=1863655&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDAttributeObject.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDAttributeObject.java
Tue Jul 23 17:33:22 2019
@@ -36,6 +36,23 @@ public abstract class PDAttributeObject
 {
 
     /**
+     * Default constructor.
+     */
+    public PDAttributeObject()
+    {
+    }
+
+    /**
+     * Creates a new attribute object with a given dictionary.
+     * 
+     * @param dictionary the dictionary
+     */
+    public PDAttributeObject(COSDictionary dictionary)
+    {
+        super(dictionary);
+    }
+
+    /**
      * Creates an attribute object.
      * 
      * @param dictionary the dictionary
@@ -99,25 +116,6 @@ public abstract class PDAttributeObject
         this.structureElement = structureElement;
     }
 
-
-    /**
-     * Default constructor.
-     */
-    public PDAttributeObject()
-    {
-    }
-
-    /**
-     * Creates a new attribute object with a given dictionary.
-     * 
-     * @param dictionary the dictionary
-     */
-    public PDAttributeObject(COSDictionary dictionary)
-    {
-        super(dictionary);
-    }
-
-
     /**
      * Returns the owner of the attributes.
      * 

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDMarkedContentReference.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDMarkedContentReference.java?rev=1863655&r1=1863654&r2=1863655&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDMarkedContentReference.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDMarkedContentReference.java
Tue Jul 23 17:33:22 2019
@@ -33,15 +33,6 @@ public class PDMarkedContentReference im
     private final COSDictionary dictionary;
     
     /**
-     * {@inheritDoc}
-     */
-    @Override
-    public COSDictionary getCOSObject()
-    {
-        return this.dictionary;
-    }
-
-    /**
      * Default constructor
      */
     public PDMarkedContentReference()
@@ -61,6 +52,15 @@ public class PDMarkedContentReference im
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public COSDictionary getCOSObject()
+    {
+        return this.dictionary;
+    }
+
+    /**
      * Gets the page.
      * 
      * @return the page

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDObjectReference.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDObjectReference.java?rev=1863655&r1=1863654&r2=1863655&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDObjectReference.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDObjectReference.java
Tue Jul 23 17:33:22 2019
@@ -45,17 +45,6 @@ public class PDObjectReference implement
     private final COSDictionary dictionary;
 
     /**
-     * Returns the underlying dictionary.
-     * 
-     * @return the dictionary
-     */
-    @Override
-    public COSDictionary getCOSObject()
-    {
-        return this.dictionary;
-    }
-
-    /**
      * Default Constructor.
      *
      */
@@ -76,6 +65,17 @@ public class PDObjectReference implement
     }
 
     /**
+     * Returns the underlying dictionary.
+     * 
+     * @return the dictionary
+     */
+    @Override
+    public COSDictionary getCOSObject()
+    {
+        return this.dictionary;
+    }
+
+    /**
      * Gets a higher-level object for the referenced object.
      * Currently this method may return a {@link PDAnnotation},
      * a {@link PDXObject} or <code>null</code>.

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java?rev=1863655&r1=1863654&r2=1863655&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
Tue Jul 23 17:33:22 2019
@@ -37,6 +37,27 @@ public abstract class PDStructureNode im
 {
 
     /**
+     * Constructor.
+     *
+     * @param type the type
+     */
+    protected PDStructureNode(String type)
+    {
+        this.dictionary = new COSDictionary();
+        this.dictionary.setName(COSName.TYPE, type);
+    }
+
+    /**
+     * Constructor for an existing structure node.
+     *
+     * @param dictionary The existing dictionary.
+     */
+    protected PDStructureNode(COSDictionary dictionary)
+    {
+        this.dictionary = dictionary;
+    }
+
+    /**
      * Creates a node in the structure tree. Can be either a structure tree root,
      *  or a structure element.
      * 
@@ -69,27 +90,6 @@ public abstract class PDStructureNode im
     }
 
     /**
-     * Constructor.
-     *
-     * @param type the type
-     */
-    protected PDStructureNode(String type)
-    {
-        this.dictionary = new COSDictionary();
-        this.dictionary.setName(COSName.TYPE, type);
-    }
-
-    /**
-     * Constructor for an existing structure node.
-     *
-     * @param dictionary The existing dictionary.
-     */
-    protected PDStructureNode(COSDictionary dictionary)
-    {
-        this.dictionary = dictionary;
-    }
-
-    /**
      * Returns the type.
      * 
      * @return the type

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/Revisions.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/Revisions.java?rev=1863655&r1=1863654&r2=1863655&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/Revisions.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/Revisions.java
Tue Jul 23 17:33:22 2019
@@ -30,6 +30,13 @@ public class Revisions<T>
     private List<T> objects;
     private List<Integer> revisionNumbers;
 
+    /**
+     * Constructor.
+     */
+    public Revisions()
+    {
+    }
+
     private List<T> getObjects()
     {
         if (this.objects == null)
@@ -49,13 +56,6 @@ public class Revisions<T>
     }
 
     /**
-     * 
-     */
-    public Revisions()
-    {
-    }
-
-    /**
      * Returns the object at the specified position.
      * 
      * @param index the position



Mime
View raw message