-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed some code smells in apollo-portal module #3968
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
/recheck |
I have read the CLA Document and I hereby sign the CLA |
/recheck |
@@ -51,7 +51,7 @@ | |||
public class OpenApiBeanUtils { | |||
|
|||
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static Type TYPE = new TypeToken<Map<String, String>>() {}.getType(); | |
private static final Type TYPE = new TypeToken<Map<String, String>>() {}.getType(); |
/** | ||
* Created by qianjie on 8/10/17. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
@@ -84,7 +84,7 @@ public AppController(final PortalSettings portalSettings, | |||
@GetMapping("/apps") | |||
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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logical result is reversed, which is wrong
if (StringUtils.hasLength(appIds)) { | |
if (!StringUtils.hasLength(appIds)) { |
bdd9d69
to
747612c
Compare
80716c6
to
b66b78b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: WillardHu <wei.hu@daocloud.io>
b66b78b
to
0f95412
Compare
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.
|
What's the purpose of this PR
final
orstatic final
keyword 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 test
to make sure this pull request doesn't break anything.CHANGES
log.