core: Warn on passing empty values to AbstractFieldDetails subclasses
authorPhilip Withnall <philip@tecnocode.co.uk>
Sun, 25 Dec 2011 10:48:14 +0000 (10:48 +0000)
committerPhilip Withnall <philip@tecnocode.co.uk>
Sun, 25 Dec 2011 10:48:14 +0000 (10:48 +0000)
commita99f47a196bee5a5ab258a010f7dcc173bbf7a42
treed82bb293bb49c534dce539469c8f1f04af36fe4a
parent6d9b0f55ff057776c13a2a6927a853ba6e9a320d
core: Warn on passing empty values to AbstractFieldDetails subclasses

There are no situations where passing an empty value (string or object) to
an AbstractFieldDetails subclass makes sense. It just introduces potential
bugs with mishandling empty strings (etc.) in code which consumes the
AbstractFieldDetails.

This commit adds warnings to all the AbstractFieldDetails subclasses’
constructors which check for empty inputs. We can't use assert()s here
because that would be an API break.

Helps: bgo#666540
folks/email-details.vala
folks/im-details.vala
folks/note-details.vala
folks/phone-details.vala
folks/postal-address-details.vala
folks/role-details.vala
folks/url-details.vala
folks/web-service-details.vala