Skip to content

Conversation

@msfroh
Copy link
Contributor

@msfroh msfroh commented Dec 27, 2024

This plays nicer with Java's module system, as the class is able to load files from within the current module, whereas the classloader may not necessarily be able to.

Thanks for your contribution to Apache Commons! Your help is appreciated!

Before you push a pull request, review this list:

  • Read the contribution guidelines for this project.
  • Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible but is a best-practice.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body. Note that commits might be squashed by a maintainer on merge.

This plays nicer with Java's module system, as the class is able to
load files from within the current module, whereas the classloader
may not necessarily be able to.
@garydgregory
Copy link
Member

@garydgregory garydgregory merged commit 5978452 into apache:master Dec 28, 2024
9 checks passed
@garydgregory garydgregory changed the title Use Resource.class to load resources, rather than its classloader Use Resource.class to load resources, rather than its class loader Dec 28, 2024
@garydgregory
Copy link
Member

TY @msfroh !

omosteven pushed a commit to omosteven/commons-codec-lab-work that referenced this pull request Jan 8, 2025
…ache#353)

This plays nicer with Java's module system, as the class is able to
load files from within the current module, whereas the classloader
may not necessarily be able to.
omosteven pushed a commit to omosteven/commons-codec-lab-work that referenced this pull request Jan 8, 2025
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.

2 participants