Think about it when you review the code yourself. You see something that makes no sense as far as you can see. There are several possibilities:
- The developer did something stupid.
- The developer has done something too smart to be obvious to you.
- The developer did something sensible that no longer makes sense due to changes that have occurred on average.
- The developer has done what still does not make sense, but will happen if a planned change occurs.
In the first case, they must fix it.
In the second case, they must document it.
In the third case, they must change it; this will make a difference, but the code will make more sense and may have little benefit.
In the fourth case, they must document it and either make this change or return from it sooner rather than later.
In any case, you would like to discuss this with them.
The same here, it makes no sense to add a protected element to a private class. I have no idea why you did this, and cannot decide which of the four cases above, but one of them. A warning emphasizes this. Depending on which of the four actions acts, depending on which of the four cases acts.
source share