Skip to content

Commit

Permalink
Bump 6 dependencies
Browse files Browse the repository at this point in the history
Bump commons-codec from 1.13 to 1.16.0
Bump commons-dbcp2 from 2.9.0 to 2.11.0
Bump commons-io from 2.11.0 to 2.15.0
Bump commons-lang3 from 3.8 to 3.13.0
Bump commons-pool2 from 2.6.2 to 2.12.0
Bump commons-text from 1.10.0 to 1.11.0
  • Loading branch information
macroguo-ghy committed Nov 14, 2023
1 parent 83d320c commit 5503451
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
5 changes: 1 addition & 4 deletions core/src/main/java/org/apache/calcite/util/Sources.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*/
package org.apache.calcite.util;

import org.apache.commons.io.input.ReaderInputStream;

import com.google.common.io.CharSource;

import org.checkerframework.checker.nullness.qual.Nullable;
Expand Down Expand Up @@ -137,8 +135,7 @@ private UnsupportedOperationException unsupported() {
}

@Override public InputStream openStream() throws IOException {
// use charSource.asByteSource() once calcite can use guava v21+
return new ReaderInputStream(reader(), StandardCharsets.UTF_8);
return charSource.asByteSource(StandardCharsets.UTF_8).openStream();
}

@Override public String protocol() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.io.Closeable;
import java.io.IOException;
import java.io.StringReader;
import java.time.Duration;
import java.util.ArrayDeque;
import java.util.Queue;

Expand Down Expand Up @@ -79,8 +80,15 @@ private CsvStreamReader(Source source, char separator, char quoteChar,
contentQueue = new ArrayDeque<>();
TailerListener listener = new CsvContentListener(contentQueue);
tailer =
Tailer.create(source.file(), listener, DEFAULT_MONITOR_DELAY,
false, true, 4096);
Tailer.builder()
.setFile(source.file())
.setTailerListener(listener)
.setDelayDuration(Duration.ofMillis(DEFAULT_MONITOR_DELAY))
.setTailFromEnd(false)
.setReOpen(true)
.setBufferSize(4096)
.get();

this.parser =
new CSVParser(separator, quoteChar, escape, strictQuotes,
ignoreLeadingWhiteSpace);
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ cassandra-all.version=4.0.1
cassandra-java-driver-core.version=4.13.0
cassandra-unit.version=4.3.1.0
chinook-data-hsqldb.version=0.2
commons-codec.version=1.13
commons-dbcp2.version=2.9.0
commons-io.version=2.11.0
commons-lang3.version=3.8
commons-codec.version=1.16.0
commons-dbcp2.version=2.11.0
commons-io.version=2.15.0
commons-lang3.version=3.13.0
commons-math3.version=3.6.1
commons-pool2.version=2.6.2
commons-pool2.version=2.12.0
commons-collections4.version=4.4
commons-text.version=1.10.0
commons-text.version=1.11.0
dropwizard-metrics.version=4.0.5

# do not upgrade this, new versions are Category X license.
Expand Down

0 comments on commit 5503451

Please sign in to comment.