Polish for Exception message punctuation cleanup.

Closes #2603.
This commit is contained in:
John Blum
2022-06-07 11:39:44 -07:00
parent 6a23723f07
commit 8721ab4170
226 changed files with 762 additions and 764 deletions

View File

@@ -100,7 +100,7 @@ public class HateoasPageableHandlerMethodArgumentResolver extends PageableHandle
@Override
public void enhance(UriComponentsBuilder builder, @Nullable MethodParameter parameter, Object value) {
Assert.notNull(builder, "UriComponentsBuilder must not be null!");
Assert.notNull(builder, "UriComponentsBuilder must not be null");
if (!(value instanceof Pageable pageable)) {
return;

View File

@@ -84,8 +84,8 @@ public class JsonProjectingMethodInterceptorFactory implements MethodInterceptor
*/
public JsonProjectingMethodInterceptorFactory(JsonProvider jsonProvider, MappingProvider mappingProvider) {
Assert.notNull(jsonProvider, "JsonProvider must not be null!");
Assert.notNull(mappingProvider, "MappingProvider must not be null!");
Assert.notNull(jsonProvider, "JsonProvider must not be null");
Assert.notNull(mappingProvider, "MappingProvider must not be null");
Configuration configuration = Configuration.builder()//
.options(Option.ALWAYS_RETURN_LIST) //

View File

@@ -171,7 +171,7 @@ class MapDataBinder extends WebDataBinder {
if (typeDescriptor == null) {
throw new IllegalStateException(
String.format("Couldn't obtain type descriptor for method parameter %s!", methodParameter));
String.format("Couldn't obtain type descriptor for method parameter %s", methodParameter));
}
value = conversionService.convert(value, TypeDescriptor.forObject(value), typeDescriptor);
@@ -227,8 +227,8 @@ class MapDataBinder extends WebDataBinder {
*/
public PropertyTraversingMapAccessor(Class<?> type, ConversionService conversionService) {
Assert.notNull(type, "Type must not be null!");
Assert.notNull(conversionService, "ConversionService must not be null!");
Assert.notNull(type, "Type must not be null");
Assert.notNull(conversionService, "ConversionService must not be null");
this.type = type;
this.conversionService = conversionService;

View File

@@ -44,7 +44,7 @@ class MethodParameterAwarePagedResourcesAssembler<T> extends PagedResourcesAssem
super(resolver, baseUri);
Assert.notNull(parameter, "Method parameter must not be null!");
Assert.notNull(parameter, "Method parameter must not be null");
this.parameter = parameter;
}

View File

@@ -43,7 +43,7 @@ import org.springframework.util.StringUtils;
*/
public abstract class PageableHandlerMethodArgumentResolverSupport {
private static final String INVALID_DEFAULT_PAGE_SIZE = "Invalid default page size configured for method %s! Must not be less than one!";
private static final String INVALID_DEFAULT_PAGE_SIZE = "Invalid default page size configured for method %s; Must not be less than one";
private static final String DEFAULT_PAGE_PARAMETER = "page";
private static final String DEFAULT_SIZE_PARAMETER = "size";
@@ -71,7 +71,7 @@ public abstract class PageableHandlerMethodArgumentResolverSupport {
*/
public void setFallbackPageable(Pageable fallbackPageable) {
Assert.notNull(fallbackPageable, "Fallback Pageable must not be null!");
Assert.notNull(fallbackPageable, "Fallback Pageable must not be null");
this.fallbackPageable = fallbackPageable;
}
@@ -113,7 +113,7 @@ public abstract class PageableHandlerMethodArgumentResolverSupport {
*/
public void setPageParameterName(String pageParameterName) {
Assert.hasText(pageParameterName, "Page parameter name must not be null or empty!");
Assert.hasText(pageParameterName, "Page parameter name must not be null or empty");
this.pageParameterName = pageParameterName;
}
@@ -133,7 +133,7 @@ public abstract class PageableHandlerMethodArgumentResolverSupport {
*/
public void setSizeParameterName(String sizeParameterName) {
Assert.hasText(sizeParameterName, "Size parameter name must not be null or empty!");
Assert.hasText(sizeParameterName, "Size parameter name must not be null or empty");
this.sizeParameterName = sizeParameterName;
}

View File

@@ -131,7 +131,7 @@ public class PagedResourcesAssembler<T> implements RepresentationModelAssembler<
public <R extends RepresentationModel<?>> PagedModel<R> toModel(Page<T> page,
RepresentationModelAssembler<T, R> assembler, Link link) {
Assert.notNull(link, "Link must not be null!");
Assert.notNull(link, "Link must not be null");
return createModel(page, assembler, Optional.of(link));
}
@@ -163,10 +163,10 @@ public class PagedResourcesAssembler<T> implements RepresentationModelAssembler<
private PagedModel<?> toEmptyModel(Page<?> page, Class<?> type, Optional<Link> link) {
Assert.notNull(page, "Page must not be null!");
Assert.isTrue(!page.hasContent(), "Page must not have any content!");
Assert.notNull(type, "Type must not be null!");
Assert.notNull(link, "Link must not be null!");
Assert.notNull(page, "Page must not be null");
Assert.isTrue(!page.hasContent(), "Page must not have any content");
Assert.notNull(type, "Type must not be null");
Assert.notNull(link, "Link must not be null");
PageMetadata metadata = asPageMetadata(page);
@@ -187,9 +187,9 @@ public class PagedResourcesAssembler<T> implements RepresentationModelAssembler<
protected <R extends RepresentationModel<?>, S> PagedModel<R> createPagedModel(List<R> resources,
PageMetadata metadata, Page<S> page) {
Assert.notNull(resources, "Content resources must not be null!");
Assert.notNull(metadata, "PageMetadata must not be null!");
Assert.notNull(page, "Page must not be null!");
Assert.notNull(resources, "Content resources must not be null");
Assert.notNull(metadata, "PageMetadata must not be null");
Assert.notNull(page, "Page must not be null");
return PagedModel.of(resources, metadata);
}
@@ -197,8 +197,8 @@ public class PagedResourcesAssembler<T> implements RepresentationModelAssembler<
private <S, R extends RepresentationModel<?>> PagedModel<R> createModel(Page<S> page,
RepresentationModelAssembler<S, R> assembler, Optional<Link> link) {
Assert.notNull(page, "Page must not be null!");
Assert.notNull(assembler, "ResourceAssembler must not be null!");
Assert.notNull(page, "Page must not be null");
Assert.notNull(assembler, "ResourceAssembler must not be null");
List<R> resources = new ArrayList<>(page.getNumberOfElements());
@@ -292,7 +292,7 @@ public class PagedResourcesAssembler<T> implements RepresentationModelAssembler<
*/
private PageMetadata asPageMetadata(Page<?> page) {
Assert.notNull(page, "Page must not be null!");
Assert.notNull(page, "Page must not be null");
int number = pageableResolver.isOneIndexedParameters() ? page.getNumber() + 1 : page.getNumber();

View File

@@ -47,8 +47,8 @@ public class PagedResourcesAssemblerArgumentResolver implements HandlerMethodArg
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!";
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";
private final HateoasPageableHandlerMethodArgumentResolver resolver;

View File

@@ -82,7 +82,7 @@ public class ProjectingJackson2HttpMessageConverter extends MappingJackson2HttpM
*/
private static SpelAwareProxyProjectionFactory initProjectionFactory(ObjectMapper mapper) {
Assert.notNull(mapper, "ObjectMapper must not be null!");
Assert.notNull(mapper, "ObjectMapper must not be null");
SpelAwareProxyProjectionFactory projectionFactory = new SpelAwareProxyProjectionFactory();
projectionFactory.registerMethodInvokerFactory(new JsonProjectingMethodInterceptorFactory(

View File

@@ -55,7 +55,7 @@ public class ReactivePageableHandlerMethodArgumentResolver extends PageableHandl
*/
public ReactivePageableHandlerMethodArgumentResolver(ReactiveSortHandlerMethodArgumentResolver sortResolver) {
Assert.notNull(sortResolver, "ReactiveSortHandlerMethodArgumentResolver must not be null!");
Assert.notNull(sortResolver, "ReactiveSortHandlerMethodArgumentResolver must not be null");
this.sortResolver = sortResolver;
}

View File

@@ -64,7 +64,7 @@ public abstract class SortHandlerMethodArgumentResolverSupport {
*/
public void setSortParameter(String sortParameter) {
Assert.hasText(sortParameter, "SortParameter must not be null nor empty!");
Assert.hasText(sortParameter, "SortParameter must not be null nor empty");
this.sortParameter = sortParameter;
}
@@ -76,7 +76,7 @@ public abstract class SortHandlerMethodArgumentResolverSupport {
*/
public void setPropertyDelimiter(String propertyDelimiter) {
Assert.hasText(propertyDelimiter, "Property delimiter must not be null or empty!");
Assert.hasText(propertyDelimiter, "Property delimiter must not be null or empty");
this.propertyDelimiter = propertyDelimiter;
}
@@ -126,7 +126,7 @@ public abstract class SortHandlerMethodArgumentResolverSupport {
if (annotatedDefault != null && annotatedDefaults != null) {
throw new IllegalArgumentException(
String.format("Cannot use both @%s and @%s on parameter %s! Move %s into %s to define sorting order",
String.format("Cannot use both @%s and @%s on parameter %s; Move %s into %s to define sorting order",
SORT_DEFAULTS_NAME, SORT_DEFAULT_NAME, parameter.toString(), SORT_DEFAULT_NAME, SORT_DEFAULTS_NAME));
}
@@ -310,7 +310,7 @@ public abstract class SortHandlerMethodArgumentResolverSupport {
*/
ExpressionBuilder(Direction direction) {
Assert.notNull(direction, "Direction must not be null!");
Assert.notNull(direction, "Direction must not be null");
this.direction = direction;
}

View File

@@ -148,7 +148,7 @@ abstract class SpringDataAnnotationUtils {
if (null == qualifier) {
throw new IllegalStateException(
"Ambiguous Pageable arguments in handler method. If you use multiple parameters of type Pageable you need to qualify them with @Qualifier");
"Ambiguous Pageable arguments in handler method; If you use multiple parameters of type Pageable you need to qualify them with @Qualifier");
}
if (values.contains(qualifier.value())) {

View File

@@ -82,7 +82,7 @@ public class XmlBeamHttpMessageConverter extends AbstractHttpMessageConverter<Ob
super(MediaType.APPLICATION_XML, MediaType.parseMediaType("application/*+xml"));
Assert.notNull(projector, "XBProjector must not be null!");
Assert.notNull(projector, "XBProjector must not be null");
this.projectionFactory = projector;
}

View File

@@ -70,8 +70,8 @@ public class SpringDataWebConfiguration implements WebMvcConfigurer, BeanClassLo
public SpringDataWebConfiguration(ApplicationContext context,
@Qualifier("mvcConversionService") ObjectFactory<ConversionService> conversionService) {
Assert.notNull(context, "ApplicationContext must not be null!");
Assert.notNull(conversionService, "ConversionService must not be null!");
Assert.notNull(context, "ApplicationContext must not be null");
Assert.notNull(conversionService, "ConversionService must not be null");
this.context = context;