Map to bean but tolerate nulls

Open
#484 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
java
Domain
tooling

Research direction

Start by reading the existing BeanProperty and Mapper APIs to understand how mapping currently handles nulls. Define the scope of a partial or tolerant mapping utility, including how it would relate to an alternative BeanProperty and what successful mapping should guarantee.

Written by the indexing model from the issue text.

Description

architecture beanmapper

We should have a utility (and realistically, promote it to an alternative BeanProperty) that maps everything it can to a given bean while still accepting nulls. I could imagine Mapper methods alongside the existing ones, something like mapPartial or mapTolerant or something.

Kind of breaks the ConfigMe philosophy of no nulls, but would make debugging easier and also some migrations. Plus I think some people would really want this instead of defensively using Optional and initialized fields everywhere...

Dominant language
Java
Stars
44
Forks
21
Avg merge
2d 2h
Merged PRs (30d)
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.

More from AuthMe/ConfigMe

All issues in AuthMe/ConfigMe

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.