Skip to content

Commit a8354af

Browse files
committed
Fix some comments
1 parent 0c802af commit a8354af

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

msgpack-core/src/main/java/org/msgpack/core/MessageUnpacker.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ private MessageBuffer takeNextBuffer() throws IOException {
169169

170170

171171
/**
172-
* Ensure the buffer has the data of at least the specified size.
172+
* Ensure that the buffer has the data of at least the specified size.
173173
*
174174
* @param byteSizeToRead the data size to be read
175175
* @return if the buffer can have the data of the specified size returns true, or if the input source reached an EOF, it returns false.
@@ -278,19 +278,15 @@ private byte consume() throws IOException {
278278
* Proceeds the cursor by the specified byte length
279279
*/
280280
private void consume(int numBytes) throws IOException {
281-
assert (numBytes >= 0);
282-
283-
// // If position + numBytes becomes negative, it indicates an overflow from Integer.MAX_VALUE.
284-
// // So we need to relocate the position
285-
// if(position + numBytes < 0) {
286-
// ensureBuffer();
287-
// }
281+
assert(numBytes >= 0);
282+
// If position + numBytes becomes negative, it indicates an overflow from Integer.MAX_VALUE.
283+
if(position + numBytes < 0)
284+
ensureBuffer();
288285
position += numBytes;
289286
}
290287

291288
/**
292289
* Read a byte value at the cursor and proceed the cursor.
293-
* It also rests the head value to READ_NEXT.
294290
*
295291
* @return
296292
* @throws IOException

msgpack-core/src/test/scala/org/msgpack/core/MessagePackTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class MessagePackTest extends MessagePackSpec with PropertyChecks {
106106

107107

108108

109-
"pack/unpack primitive values" in {
109+
"pack/unpack primitive values" taggedAs("prim") in {
110110
forAll { (v: Boolean) => check(v, _.packBoolean(v), _.unpackBoolean)}
111111
forAll { (v: Byte) => check(v, _.packByte(v), _.unpackByte)}
112112
forAll { (v: Short) => check(v, _.packShort(v), _.unpackShort)}

0 commit comments

Comments
 (0)