mirror of https://github.com/apache/druid.git
Bump commons-io to 2.11.0 (#11460)
* Bump commons-io to 2.11.0 * Address comments * Remove try catch * Fix checkstyle
This commit is contained in:
parent
2705fe98fa
commit
5037493e45
|
@ -9,5 +9,3 @@ updates:
|
||||||
# pin ZooKeeper dependencies to 3.5.x
|
# pin ZooKeeper dependencies to 3.5.x
|
||||||
- dependency-name: "org.apache.zookeeper"
|
- dependency-name: "org.apache.zookeeper"
|
||||||
versions: "[3.6,)"
|
versions: "[3.6,)"
|
||||||
# Keep commons-io at 2.6 until https://issues.apache.org/jira/browse/IO-741 is resolved
|
|
||||||
- dependency-name: "commons-io:commons-io"
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<confluent.version>6.0.1</confluent.version>
|
<confluent.version>6.0.1</confluent.version>
|
||||||
<commons-io.version>2.6</commons-io.version>
|
<commons-io.version>2.11.0</commons-io.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
|
|
@ -545,13 +545,13 @@ name: Apache Commons IO
|
||||||
license_category: binary
|
license_category: binary
|
||||||
module: java-core
|
module: java-core
|
||||||
license_name: Apache License version 2.0
|
license_name: Apache License version 2.0
|
||||||
version: 2.6
|
version: 2.11.0
|
||||||
libraries:
|
libraries:
|
||||||
- commons-io: commons-io
|
- commons-io: commons-io
|
||||||
notices:
|
notices:
|
||||||
- commons-io: |
|
- commons-io: |
|
||||||
Apache Commons IO
|
Apache Commons IO
|
||||||
Copyright 2002-2017 The Apache Software Foundation
|
Copyright 2002-2021 The Apache Software Foundation
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -224,7 +224,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>2.6</version>
|
<version>2.11.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>commons-logging</groupId>
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class InlineFirehose implements Firehose
|
||||||
private final StringInputRowParser parser;
|
private final StringInputRowParser parser;
|
||||||
private final LineIterator lineIterator;
|
private final LineIterator lineIterator;
|
||||||
|
|
||||||
InlineFirehose(String data, StringInputRowParser parser) throws IOException
|
InlineFirehose(String data, StringInputRowParser parser)
|
||||||
{
|
{
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ import org.apache.druid.data.input.impl.StringInputRowParser;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
@ -56,7 +55,7 @@ public class InlineFirehoseFactory implements FiniteFirehoseFactory<StringInputR
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Firehose connect(StringInputRowParser parser, @Nullable File temporaryDirectory) throws IOException
|
public Firehose connect(StringInputRowParser parser, @Nullable File temporaryDirectory)
|
||||||
{
|
{
|
||||||
return new InlineFirehose(data, parser);
|
return new InlineFirehose(data, parser);
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ public class LocalDataSegmentPusherTest
|
||||||
public void testPushCannotCreateDirectory() throws IOException
|
public void testPushCannotCreateDirectory() throws IOException
|
||||||
{
|
{
|
||||||
exception.expect(IOException.class);
|
exception.expect(IOException.class);
|
||||||
exception.expectMessage("Unable to create directory");
|
exception.expectMessage("Cannot create directory");
|
||||||
config.storageDirectory = new File(config.storageDirectory, "xxx");
|
config.storageDirectory = new File(config.storageDirectory, "xxx");
|
||||||
Assert.assertTrue(config.storageDirectory.mkdir());
|
Assert.assertTrue(config.storageDirectory.mkdir());
|
||||||
config.storageDirectory.setWritable(false);
|
config.storageDirectory.setWritable(false);
|
||||||
|
|
|
@ -208,12 +208,7 @@ public class InlineFirehoseTest
|
||||||
|
|
||||||
private static InlineFirehose create(String data)
|
private static InlineFirehose create(String data)
|
||||||
{
|
{
|
||||||
try {
|
return new InlineFirehose(data, PARSER);
|
||||||
return new InlineFirehose(data, PARSER);
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void assertRowValue(String expected, InputRow row)
|
private static void assertRowValue(String expected, InputRow row)
|
||||||
|
|
Loading…
Reference in New Issue