@@ -194,34 +194,34 @@ public IterableSubject valuesForKey(@Nullable Object key) {
194194 }
195195
196196 @ Override
197- public final void isEqualTo (@ Nullable Object other ) {
197+ public final void isEqualTo (@ Nullable Object expected ) {
198198 @ SuppressWarnings ("UndefinedEquals" ) // the contract of this method is to follow Multimap.equals
199- boolean isEqual = Objects .equals (actual , other );
199+ boolean isEqual = Objects .equals (actual , expected );
200200 if (isEqual ) {
201201 return ;
202202 }
203203
204204 // Fail but with a more descriptive message:
205- if (actual == null || other == null ) {
206- super .isEqualTo (other );
207- } else if ((actual instanceof ListMultimap && other instanceof SetMultimap )
208- || (actual instanceof SetMultimap && other instanceof ListMultimap )) {
205+ if (actual == null || expected == null ) {
206+ super .isEqualTo (expected );
207+ } else if ((actual instanceof ListMultimap && expected instanceof SetMultimap )
208+ || (actual instanceof SetMultimap && expected instanceof ListMultimap )) {
209209 String actualType = (actual instanceof ListMultimap ) ? "ListMultimap" : "SetMultimap" ;
210- String otherType = (other instanceof ListMultimap ) ? "ListMultimap" : "SetMultimap" ;
210+ String otherType = (expected instanceof ListMultimap ) ? "ListMultimap" : "SetMultimap" ;
211211 failWithoutActual (
212- fact ("expected" , other ),
212+ fact ("expected" , expected ),
213213 fact ("an instance of" , otherType ),
214214 butWas (),
215215 fact ("an instance of" , actualType ),
216216 simpleFact (
217217 lenientFormat (
218218 "a %s cannot equal a %s if either is non-empty" , actualType , otherType )));
219219 } else if (actual instanceof ListMultimap ) {
220- containsExactlyEntriesIn ((Multimap <?, ?>) other ).inOrder ();
220+ containsExactlyEntriesIn ((Multimap <?, ?>) expected ).inOrder ();
221221 } else if (actual instanceof SetMultimap ) {
222- containsExactlyEntriesIn ((Multimap <?, ?>) other );
222+ containsExactlyEntriesIn ((Multimap <?, ?>) expected );
223223 } else {
224- super .isEqualTo (other );
224+ super .isEqualTo (expected );
225225 }
226226 }
227227
0 commit comments