From 54edeb0559bbfc159a3e61f0ca79a35093f61e67 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 5 Apr 2019 13:39:53 +0400 Subject: [PATCH] #82 fix user abbreviate --- src/main/java/ru/ulstu/user/model/User.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/ru/ulstu/user/model/User.java b/src/main/java/ru/ulstu/user/model/User.java index 089d1c9..06f407b 100644 --- a/src/main/java/ru/ulstu/user/model/User.java +++ b/src/main/java/ru/ulstu/user/model/User.java @@ -24,7 +24,7 @@ import java.util.Set; @Entity @Table(name = "users") public class User extends BaseEntity { - private final static String USER_ABBREVIATE_TEMPLATE = "%s %s %s"; + private final static String USER_ABBREVIATE_TEMPLATE = "%s %s%s"; @NotNull @Pattern(regexp = Constants.LOGIN_REGEX) @@ -192,7 +192,7 @@ public class User extends BaseEntity { public String getUserAbbreviate() { return String.format(USER_ABBREVIATE_TEMPLATE, lastName == null ? "" : lastName, - firstName == null ? "" : firstName.substring(0, 1), - patronymic == null ? "" : patronymic.substring(0, 1)); + firstName == null ? "" : firstName.substring(0, 1) + ".", + patronymic == null ? "" : patronymic.substring(0, 1) + "."); } }