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

rename ClassHelper to ClassUtils, add MethodUtils #3806

Merged
merged 6 commits into from
Apr 30, 2019

Conversation

LiZhenNet
Copy link
Contributor

What is the purpose of the change

rename ClassHelper to ClassUtils

Brief changelog

  1. add ClassUtils to replace ClassHelper , ClassHelper add deprecated annotation.
  2. add MethodUtils, move isSetter/isGetter into it.

Next step :
Merging
org.apache.dubbo.common.compiler.support.ClassUtils,
org.apache.dubbo.config.spring.util.ClassUtils,
org.apache.dubbo.metadata.definition.util.ClassUtils,

Verifying this change

UT

Follow this checklist to help us incorporate your contribution quickly and easily:

  • 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.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. 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.
  • 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 integration-test in test module.
  • Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

Copy link
Contributor

@ralf0131 ralf0131 left a comment

Choose a reason for hiding this comment

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

I have some questions:

  1. Why do we need such a change?
  2. What is the difference between org.apache.dubbo.common.compiler.support.ClassUtils and org.apache.dubbo.common.utils.ClassUtils?

@LiZhenNet
Copy link
Contributor Author

LiZhenNet commented Apr 8, 2019

I have some questions:

  1. Why do we need such a change?
  2. What is the difference between org.apache.dubbo.common.compiler.support.ClassUtils and org.apache.dubbo.common.utils.ClassUtils?
  1. I think ClassHelper is not standard in Dubbo, and It has some methods on Method.class.
  2. Some of these two classes are the same, Are we considering merging them?

@ralf0131
Copy link
Contributor

  1. I think ClassHelper is not standard in Dubbo, and It has some methods on Method.class.
  2. Some of these two classes are the same, Are we considering merging them?

If they are duplicated, I think it is better to merge them. How do you think? Are you planning to do it next, or in this pull request?

@ralf0131
Copy link
Contributor

All the UT are failing, could you please check about that?

@ralf0131 ralf0131 added the status/waiting-for-feedback Need reporters to triage label Apr 17, 2019
# Conflicts:
#	dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
@codecov-io
Copy link

codecov-io commented Apr 18, 2019

Codecov Report

Merging #3806 into master will decrease coverage by 0.05%.
The diff coverage is 61.29%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3806      +/-   ##
============================================
- Coverage     63.97%   63.92%   -0.06%     
  Complexity       98       98              
============================================
  Files           713      715       +2     
  Lines         31481    31497      +16     
  Branches       5076     5076              
============================================
- Hits          20139    20133       -6     
- Misses         9038     9057      +19     
- Partials       2304     2307       +3
Impacted Files Coverage Δ Complexity Δ
...che/dubbo/common/compiler/support/JdkCompiler.java 64.54% <0%> (ø) 0 <0> (ø) ⬇️
...ava/org/apache/dubbo/common/utils/ClassHelper.java 0% <0%> (-69.1%) 0 <0> (ø)
...ubbo/common/compiler/support/AbstractCompiler.java 72.72% <0%> (ø) 0 <0> (ø) ⬇️
...in/java/org/apache/dubbo/config/ServiceConfig.java 58.08% <0%> (ø) 0 <0> (ø) ⬇️
.../java/org/apache/dubbo/config/ReferenceConfig.java 60.07% <0%> (ø) 0 <0> (ø) ⬇️
...mon/serialize/java/CompactedObjectInputStream.java 64.28% <0%> (ø) 0 <0> (ø) ⬇️
...rg/apache/dubbo/common/timer/HashedWheelTimer.java 58.62% <0%> (ø) 0 <0> (ø) ⬇️
...java/org/apache/dubbo/common/bytecode/Wrapper.java 82.38% <100%> (ø) 0 <0> (ø) ⬇️
.../java/org/apache/dubbo/common/utils/PojoUtils.java 70.43% <100%> (ø) 0 <0> (ø) ⬇️
...ava/org/apache/dubbo/common/utils/ConfigUtils.java 80% <100%> (ø) 0 <0> (ø) ⬇️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d54633e...65a9227. Read the comment docs.

@LiZhenNet
Copy link
Contributor Author

All the UT are failing, could you please check about that?

Sorry for late ,I have fixed it .

# Conflicts:
#	dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
@LiZhenNet
Copy link
Contributor Author

@ralf0131
Is there any progress?

Copy link
Contributor

@ralf0131 ralf0131 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the pull request.

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.

3 participants