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 间接执行)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// ============================================================
|
||||
// PMD 演示样例 — CallSuperFirst / CallSuperLast
|
||||
// 使用 android.app.Activity 生命周期方法
|
||||
// ============================================================
|
||||
package com.demo.errorprone.extra;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
||||
// 165 CallSuperFirst:onCreate 应首先调用 super.onCreate
|
||||
class MissingSuperFirst extends Activity {
|
||||
@Override
|
||||
protected void onCreate(Bundle bundle) {
|
||||
foo(); // 未先调用 super.onCreate
|
||||
}
|
||||
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
|
||||
// 166 CallSuperLast:onPause 应最后调用 super.onPause
|
||||
class MissingSuperLast extends Activity {
|
||||
@Override
|
||||
protected void onPause() {
|
||||
foo(); // 未最后调用 super.onPause
|
||||
}
|
||||
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
|
||||
class CallSuperMain {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("demo call super");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user