FileManager newFileManager = initFileManager(stateLocationDir, parentConfiguration.isReadOnly() ? "none" : null); stateFile = newFileManager.lookup(LocationManager.STATE_FILE, true); lazyFile = newFileManager.lookup(LocationManager.LAZY_FILE, true);
FileManager newFileManager = initFileManager(stateLocationDir, "none", true); stateFile = newFileManager.lookup(LocationManager.STATE_FILE, false); lazyFile = newFileManager.lookup(LocationManager.LAZY_FILE, false);
	private File[] findStateFiles() {		if (reinitialize)			return new File[2]; // return null enties to indicate reinitialize		File stateFile = null;		File lazyFile = null;		try {			stateFile = fileManager.lookup(LocationManager.STATE_FILE, false);			lazyFile = fileManager.lookup(LocationManager.LAZY_FILE, false);		} catch (IOException ex) {			if (Debug.DEBUG && Debug.DEBUG_GENERAL) {				Debug.println("Error reading state file " + ex.getMessage()); //$NON-NLS-1$				Debug.printStackTrace(ex);			}		}		//if it does not exist, try to read it from the parent		if (stateFile == null || !stateFile.isFile()) { // NOTE this check is redundant since it			// is done in StateManager, however it			// is more convenient to have it here			Location parentConfiguration = null;			Location currentConfiguration = LocationManager.getConfigurationLocation();			if (currentConfiguration != null && (parentConfiguration = currentConfiguration.getParentLocation()) != null) {				try {					File stateLocationDir = new File(parentConfiguration.getURL().getFile(), FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME);					FileManager newFileManager = initFileManager(stateLocationDir, parentConfiguration.isReadOnly() ? "none" : null); //$NON-NLS-1$);					stateFile = newFileManager.lookup(LocationManager.STATE_FILE, true);					lazyFile = newFileManager.lookup(LocationManager.LAZY_FILE, true);				} catch (IOException ex) {					if (Debug.DEBUG && Debug.DEBUG_GENERAL) {						Debug.println("Error reading state file " + ex.getMessage()); //$NON-NLS-1$						Debug.printStackTrace(ex);					}				}			} else {				try {					//it did not exist in either place, so create it in the original location					stateFile = fileManager.lookup(LocationManager.STATE_FILE, true);					lazyFile = fileManager.lookup(LocationManager.LAZY_FILE, true);				} catch (IOException ex) {					if (Debug.DEBUG && Debug.DEBUG_GENERAL) {						Debug.println("Error reading state file " + ex.getMessage()); //$NON-NLS-1$						Debug.printStackTrace(ex);					}				}			}		}		return new File[] {stateFile, lazyFile};	}