Fix TableBuilder.build() mutating fields #6

Open
opened 2026-06-22 23:17:28 +02:00 by raupy · 0 comments
Owner

TableBuilder.build() sets borderType, headerColor, and borderColor directly on the instance fields. Calling build() twice can produce different results (e.g. colors lost after first call with ANSI disabled).

Fix: use local variables instead of mutating builder state.

TableBuilder.build() sets borderType, headerColor, and borderColor directly on the instance fields. Calling build() twice can produce different results (e.g. colors lost after first call with ANSI disabled). Fix: use local variables instead of mutating builder state.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
raupy/console-utils#6
No description provided.