DATAJPA-1248 - Polishing.

Removed superfluous	modifiers and throws declarations. Used Collections.singletonList where appropriate.

Original pull request: #245.
This commit is contained in:
Jens Schauder
2018-01-26 10:49:41 +01:00
committed by Oliver Gierke
parent b6c38dd450
commit 547d8791a7
2 changed files with 5 additions and 5 deletions

View File

@@ -67,9 +67,9 @@ public class TupleConverterUnitTests {
@Test // DATAJPA-984
@SuppressWarnings("unchecked")
public void returnsSingleTupleElementIfItMatchesExpectedType() throws Exception {
public void returnsSingleTupleElementIfItMatchesExpectedType() {
doReturn(Arrays.asList(element)).when(tuple).getElements();
doReturn(Collections.singletonList(element)).when(tuple).getElements();
doReturn("Foo").when(tuple).get(element);
TupleConverter converter = new TupleConverter(type);
@@ -79,7 +79,7 @@ public class TupleConverterUnitTests {
@Test // DATAJPA-1024
@SuppressWarnings("unchecked")
public void returnsNullForSingleElementTupleWithNullValue() throws Exception {
public void returnsNullForSingleElementTupleWithNullValue() {
doReturn(Collections.singletonList(element)).when(tuple).getElements();
doReturn(null).when(tuple).get(element);

View File

@@ -517,14 +517,14 @@ public interface UserRepository
@Query("SELECT u FROM User u where u.firstname >= ?1 and u.lastname = '000:1'")
List<User> queryWithIndexedParameterAndColonFollowedByIntegerInString(String firstname);
static interface RolesAndFirstname {
interface RolesAndFirstname {
String getFirstname();
Set<Role> getRoles();
}
static interface NameOnly {
interface NameOnly {
String getFirstname();