mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Remove obsolete synchronized block
This commit is contained in:
parent
beb1492c3e
commit
c075878b2a
1 changed files with 4 additions and 7 deletions
|
@ -129,18 +129,15 @@ public class ASTCache {
|
|||
// no cached AST, but wait
|
||||
if (isActiveElement && isReconciling(tUnit)) {
|
||||
try {
|
||||
final ICElement activeElement= fActiveTU;
|
||||
// Wait for AST
|
||||
if (DEBUG)
|
||||
System.out.println(DEBUG_PREFIX + getThreadName() + "waiting for AST for: " + tUnit.getElementName()); //$NON-NLS-1$
|
||||
fCacheMutex.wait();
|
||||
// Check whether active element is still valid (
|
||||
synchronized (this) {
|
||||
if (activeElement == fActiveTU && fAST != null) {
|
||||
if (DEBUG)
|
||||
System.out.println(DEBUG_PREFIX + getThreadName() + "...got AST for: " + tUnit.getElementName()); //$NON-NLS-1$
|
||||
return fAST;
|
||||
}
|
||||
if (fAST != null) {
|
||||
if (DEBUG)
|
||||
System.out.println(DEBUG_PREFIX + getThreadName() + "...got AST for: " + tUnit.getElementName()); //$NON-NLS-1$
|
||||
return fAST;
|
||||
}
|
||||
// try again
|
||||
continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue