pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1646629 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java
Date Fri, 19 Dec 2014 06:35:21 GMT
Author: tilman
Date: Fri Dec 19 06:35:21 2014
New Revision: 1646629

URL: http://svn.apache.org/r1646629
Log:
PDFBOX-2576:  instanceof String will always return true for all nonnull values

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java?rev=1646629&r1=1646628&r2=1646629&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTextField.java
Fri Dec 19 06:35:21 2014
@@ -80,12 +80,8 @@ public final class PDTextField extends P
     {
         if (value != null)
         {
-            if (value instanceof String)
-            {
-                String stringValue = (String)value;
-                COSString fieldValue = new COSString(stringValue);
-                setInheritableAttribute(getDictionary(), COSName.DV, fieldValue);
-            }
+            COSString fieldValue = new COSString(value);
+            setInheritableAttribute(getDictionary(), COSName.DV, fieldValue);
             // TODO stream instead of string
         }  
         else



Mime
View raw message