[ 
https://issues.apache.org/jira/browse/GEODE-4183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16332636#comment-16332636
 ] 

Kenneth Howe commented on GEODE-4183:
-------------------------------------

I appreciate your thoughts, but I don't think any additional comments are 
really necessary because this use of constants is so common and the IDE's used 
for development make the usage clear. It is a normal pattern
for strings used in multiple places is to be defined as constants.

SERVER_BIND_ADDRESS is a constant that is used in 23 places in the geode 
codebase, where all uses should resolve to the same string. Changing in this 
one place would break that consistency and decrease maintainability of the 
code. 



> Code review found likely bug regarding options/help in ServerLauncher
> ---------------------------------------------------------------------
>
>                 Key: GEODE-4183
>                 URL: https://issues.apache.org/jira/browse/GEODE-4183
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>    Affects Versions: 1.4.0
>            Reporter: Cyrille Artho
>            Assignee: Kenneth Howe
>            Priority: Minor
>              Labels: patch
>         Attachments: server-launcher-typo.patch
>
>
> Both geode.distributed.LocatorLauncher and ServerLauncher have an enumeration 
> "Command", which contains a list of available command types and their options.
> In ServerLauncher, it looks like a typo causes the help/option screens to 
> show incorrect information:
>  public enum Command {
>    START("start", "assign-buckets", "disable-default-server", "rebalance", 
> SERVER_BIND_ADDRESS,
>        "server-port", "force", "debug", "help"),
> In these lines, "SERVER_BIND_ADDRESS" is nested within "START" rather than a 
> command of its own.
> I'm not sure what the output should be, and no tests currently covers that 
> behavior. Therefore, a patch passes the tests, but so does the unchanged code.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to