Eclipse 在调试时显示 Java 字节数组的红色值

Eclipse displays red values for a Java byte array when debugging

我目前正在开发一种软​​件,它使用 RXTX 库与手工制作的模拟器进行串行通信。为了测试我的软件的极限,我在我的 2 个程序之间设置了不同的 COM 参数;主软件以9600的波特率发送消息,模拟器以19200的波特率接收。

当我尝试发送以下数组时:"GET IN_NUM_TRAIN".getBytes()(16 个字节),我的模拟器收到一个包含 27 个元素的字节数组并抛出:

INFOS: Traitement du message : ~�``�8���f���f�

java.lang.StringIndexOutOfBoundsException: String index out of range: 26

当我尝试调试我的代码时,收到的字节数组如下所示:

我不明白为什么前8个值显示为红色。

前 8 个 显示为红色,表示它们已更改

Eclipse Help - Java development user guide > Reference > Preferences > Debug Preferences:

Changed value color

This option allows you to change the color of a changed value in the variables view, expressions view, memory view, anywhere running program variables are rendered

Default: Red