Skip to content

Commit ce7928b

Browse files
committed
DATACMNS-1706 - Polishing.
Improve Javadoc. Original pull request: #437.
1 parent 9d482b0 commit ce7928b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/springframework/data/mapping/PreferredConstructor.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public boolean isExplicitlyAnnotated() {
117117
* {@link PersistentEntity} backing this {@link PreferredConstructor}.
118118
*
119119
* @param property must not be {@literal null}.
120-
* @return
120+
* @return {@literal true} if the {@link PersistentProperty} is used in the constructor.
121121
*/
122122
public boolean isConstructorParameter(PersistentProperty<?> property) {
123123

@@ -147,7 +147,7 @@ public boolean isConstructorParameter(PersistentProperty<?> property) {
147147
* constructor argument of the enclosing class type.
148148
*
149149
* @param parameter must not be {@literal null}.
150-
* @return
150+
* @return {@literal true} if the {@link PersistentProperty} maps to the enclosing class.
151151
*/
152152
public boolean isEnclosingClassParameter(Parameter<?, P> parameter) {
153153

@@ -210,6 +210,7 @@ public Parameter(@Nullable String name, TypeInformation<T> type, Annotation[] an
210210
this.hasSpelExpression = Lazy.of(() -> StringUtils.hasText(getSpelExpression()));
211211
}
212212

213+
@Nullable
213214
private static String getValue(Annotation[] annotations) {
214215

215216
return Arrays.stream(annotations)//
@@ -322,7 +323,7 @@ boolean maps(PersistentProperty<?> property) {
322323

323324
P referencedProperty = entity == null ? null : name == null ? null : entity.getPersistentProperty(name);
324325

325-
return property != null && property.equals(referencedProperty);
326+
return property.equals(referencedProperty);
326327
}
327328

328329
private boolean isEnclosingClassParameter() {

0 commit comments

Comments
 (0)