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
Instead of explicitly mentioning/creating ImmutableList every time in Test Helpers while creating Piece. This should be the logic of Piece that is it should copy the passed PieceMove Provider and should not leak reference from the getter method also.
That is:
A parameterized constructor should initialize all the fields performing a deep copy so that data members can’t be modified with an object reference.
Deep Copy of objects should be performed in the getter methods to return a copy rather than returning the actual object reference)
The text was updated successfully, but these errors were encountered:
Instead of explicitly mentioning/creating ImmutableList every time in Test Helpers while creating Piece. This should be the logic of Piece that is it should copy the passed PieceMove Provider and should not leak reference from the getter method also.
That is:
The text was updated successfully, but these errors were encountered: