Use Jenkins.getInstance() opposed to Hudson.getInstance() as method has been depreciated.