Skip to content

Commit

Permalink
[HQ-1872] HQ will return a null object if a group has no maintenance …
Browse files Browse the repository at this point in the history
…schedule
  • Loading branch information
pnguyen committed Oct 12, 2009
1 parent 5d984ac commit d0d54f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/org/hyperic/hq/hqapi1/tools/MaintenanceCommand.java
Expand Up @@ -189,7 +189,8 @@ private void get(String[] args) throws Exception {
MaintenanceResponse response = maintenanceApi.get(groupId);
checkSuccess(response);

if (response.getMaintenanceEvent().getState() != null &&
if (response.getMaintenanceEvent() != null &&
response.getMaintenanceEvent().getState() != null &&
response.getMaintenanceEvent().getStartTime() != 0 &&
response.getMaintenanceEvent().getEndTime() != 0) {
System.out.println("Maintenance scheudle for group " + groupId);
Expand Down

0 comments on commit d0d54f1

Please sign in to comment.