Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.4.1, 1.7 M2
-
None
-
validation object property
-
Description
... XWikiValidationStatus.addErrorToContext((getObject() == null) ? "" : getObject() .getClassName(), getName(), getTranslatedPrettyName(context), getValidationMessage(), context); return false; } catch (Exception e) { XWikiValidationStatus.addExceptionToContext(getObject() .getClassName(), getName(), e, context); return false; ...
This is an excerpt from public boolean validateProperty(BaseProperty property, XWikiContext context) in PropertyClass.java.
As you may seen, it reports getObject().getClassName() for the className argument of add...ToContext(), but since this is a propertyClass, getObject() returns a BaseClass, and the name of the class in not in getClassName() (which is null) but in getName().
So the fix should be:
... XWikiValidationStatus.addErrorToContext((getObject() == null) ? "" : getObject() .getName(), getName(), getTranslatedPrettyName(context), getValidationMessage(), context); return false; } catch (Exception e) { XWikiValidationStatus.addExceptionToContext((getObject() == null) ? "" : getObject() .getName(), getName(), e, context); return false; ...
Hope this helps.