forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r109941 - in forrest/trunk/main/java/org/apache: cocoon/components/modules/input cocoon/generation cocoon/transformation forrest/conf
Date Mon, 06 Dec 2004 03:27:55 GMT
Author: antonio
Date: Sun Dec  5 19:27:53 2004
New Revision: 109941

URL: http://svn.apache.org/viewcvs?view=rev&rev=109941
Log:
Remove unnecesary cast and imports
Modified:
   forrest/trunk/main/java/org/apache/cocoon/components/modules/input/LocationMapModule.java
   forrest/trunk/main/java/org/apache/cocoon/generation/XNIConfigurableFileGenerator.java
   forrest/trunk/main/java/org/apache/cocoon/transformation/XPathTransformer.java
   forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfUtils.java

Modified: forrest/trunk/main/java/org/apache/cocoon/components/modules/input/LocationMapModule.java
Url: http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/cocoon/components/modules/input/LocationMapModule.java?view=diff&rev=109941&p1=forrest/trunk/main/java/org/apache/cocoon/components/modules/input/LocationMapModule.java&r1=109940&p2=forrest/trunk/main/java/org/apache/cocoon/components/modules/input/LocationMapModule.java&r2=109941
==============================================================================
--- forrest/trunk/main/java/org/apache/cocoon/components/modules/input/LocationMapModule.java
(original)
+++ forrest/trunk/main/java/org/apache/cocoon/components/modules/input/LocationMapModule.java
Sun Dec  5 19:27:53 2004
@@ -21,7 +21,6 @@
 import java.util.Map;
 
 import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.component.Component;
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -135,7 +134,7 @@
         }
         finally {
             if (parser != null) {
-                m_manager.release((Component) parser);
+                m_manager.release(parser);
             }
         }
         return configuration;

Modified: forrest/trunk/main/java/org/apache/cocoon/generation/XNIConfigurableFileGenerator.java
Url: http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/cocoon/generation/XNIConfigurableFileGenerator.java?view=diff&rev=109941&p1=forrest/trunk/main/java/org/apache/cocoon/generation/XNIConfigurableFileGenerator.java&r1=109940&p2=forrest/trunk/main/java/org/apache/cocoon/generation/XNIConfigurableFileGenerator.java&r2=109941
==============================================================================
--- forrest/trunk/main/java/org/apache/cocoon/generation/XNIConfigurableFileGenerator.java
(original)
+++ forrest/trunk/main/java/org/apache/cocoon/generation/XNIConfigurableFileGenerator.java
Sun Dec  5 19:27:53 2004
@@ -22,7 +22,6 @@
 import org.apache.cocoon.caching.CacheableProcessingComponent;
 import org.apache.avalon.excalibur.pool.Recyclable;
 import org.apache.excalibur.xml.EntityResolver;
-import org.apache.avalon.framework.component.Component;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.xerces.xni.parser.XMLParserConfiguration;
@@ -200,7 +199,7 @@
       getLogger().error("Some strange thing just happened!!", e);
       throw new ProcessingException("XNIConfigurable.generate()",e);
     } finally {
-      this.manager.release((Component)catalogResolver);
+      this.manager.release(catalogResolver);
     }
   }
 }

Modified: forrest/trunk/main/java/org/apache/cocoon/transformation/XPathTransformer.java
Url: http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/cocoon/transformation/XPathTransformer.java?view=diff&rev=109941&p1=forrest/trunk/main/java/org/apache/cocoon/transformation/XPathTransformer.java&r1=109940&p2=forrest/trunk/main/java/org/apache/cocoon/transformation/XPathTransformer.java&r2=109941
==============================================================================
--- forrest/trunk/main/java/org/apache/cocoon/transformation/XPathTransformer.java	(original)
+++ forrest/trunk/main/java/org/apache/cocoon/transformation/XPathTransformer.java	Sun Dec
 5 19:27:53 2004
@@ -26,7 +26,6 @@
 import org.apache.cocoon.caching.CacheableProcessingComponent;
 import org.apache.cocoon.environment.SourceResolver;
 import org.apache.cocoon.util.HashUtil;
-import org.apache.cocoon.xml.XMLUtils;
 import org.apache.excalibur.source.SourceValidity;
 import org.apache.excalibur.source.impl.validity.NOPValidity;
 import org.apache.excalibur.xml.dom.DOMParser;
@@ -97,8 +96,8 @@
             String source, Parameters parameters)
         throws ProcessingException, SAXException, IOException {
         super.setup(resolver, objectModel, source, parameters);
-        this.include = (String)parameters.getParameter("include", "/");
-        this.exclude = (String)parameters.getParameter("exclude", null);
+        this.include = parameters.getParameter("include", "/");
+        this.exclude = parameters.getParameter("exclude", null);
         }
 
 
@@ -148,7 +147,7 @@
         Document newDoc = parser.createDocument();
         NodeList nodes = processor.selectNodeList(doc, xpath);
         for (int i=0; i<nodes.getLength(); i++) {
-            Node node = (Node)nodes.item(i);
+            Node node = nodes.item(i);
             addNode(newDoc, node);
         }
         return newDoc;
@@ -166,8 +165,8 @@
             return doc;
         }
         NodeList nodes = processor.selectNodeList(doc, xpath);
-        for (int i=0; i<nodes.getLength(); i++) {
-            Node node = (Node)nodes.item(i);
+        for (int i = 0; i < nodes.getLength(); i++) {
+            Node node = nodes.item(i);
             // Detach this node. Attr nodes need to be handled specially
             if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
                 Attr attrNode = (Attr)node;
@@ -263,8 +262,8 @@
      */
     private Node findOrCreateNode(Node parent, Node newNode) {
         NodeList otherChildren = parent.getChildNodes();
-        for (int i=0; i<otherChildren.getLength(); i++) {
-            Node child = (Node)otherChildren.item(i);
+        for (int i = 0; i < otherChildren.getLength(); i++) {
+            Node child = otherChildren.item(i);
             if (nodeEquality(child, newNode)) {
                 // Found existing equivalent node
                 return child;

Modified: forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfUtils.java
Url: http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfUtils.java?view=diff&rev=109941&p1=forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfUtils.java&r1=109940&p2=forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfUtils.java&r2=109941
==============================================================================
--- forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfUtils.java	(original)
+++ forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfUtils.java	Sun Dec  5 19:27:53
2004
@@ -47,15 +47,12 @@
  */
 public class ForrestConfUtils
 {
-    private String             forrestHome, projectHome, contextHome;
-
     public final static String defaultHome = "context:/";
 
     private final static String getSystemProperty(String propertyName) {
 
         //if the property is not set, default to the webapp context
         String propertyValue = System.getProperty(propertyName, defaultHome);
-
         return propertyValue;
     }
 
@@ -120,5 +117,5 @@
         props.remove("project.skin");
         props.setProperty("project.skin", skinStoUse);
     }
-    
+
 }

Mime
View raw message