summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpadilla2013-08-15 16:29:45 (EDT)
committerChris2013-08-21 14:58:34 (EDT)
commit6e93b676f010d5108482ee488ac514e60b09b10b (patch)
tree333b3a620bf2b6c1c1be6d07bd3710a09b1a7505
parent670434e406e22c8603df251a6fa1a42203de76a5 (diff)
downloadwebtools.jsdt.core-6e93b676f010d5108482ee488ac514e60b09b10b.zip
webtools.jsdt.core-6e93b676f010d5108482ee488ac514e60b09b10b.tar.gz
webtools.jsdt.core-6e93b676f010d5108482ee488ac514e60b09b10b.tar.bz2
Improve to patch for bugzilla 377241.v201308211905v201308201905
ArrayType fields should only be computed for StringLiterals.
-rw-r--r--bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/ArrayReference.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/ArrayReference.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/ArrayReference.java
index fb55d92..69eb323 100644
--- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/ArrayReference.java
+++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/ArrayReference.java
@@ -84,9 +84,9 @@ public FlowInfo analyseCode(
TypeBinding elementType = ((ArrayBinding) arrayType).elementsType();
this.resolvedType = elementType;
} else if (arrayType instanceof SourceTypeBinding) {
- this.resolvedType = TypeBinding.UNKNOWN;
- FieldBinding[] fields = ((SourceTypeBinding) arrayType).fields();
+ this.resolvedType = TypeBinding.UNKNOWN;
if (position instanceof StringLiteral) {
+ FieldBinding[] fields = ((SourceTypeBinding) arrayType).fields();
char[] positionSource = ((StringLiteral) position).source;
for (int idx = 0; idx < fields.length; idx++) {
if (CharOperation.equals(positionSource, fields[idx].name)) {