forked from LogBlock/LogBlock
getExistingEntityTypeId should return Integer instead of int
Fixes #804
This commit is contained in:
@ -16,7 +16,7 @@ public class EntityTypeConverter {
|
||||
private static HashMap<EntityType, Integer> entityTypeToId = new HashMap<>();
|
||||
private static int nextEntityTypeId;
|
||||
|
||||
public synchronized static int getExistingEntityTypeId(EntityType entityType) {
|
||||
public synchronized static Integer getExistingEntityTypeId(EntityType entityType) {
|
||||
return entityType == null ? null : entityTypeToId.get(entityType);
|
||||
}
|
||||
|
||||
|
@ -1043,8 +1043,9 @@ public final class QueryParams implements Cloneable {
|
||||
private Set<Integer> getEntityTypeIds() {
|
||||
HashSet<Integer> typeIds = new HashSet<>();
|
||||
for (EntityType type : entityTypes) {
|
||||
if (type != null) {
|
||||
typeIds.add(EntityTypeConverter.getExistingEntityTypeId(type));
|
||||
Integer id = EntityTypeConverter.getExistingEntityTypeId(type);
|
||||
if (id != null) {
|
||||
typeIds.add(id);
|
||||
}
|
||||
}
|
||||
// add invalid id, so the type list is not ignored
|
||||
|
Reference in New Issue
Block a user