Skip to content

Commit 2733a81

Browse files
authored
fix ambiguous overload in Java 9
- http://download.java.net/java/jdk9/docs/api/java/nio/Buffer.html#limit-int- - http://download.java.net/java/jdk9/docs/api/java/nio/ByteBuffer.html#position-int- ``` [error] /home/travis/build/xuwei-k/msgpack-java/msgpack-core/src/test/scala/org/msgpack/core/buffer/MessageBufferTest.scala:163: ambiguous reference to overloaded definition, [error] both method position in class ByteBuffer of type (x$1: Int)java.nio.ByteBuffer [error] and method position in class Buffer of type ()Int [error] match expected type ? [error] bb.position shouldBe 0 [error] ^ [error] /home/travis/build/xuwei-k/msgpack-java/msgpack-core/src/test/scala/org/msgpack/core/buffer/MessageBufferTest.scala:164: ambiguous reference to overloaded definition, [error] both method limit in class ByteBuffer of type (x$1: Int)java.nio.ByteBuffer [error] and method limit in class Buffer of type ()Int [error] match expected type ? [error] bb.limit shouldBe 10 [error] ^ [error] two errors found ```
1 parent 430bc16 commit 2733a81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

msgpack-core/src/test/scala/org/msgpack/core/buffer/MessageBufferTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ class MessageBufferTest
160160
"convert to ByteBuffer" in {
161161
for (t <- buffers) {
162162
val bb = t.sliceAsByteBuffer
163-
bb.position shouldBe 0
164-
bb.limit shouldBe 10
163+
bb.position() shouldBe 0
164+
bb.limit() shouldBe 10
165165
bb.capacity shouldBe 10
166166
}
167167
}

0 commit comments

Comments
 (0)