Sonar Updates #2

Use curly brackets always.
Remove unnecessary parenthesis.
Do not trail comments.
When 'else if' can be used, use it rather than 'else' followed
immediately by 'if'.
Replace stringBuffer with stringBuilder
Add missing overrides
Do not set instance variable in a return statement, set prior to then
return instance.
Prevent synthetic access.
in finally, do null check outside of try/catch
Do not set variables passed into method.
Use isEmpty rather than size checks

Use faster isEmpty checks rather than size comparisons as collection has
already done that by this point.
Avoid synthetic access (use defaults)
Do not trail comments
Use curly brackets
Removed unused code that had suppress 'unused' as it was definitely not
used even in the notation there plus it caused a potential memory leak.
Add missing overrides.
Use interface for lists

Use Deque interface for LinkedList.