Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2020-11-01 13:37:13 +0000
committerAlexander Kurtakov2021-08-13 08:18:08 +0000
commit3e0983faacd89a61ffb35bd78764b630497bf345 (patch)
tree85203f67d62b8b0904b5826264b7871e5cc246e9
parentc8ec4912b4f53ba9972f44b1121baf86a85bf451 (diff)
downloadrt.equinox.p2-3e0983faacd89a61ffb35bd78764b630497bf345.tar.gz
rt.equinox.p2-3e0983faacd89a61ffb35bd78764b630497bf345.tar.xz
rt.equinox.p2-3e0983faacd89a61ffb35bd78764b630497bf345.zip
org.eclipse.equinox.internal.p2.importexport.internal.wizard.ImportFromInstallationPage.setCheckedElements(Object[]) This code creates an exception (or error) object, but doesn't do anything with it. For example, something like if (x < 0) { new IllegalArgumentException("x must be nonnegative"); } It was probably the intent of the programmer to throw the created exception: if (x < 0) { throw new IllegalArgumentException("x must be nonnegative"); } Rank: Scariest (1), confidence: High Pattern: RV_EXCEPTION_NOT_THROWN Type: RV, Category: CORRECTNESS (Correctness) Change-Id: I50c598c0d09ab05caf651d83463247278121e120 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/171584 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Tested-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationPage.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationPage.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationPage.java
index d9d68ce62..34acd48a2 100644
--- a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationPage.java
@@ -418,7 +418,7 @@ public class ImportFromInstallationPage extends AbstractImportPage implements IS
@Override
public void setCheckedElements(Object[] elements) {
- new UnsupportedOperationException();
+ throw new UnsupportedOperationException();
}
public ProvisioningContext getProvisioningContext() {
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
index 63084646a..d782893bd 100644
--- a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
@@ -367,7 +367,7 @@ public class ImportPage extends AbstractImportPage implements ISelectableIUsPage
@Override
public void setCheckedElements(Object[] elements) {
- new UnsupportedOperationException();
+ throw new UnsupportedOperationException();
}
public ProvisioningContext getProvisioningContext() {
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java
index 8a52a05e5..7cedadb2a 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java
@@ -815,7 +815,7 @@ public class MigrationPage extends WizardPage implements ISelectableIUsPage, Lis
@Override
public void setCheckedElements(Object[] elements) {
- new UnsupportedOperationException();
+ throw new UnsupportedOperationException();
}
// Look for update of the current selected installation units and replace the

Back to the top