Stop then start on servicebus processor#23
Open
Njeriiii wants to merge 8 commits intoazure-sdk-pluginfrom
Open
Stop then start on servicebus processor#23Njeriiii wants to merge 8 commits intoazure-sdk-pluginfrom
Njeriiii wants to merge 8 commits intoazure-sdk-pluginfrom
Conversation
lmolkova
reviewed
Jul 25, 2024
| variableStateMap.remove(variable); // Remove the variable from the map | ||
|
|
||
| // If 'start' is called and 'stop' was called on the variable, register a problem | ||
| } else if ("start".equals(methodName) && Boolean.TRUE.equals(wasStopCalled)) { |
There was a problem hiding this comment.
how do we know if start was actually called before stop?
e.g. would is complain if I do
void stop() {
client.stop();
}
void start() {
client.start();
}
void run() {
start();
stop();
}?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix? Explain your changes.
This class is a LocalInspectionTool that checks if a stop method is called on a ServiceBusProcessorClient object, followed by a start method call on the same object.
If this is the case, a problem is registered with the ProblemsHolder.
A problem is not registered when .close() is used before a .start() on the same client that's a class instance object.
Has this been tested?
Any relevant logs, screenshots, error output, etc.?