[2.0.x→3.0.x] fix(jaxrs): 3 bugs + surefire argLine + CodeGraph docs + bilingual README - #2
Open
loong10k wants to merge 58 commits into
Open
[2.0.x→3.0.x] fix(jaxrs): 3 bugs + surefire argLine + CodeGraph docs + bilingual README#2loong10k wants to merge 58 commits into
loong10k wants to merge 58 commits into
Conversation
…re across hiwepy projects
…ven-compiler-plugin 配置与 jacoco 覆盖率检查
…gin.version 与 maven-central-publishing-plugin.version
…6.1.0),修正误用 junit.version 的依赖引用
…surefire skip=false
…surefire skip=false
- Remove source/target, use release only - Fix maven.version per branch - Fix enforcer requireMavenVersion for Maven 4 (3.0.x) - Fix java.version values - Fix maven-wrapper.properties - Add properties 3-part comments
- Remove source/target, use release only - Fix maven.version per branch - Fix enforcer requireMavenVersion for Maven 4 (3.0.x) - Fix java.version values - Fix maven-wrapper.properties - Add properties 3-part comments
… java-component-patterns
… java-component-patterns
… into feature/2.0.x - Resolve merge conflict in pom.xml: keep feature/2.0.x JDK baseline (java.version=17, add-opens for JDK 17) - Keep feature/1.0.x code: 3 bugfixes (RestParam from=from×3 / defAnnot write / RestParamTest PATH assertions×2) + 3 bilingual docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复概述
使用 CodeGraph 语义代码审查(6 维:数据流 / 符号执行 / 构造器全字段赋值 / 字节码常量池 / Builder 对称设计 / True Negative SOAP 侧交叉排除)在 feature/1.0.x / feature/2.0.x / feature/3.0.x / main 四条分支同时识别并修复 3 个真实 Bug + 1 个构建静默失效 Bug,反向同步 2 处测试断言(保证旧"坏值匹配"的测试在修复后仍然 PASS),新增 2 份 BuilderTest +450LOC 覆盖率提升,并补充完整 CodeGraph 审查证据技术方案与双语 README。
3+1 Bug 清单(CodeGraph 真阳性)
RestParam(Class, String, HttpParamEnum)三参构造器HttpParamEnum.PATH/HEADER/FORM/COOKIE全部退化为QUERYthis.from = fromRestParam(Class, String, HttpParamEnum, String)四参构造器this.name = name被复制粘贴写两遍this.from = from且重复 name 赋值JaxrsEndpointApiUtils.annotParams()defAnnot 回填[@QueryParam, @QueryParam]重复引用,@DefaultValue永不生效 → 下游 NPE/0paramArrays[i][1] = paramAnnot→ 应为= defAnnotpom.xmlsurefire<argLine>前缀jacoco.exec0 字节 → 覆盖率 0% 但 CI BUILD SUCCESS,极易漏过@{argLine}惰性占位符前缀,JaCoCoprepare-agent无法注入-javaagent:jacocoagent.jar构建差异化(JDK 线分档)
@{argLine}后追加--add-opens java.base/java.lang=ALL-UNNAMED--add-opens java.base/java.lang.reflect=ALL-UNNAMED让 Javassist 绕过 JPMS 强封装写入
jdk.internal.reflect.*--add-opens(否则 JVM 直接Unrecognized option导致 Surefire 退出)测试反向断言修复(RestParamTest)
修复前两处断言匹配的是已知坏值(Green-on-Bug,测试因匹配错误值才 PASS):
shouldCreateParamWithExplicitFrom:assertEquals(QUERY, param.getFrom())→ 改为assertEquals(PATH, param.getFrom())shouldCreateParamWithFromAndDefault:末尾新增assertEquals(PATH, param.getFrom())(此前对 from 字段零断言)4 分支本地实测(全部 PASS)
新增 / 更新文档(4 分支各一份,共 12 个 md 文件)
TECHNICAL-DESIGN.md— 技术方案(含 CodeGraph 6 维审查方法 + 3+1 真阳性代码对比证据 + True Negative SOAP 侧免疫说明 + ADR-001~005)README.md— 英文默认入口(§4.2 Builder 对称表 §7.1 构造器全字段赋值表 §9 worktree 目录 §10 FAQ add-opens / commons 锁版对照表)README.zh-CN.md— 中文逐段对齐英文版Commons 三件套 JDK 8 兼容锁版
四分支已全部使用 JDK 8 线的最终版本:
commons-lang3 = 3.20.0(3.21+ 需 JDK 11,禁止升级)commons-io = 2.22.0(2.23+ 需 JDK 11,禁止升级)commons-beanutils = 1.11.0(1.x 线最终版)关联 CI Status
feature/1.0.xpush CI: ✅ successfeature/2.0.xpush CI: ✅ successmainpush CI: ✅ successfeature/3.0.xpush CI:<modelVersion>4.1.0</modelVersion>的 Maven 4 语法与 Actions 默认 Maven 版本不兼容,属于独立的 Maven 版本升级议题)📎 详细 CodeGraph 符号执行证据链请查阅仓库根目录
TECHNICAL-DESIGN.md§3 CodeGraph 审查维度与 §4 Bug 根因代码对比。