gpt4 book ai didi

java - 在 Maven 中添加 Intellij IDEA 运行时断言功能

转载 作者:行者123 更新时间:2023-11-30 02:35:08 31 4
gpt4 key购买 nike

Intellij IDEA 中有一个功能:

Build, Execution, Deployment > Compiler > Add runtime assertions for non-null-annotated methods and parameters

它会在需要的地方注入(inject)空检查。我希望在使用 Maven 构建时具有相同的功能。有没有简单的方法可以将其作为插件或其他东西放入 Maven 中?

我找到了intellij-annotations-instrumenter-maven-plugin这似乎就是我正在寻找的(是吗?),但它的最后一次提交是在 2013 年 10 月 9 日。

谢谢。

最佳答案

您提到的存储库有一个 fork 版本,我相信它可以满足您的需求(以及其他一些有用的补充)。它的最新版本是在 2016 年 9 月 https://github.com/osundblad/intellij-annotations-instrumenter-maven-plugin

它也作为 Maven Artifact 广泛发布 https://mvnrepository.com/artifact/se.eris/notnull-instrumenter-maven-plugin

关于java - 在 Maven 中添加 Intellij IDEA 运行时断言功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43294808/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com