Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2010-07-02 17:00:09 +0000
committerStephan Herrmann2010-07-02 17:00:09 +0000
commit1bd7ad1211619ff3dde858f7fc4b9261e3916521 (patch)
tree21a2bb1e392d693d2f3d4c8eddcff0c3a2653e10
parent267c5d39f1cbc328a5e49dd5b2cf0751edde7963 (diff)
downloadorg.eclipse.objectteams-1bd7ad1211619ff3dde858f7fc4b9261e3916521.tar.gz
org.eclipse.objectteams-1bd7ad1211619ff3dde858f7fc4b9261e3916521.tar.xz
org.eclipse.objectteams-1bd7ad1211619ff3dde858f7fc4b9261e3916521.zip
avoid an NPE observed while verifying Bug 316659
-rw-r--r--plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/text/correction/PrecedenceProposalSubProcessor.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/text/correction/PrecedenceProposalSubProcessor.java b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/text/correction/PrecedenceProposalSubProcessor.java
index 958a91da9..e0c844980 100644
--- a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/text/correction/PrecedenceProposalSubProcessor.java
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/text/correction/PrecedenceProposalSubProcessor.java
@@ -342,10 +342,10 @@ public class PrecedenceProposalSubProcessor {
}
- @SuppressWarnings("unchecked") // uses parameterless list of DOM AST.
private static CallinMappingDeclaration findCallinMapping(TypeDeclaration roleType, String callinName)
{
boolean isAnonymous = callinName.charAt(0) == '<';
+ @SuppressWarnings("rawtypes")
List members = roleType.bodyDeclarations();
if (members != null) {
for (Object object : members) {
@@ -356,9 +356,11 @@ public class PrecedenceProposalSubProcessor {
return mapping;
} else if (isAnonymous) {
IMethodMappingBinding binding = mapping.resolveBinding();
- String currentName = binding.getName();
- if (currentName.startsWith(callinName)) // binding name comprises the full declaration
- return mapping;
+ if (binding != null) {
+ String currentName = binding.getName();
+ if (currentName.startsWith(callinName)) // binding name comprises the full declaration
+ return mapping;
+ }
}
}
}

Back to the top