Skip to content

corrected ClassId.isAccessibleFrom behavior on arrays #743 #744

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

Merged

Conversation

volivan239
Copy link
Collaborator

@volivan239 volivan239 commented Aug 19, 2022

Description

ClassId.isAccessibleFrom didn't work correctly on arrays (sometimes returned false when it should have returned true), which lead to unnecessary usage of refelction and bugs in generated tests.

Now this method returns true on array iff contained elements' class is accessible.

Fixes #743

Type of Change

  • Minor bug fix (non-breaking small changes)

How Has This Been Tested?

Manual Scenario

Launch plugin on example from #743 -- tests are generated without reflections.

Checklist (remove irrelevant options):

This is the author self-check list

  • 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
  • New tests have been added
  • All tests pass locally with my changes

@volivan239 volivan239 force-pushed the volivan239/reduce_unneccessary_reflection_usage_in_arrays branch from 2667af5 to a7adac3 Compare August 19, 2022 10:14
@volivan239 volivan239 marked this pull request as ready for review August 19, 2022 14:07
@EgorkaKulikov EgorkaKulikov self-requested a review August 22, 2022 14:52
@volivan239 volivan239 enabled auto-merge (squash) August 23, 2022 06:33
@volivan239 volivan239 merged commit 9788957 into main Aug 23, 2022
@volivan239 volivan239 deleted the volivan239/reduce_unneccessary_reflection_usage_in_arrays branch August 23, 2022 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Unnecessary reflections in code generated for arrays
2 participants