Skip to main content Link Search Menu Expand Document (external link)

CollectorMutability

WARNING

FragileCode

View source code on GitHub

Summary

Avoid Collectors.to{List,Map,Set} in favour of alternatives that emphasize (im)mutability

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("CollectorMutability") to the enclosing element.

Disable this pattern completely by adding -Xep:CollectorMutability:OFF as compiler argument. Learn more.


Copyright © 2017-2023 Picnic Technologies BV