コンストラクタを使うように修正

This commit is contained in:
r-ca 2023-12-16 16:22:31 +09:00
parent 95dafdebe5
commit 5f6d4df5b2
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -52,11 +52,7 @@ public class DocumentImpl implements Document{
List<TagEntity> tagEntities = database.tagDao().findByIds(documentEntity.tagIds);
ArrayList<DocumentTag> documentTags = new ArrayList<>();
for (TagEntity tagEntity : tagEntities) {
DocumentTag documentTag = new DocumentTag();
documentTag.setId(tagEntity.id);
documentTag.setName(tagEntity.tagName);
documentTag.setColor(tagEntity.color);
documentTags.add(documentTag);
documentTags.add(new DocumentTag(tagEntity.id, tagEntity.tagName, tagEntity.color));
}
// パス取得