Fixed some code smells in apollo-portal module#3968
Merged
kezhenxu94 merged 1 commit intoapolloconfig:masterfrom Sep 9, 2021
Merged
Fixed some code smells in apollo-portal module#3968kezhenxu94 merged 1 commit intoapolloconfig:masterfrom
kezhenxu94 merged 1 commit intoapolloconfig:masterfrom
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Contributor
Author
|
/recheck |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
Author
|
/recheck |
kezhenxu94
requested changes
Sep 9, 2021
|
|
||
| private static final Gson GSON = new Gson(); | ||
| private static Type type = new TypeToken<Map<String, String>>() {}.getType(); | ||
| private static Type TYPE = new TypeToken<Map<String, String>>() {}.getType(); |
Member
There was a problem hiding this comment.
Suggested change
| private static Type TYPE = new TypeToken<Map<String, String>>() {}.getType(); | |
| private static final Type TYPE = new TypeToken<Map<String, String>>() {}.getType(); |
Comment on lines
+48
to
+50
| /** | ||
| * Created by qianjie on 8/10/17. | ||
| */ |
| public List<OpenAppDTO> findApps(@RequestParam(value = "appIds", required = false) String appIds) { | ||
| final List<App> apps = new ArrayList<>(); | ||
| if (StringUtils.isEmpty(appIds)) { | ||
| if (StringUtils.hasLength(appIds)) { |
Member
There was a problem hiding this comment.
The logical result is reversed, which is wrong
Suggested change
| if (StringUtils.hasLength(appIds)) { | |
| if (!StringUtils.hasLength(appIds)) { |
bdd9d69 to
747612c
Compare
kezhenxu94
previously approved these changes
Sep 9, 2021
80716c6 to
b66b78b
Compare
Contributor
Author
Signed-off-by: WillardHu <wei.hu@daocloud.io>
b66b78b to
0f95412
Compare
Contributor
Author
Codecov Report
@@ Coverage Diff @@
## master #3968 +/- ##
============================================
- Coverage 50.80% 50.77% -0.04%
+ Complexity 2467 2466 -1
============================================
Files 475 475
Lines 14608 14603 -5
Branches 1523 1523
============================================
- Hits 7422 7414 -8
Misses 6660 6660
- Partials 526 529 +3
Continue to review full report at Codecov.
|
kezhenxu94
approved these changes
Sep 9, 2021
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What's the purpose of this PR
finalorstatic finalkeyword to class fieldWhich issue(s) this PR fixes:
Fixes #
Brief changelog
fixed some code smells
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean testto make sure this pull request doesn't break anything.CHANGESlog.