Features/nullaway - #58
Conversation
…edHashMap for response context
…rity-bom dependency
…e variable declarations for clarity chore: add errorprone and nullaway
|
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 192 files out of 300 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the ✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
f0c9fb5 to
a4f7400
Compare
…or better null safety
a4f7400 to
b0f390d
Compare
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces NullAway static analysis support to improve null safety in the codebase. The main purpose is to enhance code quality by adding null annotations and restructuring imports/formatting to align with NullAway requirements.
- Added NullAway-compatible
@Nullableannotations usingorg.jspecify.annotations.Nullable - Reformatted code to improve readability and comply with code style guidelines
- Updated import statements to use consistent ordering and remove unused imports
Reviewed Changes
Copilot reviewed 287 out of 309 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| steve/pom.xml | Updated Maven configuration and reordered XML elements |
| steve/Dockerfile, steve/k8s/docker/Dockerfile | Updated Java runtime from 17 to 21 |
| steve/src/main/java/**/*.java | Added null safety annotations and code formatting improvements |
| steve/src/test/java/**/*.java | Updated test classes with formatting and import reorganization |
| steve-ui-jsp/src/**/*.java | Updated JSP UI classes with formatting and annotation improvements |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| setList(list, isSecured -> isSecured ? "https" : "http", info.getWebInterface(), info.getOcppSoap()); | ||
| setList(list, isSecured -> isSecured ? "wss" : "ws", info.getOcppWebSocket()); |
There was a problem hiding this comment.
The boolean logic is inverted. For secure connections, HTTPS should be used when isSecured is true, and HTTP when false. Currently it returns HTTPS when isSecured is false and HTTP when true. Same issue with WebSocket protocols.
| var build = Version.parse(buildVersion); | ||
| var github = Version.parse(githubVersion); |
There was a problem hiding this comment.
The code is calling Version.parse() method, but the diff shows it was previously using Version.valueOf(). The Version.parse() method may not exist or may have different behavior than valueOf(). This could be a breaking change that needs verification.
| var build = Version.parse(buildVersion); | |
| var github = Version.parse(githubVersion); | |
| var build = Version.valueOf(buildVersion); | |
| var github = Version.valueOf(githubVersion); |
|
|
||
| boolean isGithubMoreRecent = github.greaterThan(build); | ||
| String downloadUrl = decideDownloadUrl(response); | ||
| var isGithubMoreRecent = github.isHigherThan(build); |
There was a problem hiding this comment.
The method name has changed from greaterThan() to isHigherThan(). This suggests a potential API change that may not be compatible with the existing Version class implementation.
| } | ||
| s = resolveIfSystemEnv(s); | ||
| return Optional.of(trim(key, s)); | ||
| return Optional.ofNullable(trim(key, s)); |
There was a problem hiding this comment.
This change from Optional.of() to Optional.ofNullable() could alter behavior if trim() returns null. If the previous code expected trim() to always return a non-null value, this change might introduce unexpected null values in the Optional.
| return Optional.ofNullable(trim(key, s)); | |
| return Optional.of(trim(key, s)); |
No description provided.