[
https://issues.apache.org/jira/browse/BVAL-167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16674789#comment-16674789
]
Romain Manni-Bucau edited comment on BVAL-167 at 11/5/18 9:26 AM:
------------------------------------------------------------------
[~ilgrosso] well first "all works with the reference implementation" does not
help since even the RI has a lot of bugs ;). Now your assumption is right if
you have a linear inheritance which is not the case in syncope cause the
technical abstract class breaks that and create two heads for the leaf
implementation and here the validation rules are competing so yes you can
bypass the @NotNull in the leaf but the abstract class likely requires it. In
other words you have 2 supertypes so both should be aligned to not have a
relaxed version. Once again I'm fine enhancing that impl point.
edit: FYI i sent a mail on the dev@bval list to see how we rework our impl of
Liskov principle, feel free to join if you want to help, it would be appreciated
was (Author: romain.manni-bucau):
[~ilgrosso] well first "all works with the reference implementation" does not
help since even the RI has a lot of bugs ;). Now your assumption is right if
you have a linear inheritance which is not the case in syncope cause the
technical abstract class breaks that and create two heads for the leaf
implementation and here the validation rules are competing so yes you can
bypass the @NotNull in the leaf but the abstract class likely requires it. In
other words you have 2 supertypes so both should be aligned to not have a
relaxed version. Once again I'm fine enhancing that impl point.
> ConstraintDeclarationException: Illegal strengthening: overridden
> [constraints] in inheritance hierarchy
> --------------------------------------------------------------------------------------------------------
>
> Key: BVAL-167
> URL: https://issues.apache.org/jira/browse/BVAL-167
> Project: BVal
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Francesco Chicchiriccò
> Priority: Major
> Fix For: 2.0.1
>
>
> I am trying to upgrade BVal to 2.0.0 in Syncope.
> I have changed my POMs as follows:
> * javax.validation:validation-api from 1.1.0.Final to 2.0.1.Final
> * org.apache.bval:bval-jsr from 1.1.2 to 2.0.0
> When I try to reach up some of the REST services (based on CXF 3.2), an
> [exception|https://paste.apache.org/hxvY] is thrown; I have read about such
> exception, but it seems to me that the mentioned methods in
> [interface|https://github.com/apache/syncope/blob/2_1_X/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java#L70]
> and
> [implementation|https://github.com/apache/syncope/blob/2_1_X/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java#L68]
> should comply with hierarchy rules.
> Nevertheless, if I swap
> org.apache.bval:bval-jsr:2.0.0
> with
> org.hibernate.validator:hibernate-validator:6.0.13.Final
> all is working fine.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)