sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefane...@apache.org
Subject svn commit: r1599509 - /sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java
Date Tue, 03 Jun 2014 12:33:14 GMT
Author: stefanegli
Date: Tue Jun  3 12:33:14 2014
New Revision: 1599509

URL: http://svn.apache.org/r1599509
Log:
SLING-3606 related : fix for getValueAsString() with non-String/Name property types

Modified:
    sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java

Modified: sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java?rev=1599509&r1=1599508&r2=1599509&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java
(original)
+++ sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java
Tue Jun  3 12:33:14 2014
@@ -1240,12 +1240,15 @@ public class JcrNode implements IAdaptab
             
             @Override
             public String getValueAsString() {
-                Object propertyValue = getProperties().getValue(name);
-                if (propertyValue!=null) {
-                    return String.valueOf(propertyValue);
-                } else {
+                String rawValue = getProperties().getValue(name);
+                if (rawValue==null) {
                     return null;
                 }
+                if (rawValue.startsWith("{")) {
+                    int curlyEnd = rawValue.indexOf("}", 1);
+                    rawValue = rawValue.substring(curlyEnd+1);
+                }
+                return rawValue;
             }
 
             @Override



Mime
View raw message