Skip to content

Commit

Permalink
fix: bump commons-io from 2.8.0 to 2.11.0 (#11739) (#11798) (CP: 2.7) (
Browse files Browse the repository at this point in the history
…#11803)

* fix: bump commons-io from 2.8.0 to 2.11.0 (#11739) (#11798)

Bumps commons-io to a newer version where this bug has been fixed https://issues.apache.org/jira/browse/IO-692.

Fixes #11794

* fix: IOUtils::toString doesn't throw exception anymore

Co-authored-by: Mikhail Shabarov <[email protected]>
Co-authored-by: Mikhail Shabarov <[email protected]>
  • Loading branch information
3 people authored Sep 13, 2021
1 parent 5743064 commit dc04974
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,10 @@ private String getPackageDirectory(String bowerJsonPath) {

private String getPackageName(ArtifactData webJar,
String nameSourceJarPath) {
String fileContents;
try {
fileContents = IOUtils.toString(
jarContentsManager.getFileContents(
webJar.getFileOrDirectory(), nameSourceJarPath),
StandardCharsets.UTF_8.displayName());
} catch (IOException e) {
throw new UncheckedIOException(
String.format("Unable to read file '%s' from webJar '%s'",
nameSourceJarPath, webJar.getFileOrDirectory()),
e);
}
String fileContents = IOUtils.toString(
jarContentsManager.getFileContents(
webJar.getFileOrDirectory(), nameSourceJarPath),
StandardCharsets.UTF_8.displayName());
JsonObject jsonObject = Json.parse(fileContents);
if (jsonObject.hasKey("name")) {
String name = jsonObject.getString("name");
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.8.0</version>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down

0 comments on commit dc04974

Please sign in to comment.