Add missing @Nullable annotations on parameters
Issue: SPR-15540
This commit is contained in:
@@ -27,6 +27,7 @@ import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.orm.jpa.JpaTransactionManager;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
@@ -69,7 +70,7 @@ public class PersistenceContextTransactionTests {
|
||||
@SuppressWarnings("serial")
|
||||
PersistenceAnnotationBeanPostProcessor pabpp = new PersistenceAnnotationBeanPostProcessor() {
|
||||
@Override
|
||||
protected EntityManagerFactory findEntityManagerFactory(String unitName, String requestingBeanName) {
|
||||
protected EntityManagerFactory findEntityManagerFactory(@Nullable String unitName, String requestingBeanName) {
|
||||
return factory;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.orm.jpa.AbstractEntityManagerFactoryBeanTests;
|
||||
import org.springframework.orm.jpa.DefaultJpaDialect;
|
||||
import org.springframework.orm.jpa.EntityManagerFactoryInfo;
|
||||
@@ -697,7 +698,7 @@ public class PersistenceInjectionTests extends AbstractEntityManagerFactoryBeanT
|
||||
private static class MockPersistenceAnnotationBeanPostProcessor extends PersistenceAnnotationBeanPostProcessor {
|
||||
|
||||
@Override
|
||||
protected EntityManagerFactory findEntityManagerFactory(String emfName, String requestingBeanName) {
|
||||
protected EntityManagerFactory findEntityManagerFactory(@Nullable String emfName, String requestingBeanName) {
|
||||
return mockEmf;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user