You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@verizon.net> on 2001/10/16 14:46:35 UTC
RE: cvs commit: xml-cocoon2/src/org/apache/cocoon Main.java
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
AW: cvs commit: xml-cocoon2/src/org/apache/cocoon Main.java
Posted by Carsten Ziegeler <cz...@sundn.de>.
Thanks Vadim for the hint!
I fixed this (hopefully).
Carsten
> -----Ursprungliche Nachricht-----
> Von: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]
> Gesendet: Dienstag, 16. Oktober 2001 14:47
> An: cocoon-dev@xml.apache.org
> Betreff: RE: cvs commit: xml-cocoon2/src/org/apache/cocoon Main.java
>
>
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org