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

Ivan Andika updated HDDS-14202:
-------------------------------
    Description: 
TrashPolicyDefault#getCurrentTrashDir calls FileSystem#getTrashRoot with null 
Path. This causes NPE since OFSPath cannot handle null Path.

Although TrashPolicyDefault#getCurrentTrashDir is rarely used, we should still 
support it since any client can call Trash#getCurrentTrashDir which calls 
TrashPolicy#getCurrentTrashDir. 

If it's not possible since OFSPath requires volumeName and bucketName then we 
might simply throws exception when BasicRootedOzoneFileSystem#getTrashRoot uses 
null.

Note that BasicOzoneFileSystem#getTrashRoot won't throw NPE.

  was:
TrashPolicyDefault#getCurrentTrashDir calls FileSystem#getTrashRoot with null 
Path. This causes NPE since OFSPath cannot handle null Path.

Although TrashPolicyDefault#getCurrentTrashDir is rarely used, we should still 
support it since any client can call Trash#getCurrentTrashDir which calls 
Trashpolicy#getCurrentTrashDir. 

If it's not possible since OFSPath requires volumeName and bucketName then we 
might simply throws exception when BasicRootedOzoneFileSystem#getTrashRoot uses 
null.

Note that BasicOzoneFileSystem#getTrashRoot won't throw NPE.


> BasicRootedOzoneFileSystem#getTrashRoot should handle null Path
> ---------------------------------------------------------------
>
>                 Key: HDDS-14202
>                 URL: https://issues.apache.org/jira/browse/HDDS-14202
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Ivan Andika
>            Assignee: Ivan Andika
>            Priority: Major
>
> TrashPolicyDefault#getCurrentTrashDir calls FileSystem#getTrashRoot with null 
> Path. This causes NPE since OFSPath cannot handle null Path.
> Although TrashPolicyDefault#getCurrentTrashDir is rarely used, we should 
> still support it since any client can call Trash#getCurrentTrashDir which 
> calls TrashPolicy#getCurrentTrashDir. 
> If it's not possible since OFSPath requires volumeName and bucketName then we 
> might simply throws exception when BasicRootedOzoneFileSystem#getTrashRoot 
> uses null.
> Note that BasicOzoneFileSystem#getTrashRoot won't throw NPE.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to