mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-10-04 11:26:44 -04:00
TMI-15: Fixed some issues introduced in later JREs (at least 7u45).
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user