fix AuthorityRuleEntity and ParamFlowRuleEntity fastjson serialize problem#889
Merged
sczyh30 merged 11 commits intoalibaba:masterfrom Jul 31, 2019
linlinisme:20190704-fix-json
Merged
fix AuthorityRuleEntity and ParamFlowRuleEntity fastjson serialize problem#889sczyh30 merged 11 commits intoalibaba:masterfrom linlinisme:20190704-fix-json
sczyh30 merged 11 commits intoalibaba:masterfrom
linlinisme:20190704-fix-json
Conversation
using the LongAdder rather than AtomicInteger to Provides better performance
merge master
merge online
merge onlie
merge online
Codecov Report
@@ Coverage Diff @@
## master #889 +/- ##
=========================================
Coverage 42.25% 42.25%
- Complexity 1419 1422 +3
=========================================
Files 307 307
Lines 8894 8894
Branches 1203 1203
=========================================
Hits 3758 3758
- Misses 4677 4679 +2
+ Partials 459 457 -2
Continue to review full report at Codecov.
|
Member
|
Thanks! For V2 controllers (rules for the entire application) we may need another good solution. Maybe we could just push the origin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe what this PR does / why we need it
the ParamFlowRuleEntity and AuthorityRuleEntity json serialize is wrong when they use
com.alibaba.fastjson.JSON#toJSONString(java.lang.Object). Because the@JsonIgnoreannotation is not belong to fastjson, but com.fasterxml.jackson. They are different json lib. Socom.alibaba.fastjson.JSON#toJSONString(java.lang.Object)still json serialize the field though it modified with@JsonIgnore。Does this pull request fix one issue?
fix #948
Describe how you did it
add fastjson's annotation
@JSONField(serialize = false)at the base of@JsonIgnoreDescribe how to verify it
run test cases :
com.alibaba.csp.sentinel.dashboard.datasource.entity.JsonSerializeTest