pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1604923 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioCollection.java
Date Mon, 23 Jun 2014 20:14:41 GMT
Author: jahewson
Date: Mon Jun 23 20:14:41 2014
New Revision: 1604923

URL: http://svn.apache.org/r1604923
Log:
PDFBOX-2161: A PDRadioButton with no children throws an NPE

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioCollection.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioCollection.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioCollection.java?rev=1604923&r1=1604922&r2=1604923&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioCollection.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioCollection.java
Mon Jun 23 20:14:41 2014
@@ -149,7 +149,6 @@ public class PDRadioCollection extends P
     @SuppressWarnings("unchecked")
     public List getKids() throws IOException
     {
-        List retval = null;
         COSArray kids = (COSArray)getDictionary().getDictionaryObject(COSName.KIDS);
         if( kids != null )
         {
@@ -158,8 +157,11 @@ public class PDRadioCollection extends P
             {
                 kidsList.add( PDFieldFactory.createField( getAcroForm(), (COSDictionary)kids.getObject(i)
) );
             }
-            retval = new COSArrayList( kidsList, kids );
+            return  new COSArrayList( kidsList, kids );
+        }
+        else
+        {
+            return new ArrayList();
         }
-        return retval;
     }
 }



Mime
View raw message