From fa54edd715c78e5b82d09f18f56e8a6c9ae29a3f Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Sat, 28 Dec 2024 19:28:22 +0700 Subject: [PATCH] Fix typo --- src/main/antora/modules/ROOT/pages/object-mapping.adoc | 4 ++-- .../data/convert/PropertyValueConverterRegistrar.java | 2 +- .../org/springframework/data/mapping/model/BeanWrapper.java | 2 +- .../data/repository/cdi/CdiRepositoryBean.java | 4 ++-- .../data/repository/config/RepositoryComponentProvider.java | 2 +- .../org/springframework/data/util/AnnotatedTypeScanner.java | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/object-mapping.adoc b/src/main/antora/modules/ROOT/pages/object-mapping.adoc index 380966c536..a383d8a418 100644 --- a/src/main/antora/modules/ROOT/pages/object-mapping.adoc +++ b/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 [[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) { ---- 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] ---- diff --git a/src/main/java/org/springframework/data/convert/PropertyValueConverterRegistrar.java b/src/main/java/org/springframework/data/convert/PropertyValueConverterRegistrar.java index a63e455bd1..ec4ae29042 100644 --- a/src/main/java/org/springframework/data/convert/PropertyValueConverterRegistrar.java +++ b/src/main/java/org/springframework/data/convert/PropertyValueConverterRegistrar.java @@ -192,7 +192,7 @@ public PropertyValueConverterRegistrar

reading(Function reader) { * 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

reading(BiFunction, S> reader) { diff --git a/src/main/java/org/springframework/data/mapping/model/BeanWrapper.java b/src/main/java/org/springframework/data/mapping/model/BeanWrapper.java index b962dd8275..4f7ee5be0a 100644 --- a/src/main/java/org/springframework/data/mapping/model/BeanWrapper.java +++ b/src/main/java/org/springframework/data/mapping/model/BeanWrapper.java @@ -117,7 +117,7 @@ public Object getProperty(PersistentProperty property) { * @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 Object getProperty(PersistentProperty property, Class type) { diff --git a/src/main/java/org/springframework/data/repository/cdi/CdiRepositoryBean.java b/src/main/java/org/springframework/data/repository/cdi/CdiRepositoryBean.java index 8318ae212a..cce79956af 100644 --- a/src/main/java/org/springframework/data/repository/cdi/CdiRepositoryBean.java +++ b/src/main/java/org/springframework/data/repository/cdi/CdiRepositoryBean.java @@ -102,7 +102,7 @@ public CdiRepositoryBean(Set qualifiers, Class repositoryType, Be 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 CdiRepositoryBean(Set qualifiers, Class repositoryType, Be 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; diff --git a/src/main/java/org/springframework/data/repository/config/RepositoryComponentProvider.java b/src/main/java/org/springframework/data/repository/config/RepositoryComponentProvider.java index 776b57ab38..9a8debbfe3 100644 --- a/src/main/java/org/springframework/data/repository/config/RepositoryComponentProvider.java +++ b/src/main/java/org/springframework/data/repository/config/RepositoryComponentProvider.java @@ -196,7 +196,7 @@ private record AllTypeFilter(List delegates) implements TypeFilter { */ private AllTypeFilter { - Assert.notNull(delegates, "TypeFilter deleages must not be null"); + Assert.notNull(delegates, "TypeFilter delegates must not be null"); } @Override diff --git a/src/main/java/org/springframework/data/util/AnnotatedTypeScanner.java b/src/main/java/org/springframework/data/util/AnnotatedTypeScanner.java index eaf25ab6a7..d7dcca48eb 100644 --- a/src/main/java/org/springframework/data/util/AnnotatedTypeScanner.java +++ b/src/main/java/org/springframework/data/util/AnnotatedTypeScanner.java @@ -44,7 +44,7 @@ */ public class AnnotatedTypeScanner implements ResourceLoaderAware, EnvironmentAware { - private final Iterable> annotationTypess; + private final Iterable> annotationTypes; private final boolean considerInterfaces; private @Nullable ResourceLoader resourceLoader; @@ -83,7 +83,7 @@ public AnnotatedTypeScanner(boolean considerInterfaces, Class> annotationTypes) { this.considerInterfaces = considerInterfaces; - this.annotationTypess = annotationTypes; + this.annotationTypes = annotationTypes; } @Override @@ -146,7 +146,7 @@ Set> findTypes(Iterable basePackages, Collection fi } public Set> findTypes(Iterable 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())); } /**