Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate Stream in #wrapInCommonSet #605

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Stream;

import jakarta.json.bind.JsonbException;

Expand Down Expand Up @@ -73,11 +72,8 @@ public SerializationModelCreator(JsonbContext jsonbContext) {
public static ModelSerializer wrapInCommonSet(ModelSerializer modelSerializer,
Customization customization,
JsonbContext jsonbContext) {
return Stream.of(modelSerializer)
.map(KeyWriter::new)
.map(serializer -> new NullSerializer(serializer, customization, jsonbContext))
.findFirst()
.get();
KeyWriter serializer = new KeyWriter(modelSerializer);
return new NullSerializer(serializer, customization, jsonbContext);
}

/**
Expand Down