Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRené Purrio2018-01-11 05:51:04 -0500
committerRené Purrio2018-01-11 09:16:23 -0500
commit14a9b4fda0b8c0d18e5e46321d9a6a16a5f7fd88 (patch)
tree68bf86b4189837dfd0c6d7b45deb955311b33e5f /org.eclipse.debug.core
parentd0fb3a96ae33b9372f3d99106d39bba944f94139 (diff)
downloadeclipse.platform.debug-14a9b4fda0b8c0d18e5e46321d9a6a16a5f7fd88.tar.gz
eclipse.platform.debug-14a9b4fda0b8c0d18e5e46321d9a6a16a5f7fd88.tar.xz
eclipse.platform.debug-14a9b4fda0b8c0d18e5e46321d9a6a16a5f7fd88.zip
Bug 529635 - [sonar] Resolve "Possible null pointer dereference"I20180114-2000I20180113-1500I20180112-2000
Change-Id: I2d445f9e52fa07ade342c7252ff5154737cedd48 Signed-off-by: René Purrio <rpurrio@itemis.de>
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
index f7078181f..1d66666bc 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
@@ -1043,7 +1043,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
}
};
File[] configFiles = directory.listFiles(configFilter);
- if (configFiles.length > 0) {
+ if (configFiles != null && configFiles.length > 0) {
LaunchConfiguration config = null;
for (int i = 0; i < configFiles.length; i++) {
config = new LaunchConfiguration(LaunchConfiguration.getSimpleName(configFiles[i].getName()), null, false);
@@ -1057,7 +1057,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
}
};
File[] prototypeFiles = directory.listFiles(prototypeFilter);
- if (prototypeFiles.length > 0) {
+ if (prototypeFiles != null && prototypeFiles.length > 0) {
LaunchConfiguration config = null;
for (int i = 0; i < prototypeFiles.length; i++) {
config = new LaunchConfiguration(LaunchConfiguration.getSimpleName(prototypeFiles[i].getName()), null, true);

Back to the top