This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-validation-impl.git

commit 8a88dbf221c28c15fb6e5a475aa0537e570b9613
Author: Konrad Windszus <[email protected]>
AuthorDate: Thu Mar 2 14:15:52 2017 +0000

    SLING-6531 fix logic of disabling the validator (was inverted)
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1785142 
13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/models/validation/impl/ModelValidationImpl.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/sling/models/validation/impl/ModelValidationImpl.java
 
b/src/main/java/org/apache/sling/models/validation/impl/ModelValidationImpl.java
index 6f5b9da..ce4d230 100644
--- 
a/src/main/java/org/apache/sling/models/validation/impl/ModelValidationImpl.java
+++ 
b/src/main/java/org/apache/sling/models/validation/impl/ModelValidationImpl.java
@@ -65,7 +65,7 @@ public class ModelValidationImpl implements ModelValidation {
      * Or a {@link InvalidResourceException} in case the given resource (in 
the adaptable) could not be validated through the {@link ModelValidation}.
      */
     public <ModelType> RuntimeException validate(Object adaptable, 
Class<ModelType> modelClass, boolean required) throws ValidationException, 
InvalidModelException {
-        if (!configuration.disabled()) {
+        if (configuration.disabled()) {
             log.debug("Skip validation of model {}, because  validation is 
disabled through the OSGi configuration for ModelValidationConfiguration", 
modelClass);
             return null;
         }

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to