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

@@ -54,7 +54,7 @@ public class HidingClassLoader extends ShadowingClassLoader {
*/
public static HidingClassLoader hide(Class<?>... packages) {
Assert.notNull(packages, "Packages must not be null!");
Assert.notNull(packages, "Packages must not be null");
return new HidingClassLoader(Arrays.stream(packages)//
.map(it -> it.getPackage().getName())//

View File

@@ -117,7 +117,7 @@ class PropertyPathUnitTests {
try {
PropertyPath.from("usersMame", Bar.class);
fail("Expected PropertyReferenceException!");
fail("Expected PropertyReferenceException");
} catch (PropertyReferenceException e) {
assertThat(e.getPropertyName()).isEqualTo("mame");
assertThat(e.getBaseProperty()).isEqualTo(PropertyPath.from("users", Bar.class));

View File

@@ -377,7 +377,7 @@ class AbstractMappingContextUnitTests {
}
if (found != expected) {
fail(String.format("%s to find persistent entity for %s!", expected ? "Expected" : "Did not expect", type));
fail(String.format("%s to find persistent entity for %s", expected ? "Expected" : "Did not expect", type));
}
}

View File

@@ -260,7 +260,7 @@ public class AbstractPersistentPropertyUnitTests {
() -> Optionals.mapIfAllPresent(field, descriptor, (left, right) -> Property.of(typeInformation, left, right)), //
() -> field.map(it -> Property.of(typeInformation, it)), //
() -> descriptor.map(it -> Property.of(typeInformation, it))) //
.orElseThrow(() -> new IllegalArgumentException(String.format("Couldn't find property %s on %s!", name, type)));
.orElseThrow(() -> new IllegalArgumentException(String.format("Couldn't find property %s on %s", name, type)));
return new SamplePersistentProperty(property, getEntity(type), typeHolder);
}

View File

@@ -115,7 +115,7 @@ public class AnnotationBasedPersistentPropertyUnitTests<P extends AnnotationBase
try {
context.getPersistentEntity(InvalidSample.class);
fail("Expected MappingException!");
fail("Expected MappingException");
} catch (MappingException o_O) {
assertThat(context.hasPersistentEntityFor(InvalidSample.class)).isFalse();
}

View File

@@ -140,7 +140,7 @@ class ClassGeneratingEntityInstantiatorUnitTests<P extends PersistentProperty<P>
try {
this.instance.createInstance(entity, provider);
fail("Expected MappingInstantiationException!");
fail("Expected MappingInstantiationException");
} catch (MappingInstantiationException o_O) {

View File

@@ -126,7 +126,7 @@ class ReflectionEntityInstantiatorUnitTests<P extends PersistentProperty<P>> {
try {
INSTANCE.createInstance(entity, provider);
fail("Expected MappingInstantiationException!");
fail("Expected MappingInstantiationException");
} catch (MappingInstantiationException o_O) {

View File

@@ -31,7 +31,7 @@ class RepositoryFragmentUnitTests {
void fragmentCreationFromUnrelatedTypesShouldFail() {
assertThatThrownBy(() -> RepositoryFragment.implemented((Class) CustomFragment.class, new UnrelatedImpl()))
.hasMessageMatching("Fragment implementation .*UnrelatedImpl does not implement .*!")
.hasMessageMatching("Fragment implementation .*UnrelatedImpl does not implement .*")
.isInstanceOf(IllegalArgumentException.class);
}

View File

@@ -725,10 +725,10 @@ class PartTreeUnitTests {
for (var k = 0; k < part.length; k++) {
assertThat(partIterator.hasNext()).as("Expected %d parts but have %d", part.length, k).isTrue();
var next = partIterator.next();
assertThat(part[k]).as("Expected %s but got %s!", part[k], next).isEqualTo(next);
assertThat(part[k]).as("Expected %s but got %s", part[k], next).isEqualTo(next);
}
assertThat(partIterator.hasNext()).as("Too many parts!").isFalse();
assertThat(partIterator.hasNext()).as("Too many parts").isFalse();
}
private static <T> Collection<T> toCollection(Iterable<T> iterable) {

View File

@@ -77,7 +77,7 @@ class RepositoryInvocationTestUtils {
var type = invocation.getMethod().getDeclaringClass();
assertThat(type).as("Expected methods invocation on %s but was invoked on %s!", expectedInvocationTarget, type)
assertThat(type).as("Expected methods invocation on %s but was invoked on %s", expectedInvocationTarget, type)
.isEqualTo(expectedInvocationTarget);
}

View File

@@ -149,7 +149,7 @@ class SpringDataWebConfigurationIntegrationTests {
private static Condition<Object> instanceWithClassName(Class<?> expectedClass) {
return new Condition<>(it -> it.getClass().getName().equals(expectedClass.getName()), //
"with class name %s!", expectedClass.getName());
"with class name %s", expectedClass.getName());
}
@Configuration