Fixing some SONAR issues, f.ex:
- No more reliance on default encoding
- Using Integer.valueOf() instead of the constructor
- Not catching NPE anymore