I am using java.lang.SuppressWarnings in Android Studio.
I can not get rid of this:
EI_EXPOSE_REP2: May expose internal representation by incorporating reference to mutable object (findbugs task)
This happens using the installation method.
How to get rid of this warning?
public class PropertyDetailDocumentStorageModel implements Parcelable { @SerializedName("picture") private byte[] mPicture; public void setmPicture(byte[] mPicture) { this.mPicture = mPicture; }
A warning:
setmPicture(byte[]) may expose internal representation by storing an externally mutable object into PropertyDetailDocumentStorageModel.mPicture
Note that this happens in a single field whose type is byte[] . Other fields in the same class that getters do not generate this warning.
source share