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
* content to a file.
     * Use the methods <code>load(String)</code> and <code>store(String)</code>
     * to load and store this dialog settings.
     *
     * @param sectionName the name of the section in the settings.
     */
    public DialogSettings(String sectionName) {
        name = sectionName;
        items = new HashMap();
        arrayItems = new HashMap();
        sections = new HashMap();
    }
    /* (non-Javadoc)
     * Method declared on IDialogSettings.
     */
    public IDialogSettings addNewSection(String sectionName) {
        DialogSettings section = new DialogSettings(sectionName);
        addSection(section);
        return section;
    }
    /* (non-Javadoc)
     * Method declared on IDialogSettings.
     */
    public void addSection(IDialogSettings section) {
        sections.put(section.getName(), section);
    }
    /* (non-Javadoc)
     * Method declared on IDialogSettings.
     */
    public String get(String key) {