Fix enforcer rule for java 7