More refactoring for permission writing in Java constructor