This repository was archived by the owner on Feb 9, 2023. It is now read-only.
forked from google/hover
-
Couldn't load subscription status.
- Fork 2
Fix NPE resulting from HoverViewState's callback after it already lost control #3
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mHoverView 가 null 인지 체크하면 문제가 생길까요? PR 상으로는 mHoverView 의 존재 여부가 mHasControl 의 값하고 일치하는 것 같아서요ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네 말씀하신대로 현재 mHoverView 존재 여부가 mHasControl 과 일치합니다. 하지만 이렇게 따로 만든건 hover 쪽에 PR을 날리기 위해서 이전 로직을 최대한 활용해서 NPE 만 해결하기 위함이었어요. 별건 아니지만 조금 더 Descriptive 한것 같기도 하네요..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그렇군요ㅎㅎ 공감되긴 합니다만 아직 저는 추후 개발하면서 mHasControl 과 mHoverView 의 값이 consistency 가 깨질 위험이 있어 보여서, 실제 문제가 되는 mHoverView 값이 null 임을 확인하는게 더 직관적인 것 같은 생각이 들긴 하네요.
그래도 이 부분 판단은 헤일리 결정에 따르겠습니다 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ssowonny 네! 아직은 로직이 복잡하지 않으니 일단 이대로 NPE 만 수정하고, 추후 mHasControl 관련 로직이 복잡해 진다면 실제로 문제가 되는 HoverView 를 체크하는 방향으로 전반적으로 수정하도록 하겠습니다.