Skip to content

Removed an unnecessary parameter as spotted by copilot code review#116

Merged
rousso merged 2 commits intodevelopfrom
TEDEFO-4370-callable-templates
Jun 2, 2025
Merged

Removed an unnecessary parameter as spotted by copilot code review#116
rousso merged 2 commits intodevelopfrom
TEDEFO-4370-callable-templates

Conversation

@rousso
Copy link
Copy Markdown
Contributor

@rousso rousso commented Jun 2, 2025

No description provided.

@rousso rousso requested a review from rouschr June 2, 2025 09:25
@rousso rousso self-assigned this Jun 2, 2025
@rousso rousso requested a review from Copilot June 2, 2025 09:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes an unnecessary "name" parameter from the renderContextLoop method to simplify its API.

  • Removed the redundant "name" parameter in MarkupGeneratorMock, TemplateInvocation, ContentBlock, and the MarkupGenerator interface.
  • Updated corresponding calls and documentation accordingly.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/test/java/eu/europa/ted/efx/mock/MarkupGeneratorMock.java Removed the unused "name" parameter in the method implementation.
src/main/java/eu/europa/ted/efx/model/templates/TemplateInvocation.java Adjusted the renderContextLoop call to match the new method signature.
src/main/java/eu/europa/ted/efx/model/templates/ContentBlock.java Updated the method call, removing the extra "name" parameter.
src/main/java/eu/europa/ted/efx/interfaces/MarkupGenerator.java Altered the interface and associated JavaDoc to reflect the parameter removal.
Comments suppressed due to low confidence (3)

src/test/java/eu/europa/ted/efx/mock/MarkupGeneratorMock.java:141

  • The removal of the 'name' parameter simplifies the method signature; verify that this change does not affect any logic that previously relied on the parameter.
public Markup renderContextLoop(PathExpression context, final Markup content,

src/main/java/eu/europa/ted/efx/model/templates/TemplateInvocation.java:43

  • Ensure that the removal of the 'name' parameter from the renderContextLoop call maintains the intended behavior, especially if previous logic relied on the fragment identifier.
return markupGenerator.renderContextLoop(this.context.relativePath(), content, arguments);

src/main/java/eu/europa/ted/efx/model/templates/ContentBlock.java:268

  • Double-check that the updated renderContextLoop call without the 'name' parameter continues to work as expected in all usage scenarios.
return markupGenerator.renderContextLoop(this.context.relativePath(), invocation, args);

Comment thread src/main/java/eu/europa/ted/efx/interfaces/MarkupGenerator.java
@rousso rousso merged commit bd9ecb8 into develop Jun 2, 2025
1 check passed
@rousso rousso deleted the TEDEFO-4370-callable-templates branch June 2, 2025 09:36
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.

3 participants