Add missing @Nullable annotations on parameters

Issue: SPR-15540
This commit is contained in:
Sebastien Deleuze
2017-05-31 12:37:54 +02:00
parent ad2c0f8410
commit b47d713e14
380 changed files with 1085 additions and 732 deletions

View File

@@ -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;
}
};

View File

@@ -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;
}
}