Bug 284265 [JFace] DialogSettings.save() silently ignores IOException
Build ID: M20090211-1700 (Problem still in HEAD) STEPS TO REPRODUCE Call DialogSettings.save() on a Writer that produced a IOException or with a file which causes trouble during output (e.g. full drive). EXPECTED The original exception thrown by the underlying output should be propagated to the caller -- as "save() throws IOException" suggests. ACTUAL The IOException is silently ignored. ANALYSIS The internal DialogSettings.XMLWriter is based in a java.io.PrintWriter, which catches all IOExceptions.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
public XMLWriter(OutputStream output) throws UnsupportedEncodingException {
    		super(new OutputStreamWriter(output, "UTF8")); 
    		tab = 0;
    		println(XML_VERSION);
    	}
    	/**
    	 * Create a new XMLWriter
    	 * @param output the write to used when writing to
    	 */
    	public XMLWriter(Writer output) {
    		super(output);
    		tab = 0;
    		println(XML_VERSION);
    	}
    	/**
    	 * write the intended end tag
    	 * @param name the name of the tag to end
    	 */
    	public void endTag(String name) {
    		tab--;
    		printTag("/" + name, null, false); 
    	}
    	private void printTabulation() {
    		for (int i = 0; i < tab; i++) {
				super.print('\t');
			}
    	}
    	/**
    	 * write the tag to the stream and format it by itending it and add new line after the tag
    	 * @param name the name of the tag