]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7316 Use String.intern to store author in ChangeSet
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 15 Feb 2016 10:46:22 +0000 (11:46 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 24 Feb 2016 14:46:22 +0000 (15:46 +0100)
server/sonar-server/src/main/java/org/sonar/server/computation/scm/Changeset.java

index 6ab3677e88f35eb49b14c483ff5394c84335b98f..ccdbcb598d37929cd67f11f824019d8def578783 100644 (file)
@@ -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;
     }