fix(iot-gateway): 降级扩展字段长度越界日志级别
将 JT808 解码器中扩展字段长度越界的日志级别从 WARN 降为 DEBUG。 这是设备端数据格式问题,不影响正常消息解析,跳过该扩展字段即可。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -163,9 +163,9 @@ public class Jt808Decoder {
|
||||
int extId = data[index] & 0xFF;
|
||||
int extLen = data[index + 1] & 0xFF;
|
||||
|
||||
// 验证剩余长度
|
||||
// 验证剩余长度(设备端数据格式问题,跳过该扩展字段)
|
||||
if (index + 2 + extLen > data.length) {
|
||||
log.warn("[parseExtensionFields][扩展字段长度越界: ID=0x{}, Len={}, Remaining={}]",
|
||||
log.debug("[parseExtensionFields][扩展字段长度越界,跳过: ID=0x{}, Len={}, Remaining={}]",
|
||||
String.format("%02X", extId), extLen, data.length - index - 2);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user