Author: sebb
Date: Fri Dec 9 13:58:18 2011
New Revision: 1212425
URL: http://svn.apache.org/viewvc?rev=1212425&view=rev
Log:
Code currently targets 1.4+, so cannot use new IOException(Throwable)
Modified:
commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/TiffReader.java
Modified:
commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/TiffReader.java
URL:
http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/TiffReader.java?rev=1212425&r1=1212424&r2=1212425&view=diff
==============================================================================
---
commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/TiffReader.java
(original)
+++
commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/TiffReader.java
Fri Dec 9 13:58:18 2011
@@ -197,7 +197,10 @@ public class TiffReader extends BinaryFi
field.fillInValue(byteSource);
} catch (TiffValueOutsideFileBoundsException
valueOutsideFileException) {
if (strict) {
- throw new IOException(valueOutsideFileException);
+ // Java 1.5+ throw new
IOException(valueOutsideFileException);
+ IOException ioe = new IOException();
+ ioe.initCause(valueOutsideFileException);
+ throw ioe;
} else {
// corrupt field, ignore it
continue;