You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify string handling for Java 9+ compact strings
msgpack-jackson3 requires Java 17+, so char[]-backed strings (Java 8)
are not a concern. Java 9+ compact strings make the old AsciiCharString
optimization redundant for the char[] path.
- Rename AsciiCharString -> RawUtf8String; extend its use to all raw
UTF-8 byte[] inputs (not just ASCII), eliminating the areAllAsciiBytes
scan and the wasteful decode+re-encode for non-ASCII content.
- Simplify writeCharArrayTextValue: drop getBytesIfAscii scan and just
use new String(char[], offset, len); packString handles encoding
efficiently via compact strings.
- Simplify writeRaw(String, int, int): drop getChars -> char[] detour,
use substring directly.
- Simplify writeString(Reader, int) len<0 path: drop StringBuilder ->
char[] copy, use sb.toString() directly.
- Remove unused imports and fields (Nullable, Charset, StandardCharsets,
DEFAULT_CHARSET).
0 commit comments