Update JTS-18.1-compatibility.patch
Markus Koschany
2 years ago
6 | 6 | Forwarded: not-needed |
7 | 7 | --- |
8 | 8 | pom.xml | 2 +- |
9 | .../spatial4j/io/jts/JtsBinaryCodec.java | 2 ++ | |
9 | .../spatial4j/io/jts/JtsBinaryCodec.java | 4 +++- | |
10 | 10 | .../spatial4j/io/JtsBinaryCodecTest.java | 20 +++++++++----------- |
11 | 3 files changed, 12 insertions(+), 12 deletions(-) | |
11 | 3 files changed, 13 insertions(+), 13 deletions(-) | |
12 | 12 | |
13 | 13 | diff --git a/pom.xml b/pom.xml |
14 | 14 | index 3b6a698..a7adee8 100644 |
24 | 24 | </dependency> |
25 | 25 | |
26 | 26 | diff --git a/src/main/java/org/locationtech/spatial4j/io/jts/JtsBinaryCodec.java b/src/main/java/org/locationtech/spatial4j/io/jts/JtsBinaryCodec.java |
27 | index 8a767fc..3ea18de 100644 | |
27 | index b355b93..3ea18de 100644 | |
28 | 28 | --- a/src/main/java/org/locationtech/spatial4j/io/jts/JtsBinaryCodec.java |
29 | 29 | +++ b/src/main/java/org/locationtech/spatial4j/io/jts/JtsBinaryCodec.java |
30 | @@ -91,9 +91,11 @@ public class JtsBinaryCodec extends BinaryCodec { | |
30 | @@ -85,15 +85,17 @@ public class JtsBinaryCodec extends BinaryCodec { | |
31 | InStream inStream = new InStream() {//a strange JTS abstraction | |
32 | boolean first = true; | |
33 | @Override | |
34 | - public void read(byte[] buf) throws IOException { | |
35 | + public int read(byte[] buf) throws IOException { | |
36 | if (first) {//we don't write JTS's leading BOM so synthesize reading it | |
37 | if (buf.length != 1) | |
31 | 38 | throw new IllegalStateException("Expected initial read of one byte, not: " + buf.length); |
32 | 39 | buf[0] = WKBConstants.wkbXDR;//0 |
33 | 40 | first = false; |