pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1659421 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java
Date Thu, 12 Feb 2015 22:03:11 GMT
Author: tilman
Date: Thu Feb 12 22:03:10 2015
New Revision: 1659421

URL: http://svn.apache.org/r1659421
Log:
PDFBOX-2576: simplify code

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java?rev=1659421&r1=1659420&r2=1659421&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem.java
Thu Feb 12 22:03:10 2015
@@ -344,7 +344,6 @@ public final class PDOutlineItem extends
      */
     public PDColor getTextColor()
     {
-        PDColor retval = null;
         COSArray csValues = (COSArray) getCOSDictionary().getDictionaryObject(COSName.C);
         if( csValues == null )
         {
@@ -352,8 +351,7 @@ public final class PDOutlineItem extends
             csValues.growToSize( 3, new COSFloat( 0 ) );
             getCOSDictionary().setItem( COSName.C, csValues );
         }
-        retval = new PDColor(csValues.toFloatArray(), PDDeviceRGB.INSTANCE);
-        return retval;
+        return new PDColor(csValues, PDDeviceRGB.INSTANCE);
     }
 
     /**



Mime
View raw message