You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Tom Beerbower <tb...@hortonworks.com> on 2014/02/14 18:43:15 UTC
Review Request 18133: NPE for View with no instances / resources /
parameters.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18133/
-----------------------------------------------------------
Review request for Ambari and Nate Cole.
Bugs: AMBARI-4679
https://issues.apache.org/jira/browse/AMBARI-4679
Repository: ambari
Description
-------
If a view is specified without instances the call to getInstances() on the view configuration will return null. The calling code is not likely to check for that, resulting in a NullPointerException. Better to return an empty list. Same is true for resources and parameters.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java fa1bed1
ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ViewConfigTest.java 27a7644
Diff: https://reviews.apache.org/r/18133/diff/
Testing
-------
Added unit tests.
All ambari-server unit tests pass :
Results :
Tests run: 1398, Failures: 0, Errors: 0, Skipped: 7
Thanks,
Tom Beerbower
Re: Review Request 18133: NPE for View with no instances / resources /
parameters.
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18133/#review34516
-----------------------------------------------------------
Ship it!
Ship It!
- Nate Cole
On Feb. 14, 2014, 12:43 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18133/
> -----------------------------------------------------------
>
> (Updated Feb. 14, 2014, 12:43 p.m.)
>
>
> Review request for Ambari and Nate Cole.
>
>
> Bugs: AMBARI-4679
> https://issues.apache.org/jira/browse/AMBARI-4679
>
>
> Repository: ambari
>
>
> Description
> -------
>
> If a view is specified without instances the call to getInstances() on the view configuration will return null. The calling code is not likely to check for that, resulting in a NullPointerException. Better to return an empty list. Same is true for resources and parameters.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java fa1bed1
> ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ViewConfigTest.java 27a7644
>
> Diff: https://reviews.apache.org/r/18133/diff/
>
>
> Testing
> -------
>
> Added unit tests.
>
> All ambari-server unit tests pass :
>
> Results :
>
> Tests run: 1398, Failures: 0, Errors: 0, Skipped: 7
>
>
> Thanks,
>
> Tom Beerbower
>
>