Skip to content

Conversation

@EarthChen
Copy link
Member

What is the purpose of the change

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2023

Codecov Report

Merging #11249 (cc8e412) into 3.1 (c2eef7b) will decrease coverage by 5.16%.
The diff coverage is 18.00%.

@@             Coverage Diff              @@
##                3.1   #11249      +/-   ##
============================================
- Coverage     69.62%   64.46%   -5.17%     
+ Complexity      114       14     -100     
============================================
  Files          1503     1422      -81     
  Lines         80063    59360   -20703     
  Branches      14135     8726    -5409     
============================================
- Hits          55745    38264   -17481     
+ Misses        19538    17029    -2509     
+ Partials       4780     4067     -713     
Impacted Files Coverage Δ
.../apache/dubbo/rpc/protocol/tri/TripleProtocol.java 80.64% <ø> (-7.98%) ⬇️
...bo/rpc/protocol/tri/stream/TripleServerStream.java 34.97% <0.00%> (-15.33%) ⬇️
...bo/rpc/protocol/tri/stream/TripleClientStream.java 44.67% <9.75%> (-25.61%) ⬇️
.../dubbo/rpc/protocol/tri/stream/AbstractStream.java 80.00% <66.66%> (-20.00%) ⬇️
.../dubbo/rpc/protocol/tri/call/TripleClientCall.java 39.58% <100.00%> (-8.65%) ⬇️
...luster/router/script/ScriptStateRouterFactory.java 0.00% <0.00%> (-100.00%) ⬇️
...he/dubbo/test/common/impl/GreetingServiceImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...zookeeper/curator/CuratorZookeeperTransporter.java 0.00% <0.00%> (-100.00%) ⬇️
...nfigure/DubboRelaxedBinding2AutoConfiguration.java 0.00% <0.00%> (-100.00%) ⬇️
.../apache/dubbo/test/spring/SpringXmlConfigTest.java 0.00% <0.00%> (-96.16%) ⬇️
... and 531 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@win120a
Copy link
Contributor

win120a commented Jan 7, 2023

Class.forName 用全限定名更合适吧,要不然 JVM 抛出的会是 NoClassDefFoundError。

(复现)
先编译下面两个类,然后删掉 X2.class,之后运行 X 类,发现输出的是 NoClassDefFoundError。

public class X {
    public static void main(String[] args) {
        try {
            Class.forName(X2.class.getName());
        } catch (ClassNotFoundException cnfe) {
            System.out.println("ClassNotFoundException");
        } catch (NoClassDefFoundError ncdfe) {
            System.out.println("NoClassDefFoundError");
        }
    }
}
public class X2 {
    // 内容随便,有个类就行。
    public void m1() {
        System.out.println(Object.class.getName());
    }
}

@EarthChen EarthChen requested a review from guohao January 10, 2023 06:13
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

25.0% 25.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@guohao guohao left a comment

Choose a reason for hiding this comment

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

LGTM

@guohao guohao merged commit fe50ac5 into apache:3.1 Jan 12, 2023
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.

5 participants