> On ápr. 13, 2016, 3:05 du, Oliver Szabo wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java,
> >  line 914
> > <https://reviews.apache.org/r/46148/diff/1/?file=1342675#file1342675line914>
> >
> >     Can you provide a test for that case when the hostname is null? (to 
> > avoid that someone change the code here again)

Yes, will do, but ClustersImpl has no test at all right now, so it will take a 
while to build up a testcase for that.


- Daniel


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46148/#review128689
-----------------------------------------------------------


On ápr. 13, 2016, 3:04 du, Daniel Gergely wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46148/
> -----------------------------------------------------------
> 
> (Updated ápr. 13, 2016, 3:04 du)
> 
> 
> Review request for Ambari, Laszlo Puskas, Oliver Szabo, Sandor Magyari, and 
> Sebastian Toader.
> 
> 
> Bugs: AMBARI-15862
>     https://issues.apache.org/jira/browse/AMBARI-15862
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When deleting a host, NPE may occur.
> TopologyHostRequests are created with hostName=null at the first time, and 
> when hosts are registered, then these null values are replaced with the 
> correct host names.
> In the case when a host is being deleted, a loop checks the host name for all 
> the requests, and if there is a request with hostName=null, a NPE is thrown.
> Swapping the sides of **equals** method can solve the problem, since the 
> variable **hostname** is checked before and not null.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
>  caab7df 
> 
> Diff: https://reviews.apache.org/r/46148/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Daniel Gergely
> 
>

Reply via email to