Author: ndkhoiits
Date: 2011-08-13 23:50:44 -0400 (Sat, 13 Aug 2011)
New Revision: 7088
Modified:
portal/trunk/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java
portal/trunk/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestJavascriptConfigService.java
Log:
GTNPORTAL-2007 Wrong merged JS after undeploy JS module in JavascriptConfigService
Modified:
portal/trunk/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java
===================================================================
---
portal/trunk/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java 2011-08-14
03:46:19 UTC (rev 7087)
+++
portal/trunk/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java 2011-08-14
03:50:44 UTC (rev 7088)
@@ -156,6 +156,7 @@
availableScripts_.clear();
availableScriptsPaths_.clear();
object_view_of_merged_JS.clear();
+ jsBytes = null;
//
for (Javascript script : availableScriptsKey_) {
@@ -261,6 +262,7 @@
public void refreshMergedJavascript()
{
mergedJavascript = "";
+ jsBytes = null;
StringBuffer buffer = new StringBuffer();
for (String webApp : object_view_of_merged_JS.keySet())
{
Modified:
portal/trunk/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestJavascriptConfigService.java
===================================================================
---
portal/trunk/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestJavascriptConfigService.java 2011-08-14
03:46:19 UTC (rev 7087)
+++
portal/trunk/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestJavascriptConfigService.java 2011-08-14
03:50:44 UTC (rev 7088)
@@ -124,9 +124,8 @@
assertEquals(0, jsService.getAvailableScriptsPaths().size());
assertTrue(jsService.getMergedJavascript().length > 0);
- jsService.refreshMergedJavascript();
- //bug of service
-// assertTrue(jsService.getMergedJavascript().length == 0);
+ jsService.refreshMergedJavascript();
+ assertTrue(jsService.getMergedJavascript().length == 0);
}
@Override
Show replies by date