brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-461) Merging config keys: CollectionMerger.Ref.equals always return true
Date Tue, 14 Nov 2017 10:50:00 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16251229#comment-16251229
] 

ASF GitHub Bot commented on BROOKLYN-461:
-----------------------------------------

Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-server/pull/893
  
    retest this please
    
    Failure was `ElectPrimaryTest.testSelectionModeFailoverReelectWithPreference`:
    ```
    java.lang.AssertionError: failed succeeds-eventually, 75 attempts, 30001ms elapsed: AssertionError:
attribute=Sensor: primary (org.apache.brooklyn.api.entity.Entity); val=TestEntityImpl{id=rg0witaqno}
    	at org.apache.brooklyn.camp.brooklyn.test.policy.failover.ElectPrimaryTest.runSelectionModeTest(ElectPrimaryTest.java:334)
    	at org.apache.brooklyn.camp.brooklyn.test.policy.failover.ElectPrimaryTest.testSelectionModeFailoverReelectWithPreference(ElectPrimaryTest.java:292)
    Caused by: java.lang.AssertionError: attribute=Sensor: primary (org.apache.brooklyn.api.entity.Entity);
val=TestEntityImpl{id=rg0witaqno}
    	at org.apache.brooklyn.camp.brooklyn.test.policy.failover.ElectPrimaryTest.runSelectionModeTest(ElectPrimaryTest.java:334)
    	at org.apache.brooklyn.camp.brooklyn.test.policy.failover.ElectPrimaryTest.testSelectionModeFailoverReelectWithPreference(ElectPrimaryTest.java:292)
    ```


> Merging config keys: CollectionMerger.Ref.equals always return true
> -------------------------------------------------------------------
>
>                 Key: BROOKLYN-461
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-461
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: JC
>            Assignee: Aled Sage
>            Priority: Trivial
>             Fix For: 0.11.0
>
>
> Hi
> In recent github mirror of broolyn-server, I've found the following issue in equals implementation.
> Path: utils/common/src/main/java/org/apache/brooklyn/util/collections/CollectionMerger.java
> {code}
> 196 
> 197             @Override
> 198             public boolean equals(Object o) {
> 199                 if (!(o instanceof Ref)) {
> 200                     return false;
> 201                 }
> 202                 return ((Ref)o).obj == ((Ref)o).obj;
> 203             }
> {code}
> Line 202 should be like this?
> {code}
> 202                 return this.obj == ((Ref)o).obj;
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message