You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dd...@apache.org on 2011/12/26 10:00:05 UTC
svn commit: r1224700 -
/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeState.java
Author: ddas
Date: Mon Dec 26 09:00:04 2011
New Revision: 1224700
URL: http://svn.apache.org/viewvc?rev=1224700&view=rev
Log:
AMBARI-174. Follow up commit. Handles nulls in setFailedCommandResults
Modified:
incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeState.java
Modified: incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeState.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeState.java?rev=1224700&r1=1224699&r2=1224700&view=diff
==============================================================================
--- incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeState.java (original)
+++ incubator/ambari/trunk/client/src/main/java/org/apache/ambari/common/rest/entities/NodeState.java Mon Dec 26 09:00:04 2011
@@ -159,6 +159,10 @@ public class NodeState {
* @param results list of results that failed
*/
public void setFailedCommandResults(List<CommandResult> results) {
+ if (results == null || results.size() == 0) {
+ this.failedCommandStderrs = null;
+ this.failedCommandStdouts = null;
+ }
for (CommandResult r : results) {
if (r.getStdErr() != null) {
this.failedCommandStderrs.add(r.getStdErr());