Skip to content

Commit 5e2e51b

Browse files
committed
DATACMNS-1289 - Polishing.
Original pull request: #280.
1 parent 142c9dd commit 5e2e51b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/main/java/org/springframework/data/repository/core/support/RepositoryFragment.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ static class ImplementedRepositoryFragment<T> implements RepositoryFragment<T> {
161161
private final Optional<Class<T>> interfaceClass;
162162
private final T implementation;
163163

164+
/**
165+
* Creates a new {@link ImplementedRepositoryFragment} for the given interface class and implementation.
166+
*
167+
* @param interfaceClass must not be {@literal null}.
168+
* @param implementation must not be {@literal null}.
169+
*/
164170
public ImplementedRepositoryFragment(Optional<Class<T>> interfaceClass, T implementation) {
165171

166172
Assert.notNull(interfaceClass, "Interface class must not be null!");

src/test/java/org/springframework/data/repository/core/support/RepositoryFragmentUnitTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
*/
2727
public class RepositoryFragmentUnitTests {
2828

29-
@SuppressWarnings("unchecked")
3029
@Test // DATACMNS-1289
30+
@SuppressWarnings("unchecked")
3131
public void fragmentCreationFromUnrelatedTypesShouldFail() {
3232

3333
assertThatThrownBy(() -> RepositoryFragment.implemented((Class) CustomFragment.class, new UnrelatedImpl()))

0 commit comments

Comments
 (0)