Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix possible NPE for package name in rarely cases#544

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Markoutte merged 1 commit intomainfrompelevin/fix_possible_def_package_npe
Jul 18, 2022

Conversation

@Markoutte
Copy link
Collaborator

Description

In some casesClass#getPackage can return null. This should fix these cases.

Type of Change

  • Minor bug fix (non-breaking small changes)

Checklist (remove irrelevant options):

  • The change followed the style guidelines of the UTBot project
  • Self-review of the code is passed
  • The change contains enough commentaries, particularly in hard-to-understand areas
  • New documentation is provided or existed one is altered
  • No new warnings
  • Tests that prove my change is effective
  • All tests pass locally with my changes

@MarkoutteMarkoutte requested a review fromdtimJuly 18, 2022 10:26
Copy link
Collaborator

@dtimdtim left a comment

Choose a reason for hiding this comment

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

LGTM, but it would be nice to have some comments as the logic becomes not so clear as before.

privatefunisAccessible(member:Member,packageName:String?):Boolean {
return isPublic(member.modifiers)||
(isPackagePrivate(member.modifiers)&& member.declaringClass.`package`.name== packageName)
(packageName!=null&&isPackagePrivate(member.modifiers)&& member.declaringClass.`package`?.name== packageName)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be nice to have a comment to explain why the check forpackageName != null is here.

@MarkoutteMarkoutte merged commit80e37a2 intomainJul 18, 2022
@MarkoutteMarkoutte deleted the pelevin/fix_possible_def_package_npe branchJuly 18, 2022 12:32
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dtimdtimdtim approved these changes

Assignees

No one assigned

Labels

None yet

Projects

Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@Markoutte@dtim

[8]ページ先頭

©2009-2025 Movatter.jp