This is an automated email from the ASF dual-hosted git repository.
pawan pushed a commit to branch trunk
in repository
https://gitbox.apache.org/repos/asf/ofbiz-framework.gitThe following commit(s) were added to refs/heads/trunk by this push:
new 8bd7b9b Fixed: Theme files loading taking longer time (OFBIZ-11665)
8bd7b9b is described below
commit 8bd7b9b6f9dac17d2afcd76e9305b5ed0bd2be1c
Author: Pawan Verma <
[hidden email]>
AuthorDate: Sun May 10 14:17:13 2020 +0530
Fixed: Theme files loading taking longer time
(OFBIZ-11665)
Thanks: Pierre and Jacques for the review.
---
.../src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
index f3ff459..b7c190e 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
@@ -78,9 +78,11 @@ public class ThemeFactory {
*/
private static void pullModelThemesFromXmlToCache() {
String ofbizHome = System.getProperty("ofbiz.home");
+ String themeFolderPath = ofbizHome + "/themes";
+ String pluginsFolderPath = ofbizHome + "/plugins";
try {
- List<File> xmlThemes = FileUtil.findXmlFiles(ofbizHome, "themes", "theme", "widget-theme.xsd");
- List<File> xmlPluginThemes = FileUtil.findXmlFiles(ofbizHome, "plugins", "theme", "widget-theme.xsd");
+ List<File> xmlThemes = FileUtil.findXmlFiles(themeFolderPath, null, "theme", "widget-theme.xsd");
+ List<File> xmlPluginThemes = FileUtil.findXmlFiles(pluginsFolderPath, null, "theme", "widget-theme.xsd");
if (UtilValidate.isNotEmpty(xmlPluginThemes)) {
xmlThemes.addAll(xmlPluginThemes);
}