spring-projects / spring-projects/spring-batch

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

Open
#1,071 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: feature
Dominant language
Java
Stars
3k
Forks
2.5k
Avg merge
6d 53m
Merged PRs (30d)
3

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting BeanWrapperFieldExtractor and its nested-property handling in the Spring Batch source. Compare the proposed safe-navigation and auto-grow approaches, then verify the chosen behavior when an intermediate property such as a.b is null. Done means null-safe nested extraction is defined and covered by regression tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.