You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stefano Mazzocchi <st...@apache.org> on 2003/04/06 13:53:39 UTC
Re: cvs commit: cocoon-2.1/src/scratchpad/src/org/apache/cocoon/transformation
JXPathTransformer.java
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.
I really don't see how this can be related to the above!
--
Stefano.
Re: cvs commit: cocoon-2.1/src/scratchpad/src/org/apache/cocoon/transformation
JXPathTransformer.java
Posted by Stefano Mazzocchi <st...@apache.org>.
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.
Re: cvs commit: cocoon-2.1/src/scratchpad/src/org/apache/cocoon/transformation
JXPathTransformer.java
Posted by Christopher Oliver <re...@verizon.net>.
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".
>
>I really don't see how this can be related to the above!
>
>
>
Which is exactly why code inspection isn't good enough :)