Skip to content

Commit

Permalink
MirrorRequest: catch UnsupportedOperationException #252
Browse files Browse the repository at this point in the history
and resolve deprecated call

#252
  • Loading branch information
EcljpseB0T committed Feb 15, 2024
1 parent e84b5a0 commit af44c2d
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,14 @@ else if (ProcessingStepHandler.canProcess(descriptor2))
}

// failed, first remove possibly erroneously added descriptor
if (target.contains(destinationDescriptor))
target.removeDescriptor(destinationDescriptor);
if (target.contains(destinationDescriptor)) {
try {
target.removeDescriptor(destinationDescriptor, new NullProgressMonitor());
} catch (UnsupportedOperationException e) {
setResult(Status.warning("unable to remove Descriptor", e)); //$NON-NLS-1$
return;
}
}

if (descriptor == canonical || canonical == null) {
setResult(status);
Expand Down

0 comments on commit af44c2d

Please sign in to comment.