aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhongwei2013-01-02 21:13:05 (EST)
committerzzhongwei2013-01-02 21:13:54 (EST)
commit62f3887630a043af53d0e040a2ec3165a89b1aa6 (patch)
tree1aceb95ca2bdf67afac22a043f1dbd56e59dd4bf
parent216a78db471968734c4226131b2add58084971fb (diff)
downloadorg.eclipse.pdt-62f3887630a043af53d0e040a2ec3165a89b1aa6.zip
org.eclipse.pdt-62f3887630a043af53d0e040a2ec3165a89b1aa6.tar.gz
org.eclipse.pdt-62f3887630a043af53d0e040a2ec3165a89b1aa6.tar.bz2
397341: 'Updating occurrence annotations' has encountered a problem
error when debugging https://bugs.eclipse.org/bugs/show_bug.cgi?id=397341
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/typeinference/evaluators/IteratorTypeGoalEvaluator.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/typeinference/evaluators/IteratorTypeGoalEvaluator.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/typeinference/evaluators/IteratorTypeGoalEvaluator.java
index 1eacc90..0e0c543 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/typeinference/evaluators/IteratorTypeGoalEvaluator.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/typeinference/evaluators/IteratorTypeGoalEvaluator.java
@@ -143,11 +143,15 @@ public class IteratorTypeGoalEvaluator extends GoalEvaluator {
for (int i = 0; i < docBlocks.length; i++) {
PHPDocTag[] tags = docBlocks[i].getTags();
for (int j = 0; j < tags.length; j++) {
- PHPDocTag tag = tags[i];
+ PHPDocTag tag = tags[j];
if (tag.getTagKind() == PHPDocTag.PARAM) {
SimpleReference[] refs = tag.getReferences();
- if (refs[1].getName().equals(
- type.getElementName() + PHPDocClassVariableEvaluator.BRACKETS)) {
+ if (refs != null
+ && refs.length > 1
+ && refs[1]
+ .getName()
+ .equals(type.getElementName()
+ + PHPDocClassVariableEvaluator.BRACKETS)) {
return true;
}
}