spring-projects / spring-batch

Spring Batch is a framework for writing batch applications using Java and Spring
http://projects.spring.io/spring-batch/
Apache License 2.0
2.7k stars 2.34k forks source link

Allow for null-safe nested paths in BeanWrapperFieldExtractor [BATCH-2531] #1071

Open spring-projects-issues opened 8 years ago

spring-projects-issues commented 8 years ago

Krishna Bhamidipati opened BATCH-2531 and commented

Hello!

Currently, nested paths are not null-safe in BeanWrapperFieldExtractor. For example if the property name is

a.b.c

where a is not null but b is null, it throws an exception like:

org.springframework.beans.NullValueInNestedPathException: Value of nested property 'a.b' is null

It would be nice to either:


Affects: 3.0.3

spring-projects-issues commented 5 years ago

Mahmoud Ben Hassine commented

Nice idea! I would opt for the second option and support the usage of the safe navigation operator of SpEL.

We will discuss this feature internally and let you know if we decide to add it to the framework or not.