----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/17770/#review33795 -----------------------------------------------------------
Ship it! Ship It! - Sumit Mohanty On Feb. 6, 2014, 9:23 a.m., Tom Beerbower wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/17770/ > ----------------------------------------------------------- > > (Updated Feb. 6, 2014, 9:23 a.m.) > > > Review request for Ambari, Artem Baranchuk, Sumit Mohanty, and Sid Wagle. > > > Bugs: AMBARI-4541 > https://issues.apache.org/jira/browse/AMBARI-4541 > > > Repository: ambari > > > Description > ------- > > The method getProperties() of the class > org.apache.ambari.server.view.configuration.InstanceConfig returns null if no > properties are specified for a view instance. For example ... > > {code} > <view> > <name>SOME_VIEW</name> > <label>Some View</label> > <version>1.0.0</version> > <resource> > <name>someresource</name> > <plural-name>someresources</plural-name> > <id-property>id</id-property> > <resource-class>org.apache.ambari.view.SomeResource</resource-class> > > <provider-class>org.apache.ambari.view.SomeResourceProvider</provider-class> > <service-class>org.apache.ambari.view.SomeService</service-class> > </resource> > <instance> > <name>INSTANCE1</name> > </instance> > </view> > {code} > > Any code consuming the instance configuration will likely NPE. > Better to return an empty list. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/view/configuration/InstanceConfig.java > fd80922 > > ambari-server/src/test/java/org/apache/ambari/server/view/configuration/InstanceConfigTest.java > 28fe7f3 > > ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ViewConfigTest.java > 0ca6764 > > Diff: https://reviews.apache.org/r/17770/diff/ > > > Testing > ------- > > Added additional unit test for InstanceConfig. > > > Thanks, > > Tom Beerbower > >
