Skip to content

Commit

Permalink
Register the fields of the ChangeStreamDocument for reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmathieu committed Jun 22, 2021
1 parent 37ce73a commit 732b2a7
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit 732b2a7

Please sign in to comment.