google / truth

Fluent assertions for Java and Android
https://truth.dev/
Apache License 2.0
2.71k stars 258 forks source link

Use `AssertionError(String, Throwable)` instead of supplying the cause later. #1297

Closed copybara-service[bot] closed 3 months ago

copybara-service[bot] commented 3 months ago

Use AssertionError(String, Throwable) instead of supplying the cause later.

I could have done this as part of cl/609415936 and cl/604677493, but I'd missed that AssertionError(String, Throwable) was added in API Level 19.

(The code in Platform in cl/609415936 still needs to use initCause because it uses ComparisonFailure, which does not expose a Throwable-accepting constructor.)

RELNOTES=n/a