Skip to content

Commit 33fe83d

Browse files
authored
Fixed javadoc for ObjectId(timestamp, counter) and exception message for ObjectId(timestamp, randomValue1, randomValue2, counter) (#863)
1 parent 55b2670 commit 33fe83d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bson/src/main/org/bson/types/ObjectId.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public ObjectId(final Date date, final int counter) {
167167
}
168168

169169
/**
170-
* Creates an ObjectId using the given time, machine identifier, process identifier, and counter.
170+
* Creates an ObjectId using the given time and counter.
171171
*
172172
* @param timestamp the time in seconds
173173
* @param counter the counter
@@ -184,7 +184,7 @@ private ObjectId(final int timestamp, final int counter, final boolean checkCoun
184184
private ObjectId(final int timestamp, final int randomValue1, final short randomValue2, final int counter,
185185
final boolean checkCounter) {
186186
if ((randomValue1 & 0xff000000) != 0) {
187-
throw new IllegalArgumentException("The machine identifier must be between 0 and 16777215 (it must fit in three bytes).");
187+
throw new IllegalArgumentException("The random value must be between 0 and 16777215 (it must fit in three bytes).");
188188
}
189189
if (checkCounter && ((counter & 0xff000000) != 0)) {
190190
throw new IllegalArgumentException("The counter must be between 0 and 16777215 (it must fit in three bytes).");

0 commit comments

Comments
 (0)