java: format and style fixes