mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
moved off the testFramework, made thread-safe
This commit is contained in:
+5
-3
@@ -17,14 +17,16 @@
|
||||
/*
|
||||
* @author max
|
||||
*/
|
||||
package com.intellij.testFramework;
|
||||
package com.intellij.openapi.vfs.ex.dummy;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public class DummyFileIdGenerator {
|
||||
private static int ourId = Integer.MAX_VALUE / 2;
|
||||
private static final AtomicInteger ourId = new AtomicInteger(Integer.MAX_VALUE / 2);
|
||||
|
||||
private DummyFileIdGenerator() {}
|
||||
|
||||
public static int next() {
|
||||
return ourId++;
|
||||
return ourId.getAndIncrement();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user