From e2f8d2f2c4c557bd3853c529b5e4b4c055ebe445 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Thu, 17 Jun 2021 21:15:58 +0200 Subject: [PATCH] Avoid using Guava's Charset. Replaced with Java's StandardCharset. Fixes #2026. --- .../data/rest/webmvc/json/DomainObjectReaderUnitTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/DomainObjectReaderUnitTests.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/DomainObjectReaderUnitTests.java index aea0ea3b1..8e938f566 100755 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/DomainObjectReaderUnitTests.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/DomainObjectReaderUnitTests.java @@ -28,6 +28,7 @@ import lombok.Value; import java.io.ByteArrayInputStream; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.*; import org.junit.Before; @@ -64,7 +65,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategy; import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.databind.node.ObjectNode; -import com.google.common.base.Charsets; /** * Unit tests for {@link DomainObjectReader}. @@ -240,7 +240,7 @@ public class DomainObjectReaderUnitTests { user.phones.add(phone); ByteArrayInputStream source = new ByteArrayInputStream( - "{ \"phones\" : [ { \"label\" : \"some label\" } ] }".getBytes(Charsets.UTF_8)); + "{ \"phones\" : [ { \"label\" : \"some label\" } ] }".getBytes(StandardCharsets.UTF_8)); User result = reader.read(source, user, new ObjectMapper());