mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
[findbugs] Fixed a minor issues
Change-Id: I5b7be71d6f66eaf40ebe460f0da75fb853833405 Signed-off-by: Dennis Huebner <dennis.huebner@itemis.de>
This commit is contained in:
parent
e77154d709
commit
5354a5e12b
1 changed files with 5 additions and 4 deletions
|
@ -14,6 +14,7 @@ import java.util.Collections;
|
|||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
import org.eclipse.emf.common.notify.NotificationChain;
|
||||
|
@ -49,28 +50,28 @@ public class XtextResourceSet extends ResourceSetImpl {
|
|||
return Collections.unmodifiableMap(normalizationMap);
|
||||
}
|
||||
|
||||
private volatile int outdatedStamp = 0;
|
||||
private volatile AtomicInteger outdatedStamp = new AtomicInteger(0);
|
||||
private volatile int modificationStamp = 0;
|
||||
|
||||
/**
|
||||
* @since 2.8
|
||||
*/
|
||||
public void markOutdated() {
|
||||
this.outdatedStamp++;
|
||||
this.outdatedStamp.incrementAndGet();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.8
|
||||
*/
|
||||
public void markSynced() {
|
||||
this.modificationStamp = outdatedStamp;
|
||||
this.modificationStamp = outdatedStamp.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.8
|
||||
*/
|
||||
public boolean isOutdated() {
|
||||
return outdatedStamp != modificationStamp;
|
||||
return outdatedStamp.get() != modificationStamp;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue