You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/05/22 22:29:15 UTC

[GitHub] [incubator-druid] gianm commented on issue #7609: Local variable names shouldn't start with capital

gianm commented on issue #7609: Local variable names shouldn't start with capital
URL: https://github.com/apache/incubator-druid/issues/7609#issuecomment-494997860
 
 
   > There are several occurrences of variables which are not constants (i.e non static fields) which have variables all capitalized for instance, Pattern DOT_OR_WHITESPACE = Pattern.compile("[\s]+|[.]+"); etc. I'm changing these to lower case. Is that fine ?
   
   For some of these, it might be an indication that the variable was intended to be a static constant, but the original developer just forgot to include the static keyword. So I would approach these with an open mind to fixing bugs like that too, not necessarily just fixing the names to match the current state.
   
   > For local final variables example here http://checkstyle.sourceforge.net/config_naming.html#LocalFinalVariableName suggests names that are only upper case letters and digits "^[A-Z][A-Z0-9]*$".
   
   IMO, this is silly, I don't see a reason to require this pattern. In fact, I'd be more inclined to require the _opposite_ (local final variables should start with lowercase letters).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org