• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

se-edu / addressbook-level4 / 4597 / 1
94%
master: 94%

Build:
DEFAULT BRANCH: master
Ran 07 Aug 2018 11:01AM UTC
Files 91
Run time 11s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Aug 2018 10:56AM UTC coverage: 92.189%. Remained the same
4597.1

push

travis-ci

pyokagan
<a href="https://github.com/se-edu/addressbook-level4/commit/<a class=hub.com/se-edu/addressbook-level4/commit/e186102b646d2307b53928142dd22932a6f4c86d">e186102b6<a href="https://github.com/se-edu/addressbook-level4/commit/e186102b646d2307b53928142dd22932a6f4c86d">&quot;&gt;Replace uses of `org.junit.Assert.fail` with `throw new AssertionError(...)`

The source code of `org.junit.Assert.fail(String)` is[1]:

    public static void fail(String message) {
        if (message == null) {
            throw new AssertionError();
        }
        throw new AssertionError(message);
    }

where `AssertionError` is our favorite `java.lang.AssertionError`.

In other words, calling `fail(String)` is no different from writing
`throw new AssertionError(...)`.

The latter has a further benefit, though -- it informs the Java compiler
that the code path terminates at that point. This is useful when we are
inside a function that has a non-void return type -- if we used
`fail(String)`, we will still need to `return` a dummy value at the end
to satisfy the compiler, whereas if we used
`throw new AssertionError(...)` we do not need to do that.

So, let&amp;#39;s use `throw new AssertionError(...)` consistently throughout
the code base.

[1] https://github.com/junit-team/junit4/blob/</a><a class="double-link" href="https://github.com/se-edu/addressbook-level4/commit/<a class="double-link" href="https://github.com/se-edu/addressbook-level4/commit/02c328028b4d32c15bbf0becc9838e54ecbafcbf">02c328028</a>">02c328028</a><a href="https://github.com/se-edu/addressbook-level4/commit/e186102b646d2307b53928142dd22932a6f4c86d">/src/main/java/org/junit/Assert.java#L85-L90

1428 of 1549 relevant lines covered (92.19%)

0.92 hits per line

Source Files on job 4597.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4362
  • Travis Job 4597.1
  • e186102b on github
  • Prev Job for on master (#4596.1)
  • Next Job for on master (#4609.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc