TMI-15: Fixed some issues introduced in later JREs (at least 7u45).

This commit is contained in:
Harald Kuhr
2013-11-05 09:43:46 +01:00
parent d04c29ae12
commit f5a4fe03f4
7 changed files with 48 additions and 42 deletions

View File

@@ -266,7 +266,7 @@ public final class ColorSpaces {
if (profile == null) {
// Try to get system default or user-defined profile
profile = readProfileFromPath(Profiles.getPath("GENERIC_CMYK"));
// profile = readProfileFromPath(Profiles.getPath("GENERIC_CMYK"));
if (profile == null) {
if (DEBUG) {

View File

@@ -1322,13 +1322,14 @@ public abstract class ImageReaderAbstractTestCase<T extends ImageReader> {
// TODO: This is thrown by ImageReader.getDestination. But are we happy with that?
// The problem is that the checkReadParamBandSettings throws IllegalArgumentException, which seems more appropriate...
String message = expected.getMessage().toLowerCase();
assertTrue(
"Wrong message: " + message + " for type " + destination.getType(),
message.contains("destination") ||
((destination.getType() == BufferedImage.TYPE_BYTE_BINARY ||
destination.getType() == BufferedImage.TYPE_BYTE_INDEXED)
&& message.contains("indexcolormodel"))
);
if (!(message.contains("destination") || message.contains("band size") || // For JDK classes
((destination.getType() == BufferedImage.TYPE_BYTE_BINARY ||
destination.getType() == BufferedImage.TYPE_BYTE_INDEXED) &&
message.contains("indexcolormodel")))) {
failBecause(
"Wrong message: " + message + " for type " + destination.getType(), expected
);
}
}
catch (IllegalArgumentException expected) {
String message = expected.getMessage().toLowerCase();
@@ -1453,6 +1454,7 @@ public abstract class ImageReaderAbstractTestCase<T extends ImageReader> {
failBecause("Could not read " + data.getInput() + " with explicit destination type " + type, e);
}
assertNotNull(result);
assertEquals(type.getColorModel(), result.getColorModel());
// The following logically tests