Description of problem: When the priority is not set in an AlertDefinitionRest object in a PUT call to "alert/definition/{id}", the API mis-sends the following error message: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <rhqErrorWrapper> <message>Name is null</message> <!-- Should be "Priority is null" --> </rhqErrorWrapper> Version-Release number of selected component (if applicable): 4.5.1 How reproducible: Steps to Reproduce: 1. Create an AlertDefinitionRest object without the priority set 2. Add the object to a PUT call to the "alert/definition/{id}" resource 3. Verify the returned error message Actual results: The API sends an error message that says "Name is null" Expected results: The API sends an error message that says "Priority is null" Additional info:
The error message is shown, as there is indeed no name supplied for the enum: Caused by: java.lang.NullPointerException: Name is null at java.lang.Enum.valueOf(Enum.java:235) [rt.jar:1.7.0_11] at org.rhq.core.domain.alert.AlertPriority.valueOf(AlertPriority.java:28) [rhq-core-domain-ejb3.jar:4.6.0-SNAPSHOT] at org.rhq.enterprise.server.rest.AlertDefinitionHandlerBean.updateDefinition(AlertDefinitionHandlerBean.java:279) [rhq-enterprise-server-ejb3.jar:4.6.0-SNAPSHOT] As AlertsDefinitions need to have a priority, Low will be used if none supplied. master 142d9dc590c0bd4
Great, you may also want to update the docs, which say that the priority is required.
Bulk closing of issues in old RHQ releases that are in production for a while now. Please open a new issue when running into an issue.