Change By: Hardy Ferentschik (07/Dec/12 9:51 AM)
Description: There is an unsafe cast in method collectMetaConstraintsForPath in class  ValidatorImpl  _ValidatorImpl_  which might result in  ClassCastException  _ClassCastException_  under some circumstances. The problem is in the following line:

{code}
Class<T> castedValueClass = (Class<T>) ( newValue == null ? type : newValue.getClass() );
{code}

When  "newValue"  _newValue_  is  null  _null_ , the variable  "type"  _type_  is casted to  Class class  _Class_ , but it might be of type (for example)  ParameterizedTypeImpl  _ParameterizedTypeImpl_  since it is initialized like this:

{code}
Type type = ReflectionHelper.typeOf( m );
{code}

I'm not completely sure about conditions, but we are experiencing it from time to time.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira