Polishing.
Use Spring's nullability annotations where used as part of API nullability indicators. See #2385
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -86,7 +86,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<version>2.0.1</version>
|
||||
<version>3.0.2</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ package org.springframework.data.auditing.config;
|
||||
|
||||
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.aop.framework.ProxyFactoryBean;
|
||||
import org.springframework.aop.target.LazyInitTargetSource;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
@@ -30,8 +28,10 @@ import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.auditing.AuditingHandler;
|
||||
import org.springframework.data.config.ParsingUtils;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
@@ -73,7 +73,7 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser#getBeanClass(org.w3c.dom.Element)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
protected Class<?> getBeanClass(Element element) {
|
||||
return AuditingHandler.class;
|
||||
|
||||
@@ -19,13 +19,12 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.springframework.data.mapping.Alias;
|
||||
import org.springframework.data.mapping.PersistentEntity;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.util.ClassTypeInformation;
|
||||
import org.springframework.data.util.TypeInformation;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,12 +23,12 @@ import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.joda.time.LocalDateTime;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
@@ -82,7 +82,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public java.time.LocalDateTime convert(LocalDateTime source) {
|
||||
return java.time.LocalDateTime.ofInstant(source.toDate().toInstant(), ZoneId.systemDefault());
|
||||
@@ -94,7 +94,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(LocalDate source) {
|
||||
return source.toDate();
|
||||
@@ -106,7 +106,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(LocalDateTime source) {
|
||||
return source.toDate();
|
||||
@@ -118,7 +118,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(DateTime source) {
|
||||
return source.toDate();
|
||||
@@ -130,7 +130,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalDate convert(Date source) {
|
||||
return new LocalDate(source.getTime());
|
||||
@@ -142,7 +142,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalDateTime convert(Date source) {
|
||||
return new LocalDateTime(source.getTime());
|
||||
@@ -154,7 +154,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public DateTime convert(Date source) {
|
||||
return new DateTime(source.getTime());
|
||||
@@ -167,7 +167,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalDateTime convert(java.time.LocalDateTime source) {
|
||||
return LocalDateTime.fromDateFields(Jsr310Converters.LocalDateTimeToDateConverter.INSTANCE.convert(source));
|
||||
@@ -179,7 +179,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalDateTime convert(java.time.Instant source) {
|
||||
return LocalDateTime.fromDateFields(new Date(source.toEpochMilli()));
|
||||
@@ -191,7 +191,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Instant convert(LocalDateTime source) {
|
||||
return Instant.ofEpochMilli(source.toDateTime().getMillis());
|
||||
@@ -203,7 +203,7 @@ public abstract class JodaTimeConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public DateTime convert(java.time.LocalDateTime source) {
|
||||
return new DateTime(Jsr310Converters.LocalDateTimeToDateConverter.INSTANCE.convert(source));
|
||||
|
||||
@@ -33,8 +33,6 @@ import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.lang.NonNull;
|
||||
|
||||
@@ -93,7 +91,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalDateTime convert(Date source) {
|
||||
return ofInstant(source.toInstant(), systemDefault());
|
||||
@@ -105,7 +103,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(LocalDateTime source) {
|
||||
return Date.from(source.atZone(systemDefault()).toInstant());
|
||||
@@ -117,7 +115,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalDate convert(Date source) {
|
||||
return ofInstant(ofEpochMilli(source.getTime()), systemDefault()).toLocalDate();
|
||||
@@ -129,7 +127,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(LocalDate source) {
|
||||
return Date.from(source.atStartOfDay(systemDefault()).toInstant());
|
||||
@@ -141,7 +139,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalTime convert(Date source) {
|
||||
return ofInstant(ofEpochMilli(source.getTime()), systemDefault()).toLocalTime();
|
||||
@@ -153,7 +151,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(LocalTime source) {
|
||||
return Date.from(source.atDate(LocalDate.now()).atZone(systemDefault()).toInstant());
|
||||
@@ -165,7 +163,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Instant convert(Date source) {
|
||||
return source.toInstant();
|
||||
@@ -177,7 +175,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(Instant source) {
|
||||
return Date.from(source);
|
||||
@@ -189,7 +187,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Instant convert(LocalDateTime source) {
|
||||
return source.atZone(systemDefault()).toInstant();
|
||||
@@ -201,7 +199,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalDateTime convert(Instant source) {
|
||||
return LocalDateTime.ofInstant(source, systemDefault());
|
||||
@@ -213,7 +211,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public String convert(ZoneId source) {
|
||||
return source.toString();
|
||||
@@ -225,7 +223,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public ZoneId convert(String source) {
|
||||
return ZoneId.of(source);
|
||||
@@ -237,7 +235,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public String convert(Duration duration) {
|
||||
return duration.toString();
|
||||
@@ -249,7 +247,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Duration convert(String s) {
|
||||
return Duration.parse(s);
|
||||
@@ -261,7 +259,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public String convert(Period period) {
|
||||
return period.toString();
|
||||
@@ -273,7 +271,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Period convert(String s) {
|
||||
return Period.parse(s);
|
||||
|
||||
@@ -27,10 +27,10 @@ import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
import org.threeten.bp.Instant;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.LocalDateTime;
|
||||
@@ -107,7 +107,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public java.time.LocalDateTime convert(LocalDateTime source) {
|
||||
|
||||
@@ -122,7 +122,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalDateTime convert(Date source) {
|
||||
return ofInstant(toInstant(source), systemDefault());
|
||||
@@ -134,7 +134,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(LocalDateTime source) {
|
||||
return toDate(source.atZone(systemDefault()).toInstant());
|
||||
@@ -146,7 +146,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalDate convert(Date source) {
|
||||
return ofInstant(ofEpochMilli(source.getTime()), systemDefault()).toLocalDate();
|
||||
@@ -158,7 +158,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(LocalDate source) {
|
||||
return toDate(source.atStartOfDay(systemDefault()).toInstant());
|
||||
@@ -170,7 +170,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalTime convert(Date source) {
|
||||
return ofInstant(ofEpochMilli(source.getTime()), systemDefault()).toLocalTime();
|
||||
@@ -182,7 +182,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(LocalTime source) {
|
||||
return toDate(source.atDate(LocalDate.now()).atZone(systemDefault()).toInstant());
|
||||
@@ -194,7 +194,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Instant convert(Date source) {
|
||||
return toInstant(source);
|
||||
@@ -206,7 +206,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Date convert(Instant source) {
|
||||
return toDate(source.atZone(systemDefault()).toInstant());
|
||||
@@ -218,7 +218,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public java.time.Instant convert(LocalDateTime source) {
|
||||
return java.time.Instant.ofEpochMilli(source.atZone(ZoneOffset.systemDefault()).toInstant().toEpochMilli());
|
||||
@@ -230,7 +230,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public LocalDateTime convert(java.time.Instant source) {
|
||||
return LocalDateTime.ofInstant(Instant.ofEpochMilli(source.toEpochMilli()), ZoneOffset.systemDefault());
|
||||
@@ -243,7 +243,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public String convert(ZoneId source) {
|
||||
return source.toString();
|
||||
@@ -256,7 +256,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public ZoneId convert(String source) {
|
||||
return ZoneId.of(source);
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
*/
|
||||
package org.springframework.data.convert;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.springframework.data.mapping.Alias;
|
||||
import org.springframework.data.util.TypeInformation;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Interface to abstract the mapping from a type alias to the actual type.
|
||||
|
||||
@@ -17,9 +17,8 @@ package org.springframework.data.crossstore;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Interface representing the set of changes in an entity.
|
||||
|
||||
@@ -17,13 +17,13 @@ package org.springframework.data.domain.jaxb;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.jaxb.SpringDataJaxb.PageRequestDto;
|
||||
import org.springframework.data.domain.jaxb.SpringDataJaxb.SortDto;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
@@ -60,7 +60,7 @@ class PageableAdapter extends XmlAdapter<PageRequestDto, Pageable> {
|
||||
* (non-Javadoc)
|
||||
* @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Pageable unmarshal(@Nullable PageRequestDto v) {
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
*/
|
||||
package org.springframework.data.domain.jaxb;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.jaxb.SpringDataJaxb.SortDto;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
@@ -53,7 +53,7 @@ public class SortAdapter extends XmlAdapter<SortDto, Sort> {
|
||||
* (non-Javadoc)
|
||||
* @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Sort unmarshal(@Nullable SortDto source) {
|
||||
return source == null ? Sort.unsorted() : Sort.by(SpringDataJaxb.unmarshal(source.orders, OrderAdapter.INSTANCE));
|
||||
|
||||
@@ -18,12 +18,11 @@ package org.springframework.data.geo.format;
|
||||
import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.core.convert.converter.GenericConverter.ConvertiblePair;
|
||||
import org.springframework.data.geo.Point;
|
||||
import org.springframework.format.Formatter;
|
||||
import org.springframework.lang.NonNull;
|
||||
|
||||
/**
|
||||
* Converter to parse two comma-separated doubles into a {@link Point}.
|
||||
@@ -42,7 +41,7 @@ public enum PointFormatter implements Converter<String, Point>, Formatter<Point>
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Point convert(String source) {
|
||||
|
||||
|
||||
@@ -18,11 +18,10 @@ package org.springframework.data.projection;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
|
||||
@@ -23,16 +23,16 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
import org.springframework.core.CollectionFactory;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.data.util.ClassTypeInformation;
|
||||
import org.springframework.data.util.NullableWrapper;
|
||||
import org.springframework.data.util.NullableWrapperConverters;
|
||||
import org.springframework.data.util.TypeInformation;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
@@ -67,7 +67,7 @@ class ProjectingMethodInterceptor implements MethodInterceptor {
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Object invoke(@SuppressWarnings("null") @Nonnull MethodInvocation invocation) throws Throwable {
|
||||
public Object invoke(@SuppressWarnings("null") @NonNull MethodInvocation invocation) throws Throwable {
|
||||
|
||||
TypeInformation<?> type = ClassTypeInformation.fromReturnTypeOf(invocation.getMethod());
|
||||
TypeInformation<?> resultType = type;
|
||||
|
||||
@@ -26,8 +26,6 @@ import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.beans.factory.support.BeanNameGenerator;
|
||||
@@ -45,6 +43,7 @@ import org.springframework.core.type.filter.RegexPatternTypeFilter;
|
||||
import org.springframework.core.type.filter.TypeFilter;
|
||||
import org.springframework.data.config.ConfigurationUtils;
|
||||
import org.springframework.data.util.Streamable;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
@@ -185,7 +184,7 @@ public class AnnotationRepositoryConfigurationSource extends RepositoryConfigura
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationSource#getSource()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
public Object getSource() {
|
||||
return configMetadata;
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@ package org.springframework.data.repository.config;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.config.PropertiesFactoryBean;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
@@ -27,8 +25,10 @@ import org.springframework.beans.factory.xml.BeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.repository.core.NamedQueries;
|
||||
import org.springframework.data.repository.core.support.PropertiesBasedNamedQueries;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
@@ -56,7 +56,7 @@ public class NamedQueriesBeanDefinitionParser implements BeanDefinitionParser {
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.BeanDefinitionParser#parse(org.w3c.dom.Element, org.springframework.beans.factory.xml.ParserContext)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
public BeanDefinition parse(Element element, ParserContext parserContext) {
|
||||
|
||||
BeanDefinitionBuilder properties = BeanDefinitionBuilder.rootBeanDefinition(PropertiesFactoryBean.class);
|
||||
|
||||
@@ -17,8 +17,6 @@ package org.springframework.data.repository.config;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.beans.factory.support.BeanNameGenerator;
|
||||
@@ -29,6 +27,7 @@ import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.core.type.AnnotationMetadata;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -39,8 +38,8 @@ import org.springframework.util.Assert;
|
||||
public abstract class RepositoryBeanDefinitionRegistrarSupport
|
||||
implements ImportBeanDefinitionRegistrar, ResourceLoaderAware, EnvironmentAware {
|
||||
|
||||
private @SuppressWarnings("null") @Nonnull ResourceLoader resourceLoader;
|
||||
private @SuppressWarnings("null") @Nonnull Environment environment;
|
||||
private @SuppressWarnings("null") @NonNull ResourceLoader resourceLoader;
|
||||
private @SuppressWarnings("null") @NonNull Environment environment;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -20,8 +20,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
@@ -36,6 +34,7 @@ import org.springframework.data.repository.NoRepositoryBean;
|
||||
import org.springframework.data.repository.Repository;
|
||||
import org.springframework.data.repository.RepositoryDefinition;
|
||||
import org.springframework.data.repository.util.ClassUtils;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -136,7 +135,7 @@ class RepositoryComponentProvider extends ClassPathScanningCandidateComponentPro
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider#getRegistry()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
protected BeanDefinitionRegistry getRegistry() {
|
||||
return registry;
|
||||
|
||||
@@ -25,10 +25,9 @@ import java.util.Set;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
@@ -39,6 +38,7 @@ import org.springframework.core.log.LogMessage;
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.data.repository.core.RepositoryMetadata;
|
||||
import org.springframework.data.repository.core.support.AbstractRepositoryMetadata;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
|
||||
@@ -17,14 +17,14 @@ package org.springframework.data.repository.config;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.BeanDefinitionParser;
|
||||
import org.springframework.data.repository.init.Jackson2RepositoryPopulatorFactoryBean;
|
||||
import org.springframework.data.repository.init.UnmarshallerRepositoryPopulatorFactoryBean;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ public class ResourceReaderRepositoryPopulatorBeanDefinitionParser extends Abstr
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser#getBeanClassName(org.w3c.dom.Element)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
protected String getBeanClassName(Element element) {
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
@@ -44,6 +42,7 @@ import org.springframework.data.repository.query.QueryLookupStrategy.Key;
|
||||
import org.springframework.data.repository.query.QueryMethod;
|
||||
import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider;
|
||||
import org.springframework.data.util.Lazy;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -266,7 +265,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.FactoryBean#getObject()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
public T getObject() {
|
||||
return this.repository.get();
|
||||
}
|
||||
@@ -275,7 +274,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
public Class<? extends T> getObjectType() {
|
||||
return repositoryInterface;
|
||||
}
|
||||
|
||||
@@ -18,14 +18,13 @@ package org.springframework.data.repository.core.support;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.BeanFactoryAware;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.data.repository.core.support.RepositoryComposition.RepositoryFragments;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -84,7 +83,7 @@ public class RepositoryFragmentsFactoryBean<T>
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.FactoryBean#getObject()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public RepositoryFragments getObject() throws Exception {
|
||||
return this.repositoryFragments;
|
||||
@@ -94,7 +93,7 @@ public class RepositoryFragmentsFactoryBean<T>
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<?> getObjectType() {
|
||||
return RepositoryComposition.class;
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
*/
|
||||
package org.springframework.data.repository.core.support;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.repository.init;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.beans.factory.config.AbstractFactoryBean;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@@ -25,6 +23,7 @@ import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.data.repository.support.Repositories;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -66,7 +65,7 @@ public abstract class AbstractRepositoryPopulatorFactoryBean
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.config.AbstractFactoryBean#getObjectType()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<?> getObjectType() {
|
||||
return ResourceReaderRepositoryPopulator.class;
|
||||
|
||||
@@ -15,11 +15,10 @@
|
||||
*/
|
||||
package org.springframework.data.repository.init;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.data.repository.support.Repositories;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,12 +24,11 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.data.mapping.PreferredConstructor;
|
||||
import org.springframework.data.mapping.model.PreferredConstructorDiscoverer;
|
||||
import org.springframework.data.projection.ProjectionFactory;
|
||||
import org.springframework.data.projection.ProjectionInformation;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
@@ -258,7 +257,7 @@ public abstract class ReturnedType {
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.ResultFactory.ReturnedType#getTypeToRead()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
public Class<?> getTypeToRead() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
@@ -31,6 +29,7 @@ import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.data.repository.core.EntityInformation;
|
||||
import org.springframework.data.repository.core.RepositoryInformation;
|
||||
import org.springframework.data.util.Lazy;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -69,7 +68,7 @@ public class DomainClassConverter<T extends ConversionService & ConverterRegistr
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.GenericConverter#getConvertibleTypes()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Set<ConvertiblePair> getConvertibleTypes() {
|
||||
return Collections.singleton(new ConvertiblePair(Object.class, Object.class));
|
||||
@@ -148,7 +147,7 @@ public class DomainClassConverter<T extends ConversionService & ConverterRegistr
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.GenericConverter#getConvertibleTypes()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Set<ConvertiblePair> getConvertibleTypes() {
|
||||
return Collections.singleton(new ConvertiblePair(Object.class, Object.class));
|
||||
@@ -230,7 +229,7 @@ public class DomainClassConverter<T extends ConversionService & ConverterRegistr
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.GenericConverter#getConvertibleTypes()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Set<ConvertiblePair> getConvertibleTypes() {
|
||||
return Collections.singleton(new ConvertiblePair(Object.class, Object.class));
|
||||
|
||||
@@ -30,9 +30,8 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.reactivestreams.Publisher;
|
||||
|
||||
import org.springframework.core.ReactiveAdapter;
|
||||
import org.springframework.core.ReactiveAdapterRegistry;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
@@ -44,6 +43,7 @@ import org.springframework.core.convert.support.ConfigurableConversionService;
|
||||
import org.springframework.core.convert.support.GenericConversionService;
|
||||
import org.springframework.data.repository.util.ReactiveWrappers.ReactiveLibrary;
|
||||
import org.springframework.data.util.TypeInformation;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
@@ -541,7 +541,7 @@ public abstract class ReactiveWrapperConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Flux<?> convert(Publisher<?> source) {
|
||||
return Flux.from(source);
|
||||
@@ -558,7 +558,7 @@ public abstract class ReactiveWrapperConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Mono<?> convert(Publisher<?> source) {
|
||||
return Mono.from(source);
|
||||
@@ -579,7 +579,7 @@ public abstract class ReactiveWrapperConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Flow<?> convert(Publisher<?> source) {
|
||||
return ReactiveFlowKt.asFlow(source);
|
||||
|
||||
@@ -26,12 +26,11 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.core.convert.TypeDescriptor;
|
||||
import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.repository.util.QueryExecutionConverters.WrapperType;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
@@ -55,7 +54,7 @@ class VavrCollections {
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Object convert(Object source) {
|
||||
|
||||
@@ -83,7 +82,7 @@ class VavrCollections {
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.GenericConverter#getConvertibleTypes()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public java.util.Set<ConvertiblePair> getConvertibleTypes() {
|
||||
return CONVERTIBLE_PAIRS;
|
||||
|
||||
@@ -17,11 +17,10 @@ package org.springframework.data.util;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.ListableBeanFactory;
|
||||
import org.springframework.beans.factory.NoUniqueBeanDefinitionException;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.lang.reflect.Array;
|
||||
import java.lang.reflect.GenericArrayType;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import org.springframework.lang.NonNull;
|
||||
|
||||
/**
|
||||
* Special {@link TypeDiscoverer} handling {@link GenericArrayType}s.
|
||||
@@ -58,7 +58,7 @@ class GenericArrayTypeInformation<S> extends ParentTypeAwareTypeInformation<S> {
|
||||
* @see org.springframework.data.util.TypeDiscoverer#doGetComponentType()
|
||||
*/
|
||||
@Override
|
||||
@Nonnull
|
||||
@NonNull
|
||||
protected TypeInformation<?> doGetComponentType() {
|
||||
|
||||
Type componentType = type.getGenericComponentType();
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
*/
|
||||
package org.springframework.data.web;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.web.util.UriComponents;
|
||||
|
||||
@@ -53,7 +52,7 @@ class MethodParameterAwarePagedResourcesAssembler<T> extends PagedResourcesAssem
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.web.PagedResourcesAssembler#getMethodParameter()
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
protected MethodParameter getMethodParameter() {
|
||||
return parameter;
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
*/
|
||||
package org.springframework.data.web;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.support.WebDataBinderFactory;
|
||||
@@ -48,7 +47,7 @@ public interface PageableArgumentResolver extends HandlerMethodArgumentResolver
|
||||
* @param binderFactory a factory for creating {@link WebDataBinder} instances
|
||||
* @return the resolved argument value.
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
Pageable resolveArgument(MethodParameter parameter, @Nullable ModelAndViewContainer mavContainer,
|
||||
NativeWebRequest webRequest, @Nullable WebDataBinderFactory binderFactory);
|
||||
|
||||
@@ -18,10 +18,9 @@ package org.springframework.data.web;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.log.LogMessage;
|
||||
@@ -29,6 +28,7 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.hateoas.server.MethodLinkBuilderFactory;
|
||||
import org.springframework.hateoas.server.core.MethodParameters;
|
||||
import org.springframework.hateoas.server.mvc.WebMvcLinkBuilderFactory;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.web.bind.support.WebDataBinderFactory;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
@@ -91,7 +91,7 @@ public class PagedResourcesAssemblerArgumentResolver implements HandlerMethodArg
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.web.method.support.HandlerMethodArgumentResolver#resolveArgument(org.springframework.core.MethodParameter, org.springframework.web.method.support.ModelAndViewContainer, org.springframework.web.context.request.NativeWebRequest, org.springframework.web.bind.support.WebDataBinderFactory)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Object resolveArgument(MethodParameter parameter, @Nullable ModelAndViewContainer mavContainer,
|
||||
NativeWebRequest webRequest, @Nullable WebDataBinderFactory binderFactory) {
|
||||
|
||||
@@ -15,12 +15,11 @@
|
||||
*/
|
||||
package org.springframework.data.web;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.reactive.BindingContext;
|
||||
@@ -74,7 +73,7 @@ public class ReactivePageableHandlerMethodArgumentResolver extends PageableHandl
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.web.reactive.result.method.SyncHandlerMethodArgumentResolver#resolveArgumentValue(org.springframework.core.MethodParameter, org.springframework.web.reactive.BindingContext, org.springframework.web.server.ServerWebExchange)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Pageable resolveArgumentValue(MethodParameter parameter, BindingContext bindingContext,
|
||||
ServerWebExchange exchange) {
|
||||
|
||||
@@ -17,10 +17,9 @@ package org.springframework.data.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.reactive.BindingContext;
|
||||
import org.springframework.web.reactive.result.method.HandlerMethodArgumentResolver;
|
||||
@@ -50,7 +49,7 @@ public class ReactiveSortHandlerMethodArgumentResolver extends SortHandlerMethod
|
||||
*(non-Javadoc)
|
||||
* @see org.springframework.web.reactive.result.method.SyncHandlerMethodArgumentResolver#resolveArgumentValue(org.springframework.core.MethodParameter, org.springframework.web.reactive.BindingContext, org.springframework.web.server.ServerWebExchange)
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
public Sort resolveArgumentValue(MethodParameter parameter, BindingContext bindingContext,
|
||||
ServerWebExchange exchange) {
|
||||
|
||||
@@ -15,11 +15,10 @@
|
||||
*/
|
||||
package org.springframework.data.web;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.support.WebDataBinderFactory;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
@@ -48,7 +47,7 @@ public interface SortArgumentResolver extends HandlerMethodArgumentResolver {
|
||||
* @param binderFactory a factory for creating {@link WebDataBinder} instances
|
||||
* @return the resolved argument value, or {@code null}
|
||||
*/
|
||||
@Nonnull
|
||||
@NonNull
|
||||
@Override
|
||||
Sort resolveArgument(MethodParameter parameter, @Nullable ModelAndViewContainer mavContainer,
|
||||
NativeWebRequest webRequest, @Nullable WebDataBinderFactory binderFactory);
|
||||
|
||||
@@ -17,10 +17,9 @@ package org.springframework.data.web;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.support.WebDataBinderFactory;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.data.web;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.springframework.core.ResolvableType;
|
||||
@@ -30,8 +29,10 @@ import org.springframework.http.converter.AbstractHttpMessageConverter;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.HttpMessageNotReadableException;
|
||||
import org.springframework.http.converter.HttpMessageNotWritableException;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ConcurrentReferenceHashMap;
|
||||
|
||||
import org.xml.sax.SAXParseException;
|
||||
import org.xmlbeam.XBProjector;
|
||||
import org.xmlbeam.config.DefaultXMLFactoriesConfig;
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.springframework.data.repository.core.support;
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -28,6 +25,8 @@ import org.junit.jupiter.api.Test;
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
import org.springframework.data.repository.Repository;
|
||||
import org.springframework.data.repository.core.RepositoryInformation;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
||||
/**
|
||||
@@ -83,7 +82,7 @@ class RepositoryFactoryBeanSupportUnitTests {
|
||||
.addRepositoryProxyPostProcessor((factory, repositoryInformation) -> factory.addAdvice(new MethodInterceptor() {
|
||||
@Nullable
|
||||
@Override
|
||||
public Object invoke(@Nonnull MethodInvocation invocation) {
|
||||
public Object invoke(@NonNull MethodInvocation invocation) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
})));
|
||||
|
||||
Reference in New Issue
Block a user