[
https://issues.apache.org/jira/browse/GEODE-4183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16334015#comment-16334015
]
Cyrille Artho commented on GEODE-4183:
--------------------------------------
Thank you for your feedback. I agree that it's best to leave that part of the
code as is then.
When looking at the other strings, there are many other long constant strings
that are used here, which are defined as constants but not used. For example,
"disable-default-server" is even defined multiple times:
./org/apache/geode/internal/cache/CacheServerLauncher.java: protected static
final String DISABLE_DEFAULT_SERVER = "disable-default-server";
./org/apache/geode/management/internal/cli/i18n/CliStrings.java: public static
final String START_SERVER__DISABLE_DEFAULT_SERVER = "disable-default-server";
It is used about ten times.
That could be another refactoring task. (If you agree with that, I can create
the task while closing this one.)
> 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)