Author: ssolsagl
Date: 2007-04-30 10:44:32 +0200 (Mon, 30 Apr 2007)
New Revision: 4922

Modified:
   
trunk/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/URLVelocityTemplateLoader.java
Log:
check for null in templatesDir

Modified: 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/URLVelocityTemplateLoader.java
===================================================================
--- 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/URLVelocityTemplateLoader.java
      2007-04-30 08:40:26 UTC (rev 4921)
+++ 
trunk/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/URLVelocityTemplateLoader.java
      2007-04-30 08:44:32 UTC (rev 4922)
@@ -62,7 +62,6 @@
                if(!(VELOCITY_DEBUG && VELOCITY_DEBUG_ON)) {
                        return super.getResourceStream(url);
                }
-               
 
                String filePath = url.replaceAll("http://(.*?)/", 
"/").replace("localhost/", "");
                //filePath = filePath.replace("localhost/", "");
@@ -130,6 +129,9 @@
         * Create file object
         */
        private File getFile(String templatesDir, String filePath) {
+               if(templatesDir == null) {
+                       return new File("null" + filePath);
+               }
                String paths[] = templatesDir.split(",");
                
                for(String p : paths) {

_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits

Reply via email to