File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
main/java/org/springframework/data/repository/core/support
test/java/org/springframework/data/repository/core/support Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,12 @@ static class ImplementedRepositoryFragment<T> implements RepositoryFragment<T> {
161
161
private final Optional <Class <T >> interfaceClass ;
162
162
private final T implementation ;
163
163
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
+ */
164
170
public ImplementedRepositoryFragment (Optional <Class <T >> interfaceClass , T implementation ) {
165
171
166
172
Assert .notNull (interfaceClass , "Interface class must not be null!" );
Original file line number Diff line number Diff line change 26
26
*/
27
27
public class RepositoryFragmentUnitTests {
28
28
29
- @ SuppressWarnings ("unchecked" )
30
29
@ Test // DATACMNS-1289
30
+ @ SuppressWarnings ("unchecked" )
31
31
public void fragmentCreationFromUnrelatedTypesShouldFail () {
32
32
33
33
assertThatThrownBy (() -> RepositoryFragment .implemented ((Class ) CustomFragment .class , new UnrelatedImpl ()))
You can’t perform that action at this time.
0 commit comments