pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1646644 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos: COSArray.java COSBase.java COSBoolean.java COSDictionary.java COSFloat.java COSObject.java UnmodifiableCOSDictionary.java
Date Fri, 19 Dec 2014 07:50:06 GMT
Author: tilman
Date: Fri Dec 19 07:50:05 2014
New Revision: 1646644

URL: http://svn.apache.org/r1646644
Log:
PDFBOX-2576: keep orginal stack trace when throwing new exception; added @override in package
where needed

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSBase.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSBoolean.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDictionary.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSObject.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/UnmodifiableCOSDictionary.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java?rev=1646644&r1=1646643&r2=1646644&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java Fri Dec 19 07:50:05
2014
@@ -422,6 +422,7 @@ public class COSArray extends COSBase im
      *
      * @return an iterator over the array elements
      */
+    @Override
     public Iterator<COSBase> iterator()
     {
         return objects.iterator();

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSBase.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSBase.java?rev=1646644&r1=1646643&r2=1646644&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSBase.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSBase.java Fri Dec 19 07:50:05
2014
@@ -43,6 +43,7 @@ public abstract class COSBase implements
      *
      * @return The cos object that matches this Java object.
      */
+    @Override
     public COSBase getCOSObject()
     {
         return this;

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSBoolean.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSBoolean.java?rev=1646644&r1=1646643&r2=1646644&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSBoolean.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSBoolean.java Fri Dec 19 07:50:05
2014
@@ -109,6 +109,7 @@ public class COSBoolean extends COSBase
      * @return any object, depending on the visitor implementation, or null
      * @throws IOException If an error occurs while visiting this object.
      */
+    @Override
     public Object accept(ICOSVisitor  visitor) throws IOException
     {
         return visitor.visitFromBoolean(this);
@@ -119,6 +120,7 @@ public class COSBoolean extends COSBase
      *
      * @return The string value of this object.
      */
+    @Override
     public String toString()
     {
         return String.valueOf( value );

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDictionary.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDictionary.java?rev=1646644&r1=1646643&r2=1646644&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDictionary.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDictionary.java Fri Dec 19
07:50:05 2014
@@ -1324,6 +1324,7 @@ public class COSDictionary extends COSBa
      *
      * @throws IOException If there is an error visiting this object.
      */
+    @Override
     public Object accept(ICOSVisitor visitor) throws IOException
     {
         return visitor.visitFromDictionary(this);

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java?rev=1646644&r1=1646643&r2=1646644&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSFloat.java Fri Dec 19 07:50:05
2014
@@ -57,7 +57,7 @@ public class COSFloat extends COSNumber
         }
         catch( NumberFormatException e )
         {
-            throw new IOException( "Error expected floating point number actual='" +aFloat
+ "'" );
+            throw new IOException( "Error expected floating point number actual='" +aFloat
+ "'", e );
         }
     }
 
@@ -92,6 +92,7 @@ public class COSFloat extends COSNumber
      *
      * @return The value of this object.
      */
+    @Override
     public float floatValue()
     {
         return value.floatValue();
@@ -102,6 +103,7 @@ public class COSFloat extends COSNumber
      *
      * @return The double of this object.
      */
+    @Override
     public double doubleValue()
     {
         return value.doubleValue();
@@ -112,6 +114,7 @@ public class COSFloat extends COSNumber
      *
      * @return The long value of this object,
      */
+    @Override
     public long longValue()
     {
         return value.longValue();
@@ -122,6 +125,7 @@ public class COSFloat extends COSNumber
      *
      * @return The int value of this object,
      */
+    @Override
     public int intValue()
     {
         return value.intValue();
@@ -130,6 +134,7 @@ public class COSFloat extends COSNumber
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals( Object o )
     {
         return o instanceof COSFloat && Float.floatToIntBits(((COSFloat)o).value.floatValue())
== Float.floatToIntBits(value.floatValue());
@@ -138,6 +143,7 @@ public class COSFloat extends COSNumber
     /**
      * {@inheritDoc}
      */
+    @Override
     public int hashCode()
     {
         return value.hashCode();
@@ -146,6 +152,7 @@ public class COSFloat extends COSNumber
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         return "COSFloat{" + valueAsString + "}";
@@ -158,6 +165,7 @@ public class COSFloat extends COSNumber
      * @return any object, depending on the visitor implementation, or null
      * @throws IOException If an error occurs while visiting this object.
      */
+    @Override
     public Object accept(ICOSVisitor visitor) throws IOException
     {
         return visitor.visitFromFloat(this);

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSObject.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSObject.java?rev=1646644&r1=1646643&r2=1646644&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSObject.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSObject.java Fri Dec 19 07:50:05
2014
@@ -152,6 +152,7 @@ public class COSObject extends COSBase
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         return "COSObject{" +
@@ -199,6 +200,7 @@ public class COSObject extends COSBase
      * @return any object, depending on the visitor implementation, or null
      * @throws IOException If an error occurs while visiting this object.
      */
+    @Override
     public Object accept( ICOSVisitor visitor ) throws IOException
     {
         return getObject() != null ? getObject().accept( visitor ) : COSNull.NULL.accept(
visitor );

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/UnmodifiableCOSDictionary.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/UnmodifiableCOSDictionary.java?rev=1646644&r1=1646643&r2=1646644&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/UnmodifiableCOSDictionary.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/UnmodifiableCOSDictionary.java
Fri Dec 19 07:50:05 2014
@@ -39,6 +39,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void clear()
     {
         throw new UnsupportedOperationException();
@@ -47,6 +48,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setItem(COSName key, COSBase value)
     {
         throw new UnsupportedOperationException();
@@ -55,6 +57,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setItem(COSName key, COSObjectable value)
     {
        throw new UnsupportedOperationException();
@@ -63,6 +66,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setItem(String key, COSObjectable value)
     {
         throw new UnsupportedOperationException();
@@ -71,6 +75,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setBoolean(String key, boolean value)
     {
         throw new UnsupportedOperationException();
@@ -79,6 +84,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setBoolean(COSName key, boolean value)
     {
         throw new UnsupportedOperationException();
@@ -87,6 +93,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setItem(String key, COSBase value)
     {
         throw new UnsupportedOperationException();
@@ -95,6 +102,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setName(String key, String value)
     {
         throw new UnsupportedOperationException();
@@ -103,6 +111,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setName(COSName key, String value)
     {
         throw new UnsupportedOperationException();
@@ -111,6 +120,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setDate(String key, Calendar date)
     {
         throw new UnsupportedOperationException();
@@ -119,6 +129,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setDate(COSName key, Calendar date)
     {
         throw new UnsupportedOperationException();
@@ -127,6 +138,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setEmbeddedDate(String embedded, String key, Calendar date)
     {
         throw new UnsupportedOperationException();
@@ -135,6 +147,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setEmbeddedDate(String embedded, COSName key, Calendar date)
     {
         throw new UnsupportedOperationException();
@@ -143,6 +156,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setString(String key, String value)
     {
         throw new UnsupportedOperationException();
@@ -151,6 +165,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setString(COSName key, String value)
     {
         throw new UnsupportedOperationException();
@@ -159,6 +174,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setEmbeddedString(String embedded, String key, String value)
     {
         throw new UnsupportedOperationException();
@@ -167,6 +183,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setEmbeddedString(String embedded, COSName key, String value)
     {
        throw new UnsupportedOperationException();
@@ -175,6 +192,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setInt(String key, int value)
     {
         throw new UnsupportedOperationException();
@@ -183,6 +201,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setInt(COSName key, int value)
     {
         throw new UnsupportedOperationException();
@@ -191,6 +210,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setLong(String key, long value)
     {
         throw new UnsupportedOperationException();
@@ -199,6 +219,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setLong(COSName key, long value)
     {
         throw new UnsupportedOperationException();
@@ -207,6 +228,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setEmbeddedInt(String embeddedDictionary, String key, int value)
     {
         throw new UnsupportedOperationException();
@@ -215,6 +237,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setEmbeddedInt(String embeddedDictionary, COSName key, int value)
     {
         throw new UnsupportedOperationException();
@@ -223,6 +246,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setFloat(String key, float value)
     {
         throw new UnsupportedOperationException();
@@ -231,6 +255,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void setFloat(COSName key, float value)
     {
         throw new UnsupportedOperationException();
@@ -239,6 +264,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void removeItem(COSName key)
     {
         throw new UnsupportedOperationException();
@@ -247,6 +273,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void addAll(COSDictionary dic)
     {
         throw new UnsupportedOperationException();
@@ -255,6 +282,7 @@ final class UnmodifiableCOSDictionary ex
     /**
      * @inheritDoc
      */
+    @Override
     public void mergeInto(COSDictionary dic)
     {
         throw new UnsupportedOperationException();



Mime
View raw message