diff --git a/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Marshaler.java b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Marshaler.java index c06d98b463e..fe027fcdc07 100644 --- a/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Marshaler.java +++ b/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Marshaler.java @@ -34,7 +34,6 @@ public final void writeJsonWithoutCloseTo(OutputStream output) throws IOExceptio try (JsonSerializer serializer = new JsonSerializer(generator)) { serializer.writeMessageValue(this); } - ; } /** Marshals into the {@link OutputStream} in proto JSON format. */ diff --git a/exporters/logging-otlp/src/test/java/io/opentelemetry/exporter/logging/otlp/internal/writer/StreamJsonWriterTest.java b/exporters/logging-otlp/src/test/java/io/opentelemetry/exporter/logging/otlp/internal/writer/StreamJsonWriterTest.java index ba23e36933c..c1b4830c1b9 100644 --- a/exporters/logging-otlp/src/test/java/io/opentelemetry/exporter/logging/otlp/internal/writer/StreamJsonWriterTest.java +++ b/exporters/logging-otlp/src/test/java/io/opentelemetry/exporter/logging/otlp/internal/writer/StreamJsonWriterTest.java @@ -45,7 +45,9 @@ void testToString() throws IOException { @Test void errorWriting() throws IOException { Marshaler marshaler = mock(Marshaler.class); - Mockito.doThrow(new IOException("test")).when(marshaler).writeJsonTo(any(OutputStream.class)); + Mockito.doThrow(new IOException("test")) + .when(marshaler) + .writeJsonWithoutCloseTo(any(OutputStream.class)); StreamJsonWriter writer = new StreamJsonWriter(System.out, "type"); writer.write(marshaler);