File tree Expand file tree Collapse file tree
lib/src/main/java/io/ably/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import java .net .URLDecoder ;
99import java .net .URLEncoder ;
1010import java .nio .charset .Charset ;
11- import java .nio .charset .StandardCharsets ;
1211import java .util .ArrayList ;
1312import java .util .HashMap ;
1413import java .util .List ;
@@ -147,7 +146,7 @@ public static String encodeURIComponent(String str) {
147146 return null ;
148147 }
149148
150- byte [] bytes = str .getBytes (StandardCharsets . UTF_8 );
149+ byte [] bytes = str .getBytes (Charset . forName ( "UTF-8" ) );
151150 StringBuilder builder = new StringBuilder (bytes .length );
152151
153152 for (byte c : bytes ) {
Original file line number Diff line number Diff line change 11package io .ably .lib .types ;
22
3- import java .util .Map ;
4- import java .nio .charset .StandardCharsets ;
3+ import java .nio .charset .Charset ;
54
65public class DecodingContext {
76
@@ -18,7 +17,7 @@ public byte[] getLastMessageData() {
1817 if (lastMessageBinary != null )
1918 return lastMessageBinary ;
2019 else if (lastMessageString != null ) {
21- return lastMessageString .getBytes (StandardCharsets . UTF_8 );
20+ return lastMessageString .getBytes (Charset . forName ( "UTF-8" ) );
2221 }
2322 else
2423 return null ;
You can’t perform that action at this time.
0 commit comments