Skip to content

Unused boolean nativeQuery parameter in checkHasNamedParameter method of StringQueryUnitTests #3827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hgh1472 opened this issue Apr 4, 2025 · 0 comments
Assignees
Labels
type: task A general task

Comments

@hgh1472
Copy link
Contributor

hgh1472 commented Apr 4, 2025

StringQueryUnitTests.java

	private void checkHasNamedParameter(String query, boolean expected, String label, boolean nativeQuery) {

		List<ParameterBinding> bindings = new ArrayList<>();
		StringQuery.ParameterBindingParser.INSTANCE.parseParameterBindingsOfQueryIntoBindingsAndReturnCleanedQuery(query,
				bindings, new StringQuery.Metadata());

		assertThat(bindings.stream().anyMatch(it -> it.getIdentifier().hasName())) //
				.describedAs(String.format("<%s> (%s)", query, label)) //
				.isEqualTo(expected);
	}

I noticed while reading the test code that the boolean nativeQuery parameter in the checkHasNamedParameter is not being used.

It seems unnecessary in this method. Would it be okay to remove this parameter and update the methods that use it accordingly?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 4, 2025
@mp911de mp911de self-assigned this Apr 7, 2025
@mp911de mp911de added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 7, 2025
@mp911de mp911de added this to the 3.4.5 (2024.1.5) milestone Apr 15, 2025
mp911de pushed a commit that referenced this issue Apr 15, 2025
Remove unnecessary boolean nativeQuery from checkHasNamedParameter of StringQueryUnitTests class.

Signed-off-by: hgh1472 <hgh1472@naver.com>

Closes #3827
Original pull request: #3828
mp911de pushed a commit that referenced this issue Apr 15, 2025
Remove unnecessary boolean nativeQuery from checkHasNamedParameter of StringQueryUnitTests class.

Signed-off-by: hgh1472 <hgh1472@naver.com>

Closes #3827
Original pull request: #3828
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants