Skip to content

Commit

Permalink
Rename protected variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndiritu committed Oct 7, 2024
1 parent 5922c54 commit 81d3b24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
/** Proxy factory that allows the composition of before and after callbacks on existing factories. */
public abstract class SerializationWriterProxyFactory implements SerializationWriterFactory {
@Nonnull public String getValidContentType() {
return _concrete.getValidContentType();
return proxiedFactory.getValidContentType();
}

protected final SerializationWriterFactory _concrete;
protected final SerializationWriterFactory proxiedFactory;
private final Consumer<Parsable> _onBefore;
private final Consumer<Parsable> _onAfter;
private final BiConsumer<Parsable, SerializationWriter> _onStart;
Expand All @@ -30,14 +30,14 @@ public SerializationWriterProxyFactory(
@Nullable final Consumer<Parsable> onBeforeSerialization,
@Nullable final Consumer<Parsable> onAfterSerialization,
@Nullable final BiConsumer<Parsable, SerializationWriter> onStartObjectSerialization) {
_concrete = Objects.requireNonNull(concrete);
proxiedFactory = Objects.requireNonNull(concrete);
_onBefore = onBeforeSerialization;
_onAfter = onAfterSerialization;
_onStart = onStartObjectSerialization;
}

@Nonnull public SerializationWriter getSerializationWriter(@Nonnull final String contentType) {
final SerializationWriter writer = _concrete.getSerializationWriter(contentType);
final SerializationWriter writer = proxiedFactory.getSerializationWriter(contentType);
final Consumer<Parsable> originalBefore = writer.getOnBeforeObjectSerialization();
final Consumer<Parsable> originalAfter = writer.getOnAfterObjectSerialization();
final BiConsumer<Parsable, SerializationWriter> originalStart =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public BackingStoreSerializationWriterProxyFactory(
@Nonnull public SerializationWriter getSerializationWriter(
@Nonnull final String contentType, final boolean serializeOnlyChangedValues) {
if (!serializeOnlyChangedValues) {
return _concrete.getSerializationWriter(contentType);
return proxiedFactory.getSerializationWriter(contentType);
}
return getSerializationWriter(contentType);
}
Expand Down

0 comments on commit 81d3b24

Please sign in to comment.