commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1391192 [2/2] - in /commons/proper/imaging/trunk/src: main/java/org/apache/commons/imaging/ main/java/org/apache/commons/imaging/common/ main/java/org/apache/commons/imaging/common/mylzw/ main/java/org/apache/commons/imaging/formats/bmp/ m...
Date Thu, 27 Sep 2012 20:04:14 GMT
Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java Thu Sep 27 20:04:11 2012
@@ -71,7 +71,7 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         RgbeInfo info = new RgbeInfo(byteSource);
 
@@ -83,7 +83,7 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         RgbeInfo info = new RgbeInfo(byteSource);
 
@@ -91,7 +91,7 @@ public class RgbeImageParser extends Ima
             return new ImageInfo(
                     getName(),
                     32, // todo may be 64 if double?
-                    new ArrayList(), ImageFormat.IMAGE_FORMAT_RGBE, getName(),
+                    new ArrayList<String>(), ImageFormat.IMAGE_FORMAT_RGBE, getName(),
                     info.getHeight(), "image/vnd.radiance", 1, -1, -1, -1, -1,
                     info.getWidth(), false, false, false,
                     ImageInfo.COLOR_TYPE_RGB, "Adaptive RLE");
@@ -101,7 +101,7 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public BufferedImage getBufferedImage(ByteSource byteSource, Map params)
+    public BufferedImage getBufferedImage(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         RgbeInfo info = new RgbeInfo(byteSource);
 
@@ -125,7 +125,7 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         RgbeInfo info = new RgbeInfo(byteSource);
 
@@ -137,7 +137,7 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -148,7 +148,7 @@ public class RgbeImageParser extends Ima
     }
 
     @Override
-    public String getXmpXml(ByteSource byteSource, Map params)
+    public String getXmpXml(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java Thu Sep 27 20:04:11 2012
@@ -148,11 +148,11 @@ public class TiffDirectory extends TiffE
 
     public BufferedImage getTiffImage(int byteOrder) throws ImageReadException,
             IOException {
-        Map params = null;
+        Map<String,Object> params = null;
         return getTiffImage(byteOrder, params);
     }
 
-    public BufferedImage getTiffImage(int byteOrder, Map params)
+    public BufferedImage getTiffImage(int byteOrder, Map<String,Object> params)
             throws ImageReadException, IOException {
         if (null == tiffImageData) {
             return null;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java Thu Sep 27 20:04:11 2012
@@ -82,7 +82,7 @@ public class TiffImageParser extends Ima
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         FormatCompliance formatCompliance = FormatCompliance.getDefault();
         TiffContents contents = new TiffReader(isStrict(params))
@@ -94,7 +94,7 @@ public class TiffImageParser extends Ima
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         FormatCompliance formatCompliance = FormatCompliance.getDefault();
         TiffContents contents = new TiffReader(isStrict(params))
@@ -126,7 +126,7 @@ public class TiffImageParser extends Ima
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         FormatCompliance formatCompliance = FormatCompliance.getDefault();
         TiffReader tiffReader = new TiffReader(isStrict(params));
@@ -157,7 +157,7 @@ public class TiffImageParser extends Ima
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         FormatCompliance formatCompliance = FormatCompliance.getDefault();
         TiffContents contents = new TiffReader(isStrict(params))
@@ -317,7 +317,7 @@ public class TiffImageParser extends Ima
     }
 
     @Override
-    public String getXmpXml(ByteSource byteSource, Map params)
+    public String getXmpXml(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         FormatCompliance formatCompliance = FormatCompliance.getDefault();
         TiffContents contents = new TiffReader(isStrict(params))
@@ -360,7 +360,7 @@ public class TiffImageParser extends Ima
             {
                 FormatCompliance formatCompliance = FormatCompliance
                         .getDefault();
-                Map params = null;
+                Map<String,Object> params = null;
                 TiffContents contents = new TiffReader(true).readContents(
                         byteSource, params, formatCompliance);
 
@@ -407,13 +407,13 @@ public class TiffImageParser extends Ima
     public FormatCompliance getFormatCompliance(ByteSource byteSource)
             throws ImageReadException, IOException {
         FormatCompliance formatCompliance = FormatCompliance.getDefault();
-        Map params = null;
+        Map<String,Object> params = null;
         new TiffReader(isStrict(params)).readContents(byteSource, params,
                 formatCompliance);
         return formatCompliance;
     }
 
-    public List<byte[]> collectRawImageData(ByteSource byteSource, Map params)
+    public List<byte[]> collectRawImageData(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         FormatCompliance formatCompliance = FormatCompliance.getDefault();
         TiffContents contents = new TiffReader(isStrict(params))
@@ -435,7 +435,7 @@ public class TiffImageParser extends Ima
     }
 
     @Override
-    public BufferedImage getBufferedImage(ByteSource byteSource, Map params)
+    public BufferedImage getBufferedImage(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         FormatCompliance formatCompliance = FormatCompliance.getDefault();
         TiffReader reader = new TiffReader(isStrict(params));
@@ -470,7 +470,7 @@ public class TiffImageParser extends Ima
     }
 
     protected BufferedImage getBufferedImage(TiffDirectory directory,
-            int byteOrder, Map params) throws ImageReadException, IOException {
+            int byteOrder, Map<String,Object> params) throws ImageReadException, IOException {
         List<TiffField> entries = directory.entries;
 
         if (entries == null) {
@@ -620,7 +620,7 @@ public class TiffImageParser extends Ima
     }
 
     @Override
-    public void writeImage(BufferedImage src, OutputStream os, Map params)
+    public void writeImage(BufferedImage src, OutputStream os, Map<String,Object> params)
             throws ImageWriteException, IOException {
         new TiffImageWriterLossy().writeImage(src, os, params);
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java Thu Sep 27 20:04:11 2012
@@ -315,7 +315,7 @@ public class TiffReader extends BinaryFi
             this(null);
         }
 
-        public Collector(Map params) {
+        public Collector(Map<String,Object> params) {
             boolean readThumbnails = true;
             if (params != null && params.containsKey(PARAM_KEY_READ_THUMBNAILS)) {
                 readThumbnails = Boolean.TRUE.equals(params
@@ -390,7 +390,7 @@ public class TiffReader extends BinaryFi
         }
     }
 
-    public TiffContents readFirstDirectory(ByteSource byteSource, Map params,
+    public TiffContents readFirstDirectory(ByteSource byteSource, Map<String,Object> params,
             boolean readImageData, FormatCompliance formatCompliance)
             throws ImageReadException, IOException {
         Collector collector = new FirstDirectoryCollector(readImageData);
@@ -416,7 +416,7 @@ public class TiffReader extends BinaryFi
         return contents;
     }
 
-    public TiffContents readContents(ByteSource byteSource, Map params,
+    public TiffContents readContents(ByteSource byteSource, Map<String,Object> params,
             FormatCompliance formatCompliance) throws ImageReadException,
             IOException {
 
@@ -426,7 +426,7 @@ public class TiffReader extends BinaryFi
         return contents;
     }
 
-    public void read(ByteSource byteSource, Map params,
+    public void read(ByteSource byteSource, Map<String,Object> params,
             FormatCompliance formatCompliance, Listener listener)
             throws ImageReadException, IOException {
         // TiffContents contents =

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffValueOutsideFileBoundsException.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffValueOutsideFileBoundsException.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffValueOutsideFileBoundsException.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffValueOutsideFileBoundsException.java Thu Sep 27 20:04:11 2012
@@ -17,6 +17,8 @@
 package org.apache.commons.imaging.formats.tiff;
 
 public class TiffValueOutsideFileBoundsException extends Exception {
+    private static final long serialVersionUID = 5674955248527127823L;
+
     public TiffValueOutsideFileBoundsException(String message) {
         super(message);
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReader.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReader.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReader.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReader.java Thu Sep 27 20:04:11 2012
@@ -107,8 +107,6 @@ public abstract class DataReader impleme
         return samples;
     }
 
-    private int count = 0;
-
     protected byte[] decompress(byte compressed[], int compression,
             int expected_size, int tileWidth, int tileHeight)
             throws ImageReadException, IOException {
@@ -193,7 +191,6 @@ public abstract class DataReader impleme
         {
             byte unpacked[] = new PackBits().decompress(compressed,
                     expected_size);
-            count++;
 
             return unpacked;
         }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterBase.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterBase.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterBase.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterBase.java Thu Sep 27 20:04:11 2012
@@ -124,9 +124,9 @@ public abstract class TiffImageWriterBas
             }
 
             HashSet<Integer> fieldTags = new HashSet<Integer>();
-            List fields = directory.getFields();
+            List<TiffOutputField> fields = directory.getFields();
             for (int j = 0; j < fields.size(); j++) {
-                TiffOutputField field = (TiffOutputField) fields.get(j);
+                TiffOutputField field = fields.get(j);
 
                 if (fieldTags.contains(field.tag)) {
                     throw new ImageWriteException("Tag ("
@@ -244,10 +244,10 @@ public abstract class TiffImageWriterBas
         // Debug.debug();
     }
 
-    public void writeImage(BufferedImage src, OutputStream os, Map params)
+    public void writeImage(BufferedImage src, OutputStream os, Map<String,Object> params)
             throws ImageWriteException, IOException {
         // make copy of params; we'll clear keys as we consume them.
-        params = new HashMap(params);
+        params = new HashMap<String,Object>(params);
 
         // clear format key.
         if (params.containsKey(PARAM_KEY_FORMAT)) {
@@ -286,7 +286,7 @@ public abstract class TiffImageWriterBas
             }
             params.remove(PARAM_KEY_COMPRESSION);
         }
-        HashMap rawParams = new HashMap(params);
+        HashMap<String,Object> rawParams = new HashMap<String,Object>(params);
         params.remove(PARAM_KEY_T4_OPTIONS);
         params.remove(PARAM_KEY_T6_OPTIONS);
         if (params.size() > 0) {

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java Thu Sep 27 20:04:11 2012
@@ -115,7 +115,7 @@ public class TiffImageWriterLossless ext
             IOException {
         try {
             ByteSource byteSource = new ByteSourceArray(exifBytes);
-            Map params = null;
+            Map<String,Object> params = null;
             FormatCompliance formatCompliance = FormatCompliance.getDefault();
             TiffContents contents = new TiffReader(false).readContents(
                     byteSource, params, formatCompliance);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java Thu Sep 27 20:04:11 2012
@@ -73,13 +73,13 @@ public class WbmpImageParser extends Ima
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         WbmpHeader wbmpHeader = readWbmpHeader(byteSource);
         return new ImageInfo("WBMP", 1, new ArrayList<String>(),
@@ -91,14 +91,14 @@ public class WbmpImageParser extends Ima
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         WbmpHeader wbmpHeader = readWbmpHeader(byteSource);
         return new Dimension(wbmpHeader.width, wbmpHeader.height);
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -221,7 +221,7 @@ public class WbmpImageParser extends Ima
 
     @Override
     public final BufferedImage getBufferedImage(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         InputStream is = null;
         try {
             is = byteSource.getInputStream();
@@ -238,10 +238,10 @@ public class WbmpImageParser extends Ima
     }
 
     @Override
-    public void writeImage(BufferedImage src, OutputStream os, Map params)
+    public void writeImage(BufferedImage src, OutputStream os, Map<String,Object> params)
             throws ImageWriteException, IOException {
         // make copy of params; we'll clear keys as we consume them.
-        params = (params == null) ? new HashMap() : new HashMap(params);
+        params = (params == null) ? new HashMap<String,Object>() : new HashMap<String,Object>(params);
 
         // clear format key.
         if (params.containsKey(PARAM_KEY_FORMAT)) {
@@ -294,7 +294,7 @@ public class WbmpImageParser extends Ima
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
     @Override
-    public String getXmpXml(ByteSource byteSource, Map params)
+    public String getXmpXml(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xbm/XbmImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xbm/XbmImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xbm/XbmImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xbm/XbmImageParser.java Thu Sep 27 20:04:11 2012
@@ -79,13 +79,13 @@ public class XbmImageParser extends Imag
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         XbmHeader xbmHeader = readXbmHeader(byteSource);
         return new ImageInfo("XBM", 1, new ArrayList<String>(),
@@ -96,14 +96,14 @@ public class XbmImageParser extends Imag
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         XbmHeader xbmHeader = readXbmHeader(byteSource);
         return new Dimension(xbmHeader.width, xbmHeader.height);
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -305,7 +305,7 @@ public class XbmImageParser extends Imag
 
     @Override
     public final BufferedImage getBufferedImage(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         XbmParseResult result = parseXbmHeader(byteSource);
         return readXbmImage(result.xbmHeader, result.cParser);
     }
@@ -336,10 +336,10 @@ public class XbmImageParser extends Imag
     }
 
     @Override
-    public void writeImage(BufferedImage src, OutputStream os, Map params)
+    public void writeImage(BufferedImage src, OutputStream os, Map<String,Object> params)
             throws ImageWriteException, IOException {
         // make copy of params; we'll clear keys as we consume them.
-        params = (params == null) ? new HashMap() : new HashMap(params);
+        params = (params == null) ? new HashMap<String,Object>() : new HashMap<String,Object>(params);
 
         // clear format key.
         if (params.containsKey(PARAM_KEY_FORMAT)) {
@@ -419,7 +419,7 @@ public class XbmImageParser extends Imag
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
     @Override
-    public String getXmpXml(ByteSource byteSource, Map params)
+    public String getXmpXml(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java Thu Sep 27 20:04:11 2012
@@ -132,13 +132,13 @@ public class XpmImageParser extends Imag
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         XpmHeader xpmHeader = readXpmHeader(byteSource);
         boolean isTransparent = false;
@@ -165,14 +165,14 @@ public class XpmImageParser extends Imag
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         XpmHeader xpmHeader = readXpmHeader(byteSource);
         return new Dimension(xpmHeader.width, xpmHeader.height);
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -626,7 +626,7 @@ public class XpmImageParser extends Imag
 
     @Override
     public final BufferedImage getBufferedImage(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         XpmParseResult result = parseXpmHeader(byteSource);
         return readXpmImage(result.xpmHeader, result.cParser);
     }
@@ -673,10 +673,10 @@ public class XpmImageParser extends Imag
     }
 
     @Override
-    public void writeImage(BufferedImage src, OutputStream os, Map params)
+    public void writeImage(BufferedImage src, OutputStream os, Map<String,Object> params)
             throws ImageWriteException, IOException {
         // make copy of params; we'll clear keys as we consume them.
-        params = (params == null) ? new HashMap() : new HashMap(params);
+        params = (params == null) ? new HashMap<String,Object>() : new HashMap<String,Object>(params);
 
         // clear format key.
         if (params.containsKey(PARAM_KEY_FORMAT)) {
@@ -774,7 +774,7 @@ public class XpmImageParser extends Imag
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
     @Override
-    public String getXmpXml(ByteSource byteSource, Map params)
+    public String getXmpXml(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorSpaceSubset.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorSpaceSubset.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorSpaceSubset.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorSpaceSubset.java Thu Sep 27 20:04:11 2012
@@ -164,6 +164,8 @@ class ColorSpaceSubset {
     }
 
     public static class RgbComparator implements Comparator<ColorSpaceSubset>, Serializable {
+        private static final long serialVersionUID = 509214838111679029L;
+
         public int compare(ColorSpaceSubset c1, ColorSpaceSubset c2) {
             return c1.rgb - c2.rgb;
         }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/Debug.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/Debug.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/Debug.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/Debug.java Thu Sep 27 20:04:11 2012
@@ -25,7 +25,6 @@ import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
-import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -798,13 +797,10 @@ public final class Debug {
                 dump(prefix + "\t" + "list: " + i + ": ", list.get(i));
             }
         } else if (value instanceof Map) {
-            java.util.Map map = (java.util.Map) value;
+            java.util.Map<?,?> map = (java.util.Map<?,?>) value;
             debug(prefix, "map");
-            List keys = new ArrayList(map.keySet());
-            Collections.sort(keys);
-            for (int i = 0; i < keys.size(); i++) {
-                Object key = keys.get(i);
-                dump(prefix + "\t" + "map: " + key + " -> ", map.get(key));
+            for (Map.Entry<?,?> entry : map.entrySet()) {
+                dump(prefix + "\t" + "map: " + entry.getKey() + " -> ", entry.getValue());
             }
         // } else if (value instanceof String) {
         //     debug(prefix, value);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/ParamMap.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/ParamMap.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/ParamMap.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/ParamMap.java Thu Sep 27 20:04:11 2012
@@ -21,7 +21,7 @@ import java.util.Map;
 
 public class ParamMap {
 
-    public static boolean getParamBoolean(Map params, Object key,
+    public static boolean getParamBoolean(Map<String,Object> params, Object key,
             boolean default_value) {
         boolean result = default_value;
         Object o = params == null ? null : params.get(key);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/UnicodeUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/UnicodeUtils.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/UnicodeUtils.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/UnicodeUtils.java Thu Sep 27 20:04:11 2012
@@ -29,6 +29,8 @@ public abstract class UnicodeUtils imple
     }
 
     public static class UnicodeException extends Exception {
+        private static final long serialVersionUID = 5451109579672755601L;
+
         public UnicodeException(String message) {
             super(message);
         }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/ImagingTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/ImagingTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/ImagingTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/ImagingTest.java Thu Sep 27 20:04:11 2012
@@ -90,23 +90,23 @@ public abstract class ImagingTest extend
 
     protected File getTestImage(ImageFilter filter) throws IOException,
             ImageReadException {
-        List images = getTestImages(filter, 1);
+        List<File> images = getTestImages(filter, 1);
 
         assertTrue(images.size() > 0);
 
         return (File) images.get(0);
     }
 
-    protected List getTestImages() throws IOException, ImageReadException {
+    protected List<File> getTestImages() throws IOException, ImageReadException {
         return getTestImages(null, -1);
     }
 
-    protected List getTestImages(ImageFilter filter) throws IOException,
+    protected List<File> getTestImages(ImageFilter filter) throws IOException,
             ImageReadException {
         return getTestImages(filter, -1);
     }
 
-    private static final List ALL_IMAGES = new ArrayList();
+    private static final List<File> ALL_IMAGES = new ArrayList<File>();
 
     static {
         File imagesFolder = TEST_IMAGE_FOLDER;
@@ -131,9 +131,9 @@ public abstract class ImagingTest extend
         new FileSystemTraversal().traverseFiles(imagesFolder, visitor);
     }
 
-    protected List getTestImages(final ImageFilter filter, final int max)
+    protected List<File> getTestImages(final ImageFilter filter, final int max)
             throws IOException, ImageReadException {
-        final List images = new ArrayList();
+        final List<File> images = new ArrayList<File>();
         int counter = 0;
 
         for (int i = 0; i < ALL_IMAGES.size(); i++) {

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java Thu Sep 27 20:04:11 2012
@@ -38,7 +38,7 @@ import org.apache.commons.imaging.util.I
 public class ByteSourceImageTest extends ByteSourceTest {
 
     public void test() throws Exception {
-        List imageFiles = getTestImages();
+        List<File> imageFiles = getTestImages();
         for (int i = 0; i < imageFiles.size(); i++) {
             if (i % 1 == 0)
                 Debug.purgeMemory();
@@ -151,7 +151,7 @@ public class ByteSourceImageTest extends
     public void checkGetImageInfo(File imageFile, byte[] imageFileBytes)
             throws IOException, ImageReadException, IllegalAccessException,
             IllegalArgumentException, InvocationTargetException {
-        Map params = new HashMap();
+        Map<String,Object> params = new HashMap<String,Object>();
         boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
         ImageFormat imageFormat = Imaging.guessFormat(imageFile);
         if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_TIFF)
@@ -178,8 +178,8 @@ public class ByteSourceImageTest extends
             // if (method.getGenericParameterTypes().length > 0)
             // continue;
 
-            Object valueFile = method.invoke(imageInfoFile, null);
-            Object valueBytes = method.invoke(imageInfoBytes, null);
+            Object valueFile = method.invoke(imageInfoFile, (Object[])null);
+            Object valueBytes = method.invoke(imageInfoBytes, (Object[])null);
 
             assertTrue(valueFile.equals(valueBytes));
         }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java Thu Sep 27 20:04:11 2012
@@ -212,7 +212,7 @@ public class ApacheImagingSpeedAndMemory
 
                 // ready the parser (you may modify this code block
                 // to use your parser of choice)
-                HashMap params = new HashMap();
+                HashMap<String,Object> params = new HashMap<String,Object>();
                 TiffImageParser tiffImageParser = new TiffImageParser();
 
                 // load the file and record time needed to do so

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageReadExample.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageReadExample.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageReadExample.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageReadExample.java Thu Sep 27 20:04:11 2012
@@ -34,7 +34,7 @@ import org.apache.commons.imaging.common
 public class ImageReadExample {
     public static BufferedImage imageReadExample(File file)
             throws ImageReadException, IOException {
-        Map params = new HashMap();
+        Map<String,Object> params = new HashMap<String,Object>();
 
         // set optional parameters if you like
         params.put(ImagingConstants.BUFFERED_IMAGE_FACTORY,

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java Thu Sep 27 20:04:11 2012
@@ -36,7 +36,7 @@ public class ImageWriteExample {
         BufferedImage image = Imaging.getBufferedImage(file);
 
         ImageFormat format = ImageFormat.IMAGE_FORMAT_TIFF;
-        Map params = new HashMap();
+        Map<String,Object> params = new HashMap<String,Object>();
 
         // set optional parameters if you like
         params.put(ImagingConstants.PARAM_KEY_COMPRESSION, new Integer(

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java Thu Sep 27 20:04:11 2012
@@ -23,6 +23,7 @@ import java.util.List;
 import org.apache.commons.imaging.ImageReadException;
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.IImageMetadata;
+import org.apache.commons.imaging.common.IImageMetadata.IImageMetadataItem;
 import org.apache.commons.imaging.common.RationalNumber;
 import org.apache.commons.imaging.formats.jpeg.JpegImageMetadata;
 import org.apache.commons.imaging.formats.tiff.TiffField;
@@ -142,9 +143,9 @@ public class MetadataExample {
 
             System.out.println();
 
-            List items = jpegMetadata.getItems();
+            List<IImageMetadataItem> items = jpegMetadata.getItems();
             for (int i = 0; i < items.size(); i++) {
-                Object item = items.get(i);
+                IImageMetadataItem item = items.get(i);
                 System.out.println("    " + "item: " + item);
             }
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java Thu Sep 27 20:04:11 2012
@@ -65,7 +65,7 @@ public class SampleUsage {
             BufferedImage image = someImage;
             File dst = someFile;
             ImageFormat format = ImageFormat.IMAGE_FORMAT_PNG;
-            Map optional_params = new HashMap();
+            Map<String,Object> optional_params = new HashMap<String,Object>();
             Imaging.writeImage(image, dst, format, optional_params);
 
             OutputStream os = someOutputStream;
@@ -96,7 +96,7 @@ public class SampleUsage {
             // TIFF). </b>
             // <b>org.w3c.dom.Node node =
             // Sanselan.getMetadataObsolete(imageBytes); </b>
-            IImageMetadata metdata = Imaging.getMetadata(imageBytes);
+            IImageMetadata metadata = Imaging.getMetadata(imageBytes);
 
             // <b>print a dump of information about an image to stdout. </b>
             Imaging.dumpImageFile(imageBytes);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpBaseTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpBaseTest.java Thu Sep 27 20:04:11 2012
@@ -40,7 +40,7 @@ public abstract class BmpBaseTest extend
         }
     };
 
-    protected List getBmpImages() throws IOException, ImageReadException {
+    protected List<File> getBmpImages() throws IOException, ImageReadException {
         return getTestImages(IMAGE_FILTER);
     }
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpReadTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpReadTest.java Thu Sep 27 20:04:11 2012
@@ -33,7 +33,7 @@ public class BmpReadTest extends BmpBase
     public void test() throws Exception {
         Debug.debug("start");
 
-        List images = getBmpImages();
+        List<File> images = getBmpImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
@@ -44,7 +44,7 @@ public class BmpReadTest extends BmpBase
             IImageMetadata metadata = Imaging.getMetadata(imageFile);
             // assertNotNull(metadata);
 
-            Map params = new HashMap();
+            Map<String,Object> params = new HashMap<String,Object>();
             // params.put(PARAM_KEY_VERBOSE, Boolean.TRUE);
             ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
             assertNotNull(imageInfo);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java Thu Sep 27 20:04:11 2012
@@ -124,7 +124,7 @@ public class BmpRoundtripTest extends Bm
             ImageReadException, ImageWriteException {
         BufferedImage srcImage = imageDataToBufferedImage(rawData);
 
-        Map writeParams = new HashMap();
+        Map<String,Object> writeParams = new HashMap<String,Object>();
         // writeParams.put(SanselanConstants.PARAM_KEY_FORMAT,
         // ImageFormat.IMAGE_FORMAT_BMP);
         // writeParams.put(PngConstants.PARAM_KEY_BMP_FORCE_TRUE_COLOR,

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxBaseTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxBaseTest.java Thu Sep 27 20:04:11 2012
@@ -40,7 +40,7 @@ public abstract class DcxBaseTest extend
         }
     };
 
-    protected List getDcxImages() throws IOException, ImageReadException {
+    protected List<File> getDcxImages() throws IOException, ImageReadException {
         return getTestImages(IMAGE_FILTER);
     }
 }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxReadTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxReadTest.java Thu Sep 27 20:04:11 2012
@@ -33,7 +33,7 @@ public class DcxReadTest extends DcxBase
     public void test() throws Exception {
         Debug.debug("start");
 
-        List images = getDcxImages();
+        List<File> images = getDcxImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
@@ -44,7 +44,7 @@ public class DcxReadTest extends DcxBase
             IImageMetadata metadata = Imaging.getMetadata(imageFile);
             // assertNotNull(metadata);
 
-            Map params = new HashMap();
+            Map<String,Object> params = new HashMap<String,Object>();
             ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
             // assertNotNull(imageInfo);
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifBaseTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifBaseTest.java Thu Sep 27 20:04:11 2012
@@ -40,7 +40,7 @@ public abstract class GifBaseTest extend
         }
     };
 
-    protected List getGifImages() throws IOException, ImageReadException {
+    protected List<File> getGifImages() throws IOException, ImageReadException {
         return getTestImages(IMAGE_FILTER);
     }
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java Thu Sep 27 20:04:11 2012
@@ -31,7 +31,7 @@ public class GifReadTest extends GifBase
     public void test() throws Exception {
         Debug.debug("start");
 
-        List images = getGifImages();
+        List<File> images = getGifImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java Thu Sep 27 20:04:11 2012
@@ -40,7 +40,7 @@ public abstract class IcnsBaseTest exten
         }
     };
 
-    protected List getIcnsImages() throws IOException, ImageReadException {
+    protected List<File> getIcnsImages() throws IOException, ImageReadException {
         return getTestImages(IMAGE_FILTER);
     }
 }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java Thu Sep 27 20:04:11 2012
@@ -33,7 +33,7 @@ public class IcnsReadTest extends IcnsBa
     public void test() throws Exception {
         Debug.debug("start");
 
-        List images = getIcnsImages();
+        List<File> images = getIcnsImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
@@ -44,7 +44,7 @@ public class IcnsReadTest extends IcnsBa
             IImageMetadata metadata = Imaging.getMetadata(imageFile);
             // assertNotNull(metadata);
 
-            Map params = new HashMap();
+            Map<String,Object> params = new HashMap<String,Object>();
             ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
             assertNotNull(imageInfo);
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoBaseTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoBaseTest.java Thu Sep 27 20:04:11 2012
@@ -37,7 +37,7 @@ public abstract class IcoBaseTest extend
         }
     };
 
-    protected List getIcoImages() throws IOException, ImageReadException {
+    protected List<File> getIcoImages() throws IOException, ImageReadException {
         return getTestImages(IMAGE_FILTER);
     }
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java Thu Sep 27 20:04:11 2012
@@ -33,7 +33,7 @@ public class IcoReadTest extends IcoBase
     public void test() throws Exception {
         Debug.debug("start");
 
-        List images = getIcoImages();
+        List<File> images = getIcoImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
@@ -44,7 +44,7 @@ public class IcoReadTest extends IcoBase
             IImageMetadata metadata = Imaging.getMetadata(imageFile);
             // assertNotNull(metadata);
 
-            Map params = new HashMap();
+            Map<String,Object> params = new HashMap<String,Object>();
             ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
             // assertNotNull(imageInfo);
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoRoundtripTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoRoundtripTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoRoundtripTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoRoundtripTest.java Thu Sep 27 20:04:11 2012
@@ -53,15 +53,15 @@ public class IcoRoundtripTest extends Ic
         {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
     };
 
-    private Map generatorMap = new HashMap();
+    private Map<Integer,BitmapGenerator> generatorMap = new HashMap<Integer,BitmapGenerator>();
 
     public IcoRoundtripTest() {
-        generatorMap.put(new Integer(1), new GeneratorFor1BitBitmaps());
-        generatorMap.put(new Integer(4), new GeneratorFor4BitBitmaps());
-        generatorMap.put(new Integer(8), new GeneratorFor8BitBitmaps());
-        generatorMap.put(new Integer(16), new GeneratorFor16BitBitmaps());
-        generatorMap.put(new Integer(24), new GeneratorFor24BitBitmaps());
-        generatorMap.put(new Integer(32), new GeneratorFor32BitBitmaps());
+        generatorMap.put(1, new GeneratorFor1BitBitmaps());
+        generatorMap.put(4, new GeneratorFor4BitBitmaps());
+        generatorMap.put(8, new GeneratorFor8BitBitmaps());
+        generatorMap.put(16, new GeneratorFor16BitBitmaps());
+        generatorMap.put(24, new GeneratorFor24BitBitmaps());
+        generatorMap.put(32, new GeneratorFor32BitBitmaps());
     }
 
     private static interface BitmapGenerator {
@@ -321,11 +321,9 @@ public class IcoRoundtripTest extends Ic
     public void testNormalIcons() throws Exception {
         final int foreground = 0xFFF000E0;
         final int background = 0xFF102030;
-        for (Iterator it = generatorMap.entrySet().iterator(); it.hasNext();) {
-            Map.Entry entry = (Map.Entry) it.next();
-            int bitDepth = ((Integer) entry.getKey()).intValue();
-            BitmapGenerator bitmapGenerator = (BitmapGenerator) entry
-                    .getValue();
+        for (Map.Entry<Integer,BitmapGenerator> entry : generatorMap.entrySet()) {
+            int bitDepth = entry.getKey();
+            BitmapGenerator bitmapGenerator = entry.getValue();
 
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             BinaryOutputStream bos = new BinaryOutputStream(baos,
@@ -347,11 +345,9 @@ public class IcoRoundtripTest extends Ic
         final int foreground = 0xFFF000E0;
         final int background = 0xFF102030;
         // Windows ignores the ICONDIRENTRY values when parsing the ICO file.
-        for (Iterator it = generatorMap.entrySet().iterator(); it.hasNext();) {
-            Map.Entry entry = (Map.Entry) it.next();
-            int bitDepth = ((Integer) entry.getKey()).intValue();
-            BitmapGenerator bitmapGenerator = (BitmapGenerator) entry
-                    .getValue();
+        for (Map.Entry<Integer,BitmapGenerator> entry : generatorMap.entrySet()) {
+            int bitDepth = entry.getKey();
+            BitmapGenerator bitmapGenerator = entry.getValue();
 
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             BinaryOutputStream bos = new BinaryOutputStream(baos,
@@ -391,11 +387,9 @@ public class IcoRoundtripTest extends Ic
     public void testColorsUsed() throws Exception {
         final int foreground = 0xFFF000E0;
         final int background = 0xFF102030;
-        for (Iterator it = generatorMap.entrySet().iterator(); it.hasNext();) {
-            Map.Entry entry = (Map.Entry) it.next();
-            int bitDepth = ((Integer) entry.getKey()).intValue();
-            BitmapGenerator bitmapGenerator = (BitmapGenerator) entry
-                    .getValue();
+        for (Map.Entry<Integer,BitmapGenerator> entry : generatorMap.entrySet()) {
+            int bitDepth = entry.getKey();
+            BitmapGenerator bitmapGenerator = entry.getValue();
 
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             BinaryOutputStream bos = new BinaryOutputStream(baos,
@@ -415,11 +409,9 @@ public class IcoRoundtripTest extends Ic
     public void testZeroColorPlanes() throws Exception {
         final int foreground = 0xFFF000E0;
         final int background = 0xFF102030;
-        for (Iterator it = generatorMap.entrySet().iterator(); it.hasNext();) {
-            Map.Entry entry = (Map.Entry) it.next();
-            int bitDepth = ((Integer) entry.getKey()).intValue();
-            BitmapGenerator bitmapGenerator = (BitmapGenerator) entry
-                    .getValue();
+        for (Map.Entry<Integer,BitmapGenerator> entry : generatorMap.entrySet()) {
+            int bitDepth = entry.getKey();
+            BitmapGenerator bitmapGenerator = entry.getValue();
 
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             BinaryOutputStream bos = new BinaryOutputStream(baos,

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegBaseTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegBaseTest.java Thu Sep 27 20:04:11 2012
@@ -40,7 +40,7 @@ public abstract class JpegBaseTest exten
         }
     };
 
-    protected List getJpegImages() throws IOException, ImageReadException {
+    protected List<File> getJpegImages() throws IOException, ImageReadException {
         return getTestImages(imageFilter);
     }
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegReadTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegReadTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegReadTest.java Thu Sep 27 20:04:11 2012
@@ -30,7 +30,7 @@ import org.apache.commons.imaging.util.D
 public class JpegReadTest extends JpegBaseTest {
 
     public void test() throws Exception {
-        List images = getJpegImages();
+        List<File> images = getJpegImages();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
@@ -41,7 +41,7 @@ public class JpegReadTest extends JpegBa
             // ByteSource byteSource = new ByteSourceFile(imageFile);
             // new JpegUtils().dumpJFIF(byteSource);
 
-            Map params = new HashMap();
+            Map<String,Object> params = new HashMap<String,Object>();
             boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
             params.put(PARAM_KEY_READ_THUMBNAILS, new Boolean(!ignoreImageData));
 

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegWithJpegThumbnailTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegWithJpegThumbnailTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegWithJpegThumbnailTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegWithJpegThumbnailTest.java Thu Sep 27 20:04:11 2012
@@ -32,7 +32,7 @@ public class JpegWithJpegThumbnailTest e
     public void testSingleImage() throws Exception {
         File imageFile = getTestImageByName("img_F028c_small.jpg");
 
-        Map params = new HashMap();
+        Map<String,Object> params = new HashMap<String,Object>();
         IImageMetadata metadata = Imaging.getMetadata(imageFile, params);
         assertNotNull(metadata);
         JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/AsciiFieldTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/AsciiFieldTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/AsciiFieldTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/AsciiFieldTest.java Thu Sep 27 20:04:11 2012
@@ -37,7 +37,7 @@ public class AsciiFieldTest extends Exif
     public void testSingleImage() throws Exception {
         File imageFile = getTestImageByName("Canon Powershot SD750 - 2007.12.26.n.IMG_3704.JPG");
 
-        Map params = new HashMap();
+        Map<String,Object> params = new HashMap<String,Object>();
 
         IImageMetadata metadata = Imaging.getMetadata(imageFile, params);
         assertNotNull(metadata);
@@ -48,32 +48,32 @@ public class AsciiFieldTest extends Exif
         if (null == exif)
             return;
 
-        List fields = exif.getAllFields();
-        Map fieldMap = new Hashtable();
+        List<TiffField> fields = exif.getAllFields();
+        Map<Integer,TiffField> fieldMap = new Hashtable<Integer,TiffField>();
         // Build a simplified field tag -> field map, ignoring directory
         // structures.
         // Good enough for our purposes, since the image in question is known.
         for (int i = 0; i < fields.size(); i++) {
-            TiffField field = (TiffField) fields.get(i);
-            fieldMap.put(new Integer(field.tag), field);
+            TiffField field = fields.get(i);
+            fieldMap.put(field.tag, field);
         }
 
-        Map expectedFieldValues = new Hashtable();
+        Map<Integer,Object> expectedFieldValues = new Hashtable<Integer,Object>();
         expectedFieldValues.put(
-                new Integer(TiffTagConstants.TIFF_TAG_MAKE.tag), "Canon");
+                TiffTagConstants.TIFF_TAG_MAKE.tag, "Canon");
         expectedFieldValues.put(
-                new Integer(TiffTagConstants.TIFF_TAG_MODEL.tag),
+                TiffTagConstants.TIFF_TAG_MODEL.tag,
                 "Canon PowerShot SD750");
-        expectedFieldValues
-                .put(new Integer(TiffTagConstants.TIFF_TAG_DATE_TIME.tag),
-                        "2007:12:25 13:34:39");
-        Iterator expectedTags = expectedFieldValues.keySet().iterator();
+        expectedFieldValues.put(
+                TiffTagConstants.TIFF_TAG_DATE_TIME.tag,
+                "2007:12:25 13:34:39");
+        Iterator<Integer> expectedTags = expectedFieldValues.keySet().iterator();
         while (expectedTags.hasNext()) {
-            Integer tag = (Integer) expectedTags.next();
+            Integer tag = expectedTags.next();
             Object expectedValue = expectedFieldValues.get(tag);
 
             assertTrue(fieldMap.containsKey(tag));
-            TiffField field = (TiffField) fieldMap.get(tag);
+            TiffField field = fieldMap.get(tag);
             assertNotNull(field);
             Object value = field.getValue();
             assertNotNull(value);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifBaseTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifBaseTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifBaseTest.java Thu Sep 27 20:04:11 2012
@@ -71,12 +71,12 @@ public abstract class ExifBaseTest exten
         return getTestImage(HAS_EXIF_IMAGE_FILTER);
     }
 
-    protected List getImagesWithExifData() throws IOException,
+    protected List<File> getImagesWithExifData() throws IOException,
             ImageReadException {
         return getTestImages(HAS_EXIF_IMAGE_FILTER);
     }
 
-    protected List getImagesWithExifData(int max) throws IOException,
+    protected List<File> getImagesWithExifData(int max) throws IOException,
             ImageReadException {
         return getTestImages(HAS_EXIF_IMAGE_FILTER, max);
     }
@@ -85,11 +85,11 @@ public abstract class ExifBaseTest exten
         return getTestImage(JPEG_IMAGE_FILTER);
     }
 
-    protected List getJpegImages() throws IOException, ImageReadException {
+    protected List<File> getJpegImages() throws IOException, ImageReadException {
         return getTestImages(JPEG_IMAGE_FILTER);
     }
 
-    protected List getJpegImages(int max) throws IOException,
+    protected List<File> getJpegImages(int max) throws IOException,
             ImageReadException {
         return getTestImages(JPEG_IMAGE_FILTER, max);
     }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifDumpTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifDumpTest.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifDumpTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifDumpTest.java Thu Sep 27 20:04:11 2012
@@ -36,7 +36,7 @@ public class ExifDumpTest extends ExifBa
     // }
 
     public void test() throws Exception {
-        List images = getImagesWithExifData();
+        List<File> images = getImagesWithExifData();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
@@ -49,7 +49,7 @@ public class ExifDumpTest extends ExifBa
             Debug.debug("Segments:");
             new JpegUtils().dumpJFIF(byteSource);
 
-            Map params = new HashMap();
+            Map<String,Object> params = new HashMap<String,Object>();
             boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
             params.put(PARAM_KEY_READ_THUMBNAILS, new Boolean(!ignoreImageData));
 

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=1391192&r1=1391191&r2=1391192&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 Thu Sep 27 20:04:11 2012
@@ -52,7 +52,7 @@ public class ExifRewriteTest extends Exi
     // }
 
     public void testRemove() throws Exception {
-        List images = getImagesWithExifData();
+        List<File> images = getImagesWithExifData();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
@@ -91,7 +91,7 @@ public class ExifRewriteTest extends Exi
     }
 
     public void testInsert() throws Exception {
-        List images = getImagesWithExifData();
+        List<File> images = getImagesWithExifData();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();
@@ -170,7 +170,7 @@ public class ExifRewriteTest extends Exi
 
     private void rewrite(Rewriter rewriter, String name) throws IOException,
             ImageReadException, ImageWriteException {
-        List images = getImagesWithExifData();
+        List<File> images = getImagesWithExifData();
         for (int i = 0; i < images.size(); i++) {
             if (i % 10 == 0)
                 Debug.purgeMemory();



Mime
View raw message