commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1391192 [1/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
Author: damjan
Date: Thu Sep 27 20:04:11 2012
New Revision: 1391192

URL: http://svn.apache.org/viewvc?rev=1391192&view=rev
Log:
Fix all issues with generics in the main code, and some in the tests.


Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumberUtilities.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/pixelparsers/PixelParserRle.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/dcx/DcxImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/icns/IcnsImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/ico/IcoImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegUtils.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java
    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/JpegIptcRewriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/App13Segment.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegRewriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PbmWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PgmWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PpmWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffValueOutsideFileBoundsException.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReader.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterBase.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xbm/XbmImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorSpaceSubset.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/Debug.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/ParamMap.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/UnicodeUtils.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/ImagingTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ApacheImagingSpeedAndMemoryTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageReadExample.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpBaseTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxBaseTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/dcx/DcxReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifBaseTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoBaseTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoRoundtripTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegBaseTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegWithJpegThumbnailTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/AsciiFieldTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifBaseTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifDumpTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImageParser.java Thu Sep 27 20:04:11 2012
@@ -152,7 +152,7 @@ public abstract class ImageParser extend
      * implementation.
      * @throws IOException In the event of unsuccessful data read operation. 
      */
-    public abstract IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public abstract IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException;
 
     
@@ -198,7 +198,7 @@ public abstract class ImageParser extend
      * implementation.
      * @throws IOException In the event of unsuccessful data read operation. 
      */
-    public final IImageMetadata getMetadata(byte bytes[], Map params)
+    public final IImageMetadata getMetadata(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getMetadata(new ByteSourceArray(bytes), params);
     }
@@ -248,7 +248,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful file read or
      * access operation.
      */
-    public final IImageMetadata getMetadata(File file, Map params)
+    public final IImageMetadata getMetadata(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         if (debug) {
             System.out.println(getName() + ".getMetadata" + ": "
@@ -287,7 +287,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful data
      * access operation.
      */
-    public abstract ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public abstract ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException;
 
     
@@ -336,7 +336,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful data
      * access operation.
      */
-    public final ImageInfo getImageInfo(byte bytes[], Map params)
+    public final ImageInfo getImageInfo(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceArray(bytes), params);
     }
@@ -364,7 +364,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful file read or
      * access operation.
      */
-    public final ImageInfo getImageInfo(File file, Map params)
+    public final ImageInfo getImageInfo(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         if (!canAcceptExtension(file)) {
             return null;
@@ -499,7 +499,7 @@ public abstract class ImageParser extend
      * access operation.
      */
     public abstract BufferedImage getBufferedImage(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException;
+            Map<String,Object> params) throws ImageReadException, IOException;
 
      /**
      * Gets a buffered image specified by the byte array (for 
@@ -516,7 +516,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public final BufferedImage getBufferedImage(byte bytes[], Map params)
+    public final BufferedImage getBufferedImage(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getBufferedImage(new ByteSourceArray(bytes), params);
     }
@@ -536,7 +536,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public final BufferedImage getBufferedImage(File file, Map params)
+    public final BufferedImage getBufferedImage(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         if (!canAcceptExtension(file)) {
             return null;
@@ -566,7 +566,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of an write error from
      * the output stream.
      */
-    public void writeImage(BufferedImage src, OutputStream os, Map params)
+    public void writeImage(BufferedImage src, OutputStream os, Map<String,Object> params)
             throws ImageWriteException, IOException {
         try {
             os.close(); // we are obligated to close stream.
@@ -605,7 +605,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public final Dimension getImageSize(byte bytes[], Map params)
+    public final Dimension getImageSize(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getImageSize(new ByteSourceArray(bytes), params);
     }
@@ -638,7 +638,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public final Dimension getImageSize(File file, Map params)
+    public final Dimension getImageSize(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
 
         if (!canAcceptExtension(file)) {
@@ -660,7 +660,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public abstract Dimension getImageSize(ByteSource byteSource, Map params)
+    public abstract Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException;
     
     
@@ -681,7 +681,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public abstract String getXmpXml(ByteSource byteSource, Map params)
+    public abstract String getXmpXml(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException;
 
     
@@ -717,7 +717,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public final byte[] getICCProfileBytes(byte bytes[], Map params)
+    public final byte[] getICCProfileBytes(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getICCProfileBytes(new ByteSourceArray(bytes), params);
     }
@@ -753,7 +753,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public final byte[] getICCProfileBytes(File file, Map params)
+    public final byte[] getICCProfileBytes(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         if (!canAcceptExtension(file)) {
             return null;
@@ -781,7 +781,7 @@ public abstract class ImageParser extend
      * @throws IOException In the event of unsuccessful read or
      * access operation.
      */
-    public abstract byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public abstract byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException;
 
     
@@ -967,7 +967,7 @@ public abstract class ImageParser extend
      * @return A valid instance of an implementation of a 
      * IBufferedImageFactory.
      */
-    protected IBufferedImageFactory getBufferedImageFactory(Map params) {
+    protected IBufferedImageFactory getBufferedImageFactory(Map<String,Object> params) {
         if (params == null) {
             return new SimpleBufferedImageFactory();
         }
@@ -991,7 +991,7 @@ public abstract class ImageParser extend
      * @return If the params specify strict format compliance, true;
      * otherwise, false.
      */
-    public static final boolean isStrict(Map params) {
+    public static final boolean isStrict(Map<String,Object> params) {
         if (params == null || !params.containsKey(PARAM_KEY_STRICT)) {
             return false;
         }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java Thu Sep 27 20:04:11 2012
@@ -337,7 +337,7 @@ public abstract class Imaging implements
      * @return An instance of ICC_Profile or null if the image contains no ICC
      *         profile..
      */
-    public static ICC_Profile getICCProfile(byte bytes[], Map params)
+    public static ICC_Profile getICCProfile(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getICCProfile(new ByteSourceArray(bytes), params);
     }
@@ -374,7 +374,7 @@ public abstract class Imaging implements
      *         profile..
      */
     public static ICC_Profile getICCProfile(InputStream is, String filename,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         return getICCProfile(new ByteSourceInputStream(is, filename), params);
     }
 
@@ -405,12 +405,12 @@ public abstract class Imaging implements
      * @return An instance of ICC_Profile or null if the image contains no ICC
      *         profile..
      */
-    public static ICC_Profile getICCProfile(File file, Map params)
+    public static ICC_Profile getICCProfile(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         return getICCProfile(new ByteSourceFile(file), params);
     }
 
-    protected static ICC_Profile getICCProfile(ByteSource byteSource, Map params)
+    protected static ICC_Profile getICCProfile(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         byte bytes[] = getICCProfileBytes(byteSource, params);
         if (bytes == null) {
@@ -465,7 +465,7 @@ public abstract class Imaging implements
      * @see IccProfileParser
      * @see ICC_Profile
      */
-    public static byte[] getICCProfileBytes(byte bytes[], Map params)
+    public static byte[] getICCProfileBytes(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getICCProfileBytes(new ByteSourceArray(bytes), params);
     }
@@ -505,12 +505,12 @@ public abstract class Imaging implements
      * @see IccProfileParser
      * @see ICC_Profile
      */
-    public static byte[] getICCProfileBytes(File file, Map params)
+    public static byte[] getICCProfileBytes(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         return getICCProfileBytes(new ByteSourceFile(file), params);
     }
 
-    private static byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    private static byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ImageParser imageParser = getImageParser(byteSource);
 
@@ -536,7 +536,7 @@ public abstract class Imaging implements
      * @see ImageInfo
      */
     public static ImageInfo getImageInfo(String filename, byte bytes[],
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceArray(filename, bytes), params);
     }
 
@@ -601,7 +601,7 @@ public abstract class Imaging implements
      * @see ImageInfo
      */
     public static ImageInfo getImageInfo(InputStream is, String filename,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceInputStream(is, filename), params);
     }
 
@@ -640,7 +640,7 @@ public abstract class Imaging implements
      * @return An instance of ImageInfo.
      * @see ImageInfo
      */
-    public static ImageInfo getImageInfo(byte bytes[], Map params)
+    public static ImageInfo getImageInfo(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceArray(bytes), params);
     }
@@ -661,7 +661,7 @@ public abstract class Imaging implements
      * @return An instance of ImageInfo.
      * @see ImageInfo
      */
-    public static ImageInfo getImageInfo(File file, Map params)
+    public static ImageInfo getImageInfo(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         return getImageInfo(new ByteSourceFile(file), params);
     }
@@ -685,7 +685,7 @@ public abstract class Imaging implements
         return getImageInfo(file, null);
     }
 
-    private static ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    private static ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ImageParser imageParser = getImageParser(byteSource);
 
@@ -754,7 +754,7 @@ public abstract class Imaging implements
      * @return The width and height of the image.
      */
     public static Dimension getImageSize(InputStream is, String filename,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         return getImageSize(new ByteSourceInputStream(is, filename), params);
     }
 
@@ -781,7 +781,7 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return The width and height of the image.
      */
-    public static Dimension getImageSize(byte bytes[], Map params)
+    public static Dimension getImageSize(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getImageSize(new ByteSourceArray(bytes), params);
     }
@@ -809,12 +809,12 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return The width and height of the image.
      */
-    public static Dimension getImageSize(File file, Map params)
+    public static Dimension getImageSize(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         return getImageSize(new ByteSourceFile(file), params);
     }
 
-    public static Dimension getImageSize(ByteSource byteSource, Map params)
+    public static Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ImageParser imageParser = getImageParser(byteSource);
 
@@ -848,7 +848,7 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(InputStream is, String filename, Map params)
+    public static String getXmpXml(InputStream is, String filename, Map<String,Object> params)
             throws ImageReadException, IOException {
         return getXmpXml(new ByteSourceInputStream(is, filename), params);
     }
@@ -876,7 +876,7 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(byte bytes[], Map params)
+    public static String getXmpXml(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getXmpXml(new ByteSourceArray(bytes), params);
     }
@@ -904,7 +904,7 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(File file, Map params)
+    public static String getXmpXml(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         return getXmpXml(new ByteSourceFile(file), params);
     }
@@ -919,7 +919,7 @@ public abstract class Imaging implements
      *            Map of optional parameters, defined in ImagingConstants.
      * @return Xmp Xml as String, if present. Otherwise, returns null.
      */
-    public static String getXmpXml(ByteSource byteSource, Map params)
+    public static String getXmpXml(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ImageParser imageParser = getImageParser(byteSource);
 
@@ -969,7 +969,7 @@ public abstract class Imaging implements
      * @return An instance of IImageMetadata.
      * @see IImageMetadata
      */
-    public static IImageMetadata getMetadata(byte bytes[], Map params)
+    public static IImageMetadata getMetadata(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getMetadata(new ByteSourceArray(bytes), params);
     }
@@ -1022,7 +1022,7 @@ public abstract class Imaging implements
      * @see IImageMetadata
      */
     public static IImageMetadata getMetadata(InputStream is, String filename,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         return getMetadata(new ByteSourceInputStream(is, filename), params);
     }
 
@@ -1069,12 +1069,12 @@ public abstract class Imaging implements
      * @return An instance of IImageMetadata.
      * @see IImageMetadata
      */
-    public static IImageMetadata getMetadata(File file, Map params)
+    public static IImageMetadata getMetadata(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         return getMetadata(new ByteSourceFile(file), params);
     }
 
-    private static IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    private static IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ImageParser imageParser = getImageParser(byteSource);
 
@@ -1257,7 +1257,7 @@ public abstract class Imaging implements
      * while reading an image (i.e. a format violation, etc.).
      * @throws IOException  in the event of an unrecoverable I/O exception.
      */
-    public static BufferedImage getBufferedImage(InputStream is, Map params)
+    public static BufferedImage getBufferedImage(InputStream is, Map<String,Object> params)
             throws ImageReadException, IOException {
         String filename = null;
         if (params != null && params.containsKey(PARAM_KEY_FILENAME)) {
@@ -1307,7 +1307,7 @@ public abstract class Imaging implements
      * while reading an image (i.e. a format violation, etc.).
      * @throws IOException  in the event of an unrecoverable I/O exception.
      */ 
-    public static BufferedImage getBufferedImage(byte bytes[], Map params)
+    public static BufferedImage getBufferedImage(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         return getBufferedImage(new ByteSourceArray(bytes), params);
     }
@@ -1355,7 +1355,7 @@ public abstract class Imaging implements
      * while reading an image (i.e. a format violation, etc.).
      * @throws IOException  in the event of an unrecoverable I/O exception.
      */
-    public static BufferedImage getBufferedImage(File file, Map params)
+    public static BufferedImage getBufferedImage(File file, Map<String,Object> params)
             throws ImageReadException, IOException {
         return getBufferedImage(new ByteSourceFile(file), params);
     }
@@ -1363,10 +1363,10 @@ public abstract class Imaging implements
     
     
     private static BufferedImage getBufferedImage(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         ImageParser imageParser = getImageParser(byteSource);
         if (null == params) {
-            params = new HashMap();
+            params = new HashMap<String,Object>();
         }
 
         return imageParser.getBufferedImage(byteSource, params);
@@ -1396,7 +1396,7 @@ public abstract class Imaging implements
      * @see ImagingConstants
      */    
     public static void writeImage(BufferedImage src, File file,
-            ImageFormat format, Map params) throws ImageWriteException,
+            ImageFormat format, Map<String,Object> params) throws ImageWriteException,
             IOException {
         OutputStream os = null;
 
@@ -1441,7 +1441,7 @@ public abstract class Imaging implements
      * @see ImagingConstants
      */   
     public static byte[] writeImageToBytes(BufferedImage src,
-            ImageFormat format, Map params) throws ImageWriteException,
+            ImageFormat format, Map<String,Object> params) throws ImageWriteException,
             IOException {
         ByteArrayOutputStream os = new ByteArrayOutputStream();
 
@@ -1475,16 +1475,16 @@ public abstract class Imaging implements
      * @see ImagingConstants
      */    
     public static void writeImage(BufferedImage src, OutputStream os,
-            ImageFormat format, Map params) throws ImageWriteException,
+            ImageFormat format, Map<String,Object> params) throws ImageWriteException,
             IOException {
         ImageParser imageParsers[] = ImageParser.getAllImageParsers();
 
         // make sure params are non-null
         if (params == null) {
-            params = new HashMap();
+            params = new HashMap<String,Object>();
         }
 
-        params.put(PARAM_KEY_FORMAT, format);
+        params.put(PARAM_KEY_FORMAT, (Object)format);
 
         for (int i = 0; i < imageParsers.length; i++) {
             ImageParser imageParser = imageParsers[i];

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumberUtilities.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumberUtilities.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumberUtilities.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/RationalNumberUtilities.java Thu Sep 27 20:04:11 2012
@@ -18,6 +18,8 @@ package org.apache.commons.imaging.commo
 
 public abstract class RationalNumberUtilities extends Number {
 
+    private static final long serialVersionUID = 4636553158238799602L;
+
     private static class Option {
         public final RationalNumber rationalNumber;
         public final double error;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java Thu Sep 27 20:04:11 2012
@@ -96,10 +96,6 @@ public class MyLzwCompressor {
         private final int length;
         private final int hash;
 
-        public ByteArray(byte bytes[]) {
-            this(bytes, 0, bytes.length);
-        }
-
         public ByteArray(byte bytes[], int start, int length) {
             this.bytes = bytes;
             this.start = start;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java Thu Sep 27 20:04:11 2012
@@ -517,16 +517,16 @@ public class BmpImageParser extends Imag
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, 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);
 
         boolean verbose = ParamMap.getParamBoolean(params, PARAM_KEY_VERBOSE,
                 false);
@@ -560,7 +560,7 @@ public class BmpImageParser extends Imag
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -589,10 +589,10 @@ public class BmpImageParser extends Imag
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, 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);
 
         boolean verbose = ParamMap.getParamBoolean(params, PARAM_KEY_VERBOSE,
                 false);
@@ -714,7 +714,7 @@ public class BmpImageParser extends Imag
     }
 
     @Override
-    public BufferedImage getBufferedImage(ByteSource byteSource, Map params)
+    public BufferedImage getBufferedImage(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         InputStream is = null;
         try {
@@ -731,10 +731,10 @@ public class BmpImageParser extends Imag
         }
     }
 
-    public BufferedImage getBufferedImage(InputStream inputStream, Map params)
+    public BufferedImage getBufferedImage(InputStream inputStream, Map<String,Object> params)
             throws ImageReadException, 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);
 
         boolean verbose = ParamMap.getParamBoolean(params, PARAM_KEY_VERBOSE,
                 false);
@@ -783,10 +783,10 @@ public class BmpImageParser extends Imag
     private static final int BITMAP_INFO_HEADER_SIZE = 40;
 
     @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);
 
         PixelDensity pixelDensity = null;
 
@@ -871,7 +871,7 @@ public class BmpImageParser 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/bmp/pixelparsers/PixelParserRle.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/pixelparsers/PixelParserRle.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/pixelparsers/PixelParserRle.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/pixelparsers/PixelParserRle.java Thu Sep 27 20:04:11 2012
@@ -89,7 +89,6 @@ public class PixelParserRle extends Pixe
     @Override
     public void processImage(ImageBuilder imageBuilder)
             throws ImageReadException, IOException {
-        int count = 0;
         int width = bhi.width;
         int height = bhi.height;
         int x = 0, y = height - 1;
@@ -98,7 +97,6 @@ public class PixelParserRle extends Pixe
 
         boolean done = false;
         while (!done) {
-            count++;
             // if (count > 100)
             // return;
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/dcx/DcxImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/dcx/DcxImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/dcx/DcxImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/dcx/DcxImageParser.java Thu Sep 27 20:04:11 2012
@@ -80,25 +80,25 @@ public class DcxImageParser 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 {
         return null;
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -174,7 +174,7 @@ public class DcxImageParser extends Imag
 
     @Override
     public final BufferedImage getBufferedImage(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         List<BufferedImage> list = getAllBufferedImages(byteSource);
         if (list.isEmpty()) {
             return null;
@@ -195,7 +195,7 @@ public class DcxImageParser extends Imag
                 ByteSourceInputStream pcxSource = new ByteSourceInputStream(
                         stream, null);
                 BufferedImage image = pcxImageParser.getBufferedImage(
-                        pcxSource, new HashMap());
+                        pcxSource, new HashMap<String,Object>());
                 images.add(image);
             } finally {
                 try {
@@ -211,12 +211,12 @@ public class DcxImageParser 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);
 
-        HashMap pcxParams = new HashMap();
+        HashMap<String,Object> pcxParams = new HashMap<String,Object>();
 
         // clear format key.
         if (params.containsKey(PARAM_KEY_FORMAT)) {
@@ -271,7 +271,7 @@ public class DcxImageParser 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/gif/GifImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java Thu Sep 27 20:04:11 2012
@@ -498,13 +498,13 @@ public class GifImageParser extends Imag
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ImageContents blocks = readFile(byteSource, false);
 
@@ -539,7 +539,7 @@ public class GifImageParser extends Imag
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -560,7 +560,7 @@ public class GifImageParser extends Imag
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ImageContents blocks = readFile(byteSource, false);
 
@@ -690,7 +690,7 @@ public class GifImageParser extends Imag
     }
 
     @Override
-    public BufferedImage getBufferedImage(ByteSource byteSource, Map params)
+    public BufferedImage getBufferedImage(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ImageContents imageContents = readFile(byteSource, false);
 
@@ -809,10 +809,10 @@ public class GifImageParser extends Imag
     private static final int SORT_FLAG_MASK = 1 << 5;
 
     @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 = new HashMap(params);
+        params = new HashMap<String,Object>(params);
 
         boolean verbose = ParamMap.getParamBoolean(params, PARAM_KEY_VERBOSE,
                 false);
@@ -1075,7 +1075,7 @@ public class GifImageParser 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 {
 
         InputStream is = null;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/icns/IcnsImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/icns/IcnsImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/icns/IcnsImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/icns/IcnsImageParser.java Thu Sep 27 20:04:11 2012
@@ -76,16 +76,16 @@ public class IcnsImageParser 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 {
         // 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);
 
         ParamMap.getParamBoolean(params, PARAM_KEY_VERBOSE, false);
 
@@ -114,10 +114,10 @@ public class IcnsImageParser extends Ima
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, 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);
 
         ParamMap.getParamBoolean(params, PARAM_KEY_VERBOSE, false);
 
@@ -141,7 +141,7 @@ public class IcnsImageParser extends Ima
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -277,7 +277,7 @@ public class IcnsImageParser extends Ima
 
     @Override
     public final BufferedImage getBufferedImage(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         IcnsContents icnsContents = readImage(byteSource);
         List<BufferedImage> result = IcnsDecoder
                 .decodeAllImages(icnsContents.icnsElements);
@@ -296,10 +296,10 @@ public class IcnsImageParser 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)) {
@@ -367,7 +367,7 @@ public class IcnsImageParser 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/ico/IcoImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/ico/IcoImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/ico/IcoImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/ico/IcoImageParser.java Thu Sep 27 20:04:11 2012
@@ -82,25 +82,25 @@ public class IcoImageParser 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 {
         return null;
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -594,7 +594,7 @@ public class IcoImageParser extends Imag
 
     @Override
     public final BufferedImage getBufferedImage(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         ImageContents contents = readImage(byteSource);
         FileHeader fileHeader = contents.fileHeader;
         if (fileHeader.iconCount > 0) {
@@ -647,10 +647,10 @@ public class IcoImageParser 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)) {
@@ -836,7 +836,7 @@ public class IcoImageParser 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/jpeg/JpegImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java Thu Sep 27 20:04:11 2012
@@ -89,7 +89,7 @@ public class JpegImageParser extends Ima
 
     @Override
     public final BufferedImage getBufferedImage(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         JpegDecoder jpegDecoder = new JpegDecoder();
         return jpegDecoder.decode(byteSource);
     }
@@ -269,7 +269,7 @@ public class JpegImageParser extends Ima
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         List<Segment> segments = readSegments(byteSource,
                 new int[] { JPEG_APP2_Marker, }, false);
@@ -303,7 +303,7 @@ public class JpegImageParser extends Ima
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         TiffImageMetadata exif = getExifMetadata(byteSource, params);
 
@@ -336,7 +336,7 @@ public class JpegImageParser extends Ima
         return result;
     }
 
-    public TiffImageMetadata getExifMetadata(ByteSource byteSource, Map params)
+    public TiffImageMetadata getExifMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         byte bytes[] = getExifRawData(byteSource);
         if (null == bytes) {
@@ -344,7 +344,7 @@ public class JpegImageParser extends Ima
         }
 
         if (params == null) {
-            params = new HashMap();
+            params = new HashMap<String,Object>();
         }
         if (!params.containsKey(PARAM_KEY_READ_THUMBNAILS)) {
             params.put(PARAM_KEY_READ_THUMBNAILS, Boolean.TRUE);
@@ -516,7 +516,7 @@ public class JpegImageParser 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 {
 
         final List<String> result = new ArrayList<String>();
@@ -563,7 +563,7 @@ public class JpegImageParser extends Ima
     }
 
     public JpegPhotoshopMetadata getPhotoshopMetadata(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException {
+            Map<String,Object> params) throws ImageReadException, IOException {
         List<Segment> segments = readSegments(byteSource,
                 new int[] { JPEG_APP13_Marker, }, false);
 
@@ -592,7 +592,7 @@ public class JpegImageParser extends Ima
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         List<Segment> segments = readSegments(byteSource, new int[] {
                 // kJFIFMarker,
@@ -627,7 +627,7 @@ public class JpegImageParser extends Ima
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         // List allSegments = readSegments(byteSource, null, false);
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegUtils.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegUtils.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegUtils.java Thu Sep 27 20:04:11 2012
@@ -57,7 +57,8 @@ public class JpegUtils extends BinaryFil
 
             int byteOrder = getByteOrder();
 
-            for (int markerCount = 0; true; markerCount++) {
+            int markerCount;
+            for (markerCount = 0; true; markerCount++) {
                 byte[] markerBytes = new byte[2];
                 do {
                     markerBytes[0] = markerBytes[1];
@@ -102,6 +103,8 @@ public class JpegUtils extends BinaryFil
                     return;
                 }
             }
+            
+            Debug.debug("" + markerCount + " markers");
 
         } finally {
             try {

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java Thu Sep 27 20:04:11 2012
@@ -575,6 +575,8 @@ public class ExifRewriter extends Binary
     }
 
     public static class ExifOverflowException extends ImageWriteException {
+        private static final long serialVersionUID = 1401484357224931218L;
+
         public ExifOverflowException(String s) {
             super(s);
         }

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=1391192&r1=1391191&r2=1391192&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 Thu Sep 27 20:04:11 2012
@@ -96,7 +96,7 @@ public class IptcParser extends BinaryFi
      * Some IPTC blocks are missing this first "record version" record, so we
      * don't require it.
      */
-    public PhotoshopApp13Data parsePhotoshopSegment(byte bytes[], Map params)
+    public PhotoshopApp13Data parsePhotoshopSegment(byte bytes[], Map<String,Object> params)
             throws ImageReadException, IOException {
         boolean strict = ParamMap.getParamBoolean(params,
                 ImagingConstants.PARAM_KEY_STRICT, false);
@@ -411,61 +411,59 @@ public class IptcParser extends BinaryFi
     public byte[] writeIPTCBlock(List<IptcRecord> elements)
             throws ImageWriteException, IOException {
         byte blockData[];
-        {
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            BinaryOutputStream bos = new BinaryOutputStream(baos,
-                    getByteOrder());
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        BinaryOutputStream bos = new BinaryOutputStream(baos,
+                getByteOrder());
+
+        // first, right record version record
+        bos.write(IPTC_RECORD_TAG_MARKER);
+        bos.write(IPTC_APPLICATION_2_RECORD_NUMBER);
+        bos.write(IptcTypes.RECORD_VERSION.type); // record version record
+                                                  // type.
+        bos.write2Bytes(2); // record version record size
+        bos.write2Bytes(2); // record version value
+
+        // make a copy of the list.
+        elements = new ArrayList<IptcRecord>(elements);
+
+        // sort the list. Records must be in numerical order.
+        Comparator<IptcRecord> comparator = new Comparator<IptcRecord>() {
+            public int compare(IptcRecord e1, IptcRecord e2) {
+                return e2.iptcType.getType() - e1.iptcType.getType();
+            }
+        };
+        Collections.sort(elements, comparator);
+        // TODO: make sure order right
+
+        // write the list.
+        for (int i = 0; i < elements.size(); i++) {
+            IptcRecord element = elements.get(i);
+
+            if (element.iptcType == IptcTypes.RECORD_VERSION) {
+                continue; // ignore
+            }
 
-            // first, right record version record
             bos.write(IPTC_RECORD_TAG_MARKER);
             bos.write(IPTC_APPLICATION_2_RECORD_NUMBER);
-            bos.write(IptcTypes.RECORD_VERSION.type); // record version record
-                                                      // type.
-            bos.write2Bytes(2); // record version record size
-            bos.write2Bytes(2); // record version value
-
-            // make a copy of the list.
-            elements = new ArrayList<IptcRecord>(elements);
-
-            // sort the list. Records must be in numerical order.
-            Comparator<IptcRecord> comparator = new Comparator<IptcRecord>() {
-                public int compare(IptcRecord e1, IptcRecord e2) {
-                    return e2.iptcType.getType() - e1.iptcType.getType();
-                }
-            };
-            Collections.sort(elements, comparator);
-            // TODO: make sure order right
-
-            // write the list.
-            for (int i = 0; i < elements.size(); i++) {
-                IptcRecord element = elements.get(i);
-
-                if (element.iptcType == IptcTypes.RECORD_VERSION) {
-                    continue; // ignore
-                }
-
-                bos.write(IPTC_RECORD_TAG_MARKER);
-                bos.write(IPTC_APPLICATION_2_RECORD_NUMBER);
-                if (element.iptcType.getType() < 0
-                        || element.iptcType.getType() > 0xff) {
-                    throw new ImageWriteException("Invalid record type: "
-                            + element.iptcType.getType());
-                }
-                bos.write(element.iptcType.getType());
-
-                byte recordData[] = element.value.getBytes("ISO-8859-1");
-                if (!new String(recordData, "ISO-8859-1").equals(element.value)) {
-                    throw new ImageWriteException(
-                            "Invalid record value, not ISO-8859-1");
-                }
+            if (element.iptcType.getType() < 0
+                    || element.iptcType.getType() > 0xff) {
+                throw new ImageWriteException("Invalid record type: "
+                        + element.iptcType.getType());
+            }
+            bos.write(element.iptcType.getType());
 
-                bos.write2Bytes(recordData.length);
-                bos.write(recordData);
+            byte recordData[] = element.value.getBytes("ISO-8859-1");
+            if (!new String(recordData, "ISO-8859-1").equals(element.value)) {
+                throw new ImageWriteException(
+                        "Invalid record value, not ISO-8859-1");
             }
 
-            blockData = baos.toByteArray();
+            bos.write2Bytes(recordData.length);
+            bos.write(recordData);
         }
 
+        blockData = baos.toByteArray();
+
         return blockData;
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java Thu Sep 27 20:04:11 2012
@@ -118,7 +118,7 @@ public class JpegIptcRewriter extends Jp
         if (photoshopApp13Segments.size() == 1) {
             JFIFPieceSegment oldSegment = (JFIFPieceSegment) photoshopApp13Segments
                     .get(0);
-            Map params = new HashMap();
+            Map<String,Object> params = new HashMap<String,Object>();
             PhotoshopApp13Data oldData = new IptcParser()
                     .parsePhotoshopSegment(oldSegment.segmentData, params);
             List<IptcBlock> newBlocks = oldData.getNonIptcBlocks();

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/App13Segment.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/App13Segment.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/App13Segment.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/segments/App13Segment.java Thu Sep 27 20:04:11 2012
@@ -62,7 +62,7 @@ public class App13Segment extends AppnSe
         return new IptcParser().isPhotoshopJpegSegment(bytes);
     }
 
-    public PhotoshopApp13Data parsePhotoshopSegment(Map params)
+    public PhotoshopApp13Data parsePhotoshopSegment(Map<String,Object> params)
             throws ImageReadException, IOException {
         /*
          * In practice, App13 segments are only used for Photoshop/IPTC

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegRewriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegRewriter.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegRewriter.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegRewriter.java Thu Sep 27 20:04:11 2012
@@ -348,6 +348,8 @@ public class JpegRewriter extends Binary
 
     public static class JpegSegmentOverflowException extends
             ImageWriteException {
+        private static final long serialVersionUID = -1062145751550646846L;
+
         public JpegSegmentOverflowException(String s) {
             super(s);
         }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxImageParser.java Thu Sep 27 20:04:11 2012
@@ -92,13 +92,13 @@ public class PcxImageParser 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 {
         PcxHeader pcxHeader = readPcxHeader(byteSource);
         Dimension size = getImageSize(byteSource, params);
@@ -125,7 +125,7 @@ public class PcxImageParser extends Imag
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         PcxHeader pcxHeader = readPcxHeader(byteSource);
         int xSize = pcxHeader.xMax - pcxHeader.xMin + 1;
@@ -140,7 +140,7 @@ public class PcxImageParser extends Imag
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -526,8 +526,8 @@ public class PcxImageParser extends Imag
 
     @Override
     public final BufferedImage getBufferedImage(ByteSource byteSource,
-            Map params) throws ImageReadException, IOException {
-        params = (params == null) ? new HashMap() : new HashMap(params);
+            Map<String,Object> params) throws ImageReadException, IOException {
+        params = (params == null) ? new HashMap<String,Object>() : new HashMap<String,Object>(params);
         boolean isStrict = false;
         Object strictness = params.get(PARAM_KEY_STRICT);
         if (strictness != null) {
@@ -550,7 +550,7 @@ public class PcxImageParser 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 {
         new PcxWriter(params).writeImage(src, os);
     }
@@ -566,7 +566,7 @@ public class PcxImageParser 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/pcx/PcxWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxWriter.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxWriter.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxWriter.java Thu Sep 27 20:04:11 2012
@@ -33,9 +33,9 @@ public class PcxWriter implements PcxCon
     private int bitDepth = -1;
     private PixelDensity pixelDensity = null;
 
-    public PcxWriter(Map params) throws ImageWriteException {
+    public PcxWriter(Map<String,Object> params) throws ImageWriteException {
         // 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)) {

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java Thu Sep 27 20:04:11 2012
@@ -256,7 +256,7 @@ public class PngImageParser extends Imag
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         List<PngChunk> chunks = readChunks(byteSource, new int[] { iCCP, },
                 true);
@@ -278,7 +278,7 @@ public class PngImageParser extends Imag
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         List<PngChunk> chunks = readChunks(byteSource, new int[] { IHDR, },
                 true);
@@ -306,7 +306,7 @@ public class PngImageParser extends Imag
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         List<PngChunk> chunks = readChunks(byteSource,
                 new int[] { tEXt, zTXt, }, true);
@@ -502,7 +502,7 @@ public class PngImageParser extends Imag
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         List<PngChunk> chunks = readChunks(byteSource, new int[] { IHDR, pHYs,
                 tEXt, zTXt, tRNS, PLTE, iTXt, }, false);
@@ -643,7 +643,7 @@ public class PngImageParser extends Imag
     }
 
     @Override
-    public BufferedImage getBufferedImage(ByteSource byteSource, Map params)
+    public BufferedImage getBufferedImage(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ParamMap.getParamBoolean(params, PARAM_KEY_VERBOSE, false);
 
@@ -869,7 +869,7 @@ public class PngImageParser 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 {
         new PngWriter(params).writeImage(src, os, params);
     }
@@ -885,7 +885,7 @@ public class PngImageParser 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 {
 
         List<PngChunk> chunks = readChunks(byteSource, new int[] { iTXt, },

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java Thu Sep 27 20:04:11 2012
@@ -42,7 +42,7 @@ public class PngWriter implements PngCon
         this.verbose = verbose;
     }
 
-    public PngWriter(Map params) {
+    public PngWriter(Map<String,Object> params) {
         this.verbose = ParamMap.getParamBoolean(params, PARAM_KEY_VERBOSE,
                 false);
     }
@@ -311,7 +311,7 @@ public class PngWriter implements PngCon
         return result;
     }
 
-    private byte getBitDepth(final byte colorType, Map params) {
+    private byte getBitDepth(final byte colorType, Map<String,Object> params) {
         byte result = 8;
 
         Object o = params.get(PARAM_KEY_PNG_BIT_DEPTH);
@@ -363,10 +363,10 @@ public class PngWriter implements PngCon
      * iTXt Yes None tEXt Yes None zTXt Yes None
      */
 
-    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)) {
@@ -377,7 +377,7 @@ public class PngWriter implements PngCon
             params.remove(PARAM_KEY_VERBOSE);
         }
 
-        Map rawParams = new HashMap(params);
+        Map<String,Object> rawParams = new HashMap<String,Object>(params);
         if (params.containsKey(PARAM_KEY_PNG_FORCE_TRUE_COLOR)) {
             params.remove(PARAM_KEY_PNG_FORCE_TRUE_COLOR);
         }
@@ -514,10 +514,9 @@ public class PngWriter implements PngCon
         }
 
         if (params.containsKey(PARAM_KEY_PNG_TEXT_CHUNKS)) {
-            List<PngText> outputTexts = (List<PngText>) params
-                    .get(PARAM_KEY_PNG_TEXT_CHUNKS);
+            List<?> outputTexts = (List<?>) params.get(PARAM_KEY_PNG_TEXT_CHUNKS);
             for (int i = 0; i < outputTexts.size(); i++) {
-                PngText text = outputTexts.get(i);
+                PngText text = (PngText) outputTexts.get(i);
                 if (text instanceof PngText.Text) {
                     writeChunktEXt(os, (PngText.Text) text);
                 } else if (text instanceof PngText.Ztxt) {

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PbmWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PbmWriter.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PbmWriter.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PbmWriter.java Thu Sep 27 20:04:11 2012
@@ -29,7 +29,7 @@ public class PbmWriter extends PnmWriter
     }
 
     @Override
-    public void writeImage(BufferedImage src, OutputStream os, Map params)
+    public void writeImage(BufferedImage src, OutputStream os, Map<String,Object> params)
             throws ImageWriteException, IOException {
         os.write(PNM_PREFIX_BYTE);
         os.write(RAWBITS ? PBM_RAW_CODE : PBM_TEXT_CODE);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PgmWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PgmWriter.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PgmWriter.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PgmWriter.java Thu Sep 27 20:04:11 2012
@@ -29,7 +29,7 @@ public class PgmWriter extends PnmWriter
     }
 
     @Override
-    public void writeImage(BufferedImage src, OutputStream os, Map params)
+    public void writeImage(BufferedImage src, OutputStream os, Map<String,Object> params)
             throws ImageWriteException, IOException {
         // System.out.println
         // (b1 == 0x50 && b2 == 0x36)

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java Thu Sep 27 20:04:11 2012
@@ -136,13 +136,13 @@ public class PnmImageParser extends Imag
     }
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         FileInfo info = readHeader(byteSource);
 
@@ -163,13 +163,13 @@ public class PnmImageParser 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 {
         FileInfo info = readHeader(byteSource);
 
@@ -251,7 +251,7 @@ public class PnmImageParser extends Imag
     }
 
     @Override
-    public BufferedImage getBufferedImage(ByteSource byteSource, Map params)
+    public BufferedImage getBufferedImage(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         InputStream is = null;
 
@@ -285,7 +285,7 @@ public class PnmImageParser extends Imag
     public static final String PARAM_VALUE_PNM_RAWBITS_NO = "NO";
 
     @Override
-    public void writeImage(BufferedImage src, OutputStream os, Map params)
+    public void writeImage(BufferedImage src, OutputStream os, Map<String,Object> params)
             throws ImageWriteException, IOException {
         PnmWriter writer = null;
         boolean useRawbits = true;
@@ -316,9 +316,9 @@ public class PnmImageParser extends Imag
 
         // make copy of params; we'll clear keys as we consume them.
         if (params != null) {
-            params = new HashMap(params);
+            params = new HashMap<String,Object>(params);
         } else {
-            params = new HashMap();
+            params = new HashMap<String,Object>();
         }
 
         // clear format key.
@@ -345,7 +345,7 @@ public class PnmImageParser 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/pnm/PnmWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmWriter.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmWriter.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmWriter.java Thu Sep 27 20:04:11 2012
@@ -31,5 +31,5 @@ public abstract class PnmWriter {
     }
 
     public abstract void writeImage(BufferedImage src, OutputStream os,
-            Map params) throws ImageWriteException, IOException;
+            Map<String,Object> params) throws ImageWriteException, IOException;
 }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PpmWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PpmWriter.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PpmWriter.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PpmWriter.java Thu Sep 27 20:04:11 2012
@@ -29,7 +29,7 @@ public class PpmWriter extends PnmWriter
     }
 
     @Override
-    public void writeImage(BufferedImage src, OutputStream os, Map params)
+    public void writeImage(BufferedImage src, OutputStream os, Map<String,Object> params)
             throws ImageWriteException, IOException {
         // System.out.println
         // (b1 == 0x50 && b2 == 0x36)

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java?rev=1391192&r1=1391191&r2=1391192&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java Thu Sep 27 20:04:11 2012
@@ -447,7 +447,7 @@ public class PsdImageParser extends Imag
     public final static int IMAGE_RESOURCE_ID_ICC_PROFILE = 0x040F;
 
     @Override
-    public byte[] getICCProfileBytes(ByteSource byteSource, Map params)
+    public byte[] getICCProfileBytes(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         List<ImageResourceBlock> blocks = readImageResourceBlocks(byteSource,
                 new int[] { IMAGE_RESOURCE_ID_ICC_PROFILE, }, 1);
@@ -465,7 +465,7 @@ public class PsdImageParser extends Imag
     }
 
     @Override
-    public Dimension getImageSize(ByteSource byteSource, Map params)
+    public Dimension getImageSize(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         PsdHeaderInfo bhi = readHeader(byteSource);
         if (bhi == null) {
@@ -486,7 +486,7 @@ public class PsdImageParser extends Imag
     }
 
     @Override
-    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+    public IImageMetadata getMetadata(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         return null;
     }
@@ -516,7 +516,7 @@ public class PsdImageParser extends Imag
     }
 
     @Override
-    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+    public ImageInfo getImageInfo(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ImageContents imageContents = readImageContents(byteSource);
         // ImageContents imageContents = readImage(byteSource, false);
@@ -645,7 +645,7 @@ public class PsdImageParser extends Imag
     private static final int COLOR_MODE_INDEXED = 2;
 
     @Override
-    public BufferedImage getBufferedImage(ByteSource byteSource, Map params)
+    public BufferedImage getBufferedImage(ByteSource byteSource, Map<String,Object> params)
             throws ImageReadException, IOException {
         ImageContents imageContents = readImageContents(byteSource);
         // ImageContents imageContents = readImage(byteSource, false);
@@ -780,7 +780,7 @@ public class PsdImageParser 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 {
 
         ImageContents imageContents = readImageContents(byteSource);



Mime
View raw message