diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-04 15:36:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-05 11:37:53 +0200 |
commit | dd1e392dfd1934c1819ef32ee01a6c3091c5c7b2 (patch) | |
tree | 71a789e26c5da85c27819de929111c890921c44b | |
parent | f2019dd0e5493d7a33c8a0cea17bc110dcb4271c (diff) |
cid#1546344 Dm: Dubious method used
Change-Id: If9aaf45784d766651a74de16804c727ac9d066ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157572
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | external/java_websocket/UnpackedTarball_java_websocket.mk | 1 | ||||
-rw-r--r-- | external/java_websocket/patches/0001-cid-1546344-Dm-Dubious-method-used.patch | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/external/java_websocket/UnpackedTarball_java_websocket.mk b/external/java_websocket/UnpackedTarball_java_websocket.mk index 1e116656f65b..c0794de9b4a6 100644 --- a/external/java_websocket/UnpackedTarball_java_websocket.mk +++ b/external/java_websocket/UnpackedTarball_java_websocket.mk @@ -25,6 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,java_websocket,\ external/java_websocket/patches/0001-cid-1546264-Dm-Dubious-method-used.patch \ external/java_websocket/patches/0001-cid-1546341-Resource-leak-on-an-exceptional-path.patch \ external/java_websocket/patches/0001-cid-1545249-Bad-bit-shift-operation.patch \ + external/java_websocket/patches/0001-cid-1546344-Dm-Dubious-method-used.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/java_websocket/patches/0001-cid-1546344-Dm-Dubious-method-used.patch b/external/java_websocket/patches/0001-cid-1546344-Dm-Dubious-method-used.patch new file mode 100644 index 000000000000..0dff805889a5 --- /dev/null +++ b/external/java_websocket/patches/0001-cid-1546344-Dm-Dubious-method-used.patch @@ -0,0 +1,30 @@ +From f08918e466a99bdb7577fe4f91fa651d7c14fcb5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com> +Date: Wed, 4 Oct 2023 15:36:02 +0100 +Subject: [PATCH] cid#1546344 Dm: Dubious method used + +--- + src/main/java/org/java_websocket/util/Base64.java | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/src/main/java/org/java_websocket/util/Base64.java b/src/main/java/org/java_websocket/util/Base64.java +index e9ff7b8..da49ed5 100644 +--- a/src/main/java/org/java_websocket/util/Base64.java ++++ b/src/main/java/org/java_websocket/util/Base64.java +@@ -620,12 +620,7 @@ public class Base64 { + byte[] encoded = encodeBytesToBytes(source, off, len, options); + + // Return value according to relevant encoding. +- try { +- return new String(encoded, PREFERRED_ENCODING); +- } catch (java.io.UnsupportedEncodingException uue) { +- return new String(encoded); +- } // end catch +- ++ return new String(encoded, PREFERRED_ENCODING); + } // end encodeBytes + + /** +-- +2.41.0 + |