summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2012-09-07 12:20:18 (EDT)
committerKaren Butzke2012-09-07 12:20:18 (EDT)
commitc2510e9fda17ae0e8dc1c3016f8a8aedfe295061 (patch)
treeeab2f9254d21bd41ad326b4cdd1f4d4307be165d
parent4b922380b42cab1a02505c4e858520e0edba4a8f (diff)
downloadwebtools.dali-c2510e9fda17ae0e8dc1c3016f8a8aedfe295061.zip
webtools.dali-c2510e9fda17ae0e8dc1c3016f8a8aedfe295061.tar.gz
webtools.dali-c2510e9fda17ae0e8dc1c3016f8a8aedfe295061.tar.bz2
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.java10
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 ba4323d..109f0b9 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()) {