@@ -70,7 +70,7 @@ private ConstraintTree(ConstraintDescriptorImpl<A> descriptor, ConstraintTree<?>
70
70
}
71
71
72
72
private <U extends Annotation > ConstraintTree <U > createConstraintTree (ConstraintDescriptorImpl <U > composingDescriptor ) {
73
- return new ConstraintTree <U >( composingDescriptor , this );
73
+ return new ConstraintTree <>( composingDescriptor , this );
74
74
}
75
75
76
76
public final List <ConstraintTree <?>> getChildren () {
@@ -92,8 +92,8 @@ public final <T> boolean validateConstraints(ValidationContext<T> executionConte
92
92
return true ;
93
93
}
94
94
95
- private <T , V > void validateConstraints (ValidationContext <T > validationContext ,
96
- ValueContext <?, V > valueContext ,
95
+ private <T > void validateConstraints (ValidationContext <T > validationContext ,
96
+ ValueContext <?, ? > valueContext ,
97
97
Set <ConstraintViolation <T >> constraintViolations ) {
98
98
CompositionResult compositionResult = validateComposingConstraints (
99
99
validationContext , valueContext , constraintViolations
@@ -113,7 +113,7 @@ private <T, V> void validateConstraints(ValidationContext<T> validationContext,
113
113
}
114
114
115
115
// find the right constraint validator
116
- ConstraintValidator <A , V > validator = getInitializedConstraintValidator ( validationContext , valueContext );
116
+ ConstraintValidator <A , ? > validator = getInitializedConstraintValidator ( validationContext , valueContext );
117
117
118
118
// create a constraint validator context
119
119
ConstraintValidatorContextImpl constraintValidatorContext = new ConstraintValidatorContextImpl (
@@ -151,7 +151,7 @@ private <T, V> void validateConstraints(ValidationContext<T> validationContext,
151
151
}
152
152
}
153
153
154
- private <T , V > ConstraintValidator <A , V > getInitializedConstraintValidator (ValidationContext <T > validationContext ,
154
+ private <T , V > ConstraintValidator <A , ? > getInitializedConstraintValidator (ValidationContext <T > validationContext ,
155
155
ValueContext <?, V > valueContext ) {
156
156
Type validatedValueType = valueContext .getDeclaredTypeOfValidatedElement ();
157
157
@ SuppressWarnings ("unchecked" )
@@ -182,7 +182,7 @@ else if ( UnwrapMode.UNWRAP.equals( valueContext.getUnwrapMode() )
182
182
}
183
183
}
184
184
185
- private <T , V > ConstraintValidator <A , V > getInitializedValidatorInstanceForWrappedInstance (ValidationContext <T > validationContext , ValueContext <?, V > valueContext , Type validatedValueType , ValidatedValueUnwrapper <V > validatedValueUnwrapper ) {
185
+ private <T , V > ConstraintValidator <A , ? > getInitializedValidatorInstanceForWrappedInstance (ValidationContext <T > validationContext , ValueContext <?, V > valueContext , Type validatedValueType , ValidatedValueUnwrapper <V > validatedValueUnwrapper ) {
186
186
// make sure that unwrapper is set
187
187
if ( validatedValueUnwrapper == null ) {
188
188
throw log .getNoUnwrapperFoundForTypeException (
@@ -193,7 +193,7 @@ private <T, V> ConstraintValidator<A, V> getInitializedValidatorInstanceForWrapp
193
193
valueContext .setValidatedValueHandler ( validatedValueUnwrapper );
194
194
validatedValueType = validatedValueUnwrapper .getValidatedValueType ( validatedValueType );
195
195
196
- ConstraintValidator <A , V > validator = validationContext .getConstraintValidatorManager ()
196
+ ConstraintValidator <A , ? > validator = validationContext .getConstraintValidatorManager ()
197
197
.getInitializedValidator (
198
198
validatedValueType ,
199
199
descriptor ,
@@ -228,7 +228,7 @@ private void throwExceptionForNullValidator(Type validatedValueType, String path
228
228
}
229
229
}
230
230
231
- private <T , V > ConstraintValidator <A , V > getConstraintValidatorInstanceForAutomaticUnwrapping (
231
+ private <T , V > ConstraintValidator <A , ? > getConstraintValidatorInstanceForAutomaticUnwrapping (
232
232
ValidationContext <T > validationContext ,
233
233
ValueContext <?, V > valueContext
234
234
) {
@@ -244,15 +244,15 @@ private <T, V> ConstraintValidator<A, V> getConstraintValidatorInstanceForAutoma
244
244
245
245
// there is an unwrapper - need to find out for which type (wrapper or wrapped value there
246
246
// are constraint validators available
247
- ConstraintValidator <A , V > validatorForWrappedValue = validationContext .getConstraintValidatorManager ()
247
+ ConstraintValidator <A , ? > validatorForWrappedValue = validationContext .getConstraintValidatorManager ()
248
248
.getInitializedValidator (
249
249
validatedValueUnwrapper .getValidatedValueType ( validatedValueType ),
250
250
descriptor ,
251
251
validationContext .getConstraintValidatorFactory ()
252
252
);
253
253
254
254
255
- ConstraintValidator <A , V > validatorForWrapper = validationContext .getConstraintValidatorManager ()
255
+ ConstraintValidator <A , ? > validatorForWrapper = validationContext .getConstraintValidatorManager ()
256
256
.getInitializedValidator (
257
257
valueContext .getDeclaredTypeOfValidatedElement (),
258
258
descriptor ,
@@ -291,13 +291,13 @@ private <T, V> ConstraintValidator<A, V> getConstraintValidatorInstanceForAutoma
291
291
}
292
292
}
293
293
294
- private <T , V > ConstraintValidator <A , V > getConstraintValidatorNoUnwrapping (ValidationContext <T > validationContext ,
295
- ValueContext <?, V > valueContext ) {
294
+ private <T > ConstraintValidator <A , ? > getConstraintValidatorNoUnwrapping (ValidationContext <T > validationContext ,
295
+ ValueContext <?, ? > valueContext ) {
296
296
// make sure no unwrapper is set
297
297
valueContext .setValidatedValueHandler ( null );
298
298
299
299
Type validatedValueType = valueContext .getDeclaredTypeOfValidatedElement ();
300
- ConstraintValidator <A , V > validator = validationContext .getConstraintValidatorManager ()
300
+ ConstraintValidator <A , ? > validator = validationContext .getConstraintValidatorManager ()
301
301
.getInitializedValidator (
302
302
validatedValueType ,
303
303
descriptor ,
0 commit comments