DATAJPA-1307 - Polishing.

Original pull request: #263.
This commit is contained in:
Oliver Gierke
2018-04-04 12:37:26 +02:00
parent c315544e20
commit f5484a05a4
3 changed files with 8 additions and 8 deletions

View File

@@ -93,9 +93,11 @@ interface DeclaredQuery {
}
/**
* Returns wether the query uses JDBC style parameters, i.e. parameters denoted by a simple ? without any index or name.
* Returns whether the query uses JDBC style parameters, i.e. parameters denoted by a simple ? without any index or
* name.
*
* @return Wether the query uses JDBC style parameters.
* @return Whether the query uses JDBC style parameters.
* @since 2.0.6
*/
boolean usesJdbcStyleParameters();
}

View File

@@ -227,12 +227,10 @@ public class SimpleJpaQueryUnitTests {
// just verifying that it doesn't throw an exception
createJpaQuery(SampleRepository.class.getMethod("legalUseOfJdbcStyleParameters", String.class));
Method illegalMethod = SampleRepository.class.getMethod("illegalUseOfJdbcStyleParameters", String.class);
assertThatExceptionOfType(IllegalArgumentException.class) //
.isThrownBy( //
() -> createJpaQuery( //
SampleRepository.class.getMethod("illegalUseOfJdbcStyleParameters", String.class) //
) //
);
.isThrownBy(() -> createJpaQuery(illegalMethod));
}
private AbstractJpaQuery createJpaQuery(Method method) {

View File

@@ -430,7 +430,7 @@ public class StringQueryUnitTests {
}
}
@Test // DATAJPA
@Test // DATAJPA-1307
public void makesUsageOfJdbcStyleParameterAvailable() {
SoftAssertions softly = new SoftAssertions();