summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStepan Vavra2013-10-15 11:11:31 (EDT)
committer Mike Rennie2013-10-15 11:40:59 (EDT)
commit216b8210a06cb0a79cabbe69e68e2ae421d74414 (patch)
treee44af9090a3c80d062cf2bfe8ec766faf48b3408
parent43b0dc87e902de5a9bfbb0b494e57132fd990253 (diff)
downloadeclipse.jdt.debug-216b8210a06cb0a79cabbe69e68e2ae421d74414.zip
eclipse.jdt.debug-216b8210a06cb0a79cabbe69e68e2ae421d74414.tar.gz
eclipse.jdt.debug-216b8210a06cb0a79cabbe69e68e2ae421d74414.tar.bz2
Bug 419316 - All References or All instances may throw NPE in Eclipse
Change-Id: Id9b2c8bb3b1522bed7cf42b07385344690c6577c Signed-off-by: Stepan Vavra <vavra.stepan@gmail.com>
-rw-r--r--org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JDIAllInstancesValue.java5
-rw-r--r--org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceListValue.java5
2 files changed, 6 insertions, 4 deletions
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JDIAllInstancesValue.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JDIAllInstancesValue.java
index 0334978..2fb46ee 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JDIAllInstancesValue.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JDIAllInstancesValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2007, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Stepan Vavra - Bug 419316 - All References or All instances may throw NPE in Eclipse
*******************************************************************************/
package org.eclipse.jdt.internal.debug.core.logicalstructures;
@@ -53,7 +54,7 @@ public class JDIAllInstancesValue extends JDIArrayValue {
fRoot = root;
try {
IJavaType[] javaTypes = target.getJavaTypes("java.lang.Object[]"); //$NON-NLS-1$
- if (javaTypes.length > 0) {
+ if (javaTypes != null && javaTypes.length > 0) {
fType = (IJavaArrayType) javaTypes[0];
}
} catch (DebugException e) {
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceListValue.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceListValue.java
index 30c7a36..894fc1d 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceListValue.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceListValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2007, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Stepan Vavra - Bug 419316 - All References or All instances may throw NPE in Eclipse
*******************************************************************************/
package org.eclipse.jdt.internal.debug.core.model;
@@ -57,7 +58,7 @@ public class JDIReferenceListValue extends JDIObjectValue implements
try {
IJavaType[] javaTypes = ((JDIDebugTarget) root.getDebugTarget())
.getJavaTypes("java.lang.Object[]"); //$NON-NLS-1$
- if (javaTypes.length > 0) {
+ if (javaTypes != null && javaTypes.length > 0) {
fType = javaTypes[0];
}
} catch (DebugException e) {