@@ -74,7 +74,7 @@ public void testGetDefaultConstraintValidatorFactory() {
74
74
public void testGetInitializedValidator () {
75
75
ConstraintDescriptorImpl <?> constraintDescriptor = getConstraintDescriptorForProperty ( "s1" );
76
76
ValueContext valueContext = ValueContext .getLocalExecutionContext ( new Foo (), null , null );
77
- valueContext .setTypeOfAnnotatedElement ( String .class );
77
+ valueContext .setDeclaredTypeOfValidatedElement ( String .class );
78
78
79
79
ConstraintValidator <?, ?> constraintValidator = constraintValidatorManager .getInitializedValidator (
80
80
valueContext ,
@@ -89,7 +89,7 @@ public void testGetInitializedValidator() {
89
89
public void testNullValidatedValueThrowsIllegalArgumentException () {
90
90
ConstraintDescriptorImpl <?> constraintDescriptor = getConstraintDescriptorForProperty ( "s1" );
91
91
ValueContext valueContext = ValueContext .getLocalExecutionContext ( new Foo (), null , null );
92
- valueContext .setTypeOfAnnotatedElement ( null );
92
+ valueContext .setDeclaredTypeOfValidatedElement ( null );
93
93
94
94
constraintValidatorManager .getInitializedValidator (
95
95
valueContext ,
@@ -101,7 +101,7 @@ public void testNullValidatedValueThrowsIllegalArgumentException() {
101
101
@ Test (expectedExceptions = IllegalArgumentException .class )
102
102
public void testNullDescriptorThrowsIllegalArgumentException () {
103
103
ValueContext valueContext = ValueContext .getLocalExecutionContext ( new Foo (), null , null );
104
- valueContext .setTypeOfAnnotatedElement ( String .class );
104
+ valueContext .setDeclaredTypeOfValidatedElement ( String .class );
105
105
106
106
constraintValidatorManager .getInitializedValidator (
107
107
valueContext ,
@@ -114,7 +114,7 @@ public void testNullDescriptorThrowsIllegalArgumentException() {
114
114
public void testNullFactoryThrowsIllegalArgumentException () {
115
115
ConstraintDescriptorImpl <?> constraintDescriptor = getConstraintDescriptorForProperty ( "s1" );
116
116
ValueContext valueContext = ValueContext .getLocalExecutionContext ( new Foo (), null , null );
117
- valueContext .setTypeOfAnnotatedElement ( String .class );
117
+ valueContext .setDeclaredTypeOfValidatedElement ( String .class );
118
118
119
119
constraintValidatorManager .getInitializedValidator (
120
120
valueContext ,
@@ -131,7 +131,7 @@ public void testUnexpectedTypeException() {
131
131
ValueContext valueContext = ValueContext .getLocalExecutionContext (
132
132
new Foo (), null , PathImpl .createPathFromString ( "s2" )
133
133
);
134
- valueContext .setTypeOfAnnotatedElement ( Object .class );
134
+ valueContext .setDeclaredTypeOfValidatedElement ( Object .class );
135
135
136
136
constraintValidatorManager .getInitializedValidator (
137
137
valueContext ,
@@ -144,7 +144,7 @@ public void testUnexpectedTypeException() {
144
144
public void testConstraintValidatorInstancesAreCachedPerFactory () {
145
145
ConstraintDescriptorImpl <?> constraintDescriptor = getConstraintDescriptorForProperty ( "s1" );
146
146
ValueContext valueContext = ValueContext .getLocalExecutionContext ( new Foo (), null , null );
147
- valueContext .setTypeOfAnnotatedElement ( String .class );
147
+ valueContext .setDeclaredTypeOfValidatedElement ( String .class );
148
148
149
149
ConstraintValidator <?, ?> constraintValidator1 = constraintValidatorManager .getInitializedValidator (
150
150
valueContext ,
@@ -179,7 +179,7 @@ public void testConstraintValidatorInstancesAreCachedPerFactory() {
179
179
public void testOnlyTheInstancesForTheLeastRecentlyUsedCustomFactoryAreCached () {
180
180
ConstraintDescriptorImpl <?> constraintDescriptor = getConstraintDescriptorForProperty ( "s1" );
181
181
ValueContext valueContext = ValueContext .getLocalExecutionContext ( new Foo (), null , null );
182
- valueContext .setTypeOfAnnotatedElement ( String .class );
182
+ valueContext .setDeclaredTypeOfValidatedElement ( String .class );
183
183
184
184
for ( int i = 0 ; i < 10 ; i ++ ) {
185
185
constraintValidatorManager .getInitializedValidator (
@@ -215,7 +215,7 @@ public void testValidatorsAreCachedPerConstraint() {
215
215
.getValidator ();
216
216
217
217
ValueContext valueContext = ValueContext .getLocalExecutionContext ( new User (), null , null );
218
- valueContext .setTypeOfAnnotatedElement ( String .class );
218
+ valueContext .setDeclaredTypeOfValidatedElement ( String .class );
219
219
220
220
ConstraintDescriptorImpl <?> notNullOnFirstNameDescriptor = getSingleConstraintDescriptorForProperty (
221
221
validator , User .class , "firstName"
@@ -251,7 +251,7 @@ public void testValidatorsAreCachedPerConstraintAndAnnotationMembers() {
251
251
.getValidator ();
252
252
253
253
ValueContext valueContext = ValueContext .getLocalExecutionContext ( new User (), null , null );
254
- valueContext .setTypeOfAnnotatedElement ( String .class );
254
+ valueContext .setDeclaredTypeOfValidatedElement ( String .class );
255
255
256
256
ConstraintDescriptorImpl <?> sizeOnMiddleNameDescriptor = getSingleConstraintDescriptorForProperty (
257
257
validator , User .class , "middleName"
0 commit comments