From dc04974525c1c26c7d3fd06c15ac1af6f518ded4 Mon Sep 17 00:00:00 2001 From: Vaadin Bot Date: Mon, 13 Sep 2021 09:40:40 +0300 Subject: [PATCH] fix: bump commons-io from 2.8.0 to 2.11.0 (#11739) (#11798) (CP: 2.7) (#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 <61410877+mshabarov@users.noreply.github.com> Co-authored-by: Mikhail Shabarov --- .../production/ProductionModeCopyStep.java | 16 ++++------------ pom.xml | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/production/ProductionModeCopyStep.java b/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/production/ProductionModeCopyStep.java index 086486949f2..6ddffb2697d 100644 --- a/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/production/ProductionModeCopyStep.java +++ b/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/production/ProductionModeCopyStep.java @@ -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"); diff --git a/pom.xml b/pom.xml index ac794efe4f3..cdd452e795f 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ commons-io commons-io - 2.8.0 + 2.11.0 org.apache.commons