mike-jumper commented on code in PR #783:
URL: https://github.com/apache/guacamole-client/pull/783#discussion_r1059114444


##########
guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryObjectTranslator.java:
##########
@@ -145,8 +145,8 @@ public Map<String, String> 
filterAttributes(Collection<Form> schema,
                 String attributeValue = attributes.get(attributeName);
 
                 // Include attribute value within filtered map only if
-                // (1) defined and (2) present within provided map
-                if (attributeValue != null)
+                // present within provided map
+                if (attributes.containsKey(attributeName))

Review Comment:
   Suggest `attributeValue != null || attributes.containsKey(attributeName)` to 
avoid the double lookup except where necessary.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to