Skip to content

Commit addeb85

Browse files
committed
DATACMNS-1706 - Polishing.
Improve Javadoc. Original pull request: #437.
1 parent 74d4bae commit addeb85

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
@@ -118,7 +118,7 @@ public boolean isExplicitlyAnnotated() {
118118
* {@link PersistentEntity} backing this {@link PreferredConstructor}.
119119
*
120120
* @param property must not be {@literal null}.
121-
* @return
121+
* @return {@literal true} if the {@link PersistentProperty} is used in the constructor.
122122
*/
123123
public boolean isConstructorParameter(PersistentProperty<?> property) {
124124

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

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

215+
@Nullable
215216
private static String getValue(Annotation[] annotations) {
216217

217218
return Arrays.stream(annotations)//
@@ -279,7 +280,7 @@ boolean maps(PersistentProperty<?> property) {
279280

280281
P referencedProperty = entity == null ? null : name == null ? null : entity.getPersistentProperty(name);
281282

282-
return property != null && property.equals(referencedProperty);
283+
return property.equals(referencedProperty);
283284
}
284285

285286
private boolean isEnclosingClassParameter() {

0 commit comments

Comments
 (0)