Skip to content

Move getting srcClassName inside ReadAction in plugin #729 #851

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
merged 1 commit into from
Sep 14, 2022

Conversation

volivan239
Copy link
Collaborator

Description

Moved call to PsiClass.name inside ReadAction block in plugin, so that java.lang.Throwable: Read access is allowed from event dispatch thread or inside read-action only is not thrown anymore.

Fixes #729

Type of Change

  • Minor bug fix (non-breaking small changes)

How Has This Been Tested?

Manual Scenario

Launch plugin on any Kotlin code -- the exception is not thrown anymore.

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/fix_exceptions_falling_for_kotlin_code branch from 4581bef to 916564e Compare September 9, 2022 13:23
@volivan239 volivan239 marked this pull request as ready for review September 9, 2022 13:23
@volivan239 volivan239 merged commit 771ac70 into main Sep 14, 2022
@volivan239 volivan239 deleted the volivan239/fix_exceptions_falling_for_kotlin_code branch September 14, 2022 11:58
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.

Exception in plugin when generating tests for Kotlin code
2 participants