Skip to content

fix: jsonUtil ut code check fix#318

Merged
hexqi merged 1 commit into
opentiny:developfrom
msslulu:feat/ut_dev_codecheck
Jul 1, 2026
Merged

fix: jsonUtil ut code check fix#318
hexqi merged 1 commit into
opentiny:developfrom
msslulu:feat/ut_dev_codecheck

Conversation

@msslulu

@msslulu msslulu commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

code check fix

Summary by CodeRabbit

  • Tests
    • Improved JSON byte-array test coverage by using an explicit UTF-8 encoding, making behavior more consistent across environments.
    • Helps ensure JSON decoding works reliably regardless of system default charset.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Updates a single unit test to convert a JSON string to a byte array using explicit UTF-8 encoding instead of the platform default, by adding a StandardCharsets import and modifying the getBytes() call.

Changes

Test byte conversion fix

Layer / File(s) Summary
UTF-8 charset usage in byte array test
base/src/test/java/com/tinyengine/it/common/utils/JsonUtilsTest.java
Adds StandardCharsets import and changes testDecode_ByteArray to use json.getBytes(StandardCharsets.UTF_8) instead of json.getBytes().

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A hop, a byte, a charset true,
UTF-8 now shines anew,
No platform quirks to lead astray,
Just clean encoded bytes today. 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is related to the test change, but it is too vague and typo-ridden to clearly describe the actual fix. Rename it to something specific, like "fix JsonUtilsTest byte-array decoding to use UTF-8".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hexqi hexqi changed the title feat:jsonUtil ut code check fix fix: jsonUtil ut code check fix Jul 1, 2026
@hexqi hexqi merged commit 0898769 into opentiny:develop Jul 1, 2026
1 check passed
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.

2 participants