From e6bf8d8d5c7ba2f81d220d56b39323cf2e3be4e8 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Mon, 15 Feb 2016 11:46:22 +0100 Subject: [PATCH] SONAR-7316 Use String.intern to store author in ChangeSet --- .../main/java/org/sonar/server/computation/scm/Changeset.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/scm/Changeset.java b/server/sonar-server/src/main/java/org/sonar/server/computation/scm/Changeset.java index 6ab3677e88f..ccdbcb598d3 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/scm/Changeset.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/scm/Changeset.java @@ -65,7 +65,9 @@ public final class Changeset { } public Builder setAuthor(@Nullable String author) { - this.author = author; + // SONAR-7316 + // String.intern() is used in order for same authors to use the same object. + this.author = author != null ? author.intern() : null; return this; } -- 2.39.5