Issue Type: Bug Bug
Affects Versions: 4.3.1.Final
Assignee: Unassigned
Components: engine
Created: 06/Dec/12 10:33 AM
Description:

There is an unsafe cast in method collectMetaConstraintsForPath in class ValidatorImpl which might result in ClassCastException under some circumstances. The problem is in the following line:

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

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

Type type = ReflectionHelper.typeOf( m );

I'm not completely sure about conditions, but we are experiencing it from time to time.

Project: Hibernate Validator
Labels: validation
Priority: Major Major
Reporter: František Řezáč
Original Estimate: 8h
Remaining Estimate: 8h
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