Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvrubezhny2015-04-04 01:53:30 +0000
committervrubezhny2015-04-04 02:16:14 +0000
commitb7499a4c43fc0ceed3c94be2348cc3f55494ee28 (patch)
tree8c713638f2cdcbb971d21fed3fd236a9f8bbe347
parent7fb458b4edfa56b4f33b6a3946b3386c4bc1fa59 (diff)
downloadwebtools.jsdt-b7499a4c43fc0ceed3c94be2348cc3f55494ee28.tar.gz
webtools.jsdt-b7499a4c43fc0ceed3c94be2348cc3f55494ee28.tar.xz
webtools.jsdt-b7499a4c43fc0ceed3c94be2348cc3f55494ee28.zip
Bug 260746 - [exceptions] ClassCastException in JS' Javadoc's internalResolveType
JavadocImplicitTypeReference extends the Expression object which defines "resolvedType" class member variable and the explicitly initializes it as the following: public TypeBinding resolvedType = TypeBinding.UNKNOWN; So, the proper fix should be an additional check that resolvedType is not null *and* is not equals to TypeBinding.UNKNOWN. Change-Id: I30d3599b58084db0d92d100464a5ca5cdda545c9 Signed-off-by: vrubezhny <vrubezhny@exadel.com>
-rw-r--r--bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/JavadocImplicitTypeReference.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/JavadocImplicitTypeReference.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/JavadocImplicitTypeReference.java
index a2c68a3d2..bab00cf10 100644
--- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/JavadocImplicitTypeReference.java
+++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/JavadocImplicitTypeReference.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -69,7 +69,7 @@ public class JavadocImplicitTypeReference extends TypeReference implements IJsDo
private TypeBinding internalResolveType(Scope scope) {
// handle the error here
this.constant = Constant.NotAConstant;
- if (this.resolvedType != null) // is a shared type reference which was already resolved
+ if (this.resolvedType != null && this.resolvedType != TypeBinding.UNKNOWN) // is a shared type reference which was already resolved
return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
this.resolvedType = scope.enclosingSourceType();

Back to the top