Bug 290805: [quick fix] BadLocationException (race condition with preview calculation)
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
index c9c6ece..5549f6c 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -259,7 +259,7 @@
* @return returns the change for this proposal.
* @throws CoreException thrown when the change could not be created
*/
- public final Change getChange() throws CoreException {
+ public synchronized final Change getChange() throws CoreException {
if (fChange == null) {
fChange= createChange();
}