Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@ private boolean canCompleteSwap(String clusterName, String swapOutInstanceName,
List<String> swapOutResources = baseAccessor.getChildNames(
PropertyPathBuilder.instanceCurrentState(clusterName, swapOutInstanceName,
swapOutLastActiveSession), 0);
if (swapOutResources == null) {
// No current states found for the swap-out instance, swap is complete
return true;
}
Comment on lines +555 to +558

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably throw exception would be better. Should not silently swallow it.

for (String swapOutResource : swapOutResources) {
// Get the topState and secondTopStates for the stateModelDef used by the resource.
IdealState idealState = accessor.getProperty(keyBuilder.idealStates(swapOutResource));
Expand Down
Loading