Skip to content

升级javassist到3.22.0-GA版本,过滤module-info.class,解决 java.io.IOException: invalid constant type: 19 at 5#431

Open
yflei88 wants to merge 1 commit into
Meituan-Dianping:masterfrom
yflei88:master
Open

升级javassist到3.22.0-GA版本,过滤module-info.class,解决 java.io.IOException: invalid constant type: 19 at 5#431
yflei88 wants to merge 1 commit into
Meituan-Dianping:masterfrom
yflei88:master

Conversation

@yflei88

@yflei88 yflei88 commented Sep 28, 2020

Copy link
Copy Markdown

背景:
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,否则在编译的过程中会出现一下错误:
image

@yflei88 yflei88 changed the title 升级javassist到3.22.0-GA版本,过滤module-info.class。 升级javassist到3.22.0-GA版本,过滤module-info.class,解决java.lang.RuntimeException: java.io.IOException: invalid constant type: 19 at 5 Sep 28, 2020
@yflei88 yflei88 changed the title 升级javassist到3.22.0-GA版本,过滤module-info.class,解决java.lang.RuntimeException: java.io.IOException: invalid constant type: 19 at 5 升级javassist到3.22.0-GA版本,过滤module-info.class,解决 java.io.IOException: invalid constant type: 19 at 5 Sep 28, 2020
@YummyLau

Copy link
Copy Markdown

这个问题我也遇到了.官方不不打算处理下么?

@yflei88

yflei88 commented Jan 30, 2021

Copy link
Copy Markdown
Author

这个问题我也遇到了.官方不不打算处理下么?

按照我这个commit去修改一下源码就可以了

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