pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1720044 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation: PDAnnotationLine.java PDAnnotationSquareCircle.java PDAnnotationWidget.java
Date Mon, 14 Dec 2015 23:17:45 GMT
Author: tilman
Date: Mon Dec 14 23:17:45 2015
New Revision: 1720044

URL: http://svn.apache.org/viewvc?rev=1720044&view=rev
Log:
PDFBOX-3164: avoid ClassCastException if /BS is indirect

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java?rev=1720044&r1=1720043&r2=1720044&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java
Mon Dec 14 23:17:45 2015
@@ -278,6 +278,7 @@ public class PDAnnotationLine extends PD
      * @param bs the border style dictionary to set.
      *
      */
+    @Override
     public void setBorderStyle(PDBorderStyleDictionary bs)
     {
         this.getCOSObject().setItem(COSName.BS, bs);
@@ -288,9 +289,10 @@ public class PDAnnotationLine extends PD
      *
      * @return the border style dictionary.
      */
+    @Override
     public PDBorderStyleDictionary getBorderStyle()
     {
-        COSDictionary bs = (COSDictionary) this.getCOSObject().getItem(COSName.BS);
+        COSDictionary bs = (COSDictionary) this.getCOSObject().getDictionaryObject(COSName.BS);
         if (bs != null)
         {
             return new PDBorderStyleDictionary(bs);

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java?rev=1720044&r1=1720043&r2=1720044&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java
Mon Dec 14 23:17:45 2015
@@ -169,6 +169,7 @@ public class PDAnnotationSquareCircle ex
      * @param bs the border style dictionary to set. TODO not all annotations may have a
BS entry
      *
      */
+    @Override
     public void setBorderStyle(PDBorderStyleDictionary bs)
     {
         this.getCOSObject().setItem(COSName.BS, bs);
@@ -179,9 +180,10 @@ public class PDAnnotationSquareCircle ex
      *
      * @return the border style dictionary. TODO not all annotations may have a BS entry
      */
+    @Override
     public PDBorderStyleDictionary getBorderStyle()
     {
-        COSDictionary bs = (COSDictionary) this.getCOSObject().getItem(COSName.BS);
+        COSDictionary bs = (COSDictionary) this.getCOSObject().getDictionaryObject(COSName.BS);
         if (bs != null)
         {
             return new PDBorderStyleDictionary(bs);

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java?rev=1720044&r1=1720043&r2=1720044&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java
Mon Dec 14 23:17:45 2015
@@ -203,7 +203,7 @@ public class PDAnnotationWidget extends
      */
     public PDBorderStyleDictionary getBorderStyle()
     {
-        COSDictionary bs = (COSDictionary) this.getCOSObject().getItem(COSName.BS);
+        COSDictionary bs = (COSDictionary) this.getCOSObject().getDictionaryObject(COSName.BS);
         if (bs != null)
         {
             return new PDBorderStyleDictionary(bs);



Mime
View raw message