cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: cvs commit: xml-cocoon2/src/org/apache/cocoon Main.java
Date Tue, 16 Oct 2001 12:46:35 GMT
Carsten,

You want to check for duplicates also at line 421:
                    links.addAll(this.processURI(url));
(That's why Set was used)

Otherwise processing would never stops even on site with two pages ;)

Regards,
Vadim

> -----Original Message-----
> From: cziegeler@apache.org [mailto:cziegeler@apache.org]
> Sent: Tuesday, October 16, 2001 8:11 AM
> To: xml-cocoon2-cvs@apache.org
> Subject: cvs commit: xml-cocoon2/src/org/apache/cocoon Main.java
> 
> cziegeler    01/10/16 05:10:44
> 
>   Modified:    src/org/apache/cocoon Main.java
>   Log:
>   Fixed order of processing urls
> 
>   Revision  Changes    Path
>   1.23      +3 -4      xml-cocoon2/src/org/apache/cocoon/Main.java
> 
>   Index: Main.java
>   ===================================================================
>   RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/Main.java,v
>   retrieving revision 1.22
>   retrieving revision 1.23
>   diff -u -r1.22 -r1.23
>   --- Main.java	2001/10/11 14:34:44	1.22
>   +++ Main.java	2001/10/16 12:10:44	1.23
>   @@ -35,7 +35,7 @@
>     * Command line entry point.
>     *
>     * @author <a href="mailto:stefano@apache.org">Stefano
Mazzocchi</a>
>   - * @version CVS $Revision: 1.22 $ $Date: 2001/10/11 14:34:44 $
>   + * @version CVS $Revision: 1.23 $ $Date: 2001/10/16 12:10:44 $
>     */
> 
>    public class Main {
>   @@ -412,11 +412,10 @@
>            int nCount = 0;
>            log.info("...ready, let's go:");
> 
>   -        HashSet links = new HashSet();
>   +        java.util.ArrayList links = new java.util.ArrayList();
>            links.addAll(uris);
>            while (links.size() > 0) {
>   -            Iterator i = links.iterator();
>   -            String url = (String)i.next();
>   +            String url = (String)links.get(0);
>                if(allProcessedLinks.get(url) == null){
>                    if (xspOnly) {
>                        this.processXSP(url);
> 
> 
> 
> 
> ----------------------------------------------------------------------
> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message