Skip to content

Use class names to access static variables or methods#2829

Closed
lordcheng10 wants to merge 2 commits into
apache:masterfrom
lordcheng10:class_name_access_static_method
Closed

Use class names to access static variables or methods#2829
lordcheng10 wants to merge 2 commits into
apache:masterfrom
lordcheng10:class_name_access_static_method

Conversation

@lordcheng10

Copy link
Copy Markdown
Contributor

Motivation

Accessing the static variables and methods of the class through the object reference of this class will increase the cost of the compiler's analysis. A better way is to directly use the class name to access the static variables or methods.

…bject reference of this class will increase the cost of the compiler's analysis. A better way is to directly use the class name to access the static variables or methods.

@nicoloboschi nicoloboschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@lordcheng10

Copy link
Copy Markdown
Contributor Author

@dlg99 PTAL , thanks!

@lordcheng10

Copy link
Copy Markdown
Contributor Author

rerun failed checks

5 similar comments
@lordcheng10

Copy link
Copy Markdown
Contributor Author

rerun failed checks

@lordcheng10

Copy link
Copy Markdown
Contributor Author

rerun failed checks

@lordcheng10

Copy link
Copy Markdown
Contributor Author

rerun failed checks

@lordcheng10

Copy link
Copy Markdown
Contributor Author

rerun failed checks

@lordcheng10

Copy link
Copy Markdown
Contributor Author

rerun failed checks

@dlg99

dlg99 commented Oct 15, 2021

Copy link
Copy Markdown
Contributor

tests are failing with

Execution failed for task ':bookkeeper-common:compileTestJava'.
> Could not resolve all files for configuration ':bookkeeper-common:testCompileClasspath'.
   > Could not find log4j:log4j:1.2.27.

which is probably something caused by #2816 nd gradle changes colliding
@RaulGracia @pkumar-singh can you take a look at this?

@pkumar-singh

pkumar-singh commented Oct 15, 2021

Copy link
Copy Markdown
Member

This PR from @RaulGracia #2816 should have fixed it. Kindly check @dlg99

@lordcheng10

lordcheng10 commented Oct 15, 2021

Copy link
Copy Markdown
Contributor Author

This PR from @RaulGracia #2816 should have fixed it. Kindly check @dlg99

@dlg99 @pkumar-singh Thanks for your attention, I merge the master code into my branch and try again。

@lordcheng10

Copy link
Copy Markdown
Contributor Author

@hsaputra PTAL , thanks!

@lordcheng10

Copy link
Copy Markdown
Contributor Author

PTAL,thanks! @dlg99

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.

4 participants