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

bugfix: run with jar file and not package third lib into jar file, this.getClass().getClassLoader() will be null #3408

Merged
merged 3 commits into from
Dec 31, 2020

Conversation

lian88jian
Copy link
Contributor

Ⅰ. Describe what this PR did

jar运行模式, 当第三方依赖分开打包时, this.getClass().getClassLoader()是null, 会报空指针异常

Ⅱ. Does this pull request fix one issue?

#3407

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@funky-eyes
Copy link
Contributor

Error: /home/runner/work/seata/seata/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java:170:9: 'if' is not followed by whitespace. [WhitespaceAround]
Error: /home/runner/work/seata/seata/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java:170:32: '{' is not preceded with whitespace. [WhitespaceAround]
Error: /home/runner/work/seata/seata/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java:175: 'array initialization' child has incorrect indentation level 20, expected level should be 16. [Indentation]
Error: /home/runner/work/seata/seata/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java:179: 'array initialization' child has incorrect indentation level 20, expected level should be 16. [Indentation]

这几个代码按照阿里p3c代码格式化一下

@lian88jian
Copy link
Contributor Author

Error: /home/runner/work/seata/seata/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java:170:9: 'if' is not followed by whitespace. [WhitespaceAround]
Error: /home/runner/work/seata/seata/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java:170:32: '{' is not preceded with whitespace. [WhitespaceAround]
Error: /home/runner/work/seata/seata/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java:175: 'array initialization' child has incorrect indentation level 20, expected level should be 16. [Indentation]
Error: /home/runner/work/seata/seata/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java:179: 'array initialization' child has incorrect indentation level 20, expected level should be 16. [Indentation]

这几个代码按照阿里p3c代码格式化一下

好了.

@codecov-io
Copy link

codecov-io commented Dec 25, 2020

Codecov Report

Merging #3408 (5d3eec4) into develop (08fbcef) will increase coverage by 0.00%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #3408   +/-   ##
==========================================
  Coverage      51.56%   51.57%           
- Complexity      3341     3343    +2     
==========================================
  Files            616      616           
  Lines          20243    20251    +8     
  Branches        2541     2542    +1     
==========================================
+ Hits           10439    10444    +5     
- Misses          8752     8756    +4     
+ Partials        1052     1051    -1     
Impacted Files Coverage Δ Complexity Δ
...c/main/java/io/seata/config/FileConfiguration.java 43.10% <66.66%> (+0.16%) 12.00 <3.00> (ø)
...igure/properties/config/ConfigNacosProperties.java 36.00% <0.00%> (-2.10%) 3.00% <0.00%> (ø%)
...in/java/io/seata/server/session/GlobalSession.java 84.09% <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%)

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
Member

@jsbxyyx jsbxyyx left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants