Skip to content
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

optimize: optimize get config type from configuration #2730

Merged
merged 4 commits into from
May 26, 2020

Conversation

PeineLiang
Copy link
Contributor

Ⅰ. Describe what this PR did

fix: get configTypeName exception

Ⅱ. Does this pull request fix one issue?

fixes #2724

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented May 25, 2020

Codecov Report

Merging #2730 into develop will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #2730   +/-   ##
==========================================
  Coverage      51.13%   51.14%           
- Complexity      2847     2849    +2     
==========================================
  Files            566      566           
  Lines          18075    18077    +2     
  Branches        2141     2142    +1     
==========================================
+ Hits            9243     9245    +2     
- Misses          7944     7945    +1     
+ Partials         888      887    -1     
Impacted Files Coverage Δ Complexity Δ
...core/src/main/java/io/seata/config/ConfigType.java 76.92% <0.00%> (ø) 2.00 <0.00> (ø)
...ain/java/io/seata/config/ConfigurationFactory.java 48.14% <0.00%> (-1.86%) 4.00 <0.00> (ø)
...java/io/seata/discovery/registry/RegistryType.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...in/java/io/seata/server/session/GlobalSession.java 84.16% <0.00%> (+0.45%) 72.00% <0.00%> (+1.00%)
...o/seata/server/coordinator/DefaultCoordinator.java 55.15% <0.00%> (+0.51%) 29.00% <0.00%> (+1.00%)

@l81893521 l81893521 added first-time contributor first-time contributor module/config config module labels May 25, 2020
Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -101,9 +102,14 @@ private static Configuration buildConfiguration() {
configTypeName = CURRENT_FILE_INSTANCE.getConfig(
ConfigurationKeys.FILE_ROOT_CONFIG + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR
+ ConfigurationKeys.FILE_ROOT_TYPE);

if (StringUtils.isBlank(configTypeName)) {
throw new NotSupportYetException("can not get config type: " + configTypeName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configTypeName is blank,why not print it out explicitly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right ,i change the message to "config type can not be null"

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@slievrly slievrly changed the title bugfix: fix get configTypeName flaw optimize: optimize get config type from configuration May 26, 2020
@slievrly slievrly merged commit 53963d4 into apache:develop May 26, 2020
@slievrly slievrly added this to the 1.3.0 milestone Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-time contributor first-time contributor module/config config module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get configTypeName a little flaw
5 participants