[
https://issues.apache.org/jira/browse/GEODE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16321562#comment-16321562
]
Cyrille Artho commented on GEODE-3584:
--------------------------------------
Thanks. In this case, some of the changes I've tried ended up working not so
well; in particular, I first wanted to avoid having to write wrapper functions
for the setters in Builder. Because Java's type checker is too dumb, this ended
up requiring more typecasts then I thought (in the few hundreds), so I gave up
on this once I realized how many changes this would entail.
Therefore, my local commit history has some changes that are later (partially)
reverted again.
Two changes that are perhaps debatable are:
# hostname to hostName for consistency (was lowercase in LocatorLauncher)
# serverPort/serverBindAddress to port/bindAddress for consistency (was
server-X in ServerLauncher).
However, without these changes, there is more code duplication left.
> Refactor ServerLauncher and LocatorLauncher to eliminate code duplication
> -------------------------------------------------------------------------
>
> Key: GEODE-3584
> URL: https://issues.apache.org/jira/browse/GEODE-3584
> Project: Geode
> Issue Type: Improvement
> Components: gfsh
> Affects Versions: 1.2.0
> Reporter: Kenneth Howe
> Attachments: GEODE-3584-1, GEODE-3584-WIP, GEODE-3584-WIP-2,
> GEODE-3584-WIP-3, GEODE-3584-WIP-4
>
>
> There is some duplication of code in the Launcher classes that can be
> eliminated. Both classes have methods such as getBindAddress (called
> getServerBindAddress in ServerLauncher) that could be hoisted into
> AbstractLauncher class that they both extend. The same goes for the inner
> State classes of the Launchers; they have methods that could be moved to
> AbstractLauncher.ServiceState.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)