SonarQube fixes - Declaration using Java collection interfaces rather than implementations.
SonarQube fixes - if/else/for/while/do statements should always use curly braces.
SonarQube fixes - Replace synchronised classes such as StringBuffer.
SonarQube fixes - Tidy types of exceptions thrown.