From 0c542fe6844ac33d4cffdecebca918170da29d1f Mon Sep 17 00:00:00 2001
From: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Date: Thu, 9 Sep 2021 12:52:57 +0300
Subject: [PATCH 1/2] 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
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index ac6a6f68c65..90a2a956ab0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -196,7 +196,7 @@
commons-io
commons-io
- 2.8.0
+ 2.11.0
org.apache.commons
From 3737e0d715db60b060ffb0f09ebf1358c4b6a96f Mon Sep 17 00:00:00 2001
From: Mikhail Shabarov
Date: Fri, 10 Sep 2021 16:54:15 +0300
Subject: [PATCH 2/2] fix: IOUtils::toString doesn't throw exception anymore
---
.../production/ProductionModeCopyStep.java | 16 ++++------------
1 file changed, 4 insertions(+), 12 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");