incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r896349 - /sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java
Date Wed, 06 Jan 2010 08:30:24 GMT
Author: cziegeler
Date: Wed Jan  6 08:30:19 2010
New Revision: 896349

URL: http://svn.apache.org/viewvc?rev=896349&view=rev
Log:
SLING-1267 : Get metadata of script only once, get input stream lazily
SLING-1266 : Init parameters from servlet config are not used

Modified:
    sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java

Modified: sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java?rev=896349&r1=896348&r2=896349&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java
(original)
+++ sling/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java
Wed Jan  6 08:30:19 2010
@@ -137,9 +137,9 @@
             // if we don't have a request resolver we directly return the script resource
             return scriptResource;
         }
-        Resource rsrc = resolver.getResource(this.scriptResource.getPath());
+        Resource rsrc = resolver.getResource(this.scriptName);
         if ( rsrc == null ) {
-            rsrc = new SyntheticResource(resolver, this.scriptResource.getPath(), this.scriptResource.getResourceType());
+            rsrc = new SyntheticResource(resolver, this.scriptName, this.scriptResource.getResourceType());
         }
         return rsrc;
     }
@@ -336,7 +336,7 @@
     }
 
     public String getServletInfo() {
-        return "Script " + scriptResource.getPath();
+        return "Script " + scriptName;
     }
 
     /**
@@ -551,7 +551,7 @@
     }
 
     private String getLoggerName() {
-        String name = scriptResource.getPath();
+        String name = scriptName;
         name = name.substring(1);       // cut-off leading slash
         name = name.replace('.', '$');  // extension separator as part of name
         name = name.replace('/', '.');  // hierarchy defined by dot



Mime
View raw message