diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index c8aeb3a..7e41c2f 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -15,10 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
+ - uses: actions/checkout@v4
+ - name: Set up Java 8 JDK
+ uses: actions/setup-java@v4
with:
- java-version: 1.8
+ distribution: 'zulu'
+ java-version: 8
- name: Build with Maven
run: mvn -B package --file pom.xml
diff --git a/build.xml b/build.xml
deleted file mode 100644
index 1ed9973..0000000
--- a/build.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pom.xml b/pom.xml
index 8543d9f..57d7385 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,10 +6,10 @@
4.0.0
org.openrefine.dependencies
vicino
- 1.2
+ 1.2.1
SIMILE Vicino
https://github.com/OpenRefine/simile-vicino
- Vicino is near-neightbor search tool. The idea is be able to query data by distance search, with pluggable distance functions.
+ Vicino is near-neighbor search tool. The idea is be able to query data by distance search, with pluggable distance functions.
3-Clause BSD License
@@ -49,17 +49,26 @@
1.2
- commons-compress
+ org.apache.commons
commons-compress
- 20050911
+ 1.26.0
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.12.1
+
+
+ 1.8
+
+
org.apache.maven.plugins
maven-source-plugin
- 3.2.1
+ 3.3.0
attach-sources
@@ -72,7 +81,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.2.0
+ 3.6.3
attach-javadocs
diff --git a/src/edu/mit/simile/vicino/distances/BZip2Distance.java b/src/edu/mit/simile/vicino/distances/BZip2Distance.java
index 60fdc73..4c26edf 100644
--- a/src/edu/mit/simile/vicino/distances/BZip2Distance.java
+++ b/src/edu/mit/simile/vicino/distances/BZip2Distance.java
@@ -3,19 +3,17 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import org.apache.commons.compress.bzip2.CBZip2OutputStream;
+import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
public class BZip2Distance extends PseudoMetricDistance {
public double d2(String x, String y) {
String str = x + y;
double result = 0.0f;
- try {
- ByteArrayOutputStream baos = new ByteArrayOutputStream(str.length());
- CBZip2OutputStream os = new CBZip2OutputStream(baos);
+
+ try (ByteArrayOutputStream baos = new ByteArrayOutputStream(str.length());
+ BZip2CompressorOutputStream os = new BZip2CompressorOutputStream(baos)) {
os.write(str.getBytes());
- os.close();
- baos.close();
result = baos.toByteArray().length;
} catch (IOException e) {
e.printStackTrace();