brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: accept a broader definition for l...
Date Fri, 19 Sep 2014 11:24:46 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/174#discussion_r17779573
  
    --- Diff: utils/common/src/main/java/brooklyn/util/net/Networking.java ---
    @@ -369,21 +370,36 @@ public static boolean isPublicIp(String ipAddress) {
             return true;
         }
     
    -    public static boolean isLocalhost(String remoteIp) {
    -        if ("127.0.0.1".equals(remoteIp)) return true;
    +    /** returns true if the supplied string matches any known IP (v4 or v6) for this
machine,
    +     * or if it can be resolved to any such address */
    +    public static boolean isLocalhost(String remoteAddress) {
    --- End diff --
    
    Would be good to have tests for this. There are no unit tests for `Networking.isLocalhost`
currently.


---
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.
---

Mime
View raw message