bug 473392 - [compiler][otdre] ClassCastException when callin is
suppressed by base predicate but result lifting still happens 
- more fixes
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java
index 55a25a1..374875e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementorDyn.java
@@ -17,6 +17,7 @@
 import static org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.AccPublic;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
@@ -973,7 +974,8 @@
 		if (binding.superclass.isTeam())
 			return gen.messageSend(gen.superReference(), OT_CALL_NEXT, superArgs);
 		// no super-*team* so call the static variant:
-		return gen.messageSend(gen.qualifiedNameReference(IOTConstants.ORG_OBJECTTEAMS_TEAM), OT_TERMINAL_CALL_NEXT, superArgs);
+		return gen.messageSend(gen.qualifiedNameReference(IOTConstants.ORG_OBJECTTEAMS_TEAM), OT_TERMINAL_CALL_NEXT, 
+								Arrays.copyOf(superArgs, superArgs.length-1)); // one fewer arguments
 	}
 
 	Reference genTeamThis(AstGenerator gen, TypeBinding type) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TeamMethodGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TeamMethodGenerator.java
index bf56086..2ad7da0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TeamMethodGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/TeamMethodGenerator.java
@@ -136,7 +136,7 @@
 						gen.argument("boundMethodId".toCharArray(), gen.baseTypeReference(TypeConstants.INT)),
 						gen.argument("args".toCharArray(), 			gen.qualifiedArrayTypeReference(TypeConstants.JAVA_LANG_OBJECT, 1)),
 						gen.argument("baseCallArgs".toCharArray(), 	gen.qualifiedArrayTypeReference(TypeConstants.JAVA_LANG_OBJECT, 1)),
-						gen.argument("isBaseCall".toCharArray(), 	gen.baseTypeReference(TypeConstants.INT))
+						gen.argument("isBaseCall".toCharArray(), 	gen.baseTypeReference(TypeConstants.BOOLEAN))
 					};
 				case OTDYNARGS3:
 					return new Argument[] {
diff --git a/plugins/org.eclipse.objectteams.runtime/src/org/objectteams/Team.java b/plugins/org.eclipse.objectteams.runtime/src/org/objectteams/Team.java
index 613bf97..3a6ce06 100644
--- a/plugins/org.eclipse.objectteams.runtime/src/org/objectteams/Team.java
+++ b/plugins/org.eclipse.objectteams.runtime/src/org/objectteams/Team.java
@@ -599,7 +599,7 @@
 
 	/**
 	 * Executes all before callins for a given callin id.
-	 * Must be overridden by a team, if the team gets replace callins.
+	 * Must be overridden by a team, if the team gets before callins.
 	 *
 	 * @param baze the current base object
 	 * @param callinId the current callin id
@@ -614,7 +614,7 @@
 
 	/**
 	 * Executes all after callins for a given callin id.
-	 * Must be overridden by a team, if the team gets replace callins.
+	 * Must be overridden by a team, if the team gets after callins.
 	 *
 	 * @param baze the current base object
 	 * @param callinId the current callin id
@@ -647,7 +647,7 @@
 	}
 
 	/**
-	 * Calls the method callOrigStatic of a concrete class dependend on the
+	 * Calls the method callOrigStatic of a concrete class dependent on the
 	 * given callin id.
 	 * Must be overridden in a team, if the team has got base calls
 	 * to static base methods