Jon Stevens wrote:
>
> on 12/11/2000 6:53 PM, "Geir Magnusson Jr." <[EMAIL PROTECTED]> wrote:
>
> > Jose Alberto Fernandez wrote:
> >>
> >> Hi,
> >>
> >> Since I could get flogged with Geir, I had to check his submission :-)
> >>
> >> This patch fixes one small bug in the code and changes the way some
> >> other condition is verified to make it more efficient.
> >>
> >> Let me know if there are any questions,
> >>
> >
> > nice. Sorry about the lack of addNew, and I like the addNamespace()
> > trick.
> >
> > done.
>
> Is it just me, but shouldn't a containsKey() be enough here?
>
I guess the idea is that the amount of work for containsKey() is the
same as put(), and since I don't call addNamespace() if it already
exists, this is the shortest path to get a new namespace into the hash.
In the event that it does exist, we simply put it back.
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity