DATACMNS-1777 - Polishing.

Use non-null construction of Optional for non-nullable method arguments.
This commit is contained in:
Mark Paluch
2020-07-28 15:29:36 +02:00
parent 9fbabdc820
commit 45874430d6

View File

@@ -113,7 +113,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
* @param customImplementation
*/
public void setCustomImplementation(Object customImplementation) {
this.customImplementation = Optional.ofNullable(customImplementation);
this.customImplementation = Optional.of(customImplementation);
}
/**
@@ -122,7 +122,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
* @param repositoryFragments
*/
public void setRepositoryFragments(RepositoryFragments repositoryFragments) {
this.repositoryFragments = Optional.ofNullable(repositoryFragments);
this.repositoryFragments = Optional.of(repositoryFragments);
}
/**
@@ -141,7 +141,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
* @param mappingContext
*/
protected void setMappingContext(MappingContext<?, ?> mappingContext) {
this.mappingContext = Optional.ofNullable(mappingContext);
this.mappingContext = Optional.of(mappingContext);
}
/**