refactor: Refined field-names of `Message` and `MessageTo`
[demos/kafka/chat] / src / main / java / de / juplo / kafka / chat / backend / api / ChatBackendControllerAdvice.java
index 42f7599..fb9c0f2 100644 (file)
@@ -1,6 +1,6 @@
-package de.juplo.kafka.chatroom.api;
+package de.juplo.kafka.chat.backend.api;
 
-import de.juplo.kafka.chatroom.domain.MessageMutationException;
+import de.juplo.kafka.chat.backend.domain.MessageMutationException;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ProblemDetail;
@@ -13,7 +13,7 @@ import java.util.Date;
 
 
 @ControllerAdvice
-public class ChatroomControllerAdvice
+public class ChatBackendControllerAdvice
 {
   @Value("${server.context-path:/}")
   String contextPath;
@@ -40,7 +40,7 @@ public class ChatroomControllerAdvice
 
     stringBuilder.setLength(0);
     stringBuilder.append("The existing message with user=");
-    stringBuilder.append(e.getExisting().getUser());
+    stringBuilder.append(e.getExisting().getUsername());
     stringBuilder.append(" and id=");
     stringBuilder.append(e.getExisting().getId());
     stringBuilder.append(" cannot be mutated!");