private final String author;
private Changeset(Builder builder) {
- this.revision = builder.revision;
- this.author = builder.author;
+ this.revision = builder.revision.intern();
+ this.author = builder.author == null ? null : builder.author.intern();
this.date = builder.date;
}
}
public Builder setAuthor(@Nullable String author) {
- // SONAR-7316
- // String.intern() is used in order for same authors to use the same object.
- this.author = author != null ? author.intern() : null;
+ this.author = author;
return this;
}
}
@Override
- public boolean equals(Object o) {
+ public boolean equals(@Nullable Object o) {
if (this == o) {
return true;
}