-
Notifications
You must be signed in to change notification settings - Fork 191
JS-731 AST consumers can be disabled #5399
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
JS-731 AST consumers can be disabled #5399
Conversation
e2ec2a7 to
a623b8a
Compare
edc2fe2 to
09a35f7
Compare
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.
LGTM!!
| this.consumers = List.copyOf(consumers); | ||
| LOG.debug("Registered JsAnalysisConsumers {}", this.consumers); | ||
| this.consumers = consumers.stream().filter(JsAnalysisConsumer::isEnabled).toList(); | ||
| if (LOG.isDebugEnabled()) { |
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.
why the need for this check? if log level is higher it will just not be logged, right?
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.
indeed, it's a not needed optimisation, as computing the value is not expensive here, I will remove it for simplicity.
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 ok, no need to remove. I just wanted to make sure
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.
To late 😄
I think it is more readable without,
the code is called once per analsysis,
less is more 👍
I also added some comments on the deprecated properties.
|
JS-731