Author: hfnukal
Date: 2011-08-18 19:05:31 -0400 (Thu, 18 Aug 2011)
New Revision: 7185
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/ResourceCompressorService.java
Log:
JBEPP-763 Javascript not working with exo product developing=false
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/ResourceCompressorService.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/ResourceCompressorService.java 2011-08-18
21:31:06 UTC (rev 7184)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/ResourceCompressorService.java 2011-08-18
23:05:31 UTC (rev 7185)
@@ -150,14 +150,19 @@
public void setContext(ManagementContext context)
{
this.managementContext = context;
-
- //
- for (Map.Entry<ResourceType, List<ResourceCompressorPlugin>> entry :
plugins.entrySet())
- {
- for (ResourceCompressorPlugin plugin : entry.getValue())
- {
- context.register(plugin);
- }
+
+ if(context==null) {
+ // TODO: throws exception when shutdown server
+ log.warn("Context is null.");
+ } else {
+ //
+ for (Map.Entry<ResourceType, List<ResourceCompressorPlugin>> entry :
plugins.entrySet())
+ {
+ for (ResourceCompressorPlugin plugin : entry.getValue())
+ {
+ context.register(plugin);
+ }
+ }
}
}
}
\ No newline at end of file
Show replies by date