[BitSail][Feature] Support generate constant value in FakeSource#341
[BitSail][Feature] Support generate constant value in FakeSource#341kyle-hawk wants to merge 4 commits intobytedance:masterfrom
Conversation
| } | ||
|
|
||
| @SuppressWarnings("checkstyle:MagicNumber") | ||
| private Object constantRawValue(TypeInfo<?> typeInfo, String constantValue) { |
There was a problem hiding this comment.
It seems that the code is redundant. Why not combine fakeRawValue and constantRawValue into one function
There was a problem hiding this comment.
thx for ur advice.
When I was writing, I also thought about whether to implement fakeRawValue and constantRawValue in one function, I thought fakeRawValue would be too long and hard to maintain for different logic mix together after combining, so I separated them, and the cost is that we got 2 functions that look similar
There was a problem hiding this comment.
After the merger, the code will be more concise, looking forward to your contribution @kyle-hawk
There was a problem hiding this comment.
okay, thx for the guidance, I'll merge them
There was a problem hiding this comment.
@lichang-bd I have merged them. please take a look. thx
Signed-off-by:
Pre-Checklist
Note: Please complete ALL items in the following checklist.
Purpose
Approaches
users can config constant value by defaultValue field, like this
Related Issues
New Behavior (screenshots if needed)
N/A