Tom Beerbower created AMBARI-4541:
-------------------------------------
Summary: NPE for View instance with no properties.
Key: AMBARI-4541
URL: https://issues.apache.org/jira/browse/AMBARI-4541
Project: Ambari
Issue Type: Bug
Reporter: Tom Beerbower
Assignee: Tom Beerbower
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.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)