incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r603302 - /incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java
Date Tue, 11 Dec 2007 17:03:30 GMT
Author: bdelacretaz
Date: Tue Dec 11 09:03:30 2007
New Revision: 603302

URL: http://svn.apache.org/viewvc?rev=603302&view=rev
Log:
SLING-133 - disable script resolution for Resources that wrap Property objects

Modified:
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java?rev=603302&r1=603301&r2=603302&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java
(original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/scripting/MicroslingScriptResolver.java
Tue Dec 11 09:03:30 2007
@@ -28,6 +28,7 @@
 import javax.jcr.Item;
 import javax.jcr.Node;
 import javax.jcr.NodeIterator;
+import javax.jcr.Property;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.servlet.ServletException;
@@ -162,6 +163,12 @@
         final Resource r = request.getResource();
         final Session s = (Session)request.getAttribute(Session.class.getName());
         MicroslingScript result = null;
+        
+        // SLING-133: do not resolve scripts for Properties, we want to use our default
+        // renderers for them (TODO: having that test here is really a temp fix)
+        if(r.adaptTo(Property.class) != null) {
+            return null;
+        }
 
         final String scriptFilename = scriptFilenameBuilder.buildScriptFilename(
             request.getMethod(),



Mime
View raw message