mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-04 03:55:28 -04:00
#437 Catching exception from static init, prints a warning and moves on.
(cherry picked from commit d8d0131)
This commit is contained in:
parent
3b68d676f3
commit
a06cbfd6f4
@ -101,9 +101,17 @@ public final class ColorSpaces {
|
|||||||
private static final Map<Key, ICC_ColorSpace> cache = new LRUHashMap<>(10);
|
private static final Map<Key, ICC_ColorSpace> cache = new LRUHashMap<>(10);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
try {
|
||||||
// Force invocation of ProfileDeferralMgr.activateProfiles() to avoid JDK-6986863
|
// Force invocation of ProfileDeferralMgr.activateProfiles() to avoid JDK-6986863
|
||||||
ICC_Profile.getInstance(ColorSpace.CS_sRGB).getData();
|
ICC_Profile.getInstance(ColorSpace.CS_sRGB).getData();
|
||||||
}
|
}
|
||||||
|
catch (Throwable disasters) {
|
||||||
|
System.err.println("ICC Color Profile not properly activated due to the exception below.");
|
||||||
|
System.err.println("Expect to see JDK-6986863 in action, and consider filing a bug report to your JRE provider.");
|
||||||
|
|
||||||
|
disasters.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private ColorSpaces() {}
|
private ColorSpaces() {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user