Use EnumSet instead of List for MediaCapabilities inside Service#1449
Merged
TobiGr merged 2 commits intoTeamNewPipe:devfrom Feb 21, 2026
Merged
Use EnumSet instead of List for MediaCapabilities inside Service#1449TobiGr merged 2 commits intoTeamNewPipe:devfrom
TobiGr merged 2 commits intoTeamNewPipe:devfrom
Conversation
Merged
4 tasks
Contributor
Author
|
Performance win is probably very low but it is good for semantic... But List implementation is unmodifiable while EnumSet can't be and List conveys the semantic very well so this PR, well, the most useless/arguable my PR... Sorry... |
Contributor
|
please fix the linting errors |
3b3a27a to
f825e5d
Compare
Contributor
Author
|
I thought if I directly import it in newpipe, it will run checkstyle of extractor automatically 😅 |
4 tasks
Contributor
Author
|
@TobiGr Should I replace it with Set? |
Contributor
|
Yes, please use Set in the declarations and EnumSet as implementation |
f825e5d to
857c181
Compare
Contributor
|
Sorry, i meant instantiation and not implementation. |
dustdfg
commented
Feb 15, 2026
extractor/src/main/java/org/schabi/newpipe/extractor/StreamingService.java
Outdated
Show resolved
Hide resolved
TobiGr
approved these changes
Feb 21, 2026
Contributor
TobiGr
left a comment
There was a problem hiding this comment.
LGTM, I misunderstood the changes.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



🔴 Breaking API change
Service.getMediaCapabilities()now returnsEnumSet<MediaCapability>instead ofList<MediaCapability>