Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseDescriptionFragment: Assert member is initialized #10781

Conversation

Profpatsch
Copy link
Contributor

@Profpatsch Profpatsch commented Jan 23, 2024

streamInfo and channelInfo have to be initialized, since the only way to construct the class it to pass them. So we can remove the null check boilerplate and make some of the accessors NonNull.

Due diligence

`streamInfo` and `channelInfo` have to be initialized, since the only
way to construct the class it to pass them. So we can remove the null
check boilerplate and make some of the accessors `NonNull`.
@AudricV AudricV added the codequality Improvements to the codebase to improve the code quality label Jan 23, 2024
Copy link

sonarcloud bot commented Jan 23, 2024

@github-actions github-actions bot added the size/medium PRs with less than 250 changed lines label Mar 28, 2024
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Thanks!

@Stypox Stypox merged commit 10c57b1 into TeamNewPipe:dev Mar 28, 2024
5 checks passed
Copy link

sonarcloud bot commented Mar 28, 2024

Comment on lines -35 to -37
public ChannelAboutFragment() {
super();
}
Copy link
Member

@Stypox Stypox Mar 30, 2024

Choose a reason for hiding this comment

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

Actually, the empty constructors are needed when resuming a fragment from memory:

Caused by: java.lang.NoSuchMethodException: org.schabi.newpipe.fragments.list.channel.ChannelAboutFragment.<init> []

The problem probably lies in IcePick which is 9 (!) years old (actually, not in IcePick itself, but in the way it suggests to save fragment state)

Fixed in 5e7ad6f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codequality Improvements to the codebase to improve the code quality size/medium PRs with less than 250 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants