Skip to content

Commit

Permalink
TRUNK-3820: Fixed to avoid NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
rkorytkowski committed Dec 10, 2012
1 parent 319646e commit 91116b9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ public void validate(Object object, Errors errors) {
PersonName personName = (PersonName) object;
try {
// Validate that the person name object is not null
if (personName == null)
if (personName == null) {
errors.reject("error.name");
if (!errors.hasErrors() && !personName.isVoided())
} else if (!personName.isVoided()) {
validatePersonName(personName, errors, true, false);
}
}
catch (Exception e) {
errors.reject(e.getMessage());
Expand Down

0 comments on commit 91116b9

Please sign in to comment.