bruno 2003/03/18 10:24:27
Modified: src/java/org/apache/cocoon/environment
AbstractEnvironment.java
Log:
- resolve(String systemId) again: avalonToCocoonSourceWrapper is a static member, so
synchronize on the class.
- IDEA cleaned up some lines with only spaces on them
Revision Changes Path
1.5 +9 -9
cocoon-2.1/src/java/org/apache/cocoon/environment/AbstractEnvironment.java
Index: AbstractEnvironment.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/AbstractEnvironment.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AbstractEnvironment.java 18 Mar 2003 16:48:00 -0000 1.4
+++ AbstractEnvironment.java 18 Mar 2003 18:24:27 -0000 1.5
@@ -115,7 +115,7 @@
/** The component manager */
protected ComponentManager manager;
-
+
/** The attributes */
private Map attributes = new HashMap();
@@ -127,7 +127,7 @@
/** The AvalonToCocoonSourceWrapper (this is for the deprecated support) */
static protected Constructor avalonToCocoonSourceWrapper;
-
+
/**
* Constructs the abstract environment
*/
@@ -352,15 +352,15 @@
// get the wrapper class - we don't want to import the wrapper directly
// to avoid a direct dependency from the core to the deprecation package
if ( null == avalonToCocoonSourceWrapper ) {
- synchronized (this) {
+ synchronized (this.getClass()) {
try {
Class clazz =
ClassUtils.loadClass("org.apache.cocoon.components.source.impl.AvalonToCocoonSource");
avalonToCocoonSourceWrapper = clazz.getConstructor(new Class[]
{ClassUtils.loadClass("org.apache.excalibur.source.Source"),
ClassUtils.loadClass("org.apache.excalibur.source.SourceResolver"),
ClassUtils.loadClass("org.apache.cocoon.environment.Environment")});
} catch (Exception e) {
- throw new ProcessingException("The deprecated resolve() method
of the environment was called."
- +"Please either update your code
to use the new resolveURI() method or"
+ throw new ProcessingException("The deprecated resolve() method
of the environment was called."
+ +"Please either update your code
to use the new resolveURI() method or"
+" install the deprecation
support.", e);
}
}
@@ -548,7 +548,7 @@
throw e;
}
}
-
+
/**
* Notify that the processing starts.
*/
@@ -562,7 +562,7 @@
throw new CascadingRuntimeException("Unable to lookup
component.", ce);
}
}
-
+
/**
* Notify that the processing is finished
* This can be used to cleanup the environment object
@@ -576,5 +576,5 @@
this.sourceResolver = null;
}
}
-
+
}