T3: Fixing concurrent modification exception

Change-Id: I5f6087bc3a87e1722e880c9b817ea8005a20bd6e
diff --git a/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java b/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java
index 149cba7..084b25e 100644
--- a/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java
+++ b/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java
@@ -137,7 +137,7 @@
      * @return the list of Groups for this device.
      */
     public List<GroupsInDevice> getGroupOuputs(DeviceId deviceId) {
-        return outputsForDevice.get(deviceId);
+        return outputsForDevice.get(deviceId) == null ? null : ImmutableList.copyOf(outputsForDevice.get(deviceId));
     }
 
     /**
@@ -198,6 +198,7 @@
 
     /**
      * Return if this trace is successful.
+     *
      * @return true if successful
      */
     public boolean isSuccess() {
@@ -206,6 +207,7 @@
 
     /**
      * Sets if this trace is successful.
+     *
      * @param success true if trace is successful.
      */
     public void setSuccess(boolean success) {
diff --git a/apps/t3/src/main/java/org/onosproject/t3/impl/TroubleshootManager.java b/apps/t3/src/main/java/org/onosproject/t3/impl/TroubleshootManager.java
index 526367a..74933f6 100644
--- a/apps/t3/src/main/java/org/onosproject/t3/impl/TroubleshootManager.java
+++ b/apps/t3/src/main/java/org/onosproject/t3/impl/TroubleshootManager.java
@@ -530,8 +530,8 @@
                                         hostService.getHostsByIp(finalIpAddress).isEmpty()) {
                                     trace.addResultMessage("Packet is " +
                                             ((EthTypeCriterion) outputPath.getFinalPacket()
-                                            .getCriterion(Criterion.Type.ETH_TYPE)).ethType() + " and reached " +
-                                            cp + " with hosts " + hostsList);
+                                                    .getCriterion(Criterion.Type.ETH_TYPE)).ethType() +
+                                            " and reached " + cp + " with hosts " + hostsList);
                                 } else {
                                     trace.addResultMessage("Wrong output " + cp + " for required destination ip " +
                                             ipAddress);