GoogleCloudPlatform/cloud-opensource-java

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

開放

#1,948 建立於 2021年2月19日

 (3 則留言) (0 個反應) (0 位負責人)Java (80 個分叉)auto 404
buggood first issuehelp wantedp2

倉庫指標

星標
 (162 顆星)
PR 合併指標
 (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

貢獻者指南