Fix following FindBugs analysis and Upgrade