File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -269,28 +269,24 @@ public boolean getFsync(){
269269 return _fsync ;
270270 }
271271
272- /**
273- * Returns whether (batch) inserts will continue if an error occurs before the end
274- * @return boolean
275- */
276- public boolean continueOnErrorForInsert (){
277- return _continueOnErrorInsert ;
278- }
279-
280272 /**
281273 * Returns whether network error may be raised (w >= 0)
282274 * @return
283275 */
284276 public boolean raiseNetworkErrors (){
285- return (Integer ) _wValue >= 0 ;
277+ if (_wValue instanceof Integer )
278+ return (Integer ) _wValue >= 0 ;
279+ return _wValue != null ;
286280 }
287281
288282 /**
289283 * Returns whether "getlasterror" should be called (w > 0)
290284 * @return
291285 */
292286 public boolean callGetLastError (){
293- return (Integer ) _wValue > 0 ;
287+ if (_wValue instanceof Integer )
288+ return (Integer ) _wValue > 0 ;
289+ return _wValue != null ;
294290 }
295291
296292 /**
@@ -321,7 +317,7 @@ public static WriteConcern valueOf(String name) {
321317
322318 @ Override
323319 public String toString (){
324- return "WriteConcern " + getCommand () + " / (Continue Inserting on Errors? " + continueOnErrorForInsert () + ")" ;
320+ return "WriteConcern " + getCommand () + " / (Continue Inserting on Errors? " + _continueOnErrorInsert + ")" ;
325321 }
326322
327323 @ Override
You can’t perform that action at this time.
0 commit comments