-
Notifications
You must be signed in to change notification settings - Fork 52
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
fix : Modification to replace the usage of deprecated method DumbService.runReadActionInSmartMode(Computable) #1421
base: main
Are you sure you want to change the base?
Conversation
…ted method DumbService.runReadActionInSmartMode(Computable)
Quality Gate passedIssues Measures |
@@ -222,7 +220,8 @@ public Location findPropertyLocation(VirtualFile file, String sourceType, String | |||
} | |||
|
|||
public Location findPropertyLocation(Module module, String sourceType, String sourceField, String sourceMethod, IPsiUtils utils) { | |||
return DumbService.getInstance(module.getProject()).runReadActionInSmartMode(() -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like you have removed ReadAction in ProjectLabelManager, should we need this wrap with ReadAction ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@angelozerr I've already added ReadAction block here. So, no need to wrap this in ReadAction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's very strange because this findPropertyLocation should be called also in a non blocking read action in the QuarkusLanguageClient.
Do you see trouble if you remove this ReadAction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@angelozerr Let me test the same without ReadAction and will update you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@angelozerr Removed the ReadAction.nonBlocking() as findPropertyLocation() is already executed in a NonBlocking ReadAction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks.
…eady executed in a NonBlocking ReadAction
DumbService.runReadActionInSmartMode(Computable)
Fixes #1420