-
Notifications
You must be signed in to change notification settings - Fork 1
fix: add null check in setFooterToolbar #132
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
""" WalkthroughA null check was added to the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/test/FooterToolbarTest.java (1)
22-27
: Mixed JUnit 4/5 APIs – consider unifyingThe class relies on
@org.junit.Test
(JUnit 4) while importingorg.junit.jupiter.api.Assertions
(JUnit 5). Mixing engines is possible but increases build-time dependencies and can confuse IDE/runners.If you’re already on JUnit 5 (via Vintage), migrate the whole class:
-import org.junit.Test; -import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test;and drop the
expected = …
style in favour ofassertThrows
.
Otherwise, keep everything JUnit 4 and replaceAssertions
withorg.junit.Assert
utilities.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/main/java/com/flowingcode/vaadin/addons/gridhelpers/FooterToolbarGridHelper.java
(2 hunks)src/test/java/com/flowingcode/vaadin/addons/gridhelpers/test/FooterToolbarTest.java
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build-vaadin23
🔇 Additional comments (2)
src/main/java/com/flowingcode/vaadin/addons/gridhelpers/FooterToolbarGridHelper.java (1)
38-40
: 👍 Fail-fast null-check added correctly
Objects.requireNonNull(toolBar, "Toolbar component must not be null");
is the right defensive measure and it’s placed at the very top of the method, so we now short-circuit before doing any work.
No further issues spotted in this hunk.src/test/java/com/flowingcode/vaadin/addons/gridhelpers/test/FooterToolbarTest.java (1)
47-55
: Verify build setup includes JUnit 5 artifactsBecause
Assertions.assertThrows
comes from JUnit Jupiter, the build must includejunit-jupiter-api
on the test classpath; otherwise compilation will fail even if the runtime engine is still JUnit 4.Please confirm
pom.xml
/build.gradle
already pullsjunit-jupiter-api
; if not, add it or switch toorg.junit.Assert
to keep the dependency footprint unchanged.
|
Close #131
Summary by CodeRabbit
Bug Fixes
Tests