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

feat(javareach): Supported nested JARs. #1662

Merged
merged 3 commits into from
Feb 25, 2025
Merged

feat(javareach): Supported nested JARs. #1662

merged 3 commits into from
Feb 25, 2025

Conversation

oliverchang
Copy link
Collaborator

  • Support loading of dependencies from nested JAR files (e.g. BOOT-INF for Spring Boot applications)
  • Add flag to enable profiler for debugging performance issues.

- Support loading of dependencies from nested JAR files (e.g. BOOT-INF
  for Spring Boot applications)
- Add flag to enable profiler for debugging performance issues.
@oliverchang oliverchang requested a review from cuixq February 25, 2025 04:06
@codecov-commenter
Copy link

codecov-commenter commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.54%. Comparing base (91f56a9) to head (879551b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1662      +/-   ##
==========================================
- Coverage   64.56%   64.54%   -0.02%     
==========================================
  Files         155      155              
  Lines       15997    15997              
==========================================
- Hits        10329    10326       -3     
- Misses       4984     4986       +2     
- Partials      684      685       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// Extract the Main-Class specified in MANIFEST.MF:
// https://docs.oracle.com/javase/tutorial/deployment/jar/appman.html
const mainClass = "Main-Class:"
const startClass = "Start-Class:"
Copy link
Contributor

Choose a reason for hiding this comment

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

is there documentation about this? the above docs does not say anything about Start-Class

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't find any public documentation, as it seems to be an implementation detail of spring boot. i'll add a comment.

if err != nil {
if os.IsNotExist(err) {
// class not found in this .jar. not an error.
Copy link
Contributor

Choose a reason for hiding this comment

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

is this the expected behaviour?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, this is just needed for searching through classpaths for the relevant class. if it doesn't exist, we move on to searching the next one.

@oliverchang oliverchang merged commit f6024a9 into main Feb 25, 2025
14 checks passed
@oliverchang oliverchang deleted the reach-2 branch February 25, 2025 05:29
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