[Yanel-commits] rev 25655 - public/yanel/trunk/src/contributions/resources/atom/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Sun Jul 1 23:55:20 CEST 2007


Author: michi
Date: 2007-07-01 23:55:19 +0200 (Sun, 01 Jul 2007)
New Revision: 25655

Modified:
   public/yanel/trunk/src/contributions/resources/atom/src/java/org/wyona/yanel/impl/resources/AtomFeedResource.java
Log:
get property fixed

Modified: public/yanel/trunk/src/contributions/resources/atom/src/java/org/wyona/yanel/impl/resources/AtomFeedResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/atom/src/java/org/wyona/yanel/impl/resources/AtomFeedResource.java	2007-07-01 21:41:19 UTC (rev 25654)
+++ public/yanel/trunk/src/contributions/resources/atom/src/java/org/wyona/yanel/impl/resources/AtomFeedResource.java	2007-07-01 21:55:19 UTC (rev 25655)
@@ -282,24 +282,17 @@
     }
 
     /**
-     * Get property from RTI
+     * Get property from resource instance configuration
      */
     private String getProperty(String path, String name, String defaultValue) {
-        String propertyValue = defaultValue;
+        String propertyValue = null;
+	
         try {
-            java.io.BufferedReader br = new java.io.BufferedReader(getRealm().getRTIRepository().getReader(new org.wyona.yarep.core.Path(PathUtil.getRTIPath(getPath()))));
-
-            String property = null;
-            while ((property = br.readLine()) != null) {
-                if (property.indexOf(name + ":") == 0) {
-                    propertyValue = property.substring(name.length() + 2);
-                    log.info("*" + propertyValue + "*");
-                    return propertyValue;
-                }
-            }
-        } catch(Exception e) {
-            log.warn(e);
+	    propertyValue = getResourceConfigProperty(name);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
         }
+        if (propertyValue == null) propertyValue = defaultValue;
 
         return propertyValue;
     }




More information about the Yanel-commits mailing list