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

应用部署在发行版tomcat的支持 #1532

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Yaxx19
Copy link

@Yaxx19 Yaxx19 commented Jun 4, 2024

What type of PR is this?

发行版tomcat的支持

What this PR does / why we need it?

对tomcat的org.apache.catalina.loader.WebappClassLoaderBase进行增强
织入点选择loadClass和getResourceAsStream

Which issue(s) this PR fixes?

Fixes #1519

Does this PR introduce a user-facing change?

No

Checklist

  • Make sure there is a GitHub_issue related with this PR before you start working on it.
  • Make sure you have squashed your change to one single commit.
  • GitHub Actions works fine in this PR.

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.

Flag Coverage Δ Complexity Δ
unittests 43.38% <0.00%> (+0.49%) 181.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ Complexity Δ
.../sermant/core/plugin/agent/ByteEnhanceManager.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...nt/enhance/ClassLoaderFindResourceInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...agent/enhance/ClassLoaderLoadClassInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...lugin/agent/enhance/WebappClassLoaderDeclarer.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../agent/enhance/AbstractClassLoaderInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...bappClassLoaderGetResourceAsStreamInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)

... and 27 files with indirect coverage changes

essentialPackage = ConfigManager.getConfig(InjectConfig.class).getEssentialPackage();
}

protected boolean isSermantClass(String name) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

add Javadoc comment for isSermantClass and isSermantResource

@@ -0,0 +1,44 @@
package io.sermant.core.plugin.agent.enhance;
Copy link
Collaborator

Choose a reason for hiding this comment

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

import java.util.logging.Logger;

/**
* 发行版Tomcat ClassLoader getResourceAsStream 增强
Copy link
Collaborator

@lilai23 lilai23 Jun 6, 2024

Choose a reason for hiding this comment

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

i hope all comments could be in english, As well as PR description and commit message

@lilai23
Copy link
Collaborator

lilai23 commented Jun 6, 2024

Make sure you have squashed your change to one single commit.

@lilai23
Copy link
Collaborator

lilai23 commented Jun 6, 2024

Have you ever test this in war and tomcat?

@lilai23
Copy link
Collaborator

lilai23 commented Jul 26, 2024

@Yaxx19 could you resolve conversations and confilcts above?

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.

关于ClassLoader增强
2 participants