Skip to content

Commit

Permalink
perf: Check for extension without a class proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Nov 11, 2024
1 parent 309618b commit a6a74e2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fun sharedExtensionPatch(
extendWith("extensions/shared.rve")

execute {
if (classBy { EXTENSION_CLASS_DESCRIPTOR in it.type } == null) {
if (classes.none { EXTENSION_CLASS_DESCRIPTOR == it.type }) {
throw PatchException(
"Shared extension has not been merged yet. This patch can not succeed without merging it.",
)
Expand All @@ -35,7 +35,7 @@ fun sharedExtensionPatch(
*/
fun getCurrentJarFilePath(): String {
val className = object {}::class.java.enclosingClass.name.replace('.', '/') + ".class"
val classUrl = object {}::class.java.classLoader.getResource(className)
val classUrl = object {}::class.java.classLoader?.getResource(className)
if (classUrl != null) {
val urlString = classUrl.toString()

Expand Down

0 comments on commit a6a74e2

Please sign in to comment.