commit | bb3f51858f15eaa7544252dfbb9a427527cae42b | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@opennetworking.org> | Wed Aug 08 15:08:54 2018 -0700 |
committer | Ray Milkey <ray@opennetworking.org> | Wed Aug 08 22:29:59 2018 +0000 |
tree | ad93c5b41df729af2439de93ec02b2d4f30462e4 | |
parent | c661c20db00437f552f474fbe4407ec817a38132 [diff] |
Sonar suggestions to avoid possible NPE Change-Id: Ifc188d5f8ad2a068dfd5c3f446ce926f3d43b4dc
diff --git a/apps/t3/web/src/main/java/org/onosproject/t3/rest/T3WebResource.java b/apps/t3/web/src/main/java/org/onosproject/t3/rest/T3WebResource.java index 0950c2d..275be8c 100644 --- a/apps/t3/web/src/main/java/org/onosproject/t3/rest/T3WebResource.java +++ b/apps/t3/web/src/main/java/org/onosproject/t3/rest/T3WebResource.java
@@ -205,10 +205,9 @@ previousTrace = trace; } nodeOutput.set("trace", traceNode(previousTrace, trace)); - if (previousTrace == null || !previousTrace.equals(trace)) { - previousTrace = trace; + if (trace != null) { + nodeOutput.put("failure", trace.resultMessage()); } - nodeOutput.put("failure", trace.resultMessage()); } nodeOutput.put("total traces", totalTraces); nodeOutput.put("errors", failedTraces.size());