pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1862572 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel: graphics/color/ interactive/digitalsignature/
Date Thu, 04 Jul 2019 16:48:49 GMT
Author: tilman
Date: Thu Jul  4 16:48:49 2019
New Revision: 1862572

URL: http://svn.apache.org/viewvc?rev=1862572&view=rev
Log:
PDFBOX-4071: avoid ClassCastException

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuild.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java?rev=1862572&r1=1862571&r2=1862572&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java
Thu Jul  4 16:48:49 2019
@@ -78,7 +78,7 @@ public final class PDDeviceNAttributes
     public Map<String, PDSeparation> getColorants() throws IOException
     {
         Map<String,PDSeparation> actuals = new HashMap<>();
-        COSDictionary colorants = (COSDictionary)dictionary.getDictionaryObject(COSName.COLORANTS);
+        COSDictionary colorants = dictionary.getCOSDictionary(COSName.COLORANTS);
         if(colorants == null)
         {
             colorants = new COSDictionary();
@@ -98,7 +98,7 @@ public final class PDDeviceNAttributes
      */
     public PDDeviceNProcess getProcess()
     {
-        COSDictionary process = (COSDictionary)dictionary.getDictionaryObject(COSName.PROCESS);
+        COSDictionary process = dictionary.getCOSDictionary(COSName.PROCESS);
         if (process == null)
         {
             return null;

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuild.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuild.java?rev=1862572&r1=1862571&r2=1862572&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuild.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuild.java
Thu Jul  4 16:48:49 2019
@@ -75,7 +75,7 @@ public class PDPropBuild implements COSO
     public PDPropBuildDataDict getFilter()
     {
         PDPropBuildDataDict filter = null;
-        COSDictionary filterDic = (COSDictionary)dictionary.getDictionaryObject(COSName.FILTER);
+        COSDictionary filterDic = dictionary.getCOSDictionary(COSName.FILTER);
         if (filterDic != null)
         {
             filter = new PDPropBuildDataDict(filterDic);
@@ -103,7 +103,7 @@ public class PDPropBuild implements COSO
     public PDPropBuildDataDict getPubSec()
     {
         PDPropBuildDataDict pubSec = null;
-        COSDictionary pubSecDic = (COSDictionary)dictionary.getDictionaryObject(COSName.PUB_SEC);
+        COSDictionary pubSecDic = dictionary.getCOSDictionary(COSName.PUB_SEC);
         if (pubSecDic != null)
         {
             pubSec = new PDPropBuildDataDict(pubSecDic);
@@ -130,7 +130,7 @@ public class PDPropBuild implements COSO
     public PDPropBuildDataDict getApp()
     {
         PDPropBuildDataDict app = null;
-        COSDictionary appDic = (COSDictionary)dictionary.getDictionaryObject(COSName.APP);
+        COSDictionary appDic = dictionary.getCOSDictionary(COSName.APP);
         if (appDic != null)
         {
             app = new PDPropBuildDataDict(appDic);

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java?rev=1862572&r1=1862571&r2=1862572&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java
Thu Jul  4 16:48:49 2019
@@ -446,7 +446,7 @@ public class PDSeedValue implements COSO
      */
     public PDSeedValueMDP getMDP()
     {
-        COSDictionary dict = (COSDictionary)dictionary.getDictionaryObject(COSName.MDP);
+        COSDictionary dict = dictionary.getCOSDictionary(COSName.MDP);
         PDSeedValueMDP mdp = null;
         if (dict != null)
         {
@@ -514,7 +514,7 @@ public class PDSeedValue implements COSO
      */
     public PDSeedValueTimeStamp getTimeStamp()
     {
-        COSDictionary dict = (COSDictionary)dictionary.getDictionaryObject(COSName.TIME_STAMP);
+        COSDictionary dict = dictionary.getCOSDictionary(COSName.TIME_STAMP);
         PDSeedValueTimeStamp timestamp = null;
         if (dict != null)
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java?rev=1862572&r1=1862571&r2=1862572&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java
Thu Jul  4 16:48:49 2019
@@ -420,7 +420,7 @@ public class PDSignature implements COSO
     public PDPropBuild getPropBuild()
     {
         PDPropBuild propBuild = null;
-        COSDictionary propBuildDic = (COSDictionary)dictionary.getDictionaryObject(COSName.PROP_BUILD);
+        COSDictionary propBuildDic = dictionary.getCOSDictionary(COSName.PROP_BUILD);
         if (propBuildDic != null)
         {
             propBuild = new PDPropBuild(propBuildDic);



Mime
View raw message