diff --git a/src/main/java/com/dtolabs/rundeck/plugin/resources/ec2/InstanceToNodeMapper.java b/src/main/java/com/dtolabs/rundeck/plugin/resources/ec2/InstanceToNodeMapper.java index 60d590cf..bc62f968 100644 --- a/src/main/java/com/dtolabs/rundeck/plugin/resources/ec2/InstanceToNodeMapper.java +++ b/src/main/java/com/dtolabs/rundeck/plugin/resources/ec2/InstanceToNodeMapper.java @@ -151,7 +151,7 @@ else if(region != null){ final Set newInstances = addExtraMappingAttribute(query(ec2, new DescribeInstancesRequest().withFilters(filters).withMaxResults(maxResults))); - if (!newInstances.isEmpty() && newInstances != null) { + if (newInstances != null && !newInstances.isEmpty()) { instances.addAll(newInstances); }