sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r653340 - /incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/SlingServletResolver.java
Date Mon, 05 May 2008 08:01:33 GMT
Author: fmeschbe
Date: Mon May  5 01:01:33 2008
New Revision: 653340

URL: http://svn.apache.org/viewvc?rev=653340&view=rev
Log:
SLING-390 Use the correct test to actually get the script and not
throw an NPE

Modified:
    incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/SlingServletResolver.java

Modified: incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/SlingServletResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/SlingServletResolver.java?rev=653340&r1=653339&r2=653340&view=diff
==============================================================================
--- incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/SlingServletResolver.java
(original)
+++ incubator/sling/trunk/sling/servlet-resolver/src/main/java/org/apache/sling/servlet/resolver/SlingServletResolver.java
Mon May  5 01:01:33 2008
@@ -196,7 +196,7 @@
             Resource resource = resourceResolver.getResource(scriptPath);
             if (resource != null) {
                 SlingScript script = resource.adaptTo(SlingScript.class);
-                if (script == null) {
+                if (script != null) {
                     log.debug("findScript: Using script {} for {}",
                         script.getScriptResource().getPath(), name);
                     return script;



Mime
View raw message