Bug 204790 [Workbench] lock on .metadata/.lock is never released
Build ID: 3.3 Steps To Reproduce: 1. Debug eclipse, 1 breakpoint in basiclocation:lock 2. 2nd breakpoint in basiclocation:release 3. During the entire run only the lock call is reached. More information: The lock should be released at the end of the Eclipse session.
bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java
IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH,
                    IStatus.ERROR,
                    e.getMessage() == null ? "" : e.getMessage(),  
                    e));
            return null;
        }
    }
    /**
     * Write the version of the metadata into a known file overwriting any
     * existing file contents. Writing the version file isn't really crucial,
     * so the function is silent about failure
     */
    private static void writeWorkspaceVersion() {
        Location instanceLoc = Platform.getInstanceLocation();
        if (instanceLoc == null || instanceLoc.isReadOnly()) {
			return;
		}
        File versionFile = getVersionFile(instanceLoc.getURL(), true);
        if (versionFile == null) {
			return;
		}
        OutputStream output = null;
        try {
            String versionLine = WORKSPACE_VERSION_KEY + '='
                    + WORKSPACE_VERSION_VALUE;
            output = new FileOutputStream(versionFile);
            output.write(versionLine.getBytes("UTF-8")); 
        } catch (IOException e) {
            IDEWorkbenchPlugin.log("Could not write version file", 
                    StatusUtil.newStatus(IStatus.ERROR, e.getMessage(), e));