Re: [Codenarc-user] FieldNameRule: definition of what's a constant
Brought to you by:
chrismair
From: <chr...@we...> - 2011-05-31 14:46:47
|
I agree. And though this has the potential to "break" some existing users (including me, by the way), I agree it is a "bug" and should be fixed. I have opened an issue for that: https://sourceforge.net/tracker/?func=detail&aid=3309748&group_id=250145&atid=1126573 Chris -----Original Message----- From: René Scheibe [mailto:ren...@go...] Sent: Tuesday, May 31, 2011 3:30 AM To: Hamlet DArcy Cc: codenarc-user Subject: Re: [Codenarc-user] FieldNameRule: definition of what's a constant On 05/31/2011 09:23 AM, Hamlet DArcy wrote: >> So I vote to change the finalRegex to the staticFinalRegex. > > You want it like this, right? > > String regex = DEFAULT_FIELD_NAME > String staticRegex > String finalRegex > String staticFinalRegex = DEFAULT_CONST_NAME Yes. Exactly. :-) > I agree. It's up to Chris if he thinks it is a backwards incompatible change or a bug to be fixed. > > > > > ----- Original Message ----- >> For me it's a bug, not only changed expectations. This results in >> people >> having incorrectly named variables. >> >> So I vote to change the finalRegex to the staticFinalRegex. >> >> Regards, >> René Scheibe >> >> On 05/31/2011 07:25 AM, Hamlet DArcy wrote: >>> IMO, I would also have a different "finalRegex" default property. I >>> think we won't change the default because of backwards >>> compatibility. >>> >>> >>> ----- Original Message ----- >>>> I was wondering why the "finalRegex" contains the >>>> DEFAULT_CONST_NAME >>>> pattern. I think only the "staticFinalRegex" should contain the >>>> DEFAULT_CONST_NAME pattern, as only "static final" declares class >>>> constants. >>>> >>>> Have a look at Sun's code conventions: >>>> http://www.oracle.com/technetwork/java/codeconventions-135099.html#367 >>>> http://download.oracle.com/javase/tutorial/java/nutsandbolts/variables.html >>>> >>>> I was confused when violations popped up for things I am doing >>>> since >>>> years. :-) >>>> >>>> Regards, >>>> René Scheibe >>>> >>>> ------------------------------------------------------------------------------ >>>> vRanger cuts backup time in half-while increasing security. >>>> With the market-leading solution for virtual backup and recovery, >>>> you get blazing-fast, flexible, and affordable data protection. >>>> Download your free trial now. >>>> http://p.sf.net/sfu/quest-d2dcopy1 >>>> _______________________________________________ >>>> Codenarc-user mailing list >>>> Cod...@li... >>>> https://lists.sourceforge.net/lists/listinfo/codenarc-user >>>> >> >> ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Codenarc-user mailing list Cod...@li... https://lists.sourceforge.net/lists/listinfo/codenarc-user |