pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1824546 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java
Date Fri, 16 Feb 2018 17:57:19 GMT
Author: tilman
Date: Fri Feb 16 17:57:19 2018
New Revision: 1824546

URL: http://svn.apache.org/viewvc?rev=1824546&view=rev
Log:
PDFBOX-4071: fix typo, deprecate method that had typo, new method without typo

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java?rev=1824546&r1=1824545&r2=1824546&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java
Fri Feb 16 17:57:19 2018
@@ -23,7 +23,7 @@ import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification;
 
 /**
- * This is the class that represents a file attachement.
+ * This is the class that represents a file attachment.
  *
  * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
  * @version $Revision: 1.2 $
@@ -102,17 +102,30 @@ public class PDAnnotationFileAttachment
      */
     public String getAttachmentName()
     {
-        return getDictionary().getNameAsString( "Name", ATTACHMENT_NAME_PUSH_PIN );
+        return getDictionary().getNameAsString(COSName.NAME, ATTACHMENT_NAME_PUSH_PIN );
     }
 
     /**
-     * Set the name used to draw the attachement icon.
+     * Set the name used to draw the attachment icon.
      * See the ATTACHMENT_NAME_XXX constants.
      *
      * @param name The name of the visual icon to draw.
+     * @deprecated use {@link #setAttachmentName(java.lang.String)}.
      */
-    public void setAttachementName( String name )
+    @Deprecated
+    public void setAttachementName(String name)
     {
-        getDictionary().setName( "Name", name );
+        getDictionary().setName(COSName.NAME, name);
+    }
+
+    /**
+     * Set the name used to draw the attachment icon.
+     * See the ATTACHMENT_NAME_XXX constants.
+     *
+     * @param name The name of the visual icon to draw.
+     */
+    public void setAttachmentName(String name)
+    {
+        getDictionary().setName(COSName.NAME, name);
     }
 }



Mime
View raw message