[Yanel-commits] rev 59097 - public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Fri Jul 1 14:37:19 CEST 2011


Author: michi
Date: 2011-07-01 14:37:18 +0200 (Fri, 01 Jul 2011)
New Revision: 59097

Modified:
   public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
check first whether node exists

Modified: public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
===================================================================
--- public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java	2011-07-01 12:28:08 UTC (rev 59096)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java	2011-07-01 12:37:18 UTC (rev 59097)
@@ -796,7 +796,8 @@
             return;
         }
 
-        if (getRealm().getRepository().getNode(getPath()).hasProperty("annotations")) {
+        // INFO: If yanel-path property set, then it's not clear from where annotations should be read, hence let's check first if node (1:1) actually exists
+        if (getRealm().getRepository().existsNode(getPath()) && getRealm().getRepository().getNode(getPath()).hasProperty("annotations")) {
             String aString = getRealm().getRepository().getNode(getPath()).getProperty("annotations").getString();
             String[] aArray = aString.split(", ");
             for(int i = 0; i < aArray.length; i++) {



More information about the Yanel-commits mailing list