Skip to content

Prepare v2.23.4#57

Merged
owent merged 2 commits intomainfrom
dev
Jan 30, 2026
Merged

Prepare v2.23.4#57
owent merged 2 commits intomainfrom
dev

Conversation

@owent
Copy link
Owner

@owent owent commented Jan 30, 2026

No description provided.

owent added 2 commits January 22, 2026 12:16
修复Plain模式下处理oneof字段数量检查的错误信息,并优化失败提示。
同时升级了多个核心依赖库,包括Protobuf、POI、Msgpack、Log4j和JUnit。
Copilot AI review requested due to automatic review settings January 30, 2026 07:41
@owent owent merged commit 70dbe82 into main Jan 30, 2026
8 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR prepares version 2.23.4 of xresloader with bug fixes related to plain mode field count validation when oneofs are present, improved error messages, and dependency updates.

Changes:

  • Fixed field count validation logic for plain mode when oneof fields are present
  • Enhanced error messages to include actual data in plain mode failures
  • Updated multiple dependencies to newer versions (protobuf, poi, msgpack, junit, gradle shadow plugin)

Reviewed changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/org/xresloader/core/data/dst/DataDstPb.java Removed duplicate import, modified atLeastFieldSize calculation logic, enhanced error messages with data hints
src/org/xresloader/core/data/dst/DataDstJava.java Modified atLeastFieldSize calculation logic, enhanced error messages with data hints
src/org/xresloader/core/data/dst/DataDstImpl.java Added joinPlainInputHint utility method to format input data for error messages
sample/proto_v3/role_cfg.bin Updated binary test data with new version number
sample/proto_v2/role_cfg.bin Updated binary test data with new version number
pom.xml Bumped version to 2.23.4 and updated dependency versions
build.gradle Bumped version to 2.23.4 and updated dependency versions
HISTORY.md Added changelog entry for version 2.23.4

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"Try to convert %s need at least %d fields, at most %d fields, but provide %d fields.%s > Data: %s",
field.getTypeDescriptor().getFullName(), atLeastFieldSize, fieldSize, inputs.length,
ProgramOptions.getEndl());
ProgramOptions.getEndl(), ProgramOptions.getEndl(),
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The format string has only 2 %s placeholders after the numeric placeholders, but 3 string arguments are provided (two calls to ProgramOptions.getEndl() on lines 2916, plus the result of joinPlainInputHint on line 2917). This will cause an IllegalFormatException at runtime.

The correct fix would be to remove one of the ProgramOptions.getEndl() calls, keeping only one between the field count and the data hint, as is done in the similar code in DataDstJava.java at line 1280.

Suggested change
ProgramOptions.getEndl(), ProgramOptions.getEndl(),
ProgramOptions.getEndl(),

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant