Nullability fine-tuning around bean properties

Issue: SPR-15720
Issue: SPR-15792
This commit is contained in:
Juergen Hoeller
2017-07-19 11:43:58 +02:00
parent 06fc092be2
commit 9fc4fb10b0
31 changed files with 243 additions and 206 deletions

View File

@@ -126,7 +126,7 @@ public class FieldRetrievingFactoryBean
* @see #setTargetObject
*/
public void setTargetField(@Nullable String targetField) {
this.targetField = StringUtils.trimAllWhitespace(targetField);
this.targetField = (targetField != null ? StringUtils.trimAllWhitespace(targetField) : null);
}
/**