Skip to content

[BUGFIX] Ensure valid position after AddRule #1271

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

Merged
merged 1 commit into from
Jun 4, 2025
Merged

Conversation

JakeQZ
Copy link
Collaborator

@JakeQZ JakeQZ commented Jun 4, 2025

This is the backport of #1263, #1262 and #1265.

Since getLineNo() and getColNo(), which always returned an int, are deprecated, using their replacements, which may return null, for Rules in a RuleSet may cause issues.
The fixes ensure that such Rules will always have a valid position, so the new methods will not return null in that situation, and a straightforward replacement can be done.

Part of #974.

@JakeQZ JakeQZ requested a review from oliverklee June 4, 2025 00:22
@JakeQZ JakeQZ self-assigned this Jun 4, 2025
This is the backport of #1263, #1262 and #1265.

Since `getLineNo()` and `getColNo()`, which always returned an `int`, are
deprecated, using their replacements, which may return `null`, for `Rule`s in
a `RuleSet` may cause issues.
The fixes ensure that such `Rule`s will always have a valid position, so the
new methods will not return `null` in that situation, and a straightforward
replacement can be done.

Part of #974.
@JakeQZ JakeQZ force-pushed the bugfix/v8.x/addrule branch from 66c543d to 93ab017 Compare June 4, 2025 00:26
@JakeQZ JakeQZ mentioned this pull request Jun 4, 2025
15 tasks
@oliverklee oliverklee merged commit e0a904e into v8.x Jun 4, 2025
22 checks passed
@oliverklee oliverklee deleted the bugfix/v8.x/addrule branch June 4, 2025 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants