this.dbKey = builder.dbKey;
this.key = MoreObjects.firstNonNull(builder.key, builder.dbKey);
this.name = builder.name;
- this.shortName = MoreObjects.firstNonNull(builder.shortName, builder.name);
+ this.shortName = MoreObjects.firstNonNull(builder.shortName, builder.name).intern();
this.description = builder.description;
this.uuid = builder.uuid;
this.projectAttributes = builder.projectAttributes;
private static FileAttributes createFileAttributes(ScannerReport.Component component) {
checkArgument(component.getType() == ScannerReport.Component.ComponentType.FILE);
checkArgument(component.getLines() > 0, "File '%s' has no line", component.getProjectRelativePath());
+ String lang = trimToNull(component.getLanguage());
return new FileAttributes(
component.getIsTest(),
- trimToNull(component.getLanguage()),
+ lang != null ? lang.intern() : null,
component.getLines());
}
private final String author;
private Changeset(Builder builder) {
- this.revision = builder.revision == null ? null : builder.revision.intern();
- this.author = builder.author == null ? null : builder.author.intern();
+ this.revision = builder.revision;
+ this.author = builder.author;
this.date = builder.date;
}