Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
2.6.5
-
None
-
Windows 7, MongoDB 1.8.2, Java Driver 2.6.5
Description
I'm experiencing <<null>> results when calling
collection.remove(...)
where the contract says that either a WriteResult is returned or an exception is thrown.
I've tracked this down to DBTCPConnector#_checkWriteError that ends with
WriteResult _checkWriteError( DB db , MyPort mp , DBPort port , WriteConcern concern )
CommandResult e = null;
e = port.runCommand( db , concern.getCommand() );
if ( ! e.hasErr() )
return new WriteResult( e , concern );
e.throwOnError();
return null;
}
if
e.throwOnError();
does not throw an exception ( ok() || !hasErr())
return null;
is returned.