[SCB-2367] optimize microservice.yaml load log#2688
Merged
liubao68 merged 7 commits intoapache:masterfrom Feb 8, 2022
david6969xin:branch_master_2657
Merged
[SCB-2367] optimize microservice.yaml load log#2688liubao68 merged 7 commits intoapache:masterfrom david6969xin:branch_master_2657
liubao68 merged 7 commits intoapache:masterfrom
david6969xin:branch_master_2657
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2688 +/- ##
============================================
- Coverage 77.76% 77.23% -0.53%
+ Complexity 1430 1413 -17
============================================
Files 1598 1608 +10
Lines 42774 42980 +206
Branches 3610 3644 +34
============================================
- Hits 33262 33195 -67
- Misses 7998 8262 +264
- Partials 1514 1523 +9
Continue to review full report at Codecov.
|
liubao68
reviewed
Jan 21, 2022
| } catch (IOException e) { | ||
| throw new ServiceCombException("Failed to load microservice config", e); | ||
| } catch (Exception e) { | ||
| throw new ServiceCombException("Failed to load microservice configFile " + configFileFromClasspath + " and " + e.getMessage()); |
Contributor
There was a problem hiding this comment.
throw new ServiceCombException("Failed to load microservice configFile " + configFileFromClasspath, e);
liubao68
reviewed
Jan 21, 2022
| for (Map.Entry<String, Object> entry : propertieMap.entrySet()) { | ||
| if (entry.getValue() instanceof Map) { | ||
| result.putAll(retrieveItems(prefix + entry.getKey(), (Map<String, Object>) entry.getValue())); | ||
| result.putAll(retrieveItems(prefix + entry.getKey(), (Map<String, Object>) entry.getValue())); |
liubao68
reviewed
Jan 21, 2022
| } | ||
| result.put(key, entry.getValue()); | ||
| }else { | ||
| throw new IllegalArgumentException("value config error"); |
Contributor
There was a problem hiding this comment.
throw new IllegalArgumentException("Find invalid configuration item. Prefix is " + prefix);
liubao68
reviewed
Feb 8, 2022
| } | ||
| return flag; | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
private static boolean isValidMap(Map<Object, Object> data) {
for (Map.Entry<Object, Object> entry : data.entrySet()) {
Object key = entry.getKey();
Object value = entry.getValue();
if (key instanceof String) {
if (value instanceof Map) {
return isValidMap((Map<Object, Object>) value);
}
continue;
}
return false;
}
return true;
}
liubao68
approved these changes
Feb 8, 2022
Contributor
|
retrigger ci |
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.
Follow this checklist to help us incorporate your contribution quickly and easily:
[SCB-XXX] Fixes bug in ApproximateQuantiles, where you replaceSCB-XXXwith the appropriate JIRA issue.mvn clean install -Pitto make sure basic checks pass. A more thorough check will be performed on your pull request automatically.