diff options
author | Carsten Hammer | 2020-11-01 11:48:02 +0000 |
---|---|---|
committer | Thomas Watson | 2020-11-02 21:04:19 +0000 |
commit | 05c59ee53d099418b36d8c47707069fcc8a781d8 (patch) | |
tree | 84d399f4be812681e70318f31a5bb9534cfdff9c | |
parent | 8a22c58792bec3183360d3673cd69966a344c56b (diff) | |
download | rt.equinox.bundles-05c59ee53d099418b36d8c47707069fcc8a781d8.tar.gz rt.equinox.bundles-05c59ee53d099418b36d8c47707069fcc8a781d8.tar.xz rt.equinox.bundles-05c59ee53d099418b36d8c47707069fcc8a781d8.zip |
Bug: Useless condition: it's known that existingExtensions.length != 1Y20201104-1200Y20201103-1200I20201105-0230I20201104-1800I20201103-1800I20201103-0030I20201102-1910
at this point
This condition always produces the same result as the value of the
involved variable that was narrowed before. Probably something else was
meant or the condition can be removed.
Rank: Troubling (14), confidence: High
Pattern: UC_USELESS_CONDITION
Type: UC, Category: STYLE (Dodgy code)
Change-Id: Iaac243b9bd32105863f73de5b84d3886b3298e51
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r-- | bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java index 9ad03f6bd..a2aac66c2 100644 --- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java +++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java @@ -611,9 +611,6 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR int[] existingExtensions = extPoint.getRawChildren(); int[] newExtensions = RegistryObjectManager.EMPTY_INT_ARRAY; if (existingExtensions.length > 1) { - if (existingExtensions.length == 1) - newExtensions = RegistryObjectManager.EMPTY_INT_ARRAY; - newExtensions = new int[existingExtensions.length - 1]; for (int i = 0, j = 0; i < existingExtensions.length; i++) if (existingExtensions[i] != extension.getObjectId()) |