Skip to content

refactor: convert log calls to parameterized logging in DDK builder/generator/UI#1307

Merged
joaodinissf merged 1 commit into
dsldevkit:masterfrom
joaodinissf:chore/pmd-guard-log/ddk-builder-gen-ui
May 18, 2026
Merged

refactor: convert log calls to parameterized logging in DDK builder/generator/UI#1307
joaodinissf merged 1 commit into
dsldevkit:masterfrom
joaodinissf:chore/pmd-guard-log/ddk-builder-gen-ui

Conversation

@joaodinissf
Copy link
Copy Markdown
Collaborator

@joaodinissf joaodinissf commented Apr 6, 2026

Replaces string concatenation, NLS.bind, and MessageFormat.format in LOGGER.x(...) calls with parameterized {} placeholders, using Supplier/method-refs for lazy argument evaluation. Adds org.apache.logging.log4j.util to OSGi manifests for the Supplier import, consolidating with the existing Import-Package directive (each affected manifest had a duplicate Import-Package: header that this fixes). Drops the dead org.apache.log4j (Log4j 1) import from xtext.builder's manifest — no source references it. Modules touched: xtext.builder, xtext.generator, xtext.ui.

🤖 Generated with Claude Code

@joaodinissf joaodinissf force-pushed the chore/pmd-guard-log/ddk-builder-gen-ui branch from 0cfcee8 to 43d0eaf Compare April 6, 2026 20:42
@joaodinissf joaodinissf force-pushed the chore/pmd-guard-log/ddk-builder-gen-ui branch 2 times, most recently from 8ee2bf9 to a3348d5 Compare April 20, 2026 08:21
…enerator/UI

Replaces string concatenation, `NLS.bind`, and `MessageFormat.format` in `LOGGER.x(...)` calls with parameterized `{}` placeholders, using `Supplier`/method-refs for lazy argument evaluation. Adds `org.apache.logging.log4j.util` to OSGi manifests for the `Supplier` import, consolidating with the existing `Import-Package` directive (each affected manifest had a duplicate `Import-Package:` header that this fixes). Drops the dead `org.apache.log4j` (Log4j 1) import from `xtext.builder`'s manifest — no source references it. Modules touched: `xtext.builder`, `xtext.generator`, `xtext.ui`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@joaodinissf joaodinissf force-pushed the chore/pmd-guard-log/ddk-builder-gen-ui branch from a3348d5 to 1d43e47 Compare May 6, 2026 23:52
@joaodinissf joaodinissf marked this pull request as ready for review May 6, 2026 23:52
LOGGER.debug("Starting " + type.name() + " build:" + "\ndeleted(" + toBeBuilt.getToBeDeleted().size() + ")=" + toBeBuilt.getToBeDeleted().toString()
+ "\nupdated(" + toBeBuilt.getToBeUpdated().size() + ")=" + toBeBuilt.getToBeUpdated().toString());
}
LOGGER.debug("Starting {} build:\ndeleted({})={}\nupdated({})={}", type::name, // NOPMD GuardLogStatement - all args are Suppliers
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not quite correct, we are calling getters here, however, I do not think it matters much in this case because these getters do not do object allocation.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, that's right. Going ahead since these are lightweight.

@joaodinissf joaodinissf merged commit be79c22 into dsldevkit:master May 18, 2026
4 checks passed
@joaodinissf joaodinissf deleted the chore/pmd-guard-log/ddk-builder-gen-ui branch May 18, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants