tmjee  committed 5b404c2

- log a warning when visited object by this VisitorValidator is null, cause in this case the validation will not work properly.

Issue number: XW-201
Obtained from:
Submitted by:
Reviewed by:


  • Participants
  • Parent commits 7863d9b
  • Branches master

Comments (0)

Files changed (1)

File src/java/com/opensymphony/xwork/validator/validators/

         String fieldName = getFieldName();
         Object value = this.getFieldValue(fieldName, object);
         if (value == null) {
+        	log.warn("The visited object is null, VisitorValidator will not be able to handle validation properly. Please make sure the visited object is not null for VisitorValidator to function properly");
         OgnlValueStack stack = ActionContext.getContext().getValueStack();