Skip to content

Remove unused QueryRendererBuilder locals in JPQL and HQL query renderers#4274

Open
jewoodev wants to merge 1 commit into
spring-projects:mainfrom
jewoodev:cleanup-unused-renderer-builders
Open

Remove unused QueryRendererBuilder locals in JPQL and HQL query renderers#4274
jewoodev wants to merge 1 commit into
spring-projects:mainfrom
jewoodev:cleanup-unused-renderer-builders

Conversation

@jewoodev
Copy link
Copy Markdown
Contributor

@jewoodev jewoodev commented Jun 5, 2026

While following up on #4273, I found two leftover QueryRendererBuilder locals that are never used.

This removes the unused builder in JpqlQueryRenderer#visitString_expression and the empty nested builder plus no-op appendInline(nested) in HqlQueryRenderer#visitListaggFunction. Rendering behavior is unchanged.

Verified with the JPQL/HQL/EQL renderer round-trip suites.

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes. — N/A for this behavior-preserving dead-code removal; the existing renderer round-trip suites noted above already exercise both methods and pass unchanged.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

…rers.

JpqlQueryRenderer.visitString_expression declared a QueryRendererBuilder that is never used; the method returns either the subquery group or super.visitString_expression(ctx). HqlQueryRenderer.visitListaggFunction declared a `nested` builder that is never appended to, so the trailing appendInline(nested) is a no-op (appendInline returns early on an empty stream). Both are dead code with no effect on rendering.

Signed-off-by: jewoodev <jewoos15@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants