Skip to content

Commit

Permalink
Address CR
Browse files Browse the repository at this point in the history
  • Loading branch information
dstepanov committed Jan 16, 2023
1 parent d670171 commit 9dade34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,8 @@ public <T> void validateBean(
} else {
beanType = definition.getBeanType();
}
final BeanIntrospection<T> introspection = (BeanIntrospection<T>) getBeanIntrospection(bean, beanType); if (introspection != null) {
final BeanIntrospection<T> introspection = (BeanIntrospection<T>) getBeanIntrospection(bean, beanType);
if (introspection != null) {
Set<ConstraintViolation<T>> errors = validate(introspection, bean);
failOnError(resolutionContext, errors, beanType);
} else if (bean instanceof Intercepted && definition.hasStereotype(ConfigurationReader.class)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -843,15 +843,6 @@ class ValidatorSpec extends Specification {
e.message.contains('''updateNumber.number: must be less than or equal to 50''')
beanC.number == 40
/*
when:
beanC.number = 100
then:
e = thrown()
e.message.contains('''updateNumber.number: must be less than or equal to 50''')
beanC.number == 40
*/
and:
ClassUtils.forName('io.micronaut.validation.validator.$C$Definition', getClass().getClassLoader()).isPresent()
ClassUtils.forName('io.micronaut.validation.validator.$C$Definition$Intercepted', getClass().getClassLoader()).isPresent()
Expand Down

0 comments on commit 9dade34

Please sign in to comment.