When an input of some form is left empty, it will be submitted as an empty String as well. This causes problems with the EmailConverter as well as the PhoneNumberConverter. They just pass the parameter on to create a respective instance. Hence an IllegalArgumentException is thrown when they receive an empty String. The expected behaviour should be to just return null instead.
When an
input
of some form is left empty, it will be submitted as an emptyString
as well. This causes problems with theEmailConverter
as well as thePhoneNumberConverter
. They just pass the parameter on to create a respective instance. Hence anIllegalArgumentException
is thrown when they receive an emptyString
. The expected behaviour should be to just returnnull
instead.