Skip to content

Commit 7d5a824

Browse files
authored
Merge pull request #21 from paypal/issue-20-upgrade-libraries
Upgrade commons-io, commons-lang3, commons-text, junit-pioneer, picocli to latest versions
2 parents 6098997 + e637053 commit 7d5a824

File tree

6 files changed

+17
-10
lines changed

6 files changed

+17
-10
lines changed

pom.xml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@
4646

4747
<!-- Dependency versions -->
4848
<commons-compress.version>1.26.0</commons-compress.version>
49-
<commons-io.version>2.11.0</commons-io.version>
50-
<commons-text.version>1.10.0</commons-text.version>
51-
<junit-pioneer.version>1.5.0</junit-pioneer.version>
49+
<commons-io.version>2.15.1</commons-io.version>
50+
<commons-lang3.version>3.14.0</commons-lang3.version>
51+
<commons-text.version>1.11.0</commons-text.version>
52+
<junit-pioneer.version>1.9.1</junit-pioneer.version>
5253
<meanbean.version>3.0.0-M9</meanbean.version>
53-
<picocli.version>4.6.2</picocli.version>
54+
<picocli.version>4.7.5</picocli.version>
5455
</properties>
5556

5657
<licenses>
@@ -84,6 +85,12 @@
8485
<type>pom</type>
8586
<scope>import</scope>
8687
</dependency>
88+
89+
<dependency>
90+
<groupId>org.apache.commons</groupId>
91+
<artifactId>commons-lang3</artifactId>
92+
<version>${commons-lang3.version}</version>
93+
</dependency>
8794
</dependencies>
8895
</dependencyManagement>
8996

src/main/java/com/paypal/heapdumptool/capture/CaptureStreamFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import java.util.concurrent.atomic.AtomicReference;
1313

1414
import static java.util.Objects.requireNonNull;
15-
import static org.apache.commons.compress.utils.IOUtils.closeQuietly;
15+
import static org.apache.commons.io.IOUtils.closeQuietly;
1616

1717
public class CaptureStreamFactory extends SanitizeStreamFactory implements Closeable {
1818

src/main/java/com/paypal/heapdumptool/sanitizer/SanitizeStreamFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public InputStream newInputStream() throws IOException {
3535

3636
if (command.isTarInput()) {
3737
final TarArchiveInputStream tarStream = new TarArchiveInputStream(inputStream);
38-
Validate.notNull(tarStream.getNextTarEntry(), "no tar entries");
38+
Validate.notNull(tarStream.getNextEntry(), "no tar entries");
3939
return tarStream;
4040
}
4141
return inputStream;

src/test/java/com/paypal/heapdumptool/capture/CaptureCommandProcessorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.paypal.heapdumptool.utils.ProcessTool;
66
import com.paypal.heapdumptool.utils.ProcessTool.ProcessResult;
77
import org.apache.commons.io.input.NullInputStream;
8+
import org.apache.commons.io.output.NullOutputStream;
89
import org.apache.commons.lang3.ArrayUtils;
910
import org.junit.jupiter.api.AfterEach;
1011
import org.junit.jupiter.api.BeforeEach;
@@ -20,7 +21,6 @@
2021
import java.util.stream.Stream;
2122

2223
import static java.time.temporal.ChronoUnit.SECONDS;
23-
import static org.apache.commons.io.output.NullOutputStream.NULL_OUTPUT_STREAM;
2424
import static org.assertj.core.api.Assertions.assertThat;
2525
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
2626
import static org.mockito.Answers.CALLS_REAL_METHODS;
@@ -153,7 +153,7 @@ private ProcessBuilder dockerCpProcess() throws IOException {
153153
doReturn(process).when(processBuilder).start();
154154
doReturn(nullInputStream).when(process).getInputStream();
155155
doReturn(nullInputStream).when(process).getErrorStream();
156-
doReturn(NULL_OUTPUT_STREAM).when(process).getOutputStream();
156+
doReturn(NullOutputStream.INSTANCE).when(process).getOutputStream();
157157

158158
return processBuilder;
159159
}

src/test/java/com/paypal/heapdumptool/capture/CaptureStreamFactoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.paypal.heapdumptool.capture;
22

33
import com.paypal.heapdumptool.sanitizer.SanitizeCommand;
4-
import org.apache.commons.compress.utils.IOUtils;
4+
import org.apache.commons.io.IOUtils;
55
import org.apache.commons.io.output.CloseShieldOutputStream;
66
import org.junit.jupiter.api.AfterEach;
77
import org.junit.jupiter.api.DynamicTest;

src/test/resources/files/ApplicationTest/help.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Commands:
66
capture Capture sanitized heap dump of a containerized app
77
sanitize Sanitize a heap dump by replacing byte and char array contents
88
sanitize-hserr Sanitize fatal error log by censoring environment variable values
9-
help Displays help information about the specified command
9+
help Display help information about the specified command.

0 commit comments

Comments
 (0)