Skip to content

Conversation

@AlphaSaraday
Copy link

修改内容

com.alipay.antchain.bridge.plugins.spi.bbc.core.write.IVerifierWriter的updatePTCTrustRoot抽象接口,在其定义前新增default关键字

修改原因

com.alipay.antchain.bridge.plugins.spi.utils.pf4j.Utils中的getBBCVersion方法,是通过反射检查某个IBBCService实现类(即插件中)是否overrideupdatePTCTrustRoot方法,从而判断该BBCService属于V0还是V1版本。但由于IBBCService是声明的抽象类,在语法限制下,BBCService作为实现类,必须要对IBBCService中的所有方法(包括updatePTCTrustRoot)进行override,从而导致getBBCVersion的判断结果会固定为V1。

修改结果

updatePTCTrustRoot抽象接口中新增default关键字后,BBCService实现类中就能选择是否对updatePTCTrustRoot方法进行override,从而让getBBCVersion方法能够正确判断BBCService属于V0还是V1版本。

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.

1 participant