summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Panchenko2012-09-16 06:07:26 (EDT)
committerAlex Panchenko2012-09-16 06:07:26 (EDT)
commitd637598bcfc6aea1ebd737a43d68c0f109eb9ce7 (patch)
treecd8ae7bad873282aae66bdb94f87da03a517c470
parent46d512e4f889cfe1d7d3b7e06837e533d175f343 (diff)
downloadorg.eclipse.dltk.javascript-d637598bcfc6aea1ebd737a43d68c0f109eb9ce7.zip
org.eclipse.dltk.javascript-d637598bcfc6aea1ebd737a43d68c0f109eb9ce7.tar.gz
org.eclipse.dltk.javascript-d637598bcfc6aea1ebd737a43d68c0f109eb9ce7.tar.bz2
internal/assert: check the condition first, then evaluate assert message
-rw-r--r--plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/parser/JSDocValidatorFactory.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/parser/JSDocValidatorFactory.java b/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/parser/JSDocValidatorFactory.java
index d33f785..c0d9e7e 100644
--- a/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/parser/JSDocValidatorFactory.java
+++ b/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/parser/JSDocValidatorFactory.java
@@ -163,8 +163,10 @@ public class JSDocValidatorFactory {
protected void checkType(ISourceNode tag, Type type,
IValueCollection collection, int flags) {
- Assert.isTrue(type.getKind() != TypeKind.UNRESOLVED, "Type \""
- + type.getName() + "\" is a proxy");
+ if (type.eIsProxy()) {
+ Assert.isTrue(!type.eIsProxy(), "Type \"" + type.getName()
+ + "\" is a proxy");
+ }
if (type.getKind() == TypeKind.UNKNOWN) {
if ((flags & LOCAL_TYPES) != 0 && collection != null) {
if (collection.getChild(type.getName()).exists()) {