You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case errorsArray is nil. I am assuming this is because there were no errors (since zero is a valid number of times for a repeated field). This makes [self.errorsArray isEqualToArray:otherMessage.errorsArray] returns false. The end result is objects with repeated fields that have zero entries can never test equal.
I can imagine a couple of fixes, e.g. having an empty array instead of nil or changing the test to make both sides being nil a valid situation, however I am not familiar enough with the code to know exactly where to place this. I glanced at the code that generates isEqualToArray but I'm not sure if the adding the nil test is always valid.
The text was updated successfully, but these errors were encountered:
We have an object which includes a repeated field called errors.
Here is the return from the generated isEquals method:
In my case errorsArray is nil. I am assuming this is because there were no errors (since zero is a valid number of times for a repeated field). This makes
[self.errorsArray isEqualToArray:otherMessage.errorsArray]
returns false. The end result is objects with repeated fields that have zero entries can never test equal.I can imagine a couple of fixes, e.g. having an empty array instead of nil or changing the test to make both sides being nil a valid situation, however I am not familiar enough with the code to know exactly where to place this. I glanced at the code that generates isEqualToArray but I'm not sure if the adding the nil test is always valid.
The text was updated successfully, but these errors were encountered: