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

Remove access for jClass in UtMockFieldInfo #1525

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

CaelmBleidd
Copy link
Member

@CaelmBleidd CaelmBleidd commented Dec 15, 2022

Description

We use information from jClass when Mocker decides whether it should mock some object or not. Because of many reasons, these classes might be unavailable in Runtime and we have to work with it using SootClass instances.

This problem was found during work on closed project and I don't have a way to reproduce it, but it is a problem that happen many times in the past and we should avoid accessing jClass whenever possible.

Type of Change

  • Minor bug fix (non-breaking small changes)

How Has This Been Tested?

Regression and integration tests

There are no additional tests since they highly depend on classpath, project configuration, soot transformation and other options. Unfortunately, the exact combination of these options is lost and the problem occurred on a project with closed code.

Automated Testing

There are no additional automatic tests.

Manual Scenario

There are no manual scenarios.

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

@CaelmBleidd CaelmBleidd requested a review from Damtev December 15, 2022 09:44
@CaelmBleidd CaelmBleidd force-pushed the caelmbleidd/avoid_access_to_jclass_in_mocker branch from a18e6aa to 3bd8dd1 Compare December 15, 2022 09:46
@CaelmBleidd CaelmBleidd marked this pull request as draft December 15, 2022 09:50
@CaelmBleidd CaelmBleidd force-pushed the caelmbleidd/avoid_access_to_jclass_in_mocker branch from 3bd8dd1 to 6e28a2d Compare December 19, 2022 06:36
@CaelmBleidd CaelmBleidd force-pushed the caelmbleidd/avoid_access_to_jclass_in_mocker branch from 6e28a2d to fd6b3d9 Compare December 20, 2022 07:36
@CaelmBleidd CaelmBleidd requested a review from Damtev December 20, 2022 07:36
@CaelmBleidd CaelmBleidd marked this pull request as ready for review December 20, 2022 10:13
@CaelmBleidd CaelmBleidd merged commit 4c642c5 into main Dec 20, 2022
@CaelmBleidd CaelmBleidd deleted the caelmbleidd/avoid_access_to_jclass_in_mocker branch December 20, 2022 10:16
denis-fokin pushed a commit that referenced this pull request Dec 21, 2022
@alisevych alisevych modified the milestone: 2023.03 Release Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants