### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java,v retrieving revision 1.28.4.1 diff -u -r1.28.4.1 ASTRewriteFormatter.java --- dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java 7 Jul 2011 17:31:50 -0000 1.28.4.1 +++ dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java 25 Jul 2011 19:00:23 -0000 @@ -16,9 +16,11 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; import java.util.Map; import org.eclipse.core.runtime.Assert; +import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.ToolFactory; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.Annotation; @@ -132,12 +134,11 @@ this.placeholders= placeholders; this.eventStore= eventStore; - this.options= options; - if (options != null) { - this.options.put( + this.options= options == null ? JavaCore.getOptions() : (Map) new HashMap(options); + this.options.put( DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_RESOURCES_IN_TRY, DefaultCodeFormatterConstants.createAlignmentValue(true, DefaultCodeFormatterConstants.WRAP_NEXT_PER_LINE, DefaultCodeFormatterConstants.INDENT_DEFAULT)); - } + this.lineDelimiter= lineDelimiter; this.tabWidth= IndentManipulation.getTabWidth(options);