commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1763975 - in /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc: IptcParser.java IptcRecord.java
Date Sun, 09 Oct 2016 13:15:22 GMT
Author: sebb
Date: Sun Oct  9 13:15:22 2016
New Revision: 1763975

URL: http://svn.apache.org/viewvc?rev=1763975&view=rev
Log:
Tidyup unused bytes

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcRecord.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcParser.java?rev=1763975&r1=1763974&r2=1763975&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcParser.java
Sun Oct  9 13:15:22 2016
@@ -245,7 +245,7 @@ public class IptcParser extends BinaryFi
             // Debug.debug("index", IPTC_TYPE_CREDIT.name);
             // }
 
-            final IptcRecord element = new IptcRecord(iptcType, recordData, value);
+            final IptcRecord element = new IptcRecord(iptcType, value);
             elements.add(element);
         }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcRecord.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcRecord.java?rev=1763975&r1=1763974&r2=1763975&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcRecord.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcRecord.java
Sun Oct  9 13:15:22 2016
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.imaging.formats.jpeg.iptc;
 
-import java.io.UnsupportedEncodingException;
 import java.util.Comparator;
 
 /*
@@ -24,8 +23,7 @@ import java.util.Comparator;
  */
 public class IptcRecord {
     public final IptcType iptcType;
-    private final byte[] bytes;
-    public final String value;
+    private final String value;
     public static final Comparator<IptcRecord> COMPARATOR = new Comparator<IptcRecord>()
{
         @Override
         public int compare(final IptcRecord e1, final IptcRecord e2) {
@@ -33,28 +31,11 @@ public class IptcRecord {
         }
     };
 
-    public IptcRecord(final IptcType iptcType, final byte[] bytes, final String value) {
-        this.iptcType = iptcType;
-        this.bytes = bytes; // TODO clone? no point cloning in getRawBytes if not also done
here
-        this.value = value;
-    }
-
     public IptcRecord(final IptcType iptcType, final String value) {
         this.iptcType = iptcType;
-        byte[] tempBytes;
-        try {
-            tempBytes = value.getBytes("ISO-8859-1");
-        } catch (final UnsupportedEncodingException cannotHappen) {
-            tempBytes = null;
-        }
-        this.bytes = tempBytes;
         this.value = value;
     }
 
-    public byte[] getRawBytes() {
-        return bytes.clone();
-    }
-
     public String getValue() {
         return value;
     }



Mime
View raw message