[NO ISSUE][RT] Only suppress exception if not the same exception

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Only suppress an exception if not the same as the original
  exception to avoid self suppression exceptions.

Change-Id: I2da6918128b4c1935d5092a4e7df36e0b80fde61
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2445
Reviewed-by: Michael Blow <mblow@apache.org>
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Michael Blow <mblow@apache.org>
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/ExceptionUtils.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/ExceptionUtils.java
index 1a88e46..444b08f 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/ExceptionUtils.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/ExceptionUtils.java
@@ -102,7 +102,9 @@
         } else if (second == null) {
             return first;
         }
-        first.addSuppressed(second);
+        if (first != second) {
+            first.addSuppressed(second);
+        }
         return first;
     }
 }