-
Notifications
You must be signed in to change notification settings - Fork 433
Fix spotbugs dead stores and parsing warnings #3983
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| * Reads the header of the resource file | ||
| */ | ||
| private void readHeader() throws IOException { | ||
| int size = input.readShort(); | ||
| majorVersion = input.readShort(); | ||
| minorVersion = input.readShort(); |
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.
Header reader no longer consumes leading size field
The resource header previously read and discarded a 16‑bit size value before reading majorVersion, minorVersion, and the metadata length. The new code skips that first input.readShort(), so majorVersion now consumes the size field and everything that follows is offset by two bytes. This will corrupt the version values and almost certainly cause metaData length to be wrong, leading to malformed resource parsing or runtime failures whenever a .res file is loaded.
Useful? React with 👍 / 👎.
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
✅ Native Android screenshot tests passed. |
This reverts commit 4a6f03b.
Summary
Testing
mvn -pl CodenameOne -am -DskipTests compile(fails: module CodenameOne not found in reactor)https://chatgpt.com/codex/tasks/task_e_68f3914ae9c88331ba0ef2348f09c3ce