We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7d9986 commit 170127bCopy full SHA for 170127b
src/main/org/bson/types/ObjectId.java
@@ -271,16 +271,7 @@ public int compareTo( ObjectId id ){
271
if ( x != 0 )
272
return x;
273
274
- x = _compareUnsigned( _inc , id._inc );
275
- if (Math.abs(x) > Integer.MAX_VALUE / 2) {
276
- // this means that for same second and process more than (max int)/2 were generated
277
- // highly unlikely, most likely the counter wrapped
278
- if (x < 0)
279
- return 1;
280
- else
281
- return -1;
282
- }
283
- return x;
+ return _compareUnsigned( _inc , id._inc );
284
}
285
286
public int getMachine(){
0 commit comments