Skip to content

Commit e5ae29a

Browse files
committed
Fix task id collision
1 parent 99816d6 commit e5ae29a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

shared/src/main/java/ru/ifmo/neerc/task/TaskRegistry.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ public static TaskRegistry getInstance() {
1717
return INSTANCE;
1818
}
1919

20-
private long nextId = 0;
21-
2220
/**
2321
* Hide default constructor.
2422
*/
@@ -46,7 +44,7 @@ private void notifyResetListeners() {
4644
}
4745

4846
private String genId() {
49-
return Long.toString(nextId++);
47+
return UUID.randomUUID().toString();
5048
}
5149

5250
public Task getById(String id) {

0 commit comments

Comments
 (0)