cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: cvs commit: cocoon-2.1/src/scratchpad/src/org/apache/cocoon/transformation JXPathTransformer.java
Date Sun, 06 Apr 2003 17:47:35 GMT
on 4/6/03 7:42 PM Christopher Oliver wrote:

> Stefano Mazzocchi wrote:
> 
> 
>>on 4/6/03 6:50 AM coliver@apache.org wrote:
>>
>> 
>>
>>
>>>coliver     2003/04/05 20:50:48
>>>
>>> Modified:    src/scratchpad/src/org/apache/cocoon/transformation
>>>                       JXPathTransformer.java
>>> Log:
>>> Fixed breakage caused by Stefano's cleanup: I think you need to be equally picky
about testing before checking in ;)
>>> 
>>> Revision  Changes    Path
>>> 1.4       +0 -1      cocoon-2.1/src/scratchpad/src/org/apache/cocoon/transformation/JXPathTransformer.java
>>> 
>>> Index: JXPathTransformer.java
>>> ===================================================================
>>> RCS file: /home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/transformation/JXPathTransformer.java,v
>>> retrieving revision 1.3
>>> retrieving revision 1.4
>>> diff -u -r1.3 -r1.4
>>> --- JXPathTransformer.java	2 Apr 2003 21:38:38 -0000	1.3
>>> +++ JXPathTransformer.java	6 Apr 2003 04:50:48 -0000	1.4
>>> @@ -564,7 +564,6 @@
>>>              String variable = getExpr(a.getValue(JXPATH_VALUEOF_SELECT));
>>>              Iterator iter = 
>>>                  JXPathContext.compile(variable).iteratePointers(getContext());
>>> -            foreachStack.push(variable);
>>>              foreachStack.push(iter);
>>>          }
>>>      }
>>>   
>>>
>>
>>Wait a second.
>>
>>This is my patch taken from
>>
>>http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/transformation/JXPathTransformer.java.diff?r1=1.2&r2=1.3
>>
>>@@ -579,7 +574,6 @@
>>        if (ignoreEventsCount == 0) {
>>            DocumentFragment frag = endRecording();
>>            Iterator iter = (Iterator)foreachStack.pop();
>>-            String variable = (String)foreachStack.pop();
>>            while (iter.hasNext()) {
>>                Pointer ptr = (Pointer)iter.next();
>>                pushContext(ptr.getNode());
>>
>>I removed a variable that was popped out of the stack but never used.
>>
> 
> You also removed the "pop" itself, but you didn't remove the 
> corresonding "push".

<banging my head on the wall/>

>>I really don't see how this can be related to the above!
>>
>> 
>>
> 
> Which is exactly why code inspection isn't good enough :)  

I guess I win the cocoon-dumb-ass-of-the-month award.

And this sums up to two given the CVS mess I made last month.

:-(

Sorry about that.


-- 
Stefano.



Mime
View raw message