Henry Chen created HDDS-16348:
---------------------------------
Summary: StorageSize.parse fails on values with surrounding
whitespace
Key: HDDS-16348
URL: https://issues.apache.org/jira/browse/HDDS-16348
Project: Apache Ozone
Issue Type: Bug
Reporter: Henry Chen
Assignee: Henry Chen
StorageSize.parse() trims its input but computes the substring offset from
the untrimmed string (StorageSize.java:88-89), so any surrounding whitespace
breaks parsing:
" 10MB" -> NumberFormatException: For input string: "10m"
" 128MB " -> StringIndexOutOfBoundsException
Reachable from config, since ConfigurationSource.getStorageSize() uses get()
instead of getTrimmed() and XML values are commonly indented.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]