GH-40: coordinator rerun doesn't consider empty output-event
------------------------------------------------------------

                 Key: OOZIE-81
                 URL: https://issues.apache.org/jira/browse/OOZIE-81
             Project: Oozie
          Issue Type: Bug
            Reporter: Hadoop QA


### User experience:

If the user selects cleanup but there is no "output-event" in the cooridnator 
xml, the code will throw NullPointerException (NPE):

    private void cleanupOutputEvents(Element eAction, String user, String 
group) {
            Element outputList = eAction.getChild("output-events", 
eAction.getNamespace());
            for (Element data : (List) outputList.getChildren("data-out", 
eAction.getNamespace())) {

Line 3 will throw NPE.

Solution:

    if (outputList != null) {
        for (Element data : (List) outputList.getChildren("data-out", 
eAction.getNamespace())) {
         ......
    }

### Additional activities:

1. Add an unit test
2. QA needs to add one test case with this scenario.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to