Skip to content

NPE in canCompleteSwap if path doesn't exists #3069

@LZD-PratyushBhatt

Description

@LZD-PratyushBhatt

Describe the bug

Currently when we call baseAccessor.getChildNames and if the path doesnt exists, swapOutResources is null, and we iterate over this which results in NPE

  "error" : "Cannot invoke \"java.util.List.iterator()\" because \"swapOutResources\" is null"
}

To Reproduce

Hit canCompleteSwap Rest and manually corrupt the path.

Expected behavior

NPEs should be handled, it should return true in this case as well.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions