jmuehlner commented on code in PR #753:
URL: https://github.com/apache/guacamole-client/pull/753#discussion_r948245722
##########
extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClient.java:
##########
@@ -236,12 +270,20 @@ private void validateCache() throws GuacamoleException {
cachedRecordsByHost.clear();
// Clear cache of login-based records
- cachedAmbiguousUsernames.clear();
- cachedRecordsByUsername.clear();
+ cachedAmbiguousUsers.clear();
+ cachedRecordsByUser.clear();
- // Store all records, sorting each into host-based and login-based
- // buckets
- records.forEach(record -> {
+ // Clear cache of domain-based records
+ cachedAmbiguousDomains.clear();
+ cachedRecordsByDomain.clear();
+
+ // Store all records, sorting each into host-based, login-based,
+ // and domain-based buckets
+ Iterator<KeeperRecord> recordIterator = records.iterator();
+ while(recordIterator.hasNext()) {
+
+ // Go through records one at a time
+ KeeperRecord record = recordIterator.next();
Review Comment:
Because it can now throw a `GuacamoleException`, and you can't have a java
lambda that throws a checked exception. My level of frustration with the whole
java lambda ecosystem is quite high right now.
--
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]