Skip to content

Commit

Permalink
remove unnecessary casts
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-herrmann authored and akurtakov committed Jun 21, 2024
1 parent b76734f commit 1ceea70
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -875,8 +875,8 @@ public void testSPIEquals() throws ProvisionException, URISyntaxException {
assertEquals(unit.getTouchpointData().size(), 1);
assertEquals(((IRequiredCapability) unit.getRequirements().iterator().next()).getNamespace(), spiRequiredCapability.getNamespace());
assertEquals(((IRequiredCapability) unit.getRequirements().iterator().next()).getName(), spiRequiredCapability.getName());
assertEquals(((IRequiredCapability) unit.getRequirements().iterator().next()).getMin(), spiRequiredCapability.getMin());
assertEquals(((IRequiredCapability) unit.getRequirements().iterator().next()).getMax(), spiRequiredCapability.getMax());
assertEquals(unit.getRequirements().iterator().next().getMin(), spiRequiredCapability.getMin());
assertEquals(unit.getRequirements().iterator().next().getMax(), spiRequiredCapability.getMax());
assertEquals(unit.getProvidedCapabilities().iterator().next(), spiProvidedCapability);
assertEquals(unit.getTouchpointData().iterator().next(), spiTouchpointData);
assertEquals(unit.getTouchpointType(), spiTouchpointType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public void add(Object[] elements) {

// Update with the new elements to prevent flash
for (Control element : existingChildren) {
((ControlListItem<?>) element).dispose();
element.dispose();
}

for (int i = 0; i < infos.length; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void init(IWorkbench workbench, IStructuredSelection selection) {

@Override
public boolean performFinish() {
File file = new File(((ExportPage) mainPage).getDestinationValue());
File file = new File(mainPage.getDestinationValue());
if (file.exists()) {
if (!MessageDialog.openConfirm(this.getShell(), Messages.ExportWizard_ConfirmDialogTitle,
NLS.bind(Messages.ExportWizard_OverwriteConfirm, file.getAbsolutePath())))
Expand Down

0 comments on commit 1ceea70

Please sign in to comment.