release 1.9.3

Исправил баг с дефолтным юнитом
This commit is contained in:
upagge 2020-05-04 23:08:44 +03:00
parent 33bdfde706
commit 807341e685
No known key found for this signature in database
GPG Key ID: 15CD012E46F6BA34
2 changed files with 5 additions and 4 deletions

View File

@ -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>

View File

@ -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) {