...
Wherever possible common functionality should be placed into an abstract or utility class, as applicable. A good example of this is the AbstractUsernamePasswordAuthenticationHandler, which most classes that use UsernamePasswordCredentials should extend from.
...
Specific Code Conventions
Brackets
All brackets should appear in compact form and are mandatory even for single line statements.
...