Maxi Contierimaximilianocontieri.comยทJun 29, 2024Code Smell 256 - Mutable GettersTL;DR: Don't expose your internals and lose control Problems Mutability Unexpected Changes Ripple Effects Thread unsafety Encapsulation Principle violation Solutions Return shallow copies of your collections Context Immutable objects are es...30 readsCode Smellscode smell Add a thoughtful commentNo comments yetBe the first to start the conversation.