gpt4 book ai didi

java - 如何修复 Sonar 在代码分析期间抛出 ArrayIndexOutOfBoundsException

转载 作者:行者123 更新时间:2023-12-01 11:20:36 25 4
gpt4 key购买 nike

如何修复代码分析过程中的ArrayIndexOutOfBoundsException?我使用 Sonar 运行器版本 2.4。许多文件都遇到同样的问题。请在下面找到完整的堆栈。

17:19:59.150 INFO  - Execute decorators...
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 7:25.061s
Final Memory: 22M/510M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'org.sonar.api.resources.File@4156d9a8[key=private/gp_cmd_stop.c,deprecatedKey=gp_cmd_stop.c,path=private/gp_cmd_stop.c,dir=[root],filename=gp_cmd_stop.c,language=C]'
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:103)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:86)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:78)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:78)
at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:70)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:126)
...
... 9 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 168
at org.sonar.plugins.core.issue.tracking.FileHashes.getHash(FileHashes.java:75)
at org.sonar.plugins.core.issue.IssueTracking.setChecksumOnNewIssues(IssueTracking.java:69)
at org.sonar.plugins.core.issue.IssueTracking.track(IssueTracking.java:54)
at org.sonar.plugins.core.issue.IssueTrackingDecorator.doDecorate(IssueTrackingDecorator.java:138)
at org.sonar.plugins.core.issue.IssueTrackingDecorator.decorate(IssueTrackingDecorator.java:112)
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:95)
... 37 more
ERROR:
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.

最佳答案

与 SonarSource 商业插件相关的问题应在 http://support.sonarsource.com 上提出。如果您还没有访问此 SonarSource 帮助台的帐户,请联系您的销售代表获取一个帐户。

致以诚挚的问候。

关于java - 如何修复 Sonar 在代码分析期间抛出 ArrayIndexOutOfBoundsException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31273099/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com