Author: nbelaevski
Date: 2009-03-10 15:40:30 -0400 (Tue, 10 Mar 2009)
New Revision: 12911
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
Log:
https://jira.jboss.org/jira/browse/RF-4471
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java 2009-03-10
17:07:03 UTC (rev 12910)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java 2009-03-10
19:40:30 UTC (rev 12911)
@@ -97,7 +97,16 @@
static {
// renderers.put(".htc",new BehaviorRenderer());
// set in-memory caching ImageIO
- ImageIO.setUseCache(false);
+ Thread thread = Thread.currentThread();
+ ClassLoader initialTCCL = thread.getContextClassLoader();
+
+ try {
+ ClassLoader systemCL = ClassLoader.getSystemClassLoader();
+ thread.setContextClassLoader(systemCL);
+ ImageIO.setUseCache(false);
+ } finally {
+ thread.setContextClassLoader(initialTCCL);
+ }
}