cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dani...@apache.org
Subject svn commit: r507267 - in /cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components: BlockPathModule.java BlockPropertyModule.java
Date Tue, 13 Feb 2007 22:28:24 GMT
Author: danielf
Date: Tue Feb 13 14:28:23 2007
New Revision: 507267

URL: http://svn.apache.org/viewvc?view=rev&rev=507267
Log:
Fixed faulty logic. Thanks to Grzegorz Kossakowski for spotting the error, https://issues.apache.org/jira/browse/COCOON-2008.

Modified:
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/BlockPathModule.java
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/BlockPropertyModule.java

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/BlockPathModule.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/BlockPathModule.java?view=diff&rev=507267&r1=507266&r2=507267
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/BlockPathModule.java
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/BlockPathModule.java
Tue Feb 13 14:28:23 2007
@@ -46,8 +46,9 @@
     public Object getAttribute( String name, Configuration modeConf, Map objectModel )
     throws ConfigurationException {
         // FIXME Will be removed when the scoped proxy work
-        if (this.servletContext == null)
-            this.servletContext = CallStackHelper.getBaseServletContext();
+        ServletContext servletContext = this.servletContext;
+        if (servletContext == null)
+            servletContext = CallStackHelper.getBaseServletContext();
         String absoluteURI = null;
         /* No relative block paths yet
         Environment env = EnvironmentHelper.getCurrentEnvironment();
@@ -58,7 +59,7 @@
         try {
             // URI uri = ServletSource.resolveURI(new URI(name), new URI(null, null, baseURI,
null));
             URI uri = new URI(name);
-            absoluteURI = ((ServletServiceContext)this.servletContext).absolutizeURI(uri).toString();
+            absoluteURI = ((ServletServiceContext)servletContext).absolutizeURI(uri).toString();
         } catch (URISyntaxException e) {
             throw new ConfigurationException("Couldn't absolutize " + name);
         }

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/BlockPropertyModule.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/BlockPropertyModule.java?view=diff&rev=507267&r1=507266&r2=507267
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/BlockPropertyModule.java
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/BlockPropertyModule.java
Tue Feb 13 14:28:23 2007
@@ -43,9 +43,10 @@
     public Object getAttribute( String name, Configuration modeConf, Map objectModel )
     throws ConfigurationException {
         // FIXME Will be removed when the scoped proxy work
-        if (this.servletContext == null)
-            this.servletContext = CallStackHelper.getBaseServletContext();
-        return this.servletContext.getInitParameter(name);
+        ServletContext servletContext = this.servletContext;
+        if (servletContext == null)
+            servletContext = CallStackHelper.getBaseServletContext();
+        return servletContext.getInitParameter(name);
     }
 
     public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)



Mime
View raw message