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

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

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

13 Aug 2018 03:08PM UTC coverage: 92.811% (+0.01%) from 92.797%
4656.1

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.

1433 of 1544 relevant lines covered (92.81%)

0.93 hits per line

Source Files on job 4656.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4410
  • Travis Job 4656.1
  • 407a283e on github
  • Prev Job for on master (#4650.1)
  • Next Job for on master (#4660.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