ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Review Request 18133: NPE for View with no instances / resources / parameters.
Date Fri, 14 Feb 2014 17:43:15 GMT

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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message