Small improvement

This commit is contained in:
M66B 2019-09-27 09:51:58 +02:00
parent 17b90fccd8
commit 9e04411d32
1 changed files with 8 additions and 4 deletions

View File

@ -75,12 +75,16 @@ public class EntityAnswer implements Serializable {
if (name != null) {
name = name.trim();
int c = name.lastIndexOf(",");
if (c < 0) {
c = name.lastIndexOf(" ");
if (c < 0) {
first = name;
last = name;
} else {
first = name.substring(c + 1).trim();
last = name.substring(0, c).trim();
first = name.substring(0, c).trim();
last = name.substring(c + 1).trim();
}
} else {
}
}