Github user mike-jumper commented on a diff in the pull request:

    
https://github.com/apache/incubator-guacamole-client/pull/131#discussion_r106829029
  
    --- Diff: 
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java
 ---
    @@ -223,4 +223,36 @@ public int getMaxResults() throws GuacamoleException {
             );
         }
     
    +    /**
    +     * Returns whether or not LDAP aliases will be dereferenced,
    +     * as configured with guacamole.properties.
    +     * By default they will never be dereferenced.
    +     *
    +     * @return
    +     *     An integer representing the status of of alias
    +     *     dereferencing, as configured in guacamole.properties.
    +     *
    +     * @throws GuacamoleException
    +     *     If guacamole.properties cannot be parsed.
    +     */
    +    public int getDereferenceAliases() throws GuacamoleException {
    +        String derefAliases = environment.getProperty(
    +            LDAPGuacamoleProperties.LDAP_DEREFERENCE_ALIASES,
    +            "never"
    --- End diff --
    
    The `derefAliases.equals()` comparisons will also throw a 
`NullPointerException` when `derefAliases` is `null`, which will be the case if 
that property is not specified.
    
    In any case, this and more can be resolved once things are cleaned up and 
migrated to an `enum`. There's an example of this being done elsewhere in the 
LDAP auth, actually. Take a peek at 
[`EncryptionMethodProperty`](https://github.com/apache/incubator-guacamole-client/blob/1a621886c65d5e99ec44841da41d137000a1c9f4/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/EncryptionMethodProperty.java).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to