diff options
author | Karen Butzke | 2012-09-07 16:20:18 +0000 |
---|---|---|
committer | Karen Butzke | 2012-09-07 16:20:18 +0000 |
commit | c2510e9fda17ae0e8dc1c3016f8a8aedfe295061 (patch) | |
tree | eab2f9254d21bd41ad326b4cdd1f4d4307be165d | |
parent | 4b922380b42cab1a02505c4e858520e0edba4a8f (diff) | |
download | webtools.dali-c2510e9fda17ae0e8dc1c3016f8a8aedfe295061.tar.gz webtools.dali-c2510e9fda17ae0e8dc1c3016f8a8aedfe295061.tar.xz webtools.dali-c2510e9fda17ae0e8dc1c3016f8a8aedfe295061.zip |
More ITypeBinding null checks
-rw-r--r-- | common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceType.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceType.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceType.java index ba4323d51c..109f0b9df8 100644 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceType.java +++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceType.java @@ -660,6 +660,9 @@ final class SourceType // ***** inherited field/method types ***** private void initInheritedFieldTypes(ITypeBinding typeBinding) { + if (typeBinding == null) { + return; + } ITypeBinding scTypeBinding = typeBinding.getSuperclass(); while (scTypeBinding != null && scTypeBinding.isParameterizedType()) { // if the superclass is not parameterized, @@ -684,7 +687,7 @@ final class SourceType } private void syncInheritedFieldTypes(ITypeBinding typeBinding) { - ITypeBinding scTypeBinding = typeBinding.getSuperclass(); + ITypeBinding scTypeBinding = typeBinding == null ? null : typeBinding.getSuperclass(); Map<InheritedAttributeKey, JavaResourceTypeBinding> removedTypes = new HashMap<InheritedAttributeKey, JavaResourceTypeBinding>(this.inheritedFieldTypes); while (scTypeBinding != null && scTypeBinding.isParameterizedType()) { @@ -714,6 +717,9 @@ final class SourceType } private void initInheritedMethodTypes(ITypeBinding typeBinding) { + if (typeBinding == null) { + return; + } ITypeBinding scTypeBinding = typeBinding.getSuperclass(); while (scTypeBinding != null && scTypeBinding.isParameterizedType()) { // if the superclass is not parameterized, @@ -743,7 +749,7 @@ final class SourceType } private void syncInheritedMethodTypes(ITypeBinding typeBinding) { - ITypeBinding scTypeBinding = typeBinding.getSuperclass(); + ITypeBinding scTypeBinding = typeBinding == null ? null : typeBinding.getSuperclass(); Map<InheritedAttributeKey, JavaResourceTypeBinding> removedTypes = new HashMap<InheritedAttributeKey, JavaResourceTypeBinding>(this.inheritedMethodTypes); while (scTypeBinding != null && scTypeBinding.isParameterizedType()) { |