Replace constant String of length 1 with character

Fixes UCPM_USE_CHARACTER_PARAMETERIZED_METHOD issue from SpotBugs.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2022-11-03 19:53:50 +01:00 committed by Marcel Hibbe
parent 4086499a32
commit 6b032fc55a
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B

View file

@ -2263,16 +2263,16 @@ public class CallActivity extends CallBaseActivity {
// need to be serialized twice; first the signaling message, and then the wrapper as a whole. Received // need to be serialized twice; first the signaling message, and then the wrapper as a whole. Received
// messages, on the other hand, just need to be deserialized once. // messages, on the other hand, just need to be deserialized once.
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("{") stringBuilder.append('{')
.append("\"fn\":\"") .append("\"fn\":\"")
.append(StringEscapeUtils.escapeJson(LoganSquare.serialize(ncSignalingMessage))) .append(StringEscapeUtils.escapeJson(LoganSquare.serialize(ncSignalingMessage)))
.append("\"") .append('\"')
.append(",") .append(',')
.append("\"sessionId\":") .append("\"sessionId\":")
.append("\"").append(StringEscapeUtils.escapeJson(callSession)).append("\"") .append('\"').append(StringEscapeUtils.escapeJson(callSession)).append('\"')
.append(",") .append(',')
.append("\"ev\":\"message\"") .append("\"ev\":\"message\"")
.append("}"); .append('}');
List<String> strings = new ArrayList<>(); List<String> strings = new ArrayList<>();
String stringToSend = stringBuilder.toString(); String stringToSend = stringBuilder.toString();