[Yanel-commits] rev 21205 - public/yanel/contributions/resources/world-time/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Thu Dec 28 00:47:38 CET 2006


Author: michi
Date: 2006-12-28 00:47:36 +0100 (Thu, 28 Dec 2006)
New Revision: 21205

Modified:
   public/yanel/contributions/resources/world-time/src/java/org/wyona/yanel/impl/resources/ExampleResource.java
Log:
use getPath which is altready the new path

Modified: public/yanel/contributions/resources/world-time/src/java/org/wyona/yanel/impl/resources/ExampleResource.java
===================================================================
--- public/yanel/contributions/resources/world-time/src/java/org/wyona/yanel/impl/resources/ExampleResource.java	2006-12-27 23:47:21 UTC (rev 21204)
+++ public/yanel/contributions/resources/world-time/src/java/org/wyona/yanel/impl/resources/ExampleResource.java	2006-12-27 23:47:36 UTC (rev 21205)
@@ -106,16 +106,7 @@
 
         // TODO: Move the major part of the following code into Yanel Core
         // Create RTI ...
-        Path path = getPath();
-        log.error("DEBUG: Path: " + path);
-        org.wyona.commons.io.Path parent = path.getParent();
-        Path newPath = null;
-        if(parent.equals("null")) {
-            // getPath() is ROOT
-            newPath = new Path("/" + createName);
-        } else {
-            newPath = new Path(parent + "/" + createName);
-        }
+        Path newPath = getPath();
         log.error("DEBUG: New path: " + newPath);
 
         try {
@@ -126,7 +117,7 @@
             writer.write(content);
             writer.close();
         } catch(Exception e) {
-            log.error(e);
+            log.error(e.getMessage(), e);
         }
     }
 




More information about the Yanel-commits mailing list