You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bval.apache.org by "Gerhard Petracek (Jira)" <ji...@apache.org> on 2020/12/09 00:15:00 UTC
[jira] [Comment Edited] (BVAL-184) Support for proxied instances
[ https://issues.apache.org/jira/browse/BVAL-184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246199#comment-17246199 ]
Gerhard Petracek edited comment on BVAL-184 at 12/9/20, 12:14 AM:
------------------------------------------------------------------
[~romain.manni-bucau]
just drop the spi config[1][2] (or its content) and run the tests
it only works for fields in case of the real instance (otherwise you validate the proxy instance), that's the whole point of the InstanceResolver spi (to get the real instance *if* the input is a proxy instance).
[1] https://github.com/os890/cdi-bval-proxy-addon/blob/master/owb/src/main/resources/META-INF/services/org.apache.bval.jsr.resolver.InstanceResolver
[2] https://github.com/os890/cdi-bval-proxy-addon/blob/master/weld/src/main/resources/META-INF/services/org.apache.bval.jsr.resolver.InstanceResolver
was (Author: gpetracek):
[~romain.manni-bucau]
just drop the spi config[1][2] (or its content) and run the tests
[1] https://github.com/os890/cdi-bval-proxy-addon/blob/master/owb/src/main/resources/META-INF/services/org.apache.bval.jsr.resolver.InstanceResolver
[2] https://github.com/os890/cdi-bval-proxy-addon/blob/master/weld/src/main/resources/META-INF/services/org.apache.bval.jsr.resolver.InstanceResolver
> Support for proxied instances
> -----------------------------
>
> Key: BVAL-184
> URL: https://issues.apache.org/jira/browse/BVAL-184
> Project: BVal
> Issue Type: New Feature
> Reporter: Gerhard Petracek
> Assignee: Gerhard Petracek
> Priority: Major
>
> currently org.apache.bval.jsr.util.Proxies just detects the real class, but that means only getters can get annotated.
> with a spi like
> {code}
> public interface InstanceResolver extends Comparable<InstanceResolver> {
> <T> T resolveInstance(T instance);
> //...
> }
> {code}
> it would be possible to create resolvers for external libs (like owb, weld, ...)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)