From commits-return-11892-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Fri Feb 16 18:57:21 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4FF20180647 for ; Fri, 16 Feb 2018 18:57:21 +0100 (CET) Received: (qmail 28325 invoked by uid 500); 16 Feb 2018 17:57:20 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 28316 invoked by uid 99); 16 Feb 2018 17:57:20 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2018 17:57:20 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id D97E53A01DB for ; Fri, 16 Feb 2018 17:57:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20180216175719.D97E53A01DB@svn01-us-west.apache.org> 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 Ben Litchfield * @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); } }