ignite-5562: assert statements were changed to the 'if' blocks
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bf25b5c5 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bf25b5c5 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bf25b5c5 Branch: refs/heads/ignite-5578 Commit: bf25b5c52be044f07076c0800447230c75174db3 Parents: 8d4a0c2 Author: Slava Koptilin <slava.kopti...@gmail.com> Authored: Fri Jul 7 15:35:33 2017 +0300 Committer: agura <ag...@gridgain.com> Committed: Tue Jul 11 13:47:02 2017 +0300 ---------------------------------------------------------------------- .../spi/discovery/tcp/internal/TcpDiscoveryStatistics.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/bf25b5c5/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java index 485e7a9..f873789 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java @@ -433,7 +433,8 @@ public class TcpDiscoveryStatistics { * @param initTime Time socket was initialized in. */ public synchronized void onServerSocketInitialized(long initTime) { - assert initTime >= 0; + if (initTime < 0) + initTime = 0; if (maxSrvSockInitTime < initTime) maxSrvSockInitTime = initTime; @@ -445,7 +446,8 @@ public class TcpDiscoveryStatistics { * @param initTime Time socket was initialized in. */ public synchronized void onClientSocketInitialized(long initTime) { - assert initTime >= 0; + if (initTime < 0) + initTime = 0; clientSockCreatedCnt++;