fix bug 9769 (problem importing with SBV tries to extend itself)
authortimkelly
Thu, 03 Sep 2009 09:41:41 -0500
changeset 480 1c93b442d8bd
parent 479 cbeb8ae51319
child 481 eaff99ecf29a
fix bug 9769 (problem importing with SBV tries to extend itself)
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBVPlatform.java
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBVPlatform.java	Wed Sep 02 16:32:58 2009 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBVPlatform.java	Thu Sep 03 09:41:41 2009 -0500
@@ -89,7 +89,15 @@
 	 * @param customized
 	 */
 	void setExtendedPlatform(ISBVPlatform customized) {
-		Check.checkState(customized != this);
+		
+		if (customized == this) {
+			// If the platform is the same as the extension then just ignore, there is no customization.
+			// This can happen if a platform variant tries to extend itself (boog 9320)
+			String errMsg = "Platform " + this.getName() + " cannot customize itself. Ignoring extended platform for this binary variation."; //$NON-NLS-N$
+			SDKCorePlugin.getDefault().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.getPluginId(), errMsg, null));		
+			return;
+		}
+		
 		this.extendedPlatform = customized;
 		if (customized != null) {
 			this.extendedPlatName = customized.getName();