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

Fix NPE for getComponentAfter/Before in ComposePanel #878

Merged
merged 1 commit into from Oct 17, 2023

Conversation

Walingar
Copy link
Collaborator

@Walingar Walingar commented Oct 17, 2023

Proposed Changes

  • Make return type of getComponentAfter/Before nullable in ComposePanel

These methods are called on remove(ComposePanel.desktop.kt:121), and since NPE can be thrown bridge property doesn't become null (ComposePanel.desktop.kt:122)

Related issue: JetBrains/jewel#182

@Walingar Walingar requested a review from igordmn October 17, 2023 14:59
Copy link
Collaborator

@igordmn igordmn left a comment

Choose a reason for hiding this comment

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

The fix makes sense, but the description of the PR/commit message seems incomplete and isn't grammatically correct. Let's fix it before merge.

@Walingar
Copy link
Collaborator Author

Changed the description, thank you!

@Walingar Walingar changed the title getComponentAfter and *Before can return null that causes NPE Fix NPE for getComponentAfter/Before in ComposePanel Oct 17, 2023
@Walingar Walingar merged commit f48228b into jb-main Oct 17, 2023
3 checks passed
@Walingar Walingar deleted the nr/compose-panel-npe branch October 17, 2023 19:55
igordmn pushed a commit that referenced this pull request Oct 20, 2023
These methods are called on remove(ComposePanel.desktop.kt:121), and
since NPE can be thrown bridge property doesn't become null
(ComposePanel.desktop.kt:122)

Related issue: JetBrains/jewel#182
mazunin-v-jb pushed a commit that referenced this pull request Dec 7, 2023
These methods are called on remove(ComposePanel.desktop.kt:121), and
since NPE can be thrown bridge property doesn't become null
(ComposePanel.desktop.kt:122)

Related issue: JetBrains/jewel#182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants