Skip to content

Conversation

@Njeriiii
Copy link
Owner

@Njeriiii Njeriiii commented Jul 25, 2024

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?

  • Tested

Any relevant logs, screenshots, error output, etc.?

image

image

image

image

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)) {

Choose a reason for hiding this comment

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

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();
}

?

@Njeriiii Njeriiii requested a review from lmolkova July 29, 2024 14:23
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