Skip to content

Commit

Permalink
Add private constructors for stateless marshalers (#6434)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored May 7, 2024
1 parent 996c9c3 commit 2454765
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
final class BoolAnyValueStatelessMarshaler implements StatelessMarshaler<Boolean> {
static final BoolAnyValueStatelessMarshaler INSTANCE = new BoolAnyValueStatelessMarshaler();

private BoolAnyValueStatelessMarshaler() {}

@Override
public void writeTo(Serializer output, Boolean value, MarshalerContext context)
throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
final class DoubleAnyValueStatelessMarshaler implements StatelessMarshaler<Double> {
static final DoubleAnyValueStatelessMarshaler INSTANCE = new DoubleAnyValueStatelessMarshaler();

private DoubleAnyValueStatelessMarshaler() {}

@Override
public void writeTo(Serializer output, Double value, MarshalerContext context)
throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
final class IntAnyValueStatelessMarshaler implements StatelessMarshaler<Long> {
static final IntAnyValueStatelessMarshaler INSTANCE = new IntAnyValueStatelessMarshaler();

private IntAnyValueStatelessMarshaler() {}

@Override
public void writeTo(Serializer output, Long value, MarshalerContext context) throws IOException {
output.writeInt64(AnyValue.INT_VALUE, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
final class StringAnyValueStatelessMarshaler implements StatelessMarshaler<String> {
static final StringAnyValueStatelessMarshaler INSTANCE = new StringAnyValueStatelessMarshaler();

private StringAnyValueStatelessMarshaler() {}

@Override
public void writeTo(Serializer output, String value, MarshalerContext context)
throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ final class InstrumentationScopeSpansStatelessMarshaler
static final InstrumentationScopeSpansStatelessMarshaler INSTANCE =
new InstrumentationScopeSpansStatelessMarshaler();

private InstrumentationScopeSpansStatelessMarshaler() {}

@Override
public void writeTo(
Serializer output,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public final class ResourceSpansStatelessMarshaler
private static final MarshalerContext.Key SCOPE_SPAN_WRITER_KEY = MarshalerContext.key();
private static final MarshalerContext.Key SCOPE_SPAN_SIZE_CALCULATOR_KEY = MarshalerContext.key();

private ResourceSpansStatelessMarshaler() {}

@Override
public void writeTo(
Serializer output,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
final class SpanEventStatelessMarshaler implements StatelessMarshaler<EventData> {
static final SpanEventStatelessMarshaler INSTANCE = new SpanEventStatelessMarshaler();

private SpanEventStatelessMarshaler() {}

@Override
public void writeTo(Serializer output, EventData event, MarshalerContext context)
throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
final class SpanLinkStatelessMarshaler implements StatelessMarshaler<LinkData> {
static final SpanLinkStatelessMarshaler INSTANCE = new SpanLinkStatelessMarshaler();

private SpanLinkStatelessMarshaler() {}

@Override
public void writeTo(Serializer output, LinkData link, MarshalerContext context)
throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
final class SpanStatelessMarshaler implements StatelessMarshaler<SpanData> {
static final SpanStatelessMarshaler INSTANCE = new SpanStatelessMarshaler();

private SpanStatelessMarshaler() {}

@Override
public void writeTo(Serializer output, SpanData span, MarshalerContext context)
throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
final class SpanStatusStatelessMarshaler implements StatelessMarshaler<StatusData> {
static final SpanStatusStatelessMarshaler INSTANCE = new SpanStatusStatelessMarshaler();

private SpanStatusStatelessMarshaler() {}

@Override
public void writeTo(Serializer output, StatusData status, MarshalerContext context)
throws IOException {
Expand Down

0 comments on commit 2454765

Please sign in to comment.