[Yanel-commits] rev 44451 - public/yanel/trunk/src/core/java/org/wyona/yanel/core/source

michi at wyona.com michi at wyona.com
Thu Aug 27 22:53:36 CEST 2009


Author: michi
Date: 2009-08-27 22:53:36 +0200 (Thu, 27 Aug 2009)
New Revision: 44451

Modified:
   public/yanel/trunk/src/core/java/org/wyona/yanel/core/source/RTabstractResolver.java
Log:
log statements improved and explanation note added

Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/source/RTabstractResolver.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/source/RTabstractResolver.java	2009-08-27 20:40:09 UTC (rev 44450)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/source/RTabstractResolver.java	2009-08-27 20:53:36 UTC (rev 44451)
@@ -47,8 +47,10 @@
             }
             URL url = resource.getClass().getClassLoader().getResource(packageName.replace('.','/') + "/" + getPathPrefix() + path);
             if (url == null) {
-                log.error("Path " + getPathPrefix() + path + " does not seem to be contained within package " + packageName + " of resource " + resource.getResourceTypeUniversalName());
+                log.warn("Path " + getPathPrefix() + path + " does not seem to be contained within package " + packageName + " of resource " + resource.getResourceTypeUniversalName());
             }
+
+            // If url == null, then url.openStream() will throw an exception and the fallback will be used within the catch below (TODO: Refactor ...)
             InputStream in = url.openStream();
             YanelStreamSource source = new YanelStreamSource(in);
             URLConnection uc = url.openConnection();
@@ -57,7 +59,7 @@
             return source;
         } catch (Exception e) {
             File resourceConfigDir = resource.getRTD().getConfigFile().getParentFile();
-            log.info("Fallback to resource config location: " + resourceConfigDir);
+            log.warn("Fallback to resource config location: " + resourceConfigDir);
             try {
                 File resourceFile = new File(resourceConfigDir.getAbsolutePath() + "/" + getPathPrefix() + path.replace('/', File.separatorChar));
                 InputStream in = new java.io.FileInputStream(resourceFile);



More information about the Yanel-commits mailing list