Fixed a NullPointerException (a null bean name) in case the custom task has a task via its class attribute. Extracted part of the logic and added comments for readability.
Merge pull request #4 from opwvhk42/master

SpringApplicationContextInjector threw a NPE for a <task class="..."/> (i.e. with a null bean reference)