1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-02 22:05:44 +02:00

Remove obsolete synchronized block

This commit is contained in:
Anton Leherbauer 2007-03-21 15:02:39 +00:00
parent beb1492c3e
commit c075878b2a

View file

@ -129,19 +129,16 @@ public class ASTCache {
// no cached AST, but wait // no cached AST, but wait
if (isActiveElement && isReconciling(tUnit)) { if (isActiveElement && isReconciling(tUnit)) {
try { try {
final ICElement activeElement= fActiveTU;
// Wait for AST // Wait for AST
if (DEBUG) if (DEBUG)
System.out.println(DEBUG_PREFIX + getThreadName() + "waiting for AST for: " + tUnit.getElementName()); //$NON-NLS-1$ System.out.println(DEBUG_PREFIX + getThreadName() + "waiting for AST for: " + tUnit.getElementName()); //$NON-NLS-1$
fCacheMutex.wait(); fCacheMutex.wait();
// Check whether active element is still valid ( // Check whether active element is still valid (
synchronized (this) { if (fAST != null) {
if (activeElement == fActiveTU && fAST != null) {
if (DEBUG) if (DEBUG)
System.out.println(DEBUG_PREFIX + getThreadName() + "...got AST for: " + tUnit.getElementName()); //$NON-NLS-1$ System.out.println(DEBUG_PREFIX + getThreadName() + "...got AST for: " + tUnit.getElementName()); //$NON-NLS-1$
return fAST; return fAST;
} }
}
// try again // try again
continue; continue;
} catch (InterruptedException e) { } catch (InterruptedException e) {