Problem
ProxyConfig.parseDelayLevel() parses messageDelayLevel with split(" "). If the configuration contains leading spaces, repeated spaces, tabs, or line breaks, the parser emits empty or combined tokens, throws, and leaves delayLevelTable partially populated or empty.
String[] levelArray = levelString.split(" ");
for (int i = 0; i < levelArray.length; i++) {
String value = levelArray[i];
...
}
messageDelayLevel is a user-facing configuration and should tolerate ordinary whitespace formatting, especially in config files.
Impact
Malformed whitespace can make delayed-message level computation incomplete in Proxy. In the worst case, a blank/whitespace-only value leaves the table empty and later computeDelayLevel() can fail when reading the last level.
Expected behavior
Proxy should trim the config and split by \s+, ignore blank input safely, and keep valid delay levels when the same values are formatted with extra whitespace.
Code evidence
proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.java
Suggested fix
Use whitespace-normalized parsing in parseDelayLevel() and add ProxyConfig tests for repeated whitespace / blank input.
Problem
ProxyConfig.parseDelayLevel()parsesmessageDelayLevelwithsplit(" "). If the configuration contains leading spaces, repeated spaces, tabs, or line breaks, the parser emits empty or combined tokens, throws, and leavesdelayLevelTablepartially populated or empty.messageDelayLevelis a user-facing configuration and should tolerate ordinary whitespace formatting, especially in config files.Impact
Malformed whitespace can make delayed-message level computation incomplete in Proxy. In the worst case, a blank/whitespace-only value leaves the table empty and later
computeDelayLevel()can fail when reading the last level.Expected behavior
Proxy should trim the config and split by
\s+, ignore blank input safely, and keep valid delay levels when the same values are formatted with extra whitespace.Code evidence
proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.javaSuggested fix
Use whitespace-normalized parsing in
parseDelayLevel()and addProxyConfigtests for repeated whitespace / blank input.