[weld-issues] [JBoss JIRA] Updated: (WELD-844) DefaultValidatorBean use provided BeanManager to check for the existence of ValidationServices, but look it up via Container.instance().getServices...

Aslak Knutsen (JIRA) jira-events at lists.jboss.org
Mon Jan 31 07:41:39 EST 2011


     [ https://issues.jboss.org/browse/WELD-844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aslak Knutsen updated WELD-844:
-------------------------------

    Summary: DefaultValidatorBean use provided BeanManager to check for the existence of ValidationServices, but look it up via Container.instance().getServices...  (was: DefaultValidatorBean use provided BeanManager to check for the existence of ValidationServices, but look it up via Containers.instance().services...)


> DefaultValidatorBean use provided BeanManager to check for the existence of ValidationServices, but look it up via Container.instance().getServices...
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WELD-844
>                 URL: https://issues.jboss.org/browse/WELD-844
>             Project: Weld
>          Issue Type: Bug
>          Components: Built-in beans
>    Affects Versions: 1.1.0.Final
>            Reporter: Aslak Knutsen
>
> {code}
>       public Validator call() throws Exception
>       {
>          if (getBeanManager().getServices().contains(ValidationServices.class))
>          {
>             // This should probably be getBeanManager().getServices().get(ValidationServices.class).....
>             return Container.instance().services().get(ValidationServices.class).getDefaultValidatorFactory().getValidator();
>          }
>          else
>          {
>             throw new IllegalStateException(VALIDATION_SERVICE_NOT_AVAILABLE);
>          }
>       }
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list