Removed an unnecessary parameter as spotted by copilot code review#116
Merged
Removed an unnecessary parameter as spotted by copilot code review#116
Conversation
Contributor
There was a problem hiding this comment.
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);
rouschr
approved these changes
Jun 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.