cziegeler 2004/01/05 03:28:24
Modified: src/java/org/apache/cocoon/components/cprocessor/sitemap
MountNode.java
src/java/org/apache/cocoon/environment
EnvironmentHelper.java
Log:
Resetting environment
Revision Changes Path
1.5 +4 -4
cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/sitemap/MountNode.java
Index: MountNode.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/sitemap/MountNode.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MountNode.java 5 Jan 2004 10:53:35 -0000 1.4
+++ MountNode.java 5 Jan 2004 11:28:24 -0000 1.5
@@ -131,8 +131,8 @@
TreeProcessor processor = this.getProcessor(resolvedSource,
resolvedPrefix);
- String oldPrefix = env.getURIPrefix();
- String oldURI = env.getURI();
+ final String oldPrefix = env.getURIPrefix();
+ final String oldURI = env.getURI();
try {
processor.getEnvironmentHelper().changeContext(env);
@@ -151,7 +151,7 @@
}
} finally {
// Restore context
- processor.getEnvironmentHelper().resetContext(env);
+ env.setURI(oldPrefix, oldURI);
// Turning recomposing as a test, according to:
// http://marc.theaimsgroup.com/?t=106802211400005&r=1&w=2
1.14 +1 -16
cocoon-2.2/src/java/org/apache/cocoon/environment/EnvironmentHelper.java
Index: EnvironmentHelper.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/environment/EnvironmentHelper.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- EnvironmentHelper.java 5 Jan 2004 10:53:35 -0000 1.13
+++ EnvironmentHelper.java 5 Jan 2004 11:28:24 -0000 1.14
@@ -191,7 +191,6 @@
/**
* Change the context of the environment.
- * Call [EMAIL PROTECTED] #resetContext(Environment) to undo the change
* @param env The environment to change
* @throws ProcessingException
*/
@@ -211,20 +210,6 @@
}
}
- /**
- * Reset the context of the environment. Use this together
- * with [EMAIL PROTECTED] #changeContext(environment)}
- * @param env The environment to change
- * @throws ProcessingException
- */
- public void resetContext(Environment env)
- throws ProcessingException {
- if (this.lastPrefix != null ) {
- // FIXME - This is not correct!
- env.setURI("", this.lastPrefix + env.getURI());
- }
- }
-
/**
* Set the context of the environment.
* @param env The environment to change