package ru.nsu.ccfit.bogush.message.types;

import ru.nsu.ccfit.bogush.User;
import ru.nsu.ccfit.bogush.message.Message;
import ru.nsu.ccfit.bogush.message.MessageHandler;

public class TextMessage implements Message {
	private User author;
	private String text;

	public TextMessage(User author, String text) {
		this.author = author;
		this.text = text;
	}

	public User getAuthor() {
		return author;
	}

	public String getText() {
		return text;
	}

	public String getVerboseText() {
		return text.replaceAll("\\p{C}", "[]");
	}

	@Override
	public void handleBy(MessageHandler handler) {
		handler.handle(this);
	}

	@Override
	public String toString() {
		return new StringBuilder()
				.append("[")
				.append(getAuthor())
				.append(": \"")
				.append(getVerboseText())
				.append("\"]")
				.toString();
	}
}

@@ -666,57 +666,18 @@
 urn 
-new StringBuilder()%0A%09%09%09%09.append(
 %22%5B%22
-)
+ +
 %0A%09%09%09%09
-.append(
 getA
@@ -687,42 +687,28 @@
 or()
-)
+ +
 %0A%09%09%09%09
-.append(
 %22: %5C%22%22
-)
+ +
 %0A%09%09%09%09
-.append(
 getV
@@ -723,44 +723,20 @@
 xt()
-)
+ +
 %0A%09%09%09%09
-.append(%22%5C%22%5D%22)%0A%09%09%09%09.toString()
+%22%5C%22%5D%22
 ;%0A%09%7D

Replace string builder with string concatenation