Skip to content

Update QueueModerator.java#41

Open
pishguy wants to merge 7 commits into
majidgolshadi:masterfrom
pishguy:master
Open

Update QueueModerator.java#41
pishguy wants to merge 7 commits into
majidgolshadi:masterfrom
pishguy:master

Conversation

@pishguy

@pishguy pishguy commented Nov 30, 2016

Copy link
Copy Markdown

FIX BUG: get exception when task size is less than downloadPerTime

Get ```IndexOutOfBoundsException``` error
Add some code to help user to how can we use download multiple task
this.listener = downloadManagerListener;
this.downloadTaskPerTime = downloadPerTime;

if (tasks.size() < downloadPerTime) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe It's better to write something like this

 this.downloadTaskPerTime = downloadPerTime;
 if (tasks.size() < downloadPerTime) {
       this.downloadTaskPerTime = tasks.size();
}

But why?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes you have right, its better than my code


downloaderList =
new HashMap<Integer, Thread>(downloadTaskPerTime);
downloaderList =new HashMap<>(downloadTaskPerTime);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

downloadTaskPerTime variable still final ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Alamusitl are you familiar with this library?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not much

Add DeleteAllUncompletedsDownloads from database and files
add allUnCompleteds function
Fix latest commit for downloadTaskPerTime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants