Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 668292367
  • Loading branch information
FHIR Team authored and copybara-github committed Aug 30, 2024
1 parent d36e6b2 commit 0c74414
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cc/google/fhir/json_printer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ class Printer {

// TODO(b/148916862): Use a registry to determine the correct
// ContainedResource to unpack to.
if (google::protobuf::DownCastToGenerated<Any>(proto).UnpackTo(contained.get())) {
if (google::protobuf::DownCastMessage<Any>(proto).UnpackTo(contained.get())) {
return PrintContainedResource(*contained);
}

// If we can't unpack the Any proto as a contained resource, try to unpack
// it as a contained resource `one of` field.
std::optional<std::unique_ptr<google::protobuf::Message>> resource_msg =
ExtractConcreteMessage(google::protobuf::DownCastToGenerated<Any>(proto));
ExtractConcreteMessage(google::protobuf::DownCastMessage<Any>(proto));
if (resource_msg == std::nullopt) {
// Unable to extract Any proto into a concrete message. This could
// happen if the proto is not a core FHIR resource. In this case we
Expand Down

0 comments on commit 0c74414

Please sign in to comment.