DATACMNS-1726 - Polishing of nullability after Lombok removal.
Reviewed visibility modifiers manually introduced constructors previously provided by Lombok. Also some nullability constraints have been accidentally changed by that.
This commit is contained in:
@@ -37,7 +37,6 @@ import org.springframework.web.util.UriComponentsBuilder;
|
||||
* @author Thomas Darimont
|
||||
* @author Nick Williams
|
||||
*/
|
||||
@SuppressWarnings("null")
|
||||
public class HateoasSortHandlerMethodArgumentResolver extends SortHandlerMethodArgumentResolver
|
||||
implements UriComponentsContributor {
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import java.util.Map;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
import org.springframework.core.ResolvableType;
|
||||
import org.springframework.core.annotation.AnnotationUtils;
|
||||
import org.springframework.data.projection.Accessor;
|
||||
@@ -136,7 +135,7 @@ public class JsonProjectingMethodInterceptorFactory implements MethodInterceptor
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Object invoke(@SuppressWarnings("null") MethodInvocation invocation) throws Throwable {
|
||||
public Object invoke(MethodInvocation invocation) throws Throwable {
|
||||
|
||||
Method method = invocation.getMethod();
|
||||
TypeInformation<Object> returnType = ClassTypeInformation.fromReturnTypeOf(method);
|
||||
|
||||
@@ -92,7 +92,6 @@ public class PagedResourcesAssembler<T> implements RepresentationModelAssembler<
|
||||
* @see org.springframework.hateoas.server.RepresentationModelAssembler#toModel(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("null")
|
||||
public PagedModel<EntityModel<T>> toModel(Page<T> entity) {
|
||||
return toModel(entity, EntityModel::of);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ import org.springframework.web.util.UriComponentsBuilder;
|
||||
*/
|
||||
public class PagedResourcesAssemblerArgumentResolver implements HandlerMethodArgumentResolver {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(PagedResourcesAssemblerArgumentResolver.class);
|
||||
private static final Log logger = LogFactory.getLog(PagedResourcesAssemblerArgumentResolver.class);
|
||||
|
||||
private static final String SUPERFLOUS_QUALIFIER = "Found qualified %s parameter, but a unique unqualified %s parameter. Using that one, but you might want to check your controller method configuration!";
|
||||
private static final String PARAMETER_AMBIGUITY = "Discovered multiple parameters of type Pageable but no qualifier annotations to disambiguate!";
|
||||
@@ -152,7 +152,8 @@ public class PagedResourcesAssemblerArgumentResolver implements HandlerMethodArg
|
||||
MethodParameter matchingParameter = returnIfQualifiersMatch(pageableParameter, assemblerQualifier);
|
||||
|
||||
if (matchingParameter == null) {
|
||||
logger.info(LogMessage.format(SUPERFLOUS_QUALIFIER, PagedResourcesAssembler.class.getSimpleName(), Pageable.class.getName()));
|
||||
logger.info(LogMessage.format(SUPERFLOUS_QUALIFIER, PagedResourcesAssembler.class.getSimpleName(),
|
||||
Pageable.class.getName()));
|
||||
}
|
||||
|
||||
return pageableParameter;
|
||||
|
||||
Reference in New Issue
Block a user