Skip to content

Unused boolean nativeQuery parameter in checkHasNamedParameter method of StringQueryUnitTests #3827

Closed
@hgh1472

Description

@hgh1472

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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions