Skip to content

FFmpegOutputBuilder - Minor tweaks#37

Merged
bramp merged 1 commit intobramp:progressfrom
stonio:patch-3
Jun 22, 2016
Merged

FFmpegOutputBuilder - Minor tweaks#37
bramp merged 1 commit intobramp:progressfrom
stonio:patch-3

Conversation

@stonio
Copy link
Copy Markdown
Contributor

@stonio stonio commented Jun 22, 2016

No description provided.

checkState(parent.inputs.size() == 1, "Target size does not support multiple inputs");

String firstInput = parent.inputs.get(0);
String firstInput = parent.inputs.iterator().next();
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.

Is this better than get(0)?

Copy link
Copy Markdown
Contributor Author

@stonio stonio Jun 22, 2016

Choose a reason for hiding this comment

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

If you later replace List by Collection the trick .iterator().next() still works.

Reference: http://stackoverflow.com/questions/1671378/java-get-first-item-from-a-collection

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.

Ok, sure, it just seems a little less readable. But I'm not hugely concerned either way.

@bramp
Copy link
Copy Markdown
Owner

bramp commented Jun 22, 2016

Thanks, lots of good changes!

@bramp bramp merged commit fa3eeba into bramp:progress Jun 22, 2016
@stonio stonio deleted the patch-3 branch June 22, 2016 15:28
bramp pushed a commit that referenced this pull request Jun 26, 2016
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.

2 participants