MapsterMapper / MapsterMapper/Mapster
Provide more details on null reference questions
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 5.2k
- Forks
- 410
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
When mapping nested objects Mapster sometimes fails with
`System.NullReferenceException: 'Object reference not set to an instance of an object.'`
```
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=
StackTrace:
```
It does not provide details what property it actually failed on. Most of times it's impossible to evaluate manually where the point of failure is.
Could Mapster provide that information by catching the exception or some other means?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named. Start by reproducing a nested-object mapping that triggers the NullReferenceException and inspect how Mapster-generated mapping reports failures. Done means the resulting exception identifies the property or mapping path that failed, with regression coverage for the reported scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100