| 1052 | |
| 1053 | using CompatMapValue::Get; |
| 1054 | absl::optional<CelValue> Get(google::protobuf::Arena* arena, |
| 1055 | CelValue key) const override { |
| 1056 | if (auto status = CelValue::CheckMapKeyType(key); !status.ok()) { |
| 1057 | status.IgnoreError(); |
| 1058 | return absl::nullopt; |
| 1059 | } |
| 1060 | if (auto it = map_.find(key); it != map_.end()) { |
| 1061 | return common_internal::UnsafeLegacyValue( |
| 1062 | it->second, /*stable=*/true, |
| 1063 | arena != nullptr ? arena : map_.get_allocator().arena()); |
| 1064 | } |
| 1065 | return absl::nullopt; |
| 1066 | } |
| 1067 | |
| 1068 | absl::StatusOr<bool> Has(const CelValue& key) const override { |
| 1069 | // This check safeguards against issues with invalid key types such as NaN. |
nothing calls this directly
no test coverage detected