Skip to content

Commit

Permalink
pinpoint-apm#1432 add null check for querying deleted agent infos
Browse files Browse the repository at this point in the history
  • Loading branch information
Xylus committed Jan 14, 2016
1 parent 60d7592 commit aa4b67c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.navercorp.pinpoint.web.vo.ApplicationAgentHostList;
import com.navercorp.pinpoint.web.vo.ApplicationAgentList;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.PredicateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -186,6 +187,7 @@ public Set<AgentInfo> getAgentsByApplicationName(String applicationName, long ti
if (unfilteredAgentInfos == null || unfilteredAgentInfos.isEmpty()) {
return Collections.emptySet();
}
CollectionUtils.filter(unfilteredAgentInfos, PredicateUtils.notNullPredicate());
this.agentLifeCycleDao.populateAgentStatuses(unfilteredAgentInfos, timestamp);
Set<AgentInfo> filteredAgentInfos = new HashSet<>();
for (AgentInfo agentInfo : unfilteredAgentInfos) {
Expand Down

0 comments on commit aa4b67c

Please # to comment.