private static void writeWorkspaceVersion(){
  if (WORKSPACE_CHECK_REFERENCE_BUNDLE_VERSION == null) {
    return;
  }
  final Location instanceLoc=Platform.getInstanceLocation();
  if (instanceLoc == null || instanceLoc.isReadOnly()) {
    return;
  }
  final File versionFile=getVersionFile(instanceLoc.getURL(),true);
  if (versionFile == null) {
    return;
  }
  OutputStream output=null;
  try {
    output=new FileOutputStream(versionFile);
    final Properties props=new Properties();
    props.setProperty(WORKSPACE_CHECK_REFERENCE_BUNDLE_NAME,WORKSPACE_CHECK_REFERENCE_BUNDLE_VERSION.toString());
    props.setProperty(WORKSPACE_CHECK_REFERENCE_BUNDLE_NAME_LEGACY,WORKSPACE_CHECK_LEGACY_VERSION_INCREMENTED);
    props.store(output,null);
  }
 catch (  final IOException e) {
    IDEWorkbenchPlugin.log("Could not write version file",StatusUtil.newStatus(IStatus.ERROR,e.getMessage(),e));
  }
 finally {
    try {
      if (output != null) {
        output.close();
      }
    }
 catch (    final IOException e) {
    }
  }
}

private static void writeWorkspaceVersion ( ) { if ( WORKSPACE_CHECK_REFERENCE_BUNDLE_VERSION == null ) { return ; } final Location instanceLoc = Platform . getInstanceLocation ( ) ; if ( instanceLoc == null || instanceLoc . isReadOnly ( ) ) { return ; } final File versionFile = getVersionFile ( instanceLoc . getURL ( ) , true ) ; if ( versionFile == null ) { return ; } OutputStream output = null ; try { output = new FileOutputStream ( versionFile ) ; final Properties props = new Properties ( ) ; props . setProperty ( WORKSPACE_CHECK_REFERENCE_BUNDLE_NAME , WORKSPACE_CHECK_REFERENCE_BUNDLE_VERSION . toString ( ) ) ; props . setProperty ( WORKSPACE_CHECK_REFERENCE_BUNDLE_NAME_LEGACY , WORKSPACE_CHECK_LEGACY_VERSION_INCREMENTED ) ; props . store ( output , null ) ; } catch ( final IOException e ) { IDEWorkbenchPlugin . log ( "Could not write version file" , StatusUtil . newStatus ( IStatus . ERROR , e . getMessage ( ) , e ) ) ; } finally { try { if ( output != null ) { output . close ( ) ; } } catch ( final IOException e ) { } } }
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
