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
return result.toString();
    	}
    	private static String getReplacement(char c) {
    		
    		
    		
			
    		switch (c) {
    			case '<' :
    				return "lt"; 
    			case '>' :
    				return "gt"; 
    			case '"' :
    				return "quot"; 
    			case '\'' :
    				return "apos"; 
    			case '&' :
    				return "amp"; 
    			case '\r':
					return "#x0D"; 
				case '\n':
					return "#x0A"; 
				case '\u0009':
					return "#x09"; 
    		}
    		return null;
    	}
    }
}