cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r156626 - in cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon: components/source/impl/ selection/ servlet/ transformation/constrained/ util/
Date Wed, 09 Mar 2005 09:43:43 GMT
Author: cziegeler
Date: Wed Mar  9 01:43:39 2005
New Revision: 156626

URL: http://svn.apache.org/viewcvs?view=rev&rev=156626
Log:
Apply changes from 2.1.x branch to scratchpad

Modified:
    cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/DelayRefresher.java
    cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/ZipSourceFactory.java
    cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/selection/DateSelector.java
    cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/servlet/CocoonFilterGeneratorImpl.java
    cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/AbstractConstrainedTransformer.java
    cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/ElementValueEvent.java
    cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/XmlTreeConstraint.java
    cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/util/SoftSourceCache.java

Modified: cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/DelayRefresher.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/DelayRefresher.java?view=diff&r1=156625&r2=156626
==============================================================================
--- cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/DelayRefresher.java
(original)
+++ cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/DelayRefresher.java
Wed Mar  9 01:43:39 2005
@@ -351,7 +351,7 @@
 	/**
 	 * Configuration data holder for scheduled targets.
 	 */
-	class TargetConfiguration {
+	static class TargetConfiguration {
         
         final Map map;
 		Parameters parameters;

Modified: cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/ZipSourceFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/ZipSourceFactory.java?view=diff&r1=156625&r2=156626
==============================================================================
--- cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/ZipSourceFactory.java
(original)
+++ cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/ZipSourceFactory.java
Wed Mar  9 01:43:39 2005
@@ -37,14 +37,14 @@
   * zip://myFile.xml@myZip.zip (zip://[file]@[archive])
   * 
   * @author <a href="http://apache.org/~reinhard">Reinhard Poetz</a>
-  * @version CVS $Id: ZipSourceFactory.java,v 1.2 2004/03/05 10:07:25 bdelacretaz Exp $
+  * @version CVS $Id$
   * @since 2.1.4
   */ 
 public class ZipSourceFactory extends AbstractLogEnabled
     implements SourceFactory, ThreadSafe, Serviceable {
 
     protected ServiceManager manager;
-    public static String ZIP_SOURCE_SCHEME = "zip:";
+    public final static String ZIP_SOURCE_SCHEME = "zip:";
 
     public Source getSource(String location, Map parameters)
         throws IOException, MalformedURLException {

Modified: cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/selection/DateSelector.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/selection/DateSelector.java?view=diff&r1=156625&r2=156626
==============================================================================
--- cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/selection/DateSelector.java
(original)
+++ cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/selection/DateSelector.java
Wed Mar  9 01:43:39 2005
@@ -275,20 +275,22 @@
         /** the configured date value
          */
         private Date date;
+
         /** indicator if after comparison should be performed
          */
         private boolean isCompareAfter;
+
         /** indicator if before comparison shoulde be performed
          */
         private boolean isCompareBefore;
+
+        final static String AFTER_COMPARATOR_MODE = "after";
+        final static String BEFORE_COMPARATOR_MODE = "before";
         
-        final String AFTER_COMPARATOR_MODE = "after";
-        final String BEFORE_COMPARATOR_MODE = "before";
-        
-        public DateComparator( Date d, String comparator ) {
+        public DateComparator(Date d, String comparator) {
             this.date = d;
-            this.isCompareAfter = AFTER_COMPARATOR_MODE.equalsIgnoreCase( comparator );
-            this.isCompareBefore = BEFORE_COMPARATOR_MODE.equalsIgnoreCase( comparator );
+            this.isCompareAfter = AFTER_COMPARATOR_MODE.equalsIgnoreCase(comparator);
+            this.isCompareBefore = BEFORE_COMPARATOR_MODE.equalsIgnoreCase(comparator);
         }
         public Date getDate() {
             return this.date;
@@ -312,13 +314,13 @@
          *   <code>now.after( date)</code>, or <code>now.before( date )</code>
          *   yield true
          */
-        public boolean compareTo( Date now ) {
+        public boolean compareTo(Date now) {
             if (isCompareAfter) {
-                return now.after( date );
+                return now.after(date);
             } else if (isCompareBefore) {
-                return now.before( date );
+                return now.before(date);
             } else {
-                return now.compareTo( date) == 0;
+                return now.compareTo(date) == 0;
             }
         }
     }
@@ -331,7 +333,7 @@
      *  reducing the comparsion effort.
      * </p>
      */
-    private class DateSelectorContext {
+    private static class DateSelectorContext {
         Date now;
         HashSet set;
         Logger logger;

Modified: cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/servlet/CocoonFilterGeneratorImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/servlet/CocoonFilterGeneratorImpl.java?view=diff&r1=156625&r2=156626
==============================================================================
--- cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/servlet/CocoonFilterGeneratorImpl.java
(original)
+++ cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/servlet/CocoonFilterGeneratorImpl.java
Wed Mar  9 01:43:39 2005
@@ -115,7 +115,7 @@
  * </p>
  *
  * @author <a href="mailto:berni_huber@a1.net">Bernhard Huber</a>
- * @version CVS $Id: CocoonFilterGeneratorImpl.java,v 1.4 2004/05/07 17:32:58 joerg Exp $
+ * @version CVS $Id$
  *
  */
 public class CocoonFilterGeneratorImpl implements Filter {
@@ -141,13 +141,13 @@
      *
      * @since 1.0
      */
-    final String VERBOSE_PARAM = "verbose";
+    final static String VERBOSE_PARAM = "verbose";
     /**
      * Default verbose mode, ie <code>true</code>.
      *
      * @since 1.0
      */
-    final boolean VERBOSE_DEFAULT = true;
+    final static boolean VERBOSE_DEFAULT = true;
 
     /**
      * Currently active verbose mode
@@ -401,7 +401,7 @@
      * @author     HuberB1
      * @version
      */
-    class CocoonFilterGeneratorRequestWrapper extends HttpServletRequestWrapper {
+    static class CocoonFilterGeneratorRequestWrapper extends HttpServletRequestWrapper {
         /**
          * put xml-data into request-attribute under this name, ie. org.apache.cocoon.xml-data
          *
@@ -450,7 +450,7 @@
      * @author     HuberB1
      * @version
      */
-    class CocoonFilterGeneratorConfig implements ServletConfig {
+    static class CocoonFilterGeneratorConfig implements ServletConfig {
         ServletContext c;
 
 
@@ -610,7 +610,7 @@
      * @author     HuberB1
      * @version
      */
-    class CocoonFilterGeneratorOutputStream extends ServletOutputStream {
+    static class CocoonFilterGeneratorOutputStream extends ServletOutputStream {
 
         private DataOutputStream stream;
 

Modified: cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/AbstractConstrainedTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/AbstractConstrainedTransformer.java?view=diff&r1=156625&r2=156626
==============================================================================
--- cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/AbstractConstrainedTransformer.java
(original)
+++ cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/AbstractConstrainedTransformer.java
Wed Mar  9 01:43:39 2005
@@ -28,6 +28,7 @@
 import org.apache.cocoon.environment.SourceResolver;
 import org.apache.cocoon.transformation.AbstractTransformer;
 import org.apache.cocoon.xml.XMLConsumer;
+import org.apache.commons.lang.BooleanUtils;
 
 import org.xml.sax.Attributes;
 import org.xml.sax.Locator;
@@ -42,7 +43,7 @@
  *
  * @author     <a href="mailto:nicolaken@apache.org">Nicola Ken Barozzi</a>
  * @author     <a href="mailto:tom.klaasen@pandora.be">Tom Klaasen</a>
- * @version CVS $Id: AbstractConstrainedTransformer.java,v 1.4 2004/03/05 10:07:26 bdelacretaz
Exp $
+ * @version CVS $Id$
  */
 public abstract class AbstractConstrainedTransformer
 		 extends AbstractTransformer {
@@ -169,7 +170,7 @@
 
 			while (constraintsIter.hasNext()) {
 				if (((XmlTreeConstraint) constraintsIter.next())
-						.isAllowed(new Boolean(isMyUri), this.myUriOpenElements,
+						.isAllowed(BooleanUtils.toBooleanObject(isMyUri), this.myUriOpenElements,
 						this.globalOpenElements)) {
 					return;
 				}
@@ -205,7 +206,7 @@
 					currentConstraint =
 							(XmlTreeConstraint) constraintsIter.next();
 					isAllowed =
-							currentConstraint.isAllowed(new Boolean(isMyUri),
+							currentConstraint.isAllowed(BooleanUtils.toBooleanObject(isMyUri),
 							this.myUriOpenElements,
 							this.globalOpenElements);
 
@@ -274,7 +275,7 @@
 	 *@author     Nicola Ken Barozzi
 	 *@since      14 May 2002
 	 */
-	public class RipperListener extends ElementEventAdapter {
+	public static class RipperListener extends ElementEventAdapter {
 
 		public void elementValueRecieved(ElementValueEvent e) {
 			//do nothing so that element doesn't pass through

Modified: cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/ElementValueEvent.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/ElementValueEvent.java?view=diff&r1=156625&r2=156626
==============================================================================
--- cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/ElementValueEvent.java
(original)
+++ cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/ElementValueEvent.java
Wed Mar  9 01:43:39 2005
@@ -20,7 +20,7 @@
 /**
  *
  * @author <a href="mailto:nicolaken@apache.org">Nicola Ken Barozzi</a> 
- * @version CVS $Id: ElementValueEvent.java,v 1.3 2004/03/05 10:07:26 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class ElementValueEvent extends ContainerElementEndEvent {
 
@@ -48,6 +48,6 @@
     }
 
     public String getAttribute(String attributeName) {
-        return elementAttributes.getValue(attributeName).toString();
+        return elementAttributes.getValue(attributeName);
     }
 }

Modified: cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/XmlTreeConstraint.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/XmlTreeConstraint.java?view=diff&r1=156625&r2=156626
==============================================================================
--- cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/XmlTreeConstraint.java
(original)
+++ cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/transformation/constrained/XmlTreeConstraint.java
Wed Mar  9 01:43:39 2005
@@ -19,9 +19,11 @@
 import java.util.List;
 import java.util.ListIterator;
 
+import org.apache.commons.lang.BooleanUtils;
+
 /**
  * @author <a href="mailto:nicolaken@apache.org">Nicola Ken Barozzi</a>
- * @version CVS $Id: XmlTreeConstraint.java,v 1.4 2004/03/05 10:07:26 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class XmlTreeConstraint {
 
@@ -60,14 +62,14 @@
 
 		this.allowedMyUriStackEnd = Arrays.asList(allowedMyUriStackEnd);
 		this.allowedGlobalStackEnd = Arrays.asList(allowedGlobalStackEnd);
-		this.isMyUriRequired = new Boolean(isMyUriRequired);
+		this.isMyUriRequired = BooleanUtils.toBooleanObject(isMyUriRequired);
 	}
 
 
 	public XmlTreeConstraint(String[] allowedMyUriStackEnd,
 			boolean isMyUriRequired) {
 		this.allowedMyUriStackEnd = Arrays.asList(allowedMyUriStackEnd);
-		this.isMyUriRequired = new Boolean(isMyUriRequired);
+		this.isMyUriRequired = BooleanUtils.toBooleanObject(isMyUriRequired);
 	}
 
 

Modified: cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/util/SoftSourceCache.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/util/SoftSourceCache.java?view=diff&r1=156625&r2=156626
==============================================================================
--- cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/util/SoftSourceCache.java (original)
+++ cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/util/SoftSourceCache.java Wed
Mar  9 01:43:39 2005
@@ -20,7 +20,6 @@
 import java.util.Collections;
 import java.util.Map;
 
-import org.apache.commons.collections.map.AbstractReferenceMap;
 import org.apache.commons.collections.map.ReferenceMap;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
@@ -37,7 +36,7 @@
  * 
  * @since 2.1.4
  * @author <a href="mailto:haul@apache.org">Christian Haul</a>
- * @version CVS $Id: SoftSourceCache.java,v 1.5 2004/06/29 15:07:14 joerg Exp $
+ * @version CVS $Id$
  */
 public class SoftSourceCache implements SourceCache {
 
@@ -53,7 +52,7 @@
 		if (this.objectCache == null)
 			this.objectCache =
 				Collections.synchronizedMap(
-					new ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.SOFT));
+					new ReferenceMap(ReferenceMap.SOFT, ReferenceMap.SOFT));
 	}
 
 	/*
@@ -112,7 +111,7 @@
 	 * Private helper to hold source validities and cached objects.
 	 * @author <a href="mailto:haul@apache.org">Christian Haul</a>
 	 */
-	private class CacheEntry {
+	private static class CacheEntry {
 		public SourceValidity validity = null;
 		public Object object = null;
 



Mime
View raw message