Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

little bit refactoring #3638

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import jakarta.persistence.EntityManager;
import jakarta.persistence.metamodel.ManagedType;

import jakarta.validation.constraints.NotNull;
import org.springframework.data.jpa.repository.JpaContext;
import org.springframework.util.Assert;
import org.springframework.util.LinkedMultiValueMap;
Expand All @@ -42,7 +43,7 @@ public class DefaultJpaContext implements JpaContext {
*
* @param entityManagers must not be {@literal null}.
*/
public DefaultJpaContext(Set<EntityManager> entityManagers) {
public DefaultJpaContext(@NotNull Set<EntityManager> entityManagers) {

Assert.notNull(entityManagers, "EntityManagers must not be null");
Assert.notEmpty(entityManagers, "EntityManagers must not be empty");
Expand All @@ -57,7 +58,7 @@ public DefaultJpaContext(Set<EntityManager> entityManagers) {
}

@Override
public EntityManager getEntityManagerByManagedType(Class<?> type) {
public EntityManager getEntityManagerByManagedType(@NotNull Class<?> type) {

Assert.notNull(type, "Type must not be null");

Expand Down