summaryrefslogtreecommitdiffstats
path: root/odk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-05 14:54:44 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-05 16:06:15 +0100
commitffb1a9f3d570a4769d901709658b4e6bb2db5db2 (patch)
tree516931705cb3eb3286ac30e7562e58fe34b75479 /odk
parentSwFrameFormat::Modify refactoring (diff)
downloadcore-ffb1a9f3d570a4769d901709658b4e6bb2db5db2.tar.gz
core-ffb1a9f3d570a4769d901709658b4e6bb2db5db2.zip
Silence cid#1470402 FB.DM_DEFAULT_ENCODING
...where the default encoding should be the appropriate one for reading the Runtime.exec output Change-Id: Ib64bfcbcca985f2de506f8628b506e6dc7bfc035 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107255 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'odk')
-rw-r--r--odk/source/com/sun/star/lib/loader/WinRegKey.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/odk/source/com/sun/star/lib/loader/WinRegKey.java b/odk/source/com/sun/star/lib/loader/WinRegKey.java
index bdbcced68afa..3276458fc6f6 100644
--- a/odk/source/com/sun/star/lib/loader/WinRegKey.java
+++ b/odk/source/com/sun/star/lib/loader/WinRegKey.java
@@ -21,6 +21,7 @@ package com.sun.star.lib.loader;
import java.io.BufferedReader;
import java.io.InputStreamReader;
+import java.nio.charset.Charset;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -45,7 +46,8 @@ final class WinRegKey {
public String getStringValue() throws WinRegKeyException {
try {
Process p = Runtime.getRuntime().exec(new String[]{"reg", "QUERY", m_keyName});
- BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
+ BufferedReader r = new BufferedReader(
+ new InputStreamReader(p.getInputStream(), Charset.defaultCharset()));
String v = null;
Pattern pt = Pattern.compile("\\s+\\(Default\\)\\s+REG_SZ\\s+(.+)");
for (;;) {