From 3732f8483b8dc1756f9082c0e43eac74b490d035 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 16:58:12 +0000 Subject: [PATCH 1/2] Bump org.apache.commons:commons-csv from 1.9.0 to 1.10.0 Bumps [org.apache.commons:commons-csv](https://github.com/apache/commons-csv) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/apache/commons-csv/releases) - [Changelog](https://github.com/apache/commons-csv/blob/master/RELEASE-NOTES.txt) - [Commits](https://github.com/apache/commons-csv/compare/rel/commons-csv-1.9.0...rel/commons-csv-1.10.0) --- updated-dependencies: - dependency-name: org.apache.commons:commons-csv dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 30123f5425..1ee59efcd8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -100,7 +100,7 @@ dependencies { // Third-party implementation 'com.journeyapps:zxing-android-embedded:4.3.0@aar' implementation 'com.google.zxing:core:3.5.1' - implementation 'org.apache.commons:commons-csv:1.9.0' + implementation 'org.apache.commons:commons-csv:1.10.0' implementation 'com.jaredrummler:colorpicker:1.1.0' implementation 'com.github.invissvenska:NumberPickerPreference:1.0.4' implementation 'net.lingala.zip4j:zip4j:2.11.5' From 4fe43bccfffc536a603f9598105e62d1ab557f1a Mon Sep 17 00:00:00 2001 From: Sylvia van Os Date: Tue, 18 Apr 2023 19:58:40 +0200 Subject: [PATCH 2/2] Catch new UncheckedIOException --- .../protect/card_locker/importexport/CatimaImporter.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/protect/card_locker/importexport/CatimaImporter.java b/app/src/main/java/protect/card_locker/importexport/CatimaImporter.java index 52d521781c..145d47d88e 100644 --- a/app/src/main/java/protect/card_locker/importexport/CatimaImporter.java +++ b/app/src/main/java/protect/card_locker/importexport/CatimaImporter.java @@ -17,6 +17,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringReader; +import java.io.UncheckedIOException; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -100,7 +101,7 @@ public void parseV1(SQLiteDatabase database, BufferedReader input) throws IOExce } parser.close(); - } catch (IllegalArgumentException | IllegalStateException e) { + } catch (UncheckedIOException e) { throw new FormatException("Issue parsing CSV data", e); } } @@ -182,7 +183,7 @@ public void parseV2Groups(SQLiteDatabase database, String data) throws IOExcepti throw new InterruptedException(); } } - } catch (IllegalArgumentException | IllegalStateException e) { + } catch (UncheckedIOException e) { throw new FormatException("Issue parsing CSV data", e); } finally { groupParser.close(); @@ -207,7 +208,7 @@ public void parseV2Cards(Context context, SQLiteDatabase database, String data) throw new InterruptedException(); } } - } catch (IllegalArgumentException | IllegalStateException e) { + } catch (UncheckedIOException e) { throw new FormatException("Issue parsing CSV data", e); } finally { cardParser.close(); @@ -232,7 +233,7 @@ public void parseV2CardGroups(SQLiteDatabase database, String data) throws IOExc throw new InterruptedException(); } } - } catch (IllegalArgumentException | IllegalStateException e) { + } catch (UncheckedIOException e) { throw new FormatException("Issue parsing CSV data", e); } finally { cardGroupParser.close();