Skip to content

Commit

Permalink
fix(ecs): Prevent NPE when a task def ARN is no longer in the cache (#…
Browse files Browse the repository at this point in the history
…4338) (#4361)

Co-authored-by: Clare Liguori <liguori@amazon.com>
Co-authored-by: Eric Zimanyi <ezimanyi@google.com>
  • Loading branch information
3 people committed Mar 2, 2020
1 parent e2c48d4 commit cf7f8d9
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -149,7 +149,9 @@ private Set<TaskDefinition> retrieveFromCache(
for (String taskDefArn : taskDefArns) {
String key = Keys.getTaskDefinitionKey(accountName, region, taskDefArn);
TaskDefinition taskDefinition = taskDefinitionCacheClient.get(key);
taskDefs.add(taskDefinition);
if (taskDefinition != null) {
taskDefs.add(taskDefinition);
}
}

return taskDefs;
Expand Down

0 comments on commit cf7f8d9

Please sign in to comment.