diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-03-24 22:38:16 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-03-24 22:38:16 +0100 |
commit | 4250bb53f050b5a7f86b211ec2b34f85f7cc3ddc (patch) | |
tree | 4c50139f0022fa9adf87173ea9b143c78bc8d1a1 /server | |
parent | 80d64d20e5fe3980b0057030a35368fc83ba0984 (diff) | |
download | sonarqube-4250bb53f050b5a7f86b211ec2b34f85f7cc3ddc.tar.gz sonarqube-4250bb53f050b5a7f86b211ec2b34f85f7cc3ddc.zip |
Fix quality flaws
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/ws/WsUtils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ws/WsUtils.java b/server/sonar-server/src/main/java/org/sonar/server/ws/WsUtils.java index 66d172e808a..60df0574a76 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ws/WsUtils.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ws/WsUtils.java @@ -24,6 +24,7 @@ import com.google.common.base.Throwables; import com.google.protobuf.Message; import java.io.OutputStream; import java.io.OutputStreamWriter; +import java.nio.charset.StandardCharsets; import javax.annotation.Nullable; import org.apache.commons.io.IOUtils; import org.sonar.api.server.ws.Request; @@ -54,7 +55,7 @@ public class WsUtils { msg.writeTo(output); } else { response.stream().setMediaType(MediaTypes.JSON); - try (OutputStreamWriter writer = new OutputStreamWriter(output)) { + try (OutputStreamWriter writer = new OutputStreamWriter(output, StandardCharsets.UTF_8)) { ProtobufJsonFormat.write(msg, JsonWriter.of(writer)); } } |