Open
Description
Before Creating the Enhancement Request
- I have confirmed that this should be classified as an enhancement rather than a bug/feature.
Summary
Enhancement Description
This issue proposes two small improvements to increase code readability, maintainability, and compliance with Java best practices.
Code Changes
// 1. Use Arrays.fill to clear byte array
// Before:
for (int i = 0; i < bytes.length; i++) {
bytes[i] = (byte) 0x00;
}
// After:
Arrays.fill(bytes, (byte) 0x00);
// ------------------------------------------------------
// 2. Explicitly specify charset when constructing String
// Before:
String s = new String(bos.toByteArray());
// After:
String s = new String(bos.toByteArray(), StandardCharsets.UTF_8);
### Motivation
These changes improve code readability and robustness with no functional impact. They follow standard Java best practices
### Describe the Solution You'd Like
Just like what was mentioned above
### Describe Alternatives You've Considered
Just like what was mentioned above
### Additional Context
_No response_