From 6707bfa1cf5a027e788f6320170e614c0cc0e1b7 Mon Sep 17 00:00:00 2001 From: icecream Date: Mon, 14 Oct 2024 03:21:26 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E5=8D=87=E7=BA=A7=20asm=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 0956582..4b67c08 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,16 +1,16 @@ plugins { - java kotlin("jvm") version "2.0.10" + java `java-library` `maven-publish` } -val dependencyAsm by extra("9.3") +val dependencyAsm by extra("9.7.1") val dependencyFastJSON2 by extra("2.0.46") val dependencySlf4j by extra("2.0.9") group = "com.IceCreamQAQ.Rain" -version = "1.0.0-DEV1" +version = "1.0.0-DEV2" allprojects { repositories { @@ -52,7 +52,7 @@ subprojects { create(name) { groupId = "com.IceCreamQAQ.Rain" artifactId = name - version = "1.0.0-DEV1" + version = rootProject.version.toString() pom { name.set("Rain Java Dev Framework") From 2a502af18e721561cc3788aad3da6e08a1439415 Mon Sep 17 00:00:00 2001 From: icecream Date: Mon, 14 Oct 2024 04:33:33 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9C=A8=E5=A2=9E?= =?UTF-8?q?=E5=BC=BA=E6=97=B6=E6=A0=87=E8=AE=B0=E7=9A=84=E6=B3=A8=E8=A7=A3?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/kotlin/rain/classloader/enchant/EnchantManager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/enhance/classloader/src/main/kotlin/rain/classloader/enchant/EnchantManager.kt b/enhance/classloader/src/main/kotlin/rain/classloader/enchant/EnchantManager.kt index e2d26d9..6d1759f 100644 --- a/enhance/classloader/src/main/kotlin/rain/classloader/enchant/EnchantManager.kt +++ b/enhance/classloader/src/main/kotlin/rain/classloader/enchant/EnchantManager.kt @@ -12,7 +12,8 @@ class EnchantManager(private val classloader: IRainClassLoader) : ClassTransform for (annotation in node.visibleAnnotations) { val annotationClassName = annotation.desc.substring(1, annotation.desc.length - 1).replace("/", ".") - val annotationClass = classloader.forName(annotationClassName, false) + val annotationClass = + kotlin.runCatching { classloader.forName(annotationClassName, false) }.getOrNull() ?: continue val aa = annotationClass.annotations for (a in aa) { if (a is EnchantBy) { From 96cef51fb038fd0c28ddaf60f343d55bbf63aa75 Mon Sep 17 00:00:00 2001 From: icecream Date: Thu, 17 Oct 2024 06:28:27 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/function/src/main/kotlin/rain/function/asm.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/function/src/main/kotlin/rain/function/asm.kt b/tools/function/src/main/kotlin/rain/function/asm.kt index 7907d9c..6980e2a 100644 --- a/tools/function/src/main/kotlin/rain/function/asm.kt +++ b/tools/function/src/main/kotlin/rain/function/asm.kt @@ -86,9 +86,9 @@ fun makeCast(mv: MethodVisitor, type: String) { fun getTypedWidth(type: String): Int = when (type[0]) { - 'B', 'S', 'I', 'Z', 'F', 'C' -> 1 +// 'B', 'S', 'I', 'Z', 'F', 'C' -> 1 'J', 'D' -> 2 - else -> ARETURN + else -> 1 } From bbd1ca392c3b371485a7abf8d695c6d933ddb14d Mon Sep 17 00:00:00 2001 From: icecream Date: Thu, 17 Oct 2024 19:19:36 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E5=B0=86=20SimpleKJReflectMethodInvoker?= =?UTF-8?q?=20=E7=9A=84=E5=88=9D=E5=A7=8B=E5=8C=96=E8=BF=87=E7=A8=8B?= =?UTF-8?q?=E4=BB=8E=E6=9E=84=E9=80=A0=E5=87=BD=E6=95=B0=E6=8F=90=E5=87=BA?= =?UTF-8?q?=E4=BB=A5=E5=85=81=E8=AE=B8=E5=90=8E=E6=AE=B5=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rain/controller/simple/SimpleKJReflectMethodInvoker.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/controller/src/main/kotlin/rain/controller/simple/SimpleKJReflectMethodInvoker.kt b/module/controller/src/main/kotlin/rain/controller/simple/SimpleKJReflectMethodInvoker.kt index 3b5ce4e..ee229fa 100644 --- a/module/controller/src/main/kotlin/rain/controller/simple/SimpleKJReflectMethodInvoker.kt +++ b/module/controller/src/main/kotlin/rain/controller/simple/SimpleKJReflectMethodInvoker.kt @@ -116,7 +116,7 @@ abstract class SimpleKJReflectMethodInvoker( val resultFlag = method.returnType.name != "void" - init { + open fun init(): ProcessInvoker { method.kotlinFunction?.let { kFun -> var instanceParam: KParameter? = null kFun.parameters.mapNotNull { @@ -166,6 +166,7 @@ abstract class SimpleKJReflectMethodInvoker( } } + return this } abstract fun initParam(method: Method, params: Array>) From f81d4f4777d6bf2dd30c960914e4d54a06ef61f1 Mon Sep 17 00:00:00 2001 From: icecream Date: Sun, 29 Dec 2024 03:38:37 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=BA=9B=20as?= =?UTF-8?q?m=20=E5=B0=81=E8=A3=85=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/function/src/main/kotlin/rain/function/asm.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/function/src/main/kotlin/rain/function/asm.kt b/tools/function/src/main/kotlin/rain/function/asm.kt index 6980e2a..d077c26 100644 --- a/tools/function/src/main/kotlin/rain/function/asm.kt +++ b/tools/function/src/main/kotlin/rain/function/asm.kt @@ -25,6 +25,15 @@ fun getLoad(type: String): Int = else -> ALOAD } +fun getStore(type: String): Int = + when (type[0]) { + 'B', 'S', 'I', 'Z', 'C' -> ISTORE + 'J' -> LSTORE + 'F' -> FSTORE + 'D' -> DSTORE + else -> ASTORE + } + fun getReturn(type: String): Int = when (type[0]) { 'B', 'S', 'I', 'Z', 'C' -> IRETURN From 375d9e00c06b4393be2e6b88ea14f0fffaddd47b Mon Sep 17 00:00:00 2001 From: icecream Date: Sun, 29 Dec 2024 03:38:48 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20FastJSON=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4b67c08..3483b83 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } val dependencyAsm by extra("9.7.1") -val dependencyFastJSON2 by extra("2.0.46") +val dependencyFastJSON2 by extra("2.0.53") val dependencySlf4j by extra("2.0.9") group = "com.IceCreamQAQ.Rain" From 1c23d8e1e62f57dacf3eae209ad8b1a07fe16c5b Mon Sep 17 00:00:00 2001 From: icecream Date: Sun, 29 Dec 2024 03:39:15 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/rain/controller/simple/SimpleCatchMethodInvoker.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/controller/src/main/kotlin/rain/controller/simple/SimpleCatchMethodInvoker.kt b/module/controller/src/main/kotlin/rain/controller/simple/SimpleCatchMethodInvoker.kt index 2de0b2a..9b07b1a 100644 --- a/module/controller/src/main/kotlin/rain/controller/simple/SimpleCatchMethodInvoker.kt +++ b/module/controller/src/main/kotlin/rain/controller/simple/SimpleCatchMethodInvoker.kt @@ -9,7 +9,7 @@ class SimpleCatchMethodInvoker( ) : ProcessInvoker { override suspend fun invoke(context: CTX): Any? { - if (context.runtimeError == null || errorType.isAssignableFrom(context.runtimeError!!::class.java)) return null + if (context.runtimeError == null || !errorType.isInstance(context.runtimeError)) return null return invoker.invoke(context) } From 7deb4fe8d8a8ff7335017f29d1e05dd07d2463de Mon Sep 17 00:00:00 2001 From: icecream Date: Sun, 29 Dec 2024 03:39:24 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=BC=80=E5=90=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/job/src/main/kotlin/rain/job/JobCenter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/job/src/main/kotlin/rain/job/JobCenter.kt b/module/job/src/main/kotlin/rain/job/JobCenter.kt index 100a686..f86ec48 100644 --- a/module/job/src/main/kotlin/rain/job/JobCenter.kt +++ b/module/job/src/main/kotlin/rain/job/JobCenter.kt @@ -31,7 +31,7 @@ class JobCenter( override fun start() { - jobs.values.forEach { it.start() } +// jobs.values.forEach { it.start() } } override fun stop() { From 91d4330ef223cfbfde7c35f9039725466838880f Mon Sep 17 00:00:00 2001 From: icecream Date: Sat, 18 Jan 2025 04:30:47 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E5=8D=87=E7=BA=A7=20logback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/base/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/base/build.gradle.kts b/test/base/build.gradle.kts index c462490..1dc70b0 100644 --- a/test/base/build.gradle.kts +++ b/test/base/build.gradle.kts @@ -3,6 +3,6 @@ plugins { } dependencies { - api("ch.qos.logback:logback-classic:1.3.14") + api("ch.qos.logback:logback-classic:1.3.15") api(project(":rain-test")) } \ No newline at end of file From b909a0dd3ac5dd5f18d312ae3c936d77a9cfd4fe Mon Sep 17 00:00:00 2001 From: icecream Date: Sat, 18 Jan 2025 04:32:27 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E5=8D=87=E7=BA=A7=20FastJSON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3483b83..52f71b8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } val dependencyAsm by extra("9.7.1") -val dependencyFastJSON2 by extra("2.0.53") +val dependencyFastJSON2 by extra("2.0.54") val dependencySlf4j by extra("2.0.9") group = "com.IceCreamQAQ.Rain"