Validator.validateValue() throws UnexpectedTypeException even when the passed value has a validator.

Description

I'm trying to validate individual UI text fields so that I can display user cues as the user is typing. When I call validateValue() on the string returned by the field I get the exception below. The test is below the exception. In the test I pass a string to validateValue() but it complains that there isn't a constraint validator for the JTextField where the validation annotation is attached. Since the text field isn't being referenced (it isn't even instantiated in the test case) it shouldn't matter where the validation was defined.

Exception from validateValue() call.

This is the test class:

Environment

My test was run on Java 1.6.0_27 in Eclipse.

Status

Assignee

Unassigned

Reporter

Jay Gorrell

Labels

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Affects versions

Priority

Major
Configure