Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-844

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 1.1.0.Final
    • Built-in beans
    • None

            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);
               }
            }
      

              aslak@redhat.com Aslak Knutsen
              aslak@redhat.com Aslak Knutsen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: