Skip to content
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

Fixed some static code analyzer warnings #7284

Merged

Conversation

mbien
Copy link
Member

@mbien mbien commented Apr 20, 2024

fixed some endless recursion, NPE and comparison issues. One commit per category.

edit: PR was inspired by this blog post but contains a few more changes

targets delivery

@mbien mbien added Code cleanup ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Apr 20, 2024
@mbien mbien added this to the NB22 milestone Apr 20, 2024
@mbien
Copy link
Member Author

mbien commented Apr 20, 2024

for (int i=LEADING; i <= TRAILING; i++) {
if (LayoutInterval.canResize(gaps[i]) && !anyResizingNeighbor[i]
&& (anyResizingNeighbor[i^1] || preferredFixedSide == i)) {
operations.setIntervalResizing(gaps[i], false);
if (!LayoutInterval.canResize(gaps[i^1])) {
operations.setIntervalResizing(gaps[i^i], true);
}
break;
}
}

L3897 likely has to be i^1 but I wasn't sure. Maybe 0 is intentionally? I left it as is for now. Maybe something to revisit for NB 23

@mbien
Copy link
Member Author

mbien commented Apr 20, 2024

all tests green, got one timeout in the maven tests which is already tracked via #7263, the micronaut test step needed a restart too but those are known to be unreliable.

@mbien mbien force-pushed the fixed-some-code-analyzer-warnings_delivery branch from b2dffef to 093064a Compare April 20, 2024 11:17
@mbien mbien requested a review from lkishalmi April 20, 2024 11:21
Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Looks sane to me!

@mbien mbien removed the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Apr 24, 2024
@mbien mbien force-pushed the fixed-some-code-analyzer-warnings_delivery branch from 093064a to 8da11fc Compare April 24, 2024 01:50
@mbien
Copy link
Member Author

mbien commented Apr 24, 2024

removed the two unused getHeight() methods of the MethodParamsTipPaintComponent copies (instead of attempting to fix them), and rebased onto latest delivery.

@ebarboni
Copy link
Contributor

LGTM do ready to merge ?

@mbien
Copy link
Member Author

mbien commented Apr 26, 2024

yes should be ready

@ebarboni ebarboni merged commit c7b27a5 into apache:delivery Apr 26, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:all-tests [ci] enable all tests Code cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants