Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -18,9 +18,9 @@ public class IdProvider {
private final Map<Object, Long> ids = new IdentityHashMap<Object, Long>();

public synchronized long getId(Object object) {
long id = ids.getOrDefault(object, (long) -1);
Long id = ids.get(object);

if (id == -1) {
if (id == null) {
id = nextId++;
ids.put(object, id);
}

0 comments on commit e1e88a7

Please sign in to comment.