commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1649192 - /commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java
Date Sat, 03 Jan 2015 12:23:26 GMT
Author: britter
Date: Sat Jan  3 12:23:26 2015
New Revision: 1649192

URL: http://svn.apache.org/r1649192
Log:
Programm against interfaces

Modified:
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java?rev=1649192&r1=1649191&r2=1649192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java
Sat Jan  3 12:23:26 2015
@@ -28,9 +28,11 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.imaging.ImageReadException;
@@ -279,8 +281,8 @@ public class ExifRewriteTest extends Exi
         rewrite(rewriter, "lossless");
     }
 
-    private Hashtable<Integer,TiffImageMetadata.Directory> makeDirectoryMap(final List<?
extends ImageMetadataItem> directories) {
-        final Hashtable<Integer,TiffImageMetadata.Directory> directoryMap = new Hashtable<Integer,TiffImageMetadata.Directory>();
+    private Map<Integer,TiffImageMetadata.Directory> makeDirectoryMap(final List<?
extends ImageMetadataItem> directories) {
+        final Map<Integer,TiffImageMetadata.Directory> directoryMap = new HashMap<Integer,TiffImageMetadata.Directory>();
         for (int i = 0; i < directories.size(); i++) {
             final TiffImageMetadata.Directory directory = (TiffImageMetadata.Directory) directories
                     .get(i);
@@ -289,8 +291,8 @@ public class ExifRewriteTest extends Exi
         return directoryMap;
     }
 
-    private Hashtable<Integer,TiffField> makeFieldMap(final List<? extends ImageMetadataItem>
items) {
-        final Hashtable<Integer,TiffField> fieldMap = new Hashtable<Integer,TiffField>();
+    private Map<Integer,TiffField> makeFieldMap(final List<? extends ImageMetadataItem>
items) {
+        final Map<Integer,TiffField> fieldMap = new HashMap<Integer,TiffField>();
         for (int i = 0; i < items.size(); i++) {
             final TiffImageMetadata.TiffMetadataItem item = (TiffImageMetadata.TiffMetadataItem)
items.get(i);
             final TiffField field = item.getTiffField();
@@ -311,8 +313,8 @@ public class ExifRewriteTest extends Exi
 
         assertTrue(oldDirectories.size() == newDirectories.size());
 
-        final Hashtable<Integer,TiffImageMetadata.Directory> oldDirectoryMap = makeDirectoryMap(oldDirectories);
-        final Hashtable<Integer,TiffImageMetadata.Directory> newDirectoryMap = makeDirectoryMap(newDirectories);
+        final Map<Integer,TiffImageMetadata.Directory> oldDirectoryMap = makeDirectoryMap(oldDirectories);
+        final Map<Integer,TiffImageMetadata.Directory> newDirectoryMap = makeDirectoryMap(newDirectories);
 
         assertEquals(oldDirectories.size(), oldDirectoryMap.keySet().size());
         final List<Integer> oldDirectoryTypes = new ArrayList<Integer>(oldDirectoryMap.keySet());
@@ -336,8 +338,8 @@ public class ExifRewriteTest extends Exi
             final List<? extends ImageMetadataItem> oldItems = oldDirectory.getItems();
             final List<? extends ImageMetadataItem> newItems = newDirectory.getItems();
 
-            final Hashtable<Integer,TiffField> oldFieldMap = makeFieldMap(oldItems);
-            final Hashtable<Integer,TiffField> newFieldMap = makeFieldMap(newItems);
+            final Map<Integer,TiffField> oldFieldMap = makeFieldMap(oldItems);
+            final Map<Integer,TiffField> newFieldMap = makeFieldMap(newItems);
 
             final Set<Integer> missingInNew = new HashSet<Integer>(oldFieldMap.keySet());
             missingInNew.removeAll(newFieldMap.keySet());



Mime
View raw message