private void initialize() { if (!rebuildIndex) { IndexReader indexReader = null; try { indexReader = getIndexReader(); } catch (Exception e) { // ignore, this can happen if the index is corrupt } if (indexReader == null) { rebuildIndex = true; } } maintainIndexJob = new MaintainIndexJob(); dataManager.addListener(this); taskList.addChangeListener(this); repositoryManager.addListener(this); scheduleIndexMaintenance(MaintainIndexType.STARTUP); }