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

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


DefaultValidatorBean use provided BeanManager to check for the existence of ValidationServices, but look it up via Containers.instance().services...
----------------------------------------------------------------------------------------------------------------------------------------------------

                 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