Files
2026Technology-Competition/data/demo-pmd/src/com/demo/errorprone/extra/StaticEJBFieldDemo.java
T
范智鹏 3c390cfa90 feat: demo-pmd 样本工程入库 + Windows spawn cmd EINVAL 修复 + 实测报告清理
- data/demo-pmd 全量入库(26 源文件 + pom/mvnw/lib/reports),.gitignore 排除 target/
- 归档 demo-pmd 实测覆盖率报告(279/279 全覆盖)至 reports/
- 删除 4 份覆盖率报告中的后续建议/实测进度总览(全部实测已收官)
- 修复 Windows spawn .cmd/.bat EINVAL(auxClasspath.ts 经 cmd.exe /d /s /c 间接执行)
2026-08-26 22:04:47 +08:00

22 lines
661 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// ============================================================
// PMD 演示样例 — StaticEJBFieldShouldBeFinalEJB 静态字段应为 final
// ============================================================
package com.demo.errorprone.extra;
import javax.ejb.EJBObject;
import javax.ejb.EJBLocalHome;
// 221 StaticEJBFieldShouldBeFinal
public class SomeEJB extends EJBObject implements EJBLocalHome {
private static int CountA; // 可写静态字段(违例)
int CountC;
public void work() {
CountA++;
}
}
class EJBStaticMain {
public static void main(String[] args) {
System.out.println("demo ejb static");
}
}