release 1.9.3
Исправил баг с дефолтным юнитом
This commit is contained in:
parent
33bdfde706
commit
807341e685
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.sadtech.autoresponder</groupId>
|
||||
<artifactId>autoresponder</artifactId>
|
||||
<version>1.10-SNAPSHOT</version>
|
||||
<version>1.9.3-RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Abstract Autoresponder</name>
|
||||
|
@ -62,8 +62,10 @@ public class AutoResponder<U extends Unit> {
|
||||
} else {
|
||||
unitPointerService.save(new UnitPointer<>(entityId, unitAnswer));
|
||||
}
|
||||
}
|
||||
return answer;
|
||||
} else {
|
||||
return Optional.ofNullable(defaultUnit);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -103,8 +105,7 @@ public class AutoResponder<U extends Unit> {
|
||||
}
|
||||
}
|
||||
}
|
||||
final Optional<U> max = searchUnit.stream().max(UNIT_PRIORITY_COMPARATOR);
|
||||
return max.isPresent() ? max : Optional.ofNullable(defaultUnit);
|
||||
return searchUnit.stream().max(UNIT_PRIORITY_COMPARATOR);
|
||||
}
|
||||
|
||||
private boolean patternReg(@NonNull U unit, String message) {
|
||||
|
Loading…
Reference in New Issue
Block a user