You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by sy...@apache.org on 2001/08/22 11:02:57 UTC

cvs commit: xml-cocoon2/src/org/apache/cocoon/components/browser BrowserImpl.xsl

sylvain     01/08/22 02:02:57

  Modified:    src/org/apache/cocoon/components/browser BrowserImpl.xsl
  Log:
  Added ThreadSafe, changed Vector to ArrayList
  
  Revision  Changes    Path
  1.6       +6 -5      xml-cocoon2/src/org/apache/cocoon/components/browser/BrowserImpl.xsl
  
  Index: BrowserImpl.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/browser/BrowserImpl.xsl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BrowserImpl.xsl	2001/07/12 13:09:47	1.5
  +++ BrowserImpl.xsl	2001/08/22 09:02:57	1.6
  @@ -15,7 +15,7 @@
   
   import java.util.Comparator;
   import java.util.HashMap;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Enumeration;
   import java.util.Iterator;
   import java.util.StringTokenizer;
  @@ -30,6 +30,7 @@
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.thread.ThreadSafe;
   
   import org.apache.cocoon.xml.dom.DOMFactory;
   import org.apache.cocoon.components.parser.Parser;
  @@ -46,7 +47,7 @@
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @version 2.0
    * @since April 13, 2001 */
  -public class BrowserImpl implements Component, Browser, Composable, Disposable
  +public class BrowserImpl implements Component, Browser, Composable, Disposable, ThreadSafe
   {
     /**
      * <code>byMimeType</code> describes how to map from a generic MIME
  @@ -111,7 +112,7 @@
     /**
      * <code>mimeTypeSearchOrder</code> specifies the order in which the
      * MIME types are searched in the <code>Accept:</code> header.  */
  -  Vector mimeTypeSearchOrder;
  +  ArrayList mimeTypeSearchOrder;
   
     Parser parser;
   
  @@ -179,7 +180,7 @@
   
   loop:
       for (int i = 0; i < length; i++) {
  -      String currentType = (String)mimeTypeSearchOrder.elementAt(i);
  +      String currentType = (String)mimeTypeSearchOrder.get(i);
         int index = currentType.indexOf("/");
         String genericType = currentType.substring(0, index) + "/*";
         StringTokenizer tokenizer = new StringTokenizer(acceptHeader, ", ");
  @@ -336,7 +337,7 @@
   
   
    <xsl:template match="search-order">
  -  mimeTypeSearchOrder = new Vector();
  +  mimeTypeSearchOrder = new ArrayList();
     <xsl:apply-templates/>
    </xsl:template>
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org