daimajia / daimajia/java-multithread-downloader

String index out of range!

Open
#11 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
267
Forks
125
PR merge metrics
No merged PRs in 30d

Description

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
My code looks like this
```
String url=urls.get(options_list.getSelectionModel().getSelectedIndex());
String filename = file.getAbsolutePath();
DownloadManager downloadManager = DownloadManager.getInstance();
DownloadMission mission = new DownloadMission(url,"",filename);
downloadManager.addMission(mission);
downloadManager.start();
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the exception from the provided snippet, checking the selected index returned by options_list and tracing the DownloadMission and DownloadManager entry points. The issue names no files or tests; done means identifying the failing assumption and confirming the reported download flow no longer raises StringIndexOutOfBoundsException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.