fix for issue JENKINS-12800
https://issues.jenkins-ci.org/browse/JENKINS-12800
updating to jenkins 1.509
change for use enums
Merge pull request #22 from heyzooi/master

fix for issue JENKINS-12800