cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r446922 - in /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon: Cocoon.java components/treeprocessor/AbstractProcessingNode.java components/treeprocessor/DefaultTreeBuilder.java
Date Sat, 16 Sep 2006 19:24:36 GMT
Author: vgritsenko
Date: Sat Sep 16 12:24:36 2006
New Revision: 446922

URL: http://svn.apache.org/viewvc?view=rev&rev=446922
Log:
cleanup


Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/Cocoon.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNode.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/Cocoon.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/Cocoon.java?view=diff&rev=446922&r1=446921&r2=446922
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/Cocoon.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/Cocoon.java Sat Sep 16 12:24:36
2006
@@ -99,10 +99,10 @@
 
     // Register the location finder for Avalon configuration objects and exceptions
     // and keep a strong reference to it.
-    private static final LocationUtils.LocationFinder confLocFinder = new LocationUtils.LocationFinder()
{
+    private static final LocationUtils.LocationFinder LOCATION_FINDER = new LocationUtils.LocationFinder()
{
         public Location getLocation(Object obj, String description) {
             if (obj instanceof Configuration) {
-                Configuration config = (Configuration)obj;
+                Configuration config = (Configuration) obj;
                 String locString = config.getLocation();
                 Location result = LocationUtils.parse(locString);
                 if (LocationUtils.isKnown(result)) {
@@ -126,7 +126,9 @@
             if (obj instanceof Exception) {
                 // Many exceptions in Cocoon have a message like "blah blah at file://foo/bar.xml:12:1"
                 String msg = ((Exception)obj).getMessage();
-                if (msg == null) return null;
+                if (msg == null) {
+                    return null;
+                }
 
                 int pos = msg.lastIndexOf(" at ");
                 if (pos != -1) {
@@ -143,7 +145,7 @@
     };
 
     static {
-        LocationUtils.addFinder(confLocFinder);
+        LocationUtils.addFinder(LOCATION_FINDER);
     }
 
     static Cocoon instance;

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNode.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNode.java?view=diff&rev=446922&r1=446921&r2=446922
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNode.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/AbstractProcessingNode.java
Sat Sep 16 12:24:36 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,8 +35,8 @@
     /**
      * Get the <code>SourceResolver</code> in an object model.
      */
-    protected static final SourceResolver getSourceResolver(Map objectModel) {
-        return (SourceResolver)objectModel.get(OBJECT_SOURCE_RESOLVER);
+    protected static SourceResolver getSourceResolver(Map objectModel) {
+        return (SourceResolver) objectModel.get(OBJECT_SOURCE_RESOLVER);
     }
 
     /**

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java?view=diff&rev=446922&r1=446921&r2=446922
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java
Sat Sep 16 12:24:36 2006
@@ -167,7 +167,7 @@
     public void setAttribute(String name, Object value) {
         this.attributes.put(name, value);
     }
-    
+
     public Object getAttribute(String name) {
         return this.attributes.get(name);
     }
@@ -437,7 +437,7 @@
     public ComponentManager getSitemapComponentManager() {
         return this.manager;
     }
-    
+
     /**
      * Setup a <code>ProcessingNode</code> by setting its location, calling all
      * the lifecycle interfaces it implements and giving it the parameter map if
@@ -450,7 +450,7 @@
       throws Exception {
         Location location = getLocation(config);
         if (node instanceof AbstractProcessingNode) {
-            ((AbstractProcessingNode)node).setLocation(location);
+            ((AbstractProcessingNode) node).setLocation(location);
         }
 
         this.lifecycle.setupComponent(node, false);
@@ -479,7 +479,7 @@
             // So make some reasonable guess on the prefix until it becomes public
             String namespace = null;
             try {
-                namespace = ((AbstractConfiguration)config).getNamespace();
+                namespace = config.getNamespace();
             } catch (ConfigurationException e) {
                 // ignore
             }
@@ -487,7 +487,7 @@
                 prefix="map";
             }
         }
-        
+
         StringBuffer desc = new StringBuffer().append('<');
         if (prefix.length() > 0) {
             desc.append(prefix).append(':').append(config.getName());
@@ -499,7 +499,7 @@
             desc.append(" type=\"").append(type).append('"');
         }
         desc.append('>');
-        
+
         Location rawLoc = LocationUtils.getLocation(config, null);
         return new LocationImpl(desc.toString(), rawLoc.getURI(), rawLoc.getLineNumber(),
rawLoc.getColumnNumber());
     }
@@ -513,7 +513,7 @@
     protected Map getParameters(Configuration config, Location location) throws ConfigurationException
{
 
         Configuration[] children = config.getChildren(this.parameterElement);
-        
+
         if (children.length == 0) {
             // Parameters are only the component's location
             // TODO Optimize this



Mime
View raw message