cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <pati_giac...@yahoo.com>
Subject RE: org.apache.cocoon.sitemap.SitemapManager.hasChanged()
Date Fri, 25 Aug 2000 14:25:17 GMT

--- Vadim Gritsenko <vgritsenko@hns.com> wrote:
> > From: Giacomo Pati [mailto:pati_giacomo@yahoo.com]
> > --- Vadim Gritsenko <vgritsenko@hns.com> wrote:
> > > Hi All,
> > > 
> > > It seems there is error in this method. It returns "true"
> > > always now, and I think it should return false sometimes,
> > > like this:
> > > 
> > >  public boolean hasChanged () {
> > >   SitemapHandler sitemapHandler = null;
> > >   Enumeration enum = sitemaps.elements();
> > >   while (enum.hasMoreElements()) {
> > >    sitemapHandler = (SitemapHandler) enum.nextElement ();
> > >    if (sitemapHandler != null) {
> > >     if (sitemapHandler.hasChanged())
> > >      return true;
> > >    }
> > >   }
> > >   return false;
> > >  }
> > 
> > I've checked this and cannot reproduce it. It returns false almost
> al
> > the times. It works just as excpected.
> > 
> > Giacomo
> 
> Yes, above piece of code works fine, but in CVS
> (CVS $Revision: 1.1.2.8 $ $Date: 2000/08/21 17:35:31 $)
> we have the following:
> 
>     public boolean hasChanged () {
>         SitemapHandler sitemapHandler = null;
>         Enumeration enum = sitemaps.elements();
>         while (enum.hasMoreElements()) {
>             sitemapHandler = (SitemapHandler) enum.nextElement ();
>             if (sitemapHandler != null) {
>                 if (sitemapHandler.hasChanged())
>                     return true;
>             }
>         }
>         return true;
>     }

I thought I've always the lates code on my developer machine and the
code there look like you first snippet. I'll do a diff later on to
check this out.

Thanks

Giacomo


=====
--
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message