Skip to content

Fix the way of setting static final fields #466

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

sergeypospelov
Copy link
Member

@sergeypospelov sergeypospelov commented Jul 8, 2022

Description

Merged withAccessibility and withRemovedFinalModifer function in ReflectionUtil.kt, so it won't be possible to get the wrong cached FieldAccessor field, if we use our function.

Fixes #458

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manual Scenario

Repeated To Reproduce section from #458. Tests are successfully generated.

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

@sergeypospelov sergeypospelov force-pushed the sergey/fix-the-way-of-setting-static-final-fields branch from cfe7bc1 to 25c7789 Compare July 11, 2022 06:55
Copy link
Member

@Damtev Damtev left a comment

Choose a reason for hiding this comment

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

Do we really need this dependency on the utbot-sample? Please consider the idea of moving the test class to the "utbot-core" module.

@sergeypospelov sergeypospelov requested a review from Damtev July 11, 2022 09:32
@sergeypospelov sergeypospelov enabled auto-merge (squash) July 11, 2022 10:31
@sergeypospelov sergeypospelov force-pushed the sergey/fix-the-way-of-setting-static-final-fields branch 2 times, most recently from 6a6c293 to 5c9a78c Compare July 11, 2022 11:06
@sergeypospelov sergeypospelov force-pushed the sergey/fix-the-way-of-setting-static-final-fields branch from 5c9a78c to 1d7d138 Compare July 11, 2022 12:01
@sergeypospelov sergeypospelov merged commit 8b70aa1 into main Jul 11, 2022
@sergeypospelov sergeypospelov deleted the sergey/fix-the-way-of-setting-static-final-fields branch July 11, 2022 13:53
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.

Cannot set static final java.io.InputStream field java.lang.System
3 participants