From cca3e3ffc0e8fde33db28b2b9c19fa088c83458b Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Thu, 23 Jan 2025 20:37:46 +0100 Subject: [PATCH] Use more specific exception --- .../org/schabi/newpipe/extractor/utils/ProtoBuilder.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/utils/ProtoBuilder.java b/extractor/src/main/java/org/schabi/newpipe/extractor/utils/ProtoBuilder.java index f0e223a9c..0ced5bed2 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/utils/ProtoBuilder.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/utils/ProtoBuilder.java @@ -2,6 +2,7 @@ package org.schabi.newpipe.extractor.utils; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.UncheckedIOException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Base64; @@ -39,7 +40,7 @@ public class ProtoBuilder { } } } catch (final IOException e) { - throw new RuntimeException(e); + throw new UncheckedIOException(e); } } @@ -66,7 +67,7 @@ public class ProtoBuilder { try { byteBuffer.write(bytes); } catch (final IOException e) { - throw new RuntimeException(e); + throw new UncheckedIOException(e); } } }