Replace Charset.forName("UTF-8") on StandartCharsets.UTF_8 (#30113)

This commit is contained in:
Andrei Arlou 2021-03-19 13:15:50 +03:00 committed by GitHub
parent c737f1a8e6
commit fbc09c55f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 22 deletions

View file

@ -9,6 +9,8 @@ import docs.persistence.proto.FlightAppModels;
import java.io.NotSerializableException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import spray.json.JsObject;
import akka.persistence.journal.EventAdapter;
@ -186,7 +188,7 @@ public class PersistenceSchemaEvolutionDocTest {
* to/from bytes marshalling.
*/
static class SimplestPossiblePersonSerializer extends SerializerWithStringManifest {
private final Charset utf8 = Charset.forName("UTF-8");
private final Charset utf8 = StandardCharsets.UTF_8;
private final String personManifest = Person.class.getName();
@ -335,7 +337,7 @@ public class PersistenceSchemaEvolutionDocTest {
public
// #string-serializer-skip-deleved-event-by-manifest
static class RemovedEventsAwareSerializer extends SerializerWithStringManifest {
private final Charset utf8 = Charset.forName("UTF-8");
private final Charset utf8 = StandardCharsets.UTF_8;
private final String customerBlinkedManifest = "blinked";
// unique identifier of the serializer
@ -389,7 +391,7 @@ public class PersistenceSchemaEvolutionDocTest {
public
// #string-serializer-handle-rename
static class RenamedEventAwareSerializer extends SerializerWithStringManifest {
private final Charset utf8 = Charset.forName("UTF-8");
private final Charset utf8 = StandardCharsets.UTF_8;
// unique identifier of the serializer
@Override