Skip to content

Commit

Permalink
Merge pull request #121 from ericsson-peiwuyang/17727-1
Browse files Browse the repository at this point in the history
resolve NPE in getTemplateGroupStatistics method
  • Loading branch information
leomaatEric authored Mar 5, 2020
2 parents 1eb15b5 + c446f5f commit ca02650
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/cisco/trex/stateful/TRexAstfClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
Expand Down Expand Up @@ -471,6 +472,9 @@ public Map<String, AstfStatistics> getTemplateGroupStatistics(
MetaData metaData = getAstfStatsMetaData();
name2Id.forEach(
(tgName, tgId) -> {
if (result.get(tgId.toString()) == null) {
return;
}
try {
AstfStatistics astfStatistics =
new ObjectMapper()
Expand Down

0 comments on commit ca02650

Please sign in to comment.