[392400] NullPointerException at
org.eclipse.wst.jsdt.internal.compiler.lookup.SourceTypeBinding.<init>(SourceTypeBinding.java:49)
diff --git a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/TypeDeclaration.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/TypeDeclaration.java
index c408291..6e24e40 100644
--- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/TypeDeclaration.java
+++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/TypeDeclaration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2011, 2013 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
@@ -751,7 +751,7 @@
// if the type is package-info, the javadoc was resolved as part of the compilation unit javadoc
this.javadoc.resolve(this.scope);
}
- } else if (sourceType != null && !sourceType.isLocalType()) {
+ } else if (this.scope != null && sourceType != null && !sourceType.isLocalType()) {
this.scope.problemReporter().javadocMissing(this.sourceStart, this.sourceEnd, sourceType.modifiers);
}
@@ -947,7 +947,7 @@
* This method is doing either up/down propagation.
*/
void updateMaxFieldCount() {
- if (this.binding == null)
+ if (this.scope == null || this.binding == null)
return; // error scenario
TypeDeclaration outerMostType = this.scope.outerMostClassScope().referenceType();
if (this.maxFieldCount > outerMostType.maxFieldCount) {
diff --git a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/ReferenceBinding.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/ReferenceBinding.java
index 8837a9f..1a93707 100644
--- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/ReferenceBinding.java
+++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/ReferenceBinding.java
@@ -272,7 +272,8 @@
}
public void computeId() {
-
+ if (this.compoundName == null) return;
+
switch (this.compoundName.length) {
case 1 :
diff --git a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/SourceTypeBinding.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/SourceTypeBinding.java
index f3f663d..8f87c68 100644
--- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/SourceTypeBinding.java
+++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/lookup/SourceTypeBinding.java
@@ -149,7 +149,7 @@
this();
this.compoundName = compoundName;
this.fPackage = fPackage;
- this.fileName = scope.referenceCompilationUnit().getFileName();
+ this.fileName = scope == null ? null : scope.referenceCompilationUnit().getFileName();
if (scope instanceof ClassScope) {
this.classScope = (ClassScope) scope;
if (this.classScope.referenceContext != null) {