apache / apache/maven-scripting-plugin
UncheckedIOException
- 主要语言
- Java
- 星标
- 15
- 派生
- 10
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Affected version
HEAD
### Bug description
There are several UncheckedIOExceptions for issues that can definitely happen, and that are not handled where they should be. E.g.
```
protected Object eval(ScriptEngine engine, ScriptContext context) throws ScriptException {
try (FileReader reader = new FileReader(scriptFile)) {
return engine.eval(reader, context);
} catch (IOException ex) {
throw new UncheckedIOException(scriptFile + " caused:", ex);
}
}
```
This is risky and bug prone. Ideally these should be changed to IOException, but if API compatibility prevents that it looks like most could be replaced with a ScriptException instead.
贡献指南
这个仓库没有索引到贡献指南
调研方向
定位包含 eval 方法和 FileReader/UncheckedIOException 示例的 ScriptEngine 求值代码,然后检查 plugin 中其他 UncheckedIOException 路径。检查每种情况是否可以暴露 IOException,或必须保持与 ScriptException 的 API 兼容性;当不恰当的 unchecked 异常被一致地替换,并且受影响的行为由现有测试套件覆盖时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- build-system
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100