Skip to content

Commit 76882b5

Browse files
committed
Fix incompatible change done by IDE
1 parent beacc38 commit 76882b5

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

library/src/test/java/me/proxer/library/api/LoggingInterceptorTest.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import java.io.ByteArrayOutputStream;
1313
import java.io.IOException;
14-
import java.nio.charset.StandardCharsets;
1514
import java.security.GeneralSecurityException;
1615
import java.util.concurrent.CountDownLatch;
1716
import java.util.logging.Formatter;
@@ -64,7 +63,7 @@ public void testLog() throws IOException, ProxerException {
6463
loggerHandler.flush();
6564
loggerStream.flush();
6665

67-
assertThat(loggerStream.toString(StandardCharsets.UTF_8)).isEqualTo("Requesting https://"
66+
assertThat(loggerStream.toString("UTF-8")).isEqualTo("Requesting https://"
6867
+ server.getHostName() + ":" + server.getPort()
6968
+ "/api/v1/notifications/news with method GET and these headers:\n"
7069
+ "proxer-api-key: mockKey\n"
@@ -84,7 +83,7 @@ public void testLogWithBody() throws IOException, ProxerException {
8483
loggerHandler.flush();
8584
loggerStream.flush();
8685

87-
assertThat(loggerStream.toString(StandardCharsets.UTF_8)).isEqualTo("Requesting https://"
86+
assertThat(loggerStream.toString("UTF-8")).isEqualTo("Requesting https://"
8887
+ server.getHostName() + ":" + server.getPort()
8988
+ "/api/v1/user/login with method POST, these headers:\n"
9089
+ "proxer-api-key: mockKey\n"
@@ -105,7 +104,7 @@ public void testLogWithEmptyBody() throws IOException, ProxerException {
105104
loggerHandler.flush();
106105
loggerStream.flush();
107106

108-
assertThat(loggerStream.toString(StandardCharsets.UTF_8)).isEqualTo("Requesting https://"
107+
assertThat(loggerStream.toString("UTF-8")).isEqualTo("Requesting https://"
109108
+ server.getHostName() + ":" + server.getPort()
110109
+ "/api/v1/user/logout with method POST, these headers:\n"
111110
+ "proxer-api-key: mockKey\n"
@@ -125,7 +124,7 @@ public void testLogAllOtherHost() throws IOException {
125124
loggerHandler.flush();
126125
loggerStream.flush();
127126

128-
assertThat(loggerStream.toString(StandardCharsets.UTF_8)).isEqualTo("Requesting http://"
127+
assertThat(loggerStream.toString("UTF-8")).isEqualTo("Requesting http://"
129128
+ server.getHostName() + ":" + server.getPort()
130129
+ "/test with method GET and no headers.");
131130
}
@@ -143,7 +142,7 @@ public void testLogApiOnly() throws IOException {
143142
loggerHandler.flush();
144143
loggerStream.flush();
145144

146-
assertThat(loggerStream.toString(StandardCharsets.UTF_8)).isEmpty();
145+
assertThat(loggerStream.toString("UTF-8")).isEmpty();
147146
}
148147

149148
@Test
@@ -159,7 +158,7 @@ public void testLogNone() throws IOException {
159158
loggerHandler.flush();
160159
loggerStream.flush();
161160

162-
assertThat(loggerStream.toString(StandardCharsets.UTF_8)).isEmpty();
161+
assertThat(loggerStream.toString("UTF-8")).isEmpty();
163162
}
164163

165164
@Test

0 commit comments

Comments
 (0)