package com.staticbloc.jobs;

import android.content.Context;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public abstract class BasicPersistentJobQueue extends BasicJobQueue {
    private ExecutorService executor = Executors.newSingleThreadExecutor();

    BasicPersistentJobQueue(Context context, JobQueueInitializer initializer) {
        super(context, initializer);
    }

    protected ExecutorService getPersistenceExecutor() {
        return executor;
    }

    @Override
    protected abstract void onLoadPersistedData();

    @Override
    protected abstract void onPersistJobAdded(JobQueueItem job);

    @Override
    protected abstract void onPersistJobRemoved(JobQueueItem job);

    @Override
    protected abstract void onPersistAllJobsCanceled();

    @Override
    protected abstract void onPersistJobModified(JobQueueItem job);
}

@@ -251,46 +251,8 @@
 utor
- = Executors.newSingleThreadExecutor()
 ;%0A%0A 
@@ -427,24 +427,125 @@
 xecutor() %7B%0A
+        if(executor == null) %7B%0A            executor = Executors.newSingleThreadExecutor();%0A        %7D%0A
         retu

Fix an NPE with the persistence executor.