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

Register the fields of the ChangeStreamDocument for reflection #18061

Merged
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 @@ -135,11 +135,13 @@ List<ReflectiveClassBuildItem> addExtensionPointsToNative(CodecProviderBuildItem
reflectiveClassNames.addAll(propertyCodecProviders.getPropertyCodecProviderClassNames());
reflectiveClassNames.addAll(bsonDiscriminators.getBsonDiscriminatorClassNames());
reflectiveClassNames.addAll(commandListeners.getCommandListenerClassNames());
reflectiveClassNames.add(ChangeStreamDocument.class.getName());

return reflectiveClassNames.stream()
List<ReflectiveClassBuildItem> reflectiveClass = reflectiveClassNames.stream()
.map(s -> new ReflectiveClassBuildItem(true, true, false, s))
.collect(Collectors.toList());
.collect(Collectors.toCollection(() -> new ArrayList<>()));
// ChangeStreamDocument needs to be registered for reflection with its fields.
reflectiveClass.add(new ReflectiveClassBuildItem(true, true, true, ChangeStreamDocument.class.getName()));
return reflectiveClass;
}

@BuildStep
Expand Down