Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2013-11-19 11:53:16 +0000
committerStephan Herrmann2013-11-19 11:53:16 +0000
commitddb7c935a918b5b144f53bd9e16443c352f353b9 (patch)
tree5f4f7c1d3a3ec4086a103d77bbe07367fa39c74c
parent4e7b0e58f5d74420d25d2e8e6ad015d9909cd5f7 (diff)
downloadeclipse.jdt.core-ddb7c935a918b5b144f53bd9e16443c352f353b9.tar.gz
eclipse.jdt.core-ddb7c935a918b5b144f53bd9e16443c352f353b9.tar.xz
eclipse.jdt.core-ddb7c935a918b5b144f53bd9e16443c352f353b9.zip
Avoid NPE during draft problem reporting
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index 2d5e23a15f..a6697d506a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -4185,10 +4185,10 @@ public void invalidMethod(MessageSend messageSend, MethodBinding method) {
IProblem.TypeMismatch,
new String[] {
String.valueOf(shownMethod.returnType.readableName()),
- String.valueOf(problemMethod.returnType.readableName())},
+ (problemMethod.returnType != null ? String.valueOf(problemMethod.returnType.readableName()) : "<unknown>")},
new String[] {
String.valueOf(shownMethod.returnType.shortReadableName()),
- String.valueOf(problemMethod.returnType.shortReadableName())},
+ (problemMethod.returnType != null ? String.valueOf(problemMethod.returnType.shortReadableName()) : "<unknown>")},
messageSend.sourceStart,
messageSend.sourceEnd);
return;

Back to the top