Exception for "direct access to non-public field"?

I sometimes use private inner classes whose fields I do not encapsulate at all, e.g.
private static class Levels {
private int level;
private int fieldLevel;
private int methodLevel;
In the outer class the inspection triggers when I access access any field.

What do you think: Does this justify an option in the inspection?
Or maybe the inspection should just nerver trigger in this case: It also never triggers if an inner class accesses private members or the outer class, so why handle the opposite case differently?

Please sign in to leave a comment.