Is this code block really necessary here? Isn't it enough to just have this logic in the `setHash()` method.