GoogleCloudPlatform / GoogleCloudPlatform/cloud-opensource-java

LinkageCheckerMain to provide clear error message when the supplied coordinates are invalid

未关闭
#1,948 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug good first issue help wanted p2
主要语言
Java
星标
163
派生
80
PR 合并指标
30 天内没有已合并 PR

描述

When I pass an invalid coordinates to LinkageCheckerMain, it throws `IndexOutOfBoundsException`. This does not tell the cause of the error.

```
> Task :checkJavaLinkage
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.IndexOutOfBoundsException: end index (1) must not be greater than size (0)
at com.google.common.base.Preconditions.checkPositionIndexes(Preconditions.java:1420)
at com.google.common.collect.ImmutableList.subList(ImmutableList.java:433)
at com.google.cloud.tools.opensource.classpath.LinkageCheckerMain.checkArtifacts(LinkageCheckerMain.java:159)
at com.google.cloud.tools.opensource.classpath.LinkageCheckerMain.main(LinkageCheckerMain.java:66)

> Task :checkJavaLinkage FAILED

```

贡献指南

打开贡献指南

调研方向

Start in LinkageCheckerMain.checkArtifacts at line 159 and reproduce the failure with invalid coordinates. Trace how the supplied coordinates are handled, then verify that invalid input produces a clear error message instead of IndexOutOfBoundsException.

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
cli
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。