alibaba / alibaba/testable-mock

使用OmniConstructor构造的对象第二层成员变量为null

Open
#249 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.8k
Forks
306
PR merge metrics
No merged PRs in 30d

Description

releaseDraftBiz = OmniConstructor.newInstance(ReleaseDraftBiz.class);

构造biz对象,第一层成员变量service有,但是service的成员变量mapper都为null.
![image](https://user-images.githubusercontent.com/56861199/145144728-cd2f58db-5a04-4f83-879e-02d024861de8.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported call to OmniConstructor.newInstance(ReleaseDraftBiz.class) and inspect how the first-level service and its mapper are initialized. Trace the constructor behavior for nested members and compare the observed object with the expected fully initialized structure. Done means the second-level mapper members are no longer null in this scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.