You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Rob Leland <rl...@apache.org> on 2003/07/27 07:16:34 UTC

[validator - ValidWhen ] Bug or unneeded variable.

James:

The variable 'theRetToken' is assigned but never used in method nextToken()
Instead _returnToken is always returned.

So it appears that theRetToken is unneeded, or this is a bug.

Also the method mWS()

on line 272:
        _ttype = Token.SKIP;
        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
         }
so the if statement will never be executed.



-- 
Rob Leland



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


RE: [validator - ValidWhen ] Bug or unneeded variable.

Posted by James Turner <tu...@blackbear.com>.
I did, it's ValidWhen.g.

James

> -----Original Message-----
> From: Rob Leland [mailto:rleland@apache.org] 
> Sent: Sunday, July 27, 2003 5:19 PM
> To: Struts Developers List
> Subject: Re: [validator - ValidWhen ] Bug or unneeded variable.
> 
> 
> James Turner wrote:
> 
> >It's auto-generated code, so you can talk to the ANTLR folks if you 
> >want
> >:-)
> >  
> >
> 
> Did you check in the files to CVS that were used to generate 
> the .java 
> files, or could you ?
> 
> 
> -Rob
> 
> >James
> >
> >  
> >
> >>-----Original Message-----
> >>From: Rob Leland [mailto:rleland@apache.org]
> >>Sent: Sunday, July 27, 2003 1:17 AM
> >>To: Struts Developers List
> >>Subject: [validator - ValidWhen ] Bug or unneeded variable.
> >>
> >>
> >>James:
> >>
> >>The variable 'theRetToken' is assigned but never used in
> >>method nextToken() Instead _returnToken is always returned.
> >>
> >>So it appears that theRetToken is unneeded, or this is a bug.
> >>
> >>Also the method mWS()
> >>
> >>on line 272:
> >>        _ttype = Token.SKIP;
> >>        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
> >>         }
> >>so the if statement will never be executed.
> >>
> >>
> >>
> >>--
> >>Rob Leland
> >>
> >>    
> >>
> >  
> >
> 
> 
> -- 
> Rob Leland
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: [validator - ValidWhen ] Bug or unneeded variable.

Posted by Rob Leland <rl...@apache.org>.
James Turner wrote:

>It's auto-generated code, so you can talk to the ANTLR folks if you want
>:-)
>  
>

Did you check in the files to CVS that were used to generate the .java 
files, or could you ?


-Rob

>James
>
>  
>
>>-----Original Message-----
>>From: Rob Leland [mailto:rleland@apache.org] 
>>Sent: Sunday, July 27, 2003 1:17 AM
>>To: Struts Developers List
>>Subject: [validator - ValidWhen ] Bug or unneeded variable.
>>
>>
>>James:
>>
>>The variable 'theRetToken' is assigned but never used in 
>>method nextToken() Instead _returnToken is always returned.
>>
>>So it appears that theRetToken is unneeded, or this is a bug.
>>
>>Also the method mWS()
>>
>>on line 272:
>>        _ttype = Token.SKIP;
>>        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
>>         }
>>so the if statement will never be executed.
>>
>>
>>
>>-- 
>>Rob Leland
>>
>>    
>>
>  
>


-- 
Rob Leland



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


RE: [validator - ValidWhen ] Bug or unneeded variable.

Posted by James Turner <tu...@blackbear.com>.
I'm not sure it's a real bug.  I think it's just the kind of code quirks
you get when you use a tool like ANTLR or YACC.

James

> -----Original Message-----
> From: Rob Leland [mailto:rleland@apache.org] 
> Sent: Monday, July 28, 2003 10:21 AM
> To: Struts Developers List
> Subject: Re: [validator - ValidWhen ] Bug or unneeded variable.
> 
> 
> James Turner wrote:
> 
> >It's auto-generated code, so you can talk to the ANTLR folks if you 
> >want
> >:-)
> >  
> >
> 
> I was hoping for you would volunteer  to take a look at the generated 
> code when you have the chance. :-D
> This would be helpful since I haven't used validwhen, and
> am less motovated than someone who has a *live* site using 
> the code. ;-)
> 
> Then how do we handle *maintaining* generated code ?
> a) manually fix any bugs.
> b) wait for antlr bug fixes then recreate the files.
> 
> 
> Rob
> 
> 
> >James
> >
> >  
> >
> >>-----Original Message-----
> >>From: Rob Leland [mailto:rleland@apache.org]
> >>Sent: Sunday, July 27, 2003 1:17 AM
> >>To: Struts Developers List
> >>Subject: [validator - ValidWhen ] Bug or unneeded variable.
> >>
> >>
> >>James:
> >>
> >>The variable 'theRetToken' is assigned but never used in
> >>method nextToken() Instead _returnToken is always returned.
> >>
> >>So it appears that theRetToken is unneeded, or this is a bug.
> >>
> >>Also the method mWS()
> >>
> >>on line 272:
> >>        _ttype = Token.SKIP;
> >>        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
> >>         }
> >>so the if statement will never be executed.
> >>
> >>
> >>
> >>--
> >>Rob Leland
> >>
> >>
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >>
> >>    
> >>
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
> >
> >
> >  
> >
> 
> 
> -- 
> Rob Leland
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: [validator - ValidWhen ] Bug or unneeded variable.

Posted by Rob Leland <rl...@apache.org>.
James Turner wrote:

>It's auto-generated code, so you can talk to the ANTLR folks if you want
>:-)
>  
>

I was hoping for you would volunteer  to take a look at the generated 
code when you have the chance. :-D
This would be helpful since I haven't used validwhen, and
am less motovated than someone who has a *live* site using the code. ;-)

Then how do we handle *maintaining* generated code ?
a) manually fix any bugs.
b) wait for antlr bug fixes then recreate the files.


Rob


>James
>
>  
>
>>-----Original Message-----
>>From: Rob Leland [mailto:rleland@apache.org] 
>>Sent: Sunday, July 27, 2003 1:17 AM
>>To: Struts Developers List
>>Subject: [validator - ValidWhen ] Bug or unneeded variable.
>>
>>
>>James:
>>
>>The variable 'theRetToken' is assigned but never used in 
>>method nextToken() Instead _returnToken is always returned.
>>
>>So it appears that theRetToken is unneeded, or this is a bug.
>>
>>Also the method mWS()
>>
>>on line 272:
>>        _ttype = Token.SKIP;
>>        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
>>         }
>>so the if statement will never be executed.
>>
>>
>>
>>-- 
>>Rob Leland
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>
>
>  
>


-- 
Rob Leland


RE: [validator - ValidWhen ] Bug or unneeded variable.

Posted by James Turner <tu...@blackbear.com>.
It's auto-generated code, so you can talk to the ANTLR folks if you want
:-)

James

> -----Original Message-----
> From: Rob Leland [mailto:rleland@apache.org] 
> Sent: Sunday, July 27, 2003 1:17 AM
> To: Struts Developers List
> Subject: [validator - ValidWhen ] Bug or unneeded variable.
> 
> 
> James:
> 
> The variable 'theRetToken' is assigned but never used in 
> method nextToken() Instead _returnToken is always returned.
> 
> So it appears that theRetToken is unneeded, or this is a bug.
> 
> Also the method mWS()
> 
> on line 272:
>         _ttype = Token.SKIP;
>         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
>          }
> so the if statement will never be executed.
> 
> 
> 
> -- 
> Rob Leland
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org