You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by PurelyApplied <gi...@git.apache.org> on 2017/07/21 23:10:16 UTC

[GitHub] geode issue #647: GEODE-3271: Refactor WanCommands

Github user PurelyApplied commented on the issue:

    https://github.com/apache/geode/pull/647
  
    +1 as it stands.
    
    Unimportant nitpicks, rambling observations, and "it could be even better if...":
    
    * `punePort` appears in these tests a lot.  I have no idea what `pune` is supposed to mean.  Maybe `dsIdPort` would be better, glancing at the implementation of `createFirstLocatorWithDSId`?
    
    * There are five instances in `WANCommandsTestBase` that has a loop like this
    
    ```
        for (GatewaySender s : senders) {
          if (s.getId().equals(senderId)) {
            sender = (AbstractGatewaySender) s;
            break;
          }
        }
    ```
    
    that my hatred of `break` as function control thinks it would read a lot better as 
    
    ```
        AbstractGatewaySender sender =
            (AbstractGatewaySender) senders.stream().filter(s -> s.getId().equalsIgnoreCase(senderId)).findFirst().orElse(null);
    ```
    * I'd take the Inspection-suggested change in `WANCommandBaseTest.java:489` to turn the string `indexOf(...) != -1` to be `contains(...)`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---