if (layer != null) {
if (layer != null && !alwaysSpawnThread) {
    protected boolean shouldSpawnThreadForPrepare() {        if (layer != null) {            com.bbn.openmap.omGraphics.OMGraphicList list = layer.getList();            if (list != null) {                return layer.getList().size() > graphicCutoff;            }        }        // If we have to create a list, might as well assume that         // is should be done in a new thread.        return true;    }