version 2

I agree with you at a class level. Local variable doesn't have effect outside of their usage which means that the class is still immutable by design.