You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/08/19 23:23:45 UTC

svn commit: r567475 - /lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java

Author: andreas
Date: Sun Aug 19 14:23:45 2007
New Revision: 567475

URL: http://svn.apache.org/viewvc?rev=567475&view=rev
Log:
Module manager: compute file URI at startup and not on demand for better performance

Modified:
    lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java

Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java?rev=567475&r1=567474&r2=567475&view=diff
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java Sun Aug 19 14:23:45 2007
@@ -44,8 +44,7 @@
             baseUri = "context://lenya/modules/" + shortcut;
         }
         else {
-            String path = (String) this.module2src.get(shortcut);
-            baseUri = new File(path).toURI().toString();
+            return (String) this.module2src.get(shortcut);
         }
         return baseUri;
     }
@@ -66,7 +65,8 @@
         for (int i = 0; i < modules.length; i++) {
             String shortcut = modules[i].getAttribute("shortcut");
             String src = modules[i].getAttribute("src");
-            this.module2src.put(shortcut, src);
+            String uri = new File(src).toURI().toString();
+            this.module2src.put(shortcut, uri);
         }
 
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org