clightning4j / JRPClightning

:zap: Java framework for C-Lightning to work with the RPC interface, and also the library simplifies the work to develop custom plugins with Java, Kotlin, and all the languages that supports the Java dependencies :zap:
https://clightning4j.github.io/JRPClightning/
GNU General Public License v2.0
16 stars 9 forks source link

feat(plugin): search classpaths with `contextClassLoader()` and `staticClassLoader()` #81

Closed theborakompanioni closed 1 year ago

theborakompanioni commented 1 year ago

Before this commit classpath scanning was done via forJavaClassPath() only seaching the paths contained in system property java.class.path (and I suppose -classpath arg ?). When this commit is applied, classpath scanning is done with forClassLoader() using the class loader that loaded Reflections ("static") and the class loader of the current thread ("context").

This makes it possible to use this library in an executable jar, e.g. such as created by spring boot (https://docs.spring.io/spring-boot/docs/current/reference/html/executable-jar.html#appendix.executable-jar.restrictions).

I assume that this is compatible with all libraries currently using JRPClightning, however it is effectively a BREAKING CHANGE and probably needs to be communicated that way.

What do you think? Any feedback is highly appreciated.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: +0.01 :tada:

Comparison is base (ebd3983) 41.56% compared to head (dd889da) 41.58%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #81 +/- ## ============================================ + Coverage 41.56% 41.58% +0.01% Complexity 332 332 ============================================ Files 128 128 Lines 2127 2126 -1 Branches 149 149 ============================================ Hits 884 884 + Misses 1152 1151 -1 Partials 91 91 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `41.58% <0.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=clightning4j#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/clightning4j/JRPClightning/pull/81?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=clightning4j) | Coverage Δ | | |---|---|---| | [...java/jrpc/clightning/plugins/CLightningPlugin.java](https://codecov.io/gh/clightning4j/JRPClightning/pull/81?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=clightning4j#diff-c3JjL21haW4vamF2YS9qcnBjL2NsaWdodG5pbmcvcGx1Z2lucy9DTGlnaHRuaW5nUGx1Z2luLmphdmE=) | `0.00% <0.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=clightning4j). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=clightning4j)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.