升级javassist到3.22.0-GA版本,过滤module-info.class,解决 java.io.IOException: invalid constant type: 19 at 5 #431
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
背景:
gradle版本:6.5
gradle插件版本:3.6.3
在打开robust插件编译过程中出现一下错误
java.lang.RuntimeException: java.io.IOException: invalid constant type: 19 at 5
at javassist.CtClassType.getClassFile2(CtClassType.java:211)
at javassist.CtClassType.getModifiers(CtClassType.java:407)
at robust.gradle.plugin.asm.AsmInsertImpl.insertCode(AsmInsertImpl.java:54)
经过排查,出现的原因是javassist版本过低导致,因此此提交做了一下两项工作:
1、升级javassist,从3.20.0-GA升级到3.22.0-GA。
2、在类处理过程中,过滤掉3.22.0-GA版本产生的module-info.class,否则在编译的过程中会出现一下错误: