Oracle 禁 AI 代码入 OpenJDK
推荐指数 42.0 NO. 022 · 2026.08.08
发布2026/08/07Score161Comments95
为什么值得看
Oracle 禁止向 OpenJDK 提交 AI 生成代码,允许私下用 LLM 调试审查,理由是安全与知识产权风险。这与 Ellison 宣称 Oracle 内部已用 AI 写代码形成鲜明反差,暴露大厂对开源合规与闭源产品采用双重标准。
编辑判断
Oracle 这套内外有别的操作,本质是开源项目的法律防火墙策略。OpenJDK 作为 GPL 项目,AI 代码的版权归属和专利侵权风险至今没有判例定调,Oracle 不想当被告。
更值得玩味的是时机:Google 与 Oracle 的 Java API 版权案刚落幕不久,大厂对代码来源的洁癖正在上升。如果你在维护开源项目,建议现在就开始在 CONTRIBUTING.md 里明确 AI 代码政策,别等出事了再补。
对用 AI 辅助写 Java 的工程师来说,这不会阻止你本地生成再手改提交,但 CI 里加代码溯源检测工具可能是下一个标配。
社区反馈
意见分歧 94 条评论
核心争论:Oracle 开源合规与闭源实践双重标准,AI 代码禁令是真心为质量还是规避 IP 风险
So Java, which powers a sizeable chunk of the real-world since two decades now, without needing the help of LLMish sloppy-pasta, is going to continue to power the Real World [TM] with its language and JVM that have been created with tens of millions of human man-hours without LLMish sloppy-pasta? I'
> countless of LLMish sloppy-pasta code that's now running and going to be run on man-made JVMs. Don’t worry, I think most LLMs, when starting a greenfield codebase, don’t reach for Java, so it may be a smaller amount of code affected than you feared.
If you asked the LLM to create an Android app it probably would.