You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Jose Alberto Fernandez <JF...@viquity.com> on 2000/12/11 23:59:47 UTC

[PATCH] Bug in VelocimacroManager.java

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,

Jose Alberto


Re: [PATCH] Bug in VelocimacroManager.java

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Jon Stevens wrote:
> 
> on 12/11/2000 6:53 PM, "Geir Magnusson Jr." <ge...@optonline.net> 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.                               geirm@optonline.com
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity

Re: [PATCH] Bug in VelocimacroManager.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 12/11/2000 6:53 PM, "Geir Magnusson Jr." <ge...@optonline.net> 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?

-jon

-- 
Honk if you love peace and quiet.



Re: [PATCH] Bug in VelocimacroManager.java

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
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.

geir

-- 
Geir Magnusson Jr.                               geirm@optonline.com
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity