Révision 3840

TXM/trunk/bundles/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java (revision 3840)
1893 1893
		
1894 1894
		// FIXME: less wtf version...
1895 1895
		IPreferencesService service = org.eclipse.core.runtime.Platform.getPreferencesService();
1896
		FileOutputStream output = null;
1896 1897
		try {
1897
			FileOutputStream output = new FileOutputStream(parametersFile);
1898
			output = new FileOutputStream(parametersFile);
1898 1899
			service.exportPreferences((IEclipsePreferences) preferencesRootNode.node(result.getParametersNodePath()), output, null);
1899 1900
			output.close();
1900 1901
		}
1901 1902
		catch (Exception e1) {
1902 1903
			Log.severe(NLS.bind("Error: parameters NOT exported to the {0} file: {1}.", parametersFile, e1));
1903 1904
			e1.printStackTrace();
1905
			if (output !=null) {
1906
				output.close();
1907
			}
1904 1908
			return false;
1905 1909
		}
1906 1910
		return true;

Formats disponibles : Unified diff