Skip to content

Commit

Permalink
format the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
taefi authored May 19, 2022
1 parent 21d6303 commit 5206c5f
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ private void passivateInactiveKeys(Set<String> oldActive,

// Finally clear any passivated items that have now been confirmed
/*
* Due to the implementation of Set#removeAll, if the size of
* newActiveKeyOrder is bigger than oldActive's size, then
* calling oldActive.removeAll(newActiveKeyOrder) would end
* up calling contains for all of newActiveKeyOrder items
* which is a slow operation on lists. The following avoids that:
* Due to the implementation of AbstractSet#removeAll, if the size
* of newActiveKeyOrder is bigger than oldActive's size, then
* calling oldActive.removeAll(newActiveKeyOrder) would end up
* calling contains method for all of newActiveKeyOrder items which
* is a slow operation on lists. The following avoids that:
*/
newActiveKeyOrder.forEach(oldActive::remove);
if (!oldActive.isEmpty()) {
Expand Down

0 comments on commit 5206c5f

Please sign in to comment.