[
https://issues.apache.org/jira/browse/HDDS-17957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-17957:
----------------------------------
Labels: pull-request-available (was: )
> NetUtils.normalize(..) incorrectly handle multiple trailing '/' characters
> --------------------------------------------------------------------------
>
> Key: HDDS-17957
> URL: https://issues.apache.org/jira/browse/HDDS-17957
> Project: Apache Ozone
> Issue Type: Bug
> Components: common
> Reporter: Tsz-wo Sze
> Assignee: Tsz-wo Sze
> Priority: Major
> Labels: pull-request-available
> Attachments: screenshot-1.png
>
>
> - For multiple trailing '/' characters, NetUtils.normalize(..) should remove
> all of them.
> -- Due to this bug, NetUtils.locationToDepth("///") will return 0 which
> again is incorrect since the correct value is 1.
> - Implement NetUtils.locationToDepth(..) without String.split(..) since
> String.split(..) is expensive and unnecessarily create an array just for the
> length.
> -- locationToDepth(..) is a very basic operation which must be very efficient.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]