brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: improvements to rest-api module
Date Thu, 07 Jan 2016 12:57:05 GMT
Github user sjcorbett commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1127#issuecomment-169656161
  
    brooklyn-server/rest/rest-api/src/main/java/org/apache/brooklyn/rest/domain/AccessSummary.java
    I think it would be better to continue using `Objects.hashCode`. It does the same thing.
    ```java
         @Override
         public int hashCode() {
    -        return Objects.hashCode(locationProvisioningAllowed);
    +        int result = (locationProvisioningAllowed ? 1 : 0);
    +        result = 31 * result + (links != null ? links.hashCode() : 0);
    +        return result;
         }
    ```
    Just write `Objects.hashCode(locationProvisioningAllowed, links)`.


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