When I have a list of "Any"s, and I want to find if an element in the list 
matches some other 'Any' protobuf, I try to use the 
util::MessageDifferencer::Equals and I get errors "Comparison between two 
messages with different descriptors." I've tried a 
message1.GetDescriptor() == message2.GetDescriptor && MessageDifferencer.
Equals(message1, message2)
combination, to hopefully head that off, but I still get the same error, 
presumably because the descriptor is getting Any's descriptor, and not the 
descriptor of the internal message it contains.

Is there a way to actually make this comparison work? It seems like the 
Equals comparison should have a specific carveout for the 'Any' case to 
begin with.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to