From 9ea293894d83201968298d5eb6819223dbe29349 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 17 Dec 2024 14:03:23 -0800 Subject: [PATCH] Fix deprecation warning --- .../contrib/aws/resource/BeanstalkResourceTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/BeanstalkResourceTest.java b/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/BeanstalkResourceTest.java index d8fc03935..c70642890 100644 --- a/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/BeanstalkResourceTest.java +++ b/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/BeanstalkResourceTest.java @@ -11,9 +11,9 @@ import static io.opentelemetry.semconv.incubating.CloudIncubatingAttributes.CLOUD_PROVIDER; import static io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes.SERVICE_INSTANCE_ID; import static io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes.SERVICE_NAMESPACE; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.entry; -import com.google.common.base.Charsets; import com.google.common.io.Files; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider; @@ -33,7 +33,7 @@ void testCreateAttributes(@TempDir File tempFolder) throws IOException { String content = "{\"noise\": \"noise\", \"deployment_id\":4,\"" + "version_label\":\"2\",\"environment_name\":\"HttpSubscriber-env\"}"; - Files.write(content.getBytes(Charsets.UTF_8), file); + Files.write(content.getBytes(UTF_8), file); Resource resource = BeanstalkResource.buildResource(file.getPath()); Attributes attributes = resource.getAttributes(); assertThat(attributes) @@ -59,7 +59,7 @@ void testBadConfigFile(@TempDir File tempFolder) throws IOException { String content = "\"deployment_id\":4,\"version_label\":\"2\",\"" + "environment_name\":\"HttpSubscriber-env\"}"; - Files.write(content.getBytes(Charsets.UTF_8), file); + Files.write(content.getBytes(UTF_8), file); Attributes attributes = BeanstalkResource.buildResource(file.getPath()).getAttributes(); assertThat(attributes).isEmpty(); }