diff --git a/components/org.wso2.carbon.identity.organization.discovery.service/src/main/java/org/wso2/carbon/identity/organization/discovery/service/OrganizationDiscoveryManagerImpl.java b/components/org.wso2.carbon.identity.organization.discovery.service/src/main/java/org/wso2/carbon/identity/organization/discovery/service/OrganizationDiscoveryManagerImpl.java index 3c84ca419..683eae41f 100644 --- a/components/org.wso2.carbon.identity.organization.discovery.service/src/main/java/org/wso2/carbon/identity/organization/discovery/service/OrganizationDiscoveryManagerImpl.java +++ b/components/org.wso2.carbon.identity.organization.discovery.service/src/main/java/org/wso2/carbon/identity/organization/discovery/service/OrganizationDiscoveryManagerImpl.java @@ -254,7 +254,7 @@ private void setExpressionNodeList(Node node, List expression) t String operation = expressionNode.getOperation(); if (StringUtils.isNotBlank(attributeValue)) { - if (isFilteringAttributeNotSupported(attributeValue)) { + if (!isFilteringAttributeSupported(attributeValue)) { throw handleClientException(ERROR_CODE_UNSUPPORTED_FILTER_ATTRIBUTE, attributeValue); } if (!SUPPORTED_OPERATIONS.contains(operation)) { @@ -273,8 +273,8 @@ private void setExpressionNodeList(Node node, List expression) t } } - private boolean isFilteringAttributeNotSupported(String attributeValue) { + private boolean isFilteringAttributeSupported(String attributeValue) { - return !attributeValue.equalsIgnoreCase(ORGANIZATION_NAME); + return ORGANIZATION_NAME.equalsIgnoreCase(attributeValue); } }