Example usage for javax.naming.directory NoSuchAttributeException NoSuchAttributeException

List of usage examples for javax.naming.directory NoSuchAttributeException NoSuchAttributeException

Introduction

In this page you can find the example usage for javax.naming.directory NoSuchAttributeException NoSuchAttributeException.

Prototype

public NoSuchAttributeException(String explanation) 

Source Link

Document

Constructs a new instance of NoSuchAttributeException using an explanation.

Usage

From source file:com.redhat.lightblue.rest.auth.jboss.CertLdapLoginModule.java

private void validateEnvironment(String certificatePrincipal) throws NamingException {
    if (StringUtils.isNotBlank(environment)) {
        String location = getLDAPAttribute(certificatePrincipal, LOCATION);

        if (!StringUtils.equals(environment, location)) {
            throw new NoSuchAttributeException(
                    "Location from certificate does not match configured environment");
        }/*from   ww  w  .  j a v  a2 s .com*/
    }
}