pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1756961 - /pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchema.java
Date Fri, 19 Aug 2016 20:03:22 GMT
Author: tilman
Date: Fri Aug 19 20:03:22 2016
New Revision: 1756961

URL: http://svn.apache.org/viewvc?rev=1756961&view=rev
Log:
PDFBOX-2852: remove redundant variables, as suggested by Lorenz Pahl

Modified:
    pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchema.java

Modified: pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchema.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchema.java?rev=1756961&r1=1756960&r2=1756961&view=diff
==============================================================================
--- pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchema.java (original)
+++ pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchema.java Fri Aug
19 20:03:22 2016
@@ -746,8 +746,7 @@ public class XMPSchema extends AbstractS
      */
     public void removeUnqualifiedArrayValue(String arrayName, AbstractField fieldValue)
     {
-        String qualifiedArrayName = arrayName;
-        ArrayProperty array = (ArrayProperty) getAbstractProperty(qualifiedArrayName);
+        ArrayProperty array = (ArrayProperty) getAbstractProperty(arrayName);
         if (array != null)
         {
             List<AbstractField> toDelete = new ArrayList<AbstractField>();
@@ -791,8 +790,7 @@ public class XMPSchema extends AbstractS
      */
     public void addUnqualifiedSequenceValue(String simpleSeqName, String seqValue)
     {
-        String qualifiedSeqName = simpleSeqName;
-        ArrayProperty seq = (ArrayProperty) getAbstractProperty(qualifiedSeqName);
+        ArrayProperty seq = (ArrayProperty) getAbstractProperty(simpleSeqName);
         TextType li = createTextType(XmpConstants.LIST_NAME, seqValue);
         if (seq != null)
         {
@@ -839,8 +837,7 @@ public class XMPSchema extends AbstractS
      */
     public void addUnqualifiedSequenceValue(String seqName, AbstractField seqValue)
     {
-        String qualifiedSeqName = seqName;
-        ArrayProperty seq = (ArrayProperty) getAbstractProperty(qualifiedSeqName);
+        ArrayProperty seq = (ArrayProperty) getAbstractProperty(seqName);
         if (seq != null)
         {
             seq.getContainer().addProperty(seqValue);
@@ -884,8 +881,7 @@ public class XMPSchema extends AbstractS
      */
     public void removeUnqualifiedSequenceDateValue(String seqName, Calendar date)
     {
-        String qualifiedSeqName = seqName;
-        ArrayProperty seq = (ArrayProperty) getAbstractProperty(qualifiedSeqName);
+        ArrayProperty seq = (ArrayProperty) getAbstractProperty(seqName);
         if (seq != null)
         {
             List<AbstractField> toDelete = new ArrayList<AbstractField>();
@@ -946,9 +942,8 @@ public class XMPSchema extends AbstractS
      */
     public List<Calendar> getUnqualifiedSequenceDateValueList(String seqName)
     {
-        String qualifiedSeqName = seqName;
         List<Calendar> retval = null;
-        ArrayProperty seq = (ArrayProperty) getAbstractProperty(qualifiedSeqName);
+        ArrayProperty seq = (ArrayProperty) getAbstractProperty(seqName);
         if (seq != null)
         {
             retval = new ArrayList<Calendar>();
@@ -1026,12 +1021,11 @@ public class XMPSchema extends AbstractS
      */
     public void setUnqualifiedLanguagePropertyValue(String name, String language, String
value)
     {
-        String qualifiedName = name;
         if (language == null || language.isEmpty())
         {
             language = XmpConstants.X_DEFAULT;
         }
-        AbstractField property = getAbstractProperty(qualifiedName);
+        AbstractField property = getAbstractProperty(name);
         ArrayProperty arrayProp;
         if (property != null)
         {



Mime
View raw message