You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by "linhongyu510 (via GitHub)" <gi...@apache.org> on 2026/08/31 11:59:02 UTC

[PR] GH-4181: Validate TRIPLE argument ranges [jena]

linhongyu510 opened a new pull request, #4182:
URL: https://github.com/apache/jena/pull/4182

   ## Description
   
   关联问题:#4181
   
   ## 变更内容
   
   ### SPARQL 1.2 TRIPLE 函数参数范围校验
   
   - 在 TripleTermOps.fnTriple() 中实现严格的参数类型校验:
     - Subject: 必须是 URI 或 Blank Node
     - Predicate: 必须是 URI
     - Object: 必须是 URI、Blank Node、Literal 或 Triple Term
   - 移除 strict-mode 特殊处理,统一使用标准 RDF 三元组验证逻辑
   - 添加详细的异常信息,指明具体哪个参数不符合要求
   
   ### 测试覆盖
   
   - 新增 TestExprTripleTerms.java 定向测试:
     - tripleTerm_BadSubjectLiteral(): 验证 Subject 为 Literal 时抛出异常
     - tripleTerm_BadSubjectTripleTerm(): 验证嵌套 Triple Term 时抛出异常
     - tripleTerm_BadObjectExtensionNode(): 验证 Object 为 Extension Node 时抛出异常
     - tripleTerm_Access1(): 验证正常的 TRIPLE 构造和 accessor 方法
   - 更新 TestExpressions.java:
     - 移除严格模式下允许非 RDF 三元组的测试
     - 添加标准模式下的参数校验测试
     - 清理 strict-mode 相关辅助方法
   
   ### 测试结果
   
   - 定向测试全部通过
   - jena-arq 完整测试套件:19,705 tests / 0 failures / 0 errors / 12 skipped
   - diff-check 通过,无代码风格问题
   
   ## 检查清单
   
   - [x] 代码遵循项目规范
   - [x] 新增/更新测试覆盖所有变更
   - [x] 无编译错误和警告
   - [x] 已运行完整测试套件
   - [x] 文档已更新(如适用)
   
   ## 测试报告
   
   定向测试:PASS
   jena-arq 聚合测试:19,705 tests / 0 failures / 0 errors / 12 skipped
   diff-check:PASS
   
   ## AI Assistance Disclosure
   
   AI assisted investigation/implementation/test drafting; author reviewed code and ran tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


Re: [PR] GH-4181: Validate TRIPLE argument ranges [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on PR #4182:
URL: https://github.com/apache/jena/pull/4182#issuecomment-5566977745

   Replaced by #4199 .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


Re: [PR] GH-4181: Validate TRIPLE argument ranges [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on PR #4182:
URL: https://github.com/apache/jena/pull/4182#issuecomment-5550692430

   Hi @linhongyu510 - thank you very much for the PR.
   
   There are two elements for triple operations. The Function `TRIPLE(s,p,o)` and also the expression
   context use of `<<(s p o)>>`. In the algebra they are `(triple...)` and `(tripleterm ...)` respectively.
   
   The issue is talking about the latter; this PR is changing `TRIPLE`. The "strict" condition for `TRIPLE` could be changed so that normal operation checks and for that I'll pick out the tests on this PR and include them in the expression test suite.
   
   Thank you.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


Re: [PR] GH-4181: Validate TRIPLE argument ranges [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs closed pull request #4182: GH-4181: Validate TRIPLE argument ranges
URL: https://github.com/apache/jena/pull/4182


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org