diff --git a/pom.xml b/pom.xml index 86840642bef..59ec45a9194 100644 --- a/pom.xml +++ b/pom.xml @@ -62,6 +62,11 @@ driver developers who would rather use Maven than Ant as their build tool. + + com.google.gag + gag + 1.0.1 + org.testng testng diff --git a/src/main/com/mongodb/ConnectionStatus.java b/src/main/com/mongodb/ConnectionStatus.java index ed80b4b425d..52c728dcc9b 100644 --- a/src/main/com/mongodb/ConnectionStatus.java +++ b/src/main/com/mongodb/ConnectionStatus.java @@ -15,6 +15,8 @@ */ package com.mongodb; +import com.google.gag.annotation.remark.WTF; + import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -210,7 +212,9 @@ public CommandResult update() { _maxBsonObjectSize = Bytes.MAX_OBJECT_SIZE; } } catch (Exception e) { - if (!((_ok) ? true : (Math.random() > 0.1))) { + @WTF + boolean randomExceptionHandling = true; + if (!((_ok) ? true : (Math.random() > 0.1))) { return res; }