commit | 237c5954ee696b49ee415c7882ea091ae7ea12ff | [log] [tgz] |
---|---|---|
author | Romain Manni-Bucau <rmannibucau@apache.org> | Wed Nov 11 22:22:44 2015 +0000 |
committer | Romain Manni-Bucau <rmannibucau@apache.org> | Wed Nov 11 22:22:44 2015 +0000 |
tree | c7b143a7f4e8580f28677928f48e84d96ba988eb | |
parent | 3c34c301a55536fca3cf61d47d384bedd5190bd0 [diff] |
SIRONA-53 ensures we consider the tracking id as well for path tracking otherwise 2 PathCallInformation with same start time will lead to a single entry in a TreeSet git-svn-id: https://svn.apache.org/repos/asf/incubator/sirona/trunk@1713940 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/api/src/main/java/org/apache/sirona/pathtracking/PathCallInformation.java b/api/src/main/java/org/apache/sirona/pathtracking/PathCallInformation.java index d83e6ec..66344e1 100644 --- a/api/src/main/java/org/apache/sirona/pathtracking/PathCallInformation.java +++ b/api/src/main/java/org/apache/sirona/pathtracking/PathCallInformation.java
@@ -81,7 +81,12 @@ @Override public int compare( PathCallInformation o1, PathCallInformation o2 ) { - return o1.getStartTime().compareTo( o2.getStartTime() ); + final int i = o1.getStartTime().compareTo(o2.getStartTime()); + if (i == 0) + { + return o1.getTrackingId().compareTo(o2.getTrackingId()); + } + return i; } }; }