Codebase list spatial4j / HEAD
Update JTS-18.1-compatibility.patch Markus Koschany 2 years ago
1 changed file(s) with 11 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
66 Forwarded: not-needed
77 ---
88 pom.xml | 2 +-
9 .../spatial4j/io/jts/JtsBinaryCodec.java | 2 ++
9 .../spatial4j/io/jts/JtsBinaryCodec.java | 4 +++-
1010 .../spatial4j/io/JtsBinaryCodecTest.java | 20 +++++++++-----------
11 3 files changed, 12 insertions(+), 12 deletions(-)
11 3 files changed, 13 insertions(+), 13 deletions(-)
1212
1313 diff --git a/pom.xml b/pom.xml
1414 index 3b6a698..a7adee8 100644
2424 </dependency>
2525
2626 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
2828 --- a/src/main/java/org/locationtech/spatial4j/io/jts/JtsBinaryCodec.java
2929 +++ 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)
3138 throw new IllegalStateException("Expected initial read of one byte, not: " + buf.length);
3239 buf[0] = WKBConstants.wkbXDR;//0
3340 first = false;