suzaku-io / boopickle

Binary serialization library for efficient network communication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doesn't compile on JDK9+

SethTisue opened this issue · comments

at e.g. https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-jdk9-integrate-community-build/472/ we see a bunch of compilation errors like:

[boopickle] [error] /home/jenkins/workspace/scala-2.12.x-jdk9-integrate-community-build/target-0.9.14/project-builds/boopickle-d7f05110d6a0d1da547afc5a6162328b6714cc0c/boopickle/shared/src/main/scala/boopickle/BufferProvider.scala:60: ambiguous reference to overloaded definition,
[boopickle] [error] both method limit in class ByteBuffer of type (x$1: Int)java.nio.ByteBuffer
[boopickle] [error] and  method limit in class Buffer of type ()Int
[boopickle] [error] match expected type ?
[boopickle] [error]       val comb = allocate(bufList.map(_.limit).sum)
[boopickle] [error]                                         ^

the fix is to add parentheses to the calls to disambiguate, so e.g. change .limit to .limit()