Is there a magic value to place in messages.properties to capture the error condition where a NullPointerException is thrown during a setter method, In the same way there is [field].typeMismatch=[message], or does one have to suck up the NullPointerException and handle the situation in a validate method which would add an Error to the Errors?
Is there a magic value to place in messages.properties to capture the error condition
Share
As far as I know, you’d have to handle it yourself.
An NPE being thrown by a setter is highly unusual situation – a well-designed class would not normally do that.