fix: 替换 Java 11 API stripTrailing 为 Java 8 兼容写法
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,7 @@ public class TelegramCodec {
|
|||||||
case STRING: {
|
case STRING: {
|
||||||
byte[] bytes = new byte[fd.getLength()];
|
byte[] bytes = new byte[fd.getLength()];
|
||||||
buf.get(bytes);
|
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);
|
result.put(fd.getName(), s);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user