Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2017-01-02 05:43:19 -0500
committerStephan Herrmann2017-01-15 13:20:34 -0500
commitd891353d93422f3b6fdff3387f3831f7af5c132c (patch)
treeb29a4c5cd6244cafc71eb36c881cd463136aefc6
parent9c554e6066aaf26ee11a418ae45b2b1e348e9346 (diff)
downloadorg.eclipse.objectteams-d891353d93422f3b6fdff3387f3831f7af5c132c.tar.gz
org.eclipse.objectteams-d891353d93422f3b6fdff3387f3831f7af5c132c.tar.xz
org.eclipse.objectteams-d891353d93422f3b6fdff3387f3831f7af5c132c.zip
Bug 507254 - Run tests with assertions enabled
- fix AssertionError in TeamModel.getSuperTeam
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java
index f2ec22ca9..209d0b515 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java
@@ -234,12 +234,10 @@ public class TeamModel extends TypeModel {
} else {
superBinding = this._binding.superclass();
}
- if (superBinding == null)
- return null;
+ if (superBinding instanceof ReferenceBinding)
+ return ((ReferenceBinding)superBinding).getTeamModel();
- assert( superBinding.isClass() ); // then we can cast to ReferenceBinding
-
- return ((ReferenceBinding)superBinding).getTeamModel();
+ return null;
}
/**

Back to the top