Browse Source

Fix typos.

Documentation, assertion messages.

Closes #3223
pull/3235/head
Tran Ngoc Nhan 1 year ago committed by Mark Paluch
parent
commit
6f0b7f6a0a
No known key found for this signature in database
GPG Key ID: 55BC6374BAA9D973
  1. 4
      src/main/antora/modules/ROOT/pages/object-mapping.adoc
  2. 2
      src/main/java/org/springframework/data/convert/PropertyValueConverterRegistrar.java
  3. 2
      src/main/java/org/springframework/data/mapping/model/BeanWrapper.java
  4. 4
      src/main/java/org/springframework/data/repository/cdi/CdiRepositoryBean.java
  5. 2
      src/main/java/org/springframework/data/repository/config/RepositoryComponentProvider.java
  6. 6
      src/main/java/org/springframework/data/util/AnnotatedTypeScanner.java

4
src/main/antora/modules/ROOT/pages/object-mapping.adoc

@ -223,7 +223,7 @@ It's an established pattern to rather use static factory methods to expose these @@ -223,7 +223,7 @@ It's an established pattern to rather use static factory methods to expose these
[[mapping.general-recommendations.override.properties]]
=== Overriding Properties
Java's allows a flexible design of domain classes where a subclass could define a property that is already declared with the same name in its superclass.
Java allows a flexible design of domain classes where a subclass could define a property that is already declared with the same name in its superclass.
Consider the following example:
[source,java]
@ -326,7 +326,7 @@ data class Person(var id: String, val name: String) { @@ -326,7 +326,7 @@ data class Person(var id: String, val name: String) {
----
Kotlin supports parameter optionality by allowing default values to be used if a parameter is not provided.
When Spring Data detects a constructor with parameter defaulting, then it leaves these parameters absent if the data store does not provide a value (or simply returns `null`) so Kotlin can apply parameter defaulting.Consider the following class that applies parameter defaulting for `name`
When Spring Data detects a constructor with parameter defaulting, then it leaves these parameters absent if the data store does not provide a value (or simply returns `null`) so Kotlin can apply parameter defaulting. Consider the following class that applies parameter defaulting for `name`
[source,kotlin]
----

2
src/main/java/org/springframework/data/convert/PropertyValueConverterRegistrar.java

@ -192,7 +192,7 @@ public class PropertyValueConverterRegistrar<P extends PersistentProperty<P>> { @@ -192,7 +192,7 @@ public class PropertyValueConverterRegistrar<P extends PersistentProperty<P>> {
* Describes how to read a database value into a domain object's property value.
*
* @param reader must not be {@literal null}.
* @return the confiured {@link PropertyValueConverterRegistrar}.
* @return the configured {@link PropertyValueConverterRegistrar}.
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public PropertyValueConverterRegistrar<P> reading(BiFunction<R, ValueConversionContext<P>, S> reader) {

2
src/main/java/org/springframework/data/mapping/model/BeanWrapper.java

@ -117,7 +117,7 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> { @@ -117,7 +117,7 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
* @param property must not be {@literal null}.
* @param type can be {@literal null}.
* @return
* @throws MappingException in case an exception occured when accessing the property.
* @throws MappingException in case an exception occurred when accessing the property.
*/
@Nullable
public <S> Object getProperty(PersistentProperty<?> property, Class<? extends S> type) {

4
src/main/java/org/springframework/data/repository/cdi/CdiRepositoryBean.java

@ -102,7 +102,7 @@ public abstract class CdiRepositoryBean<T> implements Bean<T>, PassivationCapabl @@ -102,7 +102,7 @@ public abstract class CdiRepositoryBean<T> implements Bean<T>, PassivationCapabl
Assert.notNull(qualifiers, "Qualifiers must not be null");
Assert.notNull(beanManager, "BeanManager must not be null");
Assert.notNull(repositoryType, "Repoitory type must not be null");
Assert.notNull(repositoryType, "Repository type must not be null");
Assert.isTrue(repositoryType.isInterface(), "RepositoryType must be an interface");
this.qualifiers = qualifiers;
@ -127,7 +127,7 @@ public abstract class CdiRepositoryBean<T> implements Bean<T>, PassivationCapabl @@ -127,7 +127,7 @@ public abstract class CdiRepositoryBean<T> implements Bean<T>, PassivationCapabl
Assert.notNull(qualifiers, "Qualifiers must not be null");
Assert.notNull(beanManager, "BeanManager must not be null");
Assert.notNull(repositoryType, "Repoitory type must not be null");
Assert.notNull(repositoryType, "Repository type must not be null");
Assert.isTrue(repositoryType.isInterface(), "RepositoryType must be an interface");
this.qualifiers = qualifiers;

2
src/main/java/org/springframework/data/repository/config/RepositoryComponentProvider.java

@ -196,7 +196,7 @@ class RepositoryComponentProvider extends ClassPathScanningCandidateComponentPro @@ -196,7 +196,7 @@ class RepositoryComponentProvider extends ClassPathScanningCandidateComponentPro
*/
private AllTypeFilter {
Assert.notNull(delegates, "TypeFilter deleages must not be null");
Assert.notNull(delegates, "TypeFilter delegates must not be null");
}
@Override

6
src/main/java/org/springframework/data/util/AnnotatedTypeScanner.java

@ -44,7 +44,7 @@ import org.springframework.util.ClassUtils; @@ -44,7 +44,7 @@ import org.springframework.util.ClassUtils;
*/
public class AnnotatedTypeScanner implements ResourceLoaderAware, EnvironmentAware {
private final Iterable<Class<? extends Annotation>> annotationTypess;
private final Iterable<Class<? extends Annotation>> annotationTypes;
private final boolean considerInterfaces;
private @Nullable ResourceLoader resourceLoader;
@ -83,7 +83,7 @@ public class AnnotatedTypeScanner implements ResourceLoaderAware, EnvironmentAwa @@ -83,7 +83,7 @@ public class AnnotatedTypeScanner implements ResourceLoaderAware, EnvironmentAwa
public AnnotatedTypeScanner(boolean considerInterfaces, Collection<Class<? extends Annotation>> annotationTypes) {
this.considerInterfaces = considerInterfaces;
this.annotationTypess = annotationTypes;
this.annotationTypes = annotationTypes;
}
@Override
@ -146,7 +146,7 @@ public class AnnotatedTypeScanner implements ResourceLoaderAware, EnvironmentAwa @@ -146,7 +146,7 @@ public class AnnotatedTypeScanner implements ResourceLoaderAware, EnvironmentAwa
}
public Set<Class<?>> findTypes(Iterable<String> basePackages) {
return findTypes(basePackages, Streamable.of(annotationTypess).stream().map(annotation -> new AnnotationTypeFilter(annotation, true, considerInterfaces)).collect(Collectors.toSet()));
return findTypes(basePackages, Streamable.of(annotationTypes).stream().map(annotation -> new AnnotationTypeFilter(annotation, true, considerInterfaces)).collect(Collectors.toSet()));
}
/**

Loading…
Cancel
Save