Bug 545316 - Parser throws CCE on ParameterMappingDeclaration

- fixed similar issue of callout with parameter mapping
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index 1e1ce2b..623cf4b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -2792,7 +2792,7 @@
 
 	// CalloutParameterMappingsopt
 	boolean pendingParamMappings= this.intStack[this.intPtr--] == 1; // pushed in consumeNestedParamMappings/consumeParameterMappingsEmpty
-	if (pendingParamMappings)
+	if (pendingParamMappings && this.diet)
 		calloutBinding.mappings= AbstractMethodMappingDeclaration.PENDING_MAPPINGS;
 	else
 		copyParamMappingsAndPositions(paramlength, calloutBinding);
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/model/org/eclipse/objectteams/otdt/tests/otmodel/OTReconcilerTests.java b/testplugins/org.eclipse.objectteams.otdt.tests/model/org/eclipse/objectteams/otdt/tests/otmodel/OTReconcilerTests.java
index f9ef881..f49d1b2 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/model/org/eclipse/objectteams/otdt/tests/otmodel/OTReconcilerTests.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/model/org/eclipse/objectteams/otdt/tests/otmodel/OTReconcilerTests.java
@@ -64,6 +64,7 @@
 import org.eclipse.jdt.internal.core.SearchableEnvironment;
 import org.eclipse.jdt.internal.core.SourceType;
 import org.eclipse.jdt.internal.core.SourceTypeElementInfo;
+import org.eclipse.jdt.internal.core.nd.indexer.Indexer;
 import org.eclipse.objectteams.otdt.core.IOTType;
 import org.eclipse.objectteams.otdt.core.IRoleType;
 import org.eclipse.objectteams.otdt.core.OTModelManager;
@@ -2394,6 +2395,7 @@
 				"public class Base {\n" +
 				"	public static void baseMethod1(int flag, String name) {}\n" +
 				"	public static void baseMethod(int flag, String name) {}\n" +
+				"	public String f;\n" +
 				"}\n"
 			);
 			
@@ -2420,6 +2422,9 @@
 					"		static callin void m2(int f, String both) {\n" +
 					"			base.m2(f, both);\n" +
 					"		}\n" +
+					"		int getFLength() -> get String f with {\n" +
+					"			result <- f.length()\n" +
+					"		}\n" +
 					"	}\n" +
 					"}\n";
 			this.createFile(
@@ -2427,6 +2432,7 @@
 					sourceFoo
 			);
 
+			Indexer.getInstance().waitForIndex(null);
 			char[] sourceChars = sourceFoo.toCharArray();
 			this.problemRequestor.initialize(sourceChars);