Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2020-11-01 13:00:19 +0000
committerMickael Istria2021-03-28 05:14:37 +0000
commit6c6cc6f58fde6c87448aeb167f2c82e74d6c2966 (patch)
treed50bc9f0bb4539c7234e3994a04f811cc3a01ed1
parent74a19e4480eaba4c3426f02f6154bc9180045e50 (diff)
downloadrt.equinox.p2-6c6cc6f58fde6c87448aeb167f2c82e74d6c2966.tar.gz
rt.equinox.p2-6c6cc6f58fde6c87448aeb167f2c82e74d6c2966.tar.xz
rt.equinox.p2-6c6cc6f58fde6c87448aeb167f2c82e74d6c2966.zip
Bug: Possible null pointer dereference of profileDirectories inI20210329-0200I20210328-1800
org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.restore() There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of SpotBugs. Rank: Scary (8), confidence: Normal Pattern: NP_NULL_ON_SOME_PATH Type: NP, Category: CORRECTNESS (Correctness) see https://bugs.eclipse.org/bugs/show_bug.cgi?id=336435 Change-Id: Ib73e1a65f6428beea9b3f6aa6b88b4903f86a9ec Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
index ef16bf4f9..206404376 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
@@ -527,6 +527,7 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
// protect against NPE
if (profileDirectories == null) {
parser.getProfileMap();
+ return Collections.emptyMap();
}
for (File profileDirectorie : profileDirectories) {
String directoryName = profileDirectorie.getName();

Back to the top