-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Javascript: fix errors from upcoming rules_java update
#20811
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
Conversation
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.
Pull Request Overview
This PR updates Boolean comparisons throughout the JavaScript extractor codebase to use .equals() instead of == operator, addressing errors from an upcoming rules_java update that enforces proper object comparison methods.
- Replaces identity comparisons (
==/!=) with.equals()calls for Boolean object comparisons - Adds
@SuppressWarnings("ReturnValueIgnored")annotations to methods that intentionally ignore return values - Affects AST node constructors and parser logic across multiple files
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| Quantifier.java | Updates greedy flag comparison in regexp quantifier constructor |
| CharacterClass.java | Updates inverted flag comparison in regexp character class constructor |
| UnaryTypeConstructor.java | Updates prefix flag comparison in JSDoc type constructor |
| FunctionType.java | Updates _new flag comparison in JSDoc function type constructor |
| YieldExpression.java | Updates delegating flag comparison in yield expression constructor |
| UpdateExpression.java | Updates prefix flag comparison in update expression constructor |
| UnaryExpression.java | Updates prefix flag comparison in unary expression constructor |
| TemplateElement.java | Updates tail flag comparison in template element constructor |
| Property.java | Updates computed and method flag comparisons in property constructor |
| MemberExpression.java | Updates computed, optional, and onOptionalChain flag comparisons |
| Literal.java | Updates value comparison in isFalsy() method |
| InvokeExpression.java | Updates optional and onOptionalChain flag comparisons |
| ForInStatement.java | Updates each flag comparison in for-in statement constructor |
| ComprehensionExpression.java | Updates generator flag comparison in comprehension expression |
| ComprehensionBlock.java | Updates of flag comparison in comprehension block constructor |
| AFunctionExpression.java | Updates generator and async flag comparisons when creating function info |
| FlowParser.java | Adds suppression annotation for intentionally ignored return value |
| Parser.java | Updates oldStrict comparison and adds suppression annotation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.