Fixed a build failure with Java 11
Emmanuel Bourg
7 years ago
| 3 | 3 |
* New upstream release
|
| 4 | 4 |
- Build the new jawn-util module
|
| 5 | 5 |
* No longer build with the embedded SBT using Scala 2.10 (Closes: #893456)
|
|
6 |
* Fixed a build failure with Java 11
|
| 6 | 7 |
* Standards-Version updated to 4.2.1
|
| 7 | 8 |
* Switch to debhelper level 11
|
| 8 | 9 |
* Added the missing Vcs-* fields
|
|
0 |
Description: Fixes the compatibility with Java 11
|
|
1 |
Origin: backport, https://github.com/non/jawn/commit/928b7b78
|
|
2 |
--- a/parser/src/main/scala/jawn/AsyncParser.scala
|
|
3 |
+++ b/parser/src/main/scala/jawn/AsyncParser.scala
|
|
4 |
@@ -79,7 +79,7 @@
|
|
5 |
|
|
6 |
final def absorb(buf: ByteBuffer)(implicit facade: Facade[J]): Either[ParseException, Seq[J]] = {
|
|
7 |
done = false
|
|
8 |
- val buflen = buf.limit - buf.position
|
|
9 |
+ val buflen = buf.limit() - buf.position()
|
|
10 |
val need = len + buflen
|
|
11 |
resizeIfNecessary(need)
|
|
12 |
buf.get(data, len, buflen)
|
|
13 |
--- a/parser/src/main/scala/jawn/ByteBufferParser.scala
|
|
14 |
+++ b/parser/src/main/scala/jawn/ByteBufferParser.scala
|
|
15 |
@@ -14,8 +14,8 @@
|
|
16 |
* update its own mutable position fields.
|
|
17 |
*/
|
|
18 |
final class ByteBufferParser[J](src: ByteBuffer) extends SyncParser[J] with ByteBasedParser[J] {
|
|
19 |
- private[this] final val start = src.position
|
|
20 |
- private[this] final val limit = src.limit - start
|
|
21 |
+ private[this] final val start = src.position()
|
|
22 |
+ private[this] final val limit = src.limit() - start
|
|
23 |
|
|
24 |
private[this] var lineState = 0
|
|
25 |
protected[this] def line(): Int = lineState
|
| 0 | 0 |
#use-latest-sbt.patch
|
|
1 |
01-java11-compatibility.patch
|