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

se-edu / addressbook-level4 / 4656
94%

Build:
DEFAULT BRANCH: master
Ran 13 Aug 2018 03:13PM UTC
Jobs 1
Files 90
Run time 8min
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

pending completion
4656

push

travis-ci

pyokagan
XmlSerializableAddressBook: check for duplicate person(s)

When the address book XML file happens to contain duplicate person(s),
XmlSerializableAddressBook#toModelType() will throw an unchecked
DuplicatePersonException instead of the checked IllegalValueException
which it promises to throw.

This is because XmlSerializableAddressBook#toModelType() relied on
AddressBook#addPerson(Person) throwing DuplicatePersonException when a
duplicate person is encountered. Since DuplicatePersonException
inherited from DuplicateDataException, which in turn inherited from
IllegalValueException, this gave rise to the expected behavior.

However, 6817bd35 (model: make DuplicatePersonException a
RuntimeException, 2018-08-07) made DuplicatePersonException inherit from
RuntimeException. Since this commit, all callers of
AddressBook#addPerson(Person) are expected to perform the duplicate
person check using AddressBook#hasPerson(Person). Yet,
XmlSerializableAddressBook#toModelType() was not updated.

Fix this by teaching XmlSerializableAddressBook#toModelType() to
explicitly check for duplicate persons using
AddressBook#hasPerson(Person). Add a test to prevent future regressions.

4 of 4 new or added lines in 1 file covered. (100.0%)

1433 of 1544 relevant lines covered (92.81%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4656.1 13 Aug 2018 03:13PM UTC 0
92.81
Travis Job 4656.1
Source Files on build 4656
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #4656
  • 407a283e on github
  • Prev Build on master (#4650)
  • Next Build on master (#4660)
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