pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1670763 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/PDOptionalContentProperties.java
Date Wed, 01 Apr 2015 19:50:45 GMT
Author: tilman
Date: Wed Apr  1 19:50:44 2015
New Revision: 1670763

URL: http://svn.apache.org/r1670763
Log:
PDFBOX-2576: remove unneeded cast; make fields final

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/PDOptionalContentProperties.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/PDOptionalContentProperties.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/PDOptionalContentProperties.java?rev=1670763&r1=1670762&r2=1670763&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/PDOptionalContentProperties.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/PDOptionalContentProperties.java
Wed Apr  1 19:50:44 2015
@@ -46,7 +46,7 @@ public class PDOptionalContentProperties
         /** The "Unchanged" value. */
         UNCHANGED(COSName.UNCHANGED);
 
-        private COSName name;
+        private final COSName name;
 
         private BaseState(COSName value)
         {
@@ -78,7 +78,7 @@ public class PDOptionalContentProperties
 
     }
 
-    private COSDictionary dict;
+    private final COSDictionary dict;
 
     /**
      * Creates a new optional content properties dictionary.
@@ -100,6 +100,7 @@ public class PDOptionalContentProperties
     }
 
     /** {@inheritDoc} */
+    @Override
     public COSBase getCOSObject()
     {
         return this.dict;
@@ -214,7 +215,7 @@ public class PDOptionalContentProperties
         String[] groups = new String[size];
         for (int i = 0; i < size; i++)
         {
-            COSBase obj = (COSBase)ocgs.get(i);
+            COSBase obj = ocgs.get(i);
             COSDictionary ocg = toDictionary(obj);
             groups[i] = ocg.getString(COSName.NAME);
         }



Mime
View raw message