Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

crash when the project's git repo doesn't have any remotes

未关闭
#278 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

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

调研方向

从 GitUtil.java:103 的 com.appland.appmap.util.GitUtil.getRepositoryURL 及其来自 AppMapSerializer.writeMetadata 的调用开始。在没有远程仓库的 repository 中重现 Java agent 的运行,然后验证记录在没有 IndexOutOfBoundsException 的情况下停止,并且元数据写入完成。

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

描述

ajp@Alans-MacBook-Pro java % git remote -v                                                                                                
main 20240519 135907
ajp@Alans-MacBook-Pro java % java -Dappmap.recording.auto=true -javaagent:$HOME/.appmap/lib/java/appmap.jar com/example/hw/HelloWorld.java
Hello World!
Exception in thread "Thread-3" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
	at java.base/java.util.Objects.checkIndex(Objects.java:372)
	at java.base/java.util.ArrayList.get(ArrayList.java:459)
	at com.appland.appmap.util.GitUtil.getRepositoryURL(GitUtil.java:103)
	at com.appland.appmap.record.AppMapSerializer.writeMetadata(AppMapSerializer.java:186)
	at com.appland.appmap.record.AppMapSerializer.write(AppMapSerializer.java:73)
	at com.appland.appmap.record.RecordingSession.stop(RecordingSession.java:127)
	at com.appland.appmap.record.Recorder.stop(Recorder.java:270)
	at com.appland.appmap.Agent.lambda$startAutoRecording$2(Agent.java:151)
	at java.base/java.lang.Thread.run(Thread.java:829)
main 20240519 135911
主要语言
Java
星标
88
派生
17
平均合并
2 天 2 小时
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getappmap/appmap-java 的其他 Issue

查看 getappmap/appmap-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

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