Fix a NPE bug in Fuzzy Truth.

If the actual array contains extra elements, and Smart Diffing is active (either because it was explicitly invoked or because there is exactly one missing element), but the Correspondence.diffFormat method was returning null, we were calling extra.toString(), which is no good because extra could legitimately be null.

RELNOTES=n/a

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220285904
2 files changed
tree: 546e83340d49a914def4f5b316a0964970b70064
  1. core/
  2. extensions/
  3. util/
  4. .gitignore
  5. .travis.yml
  6. CONTRIBUTING.md
  7. LICENSE
  8. pom.xml
  9. README.md
README.md

Main Site Build Status Maven Release Stackoverflow

What is Truth?

Truth makes your test assertions and failure messages more readable. Similar to AssertJ, it natively supports many JDK and Guava types, and it is extensible to others.

Truth is owned and maintained by the Guava team. It is used from the majority of the tests in Google’s own codebase.

Read more at the main website.