![]() |
Developer's Diary
Software development, with Terry Ebdon
|
Trek.isValid() is overly complex. It should be simpler and clearer. Note: There is a similar problem in FederationShip.isValid().
JaCoCo shows a complexity of 24. See the JaCoCo report for the current values.

Screen shot is from the [JaCoCo detail report.]:

I eliminated repeated use of != null by using the ?. operator, and replaced isValid() with valid. This change reduces the complexity from 24 to 5.

To fix issue #23 I added a second build file, coverage.gradle, and removed the JaCoCo plugin from build.gradle. A "normal" build will now run without the JaCoCo overhead.
To generate a coverage report use:
12-MAR-2019 👈 Top of page 👉 14-MAR-2019
© 2020 Terry Ebdon.
Find me coding on GitHub, networking on LinkedIn, answering questions on Stack Exchange and hanging out on twitter.