Update ResourceWorkQueue.java

fix for NullPointerException
Merge pull request #10 from twester/patch-1

Update ResourceWorkQueue.java