tamingtext / book

Taming Text Book Source Code
http://www.tamingtext.com
380 stars 207 forks source link

NameFinderTest.removeConflicts(..) guard against empty list. #13

Closed drewfarris closed 11 years ago

drewfarris commented 11 years ago

If the removeConflicts method from NameFinderTest is called with an empty list an exception is thrown.

There's really no need to do anything in removeConflicts unless we have more than one item passed into the method via the list argument, so exit early if the list has less than 2 entries.

drewfarris commented 11 years ago

Thanks to Rick who posted the original issue on: http://www.manning-sandbox.com/thread.jspa?messageID=148021