You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
We are using Guava Immutable objects in our project, and from SpotBugs 4.3.0 we have SpotBugs failures EI_EXPOSE_REP and EI_EXPOSE_REP2 when directly setting/retrieving class fields as Immutable objects.
results in an EI_EXPOSE_REP2 failure from this.overrides = overrides.
This failure is incorrect because the object being passed in and set for the class field is shallowly immutable. What can be done to fix these failures? I'm hoping we don't need to completely exclude EI_EXPOSE_REP and EI_EXPOSE_REP2, or annotate everywhere we do something like this.
The text was updated successfully, but these errors were encountered:
Thank you for your report, I will add ImmutableMap & co. to the list of immutable objects. (Unfortunately I cannot assign this bug to myself since I am not yet an official project member.)
We are using Guava Immutable objects in our project, and from SpotBugs 4.3.0 we have SpotBugs failures EI_EXPOSE_REP and EI_EXPOSE_REP2 when directly setting/retrieving class fields as Immutable objects.
For example:
results in an EI_EXPOSE_REP2 failure from
this.overrides = overrides
.This failure is incorrect because the object being passed in and set for the class field is shallowly immutable. What can be done to fix these failures? I'm hoping we don't need to completely exclude EI_EXPOSE_REP and EI_EXPOSE_REP2, or annotate everywhere we do something like this.
The text was updated successfully, but these errors were encountered: