fix: 替换 Java 11 API stripTrailing 为 Java 8 兼容写法

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-28 13:11:59 +08:00
parent d771ca13b7
commit 836b2e322e
2 changed files with 1 additions and 1 deletions

View File

@@ -69,7 +69,7 @@ public class TelegramCodec {
case STRING: {
byte[] bytes = new byte[fd.getLength()];
buf.get(bytes);
String s = new String(bytes, StandardCharsets.US_ASCII).stripTrailing();
String s = new String(bytes, StandardCharsets.US_ASCII).replaceAll("\\s+$", "");
result.put(fd.getName(), s);
break;
}