You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Henry Chen (Jira)" <ji...@apache.org> on 2026/08/30 09:20:00 UTC

[jira] [Created] (HDDS-16348) StorageSize.parse fails on values with surrounding whitespace

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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org