[ 
https://issues.apache.org/jira/browse/HDDS-17957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz-wo Sze updated HDDS-17957:
------------------------------
    Description: 
- 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.

  was:
- 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.


> 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
>         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]

Reply via email to