Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
take into account the fact that a command may return null after execu…
Browse files Browse the repository at this point in the history
…ting the command
  • Loading branch information
jmazzitelli committed Jul 15, 2015
1 parent 056789d commit 905bef3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface Command<REQ extends BasicMessage, RESP extends BasicMessage> {
*
* @param request the request that describes what needs to be executed
* @param context some context data that can be useful for the command to be able to execute the request
* @return the results of the command that need to be sent back to the feed.
* @return the results of the command that need to be sent back to the feed - may be null
* @throws Exception if failed to execute the operation
*/
RESP execute(REQ request, CommandContext context) throws Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public String feedMessage(String nameAndJsonStr, Session session, @PathParam("fe

}

String responseText = ApiDeserializer.toHawkularFormat(response);
String responseText = (response == null) ? null : ApiDeserializer.toHawkularFormat(response);
return responseText;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public String uiClientMessage(String nameAndJsonStr, Session session) {

}

String responseText = ApiDeserializer.toHawkularFormat(response);
String responseText = (response == null) ? null : ApiDeserializer.toHawkularFormat(response);
return responseText;
}

Expand Down

0 comments on commit 905bef3

Please sign in to comment.